0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 05:33:02 -05:00

Component Instances (#124)

* wip

* wip

* wipo

* more structure

* wip

* id library wip

* wip

* main instance working

* improvements

* fix node order

* refactor

* remove not used method

* refactor

* fix component set translation

* refactor

* add changelog

* penpot lib update

---------

Co-authored-by: Jordi Sala Morales <jordism91@gmail.com>
This commit is contained in:
Alex Sánchez 2024-05-30 17:54:37 +02:00 committed by GitHub
parent 5d4ace337b
commit 7b3192936e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 415 additions and 148 deletions

View file

@ -0,0 +1,5 @@
---
"penpot-exporter": minor
---
Implement component instances translation

View file

@ -4,6 +4,7 @@ export * from './transformDocumentNode';
export * from './transformEllipseNode';
export * from './transformFrameNode';
export * from './transformGroupNode';
export * from './transformInstanceNode';
export * from './transformPageNode';
export * from './transformPathNode';
export * from './transformRectangleNode';

View file

@ -3,6 +3,7 @@ export * from './transformChildren';
export * from './transformCornerRadius';
export * from './transformDimensionAndPosition';
export * from './transformEffects';
export * from './transformFigmaIds';
export * from './transformFills';
export * from './transformProportion';
export * from './transformRotationAndPosition';

View file

@ -0,0 +1,22 @@
import { ShapeBaseAttributes } from '@ui/lib/types/shapes/shape';
export const transformFigmaIds = (
node: SceneNode
): Pick<ShapeBaseAttributes, 'figmaId' | 'figmaRelatedId'> => {
return {
figmaId: normalizeNodeId(node.id),
figmaRelatedId: getRelatedNodeId(node.id)
};
};
const getRelatedNodeId = (nodeId: string): string | undefined => {
const ids = nodeId.split(';');
if (ids.length > 1) {
return ids.slice(1).join(';');
}
};
const normalizeNodeId = (nodeId: string): string => {
return nodeId.replace('I', '');
};

View file

@ -3,6 +3,7 @@ import {
transformChildren,
transformDimensionAndPosition,
transformEffects,
transformFigmaIds,
transformFills,
transformProportion,
transformSceneNode,
@ -21,6 +22,7 @@ export const transformBooleanNode = async (
type: 'bool',
name: node.name,
boolType: translateBoolType(node.booleanOperation),
...transformFigmaIds(node),
...(await transformChildren(node, baseX, baseY)),
...(await transformFills(node)),
...transformEffects(node),

View file

@ -5,6 +5,7 @@ import {
transformCornerRadius,
transformDimensionAndPosition,
transformEffects,
transformFigmaIds,
transformFills,
transformProportion,
transformSceneNode,
@ -22,6 +23,7 @@ export const transformComponentNode = async (
type: 'component',
name: node.name,
path: '',
...transformFigmaIds(node),
...(await transformFills(node)),
...transformEffects(node),
...(await transformStrokes(node)),

View file

@ -2,6 +2,7 @@ import {
transformBlend,
transformDimension,
transformEffects,
transformFigmaIds,
transformFills,
transformProportion,
transformRotationAndPosition,
@ -19,6 +20,7 @@ export const transformEllipseNode = async (
return {
type: 'circle',
name: node.name,
...transformFigmaIds(node),
...(await transformFills(node)),
...transformEffects(node),
...(await transformStrokes(node)),

View file

@ -4,6 +4,7 @@ import {
transformCornerRadius,
transformDimensionAndPosition,
transformEffects,
transformFigmaIds,
transformFills,
transformProportion,
transformSceneNode,
@ -41,6 +42,7 @@ export const transformFrameNode = async (
type: 'frame',
name: node.name,
showContent: isSectionNode(node) ? true : !node.clipsContent,
...transformFigmaIds(node),
...(await transformFills(node)),
...frameSpecificAttributes,
...(await transformChildren(node, baseX + node.x, baseY + node.y)),

View file

@ -2,6 +2,7 @@ import {
transformBlend,
transformDimensionAndPosition,
transformEffects,
transformFigmaIds,
transformSceneNode
} from '@plugin/transformers/partials';
import { transformChildren } from '@plugin/transformers/partials';
@ -14,6 +15,7 @@ export const transformGroupNode = async (
baseY: number
): Promise<GroupShape> => {
return {
...transformFigmaIds(node),
...transformGroupNodeLike(node, baseX, baseY),
...transformEffects(node),
...transformBlend(node),

View file

@ -0,0 +1,64 @@
import {
transformBlend,
transformChildren,
transformCornerRadius,
transformDimensionAndPosition,
transformEffects,
transformFigmaIds,
transformFills,
transformProportion,
transformSceneNode,
transformStrokes
} from '@plugin/transformers/partials';
import { ComponentInstance } from '@ui/types';
export const transformInstanceNode = async (
node: InstanceNode,
baseX: number,
baseY: number
): Promise<ComponentInstance | undefined> => {
const mainComponent = await node.getMainComponentAsync();
/**
* We do not want to process component instances in the following scenarios:
*
* 1. If the component does not have a main component.
* 2. If the component does not have parent (it comes from an external design system).
* 3. If the component is inside a component set, (it is a variant component).
*/
if (
!mainComponent ||
mainComponent.parent === null ||
mainComponent.parent.type === 'COMPONENT_SET'
) {
return;
}
return {
type: 'instance',
mainComponentFigmaId: mainComponent.id,
isComponentRoot: isComponentRoot(node),
...transformFigmaIds(node),
...(await transformFills(node)),
...transformEffects(node),
...(await transformStrokes(node)),
...transformSceneNode(node),
...transformBlend(node),
...transformProportion(node),
...transformCornerRadius(node),
...transformDimensionAndPosition(node, baseX, baseY),
...(await transformChildren(node, baseX + node.x, baseY + node.y))
};
};
const isComponentRoot = (node: InstanceNode): boolean => {
let parent = node.parent;
while (parent !== null) {
if (parent.type === 'COMPONENT' || parent.type === 'INSTANCE') {
return false;
}
parent = parent.parent;
}
return true;
};

View file

@ -2,6 +2,7 @@ import {
transformBlend,
transformDimensionAndPosition,
transformEffects,
transformFigmaIds,
transformFills,
transformProportion,
transformSceneNode,
@ -23,6 +24,7 @@ export const transformPathNode = async (
return {
type: 'path',
name: node.name,
...transformFigmaIds(node),
...(hasFillGeometry(node) ? await transformFills(node) : []),
...(await transformStrokes(node)),
...transformEffects(node),

View file

@ -3,6 +3,7 @@ import {
transformCornerRadius,
transformDimension,
transformEffects,
transformFigmaIds,
transformFills,
transformProportion,
transformRotationAndPosition,
@ -20,6 +21,7 @@ export const transformRectangleNode = async (
return {
type: 'rect',
name: node.name,
...transformFigmaIds(node),
...(await transformFills(node)),
...transformEffects(node),
...(await transformStrokes(node)),

View file

@ -6,6 +6,7 @@ import {
transformEllipseNode,
transformFrameNode,
transformGroupNode,
transformInstanceNode,
transformPathNode,
transformRectangleNode,
transformTextNode,
@ -39,6 +40,8 @@ export const transformSceneNode = async (
return await transformBooleanNode(node, baseX, baseY);
case 'COMPONENT':
return await transformComponentNode(node, baseX, baseY);
case 'INSTANCE':
return await transformInstanceNode(node, baseX, baseY);
}
console.error(`Unsupported node type: ${node.type}`);

View file

@ -2,6 +2,7 @@ import {
transformBlend,
transformDimensionAndPosition,
transformEffects,
transformFigmaIds,
transformProportion,
transformSceneNode,
transformStrokes,
@ -18,6 +19,7 @@ export const transformTextNode = async (
return {
type: 'text',
name: node.name,
...transformFigmaIds(node),
...(await transformText(node)),
...transformDimensionAndPosition(node, baseX, baseY),
...transformEffects(node),

View file

@ -1,4 +1,4 @@
import { transformVectorPaths } from '@plugin/transformers/partials';
import { transformFigmaIds, transformVectorPaths } from '@plugin/transformers/partials';
import { GroupShape } from '@ui/lib/types/shapes/groupShape';
import { PathShape } from '@ui/lib/types/shapes/pathShape';
@ -21,12 +21,14 @@ export const transformVectorNode = async (
if (children.length === 1) {
return {
...children[0],
name: node.name
name: node.name,
...transformFigmaIds(node)
};
}
return {
...transformGroupNodeLike(node, baseX, baseY),
...transformFigmaIds(node),
children
};
};

View file

@ -3724,96 +3724,96 @@ GQ),c=a?.y1??B.j(a,HQ),e=a?.x2??B.j(a,EQ),h=a?.y2??B.j(a,FQ),I.U(a,ZP,Math.min(b
M,[XP(b,c),XP(b+e,c),XP(b+e,c+a),XP(b,c+a)],null)):null},JQ=function(a){var b=a?.x??B.j(a,ZP),c=a?.y??B.j(a,YP),e=a?.width??B.j(a,xz);a=a?.height??B.j(a,DQ);return Qp(b,c,e,a)?XP(b+e/2,c+a/2):null},LQ=function(a){var b=p(a);if(b)for(var c=a=Infinity,e=-Infinity,h=-Infinity;;){var m=t(b);if(g(m)){var q=m;m=q?.x??B.j(q,ZP);q=q?.y??B.j(q,YP);a=Math.min(a,m);c=Math.min(c,q);e=Math.max(e,m);h=Math.max(h,q);b=ke(b)}else return Qp(a,c,e,h)?KQ.ba(a,c,e-a,h-c):null}else return null},OQ=function(a){if(p(a)){var b=
Qf(Hoa,MQ,Infinity,a),c=Qf(Ioa,MQ,Infinity,a),e=Qf(Joa,NQ,-Infinity,a);a=Qf(Koa,NQ,-Infinity,a);return Qp(b,c,e,a)?KQ.ba(b,c,e-b,a-c):null}return null},PQ=function(a,b){var c=a?.x??B.j(a,ZP),e=a?.y??B.j(a,YP),h=c+(a?.width??B.j(a,xz));a=e+(a?.height??B.j(a,DQ));var m=b?.x??B.j(b,ZP),q=b?.y??B.j(b,YP),r=m+(b?.width??B.j(b,xz));b=q+(b?.height??B.j(b,DQ));return(h>m||Eo(h-m))&&(r>=c||Eo(r-c))&&(q<=a||Eo(q-a))&&(e<=b||Eo(e-b))},QQ=function(a,b){var c=ZP.J(a),e=YP.J(a),h=ZP.J(a)+xz.J(a);a=YP.J(a)+DQ.J(a);
var m=ZP.J(b);b=YP.J(b);return(m>c||Eo(m-c))&&(m<h||Eo(m-h))&&(b>e||Eo(b-e))&&(b<a||Eo(b-a))},RQ=function(a,b){if(g(b)){var c=a?.width??B.j(a,xz),e=a?.height??B.j(a,DQ),h=c*b;b=1/b*e;a=h>e?Yp.ba(I.N(a,DQ,h),YP,kJ,(h-e)/2):a;return h<e?Yp.ba(I.N(a,xz,b),ZP,kJ,(b-c)/2):a}return a},Loa=function(a){return OQ(Gh(function(b){return LQ(b?.points??B.j(b,SQ))},a))},TQ=function(a){var b=Zi.N(fi,Moa,a),c=Zi.N(fi,Noa,a);a=qc(MQ,Infinity,b);var e=qc(MQ,Infinity,c);b=qc(NQ,-Infinity,b);c=qc(NQ,-Infinity,c);return XP((a+
b)/2,(e+c)/2)},VQ=function(a){return JQ(a?.bb??B.j(a,UQ))},XQ=function(a,b){return WQ(a,null,b)},WQ=function(a,b,c){if(qQ(c)&&p(a)){var e=null!=b?xQ.J(b):vc(YQ);b=null!=b?Doa(b):YQ;var h=tQ(tQ(e,c),b);return nt.j(function(m){return jQ(m,h)},a)}return a},Ooa=function(a){var b=G(a);a=B.j(b,SQ);b=B.j(b,UQ);return isNaN(ZP.J(b))||isNaN(YP.J(b))||isNaN(xz.J(b))||isNaN(DQ.J(b))||th(function(c){return isNaN(ZP.J(c))||isNaN(YP.J(c))},a)},$Q=function(a){return null!=ZQ.J(a)},Poa=function(a){a=tp(function(b){return Po(b,
"swap-slot-")},Nh.j(kk,aR.J(a)));return g(a)?Dm(a.substring(10)):null},Qoa=function(a,b){return gk(ci.j(function(c){var e=B.j(a,c),h=B.j(b,c);return!(x.j(c,bR)?x.j(cR(e),cR(h)):x.j(e,h))},ik(zh.j(Tj(a),Tj(b)))))},Soa=function(a){var b=G(null);b=B.N(b,Roa,!1);return g(b)?dR.J(a):eca(function(c){A(c,0,null);c=A(c,1,null);return eR.J(c)},dR.J(a))},fR=function(a){return Jo.j(eR,Vj(dR.J(a)))},Toa=function(a,b){b=G(b);var c=B.j(b,R),e=B.j(b,S),h=B.j(b,Ez),m=B.j(b,gR),q=B.j(b,hR),r=B.j(b,bR),u=B.j(b,iR),
w=B.j(b,jR);return Dp(a,new K(null,2,5,M,[dR,c],null),function(z){var C=null==r?null:Of.J?Of.J(r):r,E=null!=e?I.N(z,S,e):z;E=null!=h?I.N(E,Ez,h):E;E=null!=m?I.N(E,gR,m):E;E=null!=q?I.N(E,hR,q):E;C=null!=C?I.N(E,bR,C):E;C=null!=w?I.N(C,jR,w):C;C=null!=u?I.N(C,iR,u):C;C=null==u?ln.j(C,iR):C;z=kR.j(Qoa(z,C),new bk(null,new f(null,2,[jR,null,iR,null],null),null));return Ye(z)?C:I.N(C,jR,lR.local())})},Uoa=function(a,b){a=fp.j(a,new K(null,2,5,M,[dR,b],null));return g(g(!1)?!1:fc(eR.J(a)))?a:null},mR=
function(a){for(var b=[],c=arguments.length,e=0;;)if(e<c)b.push(arguments[e]),e+=1;else break;b=3<b.length?new ge(b.slice(3),0,null):null;return Voa(arguments[0],arguments[1],arguments[2],b)},Voa=function(a,b,c,e){return Dp(a,new K(null,2,5,M,[dR,b],null),function(h){return I.N(Qg(c,h,e),jR,lR.local())})},Woa=function(a,b){return Cp(a,new K(null,2,5,M,[dR,b],null),I,y([eR,!0]))},Xoa=function(a,b){return nR(a,new K(null,3,5,M,[dR,b,eR],null))},pR=function(a,b){return B.j(B.j(a,oR),b)},Yoa=function(a,
b){b=G(b);var c=B.j(b,R),e=B.j(b,qR);return Yp.qa(Yp.N(a,rR,function(h){var m=th(xh(x,c),h);return g(m)?h:null==e?hg.j(h,c):Mp(h,e,new K(null,1,5,M,[c],null))}),oR,I,c,ln.j(b,qR))},Zoa=function(a,b){return Yp.ba(Yp.N(a,rR,function(c){return gi(function(e){return Xj.j(e,b)},c)}),oR,ln,b)},uR=function(a){return x.j(a?.type??B.j(a,Q),sR)&&x.j(a?.id??B.j(a,R),tR)},$oa=function(a){return null!=a&&x.j(YH,a?.type??B.j(a,Q))},vR=function(a){return null!=a&&x.j(ZH,a?.type??B.j(a,Q))},wR=function(a){return null!=
a&&x.j(Ez,a?.type??B.j(a,Q))},yR=function(a,b){return function m(e,h){if(yf(h,e))return null;var q=function(){var r=xR.J(B.j(a,e));return null==r?null:zi(r)}();return g(q)?Zi.N(q,$h(function(r){return m(r,hg.j(h,e))}),q):null}(b,ck)},zR=function(a,b){return nt.j(xh(B,a),Zi.j(new K(null,1,5,M,[b],null),yR(a,b)))},apa=function(a,b){a=B.j(a,b);return g(a)?a?.Hb??B.j(a,AR):null},BR=function(a,b){for(var c=fi,e=b;;)if(b=apa(a,e),null!=b&&Xj.j(b,e))c=hg.j(c,b),e=b;else return c},bpa=function(a,b){var c=
xh(B,a);return Zi.N(new K(null,1,5,M,[c(b)],null),Nh.J(c),BR(a,b))},cpa=function(a,b){return CR(a,b)},CR=function(a,b){var c=G(null),e=B.N(c,dpa,!1),h=B.N(c,epa,!1),m=xh(B,a);return Jo.j(Ooa,Gh(function(q){q=m(q);return g(q)?(fc(e)||fc(DR.J(q)))&&(fc(h)||fc(ER.J(q)))?q:null:null},xR.J(m(b))))},fpa=function(a,b){return g(b)?hg.j(g(a)?a:ck,b):null},gpa=function(a){a=df(a)?Vj(a):a;return Zi.N(ck,Fh(S),a)},hpa=function(a,b){return qc(function(c,e){return g(th(dk([e]),c))?c:hg.j(c,e)},zi(a),b)},jpa=function(a,
b){return ipa(a,vh(FR),tR,b,fi)},ipa=function(a,b,c,e,h){c=fp.j(a,new K(null,2,5,M,[c,xR],null));if(Ye(c))return h;var m=t(c);c=ke(c);for(var q=ck;;)if(yf(q,m))m=t(c),c=ke(c);else{var r=B.j(a,m);m=hg.j(q,m);h=e.j?e.j(h,r):e(h,r);q=g(function(){var w=null==b;return w?w:b.J?b.J(r):b(r)}())?zh.j(function(){var w=xR.J(r);return g(w)?w:fi}(),c):c;if(Ye(q))return h;c=t(q);q=ke(q);var u=m;m=c;c=q;q=u}},GR=function(a){if(g(a)){a=wq.J(a);var b=G(a);a=B.j(b,ZP);b=B.j(b,YP);return XP(a,b)}return null},KR=function(a){return new f(null,
3,[HR,IR,JR,!1,wq,new f(null,2,[ZP,ZP.J(a),YP,YP.J(a)],null)],null)},MR=function(a){return new f(null,3,[HR,LR,JR,!1,wq,new f(null,2,[ZP,ZP.J(a),YP,YP.J(a)],null)],null)},SR=function(a,b,c){a=new f(null,6,[ZP,ZP.J(a),YP,YP.J(a),NR,ZP.J(b),OR,YP.J(b),PR,ZP.J(c),QR,YP.J(c)],null);return new f(null,3,[HR,RR,JR,!1,wq,a],null)},TR=function(a,b){return.1>eQ(a,b)},kpa=function(a,b,c){return new f(null,3,[UR,a,VR,b,nB,c],null)},lpa=function(a,b){b=x.j(WR,HR.J(b))?MR(UR.J(a)):b;var c=GR(b);return Yp.ba(I.N(a,
VR,c),nB,hg,b)},YR=function(a){var b=qc(function(c,e){var h=A(e,0,null),m=A(e,1,null);if(null!=m){e=hg.j;m=wq.J(m);var q=G(m);m=B.j(q,ZP);q=B.j(q,YP);var r=wq.J(h),u=G(r);r=B.j(u,NR);var w=B.j(u,OR),z=B.j(u,PR);u=B.j(u,QR);m=Yp.U(h,wq,I,ZP,m,YP,y([q]));h=x.j(RR,HR.J(h))?Yp.U(m,wq,I,NR,z,OR,y([u,PR,r,QR,w])):m;c=e.call(hg,c,h)}return c},new K(null,1,5,M,[KR(VR.J(a))],null),ig(Kp(nB.J(a))));return kpa(VR.J(a),UR.J(a),b)},ZR=function(a){return qc(function(b,c){var e=x.j(IR,HR.J(c)),h=He(b)-1;e?(e=hg.j,
h=GR(c),b=e.call(hg,b,kpa(h,h,new K(null,1,5,M,[c],null)))):b=0<=h?Yp.ba(b,h,lpa,c):b;return b},fi,a)},$R=function(a,b){return I.N(Yp.ba(a,nB,Lp,ke(nB.J(b))),VR,VR.J(b))},mpa=function(a,b){return qc(function(c,e){var h=A(c,0,null);c=A(c,1,null);return TR(VR.J(e),UR.J(e))?new K(null,2,5,M,[h,hg.j(c,e)],null):TR(VR.J(h),UR.J(e))?new K(null,2,5,M,[$R(h,e),c],null):TR(UR.J(h),VR.J(e))?new K(null,2,5,M,[$R(e,h),c],null):TR(VR.J(h),VR.J(e))?new K(null,2,5,M,[$R(h,YR(e)),c],null):TR(UR.J(h),UR.J(e))?new K(null,
2,5,M,[$R(YR(e),h),c],null):new K(null,2,5,M,[h,hg.j(c,e)],null)},new K(null,2,5,M,[a,fi],null),b)},npa=function(a){return TR(UR.J(a),VR.J(a))},aS=function(a){var b=ZR(a);a:{a=fi;var c=t(b);for(b=ke(b);;)if(null!=c){var e=npa(c)?new K(null,2,5,M,[c,b],null):mpa(c,b);b=A(e,0,null);e=A(e,1,null);x.j(c,b)?(a=hg.j(a,b),c=t(e),b=ke(e)):(c=b,b=e)}else break a}return Zi.j(fi,ai(nB,y([a])))},opa=function(a){a=nB.J(t(ZR(a)));var b=t(a);a=ke(a);for(var c=null,e=0;;){if(null==b)return 0<e;b=GR(b);var h=G(b),
m=h;b=B.j(h,ZP);h=B.j(h,YP);var q=null==t(a);c=null==c?m:c;m=q?c:GR(t(a));q=G(m);m=B.j(q,ZP);q=B.j(q,YP);b=e+(b*q-m*h);e=t(a);a=ke(a);h=b;b=e;e=h}},bS=function(a,b){var c=A(a,0,null);a=A(a,1,null);b=lQ(cQ(a,c),b);return bQ(c,b)},cS=function(a,b){var c=A(a,0,null),e=A(a,1,null),h=A(a,2,null);a=A(a,3,null);return ppa(c,e,h,a,b)},ppa=function(a,b,c,e,h){function m(C){return(C.J?C.J(a):C(a))*u+(C.J?C.J(c):C(c))*w+(C.J?C.J(e):C(e))*z+(C.J?C.J(b):C(b))*r}var q=h*h,r=q*h,u=-r+3*q+-3*h+1,w=3*r+-6*q+3*h,z=
-3*r+3*q;return aQ(m(ZP),m(YP))},qpa=function(a,b){var c=A(a,0,null),e=A(a,1,null),h=A(a,2,null);a=A(a,3,null);c=new K(null,2,5,M,[new K(null,4,5,M,[ZP.J(c),ZP.J(h),ZP.J(a),ZP.J(e)],null),new K(null,4,5,M,[YP.J(c),YP.J(h),YP.J(a),YP.J(e)],null)],null);e=nt.j(function(m){var q=A(m,0,null),r=A(m,1,null),u=A(m,2,null);m=A(m,3,null);var w=b*b;return q*(-3*w+6*b+-3)+r*(9*w+-12*b+3)+u*(-9*w+6*b)+3*m*w},c);c=A(e,0,null);e=A(e,1,null);h=Do(c,e);return Eo(h)?XP(0,0):XP(c/h,e/h)},rpa=function(a,b,c,e,h){var m=
nQ(a,c,h),q=nQ(c,e,h);e=nQ(e,b,h);c=nQ(m,q,h);q=nQ(q,e,h);h=nQ(c,q,h);return new K(null,2,5,M,[new K(null,4,5,M,[a,h,m,c],null),new K(null,4,5,M,[h,b,q,e],null)],null)},tpa=function(a,b,c){var e=A(a,0,null),h=A(a,1,null),m=A(a,2,null);a=A(a,3,null);return spa(e,h,m,a,b,c)},spa=function(a,b,c,e,h,m){h=h<m?new K(null,2,5,M,[h,m],null):new K(null,2,5,M,[m,h],null);m=A(h,0,null);h=(A(h,1,null)-m)/(1-m);a=rpa(a,b,c,e,m);A(a,0,null);e=A(a,1,null);a=A(e,0,null);b=A(e,1,null);c=A(e,2,null);e=A(e,3,null);
h=rpa(a,b,c,e,h);return t(h)},vpa=function(a,b,c,e){var h=Math.sqrt(b*b-4*a*c);if(Eo(e)&&Eo(a)&&Eo(b))return fi;if(Eo(e)&&Eo(a))return new K(null,1,5,M,[-c/b],null);if(Eo(e))return new K(null,2,5,M,[(-b+h)/(2*a),(-b-h)/(2*a)],null);a/=e;h=b/e;b=(3*h-a*a)/3;c=(2*a*a*a+-9*a*h+c/e*27)/27;h=b/3;e=c/2;h=e*e+h*h*h;if(0>h)return b=-b/3,b=Math.sqrt(b*b*b),c=-c/(2*b),c=Math.acos(-1>c?-1:1<c?1:c),b=2*Bo(b),new K(null,3,5,M,[b*Math.cos(c/3)-a/3,b*Math.cos((c+2*upa)/3)-a/3,b*Math.cos((c+4*upa)/3)-a/3],null);
if(Eo(h))return b=0>e?Bo(-e):-Bo(e),new K(null,2,5,M,[2*b-a/3,-b-a/3],null);c=Math.sqrt(h);b=Bo(c-e);return new K(null,1,5,M,[b-Bo(c+e)-a/3],null)},dS=function(a){var b=A(a,0,null),c=A(a,1,null),e=A(a,2,null);a=A(a,3,null);return wpa(b,c,e,a)},wpa=function(a,b,c,e){a=new K(null,2,5,M,[new K(null,4,5,M,[ZP.J(a),ZP.J(c),ZP.J(e),ZP.J(b)],null),new K(null,4,5,M,[YP.J(a),YP.J(c),YP.J(e),YP.J(b)],null)],null);return gi(function(h){return.01<h&&.99>h},ai(function(h){var m=A(h,0,null),q=A(h,1,null),r=A(h,
2,null);h=A(h,3,null);return vpa(-3*m+9*q+-9*r+3*h,6*m+-12*q+6*r,3*q+-3*m,0)},y([a])))},xpa=function(a,b,c,e){a=new K(null,1,5,M,[new K(null,4,5,M,[B.j(a,YP),B.j(c,YP),B.j(e,YP),B.j(b,YP)],null)],null);return gi(function(h){return 0<=h&&1>=h},ai(function(h){var m=A(h,0,null),q=A(h,1,null),r=A(h,2,null);h=A(h,3,null);return vpa(3*m+-6*q+3*r,-3*m+3*q,m,-m+3*q+-3*r+h)},y([a])))},gS=function(a){var b=eS.J(a);return new K(null,2,5,M,[b,fS.J(a)],null)},hS=function(a){var b=eS.J(a);return new K(null,4,5,
M,[b,fS.J(a),aQ(NR.J(wq.J(a)),OR.J(wq.J(a))),aQ(PR.J(wq.J(a)),QR.J(wq.J(a)))],null)},iS=function(a){var b=function(){for(var c=ck,e=null,h=null,m=p(a);;)if(m){var q=t(m),r=fS.J(q),u=function(){var E=HR.J(q),H=E instanceof D?E.na:null;switch(H){case "move-to":return new K(null,3,5,M,[r,r,g(r)?new K(null,1,5,M,[r],null):null],null);case "close-path":return new K(null,3,5,M,[h,h,g(h)?new K(null,1,5,M,[h],null):null],null);case "line-to":return new K(null,3,5,M,[r,h,g(function(){var J=e;return g(J)?r:
J}())?new K(null,2,5,M,[e,r],null):null],null);case "curve-to":return new K(null,3,5,M,[r,h,function(){var J=fS.j(q,ypa),O=fS.j(q,zpa),P=new K(null,4,5,M,[e,r,J,O],null);return g(function(){var W=e;return g(W)?(W=r,g(W)?g(J)?O:J:W):W}())?Zi.j(new K(null,2,5,M,[e,r],null),Nh.j(function(W,V,Z,ba,qa,ra,sa){return function(Ea){return cS(sa,Ea)}}(c,e,h,m,J,O,P,E,H,q,r),dS(P))):null}()],null);default:return new K(null,3,5,M,[r,h,fi],null)}}(),w=A(u,0,null),z=A(u,1,null);u=A(u,2,null);u=Qg(hg,c,u);var C=
v(m);c=u;e=w;h=z;m=C}else return c}();b=Ye(b)?Gh(fS,a):b;return op(b)?LQ(b):KQ.aa()},Apa=function(a,b){function c(q){var r=G(q),u=B.j(r,ZP),w=B.j(r,YP),z=B.j(r,NR),C=B.j(r,OR);q=B.j(r,PR);var E=B.j(r,QR);r=Pp(u,w)?e(r,ZP,YP):r;z=Pp(z,C)?e(r,NR,OR):r;return Pp(q,E)?e(z,PR,QR):z}function e(q,r,u){q=g(yo(h))?Yp.ba(q,r,wy,h):q;return g(yo(m))?Yp.ba(q,u,wy,m):q}var h=ZP.J(b),m=YP.J(b);return Zi.N(fi,Nh.J(function(q){return Yp.N(q,wq,c)}),a)},jS=function(a,b){if(null!=b){var c=function(h,m,q){var r=jQ(aQ(B.j(h,
m),B.j(h,q)),b);return I.U(h,m,ZP.J(r),y([q,YP.J(r)]))},e=function(h){var m=G(h),q=B.j(m,ZP),r=B.j(m,NR);h=B.j(m,PR);m=null!=q?c(m,ZP,YP):m;r=null!=r?c(m,NR,OR):m;return null!=h?c(r,PR,QR):r};return Zi.N(fi,Nh.J(function(h){return Yp.N(h,wq,e)}),a)}return a},kS=function(a,b){var c=A(a,0,null),e=G(c);c=B.j(e,ZP);e=B.j(e,YP);a=A(a,1,null);var h=G(a);a=B.j(h,ZP);h=B.j(h,YP);var m=G(b);b=B.j(m,ZP);m=B.j(m,YP);return Eo(c-a)&&Eo(e-h)?Infinity:Eo(c-a)?(m-e)/(h-e):(b-c)/(a-c)},lS=function(a,b,c){var e=tpa(a,
b,c);a=A(e,0,null);b=A(e,1,null);c=nt.j(function(h){return cS(e,h)},dS(e));return LQ(Zi.j(new K(null,2,5,M,[a,b],null),c))},mS=function(a,b){var c=A(b,0,null),e=A(b,1,null);b=G(c);c=B.j(b,ZP);b=B.j(b,YP);var h=G(e);e=B.j(h,ZP);h=B.j(h,YP);var m=G(a);a=B.j(m,ZP);m=B.j(m,YP);h=Eo(c-e)?null:(h-b)/(e-c);b=null!=h?h*a+-h*c+b:null;return Eo(c-e)&&Eo(a-c)||null!=b&&Eo(m-b)},Bpa=function(a,b){return function m(e,h){var q=lS(b,e,h);if(QQ(q,a)){if(Eo(e-h))return.1>eQ(cS(b,e),a);q=e+(h-e)/2;e=m(e,q);return g(e)?
e:m(q,h)}return null}(0,1)},Cpa=function(a,b){var c=A(a,0,null),e=A(a,1,null),h=A(b,0,null),m=A(b,1,null),q=G(c),r=B.j(q,ZP);q=B.j(q,YP);var u=G(e),w=B.j(u,ZP);u=B.j(u,YP);var z=G(h),C=B.j(z,ZP);z=B.j(z,YP);var E=G(m),H=B.j(E,ZP),J=B.j(E,YP);E=(C-H)*(r*u-q*w)-(r-w)*(C*J-z*H);var O=(z-J)*(r*u-q*w)-(q-u)*(C*J-z*H);r=(r-w)*(z-J)-(q-u)*(C-H);if(Eo(r))return mS(h,a)?new K(null,2,5,M,[kS(a,h),0],null):mS(m,a)?new K(null,2,5,M,[kS(a,m),1],null):mS(e,b)?new K(null,2,5,M,[1,kS(b,e)],null):mS(c,b)?new K(null,
2,5,M,[0,kS(b,c)],null):null;c=XP(E/r,O/r);a=kS(a,c);b=kS(b,c);return new K(null,2,5,M,[a,b],null)},Dpa=function(a,b){var c=A(a,0,null),e=A(a,1,null);a=A(b,0,null);var h=A(b,1,null),m=A(b,2,null);b=A(b,3,null);var q=YP.J(e)-YP.J(c);e=ZP.J(e)-ZP.J(c);e=180*Math.atan2(q,e)/Math.PI;q=sQ.aa();e=uQ.j(q,nS.J(-e));c=yQ(e,dQ(c));m=new K(null,4,5,M,[jQ(a,c),jQ(h,c),jQ(m,c),jQ(b,c)],null);c=A(m,0,null);a=A(m,1,null);h=A(m,2,null);m=A(m,3,null);return xpa(c,a,h,m)},Epa=function(a,b){var c=gi(function(e){var h=
cS(b,e);e=qpa(b,e);e=uoa(e);return 0<kS(a,h)&&.01<Ao(e-180)&&.01<Ao(e-0)},Dpa(a,b));return nt.j(function(e){var h=M,m=cS(b,e);e=qpa(b,e);e=0<YP.J(e)?-1:0>YP.J(e)?1:0;return new K(null,2,5,h,[m,e],null)},c)},Fpa=function(a,b){var c=gi(function(h){h=Eo(h)?0:h;var m=cS(b,h);m=kS(a,m);return 0<=h&&1>=h&&0<=m&&1>=m},Dpa(a,b)),e=nt.j(function(h){return cS(b,h)},c);e=nt.j(function(h){return kS(a,h)},e);return new K(null,2,5,M,[e,c],null)},Ipa=function(a,b){function c(e){e=G(e);var h=B.j(e,bM),m=B.j(e,$L);
return function(q){var r=G(q);q=B.j(r,bM);r=B.j(r,$L);return 2<=eQ(q,h)&&2<=eQ(r,m)}}return function(e){var h=t(e);e=ke(e);for(var m=fi,q=fi;;){if(null==h)return new K(null,2,5,M,[m,q],null);e=ci.j(c(h),e);m=hg.j(m,Gpa.J(h));q=hg.j(q,Hpa.J(h));h=t(e);e=ke(e)}}(kI.j(gy,function u(h,m,q,r){var w=lS(a,h,m),z=lS(b,q,r);if(PQ(w,z)){w=cS(a,h);z=cS(b,q);if(.1>eQ(w,z))return new K(null,1,5,M,[new f(null,5,[bM,w,$L,z,gy,eQ(w,z),Gpa,Co(h,4),Hpa,Co(q,4)],null)],null);z=h+(m-h)/2;var C=q+(r-q)/2;w=u(h,z,q,C);
h=u(h,z,C,r);q=u(z,m,q,C);m=u(z,m,C,r);return Lp.U(w,y([h,q,m]))}return null}(0,1,0,1)))},Jpa=function(a,b){return th(function(c){var e=HR.J(c);switch(e instanceof D?e.na:null){case "line-to":return c=gS(c),(e=mS(a,c))?(c=kS(c,a),c=(0<c||Eo(c-0))&&(1>c||Eo(c-1))):c=e,c;case "curve-to":return Bpa(a,hS(c));default:return!1}},b)},Kpa=function(a){return Zi.N(fi,$h(nB),ZR(aS(a)))},Lpa=function(a,b){b=G(b);b=B.j(b,UQ);return YP.J(a)>=HQ.J(b)&&YP.J(a)<=FQ.J(b)},qS=function(a){return nt.j(function(b){return new f(null,
4,[HR,HR.J(b),Mpa,b,oS,x.j(LR,HR.J(b))?gS(b):hS(b),UQ,pS.J(b)],null)},ci.j(function(b){return Xj.j(x.j(LR,HR.J(b)),x.j(RR,HR.J(b)))},Kpa(a)))},Npa=function(a,b){var c=new K(null,2,5,M,[a,aQ(ZP.J(a)+1,YP.J(a))],null);return Xj.j(0,Lf(wy,Nh.j(Oe,ai(function(e){var h=HR.J(e);switch(h instanceof D?h.na:null){case "line-to":e=oS.J(e);var m=A(e,0,null),q=A(e,1,null);h=new K(null,2,5,M,[a,aQ(ZP.J(a)+1,YP.J(a))],null);var r;if(r=null!=m){r=YP.J(m);var u=YP.J(a);r=Eo(r-u)}m=r?Yp.ba(m,YP,wy,10):m;if(r=null!=
q)r=YP.J(q),u=YP.J(a),r=Eo(r-u);q=r?Yp.ba(q,YP,wy,10):q;q=Cpa(h,new K(null,2,5,M,[m,q],null));h=A(q,0,null);var w=A(q,1,null);null!=w&&null!=h&&0<h&&(0<w||Eo(w-0))&&(1>w||Eo(w-1))?(q=h=M,m=bS(e,w),r=A(e,0,null),u=A(e,1,null),e=bS(e,w),e=YP.J(e),u=YP.J(u),r=YP.J(r),e=new K(null,1,5,h,[new K(null,2,5,q,[m,0<e-u&&!Eo(e-u)?1:0>e-u&&!Eo(e-u)?-1:0>e-r?1:0<e-r?-1:0],null)],null)):e=null;return e;case "curve-to":return Epa(c,oS.J(e));default:return fi}},y([ci.j(xh(Lpa,a),b)])))))},Opa=function(a,b,c){c=ci.j(function(h){return 0<
h&&1>h},c);if(Ye(c))return new K(null,1,5,M,[b],null);var e=GR(b);b=Zi.j(hk(),hg.j(c,1));return nt.j(function(h){return MR(nQ(a,e,h))},b)},Ppa=function(a,b,c){c=ci.j(function(q){return 0<q&&1>q},c);if(Ye(c))return new K(null,1,5,M,[b],null);var e=GR(b);b=wq.J(b);var h=aQ(NR.J(b),OR.J(b)),m=aQ(PR.J(b),QR.J(b));b=Zi.j(hk(),hg.U(c,0,y([1])));return nt.j(function(q){var r=A(q,0,null);q=A(q,1,null);var u=spa(a,e,h,m,q,r);A(u,0,null);r=A(u,1,null);q=A(u,2,null);u=A(u,3,null);return SR(r,q,u)},ke(Kp(b)))},
Qpa=function(a,b){var c=G(a),e=B.j(c,rS),h=B.j(c,sS),m=function(){var u=tS.j(a,sQ.aa());u=g(e)?wQ(u,XP(-1,1)):u;return g(h)?wQ(u,XP(1,-1)):u}();c=function(){var u=sQ.aa();u=g(e)?wQ(u,XP(-1,1)):u;u=g(h)?wQ(u,XP(1,-1)):u;return uQ.j(u,uS.j(a,sQ.aa()))}();var q=function(){var u=a?.bb??B.j(a,UQ);u=null==u?null:JQ(u);return g(u)?u:JQ(iS(b))}(),r=jS(b,AQ(q,c));m=WQ(IQ(iS(r)),q,m);q=TQ(m);c=LQ(WQ(m,q,c));return new K(null,2,5,M,[m,c],null)},xS=function(a){var b=yf(a,vS)?Of:aS,c;if(c=x.j(Ez,Q.J(a)))a=wS.J(a),
b=b.J?b.J(a):b(a),c=!sh(npa,ZR(b));return c},yS=function(a,b){return nt.j(function(c){var e=A(c,0,null);c=A(c,1,null);e=null==c&&null!=b?I.N(e,eS,b):e;return null!=c?I.N(e,eS,fS.J(c)):e},Kp(a))},Rpa=function(a){for(var b=t(a),c=ke(a),e=fi,h=a=null;;){if(null==b)return e;var m=fS.J(b);h=x.j(WR,HR.J(b))&&(null==h||.01>eQ(h,a))?null:x.j(WR,HR.J(b))?MR(a):b;b=t(c);c=ke(c);e=null!=h?hg.j(e,h):e;a=x.j(IR,HR.J(h))?m:a;h=m}},Spa=function(a,b){return x.j(LR,HR.J(a))&&x.j(LR,HR.J(b))?(a=gS(a),b=gS(b),a=Cpa(a,
b),b=A(a,0,null),a=A(a,1,null),null!=b&&null!=a&&(0<b||Eo(b-0))&&(1>b||Eo(b-1))&&(0<a||Eo(a-0))&&(1>a||Eo(a-1))?new K(null,2,5,M,[new K(null,1,5,M,[b],null),new K(null,1,5,M,[a],null)],null):null):x.j(LR,HR.J(a))&&x.j(RR,HR.J(b))?Fpa(gS(a),hS(b)):x.j(RR,HR.J(a))&&x.j(LR,HR.J(b))?(a=Fpa(gS(b),hS(a)),b=A(a,0,null),a=A(a,1,null),new K(null,2,5,M,[a,b],null)):x.j(RR,HR.J(a))&&x.j(RR,HR.J(b))?Ipa(hS(a),hS(b)):new K(null,2,5,M,[fi,fi],null)},Tpa=function(a,b,c,e){function h(w,z,C){return Zi.N(fi,$h(function(E){return m(E,
z,C)}),w)}function m(w,z,C){return g(r(w,C))?qc(function(E,H){return Zi.N(fi,$h(function(J){if(fc(q(J,H)))J=new K(null,1,5,M,[J],null);else{var O=Spa(J,H),P=A(O,0,null);A(O,1,null);b:switch(O=HR.J(J),O instanceof D?O.na:null){case "line-to":P=Opa(eS.J(J),J,P);break b;case "curve-to":P=Ppa(eS.J(J),J,P);break b;default:P=new K(null,1,5,M,[J],null)}J=yS(P,eS.J(J))}return J}),E)},new K(null,1,5,M,[w],null),ci.j(function(E){return q(w,E)},z)):new K(null,1,5,M,[w],null)}function q(w,z){if(x.j(IR,HR.J(w))||
x.j(IR,HR.J(z)))return!1;w=u(w);z=u(z);return PQ(w,z)}function r(w,z){if(x.j(IR,HR.J(w)))return!1;w=u(w);return PQ(w,z)}var u=ml(pS);return new K(null,2,5,M,[h(a,b,e),h(b,a,c)],null)},Upa=function(a){return yf(a,eS)&&yf(new bk(null,new f(null,2,[LR,null,RR,null],null),null),HR.J(a))},zS=function(a,b,c,e){a:{var h=HR.J(a);h=h instanceof D?h.na:null;switch(h){case "line-to":a=bS(gS(a),.5);break a;case "curve-to":a=cS(hS(a),.5);break a;default:throw Error(["No matching clause: ",k.J(h)].join(""));}}return(c=
QQ(c,a))?(e=Npa(a,e))?e:Jpa(a,b):c},Vpa=function(a,b){return null!=tp(function(c){if(x.j(HR.J(a),HR.J(c))&&yf(new bk(null,new f(null,2,[LR,null,RR,null],null),null),HR.J(a))){var e=HR.J(a);e=e instanceof D?e.na:null;switch(e){case "line-to":var h=gS(a);e=A(h,0,null);h=A(h,1,null);var m=gS(c),q=A(m,0,null),r=A(m,1,null);return.1>eQ(e,q)&&.1>eQ(h,r)||.1>eQ(e,r)&&.1>eQ(h,q)?new K(null,2,5,M,[a,c],null):null;case "curve-to":q=hS(a);e=A(q,0,null);h=A(q,1,null);m=A(q,2,null);var u=A(q,3,null),w=hS(c);q=
A(w,0,null);r=A(w,1,null);var z=A(w,2,null);w=A(w,3,null);return.1>eQ(e,q)&&.1>eQ(h,r)&&.1>eQ(m,z)&&.1>eQ(u,w)||.1>eQ(e,r)&&.1>eQ(h,q)&&.1>eQ(m,w)&&.1>eQ(u,z)?new K(null,2,5,M,[a,c],null):null;default:throw Error(["No matching clause: ",k.J(e)].join(""));}}else return null},b)},Wpa=function(a){var b=t(a);a=ke(a);for(var c=null,e=fi;;){if(null==b)return e;var h=Xj.j(eS.J(b),c)?hg.j(e,KR(eS.J(b))):e;c=t(a);a=ke(a);e=fS.J(b);h=hg.j(h,ln.j(b,eS));b=c;c=e;e=h}},Xpa=function(a,b,c,e,h,m){var q=qS(a),r=
qS(c),u=zh.j(ci.j(function(C){return fc(zS(C,c,m,r))},b),ci.j(function(C){return fc(zS(C,a,h,q))},e)),w=qS(u),z=iS(Wpa(u));e=ci.j(function(C){var E=zS(C,a,h,q);if(g(E)){if(E=Vpa(C,b)){a:switch(E=HR.J(C),E=E instanceof D?E.na:null,E){case "line-to":C=bS(gS(C),.5);break a;case "curve-to":C=cS(hS(C),.5);break a;default:throw Error(["No matching clause: ",k.J(E)].join(""));}E=!(QQ(z,C)&&Npa(C,w))}C=E}else C=E;return C},e);return Lp.U(u,y([e]))},Ypa=function(a,b,c,e,h,m){var q=qS(a),r=qS(c);return Lp.U(ci.j(function(u){return fc(zS(u,
c,m,r))},b),y([ci.j(function(u){var w=zS(u,a,h,q);return g(w)?!Vpa(u,b):w},e)]))},Zpa=function(a,b,c,e,h,m){var q=qS(a),r=qS(c);return Lp.U(ci.j(function(u){return zS(u,c,m,r)},b),y([ci.j(function(u){return zS(u,a,h,q)},e)]))},$pa=function(a,b,c){var e=Xj.j(KE,a)&&x.j(opa(c),opa(b)),h=yS(Rpa(b),null),m=yS(function(){var C=Rpa(c);return e?Zi.j(fi,ai(nB,y([ig(nt.j(YR,ZR(C)))]))):C}(),null),q=iS(h),r=iS(m),u=Tpa(h,m,q,r);b=A(u,0,null);u=A(u,1,null);var w=ci.j(Upa,yS(b,null)),z=ci.j(Upa,yS(u,null));b=
function(){var C=a instanceof D?a.na:null;switch(C){case "union":return Xpa(h,w,m,z,q,r);case "difference":return Ypa(h,w,m,z,q,r);case "intersection":return Zpa(h,w,m,z,q,r);case "exclude":return Lp.U(w,y([z]));default:throw Error(["No matching clause: ",k.J(C)].join(""));}}();return aS(Wpa(b))},aqa=function(a,b){return p(b)?Zi.j(fi,Lf(xh($pa,a),b)):fi},AS=function(a,b){return Eo(b)?Infinity:a/b},bqa=function(a){a=G(a);var b=B.j(a,xz),c=B.j(a,DQ);a=B.j(a,BS);null==a||Eo(a)?a=0:(b=AS(b,2*a),b=1<b?
1:b,c=AS(c,2*a),c=b<c?b:c,a=1>c?a*c:a);return a},cqa=function(a){var b=G(a),c=B.j(b,xz),e=B.j(b,DQ);a=B.j(b,CS);var h=B.j(b,DS),m=B.j(b,ES);b=B.j(b,FS);if(null!=a&&null!=h&&null!=m&&null!=b){var q=AS(c,a+h);q=1<q?1:q;var r=AS(e,h+m);q=q<r?q:r;c=AS(c,m+b);c=q<c?q:c;e=AS(e,b+a);e=c<e?c:e;a=1>e?new K(null,4,5,M,[a*e,h*e,m*e,b*e],null):new K(null,4,5,M,[a,h,m,b],null)}else a=new K(null,4,5,M,[a,h,m,b],null);return a},GS=function(a,b,c,e){var h=function(){var E=c instanceof D?c.na:null;switch(E){case "top-left":return ZP.J(a);
case "top-right":return ZP.J(a)-e;case "bottom-right":return ZP.J(b)-e;case "bottom-left":return ZP.J(b);default:throw Error(["No matching clause: ",k.J(E)].join(""));}}(),m=function(){var E=c instanceof D?c.na:null;switch(E){case "top-left":return YP.J(a)-e;case "top-right":return YP.J(a);case "bottom-right":return YP.J(b)-2*e;case "bottom-left":return YP.J(b)-e;default:throw Error(["No matching clause: ",k.J(E)].join(""));}}(),q=2*e,r=2*e,u=h+q/2*.448084975506,w=h+q/2*1.5519150244939999,z=m+r/2*
.448084975506,C=m+r/2*1.5519150244939999;h=function(){var E=c instanceof D?c.na:null;switch(E){case "top-left":return I.N(a,YP,z);case "top-right":return I.N(a,ZP,w);case "bottom-right":return I.N(a,YP,C);case "bottom-left":return I.N(a,ZP,u);default:throw Error(["No matching clause: ",k.J(E)].join(""));}}();m=function(){var E=c instanceof D?c.na:null;switch(E){case "top-left":return I.N(b,ZP,u);case "top-right":return I.N(b,YP,z);case "bottom-right":return I.N(b,ZP,w);case "bottom-left":return I.N(b,
YP,C);default:throw Error(["No matching clause: ",k.J(E)].join(""));}}();return SR(b,h,m)},dqa=function(a){var b=G(a),c=B.j(b,ZP);a=B.j(b,YP);var e=B.j(b,xz),h=B.j(b,DQ),m=c+e/2,q=a+h/2;b=XP(m,a);var r=XP(c+e,q);m=XP(m,a+h);q=XP(c,q);var u=c+e/2*.448084975506;c+=e/2*1.5519150244939999;e=a+h/2*.448084975506;a+=h/2*1.5519150244939999;return new K(null,5,5,M,[KR(b),SR(r,I.N(b,ZP,c),I.N(r,YP,e)),SR(m,I.N(r,YP,a),I.N(m,ZP,c)),SR(q,I.N(m,ZP,u),I.N(q,YP,a)),SR(b,I.N(q,YP,e),I.N(b,ZP,u))],null)},iqa=function(a,
b,c,e,h,m,q,r){var u=XP(a,b+h),w=XP(a+h,b),z=XP(c+a+-m,b),C=XP(c+a,b+m),E=XP(c+a,e+b+-q),H=XP(c+a+-q,e+b);c=XP(a+r,e+b);b=XP(a,e+b+-r);var J=e=a=hg.j,O=hg.j,P=hg.j(fi,KR(u));h=Xj.j(u,w)?hg.j(P,GS(u,w,eqa,h)):P;h=O.call(hg,h,MR(z));m=Xj.j(z,C)?hg.j(h,GS(z,C,fqa,m)):h;m=J.call(hg,m,MR(E));q=Xj.j(E,H)?hg.j(m,GS(E,H,gqa,q)):m;q=e.call(hg,q,MR(c));r=Xj.j(c,b)?hg.j(q,GS(c,b,hqa,r)):q;return a.call(hg,r,MR(u))},lqa=function(a){var b=G(a);a=B.j(b,ZP);var c=B.j(b,YP),e=B.j(b,xz),h=B.j(b,DQ),m=g(CS.J(b))?jqa:
kqa;switch(m instanceof D?m.na:null){case "radius-1":return b=bqa(b),iqa(a,c,e,h,b,b,b,b);case "radius-4":var q=cqa(b);b=A(q,0,null);m=A(q,1,null);var r=A(q,2,null);q=A(q,3,null);return iqa(a,c,e,h,b,m,r,q);default:return fi}},oqa=function(a,b){var c=Zh.j(Nh.J(function(h){return B.j(b,h)}),Nh.J(function(h){return HS?HS(h,b):mqa(h,b)}));c=Zi.N(fi,c,xR.J(a));var e=Pe(c);e=Yj(e,nqa);c=Zi.N(fi,Zh.j(ci.J(function(h){return x.j(Ez,Q.J(h))}),$h(function(h){h=wS.J(h);var m=t(h);return g(g(m)?JR.J(m):m)?Yp.qa(h,
0,I,JR,!1):h})),c);return zp(Yg.U(y([I.N(I.N(a,Q,Ez),wS,c),e])),IS)},pqa=function(a,b){var c=Nh.j(function(h){return HS?HS(h,b):mqa(h,b)},Nh.j(function(h){return B.j(b,h)},xR.J(a))),e=JS.J(a);c=aqa(e,nt.j(wS,c));return zp(I.N(I.N(a,Q,Ez),wS,c),IS)},mqa=function(a){switch(arguments.length){case 1:return HS(arguments[0],F);case 2:return HS(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",k.J(arguments.length)].join(""));}},HS=function(a,b){var c=G(a),e=B.j(c,Q),h=B.j(c,KS);switch(e instanceof
D?e.na:null){case "group":case "frame":return oqa(c,b);case "bool":return pqa(c,b);case "rect":case "circle":case "image":case "text":a:switch(e instanceof D?e.na:null){case "circle":a=dqa(c);break a;default:a=lqa(c)}b=function(){var q=tS.j(c,sQ.aa());q=g(rS.J(c))?wQ(q,XP(-1,1)):q;return g(sS.J(c))?wQ(q,XP(1,-1)):q}();var m=null!=b?jS(a,AQ(VQ(c),b)):a;return zp(function(){var q=I.N(I.N(c,Q,Ez),wS,m);return x.j(LS,e)?I.N(q,MS,h):q}(),IS);default:return c}},OS=function(a,b){var c=Zh.U(Nh.J(xh(B,b)),
ci.J(Zh.j(fc,DR)),Jo.J(NS),y([Nh.J(function(e){return HS(e,b)}),Nh.J(wS)]));c=Zi.N(fi,c,xR.J(a));return aqa(JS.J(a),c)},qqa=function(a,b){return Yp.N(a,at,function(c){return nt.j(function(e){return Yp.ba(Yp.ba(Yp.ba(Yp.ba(e,PS,QS,b),RS,QS,b),SS,QS,b),TS,QS,b)},c)})},rqa=function(a,b){return Yp.N(a,US,function(c){return nt.j(function(e){return Yp.ba(e,VS,QS,b)},c)})},XS=function(a,b){return WS(Of,a,b)},WS=function(a,b,c){return HK(function(e){var h=(h=df(e))?a.J?a.J(e):a(e):h;return g(h)?b.J?b.J(e):
b(e):e},c)},YS=function(a,b){return p(ci.j(a,bi(df,fq,b)))},sqa=function(a){return"string"===typeof ZH.J(a)&&Xj.j(ZH.J(a),"")},tqa=function(a){return x.j("paragraph",Q.J(a))},aT=function(a){return FR.J(a)&&x.j(ZS,$S.J(a))},cT=function(a){return FR.J(a)&&x.j(bT,$S.J(a))},uqa=function(a){var b=FR.J(a);return b?(a=$S.J(a),x.j(ZS,a)||x.j(bT,a)):b},vqa=function(a){a=G(a);var b=B.j(a,dT);a=function(){var e=zo(eT.J(b),0);return g(e)?e:0}();var c=function(){var e=zo(fT.J(b),0);return g(e)?e:0}();return new K(null,
2,5,M,[a,c],null)},wqa=function(a){var b=G(a);a=B.j(b,gT);var c=G(a),e=B.j(c,hT),h=B.j(c,iT);a=B.j(c,jT);c=B.j(c,kT);b=B.j(b,lT);e=g(e)?e:0;h=g(h)?h:0;a=g(a)?a:0;c=g(c)?c:0;return x.j(b,mT)?new K(null,4,5,M,[e,h,a,c],null):new K(null,4,5,M,[e,h,e,h],null)},zqa=function(a){a=G(a);a=B.j(a,nT);return x.j(xqa,a)||x.j(yqa,a)},pT=function(a){a=oT.J(a);return g(a)?a:0},Aqa=function(a,b,c){var e=A(b,0,null);b=A(b,1,null);var h=A(c,0,null);c=A(c,1,null);return pT(b)>pT(c)?1:pT(b)<pT(c)?-1:g(function(){var m=
e<h;return m?a:m}())?-1:g(function(){var m=e>h;return m?a:m}())?1:e<h?1:e>h?-1:0},Bqa=function(a,b){function c(e){return x.j(Q.J(e),qT)?Yp.ba(e,ep,QS,b):e}return Yp.N(Yp.N(a,rT,function(e){return nt.j(c,e)}),sT,function(e){return nt.j(c,e)})},Dqa=function(a){var b=G(new f(null,1,[tT,!0],null)),c=B.N(b,tT,!1);b=B.N(b,Cqa,!1);b=g(b)?xh(Jo,Zh.j(Ye,xR)):Of;c=y([tT,c]);var e=G(a);a=B.j(e,uT);e=B.j(e,vT);c=G(c);c=B.N(c,tT,!1);e=x.j(e,LI)?yk(LI,uo):yk(uo,LI);c=g(c)?xh(kI,Zh.j(e,Oe)):Of;a=Nh.j(Oe,c.J?c.J(a):
c(a));return b.J?b.J(a):b(a)},Eqa=function(a,b){return Yp.ba(a,uT,sm,function(c){return Yp.N(c,xR,function(e){return Zi.N(fi,Fh(b),e)})})},wT=function(a,b,c,e,h,m,q,r){this.Vc=a;this.Uc=b;this.Tc=c;this.cd=e;this.bd=h;this.ga=m;this.W=q;this.ia=r;this.ea=2230716170;this.ka=139264},xT=function(a,b,c,e,h,m,q,r,u,w,z){this.order=a;this.type=b;this.Ub=c;this.origin=e;this.transform=h;this.Oa=m;this.rotation=q;this.center=r;this.ga=u;this.W=w;this.ia=z;this.ea=2230716170;this.ka=139264},Fqa=function(a){return!Eo(a?.x??
B.j(a,ZP))||!Eo(a?.y??B.j(a,YP))},Gqa=function(a){return!Eo((a?.x??B.j(a,ZP))-1)||!Eo((a?.y??B.j(a,YP))-1)},Hqa=function(a,b){if(Ye(a))return new K(null,1,5,M,[b],null);var c=We(a),e=c?.type??B.j(c,Q),h=b?.type??B.j(b,Q);return x.j(yT,e)&&x.j(yT,h)?(e=c?.Ub??B.j(c,co),b=b?.Ub??B.j(b,co),b=bQ(e,b),c=I.N(c,co,b),a=Xe(a),Fqa(c?.Ub??B.j(c,co))?hg.j(a,c):a):hg.j(a,b)},zT=function(){return new wT(0,fi,fi,fi,fi,null,null,null)},Iqa=function(a,b){var c=a?a:zT();a=(c?.Vc??B.j(c,AT))+1;c=I.N(c,AT,a);return Fqa(b)?
Yp.ba(c,BT,Hqa,new xT(a,yT,b,null,null,null,null,null,null,null,null)):c},CT=function(a){return Iqa(zT(),a)},Jqa=function(a,b){var c=b?.type??B.j(b,Q);c=c instanceof D?c.na:null;switch(c){case "move":return tQ(xQ.J(b?.Ub??B.j(b,co)),a);case "resize":var e=b?.transform??B.j(b,tS);c=b?.Oa??B.j(b,uS);var h=b?.Ub??B.j(b,co);b=b?.origin??B.j(b,DT);b=null!=c?jQ(b,c):b;var m=sQ.aa();e=null!=e?tQ(m,e):m;e=zQ(e,b);h=tQ(e,vQ.J(h));h=zQ(h,dQ(b));c=null!=c?tQ(h,c):h;return tQ(c,a);case "rotation":return c=b?.center??
B.j(b,ET),h=b?.rotation??B.j(b,FT),tQ(zQ(tQ(zQ(sQ.aa(),c),nS.J(h)),dQ(c)),a);default:throw Error(["No matching clause: ",k.J(c)].join(""));}},Kqa=function(a){return qc(Jqa,sQ.aa(),a)},Lqa=function(a){a=zh.j(a?.Uc??B.j(a,GT),a?.Tc??B.j(a,BT));a=kI.j(function(b){return b?.order??B.j(b,Kq)},a);return Kqa(a)},Mqa=function(a,b){var c=k.J(rQ.J(B.N(b,HT,14))*a);a=k.J(rQ.J(B.N(b,IT,0))*a);return Ip(b,new f(null,2,[HT,c,IT,a],null))},Nqa=function(a,b){a=k.J(rQ.J(B.N(b,HT,14))*a);return Ip(b,new f(null,1,[HT,
a],null))},Oqa=function(a,b){function c(q,r){var u=r?.type??B.j(r,Q);switch(u instanceof D?u.na:null){case "rotation":var w=r?.value??B.j(r,ep);return Yp.N(q,FT,function(E){return(((g(E)?E:0)+w)%360+360)%360});case "add-children":var z=r?.value??B.j(r,ep),C=r?.index??B.j(r,qR);q=null!=C?Yp.N(q,xR,function(E){return ff(E)?Mp(E,C,z):Lp.U(E,y([z]))}):Yp.ba(q,xR,Lp,z);return Yp.N(q,xR,function(E){return Zi.j(fi,Pg(JT,E))});case "remove-children":return z=r?.value??B.j(r,ep),Yp.ba(q,xR,e,z);case "scale-content":return z=
r?.value??B.j(r,ep),h(q,z);case "change-property":return u=r?.property??B.j(r,uu),z=r?.value??B.j(r,ep),I.N(q,u,z);default:return q}}function e(q,r){r=gk(r);return gi(Zh.j(fc,r),q)}function h(q,r){r=Ao(r);var u=vR(q)?Yp.ba(q,wS,m,r):q;var w=null!=BS.J(u)&&0<BS.J(u)?Yp.ba(u,BS,QS,r):u;u=null!=CS.J(u)&&0<CS.J(u)?Yp.ba(Yp.ba(Yp.ba(Yp.ba(w,CS,QS,r),DS,QS,r),ES,QS,r),FS,QS,r):w;u=op(US.J(q))?rqa(u,r):u;u=op(at.J(q))?qqa(u,r):u;u=null!=TS.J(q)?jn.ba(u,new K(null,2,5,M,[TS,ep],null),QS,r):u;u=aT(q)?Cp(Cp(Cp(Cp(Cp(Cp(u,
new K(null,2,5,M,[dT,eT],null),QS,y([r])),new K(null,2,5,M,[dT,fT],null),QS,y([r])),new K(null,2,5,M,[KT,bM],null),QS,y([r])),new K(null,2,5,M,[KT,$L],null),QS,y([r])),new K(null,2,5,M,[KT,LT],null),QS,y([r])),new K(null,2,5,M,[KT,MT],null),QS,y([r])):u;q=cT(q)?Bqa(u,r):u;return Cp(Cp(Cp(Cp(Fp(Fp(Fp(Fp(q,NT,QS,y([r])),OT,QS,y([r])),PT,QS,y([r])),QT,QS,y([r])),new K(null,2,5,M,[gT,hT],null),QS,y([r])),new K(null,2,5,M,[gT,iT],null),QS,y([r])),new K(null,2,5,M,[gT,jT],null),QS,y([r])),new K(null,2,
5,M,[gT,kT],null),QS,y([r]))}function m(q,r){return WS(tqa,xh(Nqa,r),WS(sqa,xh(Mqa,r),q))}a=qc(c,a,b?.cd??B.j(b,RT));return qc(c,a,b?.bd??B.j(b,ST))},Pqa=function(a){return $P(a)&&Pp(a?.x??B.j(a,ZP),a?.y??B.j(a,YP))},Qqa=function(a,b){if(null!=a&&Pqa(b)){var c=a?.x??B.j(a,ZP),e=a?.y??B.j(a,YP),h=a?.width??B.j(a,xz);a=a?.height??B.j(a,DQ);var m=b?.x??B.j(b,ZP);b=b?.y??B.j(b,YP);return KQ.ba(yo(c)?m+c:c,yo(e)?b+e:e,h,a)}return a},Rqa=function(a,b){return Pqa(b)?nt.j(function(c){return bQ(c,b)},a):a},
Sqa=function(a,b){if(null!=a){var c=b?.x??B.j(b,ZP),e=b?.y??B.j(b,YP);return Pp(c,e)?nt.j(function(h){return Yp.ba(Yp.ba(h,ZP,wy,c),YP,wy,e)},a):a}return null},Tqa=function(a,b){if(null!=a){var c=b?.e??B.j(b,ky),e=b?.f??B.j(b,yE);return Pp(c,e)?nt.j(function(h){return Yp.ba(Yp.ba(h,ZP,wy,c),YP,wy,e)},a):a}return null},UT=function(a,b){var c=TT,e=VQ(a);return c(a,b,g(e)?e:XP(0,0))},TT=function(a,b,c){var e=G(a),h=B.j(e,rS);a=B.j(e,sS);e=B.j(e,tS);b=G(b);b=B.j(b,Uqa);var m=yQ(sQ.aa(),c);e=null!=e?uQ.j(m,
e):m;h=g(g(h)?b:h)?wQ(e,XP(-1,1)):e;a=g(g(a)?b:a)?wQ(h,XP(1,-1)):h;return yQ(a,dQ(c))},VT=function(a,b){var c=G(a),e=B.j(c,tS),h=B.j(c,rS),m=B.j(c,sS);a=G(b);var q=B.j(a,Uqa);return g(function(){var r=null!=c;if(r){if(r=null!=e)return r;r=g(q)?h:q;return g(r)?r:g(q)?m:q}return r}())?""+(UT(c,a)??""):""},Vqa=function(a,b){var c=Ie(a,0),e=Ie(a,1);a=Ie(a,3);e=Do((e?.x??B.j(e,ZP))-(c?.x??B.j(c,ZP)),(e?.y??B.j(e,YP))-(c?.y??B.j(c,YP)));c=Do((c?.x??B.j(c,ZP))-(a?.x??B.j(a,ZP)),(c?.y??B.j(c,YP))-(a?.y??
B.j(a,YP)));null!=b?(a=b?.x??B.j(b,ZP),b=b?.y??B.j(b,YP),b=Qp(a,b,e,c)?KQ.ba(a-e/2,b-c/2,e,c):null):b=null;return b},Wqa=function(a,b,c){var e=A(a,0,null),h=A(a,1,null);A(a,2,null);var m=A(a,3,null);a=Fo(c?.x1??B.j(c,GQ));var q=Fo(c?.y1??B.j(c,HQ)),r=Fo(c?.x2??B.j(c,EQ)),u=Fo(c?.y2??B.j(c,FQ)),w=(q-u)*a-(q-u)*r+(q-q)*a;if(0===w)a=null;else{c=Fo(e?.x??B.j(e,ZP));var z=Fo(h?.x??B.j(h,ZP)),C=Fo(m?.x??B.j(m,ZP));e=Fo(e?.y??B.j(e,YP));h=Fo(h?.y??B.j(h,YP));m=Fo(m?.y??B.j(m,YP));var E=(q-u)/w,H=(a-r)/w,
J=(r*u-a*q)/w,O=(u-q)/w,P=(a-a)/w;u=(a*q-a*u)/w;var W=(q-q)/w,V=(r-a)/w;a=(a*q-r*q)/w;a=sQ.sa(c*E+z*O+C*W,e*E+h*O+m*W,c*H+z*P+C*V,e*H+h*P+m*V,c*J+z*u+C*a,e*J+h*u+m*a)}b=null!=a?tQ(tQ(Doa(b),a),xQ.J(b)):null;return qQ(b)?Coa(b)?YQ:b:null},Xqa=function(a,b){if(Eo((b?.a??B.j(b,gQ))-1)&&Eo(b?.b??B.j(b,hQ))&&Eo(b?.c??B.j(b,iQ))&&Eo((b?.d??B.j(b,gy))-1)){var c=a?.type??B.j(a,Q),e=XQ(a?.points??B.j(a,SQ),b),h=a?.bb??B.j(a,UQ);var m=h?.x1??B.j(h,GQ);var q=h?.y1??B.j(h,HQ),r=h?.x2??B.j(h,EQ);h=h?.y2??B.j(h,
FQ);r=XP(r,h);h=woa(XP(m,q),b);q=woa(r,b);m=ZP.J(h);r=YP.J(h);h=ZP.J(q);q=YP.J(q);m=KQ.ba(Math.min(m,h),Math.min(r,q),Math.abs(m-h),Math.abs(r-q));a=vc(a);a=x.j(c,WT)?Yp.ba(a,XT,jS,b):a;a=x.j(c,ZH)?Yp.ba(a,YT,Tqa,b):a;b=x.j(c,Ez)?Yp.ba(a,wS,jS,b):Bd(Bd(Bd(Bd(a,ZP,m?.x??B.j(m,ZP)),YP,m?.y??B.j(m,YP)),xz,m?.width??B.j(m,xz)),DQ,m?.height??B.j(m,DQ));b=Bd(Bd(b,UQ,m),SQ,e)}else e=XQ(a?.points??B.j(a,SQ),b),c=vc(a),q=c?.points??B.j(c,SQ),r=Ie(q,0),m=Ie(e,0),a=kQ(r,Ie(q,1)),h=kQ(m,Ie(e,1)),a=xoa(a,h),q=
kQ(r,Ie(q,3)),m=kQ(m,Ie(e,3)),m=xoa(q,m),c=0>a?cj.N(c,rS,fc(c.flip_x)):c,c=0>a?cj.N(c,FT,-c.rotation):c,c=0>m?cj.N(c,sS,fc(c.flip_y)):c,r=0>m?cj.N(c,FT,-c.rotation):c,a=TQ(e),c=Vqa(e,a),a=Wqa(e,a,c),m=null!=a?Eoa(a):null,null==m||null==a?b=r:(h=r?.type??B.j(r,Q),q=((Op(FT.J(r),0)+Op(B.j(B.j(r,ZT),FT),0))%360+360)%360,r=x.j(h,WT)?Yp.ba(r,XT,jS,b):r,b=x.j(h,Ez)?Yp.ba(r,wS,jS,b):Bd(Bd(Bd(Bd(r,ZP,c?.x??B.j(c,ZP)),YP,c?.y??B.j(c,YP)),xz,c?.width??B.j(c,xz)),DQ,c?.height??B.j(c,DQ)),b=Bd(Bd(Bd(Bd(Bd(b,
tS,a),uS,m),UQ,c),SQ,e),FT,q));return b},Yqa=function(a,b){a=G(a);var c=B.j(a,UQ),e=B.j(a,$T),h=new f(null,4,[ZP,ZP.j(b,0)-ZP.j(c,0),YP,YP.j(b,0)-YP.j(c,0),xz,xz.j(b,1)-xz.j(c,1),DQ,DQ.j(b,1)-DQ.j(c,1)],null);return null!=e&&null!=c&&null!=b?Yp.N(a,$T,function(m){return Yp.ba(Yp.ba(Yp.ba(Yp.ba(m,ZP,wy,ZP.J(h)),YP,wy,YP.J(h)),xz,wy,xz.J(h)),DQ,wy,DQ.J(h))}):a},aU=function(a,b){var c=ai(SQ,y([b]));b=TQ(c);c=Ye(c)?SQ.J(a):c;c=WQ(c,b,uS.j(a,sQ.aa()));b=WQ(IQ(LQ(c)),b,tS.j(a,sQ.aa()));c=AQ(TQ(b),uS.j(a,
sQ.aa()));c=LQ(XQ(b,c));return Xqa(I.N(I.N(I.N(I.N(Yqa(a,c),UQ,c),SQ,b),rS,!1),sS,!1),sQ.aa())},Zqa=function(a,b,c){c=OS(a,c);a=I.N(a,XT,c);var e=Qpa(a,c);c=A(e,0,null);e=A(e,1,null);return null!=e&&op(c)?I.N(I.N(a,UQ,e),SQ,c):aU(a,b)},$qa=function(a){var b=G(a);a=B.j(b,ZP);var c=B.j(b,YP),e=B.j(b,xz);b=B.j(b,DQ);return KQ.ba(a,c-b,e,b)},bU=function(a){var b=ai(Zh.j(IQ,$qa),y([YT.J(a)]));return p(b)?LQ(b):a?.bb??B.j(a,UQ)},ara=function(a,b){return!uh(He(gi(function(c){var e=G(a),h=B.j(e,ZP);e=B.j(e,
YP);var m=A(c,0,null),q=G(m);m=B.j(q,ZP);q=B.j(q,YP);c=A(c,1,null);var r=G(c);c=B.j(r,ZP);r=B.j(r,YP);return q<=e&&r>e||q>e&&r<=e?h<m+(e-q)/(r-q)*(c-m):!1},b)))},cU=function(a,b,c,e){var h=YP.J(b)-YP.J(a);b=ZP.J(a)-ZP.J(b);a=h*ZP.J(a)+b*YP.J(a);var m=YP.J(e)-YP.J(c);e=ZP.J(c)-ZP.J(e);c=m*ZP.J(c)+e*YP.J(c);var q=h*e-m*b;q=Eo(q)?.001:q;return XP((e*a-b*c)/q,(c*h-a*m)/q)},dU=function(a,b){var c=A(a,0,null),e=A(a,1,null);A(a,2,null);A(a,3,null);return lQ(mQ(cQ(e,c)),b)},eU=function(a,b){var c=A(a,0,null);
A(a,1,null);A(a,2,null);a=A(a,3,null);return lQ(mQ(cQ(a,c)),b)},bra=function(a){var b=A(a,0,null),c=A(a,1,null);A(a,2,null);A(a,3,null);return null!=b&&null!=c?(a=fQ(cQ(c,b)),.01>a?.01:a):null},cra=function(a){var b=A(a,0,null);A(a,1,null);A(a,2,null);a=A(a,3,null);return null!=b&&null!=a?(b=fQ(cQ(a,b)),.01>b?.01:b):null},dra=function(a,b,c){var e=A(b,0,null),h=A(b,1,null);b=cQ(h,e);a=cU(a,bQ(a,c),e,h);return Eo(ZP.J(b))?Eo(YP.J(b))?0:(YP.J(a)-YP.J(e))/YP.J(b):(ZP.J(a)-ZP.J(e))/ZP.J(b)},era=function(a){var b=
A(a,0,null),c=A(a,1,null);A(a,2,null);var e=A(a,3,null);return(a=x.j(He(a),4))?(c=cQ(c,b),b=cQ(e,b),Eo(YP.J(c))&&Eo(ZP.J(b))&&0<ZP.J(c)&&0<YP.J(b)):a},fra=function(a,b){var c=A(b,0,null),e=A(b,1,null);A(b,2,null);var h=A(b,3,null);if(Ye(a))return b;if(era(a)&&era(b))return a;var m=new K(null,2,5,M,[c,e],null),q=new K(null,2,5,M,[c,h],null),r=cQ(e,c),u=cQ(h,c);e=qc(function(H,J){var O=A(H,0,null),P=A(H,1,null),W=A(H,2,null);H=A(H,3,null);var V=dra(J,m,u);J=dra(J,q,r);return new K(null,4,5,M,[Math.min(O,
V),Math.max(P,V),Math.min(W,J),Math.max(H,J)],null)},new K(null,4,5,M,[Infinity,-Infinity,Infinity,-Infinity],null),ci.j(function(H){var J=yo(ZP.J(H));return g(J)?yo(YP.J(H)):J},a));a=A(e,0,null);var w=A(e,1,null);b=A(e,2,null);var z=A(e,3,null);e=bQ(c,lQ(u,b));h=bQ(e,r);a=bQ(c,lQ(r,a));b=bQ(a,u);z=bQ(c,lQ(u,z));var C=bQ(z,r);w=bQ(c,lQ(r,w));var E=bQ(w,u);c=cU(e,h,a,b);e=cU(e,h,w,E);h=cU(z,C,w,E);a=cU(z,C,a,b);return new K(null,4,5,M,[c,e,h,a],null)},gra=function(a,b){var c=A(b,0,null),e=A(b,1,null),
h=A(b,2,null);A(b,3,null);A(a,0,null);b=A(a,1,null);A(a,2,null);A(a,3,null);a=cQ(e,c);e=cU(b,bQ(b,a),e,h);return cQ(e,b)},hra=function(a,b){var c=A(b,0,null),e=A(b,1,null);A(b,2,null);b=A(b,3,null);A(a,0,null);A(a,1,null);A(a,2,null);a=A(a,3,null);e=cQ(e,c);c=cU(a,bQ(a,e),c,b);return cQ(c,a)},ira=function(a,b){var c=A(b,0,null),e=A(b,1,null);A(b,2,null);var h=A(b,3,null);b=A(a,0,null);A(a,1,null);A(a,2,null);A(a,3,null);a=cQ(h,c);c=cU(b,bQ(b,a),c,e);return cQ(c,b)},jra=function(a,b){var c=A(b,0,null);
A(b,1,null);var e=A(b,2,null),h=A(b,3,null);A(a,0,null);A(a,1,null);b=A(a,2,null);A(a,3,null);a=cQ(h,c);e=cU(b,bQ(b,a),e,h);return cQ(e,b)},kra=function(a,b){var c=A(b,0,null),e=A(b,1,null);A(b,2,null);var h=A(b,3,null);A(a,0,null);b=A(a,1,null);A(a,2,null);A(a,3,null);a=cQ(e,c);c=bQ(c,lQ(a,.5));h=bQ(h,lQ(a,.5));c=cU(b,bQ(b,a),c,h);return cQ(c,b)},lra=function(a,b){var c=A(b,0,null),e=A(b,1,null),h=A(b,2,null);A(b,3,null);A(a,0,null);b=A(a,1,null);A(a,2,null);A(a,3,null);a=cQ(h,e);c=bQ(c,lQ(a,.5));
e=bQ(e,lQ(a,.5));e=cU(b,bQ(b,a),c,e);return cQ(e,b)},fU=function(a,b,c){a=x.j(ZP,a)?hra:x.j(YP,a)?ira:null;return a.j?a.j(b,c):a(b,c)},gU=function(a,b,c){a=x.j(ZP,a)?gra:x.j(YP,a)?jra:null;return a.j?a.j(b,c):a(b,c)},mra=function(a,b,c){a=x.j(ZP,a)?kra:lra;return a.j?a.j(b,c):a(b,c)},hU=function(a,b,c,e){c=voa(a,c);e=voa(b,e);a=(g(Go(c,e))?1:-1)*fQ(a);return Eo(a)?b:cQ(b,lQ(mQ(b),a))},iU=function(a,b){var c=A(b,0,null),e=A(b,1,null);A(b,2,null);b=A(b,3,null);return x.j(a,ZP)?cQ(e,c):cQ(b,c)},nra=
function(a,b,c,e){function h(m,q){return"number"===typeof m&&"number"===typeof q?Ao(m-q)<e:null}return"number"===typeof b&&"number"===typeof c?h(b,c):x.j(a,UQ)?sh(function(m){return h(B.j(b,m),B.j(c,m))},new K(null,8,5,M,[ZP,YP,GQ,HQ,EQ,FQ,xz,DQ],null)):x.j(a,SQ)?sh(function(m){var q=h(ZP.J(t(m)),ZP.J(Oe(m)));return g(q)?h(YP.J(t(m)),YP.J(Oe(m))):q},Nh.N(Jp,b,c)):x.j(a,YT)?sh(function(m){var q=h(ZP.J(t(m)),ZP.J(Oe(m)));return g(q)?h(YP.J(t(m)),YP.J(Oe(m))):q},Nh.N(Jp,b,c)):x.j(b,c)},jU=function(a,
b){return wR(a)?b+Math.sqrt(2*b*b):Math.sqrt(2*b*b)},kU=function(a,b,c){return rh(Zh.N(Jo.J(DR),ci.J(function(e){return x.j(a.J?a.J(e):a(e),b)}),Nh.J(function(e){return new f(null,3,[R,"filter_"+(R.J(e)??""),Q,b,wq,e],null)})),c)},nU=function(a){return Lp.U(new K(null,1,5,M,[new f(null,2,[R,"BackgroundImageFix",Q,ora],null)],null),y([kU(T,lU,at.J(a)),new K(null,1,5,M,[new f(null,2,[R,"shape",Q,pra],null)],null),kU(T,qra,at.J(a)),kU(Q,mU,new eg(null,TS.J(a),null,1,null))]))},rra=function(a,b){var c=
a?.x??B.j(a,ZP),e=a?.y??B.j(a,YP),h=a?.width??B.j(a,xz);a=a?.height??B.j(a,DQ);b=wq.J(b);var m=G(b);b=B.N(m,PS,0);var q=B.N(m,RS,0),r=B.N(m,TS,0);m=B.N(m,SS,0);return KQ.ba(Math.min(c,c+b+-m+-r+-5),Math.min(e,e+q+-m+-r+-5),h+Ao(b)+2*m+2*r+10,a+Ao(q)+2*m+2*r+10)},oU=function(a,b,c){var e=Zh.j(ci.J(function(h){return x.j(lU,Q.J(h))}),Nh.J(xh(rra,a)));c*=2;return Yp.ba(Yp.ba(Yp.ba(Yp.ba(Yp.ba(Yp.ba(Yp.ba(Yp.ba(OQ(Zi.N(new K(null,1,5,M,[a],null),e,b)),ZP,kJ,c),YP,kJ,c),GQ,kJ,c),HQ,kJ,c),EQ,wy,c),FQ,wy,
c),xz,wy,2*c),DQ,wy,2*c)},sra=function(a){if(NS.J(a)&&Xj.j(pU,B.j(B.j(a,wS),ko)))return a?.bb??B.j(a,UQ);var b=nU(a);var c=ep.J(TS.J(a));c=g(c)?c:0;a=LQ(a?.points??B.j(a,SQ));return oU(a,b,c)},tra=function(a,b){var c=US.J(a);c=qc(NQ,0,Nh.j(function(e){var h=B.N(e,qU,ET);switch(h instanceof D?h.na:null){case "center":return VS.j(e,0)/2;case "outer":return VS.j(e,0);default:return 0}},c));b=g(b)?0:jU(a,c);c=qc(NQ,0,Nh.j(function(e){var h=T.j(e,lU);switch(h instanceof D?h.na:null){case "drop-shadow":return Ao(PS.J(e))+
2*SS.J(e)+2*TS.J(e)+10;default:return 0}},Jo.j(DR,at.J(a))));a=qc(NQ,0,Nh.j(function(e){var h=T.j(e,lU);switch(h instanceof D?h.na:null){case "drop-shadow":return Ao(RS.J(e))+2*SS.J(e)+2*TS.J(e)+10;default:return 0}},Jo.j(DR,at.J(a))));return new f(null,2,[rU,Math.ceil(b+c),sU,Math.ceil(b+a)],null)},ura=function(a,b){var c=sra(a);b=tra(a,b);a=rU.J(b);b=sU.J(b);return Yp.ba(Yp.ba(Yp.ba(Yp.ba(Yp.ba(Yp.ba(Yp.ba(Yp.ba(c,ZP,kJ,a),GQ,kJ,a),EQ,wy,a),YP,kJ,b),HQ,kJ,b),FQ,wy,b),xz,wy,2*a),DQ,wy,2*b)},tU=function(a){if(null!=
a&&null!=a.bm)a=a.bm(a);else{var b=tU[ha(null==a?null:a)];if(null!=b)a=b.J?b.J(a):b(a);else if(b=tU._,null!=b)a=b.J?b.J(a):b(a);else throw nc("IState.-rejected?",a);}return a},uU=function(a){if(null!=a&&null!=a.$l)a=a.$l(a);else{var b=uU[ha(null==a?null:a)];if(null!=b)a=b.J?b.J(a):b(a);else if(b=uU._,null!=b)a=b.J?b.J(a):b(a);else throw nc("IState.-pending?",a);}return a},vU=function(a){if(null!=a&&null!=a.Ai)a=a.Ai(a);else{var b=vU[ha(null==a?null:a)];if(null!=b)a=b.J?b.J(a):b(a);else if(b=vU._,
null!=b)a=b.J?b.J(a):b(a);else throw nc("IPromiseFactory.-promise",a);}return a},wU=function(a){if(null!=a&&null!=a.Pl)a=a.Pl(a);else{var b=wU[ha(null==a?null:a)];if(null!=b)a=b.J?b.J(a):b(a);else if(b=wU._,null!=b)a=b.J?b.J(a):b(a);else throw nc("ICancellable.-cancelled?",a);}return a},xU=function(a,b){if(null!=a&&null!=a.Rl)a=a.Rl(a,b);else{var c=xU[ha(null==a?null:a)];if(null!=c)a=c.j?c.j(a,b):c(a,b);else if(c=xU._,null!=c)a=c.j?c.j(a,b):c(a,b);else throw nc("ICompletable.-resolve!",a);}return a},
yU=function(a,b){if(null!=a&&null!=a.Ql)a=a.Ql(a,b);else{var c=yU[ha(null==a?null:a)];if(null!=c)a=c.j?c.j(a,b):c(a,b);else if(c=yU._,null!=c)a=c.j?c.j(a,b):c(a,b);else throw nc("ICompletable.-reject!",a);}return a},vra=function(){},zU=function(a,b){if(null!=a&&null!=a.Yj)a.Yj(a,b);else{var c=zU[ha(null==a?null:a)];if(null!=c)c.j?c.j(a,b):c(a,b);else if(c=zU._,null!=c)c.j?c.j(a,b):c(a,b);else throw nc("IExecutor.-exec!",a);}},AU=function(a,b,c){if(null!=a&&null!=a.Zl)a.Zl(a,b,c);else{var e=AU[ha(null==
a?null:a)];if(null!=e)e.N?e.N(a,b,c):e(a,b,c);else if(e=AU._,null!=e)e.N?e.N(a,b,c):e(a,b,c);else throw nc("IScheduler.-schedule!",a);}},EU=function(a,b,c){a[BU]!==b&&a[BU]===CU&&(a[BU]=b,a[DU]=c,wra(a))},HU=function(a,b,c){void 0!==a.complete&&(c?a.complete(null,c):a.type===xra?a.complete(b,null):a.type===FU?b instanceof GU?b.handle((e,h)=>{HU(a,e,h)}):ja(b)&&IU(b.then)?b.then(e=>{HU(a,e,null)},e=>{HU(a,null,e)}):a.complete(b,null):a.type===yra?b instanceof GU?b.handle((e,h)=>{a.complete(e,h)}):
ja(b)&&IU(b.then)?b.then(e=>{a.complete(e,null)},e=>{a.complete(null,e)}):a.complete(null,new TypeError("expected thenable")):a.complete(null,new TypeError("internal: invalid resolve type")))},wra=function(a){if(0!==a[JU].length)for(var b=a[BU],c=a[DU],e,h,m;a[JU].length;){e=a[JU].shift();try{b===KU?h=e.resolve(c):b===LU?h=e.reject(c):m=new TypeError("invalid state")}catch(q){m=q}HU(e,h,m)}},MU=function(a){a[BU]!==CU&&zra(wra,a)},Ara=function(a){return(b,c)=>{c?a.reject(c):a.resolve(b)}},IU=function(a){return"function"===
typeof a},Cra=function(a,b){var c=vU;const e=new GU;a[JU].push({type:yra,resolve:c??Bra,reject:b??NU,complete:Ara(e)});MU(a);return e},OU=function(a){if(null===a)return Dra;const b=new GU;b[BU]=KU;b[DU]=a;return b},Era=function(a){const b=new GU;b[BU]=LU;b[DU]=a;return b},Fra=function(a){if(a instanceof GU)return a;if(ja(a)&&IU(a.then)){const b=new GU;a.then(c=>{b.resolve(c)},c=>{b.reject(c)});return b}return a instanceof Error?Era(a):OU(a)},Pra=function(a){if(x.j(null,a))return l(PU);if(x.j(Gra,
a))return l(Hra);if(x.j(so,a))return l(PU);if(x.j(Ira,a))return l(Jra);if(x.j(Kra,a)||x.j(Lra,a)||x.j(Mra,a))return l(PU);if(x.j(Nra,a))return l(Jra);if(x.j(Ora,a))return l(PU);if(null!=a?Zd===a.Sl||(a.Pc?0:lc(vra,a)):lc(vra,a))return a;if(al(a))return Pra(l(a));throw new TypeError("invalid executor");},QU=function(a){var b=Qra;a=(Se(a),a);zU(Pra(b),a)},Sra=function(a,b,c){a=null==a||x.j(so,a)?l(Rra):al(a)?l(a):a;AU(a,b,c)},Tra=function(){},RU=function(a){for(var b=[],c=arguments.length,e=0;;)if(e<
c)b.push(arguments[e]),e+=1;else break;b=0<b.length?new ge(b.slice(0),0,null):null;b=G(b);B.N(b,Ura,1);return new Tra},PP=function(a){this.Xo=a;this.ea=393216;this.ka=0},TU=function(){return new PP(F)},SU=function(a){this.Yo=a;this.ea=393216;this.ka=0},VU=function(){return new SU(F)},Vra=function(a){var b=a.lastIndexOf(".");return a.slice(0,0<b?b:0)},YU=function(a,b){b=WU.J?WU.J(b):WU(b);a:{var c=XU.get(a);if(0<c)a=c;else for(c=Vra(a);;){var e=XU.get(c);if(null!=e){XU.set(a,e);a=e;break a}if(x.j("",
c)){XU.set(a,100);a=100;break a}c=Vra(c)}}return b>=a},Wra=function(a){a=a instanceof D?a.na:null;switch(a){case "error":return"#c82829";case "warn":return"#f5871f";case "info":return"#4271ae";case "debug":return"#969896";case "trace":return"#8e908c";default:throw Error(["No matching clause: ",k.J(a)].join(""));}},Xra=function(a){a=a instanceof D?a.na:null;switch(a){case "debug":return"DBG";case "trace":return"TRC";case "info":return"INF";case "warn":return"WRN";case "error":return"ERR";default:throw Error(["No matching clause: ",
b)/2,(e+c)/2)},VQ=function(a){return JQ(a?.bb??B.j(a,UQ))},XQ=function(a,b){return WQ(a,null,b)},WQ=function(a,b,c){if(qQ(c)&&p(a)){var e=null!=b?xQ.J(b):vc(YQ);b=null!=b?Doa(b):YQ;var h=tQ(tQ(e,c),b);return nt.j(function(m){return jQ(m,h)},a)}return a},Ooa=function(a){var b=G(a);a=B.j(b,SQ);b=B.j(b,UQ);return isNaN(ZP.J(b))||isNaN(YP.J(b))||isNaN(xz.J(b))||isNaN(DQ.J(b))||th(function(c){return isNaN(ZP.J(c))||isNaN(YP.J(c))},a)},$Q=function(a){return null!=ZQ.J(a)},Qoa=function(a,b){return gk(ci.j(function(c){var e=
B.j(a,c),h=B.j(b,c);return!(x.j(c,bR)?x.j(cR(e),cR(h)):x.j(e,h))},ik(zh.j(Tj(a),Tj(b)))))},Soa=function(a){var b=G(null);b=B.N(b,Roa,!1);return g(b)?dR.J(a):eca(function(c){A(c,0,null);c=A(c,1,null);return eR.J(c)},dR.J(a))},fR=function(a){return Jo.j(eR,Vj(dR.J(a)))},Toa=function(a,b){b=G(b);var c=B.j(b,R),e=B.j(b,S),h=B.j(b,Ez),m=B.j(b,gR),q=B.j(b,hR),r=B.j(b,bR),u=B.j(b,iR),w=B.j(b,jR);return Dp(a,new K(null,2,5,M,[dR,c],null),function(z){var C=null==r?null:Of.J?Of.J(r):r,E=null!=e?I.N(z,S,e):
z;E=null!=h?I.N(E,Ez,h):E;E=null!=m?I.N(E,gR,m):E;E=null!=q?I.N(E,hR,q):E;C=null!=C?I.N(E,bR,C):E;C=null!=w?I.N(C,jR,w):C;C=null!=u?I.N(C,iR,u):C;C=null==u?ln.j(C,iR):C;z=kR.j(Qoa(z,C),new bk(null,new f(null,2,[jR,null,iR,null],null),null));return Ye(z)?C:I.N(C,jR,lR.local())})},Uoa=function(a,b){a=fp.j(a,new K(null,2,5,M,[dR,b],null));return g(g(!1)?!1:fc(eR.J(a)))?a:null},mR=function(a){for(var b=[],c=arguments.length,e=0;;)if(e<c)b.push(arguments[e]),e+=1;else break;b=3<b.length?new ge(b.slice(3),
0,null):null;return Voa(arguments[0],arguments[1],arguments[2],b)},Voa=function(a,b,c,e){return Dp(a,new K(null,2,5,M,[dR,b],null),function(h){return I.N(Qg(c,h,e),jR,lR.local())})},Woa=function(a,b){return Cp(a,new K(null,2,5,M,[dR,b],null),I,y([eR,!0]))},Xoa=function(a,b){return nR(a,new K(null,3,5,M,[dR,b,eR],null))},pR=function(a,b){return B.j(B.j(a,oR),b)},Yoa=function(a,b){b=G(b);var c=B.j(b,R),e=B.j(b,qR);return Yp.qa(Yp.N(a,rR,function(h){var m=th(xh(x,c),h);return g(m)?h:null==e?hg.j(h,c):
Mp(h,e,new K(null,1,5,M,[c],null))}),oR,I,c,ln.j(b,qR))},Zoa=function(a,b){return Yp.ba(Yp.N(a,rR,function(c){return gi(function(e){return Xj.j(e,b)},c)}),oR,ln,b)},uR=function(a){return x.j(a?.type??B.j(a,Q),sR)&&x.j(a?.id??B.j(a,R),tR)},$oa=function(a){return null!=a&&x.j(YH,a?.type??B.j(a,Q))},vR=function(a){return null!=a&&x.j(ZH,a?.type??B.j(a,Q))},wR=function(a){return null!=a&&x.j(Ez,a?.type??B.j(a,Q))},yR=function(a,b){return function m(e,h){if(yf(h,e))return null;var q=function(){var r=xR.J(B.j(a,
e));return null==r?null:zi(r)}();return g(q)?Zi.N(q,$h(function(r){return m(r,hg.j(h,e))}),q):null}(b,ck)},zR=function(a,b){return nt.j(xh(B,a),Zi.j(new K(null,1,5,M,[b],null),yR(a,b)))},apa=function(a,b){a=B.j(a,b);return g(a)?a?.Hb??B.j(a,AR):null},BR=function(a,b){for(var c=fi,e=b;;)if(b=apa(a,e),null!=b&&Xj.j(b,e))c=hg.j(c,b),e=b;else return c},bpa=function(a,b){var c=xh(B,a);return Zi.N(new K(null,1,5,M,[c(b)],null),Nh.J(c),BR(a,b))},cpa=function(a,b){return CR(a,b)},CR=function(a,b){var c=G(null),
e=B.N(c,dpa,!1),h=B.N(c,epa,!1),m=xh(B,a);return Jo.j(Ooa,Gh(function(q){q=m(q);return g(q)?(fc(e)||fc(DR.J(q)))&&(fc(h)||fc(ER.J(q)))?q:null:null},xR.J(m(b))))},fpa=function(a,b){return g(b)?hg.j(g(a)?a:ck,b):null},gpa=function(a){a=df(a)?Vj(a):a;return Zi.N(ck,Fh(S),a)},hpa=function(a,b){return qc(function(c,e){return g(th(dk([e]),c))?c:hg.j(c,e)},zi(a),b)},jpa=function(a,b){return ipa(a,vh(FR),tR,b,fi)},ipa=function(a,b,c,e,h){c=fp.j(a,new K(null,2,5,M,[c,xR],null));if(Ye(c))return h;var m=t(c);
c=ke(c);for(var q=ck;;)if(yf(q,m))m=t(c),c=ke(c);else{var r=B.j(a,m);m=hg.j(q,m);h=e.j?e.j(h,r):e(h,r);q=g(function(){var w=null==b;return w?w:b.J?b.J(r):b(r)}())?zh.j(function(){var w=xR.J(r);return g(w)?w:fi}(),c):c;if(Ye(q))return h;c=t(q);q=ke(q);var u=m;m=c;c=q;q=u}},GR=function(a){if(g(a)){a=wq.J(a);var b=G(a);a=B.j(b,ZP);b=B.j(b,YP);return XP(a,b)}return null},KR=function(a){return new f(null,3,[HR,IR,JR,!1,wq,new f(null,2,[ZP,ZP.J(a),YP,YP.J(a)],null)],null)},MR=function(a){return new f(null,
3,[HR,LR,JR,!1,wq,new f(null,2,[ZP,ZP.J(a),YP,YP.J(a)],null)],null)},SR=function(a,b,c){a=new f(null,6,[ZP,ZP.J(a),YP,YP.J(a),NR,ZP.J(b),OR,YP.J(b),PR,ZP.J(c),QR,YP.J(c)],null);return new f(null,3,[HR,RR,JR,!1,wq,a],null)},TR=function(a,b){return.1>eQ(a,b)},kpa=function(a,b,c){return new f(null,3,[UR,a,VR,b,nB,c],null)},lpa=function(a,b){b=x.j(WR,HR.J(b))?MR(UR.J(a)):b;var c=GR(b);return Yp.ba(I.N(a,VR,c),nB,hg,b)},YR=function(a){var b=qc(function(c,e){var h=A(e,0,null),m=A(e,1,null);if(null!=m){e=
hg.j;m=wq.J(m);var q=G(m);m=B.j(q,ZP);q=B.j(q,YP);var r=wq.J(h),u=G(r);r=B.j(u,NR);var w=B.j(u,OR),z=B.j(u,PR);u=B.j(u,QR);m=Yp.U(h,wq,I,ZP,m,YP,y([q]));h=x.j(RR,HR.J(h))?Yp.U(m,wq,I,NR,z,OR,y([u,PR,r,QR,w])):m;c=e.call(hg,c,h)}return c},new K(null,1,5,M,[KR(VR.J(a))],null),ig(Kp(nB.J(a))));return kpa(VR.J(a),UR.J(a),b)},ZR=function(a){return qc(function(b,c){var e=x.j(IR,HR.J(c)),h=He(b)-1;e?(e=hg.j,h=GR(c),b=e.call(hg,b,kpa(h,h,new K(null,1,5,M,[c],null)))):b=0<=h?Yp.ba(b,h,lpa,c):b;return b},fi,
a)},$R=function(a,b){return I.N(Yp.ba(a,nB,Lp,ke(nB.J(b))),VR,VR.J(b))},mpa=function(a,b){return qc(function(c,e){var h=A(c,0,null);c=A(c,1,null);return TR(VR.J(e),UR.J(e))?new K(null,2,5,M,[h,hg.j(c,e)],null):TR(VR.J(h),UR.J(e))?new K(null,2,5,M,[$R(h,e),c],null):TR(UR.J(h),VR.J(e))?new K(null,2,5,M,[$R(e,h),c],null):TR(VR.J(h),VR.J(e))?new K(null,2,5,M,[$R(h,YR(e)),c],null):TR(UR.J(h),UR.J(e))?new K(null,2,5,M,[$R(YR(e),h),c],null):new K(null,2,5,M,[h,hg.j(c,e)],null)},new K(null,2,5,M,[a,fi],null),
b)},npa=function(a){return TR(UR.J(a),VR.J(a))},aS=function(a){var b=ZR(a);a:{a=fi;var c=t(b);for(b=ke(b);;)if(null!=c){var e=npa(c)?new K(null,2,5,M,[c,b],null):mpa(c,b);b=A(e,0,null);e=A(e,1,null);x.j(c,b)?(a=hg.j(a,b),c=t(e),b=ke(e)):(c=b,b=e)}else break a}return Zi.j(fi,ai(nB,y([a])))},opa=function(a){a=nB.J(t(ZR(a)));var b=t(a);a=ke(a);for(var c=null,e=0;;){if(null==b)return 0<e;b=GR(b);var h=G(b),m=h;b=B.j(h,ZP);h=B.j(h,YP);var q=null==t(a);c=null==c?m:c;m=q?c:GR(t(a));q=G(m);m=B.j(q,ZP);q=
B.j(q,YP);b=e+(b*q-m*h);e=t(a);a=ke(a);h=b;b=e;e=h}},bS=function(a,b){var c=A(a,0,null);a=A(a,1,null);b=lQ(cQ(a,c),b);return bQ(c,b)},cS=function(a,b){var c=A(a,0,null),e=A(a,1,null),h=A(a,2,null);a=A(a,3,null);return ppa(c,e,h,a,b)},ppa=function(a,b,c,e,h){function m(C){return(C.J?C.J(a):C(a))*u+(C.J?C.J(c):C(c))*w+(C.J?C.J(e):C(e))*z+(C.J?C.J(b):C(b))*r}var q=h*h,r=q*h,u=-r+3*q+-3*h+1,w=3*r+-6*q+3*h,z=-3*r+3*q;return aQ(m(ZP),m(YP))},qpa=function(a,b){var c=A(a,0,null),e=A(a,1,null),h=A(a,2,null);
a=A(a,3,null);c=new K(null,2,5,M,[new K(null,4,5,M,[ZP.J(c),ZP.J(h),ZP.J(a),ZP.J(e)],null),new K(null,4,5,M,[YP.J(c),YP.J(h),YP.J(a),YP.J(e)],null)],null);e=nt.j(function(m){var q=A(m,0,null),r=A(m,1,null),u=A(m,2,null);m=A(m,3,null);var w=b*b;return q*(-3*w+6*b+-3)+r*(9*w+-12*b+3)+u*(-9*w+6*b)+3*m*w},c);c=A(e,0,null);e=A(e,1,null);h=Do(c,e);return Eo(h)?XP(0,0):XP(c/h,e/h)},rpa=function(a,b,c,e,h){var m=nQ(a,c,h),q=nQ(c,e,h);e=nQ(e,b,h);c=nQ(m,q,h);q=nQ(q,e,h);h=nQ(c,q,h);return new K(null,2,5,M,
[new K(null,4,5,M,[a,h,m,c],null),new K(null,4,5,M,[h,b,q,e],null)],null)},tpa=function(a,b,c){var e=A(a,0,null),h=A(a,1,null),m=A(a,2,null);a=A(a,3,null);return spa(e,h,m,a,b,c)},spa=function(a,b,c,e,h,m){h=h<m?new K(null,2,5,M,[h,m],null):new K(null,2,5,M,[m,h],null);m=A(h,0,null);h=(A(h,1,null)-m)/(1-m);a=rpa(a,b,c,e,m);A(a,0,null);e=A(a,1,null);a=A(e,0,null);b=A(e,1,null);c=A(e,2,null);e=A(e,3,null);h=rpa(a,b,c,e,h);return t(h)},vpa=function(a,b,c,e){var h=Math.sqrt(b*b-4*a*c);if(Eo(e)&&Eo(a)&&
Eo(b))return fi;if(Eo(e)&&Eo(a))return new K(null,1,5,M,[-c/b],null);if(Eo(e))return new K(null,2,5,M,[(-b+h)/(2*a),(-b-h)/(2*a)],null);a/=e;h=b/e;b=(3*h-a*a)/3;c=(2*a*a*a+-9*a*h+c/e*27)/27;h=b/3;e=c/2;h=e*e+h*h*h;if(0>h)return b=-b/3,b=Math.sqrt(b*b*b),c=-c/(2*b),c=Math.acos(-1>c?-1:1<c?1:c),b=2*Bo(b),new K(null,3,5,M,[b*Math.cos(c/3)-a/3,b*Math.cos((c+2*upa)/3)-a/3,b*Math.cos((c+4*upa)/3)-a/3],null);if(Eo(h))return b=0>e?Bo(-e):-Bo(e),new K(null,2,5,M,[2*b-a/3,-b-a/3],null);c=Math.sqrt(h);b=Bo(c-
e);return new K(null,1,5,M,[b-Bo(c+e)-a/3],null)},dS=function(a){var b=A(a,0,null),c=A(a,1,null),e=A(a,2,null);a=A(a,3,null);return wpa(b,c,e,a)},wpa=function(a,b,c,e){a=new K(null,2,5,M,[new K(null,4,5,M,[ZP.J(a),ZP.J(c),ZP.J(e),ZP.J(b)],null),new K(null,4,5,M,[YP.J(a),YP.J(c),YP.J(e),YP.J(b)],null)],null);return gi(function(h){return.01<h&&.99>h},ai(function(h){var m=A(h,0,null),q=A(h,1,null),r=A(h,2,null);h=A(h,3,null);return vpa(-3*m+9*q+-9*r+3*h,6*m+-12*q+6*r,3*q+-3*m,0)},y([a])))},xpa=function(a,
b,c,e){a=new K(null,1,5,M,[new K(null,4,5,M,[B.j(a,YP),B.j(c,YP),B.j(e,YP),B.j(b,YP)],null)],null);return gi(function(h){return 0<=h&&1>=h},ai(function(h){var m=A(h,0,null),q=A(h,1,null),r=A(h,2,null);h=A(h,3,null);return vpa(3*m+-6*q+3*r,-3*m+3*q,m,-m+3*q+-3*r+h)},y([a])))},gS=function(a){var b=eS.J(a);return new K(null,2,5,M,[b,fS.J(a)],null)},hS=function(a){var b=eS.J(a);return new K(null,4,5,M,[b,fS.J(a),aQ(NR.J(wq.J(a)),OR.J(wq.J(a))),aQ(PR.J(wq.J(a)),QR.J(wq.J(a)))],null)},iS=function(a){var b=
function(){for(var c=ck,e=null,h=null,m=p(a);;)if(m){var q=t(m),r=fS.J(q),u=function(){var E=HR.J(q),H=E instanceof D?E.na:null;switch(H){case "move-to":return new K(null,3,5,M,[r,r,g(r)?new K(null,1,5,M,[r],null):null],null);case "close-path":return new K(null,3,5,M,[h,h,g(h)?new K(null,1,5,M,[h],null):null],null);case "line-to":return new K(null,3,5,M,[r,h,g(function(){var J=e;return g(J)?r:J}())?new K(null,2,5,M,[e,r],null):null],null);case "curve-to":return new K(null,3,5,M,[r,h,function(){var J=
fS.j(q,ypa),O=fS.j(q,zpa),P=new K(null,4,5,M,[e,r,J,O],null);return g(function(){var W=e;return g(W)?(W=r,g(W)?g(J)?O:J:W):W}())?Zi.j(new K(null,2,5,M,[e,r],null),Nh.j(function(W,V,Z,ba,qa,ra,sa){return function(Ea){return cS(sa,Ea)}}(c,e,h,m,J,O,P,E,H,q,r),dS(P))):null}()],null);default:return new K(null,3,5,M,[r,h,fi],null)}}(),w=A(u,0,null),z=A(u,1,null);u=A(u,2,null);u=Qg(hg,c,u);var C=v(m);c=u;e=w;h=z;m=C}else return c}();b=Ye(b)?Gh(fS,a):b;return op(b)?LQ(b):KQ.aa()},Apa=function(a,b){function c(q){var r=
G(q),u=B.j(r,ZP),w=B.j(r,YP),z=B.j(r,NR),C=B.j(r,OR);q=B.j(r,PR);var E=B.j(r,QR);r=Pp(u,w)?e(r,ZP,YP):r;z=Pp(z,C)?e(r,NR,OR):r;return Pp(q,E)?e(z,PR,QR):z}function e(q,r,u){q=g(yo(h))?Yp.ba(q,r,wy,h):q;return g(yo(m))?Yp.ba(q,u,wy,m):q}var h=ZP.J(b),m=YP.J(b);return Zi.N(fi,Nh.J(function(q){return Yp.N(q,wq,c)}),a)},jS=function(a,b){if(null!=b){var c=function(h,m,q){var r=jQ(aQ(B.j(h,m),B.j(h,q)),b);return I.U(h,m,ZP.J(r),y([q,YP.J(r)]))},e=function(h){var m=G(h),q=B.j(m,ZP),r=B.j(m,NR);h=B.j(m,PR);
m=null!=q?c(m,ZP,YP):m;r=null!=r?c(m,NR,OR):m;return null!=h?c(r,PR,QR):r};return Zi.N(fi,Nh.J(function(h){return Yp.N(h,wq,e)}),a)}return a},kS=function(a,b){var c=A(a,0,null),e=G(c);c=B.j(e,ZP);e=B.j(e,YP);a=A(a,1,null);var h=G(a);a=B.j(h,ZP);h=B.j(h,YP);var m=G(b);b=B.j(m,ZP);m=B.j(m,YP);return Eo(c-a)&&Eo(e-h)?Infinity:Eo(c-a)?(m-e)/(h-e):(b-c)/(a-c)},lS=function(a,b,c){var e=tpa(a,b,c);a=A(e,0,null);b=A(e,1,null);c=nt.j(function(h){return cS(e,h)},dS(e));return LQ(Zi.j(new K(null,2,5,M,[a,b],
null),c))},mS=function(a,b){var c=A(b,0,null),e=A(b,1,null);b=G(c);c=B.j(b,ZP);b=B.j(b,YP);var h=G(e);e=B.j(h,ZP);h=B.j(h,YP);var m=G(a);a=B.j(m,ZP);m=B.j(m,YP);h=Eo(c-e)?null:(h-b)/(e-c);b=null!=h?h*a+-h*c+b:null;return Eo(c-e)&&Eo(a-c)||null!=b&&Eo(m-b)},Bpa=function(a,b){return function m(e,h){var q=lS(b,e,h);if(QQ(q,a)){if(Eo(e-h))return.1>eQ(cS(b,e),a);q=e+(h-e)/2;e=m(e,q);return g(e)?e:m(q,h)}return null}(0,1)},Cpa=function(a,b){var c=A(a,0,null),e=A(a,1,null),h=A(b,0,null),m=A(b,1,null),q=
G(c),r=B.j(q,ZP);q=B.j(q,YP);var u=G(e),w=B.j(u,ZP);u=B.j(u,YP);var z=G(h),C=B.j(z,ZP);z=B.j(z,YP);var E=G(m),H=B.j(E,ZP),J=B.j(E,YP);E=(C-H)*(r*u-q*w)-(r-w)*(C*J-z*H);var O=(z-J)*(r*u-q*w)-(q-u)*(C*J-z*H);r=(r-w)*(z-J)-(q-u)*(C-H);if(Eo(r))return mS(h,a)?new K(null,2,5,M,[kS(a,h),0],null):mS(m,a)?new K(null,2,5,M,[kS(a,m),1],null):mS(e,b)?new K(null,2,5,M,[1,kS(b,e)],null):mS(c,b)?new K(null,2,5,M,[0,kS(b,c)],null):null;c=XP(E/r,O/r);a=kS(a,c);b=kS(b,c);return new K(null,2,5,M,[a,b],null)},Dpa=function(a,
b){var c=A(a,0,null),e=A(a,1,null);a=A(b,0,null);var h=A(b,1,null),m=A(b,2,null);b=A(b,3,null);var q=YP.J(e)-YP.J(c);e=ZP.J(e)-ZP.J(c);e=180*Math.atan2(q,e)/Math.PI;q=sQ.aa();e=uQ.j(q,nS.J(-e));c=yQ(e,dQ(c));m=new K(null,4,5,M,[jQ(a,c),jQ(h,c),jQ(m,c),jQ(b,c)],null);c=A(m,0,null);a=A(m,1,null);h=A(m,2,null);m=A(m,3,null);return xpa(c,a,h,m)},Epa=function(a,b){var c=gi(function(e){var h=cS(b,e);e=qpa(b,e);e=uoa(e);return 0<kS(a,h)&&.01<Ao(e-180)&&.01<Ao(e-0)},Dpa(a,b));return nt.j(function(e){var h=
M,m=cS(b,e);e=qpa(b,e);e=0<YP.J(e)?-1:0>YP.J(e)?1:0;return new K(null,2,5,h,[m,e],null)},c)},Fpa=function(a,b){var c=gi(function(h){h=Eo(h)?0:h;var m=cS(b,h);m=kS(a,m);return 0<=h&&1>=h&&0<=m&&1>=m},Dpa(a,b)),e=nt.j(function(h){return cS(b,h)},c);e=nt.j(function(h){return kS(a,h)},e);return new K(null,2,5,M,[e,c],null)},Ipa=function(a,b){function c(e){e=G(e);var h=B.j(e,bM),m=B.j(e,$L);return function(q){var r=G(q);q=B.j(r,bM);r=B.j(r,$L);return 2<=eQ(q,h)&&2<=eQ(r,m)}}return function(e){var h=t(e);
e=ke(e);for(var m=fi,q=fi;;){if(null==h)return new K(null,2,5,M,[m,q],null);e=ci.j(c(h),e);m=hg.j(m,Gpa.J(h));q=hg.j(q,Hpa.J(h));h=t(e);e=ke(e)}}(kI.j(gy,function u(h,m,q,r){var w=lS(a,h,m),z=lS(b,q,r);if(PQ(w,z)){w=cS(a,h);z=cS(b,q);if(.1>eQ(w,z))return new K(null,1,5,M,[new f(null,5,[bM,w,$L,z,gy,eQ(w,z),Gpa,Co(h,4),Hpa,Co(q,4)],null)],null);z=h+(m-h)/2;var C=q+(r-q)/2;w=u(h,z,q,C);h=u(h,z,C,r);q=u(z,m,q,C);m=u(z,m,C,r);return Lp.U(w,y([h,q,m]))}return null}(0,1,0,1)))},Jpa=function(a,b){return th(function(c){var e=
HR.J(c);switch(e instanceof D?e.na:null){case "line-to":return c=gS(c),(e=mS(a,c))?(c=kS(c,a),c=(0<c||Eo(c-0))&&(1>c||Eo(c-1))):c=e,c;case "curve-to":return Bpa(a,hS(c));default:return!1}},b)},Kpa=function(a){return Zi.N(fi,$h(nB),ZR(aS(a)))},Lpa=function(a,b){b=G(b);b=B.j(b,UQ);return YP.J(a)>=HQ.J(b)&&YP.J(a)<=FQ.J(b)},qS=function(a){return nt.j(function(b){return new f(null,4,[HR,HR.J(b),Mpa,b,oS,x.j(LR,HR.J(b))?gS(b):hS(b),UQ,pS.J(b)],null)},ci.j(function(b){return Xj.j(x.j(LR,HR.J(b)),x.j(RR,
HR.J(b)))},Kpa(a)))},Npa=function(a,b){var c=new K(null,2,5,M,[a,aQ(ZP.J(a)+1,YP.J(a))],null);return Xj.j(0,Lf(wy,Nh.j(Oe,ai(function(e){var h=HR.J(e);switch(h instanceof D?h.na:null){case "line-to":e=oS.J(e);var m=A(e,0,null),q=A(e,1,null);h=new K(null,2,5,M,[a,aQ(ZP.J(a)+1,YP.J(a))],null);var r;if(r=null!=m){r=YP.J(m);var u=YP.J(a);r=Eo(r-u)}m=r?Yp.ba(m,YP,wy,10):m;if(r=null!=q)r=YP.J(q),u=YP.J(a),r=Eo(r-u);q=r?Yp.ba(q,YP,wy,10):q;q=Cpa(h,new K(null,2,5,M,[m,q],null));h=A(q,0,null);var w=A(q,1,
null);null!=w&&null!=h&&0<h&&(0<w||Eo(w-0))&&(1>w||Eo(w-1))?(q=h=M,m=bS(e,w),r=A(e,0,null),u=A(e,1,null),e=bS(e,w),e=YP.J(e),u=YP.J(u),r=YP.J(r),e=new K(null,1,5,h,[new K(null,2,5,q,[m,0<e-u&&!Eo(e-u)?1:0>e-u&&!Eo(e-u)?-1:0>e-r?1:0<e-r?-1:0],null)],null)):e=null;return e;case "curve-to":return Epa(c,oS.J(e));default:return fi}},y([ci.j(xh(Lpa,a),b)])))))},Opa=function(a,b,c){c=ci.j(function(h){return 0<h&&1>h},c);if(Ye(c))return new K(null,1,5,M,[b],null);var e=GR(b);b=Zi.j(hk(),hg.j(c,1));return nt.j(function(h){return MR(nQ(a,
e,h))},b)},Ppa=function(a,b,c){c=ci.j(function(q){return 0<q&&1>q},c);if(Ye(c))return new K(null,1,5,M,[b],null);var e=GR(b);b=wq.J(b);var h=aQ(NR.J(b),OR.J(b)),m=aQ(PR.J(b),QR.J(b));b=Zi.j(hk(),hg.U(c,0,y([1])));return nt.j(function(q){var r=A(q,0,null);q=A(q,1,null);var u=spa(a,e,h,m,q,r);A(u,0,null);r=A(u,1,null);q=A(u,2,null);u=A(u,3,null);return SR(r,q,u)},ke(Kp(b)))},Qpa=function(a,b){var c=G(a),e=B.j(c,rS),h=B.j(c,sS),m=function(){var u=tS.j(a,sQ.aa());u=g(e)?wQ(u,XP(-1,1)):u;return g(h)?wQ(u,
XP(1,-1)):u}();c=function(){var u=sQ.aa();u=g(e)?wQ(u,XP(-1,1)):u;u=g(h)?wQ(u,XP(1,-1)):u;return uQ.j(u,uS.j(a,sQ.aa()))}();var q=function(){var u=a?.bb??B.j(a,UQ);u=null==u?null:JQ(u);return g(u)?u:JQ(iS(b))}(),r=jS(b,AQ(q,c));m=WQ(IQ(iS(r)),q,m);q=TQ(m);c=LQ(WQ(m,q,c));return new K(null,2,5,M,[m,c],null)},xS=function(a){var b=yf(a,vS)?Of:aS,c;if(c=x.j(Ez,Q.J(a)))a=wS.J(a),b=b.J?b.J(a):b(a),c=!sh(npa,ZR(b));return c},yS=function(a,b){return nt.j(function(c){var e=A(c,0,null);c=A(c,1,null);e=null==
c&&null!=b?I.N(e,eS,b):e;return null!=c?I.N(e,eS,fS.J(c)):e},Kp(a))},Rpa=function(a){for(var b=t(a),c=ke(a),e=fi,h=a=null;;){if(null==b)return e;var m=fS.J(b);h=x.j(WR,HR.J(b))&&(null==h||.01>eQ(h,a))?null:x.j(WR,HR.J(b))?MR(a):b;b=t(c);c=ke(c);e=null!=h?hg.j(e,h):e;a=x.j(IR,HR.J(h))?m:a;h=m}},Spa=function(a,b){return x.j(LR,HR.J(a))&&x.j(LR,HR.J(b))?(a=gS(a),b=gS(b),a=Cpa(a,b),b=A(a,0,null),a=A(a,1,null),null!=b&&null!=a&&(0<b||Eo(b-0))&&(1>b||Eo(b-1))&&(0<a||Eo(a-0))&&(1>a||Eo(a-1))?new K(null,
2,5,M,[new K(null,1,5,M,[b],null),new K(null,1,5,M,[a],null)],null):null):x.j(LR,HR.J(a))&&x.j(RR,HR.J(b))?Fpa(gS(a),hS(b)):x.j(RR,HR.J(a))&&x.j(LR,HR.J(b))?(a=Fpa(gS(b),hS(a)),b=A(a,0,null),a=A(a,1,null),new K(null,2,5,M,[a,b],null)):x.j(RR,HR.J(a))&&x.j(RR,HR.J(b))?Ipa(hS(a),hS(b)):new K(null,2,5,M,[fi,fi],null)},Tpa=function(a,b,c,e){function h(w,z,C){return Zi.N(fi,$h(function(E){return m(E,z,C)}),w)}function m(w,z,C){return g(r(w,C))?qc(function(E,H){return Zi.N(fi,$h(function(J){if(fc(q(J,H)))J=
new K(null,1,5,M,[J],null);else{var O=Spa(J,H),P=A(O,0,null);A(O,1,null);b:switch(O=HR.J(J),O instanceof D?O.na:null){case "line-to":P=Opa(eS.J(J),J,P);break b;case "curve-to":P=Ppa(eS.J(J),J,P);break b;default:P=new K(null,1,5,M,[J],null)}J=yS(P,eS.J(J))}return J}),E)},new K(null,1,5,M,[w],null),ci.j(function(E){return q(w,E)},z)):new K(null,1,5,M,[w],null)}function q(w,z){if(x.j(IR,HR.J(w))||x.j(IR,HR.J(z)))return!1;w=u(w);z=u(z);return PQ(w,z)}function r(w,z){if(x.j(IR,HR.J(w)))return!1;w=u(w);
return PQ(w,z)}var u=ml(pS);return new K(null,2,5,M,[h(a,b,e),h(b,a,c)],null)},Upa=function(a){return yf(a,eS)&&yf(new bk(null,new f(null,2,[LR,null,RR,null],null),null),HR.J(a))},zS=function(a,b,c,e){a:{var h=HR.J(a);h=h instanceof D?h.na:null;switch(h){case "line-to":a=bS(gS(a),.5);break a;case "curve-to":a=cS(hS(a),.5);break a;default:throw Error(["No matching clause: ",k.J(h)].join(""));}}return(c=QQ(c,a))?(e=Npa(a,e))?e:Jpa(a,b):c},Vpa=function(a,b){return null!=tp(function(c){if(x.j(HR.J(a),
HR.J(c))&&yf(new bk(null,new f(null,2,[LR,null,RR,null],null),null),HR.J(a))){var e=HR.J(a);e=e instanceof D?e.na:null;switch(e){case "line-to":var h=gS(a);e=A(h,0,null);h=A(h,1,null);var m=gS(c),q=A(m,0,null),r=A(m,1,null);return.1>eQ(e,q)&&.1>eQ(h,r)||.1>eQ(e,r)&&.1>eQ(h,q)?new K(null,2,5,M,[a,c],null):null;case "curve-to":q=hS(a);e=A(q,0,null);h=A(q,1,null);m=A(q,2,null);var u=A(q,3,null),w=hS(c);q=A(w,0,null);r=A(w,1,null);var z=A(w,2,null);w=A(w,3,null);return.1>eQ(e,q)&&.1>eQ(h,r)&&.1>eQ(m,
z)&&.1>eQ(u,w)||.1>eQ(e,r)&&.1>eQ(h,q)&&.1>eQ(m,w)&&.1>eQ(u,z)?new K(null,2,5,M,[a,c],null):null;default:throw Error(["No matching clause: ",k.J(e)].join(""));}}else return null},b)},Wpa=function(a){var b=t(a);a=ke(a);for(var c=null,e=fi;;){if(null==b)return e;var h=Xj.j(eS.J(b),c)?hg.j(e,KR(eS.J(b))):e;c=t(a);a=ke(a);e=fS.J(b);h=hg.j(h,ln.j(b,eS));b=c;c=e;e=h}},Xpa=function(a,b,c,e,h,m){var q=qS(a),r=qS(c),u=zh.j(ci.j(function(C){return fc(zS(C,c,m,r))},b),ci.j(function(C){return fc(zS(C,a,h,q))},
e)),w=qS(u),z=iS(Wpa(u));e=ci.j(function(C){var E=zS(C,a,h,q);if(g(E)){if(E=Vpa(C,b)){a:switch(E=HR.J(C),E=E instanceof D?E.na:null,E){case "line-to":C=bS(gS(C),.5);break a;case "curve-to":C=cS(hS(C),.5);break a;default:throw Error(["No matching clause: ",k.J(E)].join(""));}E=!(QQ(z,C)&&Npa(C,w))}C=E}else C=E;return C},e);return Lp.U(u,y([e]))},Ypa=function(a,b,c,e,h,m){var q=qS(a),r=qS(c);return Lp.U(ci.j(function(u){return fc(zS(u,c,m,r))},b),y([ci.j(function(u){var w=zS(u,a,h,q);return g(w)?!Vpa(u,
b):w},e)]))},Zpa=function(a,b,c,e,h,m){var q=qS(a),r=qS(c);return Lp.U(ci.j(function(u){return zS(u,c,m,r)},b),y([ci.j(function(u){return zS(u,a,h,q)},e)]))},$pa=function(a,b,c){var e=Xj.j(KE,a)&&x.j(opa(c),opa(b)),h=yS(Rpa(b),null),m=yS(function(){var C=Rpa(c);return e?Zi.j(fi,ai(nB,y([ig(nt.j(YR,ZR(C)))]))):C}(),null),q=iS(h),r=iS(m),u=Tpa(h,m,q,r);b=A(u,0,null);u=A(u,1,null);var w=ci.j(Upa,yS(b,null)),z=ci.j(Upa,yS(u,null));b=function(){var C=a instanceof D?a.na:null;switch(C){case "union":return Xpa(h,
w,m,z,q,r);case "difference":return Ypa(h,w,m,z,q,r);case "intersection":return Zpa(h,w,m,z,q,r);case "exclude":return Lp.U(w,y([z]));default:throw Error(["No matching clause: ",k.J(C)].join(""));}}();return aS(Wpa(b))},aqa=function(a,b){return p(b)?Zi.j(fi,Lf(xh($pa,a),b)):fi},AS=function(a,b){return Eo(b)?Infinity:a/b},bqa=function(a){a=G(a);var b=B.j(a,xz),c=B.j(a,DQ);a=B.j(a,BS);null==a||Eo(a)?a=0:(b=AS(b,2*a),b=1<b?1:b,c=AS(c,2*a),c=b<c?b:c,a=1>c?a*c:a);return a},cqa=function(a){var b=G(a),c=
B.j(b,xz),e=B.j(b,DQ);a=B.j(b,CS);var h=B.j(b,DS),m=B.j(b,ES);b=B.j(b,FS);if(null!=a&&null!=h&&null!=m&&null!=b){var q=AS(c,a+h);q=1<q?1:q;var r=AS(e,h+m);q=q<r?q:r;c=AS(c,m+b);c=q<c?q:c;e=AS(e,b+a);e=c<e?c:e;a=1>e?new K(null,4,5,M,[a*e,h*e,m*e,b*e],null):new K(null,4,5,M,[a,h,m,b],null)}else a=new K(null,4,5,M,[a,h,m,b],null);return a},GS=function(a,b,c,e){var h=function(){var E=c instanceof D?c.na:null;switch(E){case "top-left":return ZP.J(a);case "top-right":return ZP.J(a)-e;case "bottom-right":return ZP.J(b)-
e;case "bottom-left":return ZP.J(b);default:throw Error(["No matching clause: ",k.J(E)].join(""));}}(),m=function(){var E=c instanceof D?c.na:null;switch(E){case "top-left":return YP.J(a)-e;case "top-right":return YP.J(a);case "bottom-right":return YP.J(b)-2*e;case "bottom-left":return YP.J(b)-e;default:throw Error(["No matching clause: ",k.J(E)].join(""));}}(),q=2*e,r=2*e,u=h+q/2*.448084975506,w=h+q/2*1.5519150244939999,z=m+r/2*.448084975506,C=m+r/2*1.5519150244939999;h=function(){var E=c instanceof
D?c.na:null;switch(E){case "top-left":return I.N(a,YP,z);case "top-right":return I.N(a,ZP,w);case "bottom-right":return I.N(a,YP,C);case "bottom-left":return I.N(a,ZP,u);default:throw Error(["No matching clause: ",k.J(E)].join(""));}}();m=function(){var E=c instanceof D?c.na:null;switch(E){case "top-left":return I.N(b,ZP,u);case "top-right":return I.N(b,YP,z);case "bottom-right":return I.N(b,ZP,w);case "bottom-left":return I.N(b,YP,C);default:throw Error(["No matching clause: ",k.J(E)].join(""));
}}();return SR(b,h,m)},dqa=function(a){var b=G(a),c=B.j(b,ZP);a=B.j(b,YP);var e=B.j(b,xz),h=B.j(b,DQ),m=c+e/2,q=a+h/2;b=XP(m,a);var r=XP(c+e,q);m=XP(m,a+h);q=XP(c,q);var u=c+e/2*.448084975506;c+=e/2*1.5519150244939999;e=a+h/2*.448084975506;a+=h/2*1.5519150244939999;return new K(null,5,5,M,[KR(b),SR(r,I.N(b,ZP,c),I.N(r,YP,e)),SR(m,I.N(r,YP,a),I.N(m,ZP,c)),SR(q,I.N(m,ZP,u),I.N(q,YP,a)),SR(b,I.N(q,YP,e),I.N(b,ZP,u))],null)},iqa=function(a,b,c,e,h,m,q,r){var u=XP(a,b+h),w=XP(a+h,b),z=XP(c+a+-m,b),C=XP(c+
a,b+m),E=XP(c+a,e+b+-q),H=XP(c+a+-q,e+b);c=XP(a+r,e+b);b=XP(a,e+b+-r);var J=e=a=hg.j,O=hg.j,P=hg.j(fi,KR(u));h=Xj.j(u,w)?hg.j(P,GS(u,w,eqa,h)):P;h=O.call(hg,h,MR(z));m=Xj.j(z,C)?hg.j(h,GS(z,C,fqa,m)):h;m=J.call(hg,m,MR(E));q=Xj.j(E,H)?hg.j(m,GS(E,H,gqa,q)):m;q=e.call(hg,q,MR(c));r=Xj.j(c,b)?hg.j(q,GS(c,b,hqa,r)):q;return a.call(hg,r,MR(u))},lqa=function(a){var b=G(a);a=B.j(b,ZP);var c=B.j(b,YP),e=B.j(b,xz),h=B.j(b,DQ),m=g(CS.J(b))?jqa:kqa;switch(m instanceof D?m.na:null){case "radius-1":return b=
bqa(b),iqa(a,c,e,h,b,b,b,b);case "radius-4":var q=cqa(b);b=A(q,0,null);m=A(q,1,null);var r=A(q,2,null);q=A(q,3,null);return iqa(a,c,e,h,b,m,r,q);default:return fi}},oqa=function(a,b){var c=Zh.j(Nh.J(function(h){return B.j(b,h)}),Nh.J(function(h){return HS?HS(h,b):mqa(h,b)}));c=Zi.N(fi,c,xR.J(a));var e=Pe(c);e=Yj(e,nqa);c=Zi.N(fi,Zh.j(ci.J(function(h){return x.j(Ez,Q.J(h))}),$h(function(h){h=wS.J(h);var m=t(h);return g(g(m)?JR.J(m):m)?Yp.qa(h,0,I,JR,!1):h})),c);return zp(Yg.U(y([I.N(I.N(a,Q,Ez),wS,
c),e])),IS)},pqa=function(a,b){var c=Nh.j(function(h){return HS?HS(h,b):mqa(h,b)},Nh.j(function(h){return B.j(b,h)},xR.J(a))),e=JS.J(a);c=aqa(e,nt.j(wS,c));return zp(I.N(I.N(a,Q,Ez),wS,c),IS)},mqa=function(a){switch(arguments.length){case 1:return HS(arguments[0],F);case 2:return HS(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",k.J(arguments.length)].join(""));}},HS=function(a,b){var c=G(a),e=B.j(c,Q),h=B.j(c,KS);switch(e instanceof D?e.na:null){case "group":case "frame":return oqa(c,
b);case "bool":return pqa(c,b);case "rect":case "circle":case "image":case "text":a:switch(e instanceof D?e.na:null){case "circle":a=dqa(c);break a;default:a=lqa(c)}b=function(){var q=tS.j(c,sQ.aa());q=g(rS.J(c))?wQ(q,XP(-1,1)):q;return g(sS.J(c))?wQ(q,XP(1,-1)):q}();var m=null!=b?jS(a,AQ(VQ(c),b)):a;return zp(function(){var q=I.N(I.N(c,Q,Ez),wS,m);return x.j(LS,e)?I.N(q,MS,h):q}(),IS);default:return c}},OS=function(a,b){var c=Zh.U(Nh.J(xh(B,b)),ci.J(Zh.j(fc,DR)),Jo.J(NS),y([Nh.J(function(e){return HS(e,
b)}),Nh.J(wS)]));c=Zi.N(fi,c,xR.J(a));return aqa(JS.J(a),c)},qqa=function(a,b){return Yp.N(a,at,function(c){return nt.j(function(e){return Yp.ba(Yp.ba(Yp.ba(Yp.ba(e,PS,QS,b),RS,QS,b),SS,QS,b),TS,QS,b)},c)})},rqa=function(a,b){return Yp.N(a,US,function(c){return nt.j(function(e){return Yp.ba(e,VS,QS,b)},c)})},XS=function(a,b){return WS(Of,a,b)},WS=function(a,b,c){return HK(function(e){var h=(h=df(e))?a.J?a.J(e):a(e):h;return g(h)?b.J?b.J(e):b(e):e},c)},YS=function(a,b){return p(ci.j(a,bi(df,fq,b)))},
sqa=function(a){return"string"===typeof ZH.J(a)&&Xj.j(ZH.J(a),"")},tqa=function(a){return x.j("paragraph",Q.J(a))},aT=function(a){return FR.J(a)&&x.j(ZS,$S.J(a))},cT=function(a){return FR.J(a)&&x.j(bT,$S.J(a))},uqa=function(a){var b=FR.J(a);return b?(a=$S.J(a),x.j(ZS,a)||x.j(bT,a)):b},vqa=function(a){a=G(a);var b=B.j(a,dT);a=function(){var e=zo(eT.J(b),0);return g(e)?e:0}();var c=function(){var e=zo(fT.J(b),0);return g(e)?e:0}();return new K(null,2,5,M,[a,c],null)},wqa=function(a){var b=G(a);a=B.j(b,
gT);var c=G(a),e=B.j(c,hT),h=B.j(c,iT);a=B.j(c,jT);c=B.j(c,kT);b=B.j(b,lT);e=g(e)?e:0;h=g(h)?h:0;a=g(a)?a:0;c=g(c)?c:0;return x.j(b,mT)?new K(null,4,5,M,[e,h,a,c],null):new K(null,4,5,M,[e,h,e,h],null)},zqa=function(a){a=G(a);a=B.j(a,nT);return x.j(xqa,a)||x.j(yqa,a)},pT=function(a){a=oT.J(a);return g(a)?a:0},Aqa=function(a,b,c){var e=A(b,0,null);b=A(b,1,null);var h=A(c,0,null);c=A(c,1,null);return pT(b)>pT(c)?1:pT(b)<pT(c)?-1:g(function(){var m=e<h;return m?a:m}())?-1:g(function(){var m=e>h;return m?
a:m}())?1:e<h?1:e>h?-1:0},Bqa=function(a,b){function c(e){return x.j(Q.J(e),qT)?Yp.ba(e,ep,QS,b):e}return Yp.N(Yp.N(a,rT,function(e){return nt.j(c,e)}),sT,function(e){return nt.j(c,e)})},Dqa=function(a){var b=G(new f(null,1,[tT,!0],null)),c=B.N(b,tT,!1);b=B.N(b,Cqa,!1);b=g(b)?xh(Jo,Zh.j(Ye,xR)):Of;c=y([tT,c]);var e=G(a);a=B.j(e,uT);e=B.j(e,vT);c=G(c);c=B.N(c,tT,!1);e=x.j(e,LI)?yk(LI,uo):yk(uo,LI);c=g(c)?xh(kI,Zh.j(e,Oe)):Of;a=Nh.j(Oe,c.J?c.J(a):c(a));return b.J?b.J(a):b(a)},Eqa=function(a,b){return Yp.ba(a,
uT,sm,function(c){return Yp.N(c,xR,function(e){return Zi.N(fi,Fh(b),e)})})},wT=function(a,b,c,e,h,m,q,r){this.Vc=a;this.Uc=b;this.Tc=c;this.cd=e;this.bd=h;this.ga=m;this.W=q;this.ia=r;this.ea=2230716170;this.ka=139264},xT=function(a,b,c,e,h,m,q,r,u,w,z){this.order=a;this.type=b;this.Ub=c;this.origin=e;this.transform=h;this.Oa=m;this.rotation=q;this.center=r;this.ga=u;this.W=w;this.ia=z;this.ea=2230716170;this.ka=139264},Fqa=function(a){return!Eo(a?.x??B.j(a,ZP))||!Eo(a?.y??B.j(a,YP))},Gqa=function(a){return!Eo((a?.x??
B.j(a,ZP))-1)||!Eo((a?.y??B.j(a,YP))-1)},Hqa=function(a,b){if(Ye(a))return new K(null,1,5,M,[b],null);var c=We(a),e=c?.type??B.j(c,Q),h=b?.type??B.j(b,Q);return x.j(yT,e)&&x.j(yT,h)?(e=c?.Ub??B.j(c,co),b=b?.Ub??B.j(b,co),b=bQ(e,b),c=I.N(c,co,b),a=Xe(a),Fqa(c?.Ub??B.j(c,co))?hg.j(a,c):a):hg.j(a,b)},zT=function(){return new wT(0,fi,fi,fi,fi,null,null,null)},Iqa=function(a,b){var c=a?a:zT();a=(c?.Vc??B.j(c,AT))+1;c=I.N(c,AT,a);return Fqa(b)?Yp.ba(c,BT,Hqa,new xT(a,yT,b,null,null,null,null,null,null,
null,null)):c},CT=function(a){return Iqa(zT(),a)},Jqa=function(a,b){var c=b?.type??B.j(b,Q);c=c instanceof D?c.na:null;switch(c){case "move":return tQ(xQ.J(b?.Ub??B.j(b,co)),a);case "resize":var e=b?.transform??B.j(b,tS);c=b?.Oa??B.j(b,uS);var h=b?.Ub??B.j(b,co);b=b?.origin??B.j(b,DT);b=null!=c?jQ(b,c):b;var m=sQ.aa();e=null!=e?tQ(m,e):m;e=zQ(e,b);h=tQ(e,vQ.J(h));h=zQ(h,dQ(b));c=null!=c?tQ(h,c):h;return tQ(c,a);case "rotation":return c=b?.center??B.j(b,ET),h=b?.rotation??B.j(b,FT),tQ(zQ(tQ(zQ(sQ.aa(),
c),nS.J(h)),dQ(c)),a);default:throw Error(["No matching clause: ",k.J(c)].join(""));}},Kqa=function(a){return qc(Jqa,sQ.aa(),a)},Lqa=function(a){a=zh.j(a?.Uc??B.j(a,GT),a?.Tc??B.j(a,BT));a=kI.j(function(b){return b?.order??B.j(b,Kq)},a);return Kqa(a)},Mqa=function(a,b){var c=k.J(rQ.J(B.N(b,HT,14))*a);a=k.J(rQ.J(B.N(b,IT,0))*a);return Ip(b,new f(null,2,[HT,c,IT,a],null))},Nqa=function(a,b){a=k.J(rQ.J(B.N(b,HT,14))*a);return Ip(b,new f(null,1,[HT,a],null))},Oqa=function(a,b){function c(q,r){var u=r?.type??
B.j(r,Q);switch(u instanceof D?u.na:null){case "rotation":var w=r?.value??B.j(r,ep);return Yp.N(q,FT,function(E){return(((g(E)?E:0)+w)%360+360)%360});case "add-children":var z=r?.value??B.j(r,ep),C=r?.index??B.j(r,qR);q=null!=C?Yp.N(q,xR,function(E){return ff(E)?Mp(E,C,z):Lp.U(E,y([z]))}):Yp.ba(q,xR,Lp,z);return Yp.N(q,xR,function(E){return Zi.j(fi,Pg(JT,E))});case "remove-children":return z=r?.value??B.j(r,ep),Yp.ba(q,xR,e,z);case "scale-content":return z=r?.value??B.j(r,ep),h(q,z);case "change-property":return u=
r?.property??B.j(r,uu),z=r?.value??B.j(r,ep),I.N(q,u,z);default:return q}}function e(q,r){r=gk(r);return gi(Zh.j(fc,r),q)}function h(q,r){r=Ao(r);var u=vR(q)?Yp.ba(q,wS,m,r):q;var w=null!=BS.J(u)&&0<BS.J(u)?Yp.ba(u,BS,QS,r):u;u=null!=CS.J(u)&&0<CS.J(u)?Yp.ba(Yp.ba(Yp.ba(Yp.ba(w,CS,QS,r),DS,QS,r),ES,QS,r),FS,QS,r):w;u=op(US.J(q))?rqa(u,r):u;u=op(at.J(q))?qqa(u,r):u;u=null!=TS.J(q)?jn.ba(u,new K(null,2,5,M,[TS,ep],null),QS,r):u;u=aT(q)?Cp(Cp(Cp(Cp(Cp(Cp(u,new K(null,2,5,M,[dT,eT],null),QS,y([r])),new K(null,
2,5,M,[dT,fT],null),QS,y([r])),new K(null,2,5,M,[KT,bM],null),QS,y([r])),new K(null,2,5,M,[KT,$L],null),QS,y([r])),new K(null,2,5,M,[KT,LT],null),QS,y([r])),new K(null,2,5,M,[KT,MT],null),QS,y([r])):u;q=cT(q)?Bqa(u,r):u;return Cp(Cp(Cp(Cp(Fp(Fp(Fp(Fp(q,NT,QS,y([r])),OT,QS,y([r])),PT,QS,y([r])),QT,QS,y([r])),new K(null,2,5,M,[gT,hT],null),QS,y([r])),new K(null,2,5,M,[gT,iT],null),QS,y([r])),new K(null,2,5,M,[gT,jT],null),QS,y([r])),new K(null,2,5,M,[gT,kT],null),QS,y([r]))}function m(q,r){return WS(tqa,
xh(Nqa,r),WS(sqa,xh(Mqa,r),q))}a=qc(c,a,b?.cd??B.j(b,RT));return qc(c,a,b?.bd??B.j(b,ST))},Pqa=function(a){return $P(a)&&Pp(a?.x??B.j(a,ZP),a?.y??B.j(a,YP))},Qqa=function(a,b){if(null!=a&&Pqa(b)){var c=a?.x??B.j(a,ZP),e=a?.y??B.j(a,YP),h=a?.width??B.j(a,xz);a=a?.height??B.j(a,DQ);var m=b?.x??B.j(b,ZP);b=b?.y??B.j(b,YP);return KQ.ba(yo(c)?m+c:c,yo(e)?b+e:e,h,a)}return a},Rqa=function(a,b){return Pqa(b)?nt.j(function(c){return bQ(c,b)},a):a},Sqa=function(a,b){if(null!=a){var c=b?.x??B.j(b,ZP),e=b?.y??
B.j(b,YP);return Pp(c,e)?nt.j(function(h){return Yp.ba(Yp.ba(h,ZP,wy,c),YP,wy,e)},a):a}return null},Tqa=function(a,b){if(null!=a){var c=b?.e??B.j(b,ky),e=b?.f??B.j(b,yE);return Pp(c,e)?nt.j(function(h){return Yp.ba(Yp.ba(h,ZP,wy,c),YP,wy,e)},a):a}return null},UT=function(a,b){var c=TT,e=VQ(a);return c(a,b,g(e)?e:XP(0,0))},TT=function(a,b,c){var e=G(a),h=B.j(e,rS);a=B.j(e,sS);e=B.j(e,tS);b=G(b);b=B.j(b,Uqa);var m=yQ(sQ.aa(),c);e=null!=e?uQ.j(m,e):m;h=g(g(h)?b:h)?wQ(e,XP(-1,1)):e;a=g(g(a)?b:a)?wQ(h,
XP(1,-1)):h;return yQ(a,dQ(c))},VT=function(a,b){var c=G(a),e=B.j(c,tS),h=B.j(c,rS),m=B.j(c,sS);a=G(b);var q=B.j(a,Uqa);return g(function(){var r=null!=c;if(r){if(r=null!=e)return r;r=g(q)?h:q;return g(r)?r:g(q)?m:q}return r}())?""+(UT(c,a)??""):""},Vqa=function(a,b){var c=Ie(a,0),e=Ie(a,1);a=Ie(a,3);e=Do((e?.x??B.j(e,ZP))-(c?.x??B.j(c,ZP)),(e?.y??B.j(e,YP))-(c?.y??B.j(c,YP)));c=Do((c?.x??B.j(c,ZP))-(a?.x??B.j(a,ZP)),(c?.y??B.j(c,YP))-(a?.y??B.j(a,YP)));null!=b?(a=b?.x??B.j(b,ZP),b=b?.y??B.j(b,YP),
b=Qp(a,b,e,c)?KQ.ba(a-e/2,b-c/2,e,c):null):b=null;return b},Wqa=function(a,b,c){var e=A(a,0,null),h=A(a,1,null);A(a,2,null);var m=A(a,3,null);a=Fo(c?.x1??B.j(c,GQ));var q=Fo(c?.y1??B.j(c,HQ)),r=Fo(c?.x2??B.j(c,EQ)),u=Fo(c?.y2??B.j(c,FQ)),w=(q-u)*a-(q-u)*r+(q-q)*a;if(0===w)a=null;else{c=Fo(e?.x??B.j(e,ZP));var z=Fo(h?.x??B.j(h,ZP)),C=Fo(m?.x??B.j(m,ZP));e=Fo(e?.y??B.j(e,YP));h=Fo(h?.y??B.j(h,YP));m=Fo(m?.y??B.j(m,YP));var E=(q-u)/w,H=(a-r)/w,J=(r*u-a*q)/w,O=(u-q)/w,P=(a-a)/w;u=(a*q-a*u)/w;var W=(q-
q)/w,V=(r-a)/w;a=(a*q-r*q)/w;a=sQ.sa(c*E+z*O+C*W,e*E+h*O+m*W,c*H+z*P+C*V,e*H+h*P+m*V,c*J+z*u+C*a,e*J+h*u+m*a)}b=null!=a?tQ(tQ(Doa(b),a),xQ.J(b)):null;return qQ(b)?Coa(b)?YQ:b:null},Xqa=function(a,b){if(Eo((b?.a??B.j(b,gQ))-1)&&Eo(b?.b??B.j(b,hQ))&&Eo(b?.c??B.j(b,iQ))&&Eo((b?.d??B.j(b,gy))-1)){var c=a?.type??B.j(a,Q),e=XQ(a?.points??B.j(a,SQ),b),h=a?.bb??B.j(a,UQ);var m=h?.x1??B.j(h,GQ);var q=h?.y1??B.j(h,HQ),r=h?.x2??B.j(h,EQ);h=h?.y2??B.j(h,FQ);r=XP(r,h);h=woa(XP(m,q),b);q=woa(r,b);m=ZP.J(h);r=YP.J(h);
h=ZP.J(q);q=YP.J(q);m=KQ.ba(Math.min(m,h),Math.min(r,q),Math.abs(m-h),Math.abs(r-q));a=vc(a);a=x.j(c,WT)?Yp.ba(a,XT,jS,b):a;a=x.j(c,ZH)?Yp.ba(a,YT,Tqa,b):a;b=x.j(c,Ez)?Yp.ba(a,wS,jS,b):Bd(Bd(Bd(Bd(a,ZP,m?.x??B.j(m,ZP)),YP,m?.y??B.j(m,YP)),xz,m?.width??B.j(m,xz)),DQ,m?.height??B.j(m,DQ));b=Bd(Bd(b,UQ,m),SQ,e)}else e=XQ(a?.points??B.j(a,SQ),b),c=vc(a),q=c?.points??B.j(c,SQ),r=Ie(q,0),m=Ie(e,0),a=kQ(r,Ie(q,1)),h=kQ(m,Ie(e,1)),a=xoa(a,h),q=kQ(r,Ie(q,3)),m=kQ(m,Ie(e,3)),m=xoa(q,m),c=0>a?cj.N(c,rS,fc(c.flip_x)):
c,c=0>a?cj.N(c,FT,-c.rotation):c,c=0>m?cj.N(c,sS,fc(c.flip_y)):c,r=0>m?cj.N(c,FT,-c.rotation):c,a=TQ(e),c=Vqa(e,a),a=Wqa(e,a,c),m=null!=a?Eoa(a):null,null==m||null==a?b=r:(h=r?.type??B.j(r,Q),q=((Op(FT.J(r),0)+Op(B.j(B.j(r,ZT),FT),0))%360+360)%360,r=x.j(h,WT)?Yp.ba(r,XT,jS,b):r,b=x.j(h,Ez)?Yp.ba(r,wS,jS,b):Bd(Bd(Bd(Bd(r,ZP,c?.x??B.j(c,ZP)),YP,c?.y??B.j(c,YP)),xz,c?.width??B.j(c,xz)),DQ,c?.height??B.j(c,DQ)),b=Bd(Bd(Bd(Bd(Bd(b,tS,a),uS,m),UQ,c),SQ,e),FT,q));return b},Yqa=function(a,b){a=G(a);var c=
B.j(a,UQ),e=B.j(a,$T),h=new f(null,4,[ZP,ZP.j(b,0)-ZP.j(c,0),YP,YP.j(b,0)-YP.j(c,0),xz,xz.j(b,1)-xz.j(c,1),DQ,DQ.j(b,1)-DQ.j(c,1)],null);return null!=e&&null!=c&&null!=b?Yp.N(a,$T,function(m){return Yp.ba(Yp.ba(Yp.ba(Yp.ba(m,ZP,wy,ZP.J(h)),YP,wy,YP.J(h)),xz,wy,xz.J(h)),DQ,wy,DQ.J(h))}):a},aU=function(a,b){var c=ai(SQ,y([b]));b=TQ(c);c=Ye(c)?SQ.J(a):c;c=WQ(c,b,uS.j(a,sQ.aa()));b=WQ(IQ(LQ(c)),b,tS.j(a,sQ.aa()));c=AQ(TQ(b),uS.j(a,sQ.aa()));c=LQ(XQ(b,c));return Xqa(I.N(I.N(I.N(I.N(Yqa(a,c),UQ,c),SQ,b),
rS,!1),sS,!1),sQ.aa())},Zqa=function(a,b,c){c=OS(a,c);a=I.N(a,XT,c);var e=Qpa(a,c);c=A(e,0,null);e=A(e,1,null);return null!=e&&op(c)?I.N(I.N(a,UQ,e),SQ,c):aU(a,b)},$qa=function(a){var b=G(a);a=B.j(b,ZP);var c=B.j(b,YP),e=B.j(b,xz);b=B.j(b,DQ);return KQ.ba(a,c-b,e,b)},bU=function(a){var b=ai(Zh.j(IQ,$qa),y([YT.J(a)]));return p(b)?LQ(b):a?.bb??B.j(a,UQ)},ara=function(a,b){return!uh(He(gi(function(c){var e=G(a),h=B.j(e,ZP);e=B.j(e,YP);var m=A(c,0,null),q=G(m);m=B.j(q,ZP);q=B.j(q,YP);c=A(c,1,null);var r=
G(c);c=B.j(r,ZP);r=B.j(r,YP);return q<=e&&r>e||q>e&&r<=e?h<m+(e-q)/(r-q)*(c-m):!1},b)))},cU=function(a,b,c,e){var h=YP.J(b)-YP.J(a);b=ZP.J(a)-ZP.J(b);a=h*ZP.J(a)+b*YP.J(a);var m=YP.J(e)-YP.J(c);e=ZP.J(c)-ZP.J(e);c=m*ZP.J(c)+e*YP.J(c);var q=h*e-m*b;q=Eo(q)?.001:q;return XP((e*a-b*c)/q,(c*h-a*m)/q)},dU=function(a,b){var c=A(a,0,null),e=A(a,1,null);A(a,2,null);A(a,3,null);return lQ(mQ(cQ(e,c)),b)},eU=function(a,b){var c=A(a,0,null);A(a,1,null);A(a,2,null);a=A(a,3,null);return lQ(mQ(cQ(a,c)),b)},bra=
function(a){var b=A(a,0,null),c=A(a,1,null);A(a,2,null);A(a,3,null);return null!=b&&null!=c?(a=fQ(cQ(c,b)),.01>a?.01:a):null},cra=function(a){var b=A(a,0,null);A(a,1,null);A(a,2,null);a=A(a,3,null);return null!=b&&null!=a?(b=fQ(cQ(a,b)),.01>b?.01:b):null},dra=function(a,b,c){var e=A(b,0,null),h=A(b,1,null);b=cQ(h,e);a=cU(a,bQ(a,c),e,h);return Eo(ZP.J(b))?Eo(YP.J(b))?0:(YP.J(a)-YP.J(e))/YP.J(b):(ZP.J(a)-ZP.J(e))/ZP.J(b)},era=function(a){var b=A(a,0,null),c=A(a,1,null);A(a,2,null);var e=A(a,3,null);
return(a=x.j(He(a),4))?(c=cQ(c,b),b=cQ(e,b),Eo(YP.J(c))&&Eo(ZP.J(b))&&0<ZP.J(c)&&0<YP.J(b)):a},fra=function(a,b){var c=A(b,0,null),e=A(b,1,null);A(b,2,null);var h=A(b,3,null);if(Ye(a))return b;if(era(a)&&era(b))return a;var m=new K(null,2,5,M,[c,e],null),q=new K(null,2,5,M,[c,h],null),r=cQ(e,c),u=cQ(h,c);e=qc(function(H,J){var O=A(H,0,null),P=A(H,1,null),W=A(H,2,null);H=A(H,3,null);var V=dra(J,m,u);J=dra(J,q,r);return new K(null,4,5,M,[Math.min(O,V),Math.max(P,V),Math.min(W,J),Math.max(H,J)],null)},
new K(null,4,5,M,[Infinity,-Infinity,Infinity,-Infinity],null),ci.j(function(H){var J=yo(ZP.J(H));return g(J)?yo(YP.J(H)):J},a));a=A(e,0,null);var w=A(e,1,null);b=A(e,2,null);var z=A(e,3,null);e=bQ(c,lQ(u,b));h=bQ(e,r);a=bQ(c,lQ(r,a));b=bQ(a,u);z=bQ(c,lQ(u,z));var C=bQ(z,r);w=bQ(c,lQ(r,w));var E=bQ(w,u);c=cU(e,h,a,b);e=cU(e,h,w,E);h=cU(z,C,w,E);a=cU(z,C,a,b);return new K(null,4,5,M,[c,e,h,a],null)},gra=function(a,b){var c=A(b,0,null),e=A(b,1,null),h=A(b,2,null);A(b,3,null);A(a,0,null);b=A(a,1,null);
A(a,2,null);A(a,3,null);a=cQ(e,c);e=cU(b,bQ(b,a),e,h);return cQ(e,b)},hra=function(a,b){var c=A(b,0,null),e=A(b,1,null);A(b,2,null);b=A(b,3,null);A(a,0,null);A(a,1,null);A(a,2,null);a=A(a,3,null);e=cQ(e,c);c=cU(a,bQ(a,e),c,b);return cQ(c,a)},ira=function(a,b){var c=A(b,0,null),e=A(b,1,null);A(b,2,null);var h=A(b,3,null);b=A(a,0,null);A(a,1,null);A(a,2,null);A(a,3,null);a=cQ(h,c);c=cU(b,bQ(b,a),c,e);return cQ(c,b)},jra=function(a,b){var c=A(b,0,null);A(b,1,null);var e=A(b,2,null),h=A(b,3,null);A(a,
0,null);A(a,1,null);b=A(a,2,null);A(a,3,null);a=cQ(h,c);e=cU(b,bQ(b,a),e,h);return cQ(e,b)},kra=function(a,b){var c=A(b,0,null),e=A(b,1,null);A(b,2,null);var h=A(b,3,null);A(a,0,null);b=A(a,1,null);A(a,2,null);A(a,3,null);a=cQ(e,c);c=bQ(c,lQ(a,.5));h=bQ(h,lQ(a,.5));c=cU(b,bQ(b,a),c,h);return cQ(c,b)},lra=function(a,b){var c=A(b,0,null),e=A(b,1,null),h=A(b,2,null);A(b,3,null);A(a,0,null);b=A(a,1,null);A(a,2,null);A(a,3,null);a=cQ(h,e);c=bQ(c,lQ(a,.5));e=bQ(e,lQ(a,.5));e=cU(b,bQ(b,a),c,e);return cQ(e,
b)},fU=function(a,b,c){a=x.j(ZP,a)?hra:x.j(YP,a)?ira:null;return a.j?a.j(b,c):a(b,c)},gU=function(a,b,c){a=x.j(ZP,a)?gra:x.j(YP,a)?jra:null;return a.j?a.j(b,c):a(b,c)},mra=function(a,b,c){a=x.j(ZP,a)?kra:lra;return a.j?a.j(b,c):a(b,c)},hU=function(a,b,c,e){c=voa(a,c);e=voa(b,e);a=(g(Go(c,e))?1:-1)*fQ(a);return Eo(a)?b:cQ(b,lQ(mQ(b),a))},iU=function(a,b){var c=A(b,0,null),e=A(b,1,null);A(b,2,null);b=A(b,3,null);return x.j(a,ZP)?cQ(e,c):cQ(b,c)},nra=function(a,b,c,e){function h(m,q){return"number"===
typeof m&&"number"===typeof q?Ao(m-q)<e:null}return"number"===typeof b&&"number"===typeof c?h(b,c):x.j(a,UQ)?sh(function(m){return h(B.j(b,m),B.j(c,m))},new K(null,8,5,M,[ZP,YP,GQ,HQ,EQ,FQ,xz,DQ],null)):x.j(a,SQ)?sh(function(m){var q=h(ZP.J(t(m)),ZP.J(Oe(m)));return g(q)?h(YP.J(t(m)),YP.J(Oe(m))):q},Nh.N(Jp,b,c)):x.j(a,YT)?sh(function(m){var q=h(ZP.J(t(m)),ZP.J(Oe(m)));return g(q)?h(YP.J(t(m)),YP.J(Oe(m))):q},Nh.N(Jp,b,c)):x.j(b,c)},jU=function(a,b){return wR(a)?b+Math.sqrt(2*b*b):Math.sqrt(2*b*b)},
kU=function(a,b,c){return rh(Zh.N(Jo.J(DR),ci.J(function(e){return x.j(a.J?a.J(e):a(e),b)}),Nh.J(function(e){return new f(null,3,[R,"filter_"+(R.J(e)??""),Q,b,wq,e],null)})),c)},nU=function(a){return Lp.U(new K(null,1,5,M,[new f(null,2,[R,"BackgroundImageFix",Q,ora],null)],null),y([kU(T,lU,at.J(a)),new K(null,1,5,M,[new f(null,2,[R,"shape",Q,pra],null)],null),kU(T,qra,at.J(a)),kU(Q,mU,new eg(null,TS.J(a),null,1,null))]))},rra=function(a,b){var c=a?.x??B.j(a,ZP),e=a?.y??B.j(a,YP),h=a?.width??B.j(a,
xz);a=a?.height??B.j(a,DQ);b=wq.J(b);var m=G(b);b=B.N(m,PS,0);var q=B.N(m,RS,0),r=B.N(m,TS,0);m=B.N(m,SS,0);return KQ.ba(Math.min(c,c+b+-m+-r+-5),Math.min(e,e+q+-m+-r+-5),h+Ao(b)+2*m+2*r+10,a+Ao(q)+2*m+2*r+10)},oU=function(a,b,c){var e=Zh.j(ci.J(function(h){return x.j(lU,Q.J(h))}),Nh.J(xh(rra,a)));c*=2;return Yp.ba(Yp.ba(Yp.ba(Yp.ba(Yp.ba(Yp.ba(Yp.ba(Yp.ba(OQ(Zi.N(new K(null,1,5,M,[a],null),e,b)),ZP,kJ,c),YP,kJ,c),GQ,kJ,c),HQ,kJ,c),EQ,wy,c),FQ,wy,c),xz,wy,2*c),DQ,wy,2*c)},sra=function(a){if(NS.J(a)&&
Xj.j(pU,B.j(B.j(a,wS),ko)))return a?.bb??B.j(a,UQ);var b=nU(a);var c=ep.J(TS.J(a));c=g(c)?c:0;a=LQ(a?.points??B.j(a,SQ));return oU(a,b,c)},tra=function(a,b){var c=US.J(a);c=qc(NQ,0,Nh.j(function(e){var h=B.N(e,qU,ET);switch(h instanceof D?h.na:null){case "center":return VS.j(e,0)/2;case "outer":return VS.j(e,0);default:return 0}},c));b=g(b)?0:jU(a,c);c=qc(NQ,0,Nh.j(function(e){var h=T.j(e,lU);switch(h instanceof D?h.na:null){case "drop-shadow":return Ao(PS.J(e))+2*SS.J(e)+2*TS.J(e)+10;default:return 0}},
Jo.j(DR,at.J(a))));a=qc(NQ,0,Nh.j(function(e){var h=T.j(e,lU);switch(h instanceof D?h.na:null){case "drop-shadow":return Ao(RS.J(e))+2*SS.J(e)+2*TS.J(e)+10;default:return 0}},Jo.j(DR,at.J(a))));return new f(null,2,[rU,Math.ceil(b+c),sU,Math.ceil(b+a)],null)},ura=function(a,b){var c=sra(a);b=tra(a,b);a=rU.J(b);b=sU.J(b);return Yp.ba(Yp.ba(Yp.ba(Yp.ba(Yp.ba(Yp.ba(Yp.ba(Yp.ba(c,ZP,kJ,a),GQ,kJ,a),EQ,wy,a),YP,kJ,b),HQ,kJ,b),FQ,wy,b),xz,wy,2*a),DQ,wy,2*b)},tU=function(a){if(null!=a&&null!=a.bm)a=a.bm(a);
else{var b=tU[ha(null==a?null:a)];if(null!=b)a=b.J?b.J(a):b(a);else if(b=tU._,null!=b)a=b.J?b.J(a):b(a);else throw nc("IState.-rejected?",a);}return a},uU=function(a){if(null!=a&&null!=a.$l)a=a.$l(a);else{var b=uU[ha(null==a?null:a)];if(null!=b)a=b.J?b.J(a):b(a);else if(b=uU._,null!=b)a=b.J?b.J(a):b(a);else throw nc("IState.-pending?",a);}return a},vU=function(a){if(null!=a&&null!=a.Ai)a=a.Ai(a);else{var b=vU[ha(null==a?null:a)];if(null!=b)a=b.J?b.J(a):b(a);else if(b=vU._,null!=b)a=b.J?b.J(a):b(a);
else throw nc("IPromiseFactory.-promise",a);}return a},wU=function(a){if(null!=a&&null!=a.Pl)a=a.Pl(a);else{var b=wU[ha(null==a?null:a)];if(null!=b)a=b.J?b.J(a):b(a);else if(b=wU._,null!=b)a=b.J?b.J(a):b(a);else throw nc("ICancellable.-cancelled?",a);}return a},xU=function(a,b){if(null!=a&&null!=a.Rl)a=a.Rl(a,b);else{var c=xU[ha(null==a?null:a)];if(null!=c)a=c.j?c.j(a,b):c(a,b);else if(c=xU._,null!=c)a=c.j?c.j(a,b):c(a,b);else throw nc("ICompletable.-resolve!",a);}return a},yU=function(a,b){if(null!=
a&&null!=a.Ql)a=a.Ql(a,b);else{var c=yU[ha(null==a?null:a)];if(null!=c)a=c.j?c.j(a,b):c(a,b);else if(c=yU._,null!=c)a=c.j?c.j(a,b):c(a,b);else throw nc("ICompletable.-reject!",a);}return a},vra=function(){},zU=function(a,b){if(null!=a&&null!=a.Yj)a.Yj(a,b);else{var c=zU[ha(null==a?null:a)];if(null!=c)c.j?c.j(a,b):c(a,b);else if(c=zU._,null!=c)c.j?c.j(a,b):c(a,b);else throw nc("IExecutor.-exec!",a);}},AU=function(a,b,c){if(null!=a&&null!=a.Zl)a.Zl(a,b,c);else{var e=AU[ha(null==a?null:a)];if(null!=
e)e.N?e.N(a,b,c):e(a,b,c);else if(e=AU._,null!=e)e.N?e.N(a,b,c):e(a,b,c);else throw nc("IScheduler.-schedule!",a);}},EU=function(a,b,c){a[BU]!==b&&a[BU]===CU&&(a[BU]=b,a[DU]=c,wra(a))},HU=function(a,b,c){void 0!==a.complete&&(c?a.complete(null,c):a.type===xra?a.complete(b,null):a.type===FU?b instanceof GU?b.handle((e,h)=>{HU(a,e,h)}):ja(b)&&IU(b.then)?b.then(e=>{HU(a,e,null)},e=>{HU(a,null,e)}):a.complete(b,null):a.type===yra?b instanceof GU?b.handle((e,h)=>{a.complete(e,h)}):ja(b)&&IU(b.then)?b.then(e=>
{a.complete(e,null)},e=>{a.complete(null,e)}):a.complete(null,new TypeError("expected thenable")):a.complete(null,new TypeError("internal: invalid resolve type")))},wra=function(a){if(0!==a[JU].length)for(var b=a[BU],c=a[DU],e,h,m;a[JU].length;){e=a[JU].shift();try{b===KU?h=e.resolve(c):b===LU?h=e.reject(c):m=new TypeError("invalid state")}catch(q){m=q}HU(e,h,m)}},MU=function(a){a[BU]!==CU&&zra(wra,a)},Ara=function(a){return(b,c)=>{c?a.reject(c):a.resolve(b)}},IU=function(a){return"function"===typeof a},
Cra=function(a,b){var c=vU;const e=new GU;a[JU].push({type:yra,resolve:c??Bra,reject:b??NU,complete:Ara(e)});MU(a);return e},OU=function(a){if(null===a)return Dra;const b=new GU;b[BU]=KU;b[DU]=a;return b},Era=function(a){const b=new GU;b[BU]=LU;b[DU]=a;return b},Fra=function(a){if(a instanceof GU)return a;if(ja(a)&&IU(a.then)){const b=new GU;a.then(c=>{b.resolve(c)},c=>{b.reject(c)});return b}return a instanceof Error?Era(a):OU(a)},Pra=function(a){if(x.j(null,a))return l(PU);if(x.j(Gra,a))return l(Hra);
if(x.j(so,a))return l(PU);if(x.j(Ira,a))return l(Jra);if(x.j(Kra,a)||x.j(Lra,a)||x.j(Mra,a))return l(PU);if(x.j(Nra,a))return l(Jra);if(x.j(Ora,a))return l(PU);if(null!=a?Zd===a.Sl||(a.Pc?0:lc(vra,a)):lc(vra,a))return a;if(al(a))return Pra(l(a));throw new TypeError("invalid executor");},QU=function(a){var b=Qra;a=(Se(a),a);zU(Pra(b),a)},Sra=function(a,b,c){a=null==a||x.j(so,a)?l(Rra):al(a)?l(a):a;AU(a,b,c)},Tra=function(){},RU=function(a){for(var b=[],c=arguments.length,e=0;;)if(e<c)b.push(arguments[e]),
e+=1;else break;b=0<b.length?new ge(b.slice(0),0,null):null;b=G(b);B.N(b,Ura,1);return new Tra},PP=function(a){this.Xo=a;this.ea=393216;this.ka=0},TU=function(){return new PP(F)},SU=function(a){this.Yo=a;this.ea=393216;this.ka=0},VU=function(){return new SU(F)},Vra=function(a){var b=a.lastIndexOf(".");return a.slice(0,0<b?b:0)},YU=function(a,b){b=WU.J?WU.J(b):WU(b);a:{var c=XU.get(a);if(0<c)a=c;else for(c=Vra(a);;){var e=XU.get(c);if(null!=e){XU.set(a,e);a=e;break a}if(x.j("",c)){XU.set(a,100);a=
100;break a}c=Vra(c)}}return b>=a},Wra=function(a){a=a instanceof D?a.na:null;switch(a){case "error":return"#c82829";case "warn":return"#f5871f";case "info":return"#4271ae";case "debug":return"#969896";case "trace":return"#8e908c";default:throw Error(["No matching clause: ",k.J(a)].join(""));}},Xra=function(a){a=a instanceof D?a.na:null;switch(a){case "debug":return"DBG";case "trace":return"TRC";case "info":return"INF";case "warn":return"WRN";case "error":return"ERR";default:throw Error(["No matching clause: ",
k.J(a)].join(""));}},WU=function(a){a=a instanceof D?a.na:null;switch(a){case "trace":return 10;case "debug":return 20;case "info":return 30;case "warn":return 40;case "error":return 50;default:throw Error(["No matching clause: ",k.J(a)].join(""));}},ZU=function(a){a=p(a);for(var b=fi;;){var c=t(a);if(g(c)){var e=c;c=A(e,0,null);e=A(e,1,null);qg(c)?(a=v(a),b=hg.j(b,[kk(c),"\x3d",fl.U(y([e]))].join(""))):a=v(a)}else return $o(", ",b)}},Yra=function(a){return Gh(function(b){var c=A(b,0,null);b=A(b,
1,null);return rg(c)?x.j("js",og(c))?new K(null,3,5,M,[bs,kk(c),hc(b)?b:Zo(b)],null):x.j("error",og(c))?new K(null,3,5,M,[$r,kk(c),b],null):null:null},p(a))},$U=function(){return Date.now()},Zra=function(a){return xp(new f(null,6,[aV,bV.J(a),cV,dV.J(a),eV,fV.J(a),LS,MS.J(a),gV,hV.J(a),iV,jV.J(a)],null))},$ra=function(a){return xp(new f(null,6,[aV,kV.J(a),cV,lV.J(a),eV,mV.J(a),LS,nV.J(a),gV,oV.J(a),iV,pV.J(a)],null))},asa=function(a){return xp(new f(null,5,[aV,aV.J(aV.J(a)),cV,cV.J(aV.J(a)),eV,eV.J(aV.J(a)),
gV,R.J(aV.J(a)),iV,qV.J(aV.J(a))],null))},bsa=function(a){return xp(new f(null,5,[aV,aV.J(aV.J(wq.J(a))),cV,cV.J(aV.J(wq.J(a))),eV,eV.J(aV.J(wq.J(a))),gV,R.J(aV.J(wq.J(a))),iV,qV.J(aV.J(wq.J(a)))],null))},csa=function(a){return zh.U(Nh.j(Zra,rV.J(a)),Nh.j($ra,US.J(a)),y([Nh.j(asa,at.J(a)),x.j(Q.J(a),sR)?Nh.j(bsa,sV.J(a)):null,x.j(Q.J(a),ZH)?qc(function(b,c){var e=zh.j;c=zh.j(Nh.j(Zra,rV.J(c)),Nh.j($ra,US.J(c)));return e.call(zh,b,c)},je,YS(Of,wS.J(a))):null]))},dsa=function(a,b,c){a=csa(a);return th(function(e){return x.j(gV.J(e),
@ -3825,36 +3825,36 @@ B.j(m,ZP);r=m?.y??B.j(m,YP);u=q+(m?.width??B.j(m,xz));var w=r+(m?.height??B.j(m,
w;return ra?FR.j(z,b):ra}())?b:null==w?B.N(B.j(z,b),uV,tR):w,H=p(xR.J(a)),J=fi,O=fi,P=fi;;){if(Ye(H)){var W=function(){var ra=I.U(a,R,C,y([AR,b,uV,E]));ra=Ue(ra,new f(null,1,[nsa,R.J(a)],null));return null!=xR.J(a)?I.N(ra,xR,nt.j(R,J)):ra}();c=cT(W)?function(){var ra=Zi.N(F,Nh.J(function(){return function(sa){return new K(null,2,5,M,[nsa.J(Ve(sa)),R.J(sa)],null)}}(H,J,O,P,W,C,E,e,h,m,q,r,u,w,z)),O);return Eqa(W,ra)}():W;c=m.j?m.j(c,a):m(c,a);var V=Zi.j(new K(null,1,5,M,[c],null),O),Z=q.j?q.j(a,c):
q(a,c);Z=a===Z?P:Zi.j(new K(null,1,5,M,[Z],null),P);return new K(null,3,5,M,[c,V,Z],null)}V=t(H);V=B.j(c,V);Z=FR.J(a)?C:E;V=osa(V,C,c,y([yV,m,msa,q,zV,null,AV,u,uV,Z,BV,z]));var ba=A(V,0,null);Z=A(V,1,null);var qa=A(V,2,null);V=v(H);ba=Zi.j(J,new K(null,1,5,M,[ba],null));Z=Zi.j(O,Z);qa=Zi.j(P,qa);H=V;J=ba;O=Z;P=qa}},DV=function(a,b){return B.j(B.j(a,bR),b)},HV=function(a,b,c){c=G(c);var e=B.N(c,EV,!1),h=B.j(a,AR.J(b));return null==b?null:uR(b)?null:!0===FV.J(b)?b:!$Q(b)&&fc(e)?null:null==GV.J(b)||
$Q(h)?HV(a,h,c):b},qsa=function(a){var b=aT(a)&&x.j(IV,JV.J(a))?IV:null,c=aT(a)&&x.j(IV,KV.J(a))?IV:null;a=zp(a,psa);b=null!=b?I.N(a,JV,b):a;return null!=c?I.N(b,KV,c):b},ssa=function(a,b,c,e,h){return rsa(a,b,c,e,h)},rsa=function(a,b,c,e,h){function m(ba){var qa=Yp.N(ba,AR,function(ra){return g(ra)?ra:uV.J(ba)});return cT(ba)?Eqa(qa,l(Z)):qa}var q=G(F),r=B.N(q,tsa,!1),u=B.N(q,zV,null),w=B.N(q,usa,null);q=B.N(q,AV,!1);var z=g(h)?pR(c,hR.J(b)):null,C=g(h)?qsa(I.N(I.N(DV(z,gR.J(b)),AR,null),uV,tR)):
DV(b,R.J(b)),E=aQ(ZP.J(C),YP.J(C)),H=cQ(e,E),J=bR.J(a),O=Ch(gpa(J)),P=up(zR(J,R.J(C)));e=function(){return g(w)?w:lsa(J,bQ(E,H),new f(null,3,[vsa,!0,isa,!0,wV,function(ba){return null==B.j(P,R.J(ba))}],null))}();var W=DV(a,e),V=HV(J,W,new f(null,1,[EV,!0],null)),Z=Ch(F);a=osa(C,e,g(h)?bR.J(z):bR.J(b),y([yV,function(ba,qa){var ra=S.J(ba),sa=!0===FV.J(qa)||null==AR.J(qa),Ea=Poa(qa);sa&&O.oe(null,hg.j(O.Fb(null),ra));Z.oe(null,I.N(Z.Fb(null),R.J(qa),R.J(ba)));var Sa=ln.j;var Ia=ba?.type??B.j(ba,Q);var Wb=
H?.x??B.j(H,ZP),vb=H?.y??B.j(H,YP);Wb=zo(Wb,0);var cc=zo(vb,0);vb=XP(Wb,cc);ba=Fp(Fp(Fp(Yp.ba(Yp.ba(ba,UQ,Qqa,vb),SQ,Rqa,vb),ZP,Rp,y([Wb])),YP,Rp,y([cc])),YT,Sqa,y([vb]));ba=x.j(WT,Ia)?Yp.ba(ba,XT,Apa,vb):ba;Ia=x.j(Ez,Ia)?Yp.ba(ba,wS,Apa,vb):ba;Sa=Sa.call(ln,Ia,aR);Ea=null!=Ea?I.N(Sa,aR,dk([g(Ea)?Mk.J(["swap-slot-",k.J(Ea)].join("")):null])):Sa;sa=g(g(r)?sa:r)?I.N(Ea,LV,!0):Ea;sa=fc(r)?ln.j(sa,LV):sa;sa=g(r)?ln.j(sa,ZQ):sa;Ea=(Ea=fc(r))?g(h)?h:null==ZQ.J(qa):Ea;sa=g(Ea)?I.N(sa,ZQ,R.J(qa)):sa;ra=null==
AR.J(qa)?I.U(sa,GV,R.J(b),y([MV,R.J(c),FV,!0,S,ra])):sa;return null!=AR.J(qa)||null!=V?ln.j(ra,FV):ra},zV,u,AV,q,uV,e,BV,bR.J(a)]));u=A(a,0,null);q=A(a,1,null);A(a,2,null);return new K(null,2,5,M,[m(u),Nh.j(m,q)],null)},wsa=function(a){a=G(a);var b=B.j(a,KS),c=G(b);b=B.j(c,xz);c=B.j(c,DQ);return I.U(a,NV,b/c,y([OV,!0]))},xsa=function(a){a=G(a);var b=B.j(a,UQ),c=G(b);b=B.j(c,xz);c=B.j(c,DQ);return I.U(a,NV,b/c,y([OV,!0]))},ysa=function(a){a=G(a);var b=B.j(a,Q),c=op(rV.J(a))&&sh(function(e){return null!=
MS.J(e)},rV.J(a));return x.j(b,PV)?xsa(a):x.j(b,LS)?wsa(a):x.j(b,ZH)?a:c?xsa(a):I.U(a,NV,1,y([OV,!1]))},QV=function(a,b,c,e,h,m,q,r,u,w,z,C,E,H,J,O,P,W,V){this.id=a;this.name=b;this.type=c;this.x=e;this.y=h;this.width=m;this.height=q;this.rotation=r;this.bb=u;this.points=w;this.transform=z;this.Oa=C;this.Hb=E;this.Jb=H;this.flip_x=J;this.flip_y=O;this.Ma=P;this.ta=W;this.wc=V;this.ea=2230716170;this.ka=139280},RV=function(a){var b=new bk(null,new f(null,16,[YP,null,tS,null,FT,null,S,null,xz,null,
Q,null,SQ,null,uS,null,R,null,AR,null,uV,null,ZP,null,UQ,null,rS,null,DQ,null,sS,null],null),null),c=Nf(function(e,h,m){return yf(b,h)?e:I.N(e,h,m)},F,a);return new QV(B.j(a,R),B.j(a,S),B.j(a,Q),B.j(a,ZP),B.j(a,YP),B.j(a,xz),B.j(a,DQ),B.j(a,FT),B.j(a,UQ),B.j(a,SQ),B.j(a,tS),B.j(a,uS),B.j(a,AR),B.j(a,uV),B.j(a,rS),B.j(a,sS),null,bh(c),null)},Jsa=function(a){a=a instanceof D?a.na:null;switch(a){case "rect":return zsa;case "image":return Asa;case "circle":return Bsa;case "path":return Csa;case "frame":return Dsa;
case "bool":return Esa;case "group":return Fsa;case "text":return Gsa;case "svg-raw":return Hsa;case "multiple":return Isa;default:throw Error(["No matching clause: ",k.J(a)].join(""));}},Lsa=function(a){a=x.j(a,Ksa)?Ez:a;var b=Jsa(a);a=Xj.j(Ez,a)&&Xj.j(WT,a)?I.N(I.N(I.N(I.N(b,ZP,0),YP,0),xz,.01),DQ,.01):b;a=I.U(a,R,CV(),y([uV,tR,AR,tR,FT,0]));return RV(a)},Msa=function(a){a=G(a);var b=B.j(a,UQ),c=B.j(a,SQ);if(!g(b)){b=a?.x??B.j(a,ZP);var e=a?.y??B.j(a,YP),h=a?.width??B.j(a,xz),m=a?.height??B.j(a,
DQ);b=Qp(b,e,h,m)?KQ.ba(b,e,h,m):null}c=g(c)?c:IQ(b);return I.N(I.N(a,UQ,b),SQ,c)},SV=function(a){a=G(a);var b=B.j(a,Q);b=Lsa(b);a=xp(Zi.j(F,a));var c=Yg.U(y([b,xp(Zi.j(F,a))])),e=function(){var h=Q.J(c);switch(h instanceof D?h.na:null){case "bool":case "path":h=G(c);var m=B.j(h,wS),q=B.j(h,UQ),r=B.j(h,SQ);g(q)?m=q:(m=iS(m),m=g(m)?m:KQ.aa());r=g(r)?r:IQ(m);return I.N(I.N(h,UQ,m),SQ,r);case "image":return h=Msa(c),h=G(h),r=B.j(h,KS),I.N(I.N(h,NV,xz.J(r)/DQ.J(r)),OV,!0);default:return Msa(c)}}();return ysa(function(){var h=
null==tS.J(e)?I.N(e,tS,sQ.aa()):e;return null==uS.J(e)?I.N(h,uS,sQ.aa()):h}())},Osa=function(a){var b=G(a);a=B.j(b,R);b=B.j(b,S);return I.N(I.N(Nsa,R,g(a)?a:CV()),S,g(b)?b:"Page 1")},Psa=function(a,b,c){var e=Yg;return Dp(a,new K(null,2,5,M,[TV,b],null),function(h){return I.N(Qg(e,h,c),jR,lR.local())})},Qsa=function(a,b,c){return x.j(Q.J(a),ZH)&&YS(function(e){return x.j(UV.J(e),c)&&x.j(VV.J(e),b)},wS.J(a))},tX=function(a,b){var c=null!=b?Osa(new f(null,2,[R,b,S,"Page 1"],null)):null;a=I.N(BUa,R,
a);b=null!=b?Yoa(a,c):a;return yf(UU,"components/v2")?dp(b,new K(null,2,5,M,[Bq,WV],null),!0):b},XV=function(a,b){var c=B.j(B.j(a,Bq),WV);if(g(g(c)?g(b)?Ye(bR.J(b)):b:c)){a=pR(a,hR.J(b));var e=bR.J(a);a=up(Nh.j(function(h){return B.j(e,h)},kg(gR.J(b),yR(e,gR.J(b)))));return I.N(b,bR,a)}return b},Rsa=function(a,b,c,e){var h=B.j(B.j(a,Bq),WV);return g(function(){var m=fc(h);return m?m:c}())?Yp.ba(a,dR,ln,b):Woa(mR(mR(a,b,xh(XV,a)),b,function(m){return g(e)?dp(m,new K(null,2,5,M,[bR,gR.J(m)],null),e):
m}),b)},Ssa=function(a,b,c){var e=B.j(B.j(a,Bq),WV);e=g(e)?null!=c:e;a=Xoa(mR(a,b,function(h){return ln.j(h,bR)}),b);return g(e)?mR(a,b,function(h){return I.N(h,hR,c)}):a},Tsa=function(a,b){for(;;){if(yf(b,MV))return B.j(b,MV);if(yf(b,ZQ)){var c=a;b=B.j(a,AR.J(b));a=c}else return null}},Vsa=function(a,b){function c(m){return sm(m,function(q){return e(m,q)})}function e(m,q){if(YU("app.common.types.file",YV)){var r=function(){return l(new $k(function(){return new K(null,3,5,M,[new K(null,2,5,M,[fK,
"detach-shape"],null),new K(null,2,5,M,[qV,b],null),new K(null,2,5,M,[Usa,Tsa(m,q)],null)],null)}))}(),u=$U();(function(){var z=Zi.j(ZV,r),C=xp(Yg.U(y([null,null])));C=new f(null,7,[$V,C,aW,u,bW,z,cW,CV(),dW,new $k(function(){return ZU(z)}),eW,"app.common.types.file",fW,YV],null);return ll.j(gW,wh(C))})()}var w=Xj.j(b,jV.J(q))?ln.U(q,hV,y([jV])):q;w=Xj.j(b,pV.J(q))?ln.U(w,oV,y([pV])):w;w=Xj.j(b,Tsa(m,q))?ln.U(w,GV,y([MV,ZQ,FV])):w;return x.j(ZH,Q.J(q))?Yp.N(w,wS,h):w}function h(m){return XS(function(q){var r=
Xj.j(b,jV.J(q))?ln.U(q,hV,y([jV])):q;return Xj.j(b,VV.J(q))?ln.U(r,UV,y([VV])):r},m)}return jn.N(a,new K(null,2,5,M,[nB,oR],null),function(m){return sm(m,function(q){return Yp.N(q,bR,c)})})},hW=function(a,b){return null!=a?a[b]:null},iW=function(a){return Object.assign({},a)},jW=function(a,b,c){a[b]=c;return a},kW=function(a,b){delete a[b];return a},lW=function(a){a.prototype.Ai=function(){return Fra(this)}},Wsa=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}},mW=function(){return lb("iPhone")&&
!lb("iPod")&&!lb("iPad")},Xsa=function(){mW()||lb("iPad")||lb("iPod")},Zsa=function(a,b){cb(b,function(c,e){c&&"object"==typeof c&&c.hl&&(c=c.dl());"style"==e?a.style.cssText=c:"class"==e?a.className=c:"for"==e?a.htmlFor=c:Ysa.hasOwnProperty(e)?a.setAttribute(Ysa[e],c):Wa(e,"aria-")||Wa(e,"data-")?a.setAttribute(e,c):a[e]=c})},ata=function(a,b,c){function e(r){r&&b.appendChild("string"===typeof r?a.createTextNode(r):r)}for(var h=1;h<c.length;h++){var m=c[h];if(!ia(m)||ja(m)&&0<m.nodeType)e(m);else{a:{if(m&&
"number"==typeof m.length){if(ja(m)){var q="function"==typeof m.item||"string"==typeof m.item;break a}if("function"===typeof m){q="function"==typeof m.item;break a}}q=!1}$sa(q?rb(m):m,e)}}},nW=function(a,b){b=String(b);"application/xhtml+xml"===a.contentType&&(b=b.toLowerCase());return a.createElement(b)},oW=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):null},pW=function(a){this.sh=a||Na.document||document},bta=function(){var a=Na.MessageChannel;"undefined"===typeof a&&"undefined"!==
typeof window&&window.postMessage&&window.addEventListener&&!lb("Presto")&&(a=function(){var h=nW(document,"IFRAME");h.style.display="none";document.documentElement.appendChild(h);var m=h.contentWindow;h=m.document;h.open();h.close();var q="callImmediate"+Math.random(),r="file:"==m.location.protocol?"*":m.location.protocol+"//"+m.location.host;h=ma(function(u){if(("*"==r||u.origin==r)&&u.data==q)this.port1.onmessage()},this);m.addEventListener("message",h,!1);this.port1={};this.port2={postMessage:function(){m.postMessage(q,
r)}}});if("undefined"!==typeof a&&!mb()){var b=new a,c={},e=c;b.port1.onmessage=function(){if(void 0!==c.next){c=c.next;var h=c.Fk;c.Fk=null;h()}};return function(h){e.next={Fk:h};e=e.next;b.port2.postMessage(0)}}return function(h){Na.setTimeout(h,0)}},uW=function(a){this.Ld=qW;this.Ee=void 0;this.Bf=this.Je=this.hd=null;this.Bh=this.wj=!1;if(a!=La)try{var b=this;a.call(void 0,function(c){rW(b,sW,c)},function(c){rW(b,tW,c)})}catch(c){rW(this,tW,c)}},cta=function(){this.next=this.context=this.onRejected=
this.onFulfilled=this.child=null;this.dh=!1},eta=function(a,b,c){var e=dta.get();e.onFulfilled=a;e.onRejected=b;e.context=c;return e},fta=function(a,b){if(a.Ld==qW)if(a.hd){var c=a.hd;if(c.Je){for(var e=0,h=null,m=null,q=c.Je;q&&(q.dh||(e++,q.child==a&&(h=q),!(h&&1<e)));q=q.next)h||(m=q);h&&(c.Ld==qW&&1==e?fta(c,b):(m?(e=m,e.next==c.Bf&&(c.Bf=e),e.next=e.next.next):gta(c),hta(c,h,tW,b)))}a.hd=null}else rW(a,tW,b)},jta=function(a,b){a.Je||a.Ld!=sW&&a.Ld!=tW||ita(a);a.Bf?a.Bf.next=b:a.Je=b;a.Bf=b},
kta=function(a,b,c,e){var h=eta(null,null,null);h.child=new uW(function(m,q){h.onFulfilled=b?function(r){try{var u=b.call(e,r);m(u)}catch(w){q(w)}}:m;h.onRejected=c?function(r){try{var u=c.call(e,r);void 0===u&&r instanceof vW?q(r):m(u)}catch(w){q(w)}}:q});h.child.hd=a;jta(a,h);return h.child},rW=function(a,b,c){if(a.Ld==qW){a===c&&(b=tW,c=new TypeError("Promise cannot resolve to itself"));a.Ld=1;a:{var e=c,h=a.Ip,m=a.Jp;if(e instanceof uW){jta(e,eta(h||La,m||null,a));var q=!0}else if(Wsa(e))e.then(h,
m,a),q=!0;else{if(ja(e))try{var r=e.then;if("function"===typeof r){lta(e,r,h,m,a);q=!0;break a}}catch(u){m.call(a,u);q=!0;break a}q=!1}}q||(a.Ee=c,a.Ld=b,a.hd=null,ita(a),b!=tW||c instanceof vW||mta(a,c))}},lta=function(a,b,c,e,h){function m(u){r||(r=!0,e.call(h,u))}function q(u){r||(r=!0,c.call(h,u))}var r=!1;try{b.call(a,q,m)}catch(u){m(u)}},ita=function(a){a.wj||(a.wj=!0,wW(a.vh,a))},gta=function(a){var b=null;a.Je&&(b=a.Je,a.Je=b.next,b.next=null);a.Je||(a.Bf=null);return b},hta=function(a,b,
c,e){if(c==tW&&b.onRejected&&!b.dh)for(;a&&a.Bh;a=a.hd)a.Bh=!1;if(b.child)b.child.hd=null,nta(b,c,e);else try{b.dh?b.onFulfilled.call(b.context):nta(b,c,e)}catch(h){ota.call(null,h)}dta.put(b)},nta=function(a,b,c){b==sW?a.onFulfilled.call(a.context,c):a.onRejected&&a.onRejected.call(a.context,c)},mta=function(a,b){a.Bh=!0;wW(function(){a.Bh&&ota.call(null,b)})},vW=function(a){ua.call(this,a)},xW=function(a,b){this.Hi=[];this.Gl=a;this.Xk=b||null;this.sg=this.Mf=!1;this.Ee=void 0;this.ek=this.Fm=this.Wi=
!1;this.Li=0;this.hd=null;this.Xi=0},yW=function(a,b,c){a.Mf=!0;a.Ee=c;a.sg=!b;pta(a)},qta=function(a){if(a.Mf){if(!a.ek)throw new zW(a);a.ek=!1}},sta=function(a){return rta(a.Hi,function(b){return"function"===typeof b[1]})},pta=function(a){if(a.Li&&a.Mf&&sta(a)){var b=a.Li,c=AW[b];c&&(Na.clearTimeout(c.ug),delete AW[b]);a.Li=0}a.hd&&(a.hd.Xi--,delete a.hd);b=a.Ee;for(var e=c=!1;a.Hi.length&&!a.Wi;){var h=a.Hi.shift(),m=h[0];const r=h[1];h=h[2];if(m=a.sg?r:m)try{var q=m.call(h||a.Xk,b);q===tta&&(q=
void 0);void 0!==q&&(a.sg=a.sg&&(q==b||a.isError(q)),a.Ee=b=q);if(Wsa(b)||"function"===typeof Na.Promise&&b instanceof Na.Promise)e=!0,a.Wi=!0}catch(u){b=u,a.sg=!0,sta(a)||(c=!0)}}a.Ee=b;e&&(q=ma(a.Wk,a,!0),e=ma(a.Wk,a,!1),b instanceof xW?(b.addCallbacks(q,e),b.Fm=!0):b.then(q,e));c&&(b=new uta(b),AW[b.ug]=b,a.Li=b.ug)},zW=function(){ua.call(this)},BW=function(){ua.call(this)},uta=function(a){this.ug=Na.setTimeout(ma(this.throwError,this),0);this.uh=a},CW=function(){return{addListener(){},removeListener(){},
addEventListener(){},removeEventListener(){}}},vta=function(a){a=RE(a);return Qo(a.path,"/")?a:Yp.N(a,Ez,function(b){return[k.J(b),"/"].join("")})},zta=function(){return x.j(DW,DW)?yf(new bk(null,new f(null,3,[DW,null,wta,null,xta,null],null),null),yta):x.j(DW,yta)},EW=function(a){switch(a){case "image/apng":return".apng";case "image/avif":return".avif";case "image/gif":return".gif";case "image/jpeg":return".jpg";case "image/png":return".png";case "image/svg+xml":return".svg";case "image/webp":return".webp";
case "application/zip":return".zip";case "application/penpot":return".penpot";case "application/pdf":return".pdf";case "text/plain":return".txt";default:return null}},FW=function(a){return"function"===typeof a[0]?a.shift():void 0},Ata=function(a){return void 0!==a&&null!==a},Bta=function(a,b){return b(a)},Cta=function(a){a=a instanceof D?a.na:null;switch(a){case "asap":return GW.asapScheduler;case "async":return GW.asyncScheduler;case "queue":return GW.queueScheduler;case "af":return GW.animationFrameScheduler;
case "animation-frame":return GW.animationFrameScheduler;default:throw Error(["No matching clause: ",k.J(a)].join(""));}},Dta=function(a){return GW.filter(function(b){return of(a.J?a.J(b):a(b))})},Eta=function(a){return GW.map(function(b){return a.J?a.J(b):a(b)})},Fta=function(a){return GW.mergeMap(function(b){return a.J?a.J(b):a(b)})},Gta=function(a){return GW.concatMap(function(b){return a.J?a.J(b):a(b)})},Hta=function(a,b){return GW.reduce(function(c,e){return a.j?a.j(c,e):a(c,e)},b)},Ita=function(a,
b){return GW.scan(function(c,e){return a.j?a.j(c,e):a(c,e)},b)},Jta=function(a){return GW.expand(function(b){return a.J?a.J(b):a(b)})},Kta=function(a){return GW.catchError(function(b,c){b=a.j?a.j(b,c):a(b,c);return b instanceof GW.Observable?b:GW.EMPTY})},Lta=function(a){if(a instanceof GW.Scheduler)return GW.observeOn(a);if(a instanceof D)return Lta(Cta(a));throw Ml("invalid arguments",new f(null,1,[Mta,a],null));},IW=function(a){return new HW(function(b){try{return a.J?a.J(b):a(b)}catch(c){return b.error(c)}})},
JW=function(a){return null==a?GW.EMPTY:GW.from(a)},KW=function(a){return Se(a)?GW.throwError(a):GW.throwError(function(){return a})},LW=function(a){if(null!=a&&null!=a.fh)a=a.fh(a);else{var b=LW[ha(null==a?null:a)];if(null!=b)a=b.J?b.J(a):b(a);else if(b=LW._,null!=b)a=b.J?b.J(a):b(a);else throw nc("IDisposable.-dispose",a);}return a},Ota=function(a,b){if(null!=b&&Object.getPrototypeOf(b)===Object.prototype||b instanceof MW)a=a.subscribe(b);else if(df(b)){var c=B.N(b,Cka,NW),e=B.N(b,$r,NW);b=B.N(b,
Nta,NW);a=a.subscribe({next:c,error:e,complete:b})}else a=a.subscribe({next:b});return a},Pta=function(a,b,c){return a.subscribe({next:b,error:c})},Qta=function(a,b){Ota(a,b)},OW=function(a,b){return Ota(b,a)},QW=function(a){return PW(Rta(),a)},RW=function(a,b){return PW(Dta(a),b)},SW=function(a,b){return PW(Eta(a),b)},TW=function(a,b){return PW(Fta(a),b)},UW=function(a,b){return PW(Gta(a),b)},Tta=function(a){return PW(Sta(1),a)},Vta=function(a){return PW(Uta(1),a)},VW=function(a,b,c){return PW(Hta(a,
b),c)},Wta=function(a,b,c){return PW(Ita(a,b),c)},Xta=function(a,b){return PW(Jta(a),b)},Zta=function(a,b){return PW(Yta(a),b)},WW=function(a,b){return PW(Kta(a),b)},XW=function(a,b){if(null!=a&&Object.getPrototypeOf(a)===Object.prototype||Se(a))a=GW.tap(a);else throw Ml("invalid argiments",new f(null,1,[yE,a],null));return PW(a,b)},aua=function(a){return PW($ta(),a)},bua=function(a,b){return PW(Lta(a),b)},cua=function(a){var b=new GU;try{var c=function(h){return xU(b,h)},e=function(h){return yU(b,
h)};a.j?a.j(c,e):a(c,e)}catch(h){yU(b,h)}return b},dua=function(a,b){YW(vU(a),function(c){return vU(b.J?b.J(c):b(c))})},gua=function(a){return IW(function(b){var c=new FileReader;jW(c,"onload",function(){b.next(c.result);return b.complete()});jW(c,"onerror",function(e){return b.error(e)});jW(c,"onabort",function(){return b.error(Ll("operation aborted",Yg.U(y([new f(null,3,[Q,eua,gE,fua,fK,"operation aborted"],null),null])),null))});a.J?a.J(c):a(c);return function(){return c.abort()}})},hua=function(a){return gua(function(b){return b.readAsDataURL(a)})},
DV(b,R.J(b)),E=aQ(ZP.J(C),YP.J(C)),H=cQ(e,E),J=bR.J(a),O=Ch(gpa(J)),P=up(zR(J,R.J(C)));e=function(){return g(w)?w:lsa(J,bQ(E,H),new f(null,3,[vsa,!0,isa,!0,wV,function(ba){return null==B.j(P,R.J(ba))}],null))}();var W=DV(a,e),V=HV(J,W,new f(null,1,[EV,!0],null)),Z=Ch(F);a=osa(C,e,g(h)?bR.J(z):bR.J(b),y([yV,function(ba,qa){var ra=S.J(ba),sa=!0===FV.J(qa)||null==AR.J(qa);sa&&O.oe(null,hg.j(O.Fb(null),ra));Z.oe(null,I.N(Z.Fb(null),R.J(qa),R.J(ba)));var Ea=ln.j;var Sa=ba?.type??B.j(ba,Q);var Ia=H?.x??
B.j(H,ZP),Wb=H?.y??B.j(H,YP);Ia=zo(Ia,0);var vb=zo(Wb,0);Wb=XP(Ia,vb);ba=Fp(Fp(Fp(Yp.ba(Yp.ba(ba,UQ,Qqa,Wb),SQ,Rqa,Wb),ZP,Rp,y([Ia])),YP,Rp,y([vb])),YT,Sqa,y([Wb]));ba=x.j(WT,Sa)?Yp.ba(ba,XT,Apa,Wb):ba;Sa=x.j(Ez,Sa)?Yp.ba(ba,wS,Apa,Wb):ba;Ea=Ea.call(ln,Sa,aR);sa=g(g(r)?sa:r)?I.N(Ea,LV,!0):Ea;sa=fc(r)?ln.j(sa,LV):sa;sa=g(r)?ln.j(sa,ZQ):sa;Ea=(Ea=fc(r))?g(h)?h:null==ZQ.J(qa):Ea;sa=g(Ea)?I.N(sa,ZQ,R.J(qa)):sa;ra=null==AR.J(qa)?I.U(sa,GV,R.J(b),y([MV,R.J(c),FV,!0,S,ra])):sa;return null!=AR.J(qa)||null!=
V?ln.j(ra,FV):ra},zV,u,AV,q,uV,e,BV,bR.J(a)]));u=A(a,0,null);q=A(a,1,null);A(a,2,null);return new K(null,2,5,M,[m(u),Nh.j(m,q)],null)},wsa=function(a){a=G(a);var b=B.j(a,KS),c=G(b);b=B.j(c,xz);c=B.j(c,DQ);return I.U(a,NV,b/c,y([OV,!0]))},xsa=function(a){a=G(a);var b=B.j(a,UQ),c=G(b);b=B.j(c,xz);c=B.j(c,DQ);return I.U(a,NV,b/c,y([OV,!0]))},ysa=function(a){a=G(a);var b=B.j(a,Q),c=op(rV.J(a))&&sh(function(e){return null!=MS.J(e)},rV.J(a));return x.j(b,PV)?xsa(a):x.j(b,LS)?wsa(a):x.j(b,ZH)?a:c?xsa(a):
I.U(a,NV,1,y([OV,!1]))},QV=function(a,b,c,e,h,m,q,r,u,w,z,C,E,H,J,O,P,W,V){this.id=a;this.name=b;this.type=c;this.x=e;this.y=h;this.width=m;this.height=q;this.rotation=r;this.bb=u;this.points=w;this.transform=z;this.Oa=C;this.Hb=E;this.Jb=H;this.flip_x=J;this.flip_y=O;this.Ma=P;this.ta=W;this.wc=V;this.ea=2230716170;this.ka=139280},RV=function(a){var b=new bk(null,new f(null,16,[YP,null,tS,null,FT,null,S,null,xz,null,Q,null,SQ,null,uS,null,R,null,AR,null,uV,null,ZP,null,UQ,null,rS,null,DQ,null,sS,
null],null),null),c=Nf(function(e,h,m){return yf(b,h)?e:I.N(e,h,m)},F,a);return new QV(B.j(a,R),B.j(a,S),B.j(a,Q),B.j(a,ZP),B.j(a,YP),B.j(a,xz),B.j(a,DQ),B.j(a,FT),B.j(a,UQ),B.j(a,SQ),B.j(a,tS),B.j(a,uS),B.j(a,AR),B.j(a,uV),B.j(a,rS),B.j(a,sS),null,bh(c),null)},Jsa=function(a){a=a instanceof D?a.na:null;switch(a){case "rect":return zsa;case "image":return Asa;case "circle":return Bsa;case "path":return Csa;case "frame":return Dsa;case "bool":return Esa;case "group":return Fsa;case "text":return Gsa;
case "svg-raw":return Hsa;case "multiple":return Isa;default:throw Error(["No matching clause: ",k.J(a)].join(""));}},Lsa=function(a){a=x.j(a,Ksa)?Ez:a;var b=Jsa(a);a=Xj.j(Ez,a)&&Xj.j(WT,a)?I.N(I.N(I.N(I.N(b,ZP,0),YP,0),xz,.01),DQ,.01):b;a=I.U(a,R,CV(),y([uV,tR,AR,tR,FT,0]));return RV(a)},Msa=function(a){a=G(a);var b=B.j(a,UQ),c=B.j(a,SQ);if(!g(b)){b=a?.x??B.j(a,ZP);var e=a?.y??B.j(a,YP),h=a?.width??B.j(a,xz),m=a?.height??B.j(a,DQ);b=Qp(b,e,h,m)?KQ.ba(b,e,h,m):null}c=g(c)?c:IQ(b);return I.N(I.N(a,
UQ,b),SQ,c)},SV=function(a){a=G(a);var b=B.j(a,Q);b=Lsa(b);a=xp(Zi.j(F,a));var c=Yg.U(y([b,xp(Zi.j(F,a))])),e=function(){var h=Q.J(c);switch(h instanceof D?h.na:null){case "bool":case "path":h=G(c);var m=B.j(h,wS),q=B.j(h,UQ),r=B.j(h,SQ);g(q)?m=q:(m=iS(m),m=g(m)?m:KQ.aa());r=g(r)?r:IQ(m);return I.N(I.N(h,UQ,m),SQ,r);case "image":return h=Msa(c),h=G(h),r=B.j(h,KS),I.N(I.N(h,NV,xz.J(r)/DQ.J(r)),OV,!0);default:return Msa(c)}}();return ysa(function(){var h=null==tS.J(e)?I.N(e,tS,sQ.aa()):e;return null==
uS.J(e)?I.N(h,uS,sQ.aa()):h}())},Osa=function(a){var b=G(a);a=B.j(b,R);b=B.j(b,S);return I.N(I.N(Nsa,R,g(a)?a:CV()),S,g(b)?b:"Page 1")},Psa=function(a,b,c){var e=Yg;return Dp(a,new K(null,2,5,M,[TV,b],null),function(h){return I.N(Qg(e,h,c),jR,lR.local())})},Qsa=function(a,b,c){return x.j(Q.J(a),ZH)&&YS(function(e){return x.j(UV.J(e),c)&&x.j(VV.J(e),b)},wS.J(a))},tX=function(a,b){var c=null!=b?Osa(new f(null,2,[R,b,S,"Page 1"],null)):null;a=I.N(BUa,R,a);b=null!=b?Yoa(a,c):a;return yf(UU,"components/v2")?
dp(b,new K(null,2,5,M,[Bq,WV],null),!0):b},XV=function(a,b){var c=B.j(B.j(a,Bq),WV);if(g(g(c)?g(b)?Ye(bR.J(b)):b:c)){a=pR(a,hR.J(b));var e=bR.J(a);a=up(Nh.j(function(h){return B.j(e,h)},kg(gR.J(b),yR(e,gR.J(b)))));return I.N(b,bR,a)}return b},Rsa=function(a,b,c,e){var h=B.j(B.j(a,Bq),WV);return g(function(){var m=fc(h);return m?m:c}())?Yp.ba(a,dR,ln,b):Woa(mR(mR(a,b,xh(XV,a)),b,function(m){return g(e)?dp(m,new K(null,2,5,M,[bR,gR.J(m)],null),e):m}),b)},Ssa=function(a,b,c){var e=B.j(B.j(a,Bq),WV);
e=g(e)?null!=c:e;a=Xoa(mR(a,b,function(h){return ln.j(h,bR)}),b);return g(e)?mR(a,b,function(h){return I.N(h,hR,c)}):a},Tsa=function(a,b){for(;;){if(yf(b,MV))return B.j(b,MV);if(yf(b,ZQ)){var c=a;b=B.j(a,AR.J(b));a=c}else return null}},Vsa=function(a,b){function c(m){return sm(m,function(q){return e(m,q)})}function e(m,q){if(YU("app.common.types.file",YV)){var r=function(){return l(new $k(function(){return new K(null,3,5,M,[new K(null,2,5,M,[fK,"detach-shape"],null),new K(null,2,5,M,[qV,b],null),
new K(null,2,5,M,[Usa,Tsa(m,q)],null)],null)}))}(),u=$U();(function(){var z=Zi.j(ZV,r),C=xp(Yg.U(y([null,null])));C=new f(null,7,[$V,C,aW,u,bW,z,cW,CV(),dW,new $k(function(){return ZU(z)}),eW,"app.common.types.file",fW,YV],null);return ll.j(gW,wh(C))})()}var w=Xj.j(b,jV.J(q))?ln.U(q,hV,y([jV])):q;w=Xj.j(b,pV.J(q))?ln.U(w,oV,y([pV])):w;w=Xj.j(b,Tsa(m,q))?ln.U(w,GV,y([MV,ZQ,FV])):w;return x.j(ZH,Q.J(q))?Yp.N(w,wS,h):w}function h(m){return XS(function(q){var r=Xj.j(b,jV.J(q))?ln.U(q,hV,y([jV])):q;return Xj.j(b,
VV.J(q))?ln.U(r,UV,y([VV])):r},m)}return jn.N(a,new K(null,2,5,M,[nB,oR],null),function(m){return sm(m,function(q){return Yp.N(q,bR,c)})})},hW=function(a,b){return null!=a?a[b]:null},iW=function(a){return Object.assign({},a)},jW=function(a,b,c){a[b]=c;return a},kW=function(a,b){delete a[b];return a},lW=function(a){a.prototype.Ai=function(){return Fra(this)}},Wsa=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}},mW=function(){return lb("iPhone")&&!lb("iPod")&&!lb("iPad")},
Xsa=function(){mW()||lb("iPad")||lb("iPod")},Zsa=function(a,b){cb(b,function(c,e){c&&"object"==typeof c&&c.hl&&(c=c.dl());"style"==e?a.style.cssText=c:"class"==e?a.className=c:"for"==e?a.htmlFor=c:Ysa.hasOwnProperty(e)?a.setAttribute(Ysa[e],c):Wa(e,"aria-")||Wa(e,"data-")?a.setAttribute(e,c):a[e]=c})},ata=function(a,b,c){function e(r){r&&b.appendChild("string"===typeof r?a.createTextNode(r):r)}for(var h=1;h<c.length;h++){var m=c[h];if(!ia(m)||ja(m)&&0<m.nodeType)e(m);else{a:{if(m&&"number"==typeof m.length){if(ja(m)){var q=
"function"==typeof m.item||"string"==typeof m.item;break a}if("function"===typeof m){q="function"==typeof m.item;break a}}q=!1}$sa(q?rb(m):m,e)}}},nW=function(a,b){b=String(b);"application/xhtml+xml"===a.contentType&&(b=b.toLowerCase());return a.createElement(b)},oW=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):null},pW=function(a){this.sh=a||Na.document||document},bta=function(){var a=Na.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&
!lb("Presto")&&(a=function(){var h=nW(document,"IFRAME");h.style.display="none";document.documentElement.appendChild(h);var m=h.contentWindow;h=m.document;h.open();h.close();var q="callImmediate"+Math.random(),r="file:"==m.location.protocol?"*":m.location.protocol+"//"+m.location.host;h=ma(function(u){if(("*"==r||u.origin==r)&&u.data==q)this.port1.onmessage()},this);m.addEventListener("message",h,!1);this.port1={};this.port2={postMessage:function(){m.postMessage(q,r)}}});if("undefined"!==typeof a&&
!mb()){var b=new a,c={},e=c;b.port1.onmessage=function(){if(void 0!==c.next){c=c.next;var h=c.Fk;c.Fk=null;h()}};return function(h){e.next={Fk:h};e=e.next;b.port2.postMessage(0)}}return function(h){Na.setTimeout(h,0)}},uW=function(a){this.Ld=qW;this.Ee=void 0;this.Bf=this.Je=this.hd=null;this.Bh=this.wj=!1;if(a!=La)try{var b=this;a.call(void 0,function(c){rW(b,sW,c)},function(c){rW(b,tW,c)})}catch(c){rW(this,tW,c)}},cta=function(){this.next=this.context=this.onRejected=this.onFulfilled=this.child=
null;this.dh=!1},eta=function(a,b,c){var e=dta.get();e.onFulfilled=a;e.onRejected=b;e.context=c;return e},fta=function(a,b){if(a.Ld==qW)if(a.hd){var c=a.hd;if(c.Je){for(var e=0,h=null,m=null,q=c.Je;q&&(q.dh||(e++,q.child==a&&(h=q),!(h&&1<e)));q=q.next)h||(m=q);h&&(c.Ld==qW&&1==e?fta(c,b):(m?(e=m,e.next==c.Bf&&(c.Bf=e),e.next=e.next.next):gta(c),hta(c,h,tW,b)))}a.hd=null}else rW(a,tW,b)},jta=function(a,b){a.Je||a.Ld!=sW&&a.Ld!=tW||ita(a);a.Bf?a.Bf.next=b:a.Je=b;a.Bf=b},kta=function(a,b,c,e){var h=
eta(null,null,null);h.child=new uW(function(m,q){h.onFulfilled=b?function(r){try{var u=b.call(e,r);m(u)}catch(w){q(w)}}:m;h.onRejected=c?function(r){try{var u=c.call(e,r);void 0===u&&r instanceof vW?q(r):m(u)}catch(w){q(w)}}:q});h.child.hd=a;jta(a,h);return h.child},rW=function(a,b,c){if(a.Ld==qW){a===c&&(b=tW,c=new TypeError("Promise cannot resolve to itself"));a.Ld=1;a:{var e=c,h=a.Ip,m=a.Jp;if(e instanceof uW){jta(e,eta(h||La,m||null,a));var q=!0}else if(Wsa(e))e.then(h,m,a),q=!0;else{if(ja(e))try{var r=
e.then;if("function"===typeof r){lta(e,r,h,m,a);q=!0;break a}}catch(u){m.call(a,u);q=!0;break a}q=!1}}q||(a.Ee=c,a.Ld=b,a.hd=null,ita(a),b!=tW||c instanceof vW||mta(a,c))}},lta=function(a,b,c,e,h){function m(u){r||(r=!0,e.call(h,u))}function q(u){r||(r=!0,c.call(h,u))}var r=!1;try{b.call(a,q,m)}catch(u){m(u)}},ita=function(a){a.wj||(a.wj=!0,wW(a.vh,a))},gta=function(a){var b=null;a.Je&&(b=a.Je,a.Je=b.next,b.next=null);a.Je||(a.Bf=null);return b},hta=function(a,b,c,e){if(c==tW&&b.onRejected&&!b.dh)for(;a&&
a.Bh;a=a.hd)a.Bh=!1;if(b.child)b.child.hd=null,nta(b,c,e);else try{b.dh?b.onFulfilled.call(b.context):nta(b,c,e)}catch(h){ota.call(null,h)}dta.put(b)},nta=function(a,b,c){b==sW?a.onFulfilled.call(a.context,c):a.onRejected&&a.onRejected.call(a.context,c)},mta=function(a,b){a.Bh=!0;wW(function(){a.Bh&&ota.call(null,b)})},vW=function(a){ua.call(this,a)},xW=function(a,b){this.Hi=[];this.Gl=a;this.Xk=b||null;this.sg=this.Mf=!1;this.Ee=void 0;this.ek=this.Fm=this.Wi=!1;this.Li=0;this.hd=null;this.Xi=0},
yW=function(a,b,c){a.Mf=!0;a.Ee=c;a.sg=!b;pta(a)},qta=function(a){if(a.Mf){if(!a.ek)throw new zW(a);a.ek=!1}},sta=function(a){return rta(a.Hi,function(b){return"function"===typeof b[1]})},pta=function(a){if(a.Li&&a.Mf&&sta(a)){var b=a.Li,c=AW[b];c&&(Na.clearTimeout(c.ug),delete AW[b]);a.Li=0}a.hd&&(a.hd.Xi--,delete a.hd);b=a.Ee;for(var e=c=!1;a.Hi.length&&!a.Wi;){var h=a.Hi.shift(),m=h[0];const r=h[1];h=h[2];if(m=a.sg?r:m)try{var q=m.call(h||a.Xk,b);q===tta&&(q=void 0);void 0!==q&&(a.sg=a.sg&&(q==
b||a.isError(q)),a.Ee=b=q);if(Wsa(b)||"function"===typeof Na.Promise&&b instanceof Na.Promise)e=!0,a.Wi=!0}catch(u){b=u,a.sg=!0,sta(a)||(c=!0)}}a.Ee=b;e&&(q=ma(a.Wk,a,!0),e=ma(a.Wk,a,!1),b instanceof xW?(b.addCallbacks(q,e),b.Fm=!0):b.then(q,e));c&&(b=new uta(b),AW[b.ug]=b,a.Li=b.ug)},zW=function(){ua.call(this)},BW=function(){ua.call(this)},uta=function(a){this.ug=Na.setTimeout(ma(this.throwError,this),0);this.uh=a},CW=function(){return{addListener(){},removeListener(){},addEventListener(){},removeEventListener(){}}},
vta=function(a){a=RE(a);return Qo(a.path,"/")?a:Yp.N(a,Ez,function(b){return[k.J(b),"/"].join("")})},zta=function(){return x.j(DW,DW)?yf(new bk(null,new f(null,3,[DW,null,wta,null,xta,null],null),null),yta):x.j(DW,yta)},EW=function(a){switch(a){case "image/apng":return".apng";case "image/avif":return".avif";case "image/gif":return".gif";case "image/jpeg":return".jpg";case "image/png":return".png";case "image/svg+xml":return".svg";case "image/webp":return".webp";case "application/zip":return".zip";
case "application/penpot":return".penpot";case "application/pdf":return".pdf";case "text/plain":return".txt";default:return null}},FW=function(a){return"function"===typeof a[0]?a.shift():void 0},Ata=function(a){return void 0!==a&&null!==a},Bta=function(a,b){return b(a)},Cta=function(a){a=a instanceof D?a.na:null;switch(a){case "asap":return GW.asapScheduler;case "async":return GW.asyncScheduler;case "queue":return GW.queueScheduler;case "af":return GW.animationFrameScheduler;case "animation-frame":return GW.animationFrameScheduler;
default:throw Error(["No matching clause: ",k.J(a)].join(""));}},Dta=function(a){return GW.filter(function(b){return of(a.J?a.J(b):a(b))})},Eta=function(a){return GW.map(function(b){return a.J?a.J(b):a(b)})},Fta=function(a){return GW.mergeMap(function(b){return a.J?a.J(b):a(b)})},Gta=function(a){return GW.concatMap(function(b){return a.J?a.J(b):a(b)})},Hta=function(a,b){return GW.reduce(function(c,e){return a.j?a.j(c,e):a(c,e)},b)},Ita=function(a,b){return GW.scan(function(c,e){return a.j?a.j(c,e):
a(c,e)},b)},Jta=function(a){return GW.expand(function(b){return a.J?a.J(b):a(b)})},Kta=function(a){return GW.catchError(function(b,c){b=a.j?a.j(b,c):a(b,c);return b instanceof GW.Observable?b:GW.EMPTY})},Lta=function(a){if(a instanceof GW.Scheduler)return GW.observeOn(a);if(a instanceof D)return Lta(Cta(a));throw Ml("invalid arguments",new f(null,1,[Mta,a],null));},IW=function(a){return new HW(function(b){try{return a.J?a.J(b):a(b)}catch(c){return b.error(c)}})},JW=function(a){return null==a?GW.EMPTY:
GW.from(a)},KW=function(a){return Se(a)?GW.throwError(a):GW.throwError(function(){return a})},LW=function(a){if(null!=a&&null!=a.fh)a=a.fh(a);else{var b=LW[ha(null==a?null:a)];if(null!=b)a=b.J?b.J(a):b(a);else if(b=LW._,null!=b)a=b.J?b.J(a):b(a);else throw nc("IDisposable.-dispose",a);}return a},Ota=function(a,b){if(null!=b&&Object.getPrototypeOf(b)===Object.prototype||b instanceof MW)a=a.subscribe(b);else if(df(b)){var c=B.N(b,Cka,NW),e=B.N(b,$r,NW);b=B.N(b,Nta,NW);a=a.subscribe({next:c,error:e,
complete:b})}else a=a.subscribe({next:b});return a},Pta=function(a,b,c){return a.subscribe({next:b,error:c})},Qta=function(a,b){Ota(a,b)},OW=function(a,b){return Ota(b,a)},QW=function(a){return PW(Rta(),a)},RW=function(a,b){return PW(Dta(a),b)},SW=function(a,b){return PW(Eta(a),b)},TW=function(a,b){return PW(Fta(a),b)},UW=function(a,b){return PW(Gta(a),b)},Tta=function(a){return PW(Sta(1),a)},Vta=function(a){return PW(Uta(1),a)},VW=function(a,b,c){return PW(Hta(a,b),c)},Wta=function(a,b,c){return PW(Ita(a,
b),c)},Xta=function(a,b){return PW(Jta(a),b)},Zta=function(a,b){return PW(Yta(a),b)},WW=function(a,b){return PW(Kta(a),b)},XW=function(a,b){if(null!=a&&Object.getPrototypeOf(a)===Object.prototype||Se(a))a=GW.tap(a);else throw Ml("invalid argiments",new f(null,1,[yE,a],null));return PW(a,b)},aua=function(a){return PW($ta(),a)},bua=function(a,b){return PW(Lta(a),b)},cua=function(a){var b=new GU;try{var c=function(h){return xU(b,h)},e=function(h){return yU(b,h)};a.j?a.j(c,e):a(c,e)}catch(h){yU(b,h)}return b},
dua=function(a,b){YW(vU(a),function(c){return vU(b.J?b.J(c):b(c))})},gua=function(a){return IW(function(b){var c=new FileReader;jW(c,"onload",function(){b.next(c.result);return b.complete()});jW(c,"onerror",function(e){return b.error(e)});jW(c,"onabort",function(){return b.error(Ll("operation aborted",Yg.U(y([new f(null,3,[Q,eua,gE,fua,fK,"operation aborted"],null),null])),null))});a.J?a.J(c):a(c);return function(){return c.abort()}})},hua=function(a){return gua(function(b){return b.readAsDataURL(a)})},
ZW=function(a){a&&"function"==typeof a.se&&a.se()},iua=function(a){for(let b=0,c=arguments.length;b<c;++b){const e=arguments[b];ia(e)?iua.apply(null,e):ZW(e)}},aX=function(){0!=$W&&(jua[la(this)]=this);this.Jf=this.Jf;this.Ae=this.Ae},bX=function(a){this.id=a},cX=function(a,b){this.type=a instanceof bX?String(a):a;this.currentTarget=this.target=b;this.defaultPrevented=this.Og=!1},dX=function(a,b){cX.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.button=this.screenY=
this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.key="";this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.pointerId=0;this.pointerType="";this.Lf=null;a&&this.init(a,b)},kua=function(a){document.querySelector("html").setAttribute("lang",a)},lua=function(a){return null!=a?a.target:null},mua=function(a){null!=a&&a.style.setProperty("--font-family","'vazirmatn', 'worksans', sans-serif");return a},nua=function(a){null!=a&&a.style.removeProperty("--font-family");
return a},fX=function(a){if(null!=a&&null!=a.Vi)a=a.Vi(a,eX);else{var b=fX[ha(null==a?null:a)];if(null!=b)a=b.j?b.j(a,eX):b(a,eX);else if(b=fX._,null!=b)a=b.j?b.j(a,eX):b(a,eX);else throw nc("ITimeFormat.format",a);}return a},pua=function(){var a=new f(null,1,[oua,4],null);if("number"===typeof a)return gX.fromMillis(a);if(a instanceof gX)return a;if("string"===typeof a)return gX.fromISO(a);if(df(a))return gX.fromObject(Zo(a));throw Error("unexpected arguments");},qua=function(a,b){return a.diff(b)},
@ -5693,7 +5693,7 @@ d.then=function(a,b,c){let e,h;const m=new uW(function(q,r){h=q;e=r});this.addCa
uta.prototype.throwError=function(){delete AW[this.ug];throw this.uh;};var AW={};lW(xW);var AX="undefined"!==typeof Na.document?Na.document:CW(),NUa="undefined"!==typeof Na.location?Na.location:CW(),q$="undefined"!==typeof Na.navigator?Na.navigator:CW(),OUa="undefined"!==typeof Na.FormData?Na.FormData:function(){};jBa=!1;var PUa=new K(null,6,5,M,[fHa,lNa,XGa,zQa,tDa,REa],null);x.j(hW(Na,"penpotBuildDate"),"%buildDate%");var QUa,t$,XUa=hW(Na,"penpotFlags");t$=void 0===XUa?"":XUa;var YUa=rh(Nh.J(Mk),"string"===typeof t$?zi(Ek(Qna,t$)):null);
a:for(var u$=Pg(zh,y([CUa,PUa,YUa])),w$=ck;;){var ZUa=t(u$);if(null==ZUa){QUa=w$;break a}var x$=kk(ZUa);if(Po(x$,"enable-")){var $Ua=ke(u$),aVa=hg.j(w$,Mk.J(x$.substring(7)));u$=$Ua;w$=aVa}else if(Po(x$,"disable-")){var bVa=ke(u$),cVa=Dr.j(w$,Mk.J(x$.substring(8)));u$=bVa;w$=cVa}else{var dVa=ke(u$),eVa=w$;u$=dVa;w$=eVa}}var v$;var y$=hW(Na,"penpotVersion");
if(Po(y$,"%"))v$=Fj([RMa,nOa,W3,ZGa,nEa,aDa,KLa,Tv,SBa,mJa],[null,null,"develop","0","0",null,"0","0.0.0","develop","0.0"]);else if("string"===typeof y$){var z$=Ck(DUa,y$),A$=B.j(z$,4),K$=B.j(z$,5),mVa=B.j(z$,6),nVa=B.j(z$,3),oVa=EX.N?EX.N("%s.%s",A$,K$):EX("%s.%s",A$,K$),pVa=B.j(z$,2);v$=Fj([RMa,nOa,W3,ZGa,nEa,aDa,KLa,Tv,SBa,mJa],[B.j(z$,14),B.j(z$,8),y$,mVa,A$,B.j(z$,12),K$,nVa,pVa,oVa])}else v$=null;
var yta=function(){function a(){var e=Oo(c,"safari");return g(e)?Oo(c,"version/17"):e}function b(){var e=Oo(c,"safari");return g(e)?Oo(c,"version/16"):e}var c=Ro(q$.userAgent);return g(Oo(c,"edg"))?yEa:g(Oo(c,"chrom"))?xHa:g(Oo(c,"firefox"))?DPa:g(b())?wta:g(a())?xta:g(Oo(c,"safari"))?DW:tHa}(),L$=Ro(q$.userAgent);g(Oo(L$,"windows"))||g(Oo(L$,"linux"))||Oo(L$,"mac os");var qVa=hW(Na,"penpotPublicURI"),BX=vta(g(qVa)?qVa:hW(NUa,"origin")),xVa=hW(Na,"penpotRasterizerURI");null==xVa||vta(xVa);
var yta=function(){function a(){var e=Oo(c,"safari");return g(e)?Oo(c,"version/17"):e}function b(){var e=Oo(c,"safari");return g(e)?Oo(c,"version/16"):e}var c=Ro(q$.userAgent);return g(Oo(c,"edg"))?yEa:g(Oo(c,"chrom"))?xHa:g(Oo(c,"firefox"))?DPa:g(b())?wta:g(a())?xta:g(Oo(c,"safari"))?DW:tHa}(),L$=Ro(q$.userAgent);g(Oo(L$,"windows"))||g(Oo(L$,"linux"))||Oo(L$,"mac os");var qVa=hW(Na,"penpotPublicURI"),BX=vta(g(qVa)?qVa:hW(NUa,"origin")),Poa=hW(Na,"penpotRasterizerURI");null==Poa||vta(Poa);
var u_=function u_(a){switch(arguments.length){case 1:return u_.J(arguments[0]);case 2:return u_.j(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",k.J(arguments.length)].join(""));}};u_.J=function(a){return u_.j(a,!1)};u_.j=function(a,b){var c=G(a);a=B.j(c,R);c=B.j(c,JIa);g(c)?b=c:(c=p1.U(y([BX,"assets/by-file-media-id/"])),c=!0===b?p1.U(y([c,""+(a??"")+"/thumbnail"])):c,b=""+((!1===b?p1.U(y([c,""+(a??"")])):c)??""));return b};u_.ha=2;var fVa=new bk(null,new f(null,8,["font/ttf",null,"woff",null,"font/otf",null,"font/woff",null,"font/opentype",null,".otf",null,"application/font-woff",null,".ttf",null],null),null);$o(",",new bk(null,new f(null,5,["image/gif",null,"image/png",null,"image/svg+xml",null,"image/webp",null,"image/jpeg",null],null),null));$o(",",fVa);YK(l7,Q3,Jl);YK(p3,a8,ic);YK(J6,s6,ec);YK(U3,s6,ec);YK(i2,$3,te);YK(Z6,$3,te);YK(l5,a8,ic);YK(K3,a8,ic);
YK(BLa,N(d8,mL,new K(null,8,5,M,[l7,p3,J6,U3,l5,i2,Z6,K3],null)),xL(Fj([mL,nL,oL,pL,qL,rL,sL,tL,uL,vL,wL,lL],[new K(null,8,5,M,[l7,p3,J6,U3,l5,i2,Z6,K3],null),null,null,new K(null,9,5,M,[function(a){return df(a)},function(a){return yf(a,R)},function(a){return yf(a,S)},function(a){return yf(a,xz)},function(a){return yf(a,DQ)},function(a){return yf(a,y1)},function(a){return yf(a,iX)},function(a){return yf(a,jR)},function(a){return yf(a,mX)}],null),function(a){return df(a)&&yf(a,R)&&yf(a,S)&&yf(a,xz)&&
yf(a,DQ)&&yf(a,y1)&&yf(a,iX)&&yf(a,jR)&&yf(a,mX)},fi,new K(null,8,5,M,[l7,p3,J6,U3,l5,i2,Z6,K3],null),null,new K(null,8,5,M,[R,S,xz,DQ,y1,iX,jR,mX],null),fi,new K(null,9,5,M,[N(qO,new K(null,1,5,M,[JK],null),N(rO,JK)),N(qO,new K(null,1,5,M,[JK],null),N(sO,JK,R)),N(qO,new K(null,1,5,M,[JK],null),N(sO,JK,S)),N(qO,new K(null,1,5,M,[JK],null),N(sO,JK,xz)),N(qO,new K(null,1,5,M,[JK],null),N(sO,JK,DQ)),N(qO,new K(null,1,5,M,[JK],null),N(sO,JK,y1)),N(qO,new K(null,1,5,M,[JK],null),N(sO,JK,iX)),N(qO,new K(null,
@ -6866,5 +6866,5 @@ d.export=function(){return OW(function(a){if(yf(a,Q))return null;var b=A(a,0,nul
d.addLibraryColor=function(a){var b=this.file;a=C1(a);var c=R.J(a);c=g(c)?c:CV();this.file=I.N(H0(b,new f(null,2,[Q,v2,aV,I.N(a,R,c)],null)),b1,c);return k.J(b1.J(this.file))};d.updateLibraryColor=function(a){var b=this.file;a=C1(a);var c=Dm(R.J(a));this.file=I.N(H0(b,new f(null,2,[Q,G4,aV,I.N(a,R,c)],null)),b1,R.J(a));return k.J(b1.J(this.file))};d.getId=function(){return R.J(this.file)};d.finishComponent=function(){return this.file=Yza(this.file)};d.getCurrentPageId=function(){return M0.J(this.file)};
d.closeSVG=function(){return this.file=i1(this.file)};d.addGroup=function(a){var b=this.file;a=C1(a);var c=K0.J(b);a=Y0(SV(I.U(a,Q,YH,y([uV,c]))),b,YH);this.file=Yp.ba(X0(I.N(V0(b,a),b1,R.J(a)),S.J(a)),S0,P0,R.J(a));return k.J(b1.J(this.file))};d.addLibraryMedia=function(a){var b=this.file;a=C1(a);var c=R.J(a);c=g(c)?c:CV();this.file=I.N(H0(b,new f(null,2,[Q,Z2,tu,I.N(a,R,c)],null)),b1,c);return k.J(b1.J(this.file))};d.asMap=function(){return Zo(this.file)};
d.addArtboard=function(a){var b=this.file;a=C1(a);a=Y0(SV(I.N(a,Q,sR)),b,sR);this.file=Yp.ba(X0(I.N(I.N(V0(b,a),K0,R.J(a)),b1,R.J(a)),S.J(a)),S0,P0,R.J(a));return k.J(b1.J(this.file))};d.newId=function(){return CV()};d.deleteObject=function(a){var b=this.file;a=Dm(a);var c=M0.J(b);return this.file=H0(b,new f(null,4,[Q,c1,L0,c,U0,!0,R,a],null))};export const renderPage=function(a,b){b=Dm(b);var c=fp.j(a.file,new K(null,3,5,M,[nB,oR,b],null));return cua(function(e,h){var m=Tta(Nza(c));return Pta(m,e,h)})};
export const createFile=function(a){var b=UU;UU=bBa;try{var c=CV(),e=I.N,h=G(new f(null,3,[R,c,S,a,sSa,!1],null)),m=B.j(h,nSa),q=B.j(h,eJ),r=B.N(h,sSa,!0),u=B.j(h,S),w=B.N(h,vMa,0),z=B.j(h,jR),C=B.j(h,oSa),E=B.j(h,L0),H=B.j(h,pSa),J=B.j(h,R),O=B.N(h,uAa,!1),P=g(J)?J:CV(),W=g(r)?g(E)?tX(P,E):tX(P,CV()):tX(P,null),V=Fj([eJ,S,vMa,jR,oSa,pSa,R,uAa,BAa,nSa,nB],[q,u,w,z,C,H,P,O,46,m,W]);var Z=xp(V);var ba=e.call(I,Z,O0,fi);return new dBa(ba)}finally{UU=b}};
export const createFile=function(a){var b=UU;UU=bBa;try{var c=CV(),e=I.N,h=G(new f(null,3,[R,c,S,a,sSa,!1],null)),m=B.j(h,nSa),q=B.j(h,eJ),r=B.N(h,sSa,!0),u=B.j(h,S),w=B.N(h,vMa,0),z=B.j(h,jR),C=B.j(h,oSa),E=B.j(h,L0),H=B.j(h,pSa),J=B.j(h,R),O=B.N(h,uAa,!1),P=g(J)?J:CV(),W=g(r)?g(E)?tX(P,E):tX(P,CV()):tX(P,null),V=Fj([eJ,S,vMa,jR,oSa,pSa,R,uAa,BAa,nSa,nB],[q,u,w,z,C,H,P,O,47,m,W]);var Z=xp(V);var ba=e.call(I,Z,O0,fi);return new dBa(ba)}finally{UU=b}};
//# sourceMappingURL=penpot.js.map

View file

@ -29,7 +29,6 @@ export interface PenpotFile {
// deleteLibraryTypography(typography: any): void;
startComponent(component: ComponentShape): Uuid;
finishComponent(): void;
// createComponentInstance(instance: any): void;
// lookupShape(shapeId: string): PenpotNode;
// updateObject(id: string, object: any): void;
// deleteObject(id: string): void;

View file

@ -1,3 +1,4 @@
import { LayoutAttributes, LayoutChildAttributes } from '@ui/lib/types/shapes/layout';
import {
ShapeAttributes,
ShapeBaseAttributes,
@ -10,6 +11,8 @@ export type ComponentShape = ShapeBaseAttributes &
ShapeAttributes &
ShapeGeomAttributes &
ComponentAttributes &
LayoutAttributes &
LayoutChildAttributes &
Children;
export type ComponentAttributes = {

View file

@ -13,6 +13,8 @@ import { Uuid } from '@ui/lib/types/utils/uuid';
export type ShapeBaseAttributes = {
id?: Uuid;
figmaId?: string; // @TODO: move to any other place
figmaRelatedId?: string; // @TODO: move to any other place
name?: string;
type?:
| 'frame'
@ -24,7 +26,8 @@ export type ShapeBaseAttributes = {
| 'circle'
| 'svg-raw'
| 'image'
| 'component';
| 'component'
| 'instance';
selrect?: Selrect;
points?: Point[];
transform?: Matrix;

View file

@ -0,0 +1,19 @@
import { Uuid } from '@ui/lib/types/utils/uuid';
class IdLibrary {
private idMap: Map<string, Uuid> = new Map();
public init() {
this.idMap.clear();
}
public get(figmaId: string): Uuid | undefined {
return this.idMap.get(figmaId);
}
public register(figmaId: string, id: Uuid) {
this.idMap.set(figmaId, id);
}
}
export const idLibrary = new IdLibrary();

View file

@ -1,14 +1,20 @@
import { PenpotFile } from '@ui/lib/types/penpotFile';
import { FrameShape } from '@ui/lib/types/shapes/frameShape';
import { Uuid } from '@ui/lib/types/utils/uuid';
import { parseFigmaId } from '@ui/parser';
import { symbolBlendMode, symbolFillGradients } from '@ui/parser/creators/symbols';
import { createItems } from '.';
export const createArtboard = (
file: PenpotFile,
{ type, fills, blendMode, children = [], ...rest }: FrameShape
) => {
{ type, fills, blendMode, children = [], figmaId, figmaRelatedId, shapeRef, ...rest }: FrameShape
): Uuid | undefined => {
const id = parseFigmaId(file, figmaId);
file.addArtboard({
id,
shapeRef: shapeRef ?? parseFigmaId(file, figmaRelatedId, true),
fills: symbolFillGradients(fills),
blendMode: symbolBlendMode(blendMode),
...rest
@ -17,4 +23,6 @@ export const createArtboard = (
createItems(file, children);
file.closeArtboard();
return id;
};

View file

@ -1,14 +1,17 @@
import { PenpotFile } from '@ui/lib/types/penpotFile';
import { BoolShape } from '@ui/lib/types/shapes/boolShape';
import { parseFigmaId } from '@ui/parser';
import { symbolBlendMode, symbolBoolType, symbolFillGradients } from '@ui/parser/creators/symbols';
import { createItems } from '.';
export const createBool = (
file: PenpotFile,
{ type, fills, boolType, blendMode, children = [], ...rest }: BoolShape
{ type, fills, boolType, blendMode, figmaId, figmaRelatedId, children = [], ...rest }: BoolShape
) => {
file.addBool({
id: parseFigmaId(file, figmaId),
shapeRef: parseFigmaId(file, figmaRelatedId, true),
fills: symbolFillGradients(fills),
blendMode: symbolBlendMode(blendMode),
boolType: symbolBoolType(boolType),

View file

@ -1,12 +1,15 @@
import { PenpotFile } from '@ui/lib/types/penpotFile';
import { CircleShape } from '@ui/lib/types/shapes/circleShape';
import { parseFigmaId } from '@ui/parser';
import { symbolBlendMode, symbolFillGradients } from '@ui/parser/creators/symbols';
export const createCircle = (
file: PenpotFile,
{ type, fills, blendMode, ...rest }: CircleShape
{ type, fills, blendMode, figmaId, figmaRelatedId, ...rest }: CircleShape
) => {
file.createCircle({
id: parseFigmaId(file, figmaId),
shapeRef: parseFigmaId(file, figmaRelatedId, true),
fills: symbolFillGradients(fills),
blendMode: symbolBlendMode(blendMode),
...rest

View file

@ -7,24 +7,28 @@ import { ComponentRoot } from '@ui/types';
import { createArtboard } from '.';
export const createComponent = (file: PenpotFile, { figmaId }: ComponentRoot) => {
const frameId = file.newId();
const componentId = file.newId();
const component = componentsLibrary.get(figmaId);
if (!component) {
return;
}
createArtboard(file, {
const uiComponent = uiComponents.get(figmaId);
const componentId = uiComponent?.componentId ?? file.newId();
const frameId = createArtboard(file, {
...component,
showContent: true,
componentFile: file.getId(),
componentId: componentId,
componentId,
componentRoot: true,
mainInstance: true,
id: frameId,
type: 'frame'
});
if (!frameId) {
return;
}
uiComponents.register(figmaId, {
componentId,
mainInstancePage: file.getCurrentPageId(),

View file

@ -0,0 +1,44 @@
import { PenpotFile } from '@ui/lib/types/penpotFile';
import { parseFigmaId } from '@ui/parser';
import { uiComponents } from '@ui/parser/libraries';
import { ComponentInstance } from '@ui/types';
import { createArtboard } from '.';
export const createComponentInstance = (
file: PenpotFile,
{
type,
mainComponentFigmaId,
figmaId,
figmaRelatedId,
isComponentRoot,
...rest
}: ComponentInstance
) => {
let uiComponent = uiComponents.get(mainComponentFigmaId);
if (!uiComponent) {
const mainInstanceId = parseFigmaId(file, mainComponentFigmaId);
if (!mainInstanceId) {
return;
}
uiComponent = {
componentId: file.newId(),
componentFigmaId: mainComponentFigmaId,
mainInstanceId
};
uiComponents.register(mainComponentFigmaId, uiComponent);
}
createArtboard(file, {
...rest,
showContent: true,
shapeRef: uiComponent.mainInstanceId,
componentFile: file.getId(),
componentRoot: isComponentRoot,
componentId: uiComponent.componentId,
type: 'frame'
});
};

View file

@ -1,14 +1,17 @@
import { PenpotFile } from '@ui/lib/types/penpotFile';
import { GroupShape } from '@ui/lib/types/shapes/groupShape';
import { parseFigmaId } from '@ui/parser';
import { symbolBlendMode } from '@ui/parser/creators/symbols';
import { createItems } from '.';
export const createGroup = (
file: PenpotFile,
{ type, blendMode, children = [], ...rest }: GroupShape
{ type, blendMode, children = [], figmaId, figmaRelatedId, ...rest }: GroupShape
) => {
file.addGroup({
id: parseFigmaId(file, figmaId),
shapeRef: parseFigmaId(file, figmaRelatedId, true),
blendMode: symbolBlendMode(blendMode),
...rest
});

View file

@ -6,6 +6,7 @@ import {
createBool,
createCircle,
createComponent,
createComponentInstance,
createGroup,
createPath,
createRectangle,
@ -36,5 +37,7 @@ const createItem = (file: PenpotFile, node: PenpotNode) => {
return createBool(file, node);
case 'component':
return createComponent(file, node);
case 'instance':
return createComponentInstance(file, node);
}
};

View file

@ -1,5 +1,6 @@
import { PenpotFile } from '@ui/lib/types/penpotFile';
import { PathShape } from '@ui/lib/types/shapes/pathShape';
import { parseFigmaId } from '@ui/parser';
import {
symbolBlendMode,
symbolFillGradients,
@ -8,9 +9,11 @@ import {
export const createPath = (
file: PenpotFile,
{ type, fills, blendMode, content, ...rest }: PathShape
{ type, fills, blendMode, content, figmaId, figmaRelatedId, ...rest }: PathShape
) => {
file.createPath({
id: parseFigmaId(file, figmaId),
shapeRef: parseFigmaId(file, figmaRelatedId, true),
fills: symbolFillGradients(fills),
blendMode: symbolBlendMode(blendMode),
content: symbolPathContent(content),

View file

@ -1,12 +1,15 @@
import { PenpotFile } from '@ui/lib/types/penpotFile';
import { RectShape } from '@ui/lib/types/shapes/rectShape';
import { parseFigmaId } from '@ui/parser';
import { symbolBlendMode, symbolFillGradients } from '@ui/parser/creators/symbols';
export const createRectangle = (
file: PenpotFile,
{ type, fills, blendMode, ...rest }: RectShape
{ type, fills, blendMode, figmaId, figmaRelatedId, ...rest }: RectShape
) => {
file.createRect({
id: parseFigmaId(file, figmaId),
shapeRef: parseFigmaId(file, figmaRelatedId, true),
fills: symbolFillGradients(fills),
blendMode: symbolBlendMode(blendMode),
...rest

View file

@ -1,9 +1,15 @@
import { PenpotFile } from '@ui/lib/types/penpotFile';
import { TextShape } from '@ui/lib/types/shapes/textShape';
import { parseFigmaId } from '@ui/parser';
import { symbolBlendMode } from '@ui/parser/creators/symbols';
export const createText = (file: PenpotFile, { type, blendMode, ...rest }: TextShape) => {
export const createText = (
file: PenpotFile,
{ type, blendMode, figmaId, figmaRelatedId, ...rest }: TextShape
) => {
file.createText({
id: parseFigmaId(file, figmaId),
shapeRef: parseFigmaId(file, figmaRelatedId, true),
blendMode: symbolBlendMode(blendMode),
...rest
});

View file

@ -1,8 +1,9 @@
export * from './createComponentLibrary';
export * from './createArtboard';
export * from './createBool';
export * from './createCircle';
export * from './createComponent';
export * from './createComponentInstance';
export * from './createComponentLibrary';
export * from './createGroup';
export * from './createItems';
export * from './createPage';

View file

@ -1 +1,3 @@
export * from './IdLibrary';
export * from './parse';
export * from './parseFigmaId';

View file

@ -2,7 +2,7 @@ import { Uuid } from '@ui/lib/types/utils/uuid';
type UiComponent = {
componentId: Uuid;
mainInstancePage: Uuid;
mainInstancePage?: Uuid;
mainInstanceId: Uuid;
componentFigmaId: string;
};

View file

@ -5,9 +5,12 @@ import { createComponentLibrary, createPage } from '@ui/parser/creators';
import { uiComponents } from '@ui/parser/libraries/UiComponents';
import { PenpotDocument } from '@ui/types';
import { idLibrary } from '.';
export const parse = ({ name, children = [], components }: PenpotDocument) => {
componentsLibrary.init(components);
uiComponents.init();
idLibrary.init();
const file = createFile(name);

View file

@ -0,0 +1,27 @@
import { PenpotFile } from '@ui/lib/types/penpotFile';
import { Uuid } from '@ui/lib/types/utils/uuid';
import { idLibrary } from '.';
export const parseFigmaId = (
file: PenpotFile,
figmaId?: string,
shapeRef: boolean = false
): Uuid | undefined => {
if (!figmaId) {
if (shapeRef) {
return;
}
return file.newId();
}
const id = idLibrary.get(figmaId);
if (id) {
return id;
}
const newId = file.newId();
idLibrary.register(figmaId, newId);
return newId;
};

19
ui-src/types/component.ts Normal file
View file

@ -0,0 +1,19 @@
import { LayoutAttributes, LayoutChildAttributes } from '@ui/lib/types/shapes/layout';
import { ShapeGeomAttributes } from '@ui/lib/types/shapes/shape';
import { Children } from '@ui/lib/types/utils/children';
export type ComponentRoot = {
figmaId: string;
type: 'component';
};
export type ComponentInstance = ShapeGeomAttributes &
LayoutAttributes &
LayoutChildAttributes &
Children & {
mainComponentFigmaId: string;
figmaId?: string;
figmaRelatedId?: string;
isComponentRoot: boolean;
type: 'instance';
};

View file

@ -1,4 +0,0 @@
export type ComponentRoot = {
figmaId: string;
type: 'component';
};

View file

@ -1,3 +1,3 @@
export * from './componentRoot';
export * from './component';
export * from './penpotDocument';
export * from './penpotNode';

View file

@ -5,7 +5,7 @@ import { GroupShape } from '@ui/lib/types/shapes/groupShape';
import { PathShape } from '@ui/lib/types/shapes/pathShape';
import { RectShape } from '@ui/lib/types/shapes/rectShape';
import { TextShape } from '@ui/lib/types/shapes/textShape';
import { ComponentRoot } from '@ui/types';
import { ComponentInstance, ComponentRoot } from '@ui/types';
export type PenpotNode =
| FrameShape
@ -15,4 +15,5 @@ export type PenpotNode =
| CircleShape
| TextShape
| BoolShape
| ComponentInstance
| ComponentRoot;