(function(){
shadow$provide[583]=function(wa,V,Ta,E){var p=V(2),S=V(201).Buffer;!function(A,q){"object"==typeof E&&"object"==typeof Ta?Ta.exports=q(V(22),V(31)):"function"==typeof define&&define.amd?define(["react","react-dom"],q):"object"==typeof E?E.ExcalidrawLib=q(V(22),V(31)):A.ExcalidrawLib=q(A.React,A.ReactDOM)}(self,function(A,q){return function(){function d(k){var h=C[k];if(void 0!==h)return h.exports;h=C[k]={id:k,loaded:!1,exports:{}};return B[k].call(h.exports,h,h.exports,d),h.loaded=!0,h.exports}var r,
B={7945:function(k,h,f){k.exports=f(1602)},45:function(k,h,f){function w(J){var z,u,t="";if("string"==typeof J||"number"==typeof J)t+=J;else if("object"==typeof J)if(Array.isArray(J))for(z=0;z<J.length;z++)J[z]&&(u=w(J[z]))&&(t&&(t+=" "),t+=u);else for(z in J)J[z]&&(t&&(t+=" "),t+=z);return t}function x(){for(var J,z,u=0,t="";u<arguments.length;)(J=arguments[u++])&&(z=w(J))&&(t&&(t+=" "),t+=z);return t}f.d(h,{Z:function(){return x}})},6233:function(k,h){k=function(f){function w(z){for(var u=-1,t=
0,n=z.length-7;t<n;)u=(u=(u=(u=(u=(u=(u=(u=u>>>8^x[255&(u^z[t++])])>>>8^x[255&(u^z[t++])])>>>8^x[255&(u^z[t++])])>>>8^x[255&(u^z[t++])])>>>8^x[255&(u^z[t++])])>>>8^x[255&(u^z[t++])])>>>8^x[255&(u^z[t++])])>>>8^x[255&(u^z[t++])];for(;t<n+7;)u=u>>>8^x[255&(u^z[t++])];return-1^u}f.version="0.3.0";var x=function(){for(var z=0,u=Array(256),t=0;256!=t;++t)z=1&(z=1&(z=1&(z=1&(z=1&(z=1&(z=1&(z=1&(z=t)?-306674912^z>>>1:z>>>1)?-306674912^z>>>1:z>>>1)?-306674912^z>>>1:z>>>1)?-306674912^z>>>1:z>>>1)?-306674912^
z>>>1:z>>>1)?-306674912^z>>>1:z>>>1)?-306674912^z>>>1:z>>>1)?-306674912^z>>>1:z>>>1,u[t]=z;return"undefined"!=typeof Int32Array?new Int32Array(u):u}(),J="undefined"!=typeof S;f.table=x;f.bstr=function(z){if(32768<z.length&&J)return w(new S(z));for(var u=-1,t=z.length-1,n=0;n<t;)u=x[255&(u^z.charCodeAt(n++))]^u>>>8,u=x[255&(u^z.charCodeAt(n++))]^u>>>8;return n===t&&(u=u>>>8^x[255&(u^z.charCodeAt(n))]),-1^u};f.buf=function(z){if(1E4<z.length)return w(z);for(var u=-1,t=0,n=z.length-3;t<n;)u=(u=(u=(u=
u>>>8^x[255&(u^z[t++])])>>>8^x[255&(u^z[t++])])>>>8^x[255&(u^z[t++])])>>>8^x[255&(u^z[t++])];for(;t<n+3;)u=u>>>8^x[255&(u^z[t++])];return-1^u};f.str=function(z){for(var u,t,n=-1,R=0,ka=z.length;R<ka;)128>(u=z.charCodeAt(R++))?n=n>>>8^x[255&(n^u)]:2048>u?n=(n=n>>>8^x[255&(n^(192|u>>6&31))])>>>8^x[255&(n^(128|63&u))]:55296<=u&&57344>u?(u=64+(1023&u),t=1023&z.charCodeAt(R++),n=(n=(n=(n=n>>>8^x[255&(n^(240|u>>8&7))])>>>8^x[255&(n^(128|u>>2&63))])>>>8^x[255&(n^(128|t>>6&15|3&u))])>>>8^x[255&(n^(128|63&
t))]):n=(n=(n=n>>>8^x[255&(n^(224|u>>12&15))])>>>8^x[255&(n^(128|u>>6&63))])>>>8^x[255&(n^(128|63&u))];return-1^n}};"undefined"==typeof DO_NOT_EXPORT_CRC?k(h):k({})},4739:function(k,h,f){function w(Ea,Oa){const Za="atom"+ ++Ua,Ma={toString:()=>Za};return"function"==typeof Ea?Ma.read=Ea:(Ma.init=Ea,Ma.read=fb=>fb(Ma),Ma.write=(fb,eb,Na)=>eb(Ma,"function"==typeof Na?Na(fb(Ma)):Na)),Oa&&(Ma.write=Oa),Ma}function x(Ea,Oa){Oa=ba(Oa);const {s:Za}=(0,u.useContext)(Oa),Ma=(0,u.useCallback)(Ca=>{Ca=Za.r(Ea,
Ca);if("e"in Ca)throw Ca.e;if("p"in Ca)throw Ca.p;if("v"in Ca)return Ca.v;throw Error("no atom value");},[Za,Ea]),[[fb,eb,Na],oa]=(0,u.useReducer)((0,u.useCallback)((Ca,ra)=>{const Aa=Ma(ra);return Object.is(Ca[1],Aa)&&Ca[2]===Ea?Ca:[ra,Aa,Ea]},[Ma,Ea]),void 0,()=>[void 0,Ma(void 0),Ea]);return Na!==Ea&&oa(void 0),(0,u.useEffect)(()=>{const Ca=Za.s(Ea,oa);return oa(void 0),Ca},[Za,Ea]),(0,u.useEffect)(()=>{Za.c(Ea,fb)}),(0,u.useDebugValue)(eb),eb}function J(Ea,Oa){Oa=ba(Oa);const {s:Za,w:Ma}=(0,u.useContext)(Oa);
return(0,u.useCallback)(fb=>{if(!("write"in Ea))throw Error("not writable atom");const eb=Na=>Za.w(Ea,fb,Na);return Ma?Ma(eb):Za.w(Ea,fb,void 0)},[Za,Ma,Ea])}function z(Ea,Oa){return"scope"in Ea&&(console.warn("atom.scope is deprecated. Please do useAtom(atom, scope) instead."),Oa=Ea.scope),[x(Ea,Oa),J(Ea,Oa)]}f.d(h,{KO:function(){return z},Vv:function(){return D},cn:function(){return w},zt:function(){return Ha}});var u=f(9787);const t=Symbol(),n=Ea=>{var Oa,Za;null==(Za=(Oa=Ea[t]).c)||Za.call(Oa)},
R=(Ea,Oa)=>{const Za=Ea[t].o,Ma=Oa[t].o;return Za===Ma||Ea===Ma||!!Za[t]&&R(Za,Oa)},ka=Ea=>{const Oa={o:Ea,c:null},Za=new Promise(Ma=>{Oa.c=()=>{Oa.c=null;Ma()};Ea.then(Oa.c,Oa.c)});return Za[t]=Oa,Za};var L=Object.defineProperty,ma=Object.defineProperties,Y=Object.getOwnPropertyDescriptors,fa=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,aa=Object.prototype.propertyIsEnumerable,M=(Ea,Oa,Za)=>Oa in Ea?L(Ea,Oa,{enumerable:!0,configurable:!0,writable:!0,value:Za}):Ea[Oa]=Za;const Q=
Ea=>{const Oa=new WeakMap,Za=new WeakMap,Ma=new Map;let fb,eb;if(fb=new Set,eb=new Set,Ea)for(const [Gb,xc]of Ea)Ea={v:xc,r:0,d:new Map},Object.freeze(Ea),"init"in Gb||console.warn("Found initial value for derived atom which can cause unexpected behavior",Gb),Oa.set(Gb,Ea);const Na=new WeakMap,oa=new WeakMap,Ca=Gb=>{let xc=oa.get(Gb);return xc||(xc=new Map,oa.set(Gb,xc)),xc},ra=(Gb,xc)=>{if(Gb){const Wc=Ca(Gb);let hd=Wc.get(xc);return hd||(hd=ra(Gb.p,xc),hd&&("p"in hd&&hd.p.then(()=>Wc.delete(xc)),
Wc.set(xc,hd))),hd}return Oa.get(xc)},Aa=(Gb,xc,Wc)=>{(Object.freeze(Wc),Gb)?Ca(Gb).set(xc,Wc):(Gb=Oa.get(xc),Oa.set(xc,Wc),Ma.has(xc)||Ma.set(xc,Gb))},Ja=(Gb,xc=new Map,Wc)=>{if(!Wc)return xc;const hd=new Map;let Nd=!1;return Wc.forEach(Ld=>{var pc;const Ed=(null==(pc=ra(Gb,Ld))?void 0:pc.r)||0;hd.set(Ld,Ed);xc.get(Ld)!==Ed&&(Nd=!0)}),xc.size!==hd.size||Nd?hd:xc},Sa=(Gb,xc,Wc,hd,Nd)=>{const Ld=ra(Gb,xc);if(Ld){if(Nd&&!("p"in Ld&&R(Ld.p,Nd)))return Ld;"p"in Ld&&n(Ld.p)}hd={v:Wc,r:(null==Ld?void 0:
Ld.r)||0,d:Ja(Gb,null==Ld?void 0:Ld.d,hd)};return Ld&&"v"in Ld&&Object.is(Ld.v,Wc)?hd.d===Ld.d||hd.d.size===Ld.d.size&&Array.from(hd.d.keys()).every(pc=>Ld.d.has(pc))||Promise.resolve().then(()=>{Nc(Gb)}):(++hd.r,hd.d.has(xc)&&(hd.d=(new Map(hd.d)).set(xc,hd.r))),Aa(Gb,xc,hd),hd},Bb=(Gb,xc,Wc,hd,Nd)=>{const Ld=ra(Gb,xc);if(Ld){if(Nd&&!("p"in Ld&&R(Ld.p,Nd)))return Ld;"p"in Ld&&n(Ld.p)}Wc={e:Wc,r:(null==Ld?void 0:Ld.r)||0,d:Ja(Gb,null==Ld?void 0:Ld.d,hd)};return Aa(Gb,xc,Wc),Wc},ib=(Gb,xc,Wc,hd)=>
{const Nd=ra(Gb,xc);if(Nd&&"p"in Nd){if(R(Nd.p,Wc))return Nd;n(Nd.p)}((Ld,pc,Ed)=>{let xd=Na.get(pc);xd||(xd=new Map,Na.set(pc,xd));Ed.then(()=>{xd.get(Ld)===Ed&&(xd.delete(Ld),xd.size||Na.delete(pc))});xd.set(Ld,Ed)})(Gb,xc,Wc);Wc={p:Wc,r:(null==Nd?void 0:Nd.r)||0,d:Ja(Gb,null==Nd?void 0:Nd.d,hd)};return Aa(Gb,xc,Wc),Wc},Ob=(Gb,xc,Wc,hd)=>{if(Wc instanceof Promise){const Nd=ka(Wc.then(Ld=>{Sa(Gb,xc,Ld,hd,Nd);Nc(Gb)}).catch(Ld=>{if(Ld instanceof Promise)return Ld[t]?Ld.then(()=>{Wb(Gb,xc,!0)}):Ld;
Bb(Gb,xc,Ld,hd,Nd);Nc(Gb)}));return ib(Gb,xc,Nd,hd)}return Sa(Gb,xc,Wc,hd)},Wb=(Gb,xc,Wc)=>{if(!Wc&&(Wc=ra(Gb,xc))&&(Wc.r!==Wc.i&&"p"in Wc&&Wc.p[t].c||(Wc.d.forEach((Ld,pc)=>{pc!==xc&&(Za.has(pc)?(Ld=ra(Gb,pc))&&Ld.r===Ld.i&&Wb(Gb,pc):Wb(Gb,pc))}),Array.from(Wc.d).every(([Ld,pc])=>(Ld=ra(Gb,Ld))&&"v"in Ld&&Ld.r===pc))))return Wc;const hd=new Set;try{var Nd=xc.read(Ld=>{hd.add(Ld);const pc=Ld===xc?ra(Gb,Ld):Wb(Gb,Ld);if(pc){if("e"in pc)throw pc.e;if("p"in pc)throw pc.p;return pc.v}if("init"in Ld)return Ld.init;
throw Error("no atom init");});return Ob(Gb,xc,Nd,hd)}catch(Ld){return Ld instanceof Promise?(Nd=ka(Ld),ib(Gb,xc,Nd,hd)):Bb(Gb,xc,Ld,hd)}},ic=(Gb,xc)=>!xc.l.size&&(!xc.t.size||1===xc.t.size&&xc.t.has(Gb)),Pa=(Gb,xc)=>{const Wc=Za.get(xc);null==Wc||Wc.t.forEach(hd=>{if(hd!==xc){const Yd=ra(Gb,hd);if(Yd){"p"in Yd&&n(Yd.p);var Nd={},Ld=Yd,pc;for(pc in Ld||={})H.call(Ld,pc)&&M(Nd,pc,Ld[pc]);if(fa)for(pc of fa(Ld))aa.call(Ld,pc)&&M(Nd,pc,Ld[pc]);Nd=(Ed=Nd,xd={i:Yd.r},ma(Ed,Y(xd)));Aa(Gb,hd,Nd)}else console.warn("[Bug] could not invalidate non existing atom",
hd);var Ed,xd;Pa(Gb,hd)}})},nb=(Gb,xc,Wc)=>{let hd=!0;const Nd=(Ld,pc)=>{const Ed=Wb(Gb,Ld);if("e"in Ed)throw Ed.e;if("p"in Ed){if(null==pc?0:pc.unstable_promise)return Ed.p.then(()=>Nd(Ld,pc));throw console.info("Reading pending atom state in write operation. We throw a promise for now.",Ld),Ed.p;}if("v"in Ed)return Ed.v;throw console.warn("[Bug] no value found while reading atom in write operation. This is probably a bug.",Ld),Error("no value found");};Wc=xc.write(Nd,(Ld,pc)=>{let Ed;if(Ld===xc){if(!("init"in
Ld))throw Error("atom not writable");(xd=>{const Yd=new Set,ud=Na.get(xd);return ud&&(Na.delete(xd),ud.forEach((Qd,ld)=>{n(Qd);Yd.add(ld)})),Yd})(Ld).forEach(xd=>{xd!==Gb&&Ob(xd,Ld,pc)});Ob(Gb,Ld,pc);Pa(Gb,Ld)}else Ed=nb(Gb,Ld,pc);return hd||Nc(Gb),Ed},Wc);return hd=!1,Gb=void 0,Wc},ob=(Gb,xc,Wc)=>{Gb=nb(Wc,Gb,xc);return Nc(Wc),Gb},Zb=(Gb,xc)=>{xc={t:new Set(xc&&[xc]),l:new Set};Za.set(Gb,xc);eb.add(Gb);if(Wb(void 0,Gb).d.forEach((Wc,hd)=>{(Wc=Za.get(hd))?Wc.t.add(Gb):hd!==Gb&&Zb(hd,Gb)}),Gb.write&&
Gb.onMount){const Wc=Gb.onMount(hd=>ob(Gb,hd));Wc&&(xc.u=Wc)}return xc},Jc=Gb=>{var xc;const Wc=null==(xc=Za.get(Gb))?void 0:xc.u;Wc&&Wc();Za.delete(Gb);eb.delete(Gb);(xc=ra(void 0,Gb))?xc.d.forEach((hd,Nd)=>{Nd!==Gb&&(hd=Za.get(Nd))&&(hd.t.delete(Gb),ic(Nd,hd)&&Jc(Nd))}):console.warn("[Bug] could not find atom state to unmount",Gb)},ad=(Gb,xc,Wc)=>{const hd=new Set(xc.d.keys());null==Wc||Wc.forEach((Nd,Ld)=>{if(hd.has(Ld))return void hd.delete(Ld);(Nd=Za.get(Ld))&&(Nd.t.delete(Gb),ic(Ld,Nd)&&Jc(Ld))});
hd.forEach(Nd=>{const Ld=Za.get(Nd);Ld?Ld.t.add(Gb):Za.has(Gb)&&Zb(Nd,Gb)})},Nc=Gb=>{if(Gb)Ca(Gb).forEach((xc,Wc)=>{xc!==Oa.get(Wc)&&(xc=Za.get(Wc),null==xc||xc.l.forEach(hd=>hd(Gb)))});else{for(;Ma.size;){const xc=Array.from(Ma);Ma.clear();xc.forEach(([Wc,hd])=>{const Nd=ra(void 0,Wc);Nd&&Nd.d!==(null==hd?void 0:hd.d)&&ad(Wc,Nd,null==hd?void 0:hd.d);Wc=Za.get(Wc);null==Wc||Wc.l.forEach(Ld=>Ld())})}fb.forEach(xc=>xc())}};return{r:(Gb,xc)=>Wb(xc,Gb),w:ob,c:(Gb,xc)=>{xc&&(Wc=>{Ca(Wc).forEach((hd,Nd)=>
{const Ld=Oa.get(Nd);(hd.r>((null==Ld?void 0:Ld.r)||0)||"v"in hd&&hd.r===(null==Ld?void 0:Ld.r)&&hd.d!==(null==Ld?void 0:Ld.d))&&(Oa.set(Nd,hd),hd.d!==(null==Ld?void 0:Ld.d)&&ad(Nd,hd,null==Ld?void 0:Ld.d))})})(xc);Nc(void 0)},s:(Gb,xc)=>{const Wc=(hd=>{let Nd=Za.get(hd);return Nd||=Zb(hd),Nd})(Gb).l;return Wc.add(xc),()=>{Wc.delete(xc);const hd=Za.get(Gb);hd&&ic(Gb,hd)&&Jc(Gb)}},h:(Gb,xc)=>{for(const [Wc,hd]of Gb)"init"in Wc&&(Ob(xc,Wc,hd),Pa(xc,Wc));Nc(xc)},n:Gb=>(fb.add(Gb),()=>{fb.delete(Gb)}),
l:()=>eb.values(),a:Gb=>Oa.get(Gb),m:Gb=>Za.get(Gb)}},D=Ea=>{const Oa=Q(Ea),Za=Ma=>new Promise((fb,eb)=>{const Na=Oa.r(Ma);"e"in Na?eb(Na.e):fb("p"in Na?Na.p.then(()=>Za(Ma)):Na.v)});return{get:Ma=>{Ma=Oa.r(Ma);if("e"in Ma)throw Ma.e;if(!("p"in Ma))return Ma.v},asyncGet:Za,set:(Ma,fb)=>Oa.w(Ma,fb),sub:(Ma,fb)=>Oa.s(Ma,fb),SECRET_INTERNAL_store:Oa}},O=(Ea,Oa)=>({s:Oa?Oa(Ea).SECRET_INTERNAL_store:Q(Ea)}),P=new Map,ba=Ea=>(P.has(Ea)||P.set(Ea,(0,u.createContext)(O())),P.get(Ea));var X=Object.defineProperty,
F=Object.defineProperties,ha=Object.getOwnPropertyDescriptors,K=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,ea=Object.prototype.propertyIsEnumerable,ca=(Ea,Oa,Za)=>Oa in Ea?X(Ea,Oa,{enumerable:!0,configurable:!0,writable:!0,value:Za}):Ea[Oa]=Za,pa=(Ea,Oa)=>{for(var Za in Oa||={})Z.call(Oa,Za)&&ca(Ea,Za,Oa[Za]);if(K)for(Za of K(Oa))ea.call(Oa,Za)&&ca(Ea,Za,Oa[Za]);return Ea};const za=Ea=>Ea.debugLabel||Ea.toString(),ya=([Ea,Oa])=>Object.fromEntries(Oa.flatMap(Za=>{var Ma,fb,eb=null==
(Ma=Ea.m)?void 0:Ma.call(Ea,Za);if(!eb)return[];Ma=eb.t;eb=(null==(fb=Ea.a)?void 0:fb.call(Ea,Za))||{};return[[Za.debugLabel||Za.toString(),(Na=pa(pa(pa({},"e"in eb&&{error:eb.e}),"p"in eb&&{promise:eb.p}),"v"in eb&&{value:eb.v}),oa={dependents:Array.from(Ma).map(za)},F(Na,ha(oa)))]];var Na,oa})),Ha=({children:Ea,initialValues:Oa,scope:Za,unstable_createStore:Ma,unstable_enableVersionedWrite:fb})=>{const [eb,Na]=(0,u.useState)();(0,u.useEffect)(()=>{eb&&(oa.current.s.c(null,eb),delete eb.p)},[eb]);
const oa=(0,u.useRef)();oa.current||(oa.current=O(Oa,Ma),fb&&(oa.current.w=Ca=>{Na(ra=>{ra=ra?{p:ra}:{};return Ca(ra),ra})}));fb||(Ca=>{const {s:ra}=Ca,[Aa,Ja]=(0,u.useState)([]);(0,u.useEffect)(()=>{var Sa;const Bb=()=>{var Ob;Ja(Array.from((null==(Ob=ra.l)?void 0:Ob.call(ra))||[]))},ib=null==(Sa=ra.n)?void 0:Sa.call(ra,Bb);return Bb(),ib},[ra]);(0,u.useDebugValue)([ra,Aa],ya)})(oa.current);Oa=ba(Za);return(0,u.createElement)(Oa.Provider,{value:oa.current},Ea)};let Ua=0},200:function(k,h,f){function w(fa,
H,aa){function M(ya){var Ha=ba,Ua=X;return ba=X=void 0,ea=ya,ha=fa.apply(Ua,Ha)}function Q(ya){var Ha=ya-Z;return void 0===Z||Ha>=H||0>Ha||pa&&ya-ea>=F}function D(){var ya=ka.Date.now();if(Q(ya))return O(ya);var Ha=setTimeout,Ua=H-(ya-Z);ya=pa?Y(Ua,F-(ya-ea)):Ua;K=Ha(D,ya)}function O(ya){return K=void 0,za&&ba?M(ya):(ba=X=void 0,ha)}function P(){var ya=ka.Date.now(),Ha=Q(ya);if(ba=arguments,X=this,Z=ya,Ha){if(void 0===K)return ya=Z,ea=ya,K=setTimeout(D,H),ca?M(ya):ha;if(pa)return K=setTimeout(D,H),
M(Z)}return void 0===K&&(K=setTimeout(D,H)),ha}var ba,X,F,ha,K,Z,ea=0,ca=!1,pa=!1,za=!0;if("function"!=typeof fa)throw new TypeError("Expected a function");return H=J(H)||0,x(aa)&&(ca=!!aa.leading,F=(pa="maxWait"in aa)?ma(J(aa.maxWait)||0,H):F,za="trailing"in aa?!!aa.trailing:za),P.cancel=function(){void 0!==K&&clearTimeout(K);ea=0;ba=Z=X=K=void 0},P.flush=function(){return void 0===K?ha:O(ka.Date.now())},P}function x(fa){var H=typeof fa;return!!fa&&("object"==H||"function"==H)}function J(fa){if("number"==
typeof fa)return fa;if("symbol"==typeof fa||fa&&"object"==typeof fa&&"[object Symbol]"==L.call(fa))return NaN;x(fa)&&(fa="function"==typeof fa.valueOf?fa.valueOf():fa,fa=x(fa)?fa+"":fa);if("string"!=typeof fa)return 0===fa?fa:+fa;fa=fa.replace(z,"");var H=t.test(fa);return H||n.test(fa)?R(fa.slice(2),H?2:8):u.test(fa)?NaN:+fa}var z=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,t=/^0b[01]+$/i,n=/^0o[0-7]+$/i,R=parseInt;h="object"==typeof self&&self&&self.Object===Object&&self;var ka="object"==typeof f.g&&f.g&&
f.g.Object===Object&&f.g||h||Function("return this")(),L=Object.prototype.toString,ma=Math.max,Y=Math.min;k.exports=function(fa,H,aa){var M=!0,Q=!0;if("function"!=typeof fa)throw new TypeError("Expected a function");return x(aa)&&(M="leading"in aa?!!aa.leading:M,Q="trailing"in aa?!!aa.trailing:Q),w(fa,H,{leading:M,maxWait:H,trailing:Q})}},2891:function(k,h,f){var w;k=f.nmd(k);(function(){function x(db,Eb,hc){switch(hc.length){case 0:return db.call(Eb);case 1:return db.call(Eb,hc[0]);case 2:return db.call(Eb,
hc[0],hc[1]);case 3:return db.call(Eb,hc[0],hc[1],hc[2])}return db.apply(Eb,hc)}function J(db,Eb,hc,jb){for(var gd=-1,Dd=null==db?0:db.length;++gd<Dd;){var ke=db[gd];Eb(jb,ke,hc(ke),db)}return jb}function z(db,Eb){for(var hc=-1,jb=null==db?0:db.length;++hc<jb&&!1!==Eb(db[hc],hc,db););return db}function u(db,Eb){for(var hc=null==db?0:db.length;hc--&&!1!==Eb(db[hc],hc,db););return db}function t(db,Eb){for(var hc=-1,jb=null==db?0:db.length;++hc<jb;)if(!Eb(db[hc],hc,db))return!1;return!0}function n(db,
Eb){for(var hc=-1,jb=null==db?0:db.length,gd=0,Dd=[];++hc<jb;){var ke=db[hc];Eb(ke,hc,db)&&(Dd[gd++]=ke)}return Dd}function R(db,Eb){return!(null==db||!db.length)&&-1<Q(db,Eb,0)}function ka(db,Eb,hc){for(var jb=-1,gd=null==db?0:db.length;++jb<gd;)if(hc(Eb,db[jb]))return!0;return!1}function L(db,Eb){for(var hc=-1,jb=null==db?0:db.length,gd=Array(jb);++hc<jb;)gd[hc]=Eb(db[hc],hc,db);return gd}function ma(db,Eb){for(var hc=-1,jb=Eb.length,gd=db.length;++hc<jb;)db[gd+hc]=Eb[hc];return db}function Y(db,
Eb,hc,jb){var gd=-1,Dd=null==db?0:db.length;for(jb&&Dd&&(hc=db[++gd]);++gd<Dd;)hc=Eb(hc,db[gd],gd,db);return hc}function fa(db,Eb,hc,jb){var gd=null==db?0:db.length;for(jb&&gd&&(hc=db[--gd]);gd--;)hc=Eb(hc,db[gd],gd,db);return hc}function H(db,Eb){for(var hc=-1,jb=null==db?0:db.length;++hc<jb;)if(Eb(db[hc],hc,db))return!0;return!1}function aa(db,Eb,hc){var jb;return hc(db,function(gd,Dd,ke){if(Eb(gd,Dd,ke))return jb=Dd,!1}),jb}function M(db,Eb,hc,jb){var gd=db.length;for(hc+=jb?1:-1;jb?hc--:++hc<
gd;)if(Eb(db[hc],hc,db))return hc;return-1}function Q(db,Eb,hc){if(Eb==Eb)a:{--hc;for(var jb=db.length;++hc<jb;)if(db[hc]===Eb){db=hc;break a}db=-1}else db=M(db,O,hc);return db}function D(db,Eb,hc,jb){--hc;for(var gd=db.length;++hc<gd;)if(jb(db[hc],Eb))return hc;return-1}function O(db){return db!=db}function P(db,Eb){var hc=null==db?0:db.length;return hc?ha(db,Eb)/hc:NaN}function ba(db){return function(Eb){return null==Eb?oa:Eb[db]}}function X(db){return function(Eb){return null==db?oa:db[Eb]}}function F(db,
Eb,hc,jb,gd){return gd(db,function(Dd,ke,Xd){hc=jb?(jb=!1,Dd):Eb(hc,Dd,ke,Xd)}),hc}function ha(db,Eb){for(var hc,jb=-1,gd=db.length;++jb<gd;){var Dd=Eb(db[jb]);Dd!==oa&&(hc=hc===oa?Dd:hc+Dd)}return hc}function K(db,Eb){for(var hc=-1,jb=Array(db);++hc<db;)jb[hc]=Eb(hc);return jb}function Z(db){return db?db.slice(0,Na(db)+1).replace(Gb,""):db}function ea(db){return function(Eb){return db(Eb)}}function ca(db,Eb){return L(Eb,function(hc){return db[hc]})}function pa(db,Eb){return db.has(Eb)}function za(db,
Eb){for(var hc=-1,jb=db.length;++hc<jb&&-1<Q(Eb,db[hc],0););return hc}function ya(db,Eb){for(var hc=db.length;hc--&&-1<Q(Eb,db[hc],0););return hc}function Ha(db){return"\\"+Mc[db]}function Ua(db){var Eb=-1,hc=Array(db.size);return db.forEach(function(jb,gd){hc[++Eb]=[gd,jb]}),hc}function Ea(db,Eb){return function(hc){return db(Eb(hc))}}function Oa(db,Eb){for(var hc=-1,jb=db.length,gd=0,Dd=[];++hc<jb;){var ke=db[hc];ke!==Eb&&"__lodash_placeholder__"!==ke||(db[hc]="__lodash_placeholder__",Dd[gd++]=
hc)}return Dd}function Za(db){var Eb=-1,hc=Array(db.size);return db.forEach(function(jb){hc[++Eb]=jb}),hc}function Ma(db){var Eb=-1,hc=Array(db.size);return db.forEach(function(jb){hc[++Eb]=[jb,jb]}),hc}function fb(db){if(cd.test(db)){for(var Eb=uc.lastIndex=0;uc.test(db);)++Eb;db=Eb}else db=Wf(db);return db}function eb(db){return cd.test(db)?db.match(uc)||[]:db.split("")}function Na(db){for(var Eb=db.length;Eb--&&xc.test(db.charAt(Eb)););return Eb}var oa,Ca=1/0,ra=[["ary",128],["bind",1],["bindKey",
2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],Aa=/\b__p \+= '';/g,Ja=/\b(__p \+=) '' \+/g,Sa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Bb=/&(?:amp|lt|gt|quot|#39);/g,ib=/[&<>"']/g,Ob=RegExp(Bb.source),Wb=RegExp(ib.source),ic=/<%-([\s\S]+?)%>/g,Pa=/<%([\s\S]+?)%>/g,nb=/<%=([\s\S]+?)%>/g,ob=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zb=/^\w*$/,Jc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ad=/[\\^$.*+?()[\]{}|]/g,
Nc=RegExp(ad.source),Gb=/^\s+/,xc=/\s/,Wc=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,hd=/\{\n\/\* \[wrapped with (.+)\] \*/,Nd=/,? & /,Ld=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pc=/[()=,{}\[\]\/\s]/,Ed=/\\(\\)?/g,xd=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Yd=/\w*$/,ud=/^[-+]0x[0-9a-f]+$/i,Qd=/^0b[01]+$/i,ld=/^\[object .+?Constructor\]$/,Sd=/^0o[0-7]+$/i,Nb=/^(?:0|[1-9]\d*)$/,gc=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Yb=/($^)/,qb=/['\n\r\u2028\u2029\\]/g,mb=RegExp("['’]","g"),cc=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",
"g"),uc=RegExp("\\ud83c[\\udffb-\\udfff](?\x3d\\ud83c[\\udffb-\\udfff])|(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",
"g"),Uc=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?\x3d[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?\x3d[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?\x3d\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?\x3d\\b|[A-Z_])|\\d+|(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",
"g"),cd=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Od=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,be="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),oe=-1,rd={};rd["[object Float32Array]"]=rd["[object Float64Array]"]=
rd["[object Int8Array]"]=rd["[object Int16Array]"]=rd["[object Int32Array]"]=rd["[object Uint8Array]"]=rd["[object Uint8ClampedArray]"]=rd["[object Uint16Array]"]=rd["[object Uint32Array]"]=!0;rd["[object Arguments]"]=rd["[object Array]"]=rd["[object ArrayBuffer]"]=rd["[object Boolean]"]=rd["[object DataView]"]=rd["[object Date]"]=rd["[object Error]"]=rd["[object Function]"]=rd["[object Map]"]=rd["[object Number]"]=rd["[object Object]"]=rd["[object RegExp]"]=rd["[object Set]"]=rd["[object String]"]=
rd["[object WeakMap]"]=!1;var vc={};vc["[object Arguments]"]=vc["[object Array]"]=vc["[object ArrayBuffer]"]=vc["[object DataView]"]=vc["[object Boolean]"]=vc["[object Date]"]=vc["[object Float32Array]"]=vc["[object Float64Array]"]=vc["[object Int8Array]"]=vc["[object Int16Array]"]=vc["[object Int32Array]"]=vc["[object Map]"]=vc["[object Number]"]=vc["[object Object]"]=vc["[object RegExp]"]=vc["[object Set]"]=vc["[object String]"]=vc["[object Symbol]"]=vc["[object Uint8Array]"]=vc["[object Uint8ClampedArray]"]=
vc["[object Uint16Array]"]=vc["[object Uint32Array]"]=!0;vc["[object Error]"]=vc["[object Function]"]=vc["[object WeakMap]"]=!1;var Mc={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"u2028"," ":"u2029"},Me=parseFloat,qc=parseInt,Le="object"==typeof f.g&&f.g&&f.g.Object===Object&&f.g,Sb="object"==typeof self&&self&&self.Object===Object&&self,Lc=Le||Sb||Function("return this")(),Ub=h&&!h.nodeType&&h,ed=Ub&&k&&!k.nodeType&&k,pe=ed&&ed.exports===Ub,le=pe&&Le.process;a:{try{var Dc=ed&&ed.require&&ed.require("util").types||
le&&le.binding&&le.binding("util");break a}catch(db){}Dc=void 0}var Cb=Dc&&Dc.isArrayBuffer,Kd=Dc&&Dc.isDate,ce=Dc&&Dc.isMap,pd=Dc&&Dc.isRegExp,mc=Dc&&Dc.isSet,Ne=Dc&&Dc.isTypedArray,Wf=ba("length"),cf=X({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O",
"Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H",
"Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U",
"Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","Ĳ":"IJ","ĳ":"ij","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"}),pg=X({"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#39;"}),bb=X({"\x26amp;":"\x26","\x26lt;":"\x3c","\x26gt;":"\x3e","\x26quot;":'"',"\x26#39;":"'"}),Db=function hc(Eb){function jb(Ga){if(Dg(Ga)&&!Nf(Ga)&&!(Ga instanceof ke)){if(Ga instanceof
Dd)return Ga;if(Rf.call(Ga,"__wrapped__"))return um(Ga)}return new Dd(Ga)}function gd(){}function Dd(Ga,Ya){this.__wrapped__=Ga;this.__actions__=[];this.__chain__=!!Ya;this.__index__=0;this.__values__=oa}function ke(Ga){this.__wrapped__=Ga;this.__actions__=[];this.__dir__=1;this.__filtered__=!1;this.__iteratees__=[];this.__takeCount__=4294967295;this.__views__=[]}function Xd(Ga){var Ya=-1,Ka=null==Ga?0:Ga.length;for(this.clear();++Ya<Ka;){var hb=Ga[Ya];this.set(hb[0],hb[1])}}function Xe(Ga){var Ya=
-1,Ka=null==Ga?0:Ga.length;for(this.clear();++Ya<Ka;){var hb=Ga[Ya];this.set(hb[0],hb[1])}}function qe(Ga){var Ya=-1,Ka=null==Ga?0:Ga.length;for(this.clear();++Ya<Ka;){var hb=Ga[Ya];this.set(hb[0],hb[1])}}function ff(Ga){var Ya=-1,Ka=null==Ga?0:Ga.length;for(this.__data__=new qe;++Ya<Ka;)this.add(Ga[Ya])}function vg(Ga){this.size=(this.__data__=new Xe(Ga)).size}function uf(Ga,Ya){var Ka=Nf(Ga),hb=!Ka&&bg(Ga),vb=!Ka&&!hb&&dh(Ga),Lb=!Ka&&!hb&&!vb&&Dk(Ga);hb=(Ka=Ka||hb||vb||Lb)?K(Ga.length,Tf):[];var Qa=
hb.length,vd;for(vd in Ga)!Ya&&!Rf.call(Ga,vd)||Ka&&("length"==vd||vb&&("offset"==vd||"parent"==vd)||Lb&&("buffer"==vd||"byteLength"==vd||"byteOffset"==vd)||mg(vd,Qa))||hb.push(vd);return hb}function Ab(Ga){var Ya=Ga.length;return Ya?Ga[Qj(0,Ya-1)]:oa}function sa(Ga,Ya){return $k(fj(Ga),Ue(Ya,0,Ga.length))}function qa(Ga){return $k(fj(Ga))}function Ia(Ga,Ya,Ka){(Ka===oa||qk(Ga[Ya],Ka))&&(Ka!==oa||Ya in Ga)||kd(Ga,Ya,Ka)}function cb(Ga,Ya,Ka){var hb=Ga[Ya];Rf.call(Ga,Ya)&&qk(hb,Ka)&&(Ka!==oa||Ya in
Ga)||kd(Ga,Ya,Ka)}function Jb(Ga,Ya){for(var Ka=Ga.length;Ka--;)if(qk(Ga[Ka][0],Ya))return Ka;return-1}function lc(Ga,Ya,Ka,hb){return xh(Ga,function(vb,Lb,Qa){Ya(hb,vb,Ka(vb),Qa)}),hb}function Sc(Ga,Ya){return Ga&&zg(Ya,Ai(Ya),Ga)}function kd(Ga,Ya,Ka){"__proto__"==Ya&&Qh?Qh(Ga,Ya,{configurable:!0,enumerable:!0,value:Ka,writable:!0}):Ga[Ya]=Ka}function ve(Ga,Ya){for(var Ka=-1,hb=Ya.length,vb=Tc(hb),Lb=null==Ga;++Ka<hb;)vb[Ka]=Lb?oa:Qg(Ga,Ya[Ka]);return vb}function Ue(Ga,Ya,Ka){return Ga==Ga&&(Ka!==
oa&&(Ga=Ga<=Ka?Ga:Ka),Ya!==oa&&(Ga=Ga>=Ya?Ga:Ya)),Ga}function Kf(Ga,Ya,Ka,hb,vb,Lb){var Qa,vd=1&Ya,he=2&Ya,Je=4&Ya;if(Ka&&(Qa=vb?Ka(Ga,hb,vb,Lb):Ka(Ga)),Qa!==oa)return Qa;if(!ih(Ga))return Ga;if(hb=Nf(Ga)){if(Qa=function(yb){var bc=yb.length,wc=new yb.constructor(bc);bc&&"string"==typeof yb[0]&&Rf.call(yb,"index")&&(wc.index=yb.index,wc.input=yb.input);return wc}(Ga),!vd)return fj(Ga,Qa)}else{var da=ji(Ga),va="[object Function]"==da||"[object GeneratorFunction]"==da;if(dh(Ga))return ej(Ga,vd);if("[object Object]"==
da||"[object Arguments]"==da||va&&!vb){if(Qa=he||va?{}:em(Ga),!vd)return he?function(yb,bc){return zg(yb,ch(yb),bc)}(Ga,function(yb,bc){return yb&&zg(bc,Qi(bc),yb)}(Qa,Ga)):function(yb,bc){return zg(yb,dl(yb),bc)}(Ga,Sc(Qa,Ga))}else{if(!vc[da])return vb?Ga:{};Qa=function(yb,bc,wc){var Xc=yb.constructor;switch(bc){case "[object ArrayBuffer]":return Nh(yb);case "[object Boolean]":case "[object Date]":return new Xc(+yb);case "[object DataView]":return function(td,Ud){Ud=Ud?Nh(td.buffer):td.buffer;return new td.constructor(Ud,
td.byteOffset,td.byteLength)}(yb,wc);case "[object Float32Array]":case "[object Float64Array]":case "[object Int8Array]":case "[object Int16Array]":case "[object Int32Array]":case "[object Uint8Array]":case "[object Uint8ClampedArray]":case "[object Uint16Array]":case "[object Uint32Array]":return Yi(yb,wc);case "[object Map]":case "[object Set]":return new Xc;case "[object Number]":case "[object String]":return new Xc(yb);case "[object RegExp]":return function(td){var Ud=new td.constructor(td.source,
Yd.exec(td));return Ud.lastIndex=td.lastIndex,Ud}(yb);case "[object Symbol]":return nd=yb,th?Id(th.call(nd)):{}}var nd}(Ga,da,vd)}}Lb||=new vg;if(vb=Lb.get(Ga))return vb;Lb.set(Ga,Qa);gl(Ga)?Ga.forEach(function(yb){Qa.add(Kf(yb,Ya,Ka,yb,Ga,Lb))}):Gh(Ga)&&Ga.forEach(function(yb,bc){Qa.set(bc,Kf(yb,Ya,Ka,bc,Ga,Lb))});var Xa=hb?oa:(Je?he?Bk:Mi:he?Qi:Ai)(Ga);return z(Xa||Ga,function(yb,bc){Xa&&(yb=Ga[bc=yb]);cb(Qa,bc,Kf(yb,Ya,Ka,bc,Ga,Lb))}),Qa}function eg(Ga,Ya,Ka){var hb=Ka.length;if(null==Ga)return!hb;
for(Ga=Id(Ga);hb--;){var vb=Ka[hb],Lb=Ya[vb],Qa=Ga[vb];if(Qa===oa&&!(vb in Ga)||!Lb(Qa))return!1}return!0}function Hf(Ga,Ya,Ka){if("function"!=typeof Ga)throw new se("Expected a function");return el(function(){Ga.apply(oa,Ka)},Ya)}function xf(Ga,Ya,Ka,hb){var vb=-1,Lb=R,Qa=!0,vd=Ga.length,he=[],Je=Ya.length;if(!vd)return he;Ka&&(Ya=L(Ya,ea(Ka)));hb?(Lb=ka,Qa=!1):200<=Ya.length&&(Lb=pa,Qa=!1,Ya=new ff(Ya));a:for(;++vb<vd;){var da=Ga[vb],va=null==Ka?da:Ka(da);if(da=hb||0!==da?da:0,Qa&&va==va){for(var Xa=
Je;Xa--;)if(Ya[Xa]===va)continue a;he.push(da)}else Lb(Ya,va,hb)||he.push(da)}return he}function Qf(Ga,Ya){var Ka=!0;return xh(Ga,function(hb,vb,Lb){return Ka=!!Ya(hb,vb,Lb)}),Ka}function Pg(Ga,Ya,Ka){for(var hb=-1,vb=Ga.length;++hb<vb;){var Lb=Ga[hb],Qa=Ya(Lb);if(null!=Qa&&(vd===oa?Qa==Qa&&!tg(Qa):Ka(Qa,vd)))var vd=Qa,he=Lb}return he}function ei(Ga,Ya){var Ka=[];return xh(Ga,function(hb,vb,Lb){Ya(hb,vb,Lb)&&Ka.push(hb)}),Ka}function uh(Ga,Ya,Ka,hb,vb){var Lb=-1,Qa=Ga.length;Ka||=Lk;for(vb||=[];++Lb<
Qa;){var vd=Ga[Lb];0<Ya&&Ka(vd)?1<Ya?uh(vd,Ya-1,Ka,hb,vb):ma(vb,vd):hb||(vb[vb.length]=vd)}return vb}function li(Ga,Ya){return Ga&&Yg(Ga,Ya,Ai)}function Zh(Ga,Ya){return Ga&&Ul(Ga,Ya,Ai)}function qg(Ga,Ya){return n(Ya,function(Ka){return uk(Ga[Ka])})}function Rh(Ga,Ya){for(var Ka=0,hb=(Ya=Sj(Ya,Ga)).length;null!=Ga&&Ka<hb;)Ga=Ga[sk(Ya[Ka++])];return Ka&&Ka==hb?Ga:oa}function df(Ga,Ya,Ka){Ya=Ya(Ga);return Nf(Ga)?Ya:ma(Ya,Ka(Ga))}function Sh(Ga){if(null==Ga)Ga=Ga===oa?"[object Undefined]":"[object Null]";
else if(Mj&&Mj in Id(Ga)){var Ya=Rf.call(Ga,Mj),Ka=Ga[Mj];try{Ga[Mj]=oa;var hb=!0}catch(Lb){}var vb=gg.call(Ga);hb&&(Ya?Ga[Mj]=Ka:delete Ga[Mj]);Ga=vb}else Ga=gg.call(Ga);return Ga}function yi(Ga,Ya){return Ga>Ya}function Cl(Ga,Ya){return null!=Ga&&Rf.call(Ga,Ya)}function vj(Ga,Ya){return null!=Ga&&Ya in Id(Ga)}function zf(Ga,Ya,Ka){for(var hb=Ka?ka:R,vb=Ga[0].length,Lb=Ga.length,Qa=Lb,vd=Tc(Lb),he=1/0,Je=[];Qa--;){var da=Ga[Qa];Qa&&Ya&&(da=L(da,ea(Ya)));he=rf(da.length,he);vd[Qa]=!Ka&&(Ya||120<=
vb&&120<=da.length)?new ff(Qa&&da):oa}da=Ga[0];var va=-1,Xa=vd[0];a:for(;++va<vb&&Je.length<he;){var yb=da[va],bc=Ya?Ya(yb):yb;if(yb=Ka||0!==yb?yb:0,Xa?!Xa.has(bc):!hb(Je,bc,Ka)){for(Qa=Lb;--Qa;){var wc=vd[Qa];if(wc?!wc.has(bc):!hb(Ga[Qa],bc,Ka))continue a}Xa&&Xa.push(bc);Je.push(yb)}}return Je}function Bj(Ga,Ya,Ka){var hb=null==(Ga=zk(Ga,Ya=Sj(Ya,Ga)))?Ga:Ga[sk(Fj(Ya))];return null==hb?oa:x(hb,Ga,Ka)}function oj(Ga){return Dg(Ga)&&"[object Arguments]"==Sh(Ga)}function Wh(Ga,Ya,Ka,hb,vb){return Ga===
Ya||(null==Ga||null==Ya||!Dg(Ga)&&!Dg(Ya)?Ga!=Ga&&Ya!=Ya:function(Lb,Qa,vd,he,Je,da){var va=Nf(Lb),Xa=Nf(Qa),yb=va?"[object Array]":ji(Lb),bc=Xa?"[object Array]":ji(Qa),wc="[object Object]"==(yb="[object Arguments]"==yb?"[object Object]":yb);Xa="[object Object]"==(bc="[object Arguments]"==bc?"[object Object]":bc);if((bc=yb==bc)&&dh(Lb)){if(!dh(Qa))return!1;va=!0;wc=!1}return bc&&!wc?(da||=new vg,va||Dk(Lb)?sf(Lb,Qa,vd,he,Je,da):function(Xc,nd,td,Ud,we,Ye,vf){switch(td){case "[object DataView]":if(Xc.byteLength!=
nd.byteLength||Xc.byteOffset!=nd.byteOffset)break;Xc=Xc.buffer;nd=nd.buffer;case "[object ArrayBuffer]":return!(Xc.byteLength!=nd.byteLength||!Ye(new hg(Xc),new hg(nd)));case "[object Boolean]":case "[object Date]":case "[object Number]":return qk(+Xc,+nd);case "[object Error]":return Xc.name==nd.name&&Xc.message==nd.message;case "[object RegExp]":case "[object String]":return Xc==nd+"";case "[object Map]":var Of=Ua;case "[object Set]":if(Of||=Za,Xc.size!=nd.size&&!(1&Ud))break;if(td=vf.get(Xc))return td==
nd;Ud|=2;vf.set(Xc,nd);nd=sf(Of(Xc),Of(nd),Ud,we,Ye,vf);return vf.delete(Xc),nd;case "[object Symbol]":if(th)return th.call(Xc)==th.call(nd)}return!1}(Lb,Qa,yb,vd,he,Je,da)):1&vd||(va=wc&&Rf.call(Lb,"__wrapped__"),yb=Xa&&Rf.call(Qa,"__wrapped__"),!va&&!yb)?bc?(da||=new vg,function(Xc,nd,td,Ud,we,Ye){var vf=1&td,Of=Mi(Xc),mf=Of.length,sd=Mi(nd).length;if(mf!=sd&&!vf)return!1;for(sd=mf;sd--;){var Zd=Of[sd];if(!(vf?Zd in nd:Rf.call(nd,Zd)))return!1}var We=Ye.get(Xc);Zd=Ye.get(nd);if(We&&Zd)return We==
nd&&Zd==Xc;We=!0;Ye.set(Xc,nd);Ye.set(nd,Xc);for(var qh=vf;++sd<mf;){var zh=Xc[Zd=Of[sd]],bl=nd[Zd];if(Ud)var En=vf?Ud(bl,zh,Zd,nd,Xc,Ye):Ud(zh,bl,Zd,Xc,nd,Ye);if(En===oa?zh!==bl&&!we(zh,bl,td,Ud,Ye):!En){We=!1;break}qh||="constructor"==Zd}We&&!qh&&(td=Xc.constructor,Ud=nd.constructor,!(td!=Ud&&"constructor"in Xc&&"constructor"in nd)||"function"==typeof td&&td instanceof td&&"function"==typeof Ud&&Ud instanceof Ud||(We=!1));return Ye.delete(Xc),Ye.delete(nd),We}(Lb,Qa,vd,he,Je,da)):!1:(Lb=va?Lb.value():
Lb,Qa=yb?Qa.value():Qa,da||=new vg,Je(Lb,Qa,vd,he,da))}(Ga,Ya,Ka,hb,Wh,vb))}function Dl(Ga,Ya,Ka,hb){var vb=Ka.length,Lb=vb,Qa=!hb;if(null==Ga)return!Lb;for(Ga=Id(Ga);vb--;){var vd=Ka[vb];if(Qa&&vd[2]?vd[1]!==Ga[vd[0]]:!(vd[0]in Ga))return!1}for(;++vb<Lb;){var he=(vd=Ka[vb])[0],Je=Ga[he],da=vd[1];if(Qa&&vd[2]){if(Je===oa&&!(he in Ga))return!1}else{vd=new vg;if(hb)var va=hb(Je,da,he,Ga,Ya,vd);if(va===oa?!Wh(da,Je,3,hb,vd):!va)return!1}}return!0}function wk(Ga){return!(!ih(Ga)||(Ya=Ga,Pf&&Pf in Ya))&&
(uk(Ga)?Lg:ld).test(al(Ga));var Ya}function xk(Ga){return"function"==typeof Ga?Ga:null==Ga?wb:"object"==typeof Ga?Nf(Ga)?lk(Ga[0],Ga[1]):Ki(Ga):Mb(Ga)}function Kg(Ga){if(!rk(Ga))return Ci(Ga);var Ya=[],Ka;for(Ka in Id(Ga))Rf.call(Ga,Ka)&&"constructor"!=Ka&&Ya.push(Ka);return Ya}function Oj(Ga,Ya){return Ga<Ya}function Cj(Ga,Ya){var Ka=-1,hb=fk(Ga)?Tc(Ga.length):[];return xh(Ga,function(vb,Lb,Qa){hb[++Ka]=Ya(vb,Lb,Qa)}),hb}function Ki(Ga){var Ya=Zi(Ga);return 1==Ya.length&&Ya[0][2]?Dj(Ya[0][0],Ya[0][1]):
function(Ka){return Ka===Ga||Dl(Ka,Ga,Ya)}}function lk(Ga,Ya){return ij(Ga)&&Ya==Ya&&!ih(Ya)?Dj(sk(Ga),Ya):function(Ka){var hb=Qg(Ka,Ga);return hb===oa&&hb===Ya?Hl(Ka,Ga):Wh(Ya,hb,3)}}function Yj(Ga,Ya,Ka,hb,vb){Ga!==Ya&&Yg(Ya,function(Lb,Qa){if(vb||=new vg,ih(Lb)){Lb=vb;var vd=pl(Ga,Qa),he=pl(Ya,Qa),Je=Lb.get(he);if(Je)Qa=void Ia(Ga,Qa,Je);else{Je=hb?hb(vd,he,Qa+"",Ga,Ya,Lb):oa;var da=Je===oa;if(da){var va=Nf(he),Xa=!va&&dh(he),yb=!va&&!Xa&&Dk(he);Je=he;va||Xa||yb?Nf(vd)?Je=vd:Jh(vd)?Je=fj(vd):Xa?
(da=!1,Je=ej(he,!0)):yb?(da=!1,Je=Yi(he,!0)):Je=[]:Dh(he)||bg(he)?(Je=vd,bg(vd)?Je=nh(vd):ih(vd)&&!uk(vd)||(Je=em(he))):da=!1}da&&(Lb.set(he,Je),Yj(Je,he,Ka,hb,Lb),Lb.delete(he));Ia(Ga,Qa,Je);Qa=void 0}!Qa}else vd=hb?hb(pl(Ga,Qa),Lb,Qa+"",Ga,Ya,vb):oa,vd===oa&&(vd=Lb),Ia(Ga,Qa,vd)},Qi)}function Pj(Ga,Ya){var Ka=Ga.length;if(Ka)return mg(Ya+=0>Ya?Ka:0,Ka)?Ga[Ya]:oa}function kl(Ga,Ya,Ka){Ya=Ya.length?L(Ya,function(vb){return Nf(vb)?function(Lb){return Rh(Lb,1===vb.length?vb[0]:vb)}:vb}):[wb];var hb=
-1;Ya=L(Ya,ea(re()));return function(vb,Lb){var Qa=vb.length;for(vb.sort(Lb);Qa--;)vb[Qa]=vb[Qa].value;return vb}(Cj(Ga,function(vb,Lb,Qa){return{criteria:L(Ya,function(vd){return vd(vb)}),index:++hb,value:vb}}),function(vb,Lb){a:{for(var Qa=-1,vd=vb.criteria,he=Lb.criteria,Je=vd.length,da=Ka.length;++Qa<Je;){var va=mi(vd[Qa],he[Qa]);if(va){vb=Qa>=da?va:va*("desc"==Ka[Qa]?-1:1);break a}}vb=vb.index-Lb.index}return vb})}function Xk(Ga,Ya,Ka){for(var hb=-1,vb=Ya.length,Lb={};++hb<vb;){var Qa=Ya[hb],
vd=Rh(Ga,Qa);Ka(vd,Qa)&&Eh(Lb,Sj(Qa,Ga),vd)}return Lb}function El(Ga,Ya,Ka,hb){var vb=hb?D:Q,Lb=-1,Qa=Ya.length,vd=Ga;Ga===Ya&&(Ya=fj(Ya));for(Ka&&(vd=L(Ga,ea(Ka)));++Lb<Qa;){var he=0,Je=Ya[Lb];for(Je=Ka?Ka(Je):Je;-1<(he=vb(vd,Je,he,hb));)vd!==Ga&&hi.call(vd,he,1),hi.call(Ga,he,1)}return Ga}function Zj(Ga,Ya){for(var Ka=Ga?Ya.length:0,hb=Ka-1;Ka--;){var vb=Ya[Ka];if(Ka==hb||vb!==Lb){var Lb=vb;mg(vb)?hi.call(Ga,vb,1):Yk(Ga,vb)}}return Ga}function Qj(Ga,Ya){return Ga+di(wh()*(Ya-Ga+1))}function xg(Ga,
Ya){var Ka="";if(!Ga||1>Ya||9007199254740991<Ya)return Ka;do Ya%2&&(Ka+=Ga),(Ya=di(Ya/2))&&(Ga+=Ga);while(Ya);return Ka}function jg(Ga,Ya){return hl(ll(Ga,Ya,wb),Ga+"")}function lg(Ga){return Ab(fc(Ga))}function dj(Ga,Ya){Ga=fc(Ga);return $k(Ga,Ue(Ya,0,Ga.length))}function Eh(Ga,Ya,Ka,hb){if(!ih(Ga))return Ga;for(var vb=-1,Lb=(Ya=Sj(Ya,Ga)).length,Qa=Lb-1,vd=Ga;null!=vd&&++vb<Lb;){var he=sk(Ya[vb]),Je=Ka;if("__proto__"===he||"constructor"===he||"prototype"===he)break;if(vb!=Qa){var da=vd[he];(Je=
hb?hb(da,he,vd):oa)===oa&&(Je=ih(da)?da:mg(Ya[vb+1])?[]:{})}cb(vd,he,Je);vd=vd[he]}return Ga}function Xg(Ga){return $k(fc(Ga))}function ak(Ga,Ya,Ka){var hb=-1,vb=Ga.length;0>Ya&&(Ya=-Ya>vb?0:vb+Ya);0>(Ka=Ka>vb?vb:Ka)&&(Ka+=vb);vb=Ya>Ka?0:Ka-Ya>>>0;Ya>>>=0;for(Ka=Tc(vb);++hb<vb;)Ka[hb]=Ga[hb+Ya];return Ka}function Ag(Ga,Ya){var Ka;return xh(Ga,function(hb,vb,Lb){return!(Ka=Ya(hb,vb,Lb))}),!!Ka}function Th(Ga,Ya,Ka){var hb=0,vb=null==Ga?hb:Ga.length;if("number"==typeof Ya&&Ya==Ya&&2147483647>=vb){for(;hb<
vb;){var Lb=hb+vb>>>1,Qa=Ga[Lb];null!==Qa&&!tg(Qa)&&(Ka?Qa<=Ya:Qa<Ya)?hb=Lb+1:vb=Lb}return vb}return nk(Ga,Ya,wb,Ka)}function nk(Ga,Ya,Ka,hb){var vb=0,Lb=null==Ga?0:Ga.length;if(0===Lb)return 0;for(var Qa=(Ya=Ka(Ya))!=Ya,vd=null===Ya,he=tg(Ya),Je=Ya===oa;vb<Lb;){var da=di((vb+Lb)/2),va=Ka(Ga[da]),Xa=va!==oa,yb=null===va,bc=va==va,wc=tg(va);(Qa?hb||bc:Je?bc&&(hb||Xa):vd?bc&&Xa&&(hb||!yb):he?bc&&Xa&&!yb&&(hb||!wc):!yb&&!wc&&(hb?va<=Ya:va<Ya))?vb=da+1:Lb=da}return rf(Lb,4294967294)}function yk(Ga,Ya){for(var Ka=
-1,hb=Ga.length,vb=0,Lb=[];++Ka<hb;){var Qa=Ga[Ka],vd=Ya?Ya(Qa):Qa;if(!Ka||!qk(vd,he)){var he=vd;Lb[vb++]=0===Qa?0:Qa}}return Lb}function Kh(Ga){return"number"==typeof Ga?Ga:tg(Ga)?NaN:+Ga}function Di(Ga){if("string"==typeof Ga)return Ga;if(Nf(Ga))return L(Ga,Di)+"";if(tg(Ga))return xl?xl.call(Ga):"";var Ya=Ga+"";return"0"==Ya&&1/Ga==-1/0?"-0":Ya}function Lh(Ga,Ya,Ka){var hb=-1,vb=R,Lb=Ga.length,Qa=!0,vd=[],he=vd;if(Ka)Qa=!1,vb=ka;else if(200<=Lb){if(vb=Ya?null:cl(Ga))return Za(vb);Qa=!1;vb=pa;he=
new ff}else he=Ya?[]:vd;a:for(;++hb<Lb;){var Je=Ga[hb],da=Ya?Ya(Je):Je;if(Je=Ka||0!==Je?Je:0,Qa&&da==da){for(var va=he.length;va--;)if(he[va]===da)continue a;Ya&&he.push(da);vd.push(Je)}else vb(he,da,Ka)||(he!==vd&&he.push(da),vd.push(Je))}return vd}function Yk(Ga,Ya){return null==(Ga=zk(Ga,Ya=Sj(Ya,Ga)))||delete Ga[sk(Fj(Ya))]}function bk(Ga,Ya,Ka,hb){for(var vb=Ga.length,Lb=hb?vb:-1;(hb?Lb--:++Lb<vb)&&Ya(Ga[Lb],Lb,Ga););return Ka?ak(Ga,hb?0:Lb,hb?Lb+1:vb):ak(Ga,hb?Lb+1:0,hb?vb:Lb)}function wj(Ga,
Ya){return Ga instanceof ke&&(Ga=Ga.value()),Y(Ya,function(Ka,hb){return hb.func.apply(hb.thisArg,ma([Ka],hb.args))},Ga)}function Fl(Ga,Ya,Ka){var hb=Ga.length;if(2>hb)return hb?Lh(Ga[0]):[];for(var vb=-1,Lb=Tc(hb);++vb<hb;)for(var Qa=Ga[vb],vd=-1;++vd<hb;)vd!=vb&&(Lb[vb]=xf(Lb[vb]||Qa,Ga[vd],Ya,Ka));return Lh(uh(Lb,1),Ya,Ka)}function Em(Ga,Ya,Ka){for(var hb=-1,vb=Ga.length,Lb=Ya.length,Qa={};++hb<vb;)Ka(Qa,Ga[hb],hb<Lb?Ya[hb]:oa);return Qa}function Rj(Ga){return Jh(Ga)?Ga:[]}function fi(Ga){return"function"==
typeof Ga?Ga:wb}function Sj(Ga,Ya){return Nf(Ga)?Ga:ij(Ga,Ya)?[Ga]:Wj(ig(Ga))}function Mh(Ga,Ya,Ka){var hb=Ga.length;return Ka=Ka===oa?hb:Ka,!Ya&&Ka>=hb?Ga:ak(Ga,Ya,Ka)}function ej(Ga,Ya){if(Ya)return Ga.slice();Ya=Ga.length;Ya=$g?$g(Ya):new Ga.constructor(Ya);return Ga.copy(Ya),Ya}function Nh(Ga){var Ya=new Ga.constructor(Ga.byteLength);return(new hg(Ya)).set(new hg(Ga)),Ya}function Yi(Ga,Ya){Ya=Ya?Nh(Ga.buffer):Ga.buffer;return new Ga.constructor(Ya,Ga.byteOffset,Ga.length)}function mi(Ga,Ya){if(Ga!==
Ya){var Ka=Ga!==oa,hb=null===Ga,vb=Ga==Ga,Lb=tg(Ga),Qa=Ya!==oa,vd=null===Ya,he=Ya==Ya,Je=tg(Ya);if(!vd&&!Je&&!Lb&&Ga>Ya||Lb&&Qa&&he&&!vd&&!Je||hb&&Qa&&he||!Ka&&he||!vb)return 1;if(!hb&&!Lb&&!Je&&Ga<Ya||Je&&Ka&&vb&&!hb&&!Lb||vd&&Ka&&vb||!Qa&&vb||!he)return-1}return 0}function Zk(Ga,Ya,Ka,hb){var vb=-1,Lb=Ga.length,Qa=Ka.length,vd=-1,he=Ya.length,Je=Jf(Lb-Qa,0),da=Tc(he+Je);for(hb=!hb;++vd<he;)da[vd]=Ya[vd];for(;++vb<Qa;)(hb||vb<Lb)&&(da[Ka[vb]]=Ga[vb]);for(;Je--;)da[vd++]=Ga[vb++];return da}function ck(Ga,
Ya,Ka,hb){var vb=-1,Lb=Ga.length,Qa=-1,vd=Ka.length,he=-1,Je=Ya.length,da=Jf(Lb-vd,0),va=Tc(da+Je);for(hb=!hb;++vb<da;)va[vb]=Ga[vb];for(da=vb;++he<Je;)va[da+he]=Ya[he];for(;++Qa<vd;)(hb||vb<Lb)&&(va[da+Ka[Qa]]=Ga[vb++]);return va}function fj(Ga,Ya){var Ka=-1,hb=Ga.length;for(Ya||=Tc(hb);++Ka<hb;)Ya[Ka]=Ga[Ka];return Ya}function zg(Ga,Ya,Ka,hb){var vb=!Ka;Ka||={};for(var Lb=-1,Qa=Ya.length;++Lb<Qa;){var vd=Ya[Lb],he=hb?hb(Ka[vd],Ga[vd],vd,Ka,Ga):oa;he===oa&&(he=Ga[vd]);vb?kd(Ka,vd,he):cb(Ka,vd,he)}return Ka}
function Ei(Ga,Ya){return function(Ka,hb){var vb=Nf(Ka)?J:lc,Lb=Ya?Ya():{};return vb(Ka,Ga,re(hb,2),Lb)}}function ni(Ga){return jg(function(Ya,Ka){var hb=-1,vb=Ka.length,Lb=1<vb?Ka[vb-1]:oa,Qa=2<vb?Ka[2]:oa;Lb=3<Ga.length&&"function"==typeof Lb?(vb--,Lb):oa;Qa&&Ti(Ka[0],Ka[1],Qa)&&(Lb=3>vb?oa:Lb,vb=1);for(Ya=Id(Ya);++hb<vb;)(Qa=Ka[hb])&&Ga(Ya,Qa,hb,Lb);return Ya})}function Ej(Ga,Ya){return function(Ka,hb){if(null==Ka)return Ka;if(!fk(Ka))return Ga(Ka,hb);for(var vb=Ka.length,Lb=Ya?vb:-1,Qa=Id(Ka);(Ya?
Lb--:++Lb<vb)&&!1!==hb(Qa[Lb],Lb,Qa););return Ka}}function Fh(Ga){return function(Ya,Ka,hb){var vb=-1,Lb=Id(Ya);hb=hb(Ya);for(var Qa=hb.length;Qa--;){var vd=hb[Ga?Qa:++vb];if(!1===Ka(Lb[vd],vd,Lb))break}return Ya}}function zi(Ga){return function(Ya){var Ka=cd.test(Ya=ig(Ya))?eb(Ya):oa,hb=Ka?Ka[0]:Ya.charAt(0);Ya=Ka?Mh(Ka,1).join(""):Ya.slice(1);return hb[Ga]()+Ya}}function ok(Ga){return function(Ya){return Y(Fb(ja(Ya).replace(mb,"")),Ga,"")}}function hj(Ga){return function(){var Ya=arguments;switch(Ya.length){case 0:return new Ga;
case 1:return new Ga(Ya[0]);case 2:return new Ga(Ya[0],Ya[1]);case 3:return new Ga(Ya[0],Ya[1],Ya[2]);case 4:return new Ga(Ya[0],Ya[1],Ya[2],Ya[3]);case 5:return new Ga(Ya[0],Ya[1],Ya[2],Ya[3],Ya[4]);case 6:return new Ga(Ya[0],Ya[1],Ya[2],Ya[3],Ya[4],Ya[5]);case 7:return new Ga(Ya[0],Ya[1],Ya[2],Ya[3],Ya[4],Ya[5],Ya[6])}var Ka=si(Ga.prototype);Ya=Ga.apply(Ka,Ya);return ih(Ya)?Ya:Ka}}function pj(Ga){return function(Ya,Ka,hb){var vb=Id(Ya);if(!fk(Ya)){var Lb=re(Ka,3);Ya=Ai(Ya);Ka=function(Qa){return Lb(vb[Qa],
Qa,vb)}}Ka=Ga(Ya,Ka,hb);return-1<Ka?vb[Lb?Ya[Ka]:Ka]:oa}}function en(Ga){return xj(function(Ya){var Ka=Ya.length,hb=Ka,vb=Dd.prototype.thru;for(Ga&&Ya.reverse();hb--;){var Lb=Ya[hb];if("function"!=typeof Lb)throw new se("Expected a function");if(vb&&!Qa&&"wrapper"==ek(Lb))var Qa=new Dd([],!0)}for(hb=Qa?hb:Ka;++hb<Ka;){vb=ek(Lb=Ya[hb]);var vd="wrapper"==vb?Bf(Lb):oa;Qa=vd&&If(vd[0])&&424==vd[1]&&!vd[4].length&&1==vd[9]?Qa[ek(vd[0])].apply(Qa,vd[3]):1==Lb.length&&If(Lb)?Qa[vb]():Qa.thru(Lb)}return function(){var he=
arguments,Je=he[0];if(Qa&&1==he.length&&Nf(Je))return Qa.plant(Je).value();var da=0;for(he=Ka?Ya[da].apply(this,he):Je;++da<Ka;)he=Ya[da].call(this,he);return he}})}function Ak(Ga,Ya,Ka,hb,vb,Lb,Qa,vd,he,Je){var da=Ya&128,va=1&Ya,Xa=2&Ya,yb=24&Ya,bc=512&Ya,wc=Xa?oa:hj(Ga);return function nd(){for(var td=arguments.length,Ud=Tc(td),we=td;we--;)Ud[we]=arguments[we];if(yb){var Ye=dm(nd),vf;we=Ud.length;for(vf=0;we--;)Ud[we]===Ye&&++vf}if(hb&&(Ud=Zk(Ud,hb,vb,yb)),Lb&&(Ud=ck(Ud,Lb,Qa,yb)),td-=vf,yb&&td<
Je)return Ye=Oa(Ud,Ye),Tj(Ga,Ya,Ak,nd.placeholder,Ka,Ud,Ye,vd,he,Je-td);Ye=va?Ka:this;we=Xa?Ye[Ga]:Ga;td=Ud.length;if(vd){vf=Ud.length;for(var Of=rf(vd.length,vf),mf=fj(Ud);Of--;){var sd=vd[Of];Ud[Of]=mg(sd,vf)?mf[sd]:oa}}else bc&&1<td&&Ud.reverse();return da&&he<td&&(Ud.length=he),this&&this!==Lc&&this instanceof nd&&(we=wc||hj(we)),we.apply(Ye,Ud)}}function nl(Ga,Ya){return function(Ka,hb){return function(vb,Lb,Qa,vd){return li(vb,function(he,Je,da){Lb(vd,Qa(he),Je,da)}),vd}(Ka,Ga,Ya(hb),{})}}function qj(Ga,
Ya){return function(Ka,hb){var vb;if(Ka===oa&&hb===oa)return Ya;if(Ka!==oa&&(vb=Ka),hb!==oa){if(vb===oa)return hb;"string"==typeof Ka||"string"==typeof hb?(Ka=Di(Ka),hb=Di(hb)):(Ka=Kh(Ka),hb=Kh(hb));vb=Ga(Ka,hb)}return vb}}function Ol(Ga){return xj(function(Ya){return Ya=L(Ya,ea(re())),jg(function(Ka){var hb=this;return Ga(Ya,function(vb){return x(vb,hb,Ka)})})})}function sm(Ga,Ya){var Ka=(Ya=Ya===oa?" ":Di(Ya)).length;if(2>Ka)return Ka?xg(Ya,Ga):Ya;Ka=xg(Ya,ag(Ga/fb(Ya)));return cd.test(Ya)?Mh(eb(Ka),
0,Ga).join(""):Ka.slice(0,Ga)}function Pl(Ga){return function(Ya,Ka,hb){hb&&"number"!=typeof hb&&Ti(Ya,Ka,hb)&&(Ka=hb=oa);Ya=Sf(Ya);Ka===oa?(Ka=Ya,Ya=0):Ka=Sf(Ka);var vb=Ya;Ya=hb===oa?Ya<Ka?1:-1:Sf(hb);hb=-1;Ka=Jf(ag((Ka-vb)/(Ya||1)),0);for(var Lb=Tc(Ka);Ka--;)Lb[Ga?Ka:++hb]=vb,vb+=Ya;return Lb}}function pk(Ga){return function(Ya,Ka){return"string"==typeof Ya&&"string"==typeof Ka||(Ya=oi(Ya),Ka=oi(Ka)),Ga(Ya,Ka)}}function Tj(Ga,Ya,Ka,hb,vb,Lb,Qa,vd,he,Je){var da=8&Ya;Ya|=da?32:64;4&(Ya&=~(da?64:32))||
(Ya&=-4);vb=[Ga,Ya,vb,da?Lb:oa,da?Qa:oa,da?oa:Lb,da?oa:Qa,vd,he,Je];Ka=Ka.apply(oa,vb);return If(Ga)&&zl(Ka,vb),Ka.placeholder=hb,ui(Ka,Ga,Ya)}function Ql(Ga){var Ya=Cd[Ga];return function(Ka,hb){return(Ka=oi(Ka),(hb=null==hb?0:rf(Ig(hb),292))&&Vk(Ka))?(Ka=(ig(Ka)+"e").split("e"),+((Ka=(ig(Ya(Ka[0]+"e"+(+Ka[1]+hb)))+"e").split("e"))[0]+"e"+(+Ka[1]-hb))):Ya(Ka)}}function dk(Ga){return function(Ya){var Ka=ji(Ya);return"[object Map]"==Ka?Ua(Ya):"[object Set]"==Ka?Ma(Ya):function(hb,vb){return L(vb,function(Lb){return[Lb,
hb[Lb]]})}(Ya,Ga(Ya))}}function rg(Ga,Ya,Ka,hb,vb,Lb,Qa,vd){var he=2&Ya;if(!he&&"function"!=typeof Ga)throw new se("Expected a function");var Je=hb?hb.length:0;if(Je||(Ya&=-97,hb=vb=oa),Qa=Qa===oa?Qa:Jf(Ig(Qa),0),vd=vd===oa?vd:Ig(vd),Je-=vb?vb.length:0,Ya&64){var da=hb,va=vb;hb=vb=oa}var Xa=he?oa:Bf(Ga);Lb=[Ga,Ya,Ka,hb,vb,da,va,Lb,Qa,vd];Qa=(Xa&&function(yb,bc){var wc=yb[1],Xc=bc[1],nd=wc|Xc,td=128==Xc&&8==wc||128==Xc&&256==wc&&yb[7].length<=bc[8]||384==Xc&&bc[7].length<=bc[8]&&8==wc;if(!(131>nd||
td))return yb;1&Xc&&(yb[2]=bc[2],nd|=1&wc?0:4);if(wc=bc[3]){var Ud=yb[3];yb[3]=Ud?Zk(Ud,wc,bc[4]):wc;yb[4]=Ud?Oa(yb[3],"__lodash_placeholder__"):bc[4]}(wc=bc[5])&&(Ud=yb[5],yb[5]=Ud?ck(Ud,wc,bc[6]):wc,yb[6]=Ud?Oa(yb[5],"__lodash_placeholder__"):bc[6]);(wc=bc[7])&&(yb[7]=wc);Xc&128&&(yb[8]=null==yb[8]?bc[8]:rf(yb[8],bc[8]));null==yb[9]&&(yb[9]=bc[9]);yb[0]=bc[0];yb[1]=nd}(Lb,Xa),Ga=Lb[0],Ya=Lb[1],Ka=Lb[2],hb=Lb[3],vb=Lb[4],!(vd=Lb[9]=Lb[9]===oa?he?0:Ga.length:Jf(Lb[9]-Je,0))&&24&Ya&&(Ya&=-25),Ya&&
1!=Ya)?8==Ya||16==Ya?function(yb,bc,wc){var Xc=hj(yb);return function td(){for(var Ud=arguments.length,we=Tc(Ud),Ye=Ud,vf=dm(td);Ye--;)we[Ye]=arguments[Ye];Ye=3>Ud&&we[0]!==vf&&we[Ud-1]!==vf?[]:Oa(we,vf);return(Ud-=Ye.length)<wc?Tj(yb,bc,Ak,td.placeholder,oa,we,Ye,oa,oa,wc-Ud):x(this&&this!==Lc&&this instanceof td?Xc:yb,this,we)}}(Ga,Ya,vd):32!=Ya&&33!=Ya||vb.length?Ak.apply(oa,Lb):function(yb,bc,wc,Xc){var nd=1&bc,td=hj(yb);return function we(){for(var Ye=-1,vf=arguments.length,Of=-1,mf=Xc.length,
sd=Tc(mf+vf),Zd=this&&this!==Lc&&this instanceof we?td:yb;++Of<mf;)sd[Of]=Xc[Of];for(;vf--;)sd[Of++]=arguments[++Ye];return x(Zd,nd?wc:this,sd)}}(Ga,Ya,Ka,hb):function(yb,bc,wc){var Xc=1&bc,nd=hj(yb);return function Ud(){return(this&&this!==Lc&&this instanceof Ud?nd:yb).apply(Xc?wc:this,arguments)}}(Ga,Ya,Ka);return ui((Xa?yl:zl)(Qa,Lb),Ga,Ya)}function bm(Ga,Ya,Ka,hb){return Ga===oa||qk(Ga,Pe[Ka])&&!Rf.call(hb,Ka)?Ya:Ga}function rh(Ga,Ya,Ka,hb,vb,Lb){return ih(Ga)&&ih(Ya)&&(Lb.set(Ya,Ga),Yj(Ga,Ya,
oa,rh,Lb),Lb.delete(Ya)),Ga}function Li(Ga){return Dh(Ga)?oa:Ga}function sf(Ga,Ya,Ka,hb,vb,Lb){var Qa=1&Ka,vd=Ga.length,he=Ya.length;if(vd!=he&&!(Qa&&he>vd))return!1;he=Lb.get(Ga);var Je=Lb.get(Ya);if(he&&Je)return he==Ya&&Je==Ga;he=-1;Je=!0;var da=2&Ka?new ff:oa;Lb.set(Ga,Ya);for(Lb.set(Ya,Ga);++he<vd;){var va=Ga[he],Xa=Ya[he];if(hb)var yb=Qa?hb(Xa,va,he,Ya,Ga,Lb):hb(va,Xa,he,Ga,Ya,Lb);if(yb!==oa){if(yb)continue;Je=!1;break}if(da){if(!H(Ya,function(bc,wc){if(!da.has(wc)&&(va===bc||vb(va,bc,Ka,hb,
Lb)))return da.push(wc)})){Je=!1;break}}else if(va!==Xa&&!vb(va,Xa,Ka,hb,Lb)){Je=!1;break}}return Lb.delete(Ga),Lb.delete(Ya),Je}function xj(Ga){return hl(ll(Ga,oa,Qm),Ga+"")}function Mi(Ga){return df(Ga,Ai,dl)}function Bk(Ga){return df(Ga,Qi,ch)}function ek(Ga){for(var Ya=Ga.name+"",Ka=sh[Ya],hb=Rf.call(sh,Ya)?Ka.length:0;hb--;){var vb=Ka[hb],Lb=vb.func;if(null==Lb||Lb==Ga)return vb.name}return Ya}function dm(Ga){return(Rf.call(jb,"placeholder")?jb:Ga).placeholder}function re(){var Ga=jb.iteratee||
zb;return Ga=Ga===zb?xk:Ga,arguments.length?Ga(arguments[0],arguments[1]):Ga}function Zf(Ga,Ya){var Ka;Ga=Ga.__data__;return("string"==(Ka=typeof Ya)||"number"==Ka||"symbol"==Ka||"boolean"==Ka?"__proto__"!==Ya:null===Ya)?Ga["string"==typeof Ya?"string":"hash"]:Ga.map}function Zi(Ga){for(var Ya=Ai(Ga),Ka=Ya.length;Ka--;){var hb=Ya[Ka],vb=Ga[hb];Ya[Ka]=[hb,vb,vb==vb&&!ih(vb)]}return Ya}function bh(Ga,Ya){Ga=null==Ga?oa:Ga[Ya];return wk(Ga)?Ga:oa}function og(Ga,Ya,Ka){for(var hb=-1,vb=(Ya=Sj(Ya,Ga)).length,
Lb=!1;++hb<vb;){var Qa=sk(Ya[hb]);if(!(Lb=null!=Ga&&Ka(Ga,Qa)))break;Ga=Ga[Qa]}return Lb||++hb!=vb?Lb:!!(vb=null==Ga?0:Ga.length)&&ph(vb)&&mg(Qa,vb)&&(Nf(Ga)||bg(Ga))}function em(Ga){return"function"!=typeof Ga.constructor||rk(Ga)?{}:si(Mf(Ga))}function Lk(Ga){return Nf(Ga)||bg(Ga)||!!(Nj&&Ga&&Ga[Nj])}function mg(Ga,Ya){var Ka=typeof Ga;return!!(Ya=null==Ya?9007199254740991:Ya)&&("number"==Ka||"symbol"!=Ka&&Nb.test(Ga))&&-1<Ga&&0==Ga%1&&Ga<Ya}function Ti(Ga,Ya,Ka){if(!ih(Ka))return!1;var hb=typeof Ya;
return!!("number"==hb?fk(Ka)&&mg(Ya,Ka.length):"string"==hb&&Ya in Ka)&&qk(Ka[Ya],Ga)}function ij(Ga,Ya){if(Nf(Ga))return!1;var Ka=typeof Ga;return!("number"!=Ka&&"symbol"!=Ka&&"boolean"!=Ka&&null!=Ga&&!tg(Ga))||Zb.test(Ga)||!ob.test(Ga)||null!=Ya&&Ga in Id(Ya)}function If(Ga){var Ya=ek(Ga),Ka=jb[Ya];if("function"!=typeof Ka||!(Ya in ke.prototype))return!1;if(Ga===Ka)return!0;Ya=Bf(Ka);return!!Ya&&Ga===Ya[0]}function rk(Ga){var Ya=Ga&&Ga.constructor;return Ga===("function"==typeof Ya&&Ya.prototype||
Pe)}function Dj(Ga,Ya){return function(Ka){return null!=Ka&&Ka[Ga]===Ya&&(Ya!==oa||Ga in Id(Ka))}}function ll(Ga,Ya,Ka){return Ya=Jf(Ya===oa?Ga.length-1:Ya,0),function(){for(var hb=arguments,vb=-1,Lb=Jf(hb.length-Ya,0),Qa=Tc(Lb);++vb<Lb;)Qa[vb]=hb[Ya+vb];vb=-1;for(Lb=Tc(Ya+1);++vb<Ya;)Lb[vb]=hb[vb];return Lb[Ya]=Ka(Qa),x(Ga,this,Lb)}}function zk(Ga,Ya){return 2>Ya.length?Ga:Rh(Ga,ak(Ya,0,-1))}function pl(Ga,Ya){if(("constructor"!==Ya||"function"!=typeof Ga[Ya])&&"__proto__"!=Ya)return Ga[Ya]}function ui(Ga,
Ya,Ka){Ya+="";return hl(Ga,function(hb,vb){var Lb=vb.length;if(!Lb)return hb;var Qa=Lb-1;return vb[Qa]=(1<Lb?"\x26 ":"")+vb[Qa],vb=vb.join(2<Lb?", ":" "),hb.replace(Wc,"{\n/* [wrapped with "+vb+"] */\n")}(Ya,function(hb,vb){return z(ra,function(Lb){var Qa="_."+Lb[0];vb&Lb[1]&&!R(hb,Qa)&&hb.push(Qa)}),hb.sort()}(function(hb){return(hb=hb.match(hd))?hb[1].split(Nd):[]}(Ya),Ka)))}function Ui(Ga){var Ya=0,Ka=0;return function(){var hb=Zl(),vb=16-(hb-Ka);if(Ka=hb,0<vb){if(800<=++Ya)return arguments[0]}else Ya=
0;return Ga.apply(oa,arguments)}}function $k(Ga,Ya){var Ka=-1,hb=Ga.length,vb=hb-1;for(Ya=Ya===oa?hb:Ya;++Ka<Ya;){hb=Qj(Ka,vb);var Lb=Ga[hb];Ga[hb]=Ga[Ka];Ga[Ka]=Lb}return Ga.length=Ya,Ga}function sk(Ga){if("string"==typeof Ga||tg(Ga))return Ga;var Ya=Ga+"";return"0"==Ya&&1/Ga==-1/0?"-0":Ya}function al(Ga){if(null!=Ga){try{return ng.call(Ga)}catch(Ya){}return Ga+""}return""}function um(Ga){if(Ga instanceof ke)return Ga.clone();var Ya=new Dd(Ga.__wrapped__,Ga.__chain__);return Ya.__actions__=fj(Ga.__actions__),
Ya.__index__=Ga.__index__,Ya.__values__=Ga.__values__,Ya}function Fm(Ga,Ya,Ka){var hb=null==Ga?0:Ga.length;if(!hb)return-1;Ka=null==Ka?0:Ig(Ka);return 0>Ka&&(Ka=Jf(hb+Ka,0)),M(Ga,re(Ya,3),Ka)}function ml(Ga,Ya,Ka){var hb=null==Ga?0:Ga.length;if(!hb)return-1;var vb=hb-1;return Ka!==oa&&(vb=Ig(Ka),vb=0>Ka?Jf(hb+vb,0):rf(vb,hb-1)),M(Ga,re(Ya,3),vb,!0)}function Qm(Ga){return(null==Ga?0:Ga.length)?uh(Ga,1):[]}function Mk(Ga){return Ga&&Ga.length?Ga[0]:oa}function Fj(Ga){var Ya=null==Ga?0:Ga.length;return Ya?
Ga[Ya-1]:oa}function Ck(Ga,Ya){return Ga&&Ga.length&&Ya&&Ya.length?El(Ga,Ya):Ga}function Vi(Ga){return null==Ga?Ga:wl.call(Ga)}function Ok(Ga){if(!Ga||!Ga.length)return[];var Ya=0;return Ga=n(Ga,function(Ka){if(Jh(Ka))return Ya=Jf(Ka.length,Ya),!0}),K(Ya,function(Ka){return L(Ga,ba(Ka))})}function Gj(Ga,Ya){if(!Ga||!Ga.length)return[];Ga=Ok(Ga);return null==Ya?Ga:L(Ga,function(Ka){return x(Ya,oa,Ka)})}function Pk(Ga){Ga=jb(Ga);return Ga.__chain__=!0,Ga}function Hj(Ga,Ya){return Ya(Ga)}function Vj(Ga,
Ya){return(Nf(Ga)?z:xh)(Ga,re(Ya,3))}function tk(Ga,Ya){return(Nf(Ga)?u:Ff)(Ga,re(Ya,3))}function yj(Ga,Ya){return(Nf(Ga)?L:Cj)(Ga,re(Ya,3))}function tm(Ga,Ya,Ka){return Ya=Ka?oa:Ya,Ya=Ga&&null==Ya?Ga.length:Ya,rg(Ga,128,oa,oa,oa,oa,Ya)}function Tl(Ga,Ya){var Ka;if("function"!=typeof Ya)throw new se("Expected a function");return Ga=Ig(Ga),function(){return 0<--Ga&&(Ka=Ya.apply(this,arguments)),1>=Ga&&(Ya=oa),Ka}}function sj(Ga,Ya,Ka){function hb(td){var Ud=he,we=Je;return he=Je=oa,bc=td,va=Ga.apply(we,
Ud)}function vb(td){var Ud=td-yb;return yb===oa||Ud>=Ya||0>Ud||Xc&&td-bc>=da}function Lb(){var td=Pd();if(vb(td))return Qa(td);var Ud=el,we=Ya-(td-yb);td=Xc?rf(we,da-(td-bc)):we;Xa=Ud(Lb,td)}function Qa(td){return Xa=oa,nd&&he?hb(td):(he=Je=oa,va)}function vd(){var td=Pd(),Ud=vb(td);if(he=arguments,Je=this,yb=td,Ud){if(Xa===oa)return td=yb,bc=td,Xa=el(Lb,Ya),wc?hb(td):va;if(Xc)return Ml(Xa),Xa=el(Lb,Ya),hb(yb)}return Xa===oa&&(Xa=el(Lb,Ya)),va}var he,Je,da,va,Xa,yb,bc=0,wc=!1,Xc=!1,nd=!0;if("function"!=
typeof Ga)throw new se("Expected a function");return Ya=oi(Ya)||0,ih(Ka)&&(wc=!!Ka.leading,da=(Xc="maxWait"in Ka)?Jf(oi(Ka.maxWait)||0,Ya):da,nd="trailing"in Ka?!!Ka.trailing:nd),vd.cancel=function(){Xa!==oa&&Ml(Xa);bc=0;he=yb=Je=Xa=oa},vd.flush=function(){return Xa===oa?va:Qa(Pd())},vd}function rj(Ga,Ya){if("function"!=typeof Ga||null!=Ya&&"function"!=typeof Ya)throw new se("Expected a function");var Ka=function(){var hb=arguments,vb=Ya?Ya.apply(this,hb):hb[0],Lb=Ka.cache;if(Lb.has(vb))return Lb.get(vb);
hb=Ga.apply(this,hb);return Ka.cache=Lb.set(vb,hb)||Lb,hb};return Ka.cache=new (rj.Cache||qe),Ka}function gm(Ga){if("function"!=typeof Ga)throw new se("Expected a function");return function(){var Ya=arguments;switch(Ya.length){case 0:return!Ga.call(this);case 1:return!Ga.call(this,Ya[0]);case 2:return!Ga.call(this,Ya[0],Ya[1]);case 3:return!Ga.call(this,Ya[0],Ya[1],Ya[2])}return!Ga.apply(this,Ya)}}function qk(Ga,Ya){return Ga===Ya||Ga!=Ga&&Ya!=Ya}function fk(Ga){return null!=Ga&&ph(Ga.length)&&!uk(Ga)}
function Jh(Ga){return Dg(Ga)&&fk(Ga)}function gj(Ga){if(!Dg(Ga))return!1;var Ya=Sh(Ga);return"[object Error]"==Ya||"[object DOMException]"==Ya||"string"==typeof Ga.message&&"string"==typeof Ga.name&&!Dh(Ga)}function uk(Ga){if(!ih(Ga))return!1;Ga=Sh(Ga);return"[object Function]"==Ga||"[object GeneratorFunction]"==Ga||"[object AsyncFunction]"==Ga||"[object Proxy]"==Ga}function mk(Ga){return"number"==typeof Ga&&Ga==Ig(Ga)}function ph(Ga){return"number"==typeof Ga&&-1<Ga&&0==Ga%1&&9007199254740991>=
Ga}function ih(Ga){var Ya=typeof Ga;return null!=Ga&&("object"==Ya||"function"==Ya)}function Dg(Ga){return null!=Ga&&"object"==typeof Ga}function Xj(Ga){return"number"==typeof Ga||Dg(Ga)&&"[object Number]"==Sh(Ga)}function Dh(Ga){if(!Dg(Ga)||"[object Object]"!=Sh(Ga))return!1;Ga=Mf(Ga);if(null===Ga)return!0;Ga=Rf.call(Ga,"constructor")&&Ga.constructor;return"function"==typeof Ga&&Ga instanceof Ga&&ng.call(Ga)==mh}function $i(Ga){return"string"==typeof Ga||!Nf(Ga)&&Dg(Ga)&&"[object String]"==Sh(Ga)}
function tg(Ga){return"symbol"==typeof Ga||Dg(Ga)&&"[object Symbol]"==Sh(Ga)}function Oi(Ga){if(!Ga)return[];if(fk(Ga))return $i(Ga)?eb(Ga):fj(Ga);if(ri&&Ga[ri]){Ga=Ga[ri]();for(var Ya,Ka=[];!(Ya=Ga.next()).done;)Ka.push(Ya.value);return Ka}Ya=ji(Ga);return("[object Map]"==Ya?Ua:"[object Set]"==Ya?Za:fc)(Ga)}function Sf(Ga){return Ga?(Ga=oi(Ga))===Ca||Ga===-1/0?1.7976931348623157E308*(0>Ga?-1:1):Ga==Ga?Ga:0:0===Ga?Ga:0}function Ig(Ga){Ga=Sf(Ga);var Ya=Ga%1;return Ga==Ga?Ya?Ga-Ya:Ga:0}function jj(Ga){return Ga?
Ue(Ig(Ga),0,4294967295):0}function oi(Ga){if("number"==typeof Ga)return Ga;if(tg(Ga))return NaN;ih(Ga)&&(Ga="function"==typeof Ga.valueOf?Ga.valueOf():Ga,Ga=ih(Ga)?Ga+"":Ga);if("string"!=typeof Ga)return 0===Ga?Ga:+Ga;Ga=Z(Ga);var Ya=Qd.test(Ga);return Ya||Sd.test(Ga)?qc(Ga.slice(2),Ya?2:8):ud.test(Ga)?NaN:+Ga}function nh(Ga){return zg(Ga,Qi(Ga))}function ig(Ga){return null==Ga?"":Di(Ga)}function Qg(Ga,Ya,Ka){Ga=null==Ga?oa:Rh(Ga,Ya);return Ga===oa?Ka:Ga}function Hl(Ga,Ya){return null!=Ga&&og(Ga,
Ya,vj)}function Ai(Ga){return fk(Ga)?uf(Ga):Kg(Ga)}function Qi(Ga){if(fk(Ga))Ga=uf(Ga,!0);else if(ih(Ga)){var Ya=rk(Ga),Ka=[];for(hb in Ga)("constructor"!=hb||!Ya&&Rf.call(Ga,hb))&&Ka.push(hb);Ga=Ka}else{var hb=[];if(null!=Ga)for(Ya in Id(Ga))hb.push(Ya);Ga=hb}return Ga}function Qb(Ga,Ya){if(null==Ga)return{};var Ka=L(Bk(Ga),function(hb){return[hb]});return Ya=re(Ya),Xk(Ga,Ka,function(hb,vb){return Ya(hb,vb[0])})}function fc(Ga){return null==Ga?[]:ca(Ga,Ai(Ga))}function dc(Ga){return Kk(ig(Ga).toLowerCase())}
function ja(Ga){return(Ga=ig(Ga))&&Ga.replace(gc,cf).replace(cc,"")}function Fb(Ga,Ya,Ka){return Ga=ig(Ga),(Ya=Ka?oa:Ya)===oa?Od.test(Ga)?Ga.match(Uc)||[]:Ga.match(Ld)||[]:Ga.match(Ya)||[]}function Tb(Ga){return function(){return Ga}}function wb(Ga){return Ga}function zb(Ga){return xk("function"==typeof Ga?Ga:Kf(Ga,1))}function Pb(Ga,Ya,Ka){var hb=Ai(Ya),vb=qg(Ya,hb);null!=Ka||ih(Ya)&&(vb.length||!hb.length)||(Ka=Ya,Ya=Ga,Ga=this,vb=qg(Ya,Ai(Ya)));var Lb=!(ih(Ka)&&"chain"in Ka&&!Ka.chain),Qa=uk(Ga);
return z(vb,function(vd){var he=Ya[vd];Ga[vd]=he;Qa&&(Ga.prototype[vd]=function(){var Je=this.__chain__;if(Lb||Je){var da=Ga(this.__wrapped__);return(da.__actions__=fj(this.__actions__)).push({func:he,args:arguments,thisArg:Ga}),da.__chain__=Je,da}return he.apply(Ga,ma([this.value()],arguments))})}),Ga}function sb(){}function Mb(Ga){return ij(Ga)?ba(sk(Ga)):function(Ya){return function(Ka){return Rh(Ka,Ya)}}(Ga)}function $b(){return[]}function Bc(){return!1}var Pc,Tc=(Eb=null==Eb?Lc:Db.defaults(Lc.Object(),
Eb,Db.pick(Lc,be))).Array,wd=Eb.Date,Rd=Eb.Error,Gd=Eb.Function,Cd=Eb.Math,Id=Eb.Object,xe=Eb.RegExp,Tf=Eb.String,se=Eb.TypeError,$e=Tc.prototype,Pe=Id.prototype,Re=Eb["__core-js_shared__"],ng=Gd.prototype.toString,Rf=Pe.hasOwnProperty,Ni=0,Pf=(Pc=/[^.]+$/.exec(Re&&Re.keys&&Re.keys.IE_PROTO||""))?"Symbol(src)_1."+Pc:"",gg=Pe.toString,mh=ng.call(Id),Og=Lc._,Lg=xe("^"+ng.call(Rf).replace(ad,"\\$\x26").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lh=pe?Eb.Buffer:oa,
sg=Eb.Symbol,hg=Eb.Uint8Array,$g=lh?lh.allocUnsafe:oa,Mf=Ea(Id.getPrototypeOf,Id),Ri=Id.create,kh=Pe.propertyIsEnumerable,hi=$e.splice,Nj=sg?sg.isConcatSpreadable:oa,ri=sg?sg.iterator:oa,Mj=sg?sg.toStringTag:oa,Qh=function(){try{var Ga=bh(Id,"defineProperty");return Ga({},"",{}),Ga}catch(Ya){}}(),Ij=Eb.clearTimeout!==Lc.clearTimeout&&Eb.clearTimeout,Yl=wd&&wd.now!==Lc.Date.now&&wd.now,Bm=Eb.setTimeout!==Lc.setTimeout&&Eb.setTimeout,ag=Cd.ceil,di=Cd.floor,Lm=Id.getOwnPropertySymbols,$l=lh?lh.isBuffer:
oa,Vk=Eb.isFinite,Yf=$e.join,Ci=Ea(Id.keys,Id),Jf=Cd.max,rf=Cd.min,Zl=wd.now,uj=Eb.parseInt,wh=Cd.random,wl=$e.reverse,Jd=bh(Eb,"DataView"),Ef=bh(Eb,"Map"),ye=bh(Eb,"Promise"),ze=bh(Eb,"Set"),Gf=bh(Eb,"WeakMap"),Jg=bh(Id,"create"),ii=Gf&&new Gf,sh={},gk=al(Jd),He=al(Ef),ue=al(ye),qi=al(ze),de=al(Gf),xi=sg?sg.prototype:oa,th=xi?xi.valueOf:oa,xl=xi?xi.toString:oa,si=function(){function Ga(){}return function(Ya){if(!ih(Ya))return{};if(Ri)return Ri(Ya);Ga.prototype=Ya;Ya=new Ga;return Ga.prototype=oa,
Ya}}();jb.templateSettings={escape:ic,evaluate:Pa,interpolate:nb,variable:"",imports:{_:jb}};jb.prototype=gd.prototype;jb.prototype.constructor=jb;Dd.prototype=si(gd.prototype);Dd.prototype.constructor=Dd;ke.prototype=si(gd.prototype);ke.prototype.constructor=ke;Xd.prototype.clear=function(){this.__data__=Jg?Jg(null):{};this.size=0};Xd.prototype.delete=function(Ga){Ga=this.has(Ga)&&delete this.__data__[Ga];return this.size-=Ga?1:0,Ga};Xd.prototype.get=function(Ga){var Ya=this.__data__;return Jg?(Ga=
Ya[Ga],"__lodash_hash_undefined__"===Ga?oa:Ga):Rf.call(Ya,Ga)?Ya[Ga]:oa};Xd.prototype.has=function(Ga){var Ya=this.__data__;return Jg?Ya[Ga]!==oa:Rf.call(Ya,Ga)};Xd.prototype.set=function(Ga,Ya){var Ka=this.__data__;return this.size+=this.has(Ga)?0:1,Ka[Ga]=Jg&&Ya===oa?"__lodash_hash_undefined__":Ya,this};Xe.prototype.clear=function(){this.__data__=[];this.size=0};Xe.prototype.delete=function(Ga){var Ya=this.__data__;Ga=Jb(Ya,Ga);return!(0>Ga)&&(Ga==Ya.length-1?Ya.pop():hi.call(Ya,Ga,1),--this.size,
!0)};Xe.prototype.get=function(Ga){var Ya=this.__data__;Ga=Jb(Ya,Ga);return 0>Ga?oa:Ya[Ga][1]};Xe.prototype.has=function(Ga){return-1<Jb(this.__data__,Ga)};Xe.prototype.set=function(Ga,Ya){var Ka=this.__data__,hb=Jb(Ka,Ga);return 0>hb?(++this.size,Ka.push([Ga,Ya])):Ka[hb][1]=Ya,this};qe.prototype.clear=function(){this.size=0;this.__data__={hash:new Xd,map:new (Ef||Xe),string:new Xd}};qe.prototype.delete=function(Ga){Ga=Zf(this,Ga).delete(Ga);return this.size-=Ga?1:0,Ga};qe.prototype.get=function(Ga){return Zf(this,
Ga).get(Ga)};qe.prototype.has=function(Ga){return Zf(this,Ga).has(Ga)};qe.prototype.set=function(Ga,Ya){var Ka=Zf(this,Ga),hb=Ka.size;return Ka.set(Ga,Ya),this.size+=Ka.size==hb?0:1,this};ff.prototype.add=ff.prototype.push=function(Ga){return this.__data__.set(Ga,"__lodash_hash_undefined__"),this};ff.prototype.has=function(Ga){return this.__data__.has(Ga)};vg.prototype.clear=function(){this.__data__=new Xe;this.size=0};vg.prototype.delete=function(Ga){var Ya=this.__data__;Ga=Ya.delete(Ga);return this.size=
Ya.size,Ga};vg.prototype.get=function(Ga){return this.__data__.get(Ga)};vg.prototype.has=function(Ga){return this.__data__.has(Ga)};vg.prototype.set=function(Ga,Ya){var Ka=this.__data__;if(Ka instanceof Xe){var hb=Ka.__data__;if(!Ef||199>hb.length)return hb.push([Ga,Ya]),this.size=++Ka.size,this;Ka=this.__data__=new qe(hb)}return Ka.set(Ga,Ya),this.size=Ka.size,this};var xh=Ej(li),Ff=Ej(Zh,!0),Yg=Fh(),Ul=Fh(!0),yl=ii?function(Ga,Ya){return ii.set(Ga,Ya),Ga}:wb,Ve=Qh?function(Ga,Ya){return Qh(Ga,"toString",
{configurable:!0,enumerable:!1,value:Tb(Ya),writable:!0})}:wb,Ml=Ij||function(Ga){return Lc.clearTimeout(Ga)},cl=ze&&1/Za(new ze([,-0]))[1]==Ca?function(Ga){return new ze(Ga)}:sb,Bf=ii?function(Ga){return ii.get(Ga)}:sb,dl=Lm?function(Ga){return null==Ga?[]:(Ga=Id(Ga),n(Lm(Ga),function(Ya){return kh.call(Ga,Ya)}))}:$b,ch=Lm?function(Ga){for(var Ya=[];Ga;)ma(Ya,dl(Ga)),Ga=Mf(Ga);return Ya}:$b,ji=Sh;(Jd&&"[object DataView]"!=ji(new Jd(new ArrayBuffer(1)))||Ef&&"[object Map]"!=ji(new Ef)||ye&&"[object Promise]"!=
ji(ye.resolve())||ze&&"[object Set]"!=ji(new ze)||Gf&&"[object WeakMap]"!=ji(new Gf))&&(ji=function(Ga){var Ya=Sh(Ga);if(Ga=(Ga="[object Object]"==Ya?Ga.constructor:oa)?al(Ga):"")switch(Ga){case gk:return"[object DataView]";case He:return"[object Map]";case ue:return"[object Promise]";case qi:return"[object Set]";case de:return"[object WeakMap]"}return Ya});var Qk=Re?uk:Bc,zl=Ui(yl),el=Bm||function(Ga,Ya){return Lc.setTimeout(Ga,Ya)},hl=Ui(Ve),Wj=function(Ga){Ga=rj(Ga,function(Ka){return 500===Ya.size&&
Ya.clear(),Ka});var Ya=Ga.cache;return Ga}(function(Ga){var Ya=[];return 46===Ga.charCodeAt(0)&&Ya.push(""),Ga.replace(Jc,function(Ka,hb,vb,Lb){Ya.push(vb?Lb.replace(Ed,"$1"):hb||Ka)}),Ya}),ti=jg(function(Ga,Ya){return Jh(Ga)?xf(Ga,uh(Ya,1,Jh,!0)):[]}),pn=jg(function(Ga,Ya){var Ka=Fj(Ya);return Jh(Ka)&&(Ka=oa),Jh(Ga)?xf(Ga,uh(Ya,1,Jh,!0),re(Ka,2)):[]}),Wk=jg(function(Ga,Ya){var Ka=Fj(Ya);return Jh(Ka)&&(Ka=oa),Jh(Ga)?xf(Ga,uh(Ya,1,Jh,!0),oa,Ka):[]}),Xh=jg(function(Ga){var Ya=L(Ga,Rj);return Ya.length&&
Ya[0]===Ga[0]?zf(Ya):[]}),Nm=jg(function(Ga){var Ya=Fj(Ga),Ka=L(Ga,Rj);return Ya===Fj(Ka)?Ya=oa:Ka.pop(),Ka.length&&Ka[0]===Ga[0]?zf(Ka,re(Ya,2)):[]}),Ah=jg(function(Ga){var Ya=Fj(Ga),Ka=L(Ga,Rj);return(Ya="function"==typeof Ya?Ya:oa)&&Ka.pop(),Ka.length&&Ka[0]===Ga[0]?zf(Ka,oa,Ya):[]}),Fi=jg(Ck),Mm=xj(function(Ga,Ya){var Ka=null==Ga?0:Ga.length,hb=ve(Ga,Ya);return Zj(Ga,L(Ya,function(vb){return mg(vb,Ka)?+vb:vb}).sort(mi)),hb}),vm=jg(function(Ga){return Lh(uh(Ga,1,Jh,!0))}),Aj=jg(function(Ga){var Ya=
Fj(Ga);return Jh(Ya)&&(Ya=oa),Lh(uh(Ga,1,Jh,!0),re(Ya,2))}),dg=jg(function(Ga){var Ya=Fj(Ga);return Ya="function"==typeof Ya?Ya:oa,Lh(uh(Ga,1,Jh,!0),oa,Ya)}),Ji=jg(function(Ga,Ya){return Jh(Ga)?xf(Ga,Ya):[]}),wm=jg(function(Ga){return Fl(n(Ga,Jh))}),Cm=jg(function(Ga){var Ya=Fj(Ga);return Jh(Ya)&&(Ya=oa),Fl(n(Ga,Jh),re(Ya,2))}),y=jg(function(Ga){var Ya=Fj(Ga);return Ya="function"==typeof Ya?Ya:oa,Fl(n(Ga,Jh),oa,Ya)}),U=jg(Ok),xa=jg(function(Ga){var Ya=Ga.length;Ya=1<Ya?Ga[Ya-1]:oa;return Ya="function"==
typeof Ya?(Ga.pop(),Ya):oa,Gj(Ga,Ya)}),ta=xj(function(Ga){var Ya=Ga.length,Ka=Ya?Ga[0]:0,hb=this.__wrapped__,vb=function(Lb){return ve(Lb,Ga)};return!(1<Ya||this.__actions__.length)&&hb instanceof ke&&mg(Ka)?((hb=hb.slice(Ka,+Ka+(Ya?1:0))).__actions__.push({func:Hj,args:[vb],thisArg:oa}),(new Dd(hb,this.__chain__)).thru(function(Lb){return Ya&&!Lb.length&&Lb.push(oa),Lb})):this.thru(vb)}),Fa=Ei(function(Ga,Ya,Ka){Rf.call(Ga,Ka)?++Ga[Ka]:kd(Ga,Ka,1)}),ab=pj(Fm),pb=pj(ml),tb=Ei(function(Ga,Ya,Ka){Rf.call(Ga,
Ka)?Ga[Ka].push(Ya):kd(Ga,Ka,[Ya])}),ac=jg(function(Ga,Ya,Ka){var hb=-1,vb="function"==typeof Ya,Lb=fk(Ga)?Tc(Ga.length):[];return xh(Ga,function(Qa){Lb[++hb]=vb?x(Ya,Qa,Ka):Bj(Qa,Ya,Ka)}),Lb}),Ac=Ei(function(Ga,Ya,Ka){kd(Ga,Ka,Ya)}),Cc=Ei(function(Ga,Ya,Ka){Ga[Ka?0:1].push(Ya)},function(){return[[],[]]}),Hd=jg(function(Ga,Ya){if(null==Ga)return[];var Ka=Ya.length;return 1<Ka&&Ti(Ga,Ya[0],Ya[1])?Ya=[]:2<Ka&&Ti(Ya[0],Ya[1],Ya[2])&&(Ya=[Ya[0]]),kl(Ga,uh(Ya,1),[])}),Pd=Yl||function(){return Lc.Date.now()},
qd=jg(function(Ga,Ya,Ka){var hb=1;if(Ka.length){var vb=Oa(Ka,dm(qd));hb|=32}return rg(Ga,hb,Ya,Ka,vb)}),Ce=jg(function(Ga,Ya,Ka){var hb=3;if(Ka.length){var vb=Oa(Ka,dm(Ce));hb|=32}return rg(Ya,hb,Ga,Ka,vb)}),yf=jg(function(Ga,Ya){return Hf(Ga,1,Ya)}),Eg=jg(function(Ga,Ya,Ka){return Hf(Ga,oi(Ya)||0,Ka)});rj.Cache=qe;var kj=jg(function(Ga,Ya){var Ka=(Ya=1==Ya.length&&Nf(Ya[0])?L(Ya[0],ea(re())):L(uh(Ya,1),ea(re()))).length;return jg(function(hb){for(var vb=-1,Lb=rf(hb.length,Ka);++vb<Lb;)hb[vb]=Ya[vb].call(this,
hb[vb]);return x(Ga,this,hb)})}),kg=jg(function(Ga,Ya){var Ka=Oa(Ya,dm(kg));return rg(Ga,32,oa,Ya,Ka)}),Vg=jg(function(Ga,Ya){var Ka=Oa(Ya,dm(Vg));return rg(Ga,64,oa,Ya,Ka)}),Hg=xj(function(Ga,Ya){return rg(Ga,256,oa,oa,oa,Ya)}),ki=pk(yi),Ph=pk(function(Ga,Ya){return Ga>=Ya}),bg=oj(function(){return arguments}())?oj:function(Ga){return Dg(Ga)&&Rf.call(Ga,"callee")&&!kh.call(Ga,"callee")},Nf=Tc.isArray,Bh=Cb?ea(Cb):function(Ga){return Dg(Ga)&&"[object ArrayBuffer]"==Sh(Ga)},dh=$l||Bc,lj=Kd?ea(Kd):
function(Ga){return Dg(Ga)&&"[object Date]"==Sh(Ga)},Gh=ce?ea(ce):function(Ga){return Dg(Ga)&&"[object Map]"==ji(Ga)},zj=pd?ea(pd):function(Ga){return Dg(Ga)&&"[object RegExp]"==Sh(Ga)},gl=mc?ea(mc):function(Ga){return Dg(Ga)&&"[object Set]"==ji(Ga)},Dk=Ne?ea(Ne):function(Ga){return Dg(Ga)&&ph(Ga.length)&&!!rd[Sh(Ga)]},hm=pk(Oj),Mo=pk(function(Ga,Ya){return Ga<=Ya}),on=ni(function(Ga,Ya){if(rk(Ya)||fk(Ya))zg(Ya,Ai(Ya),Ga);else for(var Ka in Ya)Rf.call(Ya,Ka)&&cb(Ga,Ka,Ya[Ka])}),jh=ni(function(Ga,
Ya){zg(Ya,Qi(Ya),Ga)}),gn=ni(function(Ga,Ya,Ka,hb){zg(Ya,Qi(Ya),Ga,hb)}),il=ni(function(Ga,Ya,Ka,hb){zg(Ya,Ai(Ya),Ga,hb)}),Al=xj(ve),kk=jg(function(Ga,Ya){Ga=Id(Ga);var Ka=-1,hb=Ya.length,vb=2<hb?Ya[2]:oa;for(vb&&Ti(Ya[0],Ya[1],vb)&&(hb=1);++Ka<hb;){vb=Ya[Ka];for(var Lb=Qi(vb),Qa=-1,vd=Lb.length;++Qa<vd;){var he=Lb[Qa],Je=Ga[he];(Je===oa||qk(Je,Pe[he])&&!Rf.call(Ga,he))&&(Ga[he]=vb[he])}}return Ga}),Bl=jg(function(Ga){return Ga.push(oa,rh),x(jl,oa,Ga)}),an=nl(function(Ga,Ya,Ka){null!=Ya&&"function"!=
typeof Ya.toString&&(Ya=gg.call(Ya));Ga[Ya]=Ka},Tb(wb)),qm=nl(function(Ga,Ya,Ka){null!=Ya&&"function"!=typeof Ya.toString&&(Ya=gg.call(Ya));Rf.call(Ga,Ya)?Ga[Ya].push(Ka):Ga[Ya]=[Ka]},re),Om=jg(Bj),Jk=ni(function(Ga,Ya,Ka){Yj(Ga,Ya,Ka)}),jl=ni(function(Ga,Ya,Ka,hb){Yj(Ga,Ya,Ka,hb)}),am=xj(function(Ga,Ya){var Ka={};if(null==Ga)return Ka;var hb=!1;Ya=L(Ya,function(Lb){return Lb=Sj(Lb,Ga),hb||=1<Lb.length,Lb});zg(Ga,Bk(Ga),Ka);hb&&(Ka=Kf(Ka,7,Li));for(var vb=Ya.length;vb--;)Yk(Ka,Ya[vb]);return Ka}),
fn=xj(function(Ga,Ya){return null==Ga?{}:function(Ka,hb){return Xk(Ka,hb,function(vb,Lb){return Hl(Ka,Lb)})}(Ga,Ya)}),Rm=dk(Ai),Zo=dk(Qi),io=ok(function(Ga,Ya,Ka){return Ya=Ya.toLowerCase(),Ga+(Ka?dc(Ya):Ya)}),Jo=ok(function(Ga,Ya,Ka){return Ga+(Ka?"-":"")+Ya.toLowerCase()}),Gl=ok(function(Ga,Ya,Ka){return Ga+(Ka?" ":"")+Ya.toLowerCase()}),Oo=zi("toLowerCase"),ro=ok(function(Ga,Ya,Ka){return Ga+(Ka?"_":"")+Ya.toLowerCase()}),bn=ok(function(Ga,Ya,Ka){return Ga+(Ka?" ":"")+Kk(Ya)}),cn=ok(function(Ga,
Ya,Ka){return Ga+(Ka?" ":"")+Ya.toUpperCase()}),Kk=zi("toUpperCase"),Bn=jg(function(Ga,Ya){try{return x(Ga,oa,Ya)}catch(Ka){return gj(Ka)?Ka:new Rd(Ka)}}),ho=xj(function(Ga,Ya){return z(Ya,function(Ka){Ka=sk(Ka);kd(Ga,Ka,qd(Ga[Ka],Ga))}),Ga}),Cn=en(),po=en(!0),Rl=jg(function(Ga,Ya){return function(Ka){return Bj(Ka,Ga,Ya)}}),Pm=jg(function(Ga,Ya){return function(Ka){return Bj(Ga,Ka,Ya)}}),jo=Ol(L),Ko=Ol(t),Sm=Ol(H),ol=Pl(),no=Pl(!0),ko=qj(function(Ga,Ya){return Ga+Ya},0),Dn=Ql("ceil"),Dm=qj(function(Ga,
Ya){return Ga/Ya},1),Sn=Ql("floor"),rm,$o=qj(function(Ga,Ya){return Ga*Ya},1),Tn=Ql("round"),te=qj(function(Ga,Ya){return Ga-Ya},0);return jb.after=function(Ga,Ya){if("function"!=typeof Ya)throw new se("Expected a function");return Ga=Ig(Ga),function(){if(1>--Ga)return Ya.apply(this,arguments)}},jb.ary=tm,jb.assign=on,jb.assignIn=jh,jb.assignInWith=gn,jb.assignWith=il,jb.at=Al,jb.before=Tl,jb.bind=qd,jb.bindAll=ho,jb.bindKey=Ce,jb.castArray=function(){if(!arguments.length)return[];var Ga=arguments[0];
return Nf(Ga)?Ga:[Ga]},jb.chain=Pk,jb.chunk=function(Ga,Ya,Ka){Ya=(Ka?Ti(Ga,Ya,Ka):Ya===oa)?1:Jf(Ig(Ya),0);Ka=null==Ga?0:Ga.length;if(!Ka||1>Ya)return[];for(var hb=0,vb=0,Lb=Tc(ag(Ka/Ya));hb<Ka;)Lb[vb++]=ak(Ga,hb,hb+=Ya);return Lb},jb.compact=function(Ga){for(var Ya=-1,Ka=null==Ga?0:Ga.length,hb=0,vb=[];++Ya<Ka;){var Lb=Ga[Ya];Lb&&(vb[hb++]=Lb)}return vb},jb.concat=function(){var Ga=arguments.length;if(!Ga)return[];for(var Ya=Tc(Ga-1),Ka=arguments[0];Ga--;)Ya[Ga-1]=arguments[Ga];return ma(Nf(Ka)?
fj(Ka):[Ka],uh(Ya,1))},jb.cond=function(Ga){var Ya=null==Ga?0:Ga.length,Ka=re();return Ga=Ya?L(Ga,function(hb){if("function"!=typeof hb[1])throw new se("Expected a function");return[Ka(hb[0]),hb[1]]}):[],jg(function(hb){for(var vb=-1;++vb<Ya;){var Lb=Ga[vb];if(x(Lb[0],this,hb))return x(Lb[1],this,hb)}})},jb.conforms=function(Ga){return function(Ya){var Ka=Ai(Ya);return function(hb){return eg(hb,Ya,Ka)}}(Kf(Ga,1))},jb.constant=Tb,jb.countBy=Fa,jb.create=function(Ga,Ya){Ga=si(Ga);return null==Ya?Ga:
Sc(Ga,Ya)},jb.curry=function vb(Ya,Ka,hb){Ya=rg(Ya,8,oa,oa,oa,oa,oa,hb?oa:Ka);return Ya.placeholder=vb.placeholder,Ya},jb.curryRight=function Lb(Ka,hb,vb){Ka=rg(Ka,16,oa,oa,oa,oa,oa,vb?oa:hb);return Ka.placeholder=Lb.placeholder,Ka},jb.debounce=sj,jb.defaults=kk,jb.defaultsDeep=Bl,jb.defer=yf,jb.delay=Eg,jb.difference=ti,jb.differenceBy=pn,jb.differenceWith=Wk,jb.drop=function(Ka,hb,vb){var Lb=null==Ka?0:Ka.length;return Lb?ak(Ka,0>(hb=vb||hb===oa?1:Ig(hb))?0:hb,Lb):[]},jb.dropRight=function(Ka,hb,
vb){var Lb=null==Ka?0:Ka.length;return Lb?ak(Ka,0,0>(hb=Lb-(hb=vb||hb===oa?1:Ig(hb)))?0:hb):[]},jb.dropRightWhile=function(Ka,hb){return Ka&&Ka.length?bk(Ka,re(hb,3),!0,!0):[]},jb.dropWhile=function(Ka,hb){return Ka&&Ka.length?bk(Ka,re(hb,3),!0):[]},jb.fill=function(Ka,hb,vb,Lb){var Qa=null==Ka?0:Ka.length;if(Qa)for(vb&&"number"!=typeof vb&&Ti(Ka,hb,vb)&&(vb=0,Lb=Qa),Qa=Ka.length,0>(vb=Ig(vb))&&(vb=-vb>Qa?0:Qa+vb),0>(Lb=Lb===oa||Lb>Qa?Qa:Ig(Lb))&&(Lb+=Qa),Lb=vb>Lb?0:jj(Lb);vb<Lb;)Ka[vb++]=hb;else Ka=
[];return Ka},jb.filter=function(Ka,hb){return(Nf(Ka)?n:ei)(Ka,re(hb,3))},jb.flatMap=function(Ka,hb){return uh(yj(Ka,hb),1)},jb.flatMapDeep=function(Ka,hb){return uh(yj(Ka,hb),Ca)},jb.flatMapDepth=function(Ka,hb,vb){return vb=vb===oa?1:Ig(vb),uh(yj(Ka,hb),vb)},jb.flatten=Qm,jb.flattenDeep=function(Ka){return(null==Ka?0:Ka.length)?uh(Ka,Ca):[]},jb.flattenDepth=function(Ka,hb){return(null==Ka?0:Ka.length)?uh(Ka,hb===oa?1:Ig(hb)):[]},jb.flip=function(Ka){return rg(Ka,512)},jb.flow=Cn,jb.flowRight=po,
jb.fromPairs=function(Ka){for(var hb=-1,vb=null==Ka?0:Ka.length,Lb={};++hb<vb;){var Qa=Ka[hb];Lb[Qa[0]]=Qa[1]}return Lb},jb.functions=function(Ka){return null==Ka?[]:qg(Ka,Ai(Ka))},jb.functionsIn=function(Ka){return null==Ka?[]:qg(Ka,Qi(Ka))},jb.groupBy=tb,jb.initial=function(Ka){return(null==Ka?0:Ka.length)?ak(Ka,0,-1):[]},jb.intersection=Xh,jb.intersectionBy=Nm,jb.intersectionWith=Ah,jb.invert=an,jb.invertBy=qm,jb.invokeMap=ac,jb.iteratee=zb,jb.keyBy=Ac,jb.keys=Ai,jb.keysIn=Qi,jb.map=yj,jb.mapKeys=
function(Ka,hb){var vb={};return hb=re(hb,3),li(Ka,function(Lb,Qa,vd){kd(vb,hb(Lb,Qa,vd),Lb)}),vb},jb.mapValues=function(Ka,hb){var vb={};return hb=re(hb,3),li(Ka,function(Lb,Qa,vd){kd(vb,Qa,hb(Lb,Qa,vd))}),vb},jb.matches=function(Ka){return Ki(Kf(Ka,1))},jb.matchesProperty=function(Ka,hb){return lk(Ka,Kf(hb,1))},jb.memoize=rj,jb.merge=Jk,jb.mergeWith=jl,jb.method=Rl,jb.methodOf=Pm,jb.mixin=Pb,jb.negate=gm,jb.nthArg=function(Ka){return Ka=Ig(Ka),jg(function(hb){return Pj(hb,Ka)})},jb.omit=am,jb.omitBy=
function(Ka,hb){return Qb(Ka,gm(re(hb)))},jb.once=function(Ka){return Tl(2,Ka)},jb.orderBy=function(Ka,hb,vb,Lb){return null==Ka?[]:(Nf(hb)||(hb=null==hb?[]:[hb]),Nf(vb=Lb?oa:vb)||(vb=null==vb?[]:[vb]),kl(Ka,hb,vb))},jb.over=jo,jb.overArgs=kj,jb.overEvery=Ko,jb.overSome=Sm,jb.partial=kg,jb.partialRight=Vg,jb.partition=Cc,jb.pick=fn,jb.pickBy=Qb,jb.property=Mb,jb.propertyOf=function(Ka){return function(hb){return null==Ka?oa:Rh(Ka,hb)}},jb.pull=Fi,jb.pullAll=Ck,jb.pullAllBy=function(Ka,hb,vb){return Ka&&
Ka.length&&hb&&hb.length?El(Ka,hb,re(vb,2)):Ka},jb.pullAllWith=function(Ka,hb,vb){return Ka&&Ka.length&&hb&&hb.length?El(Ka,hb,oa,vb):Ka},jb.pullAt=Mm,jb.range=ol,jb.rangeRight=no,jb.rearg=Hg,jb.reject=function(Ka,hb){return(Nf(Ka)?n:ei)(Ka,gm(re(hb,3)))},jb.remove=function(Ka,hb){var vb=[];if(!Ka||!Ka.length)return vb;var Lb=-1,Qa=[],vd=Ka.length;for(hb=re(hb,3);++Lb<vd;){var he=Ka[Lb];hb(he,Lb,Ka)&&(vb.push(he),Qa.push(Lb))}return Zj(Ka,Qa),vb},jb.rest=function(Ka,hb){if("function"!=typeof Ka)throw new se("Expected a function");
return jg(Ka,hb===oa?hb:Ig(hb))},jb.reverse=Vi,jb.sampleSize=function(Ka,hb,vb){return hb=(vb?Ti(Ka,hb,vb):hb===oa)?1:Ig(hb),(Nf(Ka)?sa:dj)(Ka,hb)},jb.set=function(Ka,hb,vb){return null==Ka?Ka:Eh(Ka,hb,vb)},jb.setWith=function(Ka,hb,vb,Lb){return Lb="function"==typeof Lb?Lb:oa,null==Ka?Ka:Eh(Ka,hb,vb,Lb)},jb.shuffle=function(Ka){return(Nf(Ka)?qa:Xg)(Ka)},jb.slice=function(Ka,hb,vb){var Lb=null==Ka?0:Ka.length;return Lb?(vb&&"number"!=typeof vb&&Ti(Ka,hb,vb)?(hb=0,vb=Lb):(hb=null==hb?0:Ig(hb),vb=vb===
oa?Lb:Ig(vb)),ak(Ka,hb,vb)):[]},jb.sortBy=Hd,jb.sortedUniq=function(Ka){return Ka&&Ka.length?yk(Ka):[]},jb.sortedUniqBy=function(Ka,hb){return Ka&&Ka.length?yk(Ka,re(hb,2)):[]},jb.split=function(Ka,hb,vb){return vb&&"number"!=typeof vb&&Ti(Ka,hb,vb)&&(hb=vb=oa),(vb=vb===oa?4294967295:vb>>>0)?(Ka=ig(Ka))&&("string"==typeof hb||null!=hb&&!zj(hb))&&!(hb=Di(hb))&&cd.test(Ka)?Mh(eb(Ka),0,vb):Ka.split(hb,vb):[]},jb.spread=function(Ka,hb){if("function"!=typeof Ka)throw new se("Expected a function");return hb=
null==hb?0:Jf(Ig(hb),0),jg(function(vb){var Lb=vb[hb];vb=Mh(vb,0,hb);return Lb&&ma(vb,Lb),x(Ka,this,vb)})},jb.tail=function(Ka){var hb=null==Ka?0:Ka.length;return hb?ak(Ka,1,hb):[]},jb.take=function(Ka,hb,vb){return Ka&&Ka.length?ak(Ka,0,0>(hb=vb||hb===oa?1:Ig(hb))?0:hb):[]},jb.takeRight=function(Ka,hb,vb){var Lb=null==Ka?0:Ka.length;return Lb?ak(Ka,0>(hb=Lb-(hb=vb||hb===oa?1:Ig(hb)))?0:hb,Lb):[]},jb.takeRightWhile=function(Ka,hb){return Ka&&Ka.length?bk(Ka,re(hb,3),!1,!0):[]},jb.takeWhile=function(Ka,
hb){return Ka&&Ka.length?bk(Ka,re(hb,3)):[]},jb.tap=function(Ka,hb){return hb(Ka),Ka},jb.throttle=function(Ka,hb,vb){var Lb=!0,Qa=!0;if("function"!=typeof Ka)throw new se("Expected a function");return ih(vb)&&(Lb="leading"in vb?!!vb.leading:Lb,Qa="trailing"in vb?!!vb.trailing:Qa),sj(Ka,hb,{leading:Lb,maxWait:hb,trailing:Qa})},jb.thru=Hj,jb.toArray=Oi,jb.toPairs=Rm,jb.toPairsIn=Zo,jb.toPath=function(Ka){return Nf(Ka)?L(Ka,sk):tg(Ka)?[Ka]:fj(Wj(ig(Ka)))},jb.toPlainObject=nh,jb.transform=function(Ka,
hb,vb){var Lb=Nf(Ka),Qa=Lb||dh(Ka)||Dk(Ka);if(hb=re(hb,4),null==vb){var vd=Ka&&Ka.constructor;vb=Qa?Lb?new vd:[]:ih(Ka)&&uk(vd)?si(Mf(Ka)):{}}return(Qa?z:li)(Ka,function(he,Je,da){return hb(vb,he,Je,da)}),vb},jb.unary=function(Ka){return tm(Ka,1)},jb.union=vm,jb.unionBy=Aj,jb.unionWith=dg,jb.uniq=function(Ka){return Ka&&Ka.length?Lh(Ka):[]},jb.uniqBy=function(Ka,hb){return Ka&&Ka.length?Lh(Ka,re(hb,2)):[]},jb.uniqWith=function(Ka,hb){return hb="function"==typeof hb?hb:oa,Ka&&Ka.length?Lh(Ka,oa,hb):
[]},jb.unset=function(Ka,hb){return null==Ka||Yk(Ka,hb)},jb.unzip=Ok,jb.unzipWith=Gj,jb.update=function(Ka,hb,vb){null!=Ka&&(vb=fi(vb),Ka=Eh(Ka,hb,vb(Rh(Ka,hb)),void 0));return Ka},jb.updateWith=function(Ka,hb,vb,Lb){Lb="function"==typeof Lb?Lb:oa;null!=Ka&&(vb=fi(vb),Ka=Eh(Ka,hb,vb(Rh(Ka,hb)),Lb));return Ka},jb.values=fc,jb.valuesIn=function(Ka){return null==Ka?[]:ca(Ka,Qi(Ka))},jb.without=Ji,jb.words=Fb,jb.wrap=function(Ka,hb){return kg(fi(hb),Ka)},jb.xor=wm,jb.xorBy=Cm,jb.xorWith=y,jb.zip=U,jb.zipObject=
function(Ka,hb){return Em(Ka||[],hb||[],cb)},jb.zipObjectDeep=function(Ka,hb){return Em(Ka||[],hb||[],Eh)},jb.zipWith=xa,jb.entries=Rm,jb.entriesIn=Zo,jb.extend=jh,jb.extendWith=gn,Pb(jb,jb),jb.add=ko,jb.attempt=Bn,jb.camelCase=io,jb.capitalize=dc,jb.ceil=Dn,jb.clamp=function(Ka,hb,vb){return vb===oa&&(vb=hb,hb=oa),vb!==oa&&(vb=(vb=oi(vb))==vb?vb:0),hb!==oa&&(hb=(hb=oi(hb))==hb?hb:0),Ue(oi(Ka),hb,vb)},jb.clone=function(Ka){return Kf(Ka,4)},jb.cloneDeep=function(Ka){return Kf(Ka,5)},jb.cloneDeepWith=
function(Ka,hb){return Kf(Ka,5,"function"==typeof hb?hb:oa)},jb.cloneWith=function(Ka,hb){return Kf(Ka,4,"function"==typeof hb?hb:oa)},jb.conformsTo=function(Ka,hb){return null==hb||eg(Ka,hb,Ai(hb))},jb.deburr=ja,jb.defaultTo=function(Ka,hb){return null==Ka||Ka!=Ka?hb:Ka},jb.divide=Dm,jb.endsWith=function(Ka,hb,vb){Ka=ig(Ka);hb=Di(hb);var Lb=Ka.length;Lb=vb=vb===oa?Lb:Ue(Ig(vb),0,Lb);return 0<=(vb-=hb.length)&&Ka.slice(vb,Lb)==hb},jb.eq=qk,jb.escape=function(Ka){return(Ka=ig(Ka))&&Wb.test(Ka)?Ka.replace(ib,
pg):Ka},jb.escapeRegExp=function(Ka){return(Ka=ig(Ka))&&Nc.test(Ka)?Ka.replace(ad,"\\$\x26"):Ka},jb.every=function(Ka,hb,vb){var Lb=Nf(Ka)?t:Qf;return vb&&Ti(Ka,hb,vb)&&(hb=oa),Lb(Ka,re(hb,3))},jb.find=ab,jb.findIndex=Fm,jb.findKey=function(Ka,hb){return aa(Ka,re(hb,3),li)},jb.findLast=pb,jb.findLastIndex=ml,jb.findLastKey=function(Ka,hb){return aa(Ka,re(hb,3),Zh)},jb.floor=Sn,jb.forEach=Vj,jb.forEachRight=tk,jb.forIn=function(Ka,hb){return null==Ka?Ka:Yg(Ka,re(hb,3),Qi)},jb.forInRight=function(Ka,
hb){return null==Ka?Ka:Ul(Ka,re(hb,3),Qi)},jb.forOwn=function(Ka,hb){return Ka&&li(Ka,re(hb,3))},jb.forOwnRight=function(Ka,hb){return Ka&&Zh(Ka,re(hb,3))},jb.get=Qg,jb.gt=ki,jb.gte=Ph,jb.has=function(Ka,hb){return null!=Ka&&og(Ka,hb,Cl)},jb.hasIn=Hl,jb.head=Mk,jb.identity=wb,jb.includes=function(Ka,hb,vb,Lb){Ka=fk(Ka)?Ka:fc(Ka);vb=vb&&!Lb?Ig(vb):0;Lb=Ka.length;return 0>vb&&(vb=Jf(Lb+vb,0)),$i(Ka)?vb<=Lb&&-1<Ka.indexOf(hb,vb):!!Lb&&-1<Q(Ka,hb,vb)},jb.indexOf=function(Ka,hb,vb){var Lb=null==Ka?0:Ka.length;
if(!Lb)return-1;vb=null==vb?0:Ig(vb);return 0>vb&&(vb=Jf(Lb+vb,0)),Q(Ka,hb,vb)},jb.inRange=function(Ka,hb,vb){hb=Sf(hb);vb===oa?(vb=hb,hb=0):vb=Sf(vb);Ka=oi(Ka);return Ka>=rf(hb,vb)&&Ka<Jf(hb,vb)},jb.invoke=Om,jb.isArguments=bg,jb.isArray=Nf,jb.isArrayBuffer=Bh,jb.isArrayLike=fk,jb.isArrayLikeObject=Jh,jb.isBoolean=function(Ka){return!0===Ka||!1===Ka||Dg(Ka)&&"[object Boolean]"==Sh(Ka)},jb.isBuffer=dh,jb.isDate=lj,jb.isElement=function(Ka){return Dg(Ka)&&1===Ka.nodeType&&!Dh(Ka)},jb.isEmpty=function(Ka){if(null==
Ka)return!0;if(fk(Ka)&&(Nf(Ka)||"string"==typeof Ka||"function"==typeof Ka.splice||dh(Ka)||Dk(Ka)||bg(Ka)))return!Ka.length;var hb=ji(Ka);if("[object Map]"==hb||"[object Set]"==hb)return!Ka.size;if(rk(Ka))return!Kg(Ka).length;for(var vb in Ka)if(Rf.call(Ka,vb))return!1;return!0},jb.isEqual=function(Ka,hb){return Wh(Ka,hb)},jb.isEqualWith=function(Ka,hb,vb){var Lb=(vb="function"==typeof vb?vb:oa)?vb(Ka,hb):oa;return Lb===oa?Wh(Ka,hb,oa,vb):!!Lb},jb.isError=gj,jb.isFinite=function(Ka){return"number"==
typeof Ka&&Vk(Ka)},jb.isFunction=uk,jb.isInteger=mk,jb.isLength=ph,jb.isMap=Gh,jb.isMatch=function(Ka,hb){return Ka===hb||Dl(Ka,hb,Zi(hb))},jb.isMatchWith=function(Ka,hb,vb){return vb="function"==typeof vb?vb:oa,Dl(Ka,hb,Zi(hb),vb)},jb.isNaN=function(Ka){return Xj(Ka)&&Ka!=+Ka},jb.isNative=function(Ka){if(Qk(Ka))throw new Rd("Unsupported core-js use. Try https://npms.io/search?q\x3dponyfill.");return wk(Ka)},jb.isNil=function(Ka){return null==Ka},jb.isNull=function(Ka){return null===Ka},jb.isNumber=
Xj,jb.isObject=ih,jb.isObjectLike=Dg,jb.isPlainObject=Dh,jb.isRegExp=zj,jb.isSafeInteger=function(Ka){return mk(Ka)&&-9007199254740991<=Ka&&9007199254740991>=Ka},jb.isSet=gl,jb.isString=$i,jb.isSymbol=tg,jb.isTypedArray=Dk,jb.isUndefined=function(Ka){return Ka===oa},jb.isWeakMap=function(Ka){return Dg(Ka)&&"[object WeakMap]"==ji(Ka)},jb.isWeakSet=function(Ka){return Dg(Ka)&&"[object WeakSet]"==Sh(Ka)},jb.join=function(Ka,hb){return null==Ka?"":Yf.call(Ka,hb)},jb.kebabCase=Jo,jb.last=Fj,jb.lastIndexOf=
function(Ka,hb,vb){var Lb=null==Ka?0:Ka.length;if(!Lb)return-1;var Qa=Lb;vb!==oa&&(Qa=0>(Qa=Ig(vb))?Jf(Lb+Qa,0):rf(Qa,Lb-1));if(hb==hb)a:{for(vb=Qa+1;vb--;)if(Ka[vb]===hb){Ka=vb;break a}Ka=vb}else Ka=M(Ka,O,Qa,!0);return Ka},jb.lowerCase=Gl,jb.lowerFirst=Oo,jb.lt=hm,jb.lte=Mo,jb.max=function(Ka){return Ka&&Ka.length?Pg(Ka,wb,yi):oa},jb.maxBy=function(Ka,hb){return Ka&&Ka.length?Pg(Ka,re(hb,2),yi):oa},jb.mean=function(Ka){return P(Ka,wb)},jb.meanBy=function(Ka,hb){return P(Ka,re(hb,2))},jb.min=function(Ka){return Ka&&
Ka.length?Pg(Ka,wb,Oj):oa},jb.minBy=function(Ka,hb){return Ka&&Ka.length?Pg(Ka,re(hb,2),Oj):oa},jb.stubArray=$b,jb.stubFalse=Bc,jb.stubObject=function(){return{}},jb.stubString=function(){return""},jb.stubTrue=function(){return!0},jb.multiply=$o,jb.nth=function(Ka,hb){return Ka&&Ka.length?Pj(Ka,Ig(hb)):oa},jb.noConflict=function(){return Lc._===this&&(Lc._=Og),this},jb.noop=sb,jb.now=Pd,jb.pad=function(Ka,hb,vb){Ka=ig(Ka);var Lb=(hb=Ig(hb))?fb(Ka):0;if(!hb||Lb>=hb)return Ka;hb=(hb-Lb)/2;return sm(di(hb),
vb)+Ka+sm(ag(hb),vb)},jb.padEnd=function(Ka,hb,vb){Ka=ig(Ka);var Lb=(hb=Ig(hb))?fb(Ka):0;return hb&&Lb<hb?Ka+sm(hb-Lb,vb):Ka},jb.padStart=function(Ka,hb,vb){Ka=ig(Ka);var Lb=(hb=Ig(hb))?fb(Ka):0;return hb&&Lb<hb?sm(hb-Lb,vb)+Ka:Ka},jb.parseInt=function(Ka,hb,vb){return vb||null==hb?hb=0:hb&&=+hb,uj(ig(Ka).replace(Gb,""),hb||0)},jb.random=function(Ka,hb,vb){if(vb&&"boolean"!=typeof vb&&Ti(Ka,hb,vb)&&(hb=vb=oa),vb===oa&&("boolean"==typeof hb?(vb=hb,hb=oa):"boolean"==typeof Ka&&(vb=Ka,Ka=oa)),Ka===oa&&
hb===oa?(Ka=0,hb=1):(Ka=Sf(Ka),hb===oa?(hb=Ka,Ka=0):hb=Sf(hb)),Ka>hb){var Lb=Ka;Ka=hb;hb=Lb}return vb||Ka%1||hb%1?(vb=wh(),rf(Ka+vb*(hb-Ka+Me("1e-"+((vb+"").length-1))),hb)):Qj(Ka,hb)},jb.reduce=function(Ka,hb,vb){var Lb=Nf(Ka)?Y:F,Qa=3>arguments.length;return Lb(Ka,re(hb,4),vb,Qa,xh)},jb.reduceRight=function(Ka,hb,vb){var Lb=Nf(Ka)?fa:F,Qa=3>arguments.length;return Lb(Ka,re(hb,4),vb,Qa,Ff)},jb.repeat=function(Ka,hb,vb){return hb=(vb?Ti(Ka,hb,vb):hb===oa)?1:Ig(hb),xg(ig(Ka),hb)},jb.replace=function(){var Ka=
arguments,hb=ig(Ka[0]);return 3>Ka.length?hb:hb.replace(Ka[1],Ka[2])},jb.result=function(Ka,hb,vb){var Lb=-1,Qa=(hb=Sj(hb,Ka)).length;for(Qa||(Qa=1,Ka=oa);++Lb<Qa;){var vd=null==Ka?oa:Ka[sk(hb[Lb])];vd===oa&&(Lb=Qa,vd=vb);Ka=uk(vd)?vd.call(Ka):vd}return Ka},jb.round=Tn,jb.runInContext=hc,jb.sample=function(Ka){return(Nf(Ka)?Ab:lg)(Ka)},jb.size=function(Ka){if(null==Ka)return 0;if(fk(Ka))return $i(Ka)?fb(Ka):Ka.length;var hb=ji(Ka);return"[object Map]"==hb||"[object Set]"==hb?Ka.size:Kg(Ka).length},
jb.snakeCase=ro,jb.some=function(Ka,hb,vb){var Lb=Nf(Ka)?H:Ag;return vb&&Ti(Ka,hb,vb)&&(hb=oa),Lb(Ka,re(hb,3))},jb.sortedIndex=function(Ka,hb){return Th(Ka,hb)},jb.sortedIndexBy=function(Ka,hb,vb){return nk(Ka,hb,re(vb,2))},jb.sortedIndexOf=function(Ka,hb){var vb=null==Ka?0:Ka.length;if(vb){var Lb=Th(Ka,hb);if(Lb<vb&&qk(Ka[Lb],hb))return Lb}return-1},jb.sortedLastIndex=function(Ka,hb){return Th(Ka,hb,!0)},jb.sortedLastIndexBy=function(Ka,hb,vb){return nk(Ka,hb,re(vb,2),!0)},jb.sortedLastIndexOf=function(Ka,
hb){if(null==Ka?0:Ka.length){var vb=Th(Ka,hb,!0)-1;if(qk(Ka[vb],hb))return vb}return-1},jb.startCase=bn,jb.startsWith=function(Ka,hb,vb){return Ka=ig(Ka),vb=null==vb?0:Ue(Ig(vb),0,Ka.length),hb=Di(hb),Ka.slice(vb,vb+hb.length)==hb},jb.subtract=te,jb.sum=function(Ka){return Ka&&Ka.length?ha(Ka,wb):0},jb.sumBy=function(Ka,hb){return Ka&&Ka.length?ha(Ka,re(hb,2)):0},jb.template=function(Ka,hb,vb){var Lb=jb.templateSettings;vb&&Ti(Ka,hb,vb)&&(hb=oa);Ka=ig(Ka);hb=gn({},hb,Lb,bm);var Qa,vd;vb=gn({},hb.imports,
Lb.imports,bm);var he=Ai(vb),Je=ca(vb,he),da=0;vb=hb.interpolate||Yb;var va="__p +\x3d '";vb=xe((hb.escape||Yb).source+"|"+vb.source+"|"+(vb===nb?xd:Yb).source+"|"+(hb.evaluate||Yb).source+"|$","g");var Xa="//# sourceURL\x3d"+(Rf.call(hb,"sourceURL")?(hb.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++oe+"]")+"\n";Ka.replace(vb,function(yb,bc,wc,Xc,nd,td){return wc||=Xc,va+=Ka.slice(da,td).replace(qb,Ha),bc&&(Qa=!0,va+="' +\n__e("+bc+") +\n'"),nd&&(vd=!0,va+="';\n"+nd+";\n__p +\x3d '"),
wc&&(va+="' +\n((__t \x3d ("+wc+")) \x3d\x3d null ? '' : __t) +\n'"),da=td+yb.length,yb});va+="';\n";if(hb=Rf.call(hb,"variable")&&hb.variable){if(pc.test(hb))throw new Rd("Invalid `variable` option passed into `_.template`");}else va="with (obj) {\n"+va+"\n}\n";va=(vd?va.replace(Aa,""):va).replace(Ja,"$1").replace(Sa,"$1;");va="function("+(hb||"obj")+") {\n"+(hb?"":"obj || (obj \x3d {});\n")+"var __t, __p \x3d ''"+(Qa?", __e \x3d _.escape":"")+(vd?", __j \x3d Array.prototype.join;\nfunction print() { __p +\x3d __j.call(arguments, '') }\n":
";\n")+va+"return __p\n}";hb=Bn(function(){return Gd(he,Xa+"return "+va).apply(oa,Je)});if(hb.source=va,gj(hb))throw hb;return hb},jb.times=function(Ka,hb){if(1>(Ka=Ig(Ka))||9007199254740991<Ka)return[];var vb=4294967295,Lb=rf(Ka,4294967295);hb=re(hb);Ka-=4294967295;for(Lb=K(Lb,hb);++vb<Ka;)hb(vb);return Lb},jb.toFinite=Sf,jb.toInteger=Ig,jb.toLength=jj,jb.toLower=function(Ka){return ig(Ka).toLowerCase()},jb.toNumber=oi,jb.toSafeInteger=function(Ka){return Ka?Ue(Ig(Ka),-9007199254740991,9007199254740991):
0===Ka?Ka:0},jb.toString=ig,jb.toUpper=function(Ka){return ig(Ka).toUpperCase()},jb.trim=function(Ka,hb,vb){if((Ka=ig(Ka))&&(vb||hb===oa))return Z(Ka);if(!Ka||!(hb=Di(hb)))return Ka;Ka=eb(Ka);hb=eb(hb);return Mh(Ka,za(Ka,hb),ya(Ka,hb)+1).join("")},jb.trimEnd=function(Ka,hb,vb){if((Ka=ig(Ka))&&(vb||hb===oa))return Ka.slice(0,Na(Ka)+1);if(!Ka||!(hb=Di(hb)))return Ka;Ka=eb(Ka);return Mh(Ka,0,ya(Ka,eb(hb))+1).join("")},jb.trimStart=function(Ka,hb,vb){if((Ka=ig(Ka))&&(vb||hb===oa))return Ka.replace(Gb,
"");if(!Ka||!(hb=Di(hb)))return Ka;Ka=eb(Ka);return Mh(Ka,za(Ka,eb(hb))).join("")},jb.truncate=function(Ka,hb){var vb=30,Lb="...";if(ih(hb)){var Qa="separator"in hb?hb.separator:Qa;vb="length"in hb?Ig(hb.length):vb;Lb="omission"in hb?Di(hb.omission):Lb}hb=(Ka=ig(Ka)).length;if(cd.test(Ka)){var vd=eb(Ka);hb=vd.length}if(vb>=hb)return Ka;hb=vb-fb(Lb);if(1>hb)return Lb;vb=vd?Mh(vd,0,hb).join(""):Ka.slice(0,hb);if(Qa===oa)return vb+Lb;if(vd&&(hb+=vb.length-hb),zj(Qa)){if(Ka.slice(hb).search(Qa)){vd=vb;
Qa.global||(Qa=xe(Qa.source,ig(Yd.exec(Qa))+"g"));for(Qa.lastIndex=0;Ka=Qa.exec(vd);)var he=Ka.index;vb=vb.slice(0,he===oa?hb:he)}}else Ka.indexOf(Di(Qa),hb)!=hb&&(Qa=vb.lastIndexOf(Qa),-1<Qa&&(vb=vb.slice(0,Qa)));return vb+Lb},jb.unescape=function(Ka){return(Ka=ig(Ka))&&Ob.test(Ka)?Ka.replace(Bb,bb):Ka},jb.uniqueId=function(Ka){var hb=++Ni;return ig(Ka)+hb},jb.upperCase=cn,jb.upperFirst=Kk,jb.each=Vj,jb.eachRight=tk,jb.first=Mk,Pb(jb,(rm={},li(jb,function(Ka,hb){Rf.call(jb.prototype,hb)||(rm[hb]=
Ka)}),rm),{chain:!1}),jb.VERSION="4.17.21",z("bind bindKey curry curryRight partial partialRight".split(" "),function(Ka){jb[Ka].placeholder=jb}),z(["drop","take"],function(Ka,hb){ke.prototype[Ka]=function(vb){vb=vb===oa?1:Jf(Ig(vb),0);var Lb=this.__filtered__&&!hb?new ke(this):this.clone();return Lb.__filtered__?Lb.__takeCount__=rf(vb,Lb.__takeCount__):Lb.__views__.push({size:rf(vb,4294967295),type:Ka+(0>Lb.__dir__?"Right":"")}),Lb};ke.prototype[Ka+"Right"]=function(vb){return this.reverse()[Ka](vb).reverse()}}),
z(["filter","map","takeWhile"],function(Ka,hb){var vb=hb+1,Lb=1==vb||3==vb;ke.prototype[Ka]=function(Qa){var vd=this.clone();return vd.__iteratees__.push({iteratee:re(Qa,3),type:vb}),vd.__filtered__=vd.__filtered__||Lb,vd}}),z(["head","last"],function(Ka,hb){var vb="take"+(hb?"Right":"");ke.prototype[Ka]=function(){return this[vb](1).value()[0]}}),z(["initial","tail"],function(Ka,hb){var vb="drop"+(hb?"":"Right");ke.prototype[Ka]=function(){return this.__filtered__?new ke(this):this[vb](1)}}),ke.prototype.compact=
function(){return this.filter(wb)},ke.prototype.find=function(Ka){return this.filter(Ka).head()},ke.prototype.findLast=function(Ka){return this.reverse().find(Ka)},ke.prototype.invokeMap=jg(function(Ka,hb){return"function"==typeof Ka?new ke(this):this.map(function(vb){return Bj(vb,Ka,hb)})}),ke.prototype.reject=function(Ka){return this.filter(gm(re(Ka)))},ke.prototype.slice=function(Ka,hb){Ka=Ig(Ka);var vb=this;return vb.__filtered__&&(0<Ka||0>hb)?new ke(vb):(0>Ka?vb=vb.takeRight(-Ka):Ka&&(vb=vb.drop(Ka)),
hb!==oa&&(vb=0>(hb=Ig(hb))?vb.dropRight(-hb):vb.take(hb-Ka)),vb)},ke.prototype.takeRightWhile=function(Ka){return this.reverse().takeWhile(Ka).reverse()},ke.prototype.toArray=function(){return this.take(4294967295)},li(ke.prototype,function(Ka,hb){var vb=/^(?:filter|find|map|reject)|While$/.test(hb),Lb=/^(?:head|last)$/.test(hb),Qa=jb[Lb?"take"+("last"==hb?"Right":""):hb],vd=Lb||/^find/.test(hb);Qa&&(jb.prototype[hb]=function(){var he=this.__wrapped__,Je=Lb?[1]:arguments,da=he instanceof ke,va=Je[0],
Xa=da||Nf(he),yb=function(nd){nd=Qa.apply(jb,ma([nd],Je));return Lb&&bc?nd[0]:nd};Xa&&vb&&"function"==typeof va&&1!=va.length&&(da=Xa=!1);var bc=this.__chain__,wc=!!this.__actions__.length;va=vd&&!bc;da=da&&!wc;if(!vd&&Xa){he=da?he:new ke(this);var Xc=Ka.apply(he,Je);return Xc.__actions__.push({func:Hj,args:[yb],thisArg:oa}),new Dd(Xc,bc)}return va&&da?Ka.apply(this,Je):(Xc=this.thru(yb),va?Lb?Xc.value()[0]:Xc.value():Xc)})}),z("pop push shift sort splice unshift".split(" "),function(Ka){var hb=$e[Ka],
vb=/^(?:push|sort|unshift)$/.test(Ka)?"tap":"thru",Lb=/^(?:pop|shift)$/.test(Ka);jb.prototype[Ka]=function(){var Qa=arguments;if(Lb&&!this.__chain__){var vd=this.value();return hb.apply(Nf(vd)?vd:[],Qa)}return this[vb](function(he){return hb.apply(Nf(he)?he:[],Qa)})}}),li(ke.prototype,function(Ka,hb){if(Ka=jb[hb]){var vb=Ka.name+"";Rf.call(sh,vb)||(sh[vb]=[]);sh[vb].push({name:hb,func:Ka})}}),sh[Ak(oa,2).name]=[{name:"wrapper",func:oa}],ke.prototype.clone=function(){var Ka=new ke(this.__wrapped__);
return Ka.__actions__=fj(this.__actions__),Ka.__dir__=this.__dir__,Ka.__filtered__=this.__filtered__,Ka.__iteratees__=fj(this.__iteratees__),Ka.__takeCount__=this.__takeCount__,Ka.__views__=fj(this.__views__),Ka},ke.prototype.reverse=function(){if(this.__filtered__){var Ka=new ke(this);Ka.__dir__=-1;Ka.__filtered__=!0}else(Ka=this.clone()).__dir__*=-1;return Ka},ke.prototype.value=function(){var Ka=this.__wrapped__.value(),hb=this.__dir__,vb=Nf(Ka),Lb=0>hb,Qa=vb?Ka.length:0;var vd=0;for(var he=Qa,
Je=this.__views__,da=-1,va=Je.length;++da<va;){var Xa=Je[da],yb=Xa.size;switch(Xa.type){case "drop":vd+=yb;break;case "dropRight":he-=yb;break;case "take":he=rf(he,vd+yb);break;case "takeRight":vd=Jf(vd,he-yb)}}Je=he;he=Je-vd;vd=Lb?Je:vd-1;Je=this.__iteratees__;da=Je.length;va=0;Xa=rf(he,this.__takeCount__);if(!vb||!Lb&&Qa==he&&Xa==he)return wj(Ka,this.__actions__);vb=[];a:for(;he--&&va<Xa;){Lb=-1;for(Qa=Ka[vd+=hb];++Lb<da;){var bc=Je[Lb];yb=bc.iteratee;bc=bc.type;yb=yb(Qa);if(2==bc)Qa=yb;else if(!yb){if(1==
bc)continue a;break a}}vb[va++]=Qa}return vb},jb.prototype.at=ta,jb.prototype.chain=function(){return Pk(this)},jb.prototype.commit=function(){return new Dd(this.value(),this.__chain__)},jb.prototype.next=function(){this.__values__===oa&&(this.__values__=Oi(this.value()));var Ka=this.__index__>=this.__values__.length;return{done:Ka,value:Ka?oa:this.__values__[this.__index__++]}},jb.prototype.plant=function(Ka){for(var hb,vb=this;vb instanceof gd;){var Lb=um(vb);Lb.__index__=0;Lb.__values__=oa;hb?
Qa.__wrapped__=Lb:hb=Lb;var Qa=Lb;vb=vb.__wrapped__}return Qa.__wrapped__=Ka,hb},jb.prototype.reverse=function(){var Ka=this.__wrapped__;return Ka instanceof ke?(this.__actions__.length&&(Ka=new ke(this)),(Ka=Ka.reverse()).__actions__.push({func:Hj,args:[Vi],thisArg:oa}),new Dd(Ka,this.__chain__)):this.thru(Vi)},jb.prototype.toJSON=jb.prototype.valueOf=jb.prototype.value=function(){return wj(this.__wrapped__,this.__actions__)},jb.prototype.first=jb.prototype.head,ri&&(jb.prototype[ri]=function(){return this}),
jb}();Lc._=Db;(w=function(){return Db}.call(h,f,h,k))===oa||(k.exports=w)}).call(this)},4516:function(k){var h=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;k.exports=function(){try{if(!Object.assign)return!1;var x=new String("abc");if(x[5]="de","5"===Object.getOwnPropertyNames(x)[0])return!1;var J={};for(x=0;10>x;x++)J["_"+String.fromCharCode(x)]=x;if("0123456789"!==Object.getOwnPropertyNames(J).map(function(u){return J[u]}).join(""))return!1;
var z={};return"abcdefghijklmnopqrst".split("").forEach(function(u){z[u]=u}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},z)).join("")}catch(u){return!1}}()?Object.assign:function(x,J){var z;if(null==x)throw new TypeError("Object.assign cannot be called with null or undefined");var u=Object(x);for(var t=1;t<arguments.length;t++){for(var n in z=Object(arguments[t]))f.call(z,n)&&(u[n]=z[n]);if(h){var R=h(z);for(var ka=0;ka<R.length;ka++)w.call(z,R[ka])&&(u[R[ka]]=z[R[ka]])}}return u}},2744:function(k,
h,f){h={};(0,f(9187).assign)(h,f(4395),f(578),f(2684));k.exports=h},4395:function(k,h,f){function w(ka){if(!(this instanceof w))return new w(ka);ka=this.options=z.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},ka||{});ka.raw&&0<ka.windowBits?ka.windowBits=-ka.windowBits:ka.gzip&&0<ka.windowBits&&16>ka.windowBits&&(ka.windowBits+=16);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new n;this.strm.avail_out=0;var L=J.deflateInit2(this.strm,ka.level,
ka.method,ka.windowBits,ka.memLevel,ka.strategy);if(0!==L)throw Error(t[L]);if(ka.header&&J.deflateSetHeader(this.strm,ka.header),ka.dictionary){var ma;if(ma="string"==typeof ka.dictionary?u.string2buf(ka.dictionary):"[object ArrayBuffer]"===R.call(ka.dictionary)?new Uint8Array(ka.dictionary):ka.dictionary,0!==(L=J.deflateSetDictionary(this.strm,ma)))throw Error(t[L]);this._dict_set=!0}}function x(ka,L){L=new w(L);if(L.push(ka,!0),L.err)throw L.msg||t[L.err];return L.result}var J=f(7651),z=f(9187),
u=f(8592),t=f(5604),n=f(249),R=Object.prototype.toString;w.prototype.push=function(ka,L){var ma,Y=this.strm,fa=this.options.chunkSize;if(this.ended)return!1;L=L===~~L?L:!0===L?4:0;"string"==typeof ka?Y.input=u.string2buf(ka):"[object ArrayBuffer]"===R.call(ka)?Y.input=new Uint8Array(ka):Y.input=ka;Y.next_in=0;Y.avail_in=Y.input.length;do{if(0===Y.avail_out&&(Y.output=new z.Buf8(fa),Y.next_out=0,Y.avail_out=fa),1!==(ma=J.deflate(Y,L))&&0!==ma)return this.onEnd(ma),this.ended=!0,!1;0!==Y.avail_out&&
(0!==Y.avail_in||4!==L&&2!==L)||("string"===this.options.to?this.onData(u.buf2binstring(z.shrinkBuf(Y.output,Y.next_out))):this.onData(z.shrinkBuf(Y.output,Y.next_out)))}while((0<Y.avail_in||0===Y.avail_out)&&1!==ma);return 4===L?(ma=J.deflateEnd(this.strm),this.onEnd(ma),this.ended=!0,0===ma):2!==L||(this.onEnd(0),Y.avail_out=0,!0)};w.prototype.onData=function(ka){this.chunks.push(ka)};w.prototype.onEnd=function(ka){0===ka&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=
z.flattenChunks(this.chunks));this.chunks=[];this.err=ka;this.msg=this.strm.msg};h.Deflate=w;h.deflate=x;h.deflateRaw=function(ka,L){return(L=L||{}).raw=!0,x(ka,L)};h.gzip=function(ka,L){return(L=L||{}).gzip=!0,x(ka,L)}},578:function(k,h,f){function w(ma){if(!(this instanceof w))return new w(ma);var Y=this.options=z.assign({chunkSize:16384,windowBits:0,to:""},ma||{});Y.raw&&0<=Y.windowBits&&16>Y.windowBits&&(Y.windowBits=-Y.windowBits,0===Y.windowBits&&(Y.windowBits=-15));!(0<=Y.windowBits&&16>Y.windowBits)||
ma&&ma.windowBits||(Y.windowBits+=32);15<Y.windowBits&&48>Y.windowBits&&0==(15&Y.windowBits)&&(Y.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new R;this.strm.avail_out=0;ma=J.inflateInit2(this.strm,Y.windowBits);if(ma!==t.Z_OK)throw Error(n[ma]);if(this.header=new ka,J.inflateGetHeader(this.strm,this.header),Y.dictionary&&("string"==typeof Y.dictionary?Y.dictionary=u.string2buf(Y.dictionary):"[object ArrayBuffer]"===L.call(Y.dictionary)&&(Y.dictionary=new Uint8Array(Y.dictionary)),
Y.raw&&(ma=J.inflateSetDictionary(this.strm,Y.dictionary))!==t.Z_OK))throw Error(n[ma]);}function x(ma,Y){Y=new w(Y);if(Y.push(ma,!0),Y.err)throw Y.msg||n[Y.err];return Y.result}var J=f(7823),z=f(9187),u=f(8592),t=f(2684),n=f(5604),R=f(249),ka=f(9968),L=Object.prototype.toString;w.prototype.push=function(ma,Y){var fa,H,aa,M,Q=this.strm,D=this.options.chunkSize,O=this.options.dictionary,P=!1;if(this.ended)return!1;Y=Y===~~Y?Y:!0===Y?t.Z_FINISH:t.Z_NO_FLUSH;"string"==typeof ma?Q.input=u.binstring2buf(ma):
"[object ArrayBuffer]"===L.call(ma)?Q.input=new Uint8Array(ma):Q.input=ma;Q.next_in=0;Q.avail_in=Q.input.length;do{if(0===Q.avail_out&&(Q.output=new z.Buf8(D),Q.next_out=0,Q.avail_out=D),(fa=J.inflate(Q,t.Z_NO_FLUSH))===t.Z_NEED_DICT&&O&&(fa=J.inflateSetDictionary(this.strm,O)),fa===t.Z_BUF_ERROR&&!0===P&&(fa=t.Z_OK,P=!1),fa!==t.Z_STREAM_END&&fa!==t.Z_OK)return this.onEnd(fa),this.ended=!0,!1;Q.next_out&&(0!==Q.avail_out&&fa!==t.Z_STREAM_END&&(0!==Q.avail_in||Y!==t.Z_FINISH&&Y!==t.Z_SYNC_FLUSH)||
("string"===this.options.to?(H=u.utf8border(Q.output,Q.next_out),aa=Q.next_out-H,M=u.buf2string(Q.output,H),Q.next_out=aa,Q.avail_out=D-aa,aa&&z.arraySet(Q.output,Q.output,H,aa,0),this.onData(M)):this.onData(z.shrinkBuf(Q.output,Q.next_out))));0===Q.avail_in&&0===Q.avail_out&&(P=!0)}while((0<Q.avail_in||0===Q.avail_out)&&fa!==t.Z_STREAM_END);return fa===t.Z_STREAM_END&&(Y=t.Z_FINISH),Y===t.Z_FINISH?(fa=J.inflateEnd(this.strm),this.onEnd(fa),this.ended=!0,fa===t.Z_OK):Y!==t.Z_SYNC_FLUSH||(this.onEnd(t.Z_OK),
Q.avail_out=0,!0)};w.prototype.onData=function(ma){this.chunks.push(ma)};w.prototype.onEnd=function(ma){ma===t.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=z.flattenChunks(this.chunks));this.chunks=[];this.err=ma;this.msg=this.strm.msg};h.Inflate=w;h.inflate=x;h.inflateRaw=function(ma,Y){return(Y=Y||{}).raw=!0,x(ma,Y)};h.ungzip=x},9187:function(k,h){k="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;h.assign=function(x){for(var J=
Array.prototype.slice.call(arguments,1);J.length;){var z=J.shift();if(z){if("object"!=typeof z)throw new TypeError(z+"must be non-object");for(var u in z)Object.prototype.hasOwnProperty.call(z,u)&&(x[u]=z[u])}}return x};h.shrinkBuf=function(x,J){return x.length===J?x:x.subarray?x.subarray(0,J):(x.length=J,x)};var f={arraySet:function(x,J,z,u,t){if(J.subarray&&x.subarray)x.set(J.subarray(z,z+u),t);else for(var n=0;n<u;n++)x[t+n]=J[z+n]},flattenChunks:function(x){var J,z;var u=z=0;for(J=x.length;u<
J;u++)z+=x[u].length;var t=new Uint8Array(z);u=z=0;for(J=x.length;u<J;u++){var n=x[u];t.set(n,z);z+=n.length}return t}},w={arraySet:function(x,J,z,u,t){for(var n=0;n<u;n++)x[t+n]=J[z+n]},flattenChunks:function(x){return[].concat.apply([],x)}};h.setTyped=function(x){x?(h.Buf8=Uint8Array,h.Buf16=Uint16Array,h.Buf32=Int32Array,h.assign(h,f)):(h.Buf8=Array,h.Buf16=Array,h.Buf32=Array,h.assign(h,w))};h.setTyped(k)},8592:function(k,h,f){function w(t,n){if(65534>n&&(t.subarray&&z||!t.subarray&&J))return String.fromCharCode.apply(null,
x.shrinkBuf(t,n));for(var R="",ka=0;ka<n;ka++)R+=String.fromCharCode(t[ka]);return R}var x=f(9187),J=!0,z=!0;try{String.fromCharCode.apply(null,[0])}catch(t){J=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){z=!1}var u=new x.Buf8(256);for(k=0;256>k;k++)u[k]=252<=k?6:248<=k?5:240<=k?4:224<=k?3:192<=k?2:1;u[254]=u[254]=1;h.string2buf=function(t){var n,R,ka,L,ma=t.length,Y=0;for(ka=0;ka<ma;ka++)55296==(64512&(n=t.charCodeAt(ka)))&&ka+1<ma&&56320==(64512&(R=t.charCodeAt(ka+1)))&&(n=
65536+(n-55296<<10)+(R-56320),ka++),Y+=128>n?1:2048>n?2:65536>n?3:4;var fa=new x.Buf8(Y);for(ka=L=0;L<Y;ka++)55296==(64512&(n=t.charCodeAt(ka)))&&ka+1<ma&&56320==(64512&(R=t.charCodeAt(ka+1)))&&(n=65536+(n-55296<<10)+(R-56320),ka++),128>n?fa[L++]=n:2048>n?(fa[L++]=192|n>>>6,fa[L++]=128|63&n):65536>n?(fa[L++]=224|n>>>12,fa[L++]=128|n>>>6&63,fa[L++]=128|63&n):(fa[L++]=240|n>>>18,fa[L++]=128|n>>>12&63,fa[L++]=128|n>>>6&63,fa[L++]=128|63&n);return fa};h.buf2binstring=function(t){return w(t,t.length)};
h.binstring2buf=function(t){for(var n=new x.Buf8(t.length),R=0,ka=n.length;R<ka;R++)n[R]=t.charCodeAt(R);return n};h.buf2string=function(t,n){var R,ka,L,ma=n||t.length,Y=Array(2*ma);for(n=R=0;n<ma;)if(128>(ka=t[n++]))Y[R++]=ka;else if(4<(L=u[ka]))Y[R++]=65533,n+=L-1;else{for(ka&=2===L?31:3===L?15:7;1<L&&n<ma;)ka=ka<<6|63&t[n++],L--;1<L?Y[R++]=65533:65536>ka?Y[R++]=ka:(ka-=65536,Y[R++]=55296|ka>>10&1023,Y[R++]=56320|1023&ka)}return w(Y,R)};h.utf8border=function(t,n){var R;(n=n||t.length)>t.length&&
(n=t.length);for(R=n-1;0<=R&&128==(192&t[R]);)R--;return 0>R||0===R?n:R+u[t[R]]>n?R:n}},3693:function(k){k.exports=function(h,f,w,x){var J=65535&h|0;h=h>>>16&65535|0;for(var z;0!==w;){w-=z=2E3<w?2E3:w;do h=h+(J=J+f[x++]|0)|0;while(--z);J%=65521;h%=65521}return J|h<<16|0}},2684:function(k){k.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,
Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},8464:function(k){var h=function(){for(var f,w=[],x=0;256>x;x++){f=x;for(var J=0;8>J;J++)f=1&f?3988292384^f>>>1:f>>>1;w[x]=f}return w}();k.exports=function(f,w,x,J){x=J+x;for(f^=-1;J<x;J++)f=f>>>8^h[255&(f^w[J])];return-1^f}},7651:function(k,h,f){function w(X,F){return X.msg=P[F],F}function x(X){for(var F=X.length;0<=--F;)X[F]=
0}function J(X){var F=X.state,ha=F.pending;ha>X.avail_out&&(ha=X.avail_out);0!==ha&&(M.arraySet(X.output,F.pending_buf,F.pending_out,ha,X.next_out),X.next_out+=ha,F.pending_out+=ha,X.total_out+=ha,X.avail_out-=ha,F.pending-=ha,0===F.pending&&(F.pending_out=0))}function z(X,F){Q._tr_flush_block(X,0<=X.block_start?X.block_start:-1,X.strstart-X.block_start,F);X.block_start=X.strstart;J(X.strm)}function u(X,F){X.pending_buf[X.pending++]=F}function t(X,F){X.pending_buf[X.pending++]=F>>>8&255;X.pending_buf[X.pending++]=
255&F}function n(X,F){var ha,K,Z=X.max_chain_length,ea=X.strstart,ca=X.prev_length,pa=X.nice_match,za=X.strstart>X.w_size-262?X.strstart-(X.w_size-262):0,ya=X.window,Ha=X.w_mask,Ua=X.prev,Ea=X.strstart+258,Oa=ya[ea+ca-1],Za=ya[ea+ca];X.prev_length>=X.good_match&&(Z>>=2);pa>X.lookahead&&(pa=X.lookahead);do if(ya[(ha=F)+ca]===Za&&ya[ha+ca-1]===Oa&&ya[ha]===ya[ea]&&ya[++ha]===ya[ea+1]){ea+=2;for(ha++;ya[++ea]===ya[++ha]&&ya[++ea]===ya[++ha]&&ya[++ea]===ya[++ha]&&ya[++ea]===ya[++ha]&&ya[++ea]===ya[++ha]&&
ya[++ea]===ya[++ha]&&ya[++ea]===ya[++ha]&&ya[++ea]===ya[++ha]&&ea<Ea;);if(K=258-(Ea-ea),ea=Ea-258,K>ca){if(X.match_start=F,ca=K,K>=pa)break;Oa=ya[ea+ca-1];Za=ya[ea+ca]}}while((F=Ua[F&Ha])>za&&0!=--Z);return ca<=X.lookahead?ca:X.lookahead}function R(X){var F,ha,K,Z,ea,ca,pa,za=X.w_size;do{if(ha=X.window_size-X.lookahead-X.strstart,X.strstart>=za+(za-262)){M.arraySet(X.window,X.window,za,za,0);X.match_start-=za;X.strstart-=za;X.block_start-=za;var ya=F=X.hash_size;do{var Ha=X.head[--ya];X.head[ya]=
Ha>=za?Ha-za:0}while(--F);ya=F=za;do Ha=X.prev[--ya],X.prev[ya]=Ha>=za?Ha-za:0;while(--F);ha+=za}if(0===X.strm.avail_in)break;if(K=X.strm,Z=X.window,ea=X.strstart+X.lookahead,ca=ha,pa=void 0,(pa=K.avail_in)>ca&&(pa=ca),F=0===pa?0:(K.avail_in-=pa,M.arraySet(Z,K.input,K.next_in,pa,ea),1===K.state.wrap?K.adler=D(K.adler,Z,pa,ea):2===K.state.wrap&&(K.adler=O(K.adler,Z,pa,ea)),K.next_in+=pa,K.total_in+=pa,pa),X.lookahead+=F,3<=X.lookahead+X.insert)for(ya=X.strstart-X.insert,X.ins_h=X.window[ya],X.ins_h=
(X.ins_h<<X.hash_shift^X.window[ya+1])&X.hash_mask;X.insert&&(X.ins_h=(X.ins_h<<X.hash_shift^X.window[ya+3-1])&X.hash_mask,X.prev[ya&X.w_mask]=X.head[X.ins_h],X.head[X.ins_h]=ya,ya++,X.insert--,!(3>X.lookahead+X.insert)););}while(262>X.lookahead&&0!==X.strm.avail_in)}function ka(X,F){for(var ha,K;;){if(262>X.lookahead){if(R(X),262>X.lookahead&&0===F)return 1;if(0===X.lookahead)break}if(ha=0,3<=X.lookahead&&(X.ins_h=(X.ins_h<<X.hash_shift^X.window[X.strstart+3-1])&X.hash_mask,ha=X.prev[X.strstart&
X.w_mask]=X.head[X.ins_h],X.head[X.ins_h]=X.strstart),0!==ha&&X.strstart-ha<=X.w_size-262&&(X.match_length=n(X,ha)),3<=X.match_length)if(K=Q._tr_tally(X,X.strstart-X.match_start,X.match_length-3),X.lookahead-=X.match_length,X.match_length<=X.max_lazy_match&&3<=X.lookahead){X.match_length--;do X.strstart++,X.ins_h=(X.ins_h<<X.hash_shift^X.window[X.strstart+3-1])&X.hash_mask,ha=X.prev[X.strstart&X.w_mask]=X.head[X.ins_h],X.head[X.ins_h]=X.strstart;while(0!=--X.match_length);X.strstart++}else X.strstart+=
X.match_length,X.match_length=0,X.ins_h=X.window[X.strstart],X.ins_h=(X.ins_h<<X.hash_shift^X.window[X.strstart+1])&X.hash_mask;else K=Q._tr_tally(X,0,X.window[X.strstart]),X.lookahead--,X.strstart++;if(K&&(z(X,!1),0===X.strm.avail_out))return 1}return X.insert=2>X.strstart?X.strstart:2,4===F?(z(X,!0),0===X.strm.avail_out?3:4):X.last_lit&&(z(X,!1),0===X.strm.avail_out)?1:2}function L(X,F){for(var ha,K,Z;;){if(262>X.lookahead){if(R(X),262>X.lookahead&&0===F)return 1;if(0===X.lookahead)break}if(ha=
0,3<=X.lookahead&&(X.ins_h=(X.ins_h<<X.hash_shift^X.window[X.strstart+3-1])&X.hash_mask,ha=X.prev[X.strstart&X.w_mask]=X.head[X.ins_h],X.head[X.ins_h]=X.strstart),X.prev_length=X.match_length,X.prev_match=X.match_start,X.match_length=2,0!==ha&&X.prev_length<X.max_lazy_match&&X.strstart-ha<=X.w_size-262&&(X.match_length=n(X,ha),5>=X.match_length&&(1===X.strategy||3===X.match_length&&4096<X.strstart-X.match_start)&&(X.match_length=2)),3<=X.prev_length&&X.match_length<=X.prev_length){Z=X.strstart+X.lookahead-
3;K=Q._tr_tally(X,X.strstart-1-X.prev_match,X.prev_length-3);X.lookahead-=X.prev_length-1;X.prev_length-=2;do++X.strstart<=Z&&(X.ins_h=(X.ins_h<<X.hash_shift^X.window[X.strstart+3-1])&X.hash_mask,ha=X.prev[X.strstart&X.w_mask]=X.head[X.ins_h],X.head[X.ins_h]=X.strstart);while(0!=--X.prev_length);if(X.match_available=0,X.match_length=2,X.strstart++,K&&(z(X,!1),0===X.strm.avail_out))return 1}else if(X.match_available){if(Q._tr_tally(X,0,X.window[X.strstart-1])&&z(X,!1),X.strstart++,X.lookahead--,0===
X.strm.avail_out)return 1}else X.match_available=1,X.strstart++,X.lookahead--}return X.match_available&&(Q._tr_tally(X,0,X.window[X.strstart-1]),X.match_available=0),X.insert=2>X.strstart?X.strstart:2,4===F?(z(X,!0),0===X.strm.avail_out?3:4):X.last_lit&&(z(X,!1),0===X.strm.avail_out)?1:2}function ma(X,F,ha,K,Z){this.good_length=X;this.max_lazy=F;this.nice_length=ha;this.max_chain=K;this.func=Z}function Y(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=
this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=8;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=
new M.Buf16(1146);this.dyn_dtree=new M.Buf16(122);this.bl_tree=new M.Buf16(78);x(this.dyn_ltree);x(this.dyn_dtree);x(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new M.Buf16(16);this.heap=new M.Buf16(573);x(this.heap);this.heap_max=this.heap_len=0;this.depth=new M.Buf16(573);x(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function fa(X){var F;return X&&X.state?(X.total_in=
X.total_out=0,X.data_type=2,(F=X.state).pending=0,F.pending_out=0,0>F.wrap&&(F.wrap=-F.wrap),F.status=F.wrap?42:113,X.adler=2===F.wrap?0:1,F.last_flush=0,Q._tr_init(F),0):w(X,-2)}function H(X){var F,ha=fa(X);return 0===ha&&((F=X.state).window_size=2*F.w_size,x(F.head),F.max_lazy_match=ba[F.level].max_lazy,F.good_match=ba[F.level].good_length,F.nice_match=ba[F.level].nice_length,F.max_chain_length=ba[F.level].max_chain,F.strstart=0,F.block_start=0,F.lookahead=0,F.insert=0,F.match_length=F.prev_length=
2,F.match_available=0,F.ins_h=0),ha}function aa(X,F,ha,K,Z,ea){if(!X)return-2;var ca=1;if(-1===F&&(F=6),0>K?(ca=0,K=-K):15<K&&(ca=2,K-=16),1>Z||9<Z||8!==ha||8>K||15<K||0>F||9<F||0>ea||4<ea)return w(X,-2);8===K&&(K=9);var pa=new Y;return X.state=pa,pa.strm=X,pa.wrap=ca,pa.gzhead=null,pa.w_bits=K,pa.w_size=1<<pa.w_bits,pa.w_mask=pa.w_size-1,pa.hash_bits=Z+7,pa.hash_size=1<<pa.hash_bits,pa.hash_mask=pa.hash_size-1,pa.hash_shift=~~((pa.hash_bits+3-1)/3),pa.window=new M.Buf8(2*pa.w_size),pa.head=new M.Buf16(pa.hash_size),
pa.prev=new M.Buf16(pa.w_size),pa.lit_bufsize=1<<Z+6,pa.pending_buf_size=4*pa.lit_bufsize,pa.pending_buf=new M.Buf8(pa.pending_buf_size),pa.d_buf=1*pa.lit_bufsize,pa.l_buf=3*pa.lit_bufsize,pa.level=F,pa.strategy=ea,pa.method=ha,H(X)}var M=f(9187),Q=f(8676),D=f(3693),O=f(8464),P=f(5604);var ba=[new ma(0,0,0,0,function(X,F){var ha=65535;for(ha>X.pending_buf_size-5&&(ha=X.pending_buf_size-5);;){if(1>=X.lookahead){if(R(X),0===X.lookahead&&0===F)return 1;if(0===X.lookahead)break}X.strstart+=X.lookahead;
X.lookahead=0;var K=X.block_start+ha;if((0===X.strstart||X.strstart>=K)&&(X.lookahead=X.strstart-K,X.strstart=K,z(X,!1),0===X.strm.avail_out)||X.strstart-X.block_start>=X.w_size-262&&(z(X,!1),0===X.strm.avail_out))return 1}return X.insert=0,4===F?(z(X,!0),0===X.strm.avail_out?3:4):(X.strstart>X.block_start&&(z(X,!1),X.strm.avail_out),1)}),new ma(4,4,8,4,ka),new ma(4,5,16,8,ka),new ma(4,6,32,32,ka),new ma(4,4,16,16,L),new ma(8,16,32,32,L),new ma(8,16,128,128,L),new ma(8,32,128,256,L),new ma(32,128,
258,1024,L),new ma(32,258,258,4096,L)];h.deflateInit=function(X,F){return aa(X,F,8,15,8,0)};h.deflateInit2=aa;h.deflateReset=H;h.deflateResetKeep=fa;h.deflateSetHeader=function(X,F){return X&&X.state?2!==X.state.wrap?-2:(X.state.gzhead=F,0):-2};h.deflate=function(X,F){var ha,K;if(!X||!X.state||5<F||0>F)return X?w(X,-2):-2;if(K=X.state,!X.output||!X.input&&0!==X.avail_in||666===K.status&&4!==F)return w(X,0===X.avail_out?-5:-2);if(K.strm=X,ha=K.last_flush,K.last_flush=F,42===K.status)if(2===K.wrap)X.adler=
0,u(K,31),u(K,139),u(K,8),K.gzhead?(u(K,(K.gzhead.text?1:0)+(K.gzhead.hcrc?2:0)+(K.gzhead.extra?4:0)+(K.gzhead.name?8:0)+(K.gzhead.comment?16:0)),u(K,255&K.gzhead.time),u(K,K.gzhead.time>>8&255),u(K,K.gzhead.time>>16&255),u(K,K.gzhead.time>>24&255),u(K,9===K.level?2:2<=K.strategy||2>K.level?4:0),u(K,255&K.gzhead.os),K.gzhead.extra&&K.gzhead.extra.length&&(u(K,255&K.gzhead.extra.length),u(K,K.gzhead.extra.length>>8&255)),K.gzhead.hcrc&&(X.adler=O(X.adler,K.pending_buf,K.pending,0)),K.gzindex=0,K.status=
69):(u(K,0),u(K,0),u(K,0),u(K,0),u(K,0),u(K,9===K.level?2:2<=K.strategy||2>K.level?4:0),u(K,3),K.status=113);else{var Z=8+(K.w_bits-8<<4)<<8;Z|=(2<=K.strategy||2>K.level?0:6>K.level?1:6===K.level?2:3)<<6;0!==K.strstart&&(Z|=32);K.status=113;t(K,Z+(31-Z%31));0!==K.strstart&&(t(K,X.adler>>>16),t(K,65535&X.adler));X.adler=1}if(69===K.status)if(K.gzhead.extra){for(Z=K.pending;K.gzindex<(65535&K.gzhead.extra.length)&&(K.pending!==K.pending_buf_size||(K.gzhead.hcrc&&K.pending>Z&&(X.adler=O(X.adler,K.pending_buf,
K.pending-Z,Z)),J(X),Z=K.pending,K.pending!==K.pending_buf_size));)u(K,255&K.gzhead.extra[K.gzindex]),K.gzindex++;K.gzhead.hcrc&&K.pending>Z&&(X.adler=O(X.adler,K.pending_buf,K.pending-Z,Z));K.gzindex===K.gzhead.extra.length&&(K.gzindex=0,K.status=73)}else K.status=73;if(73===K.status)if(K.gzhead.name){Z=K.pending;do{if(K.pending===K.pending_buf_size&&(K.gzhead.hcrc&&K.pending>Z&&(X.adler=O(X.adler,K.pending_buf,K.pending-Z,Z)),J(X),Z=K.pending,K.pending===K.pending_buf_size)){var ea=1;break}ea=K.gzindex<
K.gzhead.name.length?255&K.gzhead.name.charCodeAt(K.gzindex++):0;u(K,ea)}while(0!==ea);K.gzhead.hcrc&&K.pending>Z&&(X.adler=O(X.adler,K.pending_buf,K.pending-Z,Z));0===ea&&(K.gzindex=0,K.status=91)}else K.status=91;if(91===K.status)if(K.gzhead.comment){Z=K.pending;do{if(K.pending===K.pending_buf_size&&(K.gzhead.hcrc&&K.pending>Z&&(X.adler=O(X.adler,K.pending_buf,K.pending-Z,Z)),J(X),Z=K.pending,K.pending===K.pending_buf_size)){ea=1;break}ea=K.gzindex<K.gzhead.comment.length?255&K.gzhead.comment.charCodeAt(K.gzindex++):
0;u(K,ea)}while(0!==ea);K.gzhead.hcrc&&K.pending>Z&&(X.adler=O(X.adler,K.pending_buf,K.pending-Z,Z));0===ea&&(K.status=103)}else K.status=103;if(103===K.status&&(K.gzhead.hcrc?(K.pending+2>K.pending_buf_size&&J(X),K.pending+2<=K.pending_buf_size&&(u(K,255&X.adler),u(K,X.adler>>8&255),X.adler=0,K.status=113)):K.status=113),0!==K.pending){if(J(X),0===X.avail_out)return K.last_flush=-1,0}else if(0===X.avail_in&&(F<<1)-(4<F?9:0)<=(ha<<1)-(4<ha?9:0)&&4!==F)return w(X,-5);if(666===K.status&&0!==X.avail_in)return w(X,
-5);if(0!==X.avail_in||0!==K.lookahead||0!==F&&666!==K.status){ha=2===K.strategy?function(ca,pa){for(var za;;){if(0===ca.lookahead&&(R(ca),0===ca.lookahead)){if(0===pa)return 1;break}if(ca.match_length=0,za=Q._tr_tally(ca,0,ca.window[ca.strstart]),ca.lookahead--,ca.strstart++,za&&(z(ca,!1),0===ca.strm.avail_out))return 1}return ca.insert=0,4===pa?(z(ca,!0),0===ca.strm.avail_out?3:4):ca.last_lit&&(z(ca,!1),0===ca.strm.avail_out)?1:2}(K,F):3===K.strategy?function(ca,pa){for(var za,ya,Ha,Ua,Ea=ca.window;;){if(258>=
ca.lookahead){if(R(ca),258>=ca.lookahead&&0===pa)return 1;if(0===ca.lookahead)break}if(ca.match_length=0,3<=ca.lookahead&&0<ca.strstart&&(ya=Ea[Ha=ca.strstart-1])===Ea[++Ha]&&ya===Ea[++Ha]&&ya===Ea[++Ha]){for(Ua=ca.strstart+258;ya===Ea[++Ha]&&ya===Ea[++Ha]&&ya===Ea[++Ha]&&ya===Ea[++Ha]&&ya===Ea[++Ha]&&ya===Ea[++Ha]&&ya===Ea[++Ha]&&ya===Ea[++Ha]&&Ha<Ua;);ca.match_length=258-(Ua-Ha);ca.match_length>ca.lookahead&&(ca.match_length=ca.lookahead)}if(3<=ca.match_length?(za=Q._tr_tally(ca,1,ca.match_length-
3),ca.lookahead-=ca.match_length,ca.strstart+=ca.match_length,ca.match_length=0):(za=Q._tr_tally(ca,0,ca.window[ca.strstart]),ca.lookahead--,ca.strstart++),za&&(z(ca,!1),0===ca.strm.avail_out))return 1}return ca.insert=0,4===pa?(z(ca,!0),0===ca.strm.avail_out?3:4):ca.last_lit&&(z(ca,!1),0===ca.strm.avail_out)?1:2}(K,F):ba[K.level].func(K,F);if(3!==ha&&4!==ha||(K.status=666),1===ha||3===ha)return 0===X.avail_out&&(K.last_flush=-1),0;if(2===ha&&(1===F?Q._tr_align(K):5!==F&&(Q._tr_stored_block(K,0,0,
!1),3===F&&(x(K.head),0===K.lookahead&&(K.strstart=0,K.block_start=0,K.insert=0))),J(X),0===X.avail_out))return K.last_flush=-1,0}return 4!==F?0:0>=K.wrap?1:(2===K.wrap?(u(K,255&X.adler),u(K,X.adler>>8&255),u(K,X.adler>>16&255),u(K,X.adler>>24&255),u(K,255&X.total_in),u(K,X.total_in>>8&255),u(K,X.total_in>>16&255),u(K,X.total_in>>24&255)):(t(K,X.adler>>>16),t(K,65535&X.adler)),J(X),0<K.wrap&&(K.wrap=-K.wrap),0!==K.pending?0:1)};h.deflateEnd=function(X){var F;return X&&X.state?42!==(F=X.state.status)&&
69!==F&&73!==F&&91!==F&&103!==F&&113!==F&&666!==F?w(X,-2):(X.state=null,113===F?w(X,-3):0):-2};h.deflateSetDictionary=function(X,F){var ha,K,Z;var ea=F.length;if(!X||!X.state||2===(K=(ha=X.state).wrap)||1===K&&42!==ha.status||ha.lookahead)return-2;1===K&&(X.adler=D(X.adler,F,ea,0));ha.wrap=0;ea>=ha.w_size&&(0===K&&(x(ha.head),ha.strstart=0,ha.block_start=0,ha.insert=0),Z=new M.Buf8(ha.w_size),M.arraySet(Z,F,ea-ha.w_size,ha.w_size,0),F=Z,ea=ha.w_size);Z=X.avail_in;var ca=X.next_in;var pa=X.input;X.avail_in=
ea;X.next_in=0;X.input=F;for(R(ha);3<=ha.lookahead;){F=ha.strstart;ea=ha.lookahead-2;do ha.ins_h=(ha.ins_h<<ha.hash_shift^ha.window[F+3-1])&ha.hash_mask,ha.prev[F&ha.w_mask]=ha.head[ha.ins_h],ha.head[ha.ins_h]=F,F++;while(--ea);ha.strstart=F;ha.lookahead=2;R(ha)}return ha.strstart+=ha.lookahead,ha.block_start=ha.strstart,ha.insert=ha.lookahead,ha.lookahead=0,ha.match_length=ha.prev_length=2,ha.match_available=0,X.next_in=ca,X.input=pa,X.avail_in=Z,ha.wrap=K,0};h.deflateInfo="pako deflate (from Nodeca project)"},
9968:function(k){k.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},9365:function(k){k.exports=function(h,f){var w,x,J;var z=h.state;var u=h.next_in;var t=h.input;var n=u+(h.avail_in-5);var R=h.next_out;var ka=h.output;f=R-(f-h.avail_out);var L=R+(h.avail_out-257);var ma=z.dmax;var Y=z.wsize;var fa=z.whave;var H=z.wnext;var aa=z.window;var M=z.hold;var Q=z.bits;var D=z.lencode;var O=z.distcode;var P=
(1<<z.lenbits)-1;var ba=(1<<z.distbits)-1;a:do{15>Q&&(M+=t[u++]<<Q,Q+=8,M+=t[u++]<<Q,Q+=8);var X=D[M&P];b:for(;;){if(M>>>=w=X>>>24,Q-=w,0===(w=X>>>16&255))ka[R++]=65535&X;else{if(!(16&w)){if(0==(64&w)){X=D[(65535&X)+(M&(1<<w)-1)];continue b}if(32&w){z.mode=12;break a}h.msg="invalid literal/length code";z.mode=30;break a}var F=65535&X;(w&=15)&&(Q<w&&(M+=t[u++]<<Q,Q+=8),F+=M&(1<<w)-1,M>>>=w,Q-=w);15>Q&&(M+=t[u++]<<Q,Q+=8,M+=t[u++]<<Q,Q+=8);X=O[M&ba];c:for(;;){if(M>>>=w=X>>>24,Q-=w,!(16&(w=X>>>16&255))){if(0==
(64&w)){X=O[(65535&X)+(M&(1<<w)-1)];continue c}h.msg="invalid distance code";z.mode=30;break a}if(x=65535&X,Q<(w&=15)&&(M+=t[u++]<<Q,(Q+=8)<w&&(M+=t[u++]<<Q,Q+=8)),(x+=M&(1<<w)-1)>ma){h.msg="invalid distance too far back";z.mode=30;break a}if(M>>>=w,Q-=w,x>(w=R-f)){if((w=x-w)>fa&&z.sane){h.msg="invalid distance too far back";z.mode=30;break a}if(X=0,J=aa,0===H){if(X+=Y-w,w<F){F-=w;do ka[R++]=aa[X++];while(--w);X=R-x;J=ka}}else if(H<w){if(X+=Y+H-w,(w-=H)<F){F-=w;do ka[R++]=aa[X++];while(--w);if(X=
0,H<F){F-=w=H;do ka[R++]=aa[X++];while(--w);X=R-x;J=ka}}}else if(X+=H-w,w<F){F-=w;do ka[R++]=aa[X++];while(--w);X=R-x;J=ka}for(;2<F;)ka[R++]=J[X++],ka[R++]=J[X++],ka[R++]=J[X++],F-=3;F&&(ka[R++]=J[X++],1<F&&(ka[R++]=J[X++]))}else{X=R-x;do ka[R++]=ka[X++],ka[R++]=ka[X++],ka[R++]=ka[X++],F-=3;while(2<F);F&&(ka[R++]=ka[X++],1<F&&(ka[R++]=ka[X++]))}break}}break}}while(u<n&&R<L);u-=F=Q>>3;M&=(1<<(Q-=F<<3))-1;h.next_in=u;h.next_out=R;h.avail_in=u<n?n-u+5:5-(u-n);h.avail_out=R<L?L-R+257:257-(R-L);z.hold=
M;z.bits=Q}},7823:function(k,h,f){function w(M){return(M>>>24&255)+(M>>>8&65280)+((65280&M)<<8)+((255&M)<<24)}function x(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new R.Buf16(320);
this.work=new R.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function J(M){var Q;return M&&M.state?(Q=M.state,M.total_in=M.total_out=Q.total=0,M.msg="",Q.wrap&&(M.adler=1&Q.wrap),Q.mode=1,Q.last=0,Q.havedict=0,Q.dmax=32768,Q.head=null,Q.hold=0,Q.bits=0,Q.lencode=Q.lendyn=new R.Buf32(852),Q.distcode=Q.distdyn=new R.Buf32(592),Q.sane=1,Q.back=-1,0):-2}function z(M){var Q;return M&&M.state?((Q=M.state).wsize=0,Q.whave=0,Q.wnext=0,J(M)):-2}function u(M,Q){var D,O;return M&&
M.state?(O=M.state,0>Q?(D=0,Q=-Q):(D=1+(Q>>4),48>Q&&(Q&=15)),Q&&(8>Q||15<Q)?-2:(null!==O.window&&O.wbits!==Q&&(O.window=null),O.wrap=D,O.wbits=Q,z(M))):-2}function t(M,Q){var D,O;return M?(O=new x,M.state=O,O.window=null,0!==(D=u(M,Q))&&(M.state=null),D):-2}function n(M,Q,D,O){var P;M=M.state;return null===M.window&&(M.wsize=1<<M.wbits,M.wnext=0,M.whave=0,M.window=new R.Buf8(M.wsize)),O>=M.wsize?(R.arraySet(M.window,Q,D-M.wsize,M.wsize,0),M.wnext=0,M.whave=M.wsize):((P=M.wsize-M.wnext)>O&&(P=O),R.arraySet(M.window,
Q,D-O,P,M.wnext),(O-=P)?(R.arraySet(M.window,Q,D-O,O,0),M.wnext=O,M.whave=M.wsize):(M.wnext+=P,M.wnext===M.wsize&&(M.wnext=0),M.whave<M.wsize&&(M.whave+=P))),0}var R=f(9187),ka=f(3693),L=f(8464),ma=f(9365),Y=f(6446),fa,H,aa=!0;h.inflateReset=z;h.inflateReset2=u;h.inflateResetKeep=J;h.inflateInit=function(M){return t(M,15)};h.inflateInit2=t;h.inflate=function(M,Q){var D,O,P,ba,X,F,ha,K,Z=0,ea=new R.Buf8(4),ca=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!M||!M.state||!M.output||!M.input&&0!==
M.avail_in)return-2;12===(D=M.state).mode&&(D.mode=13);var pa=M.next_out;var za=M.output;var ya=M.avail_out;var Ha=M.next_in;var Ua=M.input;var Ea=M.avail_in;var Oa=D.hold;var Za=D.bits;var Ma=Ea;var fb=ya;var eb=0;a:for(;;)switch(D.mode){case 1:if(0===D.wrap){D.mode=13;break}for(;16>Za;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}if(2&D.wrap&&35615===Oa){D.check=0;ea[0]=255&Oa;ea[1]=Oa>>>8&255;D.check=L(D.check,ea,2,0);Za=Oa=0;D.mode=2;break}if(D.flags=0,D.head&&(D.head.done=!1),!(1&D.wrap)||
(((255&Oa)<<8)+(Oa>>8))%31){M.msg="incorrect header check";D.mode=30;break}if(8!=(15&Oa)){M.msg="unknown compression method";D.mode=30;break}if(Za-=4,ha=8+(15&(Oa>>>=4)),0===D.wbits)D.wbits=ha;else if(ha>D.wbits){M.msg="invalid window size";D.mode=30;break}D.dmax=1<<ha;M.adler=D.check=1;D.mode=512&Oa?10:12;Za=Oa=0;break;case 2:for(;16>Za;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}if(D.flags=Oa,8!=(255&D.flags)){M.msg="unknown compression method";D.mode=30;break}if(57344&D.flags){M.msg="unknown header flags set";
D.mode=30;break}D.head&&(D.head.text=Oa>>8&1);512&D.flags&&(ea[0]=255&Oa,ea[1]=Oa>>>8&255,D.check=L(D.check,ea,2,0));Za=Oa=0;D.mode=3;case 3:for(;32>Za;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}D.head&&(D.head.time=Oa);512&D.flags&&(ea[0]=255&Oa,ea[1]=Oa>>>8&255,ea[2]=Oa>>>16&255,ea[3]=Oa>>>24&255,D.check=L(D.check,ea,4,0));Za=Oa=0;D.mode=4;case 4:for(;16>Za;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}D.head&&(D.head.xflags=255&Oa,D.head.os=Oa>>8);512&D.flags&&(ea[0]=255&Oa,ea[1]=Oa>>>8&
255,D.check=L(D.check,ea,2,0));Za=Oa=0;D.mode=5;case 5:if(1024&D.flags){for(;16>Za;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}D.length=Oa;D.head&&(D.head.extra_len=Oa);512&D.flags&&(ea[0]=255&Oa,ea[1]=Oa>>>8&255,D.check=L(D.check,ea,2,0));Za=Oa=0}else D.head&&(D.head.extra=null);D.mode=6;case 6:if(1024&D.flags&&((O=D.length)>Ea&&(O=Ea),O&&(D.head&&(ha=D.head.extra_len-D.length,D.head.extra||(D.head.extra=Array(D.head.extra_len)),R.arraySet(D.head.extra,Ua,Ha,O,ha)),512&D.flags&&(D.check=L(D.check,
Ua,O,Ha)),Ea-=O,Ha+=O,D.length-=O),D.length))break a;D.length=0;D.mode=7;case 7:if(2048&D.flags){if(0===Ea)break a;O=0;do ha=Ua[Ha+O++],D.head&&ha&&65536>D.length&&(D.head.name+=String.fromCharCode(ha));while(ha&&O<Ea);if(512&D.flags&&(D.check=L(D.check,Ua,O,Ha)),Ea-=O,Ha+=O,ha)break a}else D.head&&(D.head.name=null);D.length=0;D.mode=8;case 8:if(4096&D.flags){if(0===Ea)break a;O=0;do ha=Ua[Ha+O++],D.head&&ha&&65536>D.length&&(D.head.comment+=String.fromCharCode(ha));while(ha&&O<Ea);if(512&D.flags&&
(D.check=L(D.check,Ua,O,Ha)),Ea-=O,Ha+=O,ha)break a}else D.head&&(D.head.comment=null);D.mode=9;case 9:if(512&D.flags){for(;16>Za;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}if(Oa!==(65535&D.check)){M.msg="header crc mismatch";D.mode=30;break}Za=Oa=0}D.head&&(D.head.hcrc=D.flags>>9&1,D.head.done=!0);M.adler=D.check=0;D.mode=12;break;case 10:for(;32>Za;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}M.adler=D.check=w(Oa);Za=Oa=0;D.mode=11;case 11:if(0===D.havedict)return M.next_out=pa,M.avail_out=
ya,M.next_in=Ha,M.avail_in=Ea,D.hold=Oa,D.bits=Za,2;M.adler=D.check=1;D.mode=12;case 12:if(5===Q||6===Q)break a;case 13:if(D.last){Oa>>>=7&Za;Za-=7&Za;D.mode=27;break}for(;3>Za;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}switch(D.last=1&Oa,--Za,3&(Oa>>>=1)){case 0:D.mode=14;break;case 1:var Na=D;if(aa){fa=new R.Buf32(512);H=new R.Buf32(32);for(ba=0;144>ba;)Na.lens[ba++]=8;for(;256>ba;)Na.lens[ba++]=9;for(;280>ba;)Na.lens[ba++]=7;for(;288>ba;)Na.lens[ba++]=8;Y(1,Na.lens,0,288,fa,0,Na.work,{bits:9});
for(ba=0;32>ba;)Na.lens[ba++]=5;Y(2,Na.lens,0,32,H,0,Na.work,{bits:5});aa=!1}Na.lencode=fa;Na.lenbits=9;Na.distcode=H;Na.distbits=5;if(D.mode=20,6===Q){Oa>>>=2;Za-=2;break a}break;case 2:D.mode=17;break;case 3:M.msg="invalid block type",D.mode=30}Oa>>>=2;Za-=2;break;case 14:Oa>>>=7&Za;for(Za-=7&Za;32>Za;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}if((65535&Oa)!=(Oa>>>16^65535)){M.msg="invalid stored block lengths";D.mode=30;break}if(D.length=65535&Oa,Oa=0,Za=0,D.mode=15,6===Q)break a;case 15:D.mode=
16;case 16:if(O=D.length){if(O>Ea&&(O=Ea),O>ya&&(O=ya),0===O)break a;R.arraySet(za,Ua,Ha,O,pa);Ea-=O;Ha+=O;ya-=O;pa+=O;D.length-=O;break}D.mode=12;break;case 17:for(;14>Za;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}if(D.nlen=257+(31&Oa),Oa>>>=5,Za-=5,D.ndist=1+(31&Oa),Oa>>>=5,Za-=5,D.ncode=4+(15&Oa),Oa>>>=4,Za-=4,286<D.nlen||30<D.ndist){M.msg="too many length or distance symbols";D.mode=30;break}D.have=0;D.mode=18;case 18:for(;D.have<D.ncode;){for(;3>Za;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<
Za;Za+=8}D.lens[ca[D.have++]]=7&Oa;Oa>>>=3;Za-=3}for(;19>D.have;)D.lens[ca[D.have++]]=0;if(D.lencode=D.lendyn,D.lenbits=7,K={bits:D.lenbits},eb=Y(0,D.lens,0,19,D.lencode,0,D.work,K),D.lenbits=K.bits,eb){M.msg="invalid code lengths set";D.mode=30;break}D.have=0;D.mode=19;case 19:for(;D.have<D.nlen+D.ndist;){for(;Z=D.lencode[Oa&(1<<D.lenbits)-1],X=65535&Z,!((ba=Z>>>24)<=Za);){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}if(16>X)Oa>>>=ba,Za-=ba,D.lens[D.have++]=X;else{if(16===X){for(Na=ba+2;Za<Na;){if(0===
Ea)break a;Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}if(Oa>>>=ba,Za-=ba,0===D.have){M.msg="invalid bit length repeat";D.mode=30;break}ha=D.lens[D.have-1];O=3+(3&Oa);Oa>>>=2;Za-=2}else if(17===X){for(Na=ba+3;Za<Na;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}Za-=ba;ha=0;O=3+(7&(Oa>>>=ba));Oa>>>=3;Za-=3}else{for(Na=ba+7;Za<Na;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}Za-=ba;ha=0;O=11+(127&(Oa>>>=ba));Oa>>>=7;Za-=7}if(D.have+O>D.nlen+D.ndist){M.msg="invalid bit length repeat";D.mode=30;break}for(;O--;)D.lens[D.have++]=
ha}}if(30===D.mode)break;if(0===D.lens[256]){M.msg="invalid code -- missing end-of-block";D.mode=30;break}if(D.lenbits=9,K={bits:D.lenbits},eb=Y(1,D.lens,0,D.nlen,D.lencode,0,D.work,K),D.lenbits=K.bits,eb){M.msg="invalid literal/lengths set";D.mode=30;break}if(D.distbits=6,D.distcode=D.distdyn,K={bits:D.distbits},eb=Y(2,D.lens,D.nlen,D.ndist,D.distcode,0,D.work,K),D.distbits=K.bits,eb){M.msg="invalid distances set";D.mode=30;break}if(D.mode=20,6===Q)break a;case 20:D.mode=21;case 21:if(6<=Ea&&258<=
ya){M.next_out=pa;M.avail_out=ya;M.next_in=Ha;M.avail_in=Ea;D.hold=Oa;D.bits=Za;ma(M,fb);pa=M.next_out;za=M.output;ya=M.avail_out;Ha=M.next_in;Ua=M.input;Ea=M.avail_in;Oa=D.hold;Za=D.bits;12===D.mode&&(D.back=-1);break}for(D.back=0;Na=(Z=D.lencode[Oa&(1<<D.lenbits)-1])>>>16&255,X=65535&Z,!((ba=Z>>>24)<=Za);){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}if(Na&&0==(240&Na)){var oa=ba;var Ca=Na;for(F=X;Na=(Z=D.lencode[F+((Oa&(1<<oa+Ca)-1)>>oa)])>>>16&255,X=65535&Z,!(oa+(ba=Z>>>24)<=Za);){if(0===Ea)break a;
Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}Oa>>>=oa;Za-=oa;D.back+=oa}if(Oa>>>=ba,Za-=ba,D.back+=ba,D.length=X,0===Na){D.mode=26;break}if(32&Na){D.back=-1;D.mode=12;break}if(64&Na){M.msg="invalid literal/length code";D.mode=30;break}D.extra=15&Na;D.mode=22;case 22:if(D.extra){for(Na=D.extra;Za<Na;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}D.length+=Oa&(1<<D.extra)-1;Oa>>>=D.extra;Za-=D.extra;D.back+=D.extra}D.was=D.length;D.mode=23;case 23:for(;Na=(Z=D.distcode[Oa&(1<<D.distbits)-1])>>>16&255,X=65535&Z,!((ba=
Z>>>24)<=Za);){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}if(0==(240&Na)){oa=ba;Ca=Na;for(F=X;Na=(Z=D.distcode[F+((Oa&(1<<oa+Ca)-1)>>oa)])>>>16&255,X=65535&Z,!(oa+(ba=Z>>>24)<=Za);){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}Oa>>>=oa;Za-=oa;D.back+=oa}if(Oa>>>=ba,Za-=ba,D.back+=ba,64&Na){M.msg="invalid distance code";D.mode=30;break}D.offset=X;D.extra=15&Na;D.mode=24;case 24:if(D.extra){for(Na=D.extra;Za<Na;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}D.offset+=Oa&(1<<D.extra)-1;Oa>>>=D.extra;
Za-=D.extra;D.back+=D.extra}if(D.offset>D.dmax){M.msg="invalid distance too far back";D.mode=30;break}D.mode=25;case 25:if(0===ya)break a;if(O=fb-ya,D.offset>O){if((O=D.offset-O)>D.whave&&D.sane){M.msg="invalid distance too far back";D.mode=30;break}O>D.wnext?(O-=D.wnext,P=D.wsize-O):P=D.wnext-O;O>D.length&&(O=D.length);ba=D.window}else ba=za,P=pa-D.offset,O=D.length;O>ya&&(O=ya);ya-=O;D.length-=O;do za[pa++]=ba[P++];while(--O);0===D.length&&(D.mode=21);break;case 26:if(0===ya)break a;za[pa++]=D.length;
ya--;D.mode=21;break;case 27:if(D.wrap){for(;32>Za;){if(0===Ea)break a;Ea--;Oa|=Ua[Ha++]<<Za;Za+=8}if(fb-=ya,M.total_out+=fb,D.total+=fb,fb&&(M.adler=D.check=D.flags?L(D.check,za,fb,pa-fb):ka(D.check,za,fb,pa-fb)),fb=ya,(D.flags?Oa:w(Oa))!==D.check){M.msg="incorrect data check";D.mode=30;break}Za=Oa=0}D.mode=28;case 28:if(D.wrap&&D.flags){for(;32>Za;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Za;Za+=8}if(Oa!==(4294967295&D.total)){M.msg="incorrect length check";D.mode=30;break}Za=Oa=0}D.mode=29;case 29:eb=
1;break a;case 30:eb=-3;break a;case 31:return-4;default:return-2}return M.next_out=pa,M.avail_out=ya,M.next_in=Ha,M.avail_in=Ea,D.hold=Oa,D.bits=Za,(D.wsize||fb!==M.avail_out&&30>D.mode&&(27>D.mode||4!==Q))&&n(M,M.output,M.next_out,fb-M.avail_out)?(D.mode=31,-4):(Ma-=M.avail_in,fb-=M.avail_out,M.total_in+=Ma,M.total_out+=fb,D.total+=fb,D.wrap&&fb&&(M.adler=D.check=D.flags?L(D.check,za,fb,M.next_out-fb):ka(D.check,za,fb,M.next_out-fb)),M.data_type=D.bits+(D.last?64:0)+(12===D.mode?128:0)+(20===D.mode||
15===D.mode?256:0),(0===Ma&&0===fb||4===Q)&&0===eb&&(eb=-5),eb)};h.inflateEnd=function(M){if(!M||!M.state)return-2;var Q=M.state;return Q.window&&(Q.window=null),M.state=null,0};h.inflateGetHeader=function(M,Q){var D;return M&&M.state?0==(2&(D=M.state).wrap)?-2:(D.head=Q,Q.done=!1,0):-2};h.inflateSetDictionary=function(M,Q){var D,O=Q.length;return M&&M.state?0!==(D=M.state).wrap&&11!==D.mode?-2:11===D.mode&&ka(1,Q,O,0)!==D.check?-3:n(M,Q,O,O)?(D.mode=31,-4):(D.havedict=1,0):-2};h.inflateInfo="pako inflate (from Nodeca project)"},
6446:function(k,h,f){var w=f(9187),x=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],J=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],z=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];k.exports=function(t,n,R,ka,L,ma,Y,fa){var H,aa,M,Q,D,O,
P=fa.bits,ba,X,F,ha,K,Z=0,ea,ca=null,pa=0,za=new w.Buf16(16);var ya=new w.Buf16(16);var Ha=null,Ua=0;for(ba=0;15>=ba;ba++)za[ba]=0;for(X=0;X<ka;X++)za[n[R+X]]++;var Ea=P;for(F=15;1<=F&&0===za[F];F--);if(Ea>F&&(Ea=F),0===F)return L[ma++]=20971520,L[ma++]=20971520,fa.bits=1,0;for(P=1;P<F&&0===za[P];P++);Ea<P&&(Ea=P);for(ba=H=1;15>=ba;ba++)if(H<<=1,0>(H-=za[ba]))return-1;if(0<H&&(0===t||1!==F))return-1;ya[1]=0;for(ba=1;15>ba;ba++)ya[ba+1]=ya[ba]+za[ba];for(X=0;X<ka;X++)0!==n[R+X]&&(Y[ya[n[R+X]]++]=X);
if(0===t?(ca=Ha=Y,Q=19):1===t?(ca=x,pa-=257,Ha=J,Ua-=257,Q=256):(ca=z,Ha=u,Q=-1),ea=0,X=0,ba=P,ya=ma,ha=Ea,K=0,M=-1,ka=(Z=1<<Ea)-1,1===t&&852<Z||2===t&&592<Z)return 1;for(;;){var Oa=ba-K;Y[X]<Q?(D=0,O=Y[X]):Y[X]>Q?(D=Ha[Ua+Y[X]],O=ca[pa+Y[X]]):(D=96,O=0);H=1<<ba-K;P=aa=1<<ha;do L[ya+(ea>>K)+(aa-=H)]=Oa<<24|D<<16|O|0;while(0!==aa);for(H=1<<ba-1;ea&H;)H>>=1;if(0!==H?(ea&=H-1,ea+=H):ea=0,X++,0==--za[ba]){if(ba===F)break;ba=n[R+Y[X]]}if(ba>Ea&&(ea&ka)!==M){0===K&&(K=Ea);ya+=P;for(H=1<<(ha=ba-K);ha+K<
F&&!(0>=(H-=za[ha+K]));)ha++,H<<=1;if(Z+=1<<ha,1===t&&852<Z||2===t&&592<Z)return 1;L[M=ea&ka]=Ea<<24|ha<<16|ya-ma|0}}return 0!==ea&&(L[ya+ea]=ba-K<<24|4194304),fa.bits=Ea,0}},5604:function(k){k.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},8676:function(k,h,f){function w(Ea){for(var Oa=Ea.length;0<=--Oa;)Ea[Oa]=0}function x(Ea,Oa,Za,Ma,fb){this.static_tree=Ea;this.extra_bits=
Oa;this.extra_base=Za;this.elems=Ma;this.max_length=fb;this.has_stree=Ea&&Ea.length}function J(Ea,Oa){this.dyn_tree=Ea;this.max_code=0;this.stat_desc=Oa}function z(Ea){return 256>Ea?Z[Ea]:Z[256+(Ea>>>7)]}function u(Ea,Oa){Ea.pending_buf[Ea.pending++]=255&Oa;Ea.pending_buf[Ea.pending++]=Oa>>>8&255}function t(Ea,Oa,Za){Ea.bi_valid>16-Za?(Ea.bi_buf|=Oa<<Ea.bi_valid&65535,u(Ea,Ea.bi_buf),Ea.bi_buf=Oa>>16-Ea.bi_valid,Ea.bi_valid+=Za-16):(Ea.bi_buf|=Oa<<Ea.bi_valid&65535,Ea.bi_valid+=Za)}function n(Ea,
Oa,Za){t(Ea,Za[2*Oa],Za[2*Oa+1])}function R(Ea,Oa){var Za=0;do Za|=1&Ea,Ea>>>=1,Za<<=1;while(0<--Oa);return Za>>>1}function ka(Ea,Oa,Za){var Ma,fb=Array(16),eb=0;for(Ma=1;15>=Ma;Ma++)fb[Ma]=eb=eb+Za[Ma-1]<<1;for(Za=0;Za<=Oa;Za++)Ma=Ea[2*Za+1],0!==Ma&&(Ea[2*Za]=R(fb[Ma]++,Ma))}function L(Ea){var Oa;for(Oa=0;286>Oa;Oa++)Ea.dyn_ltree[2*Oa]=0;for(Oa=0;30>Oa;Oa++)Ea.dyn_dtree[2*Oa]=0;for(Oa=0;19>Oa;Oa++)Ea.bl_tree[2*Oa]=0;Ea.dyn_ltree[512]=1;Ea.opt_len=Ea.static_len=0;Ea.last_lit=Ea.matches=0}function ma(Ea){8<
Ea.bi_valid?u(Ea,Ea.bi_buf):0<Ea.bi_valid&&(Ea.pending_buf[Ea.pending++]=Ea.bi_buf);Ea.bi_buf=0;Ea.bi_valid=0}function Y(Ea,Oa,Za,Ma){var fb=2*Oa,eb=2*Za;return Ea[fb]<Ea[eb]||Ea[fb]===Ea[eb]&&Ma[Oa]<=Ma[Za]}function fa(Ea,Oa,Za){for(var Ma=Ea.heap[Za],fb=Za<<1;fb<=Ea.heap_len&&(fb<Ea.heap_len&&Y(Oa,Ea.heap[fb+1],Ea.heap[fb],Ea.depth)&&fb++,!Y(Oa,Ma,Ea.heap[fb],Ea.depth));)Ea.heap[Za]=Ea.heap[fb],Za=fb,fb<<=1;Ea.heap[Za]=Ma}function H(Ea,Oa,Za){var Ma,fb,eb=0;if(0!==Ea.last_lit){do{var Na=Ea.pending_buf[Ea.d_buf+
2*eb]<<8|Ea.pending_buf[Ea.d_buf+2*eb+1];var oa=Ea.pending_buf[Ea.l_buf+eb];eb++;0===Na?n(Ea,oa,Oa):(n(Ea,(Ma=ea[oa])+256+1,Oa),0!==(fb=P[Ma])&&t(Ea,oa-ca[Ma],fb),n(Ea,Ma=z(--Na),Za),0!==(fb=ba[Ma])&&t(Ea,Na-Ha[Ma],fb))}while(eb<Ea.last_lit)}n(Ea,256,Oa)}function aa(Ea,Oa){var Za,Ma,fb=Oa.dyn_tree;var eb=Oa.stat_desc.static_tree;var Na=Oa.stat_desc.has_stree,oa=Oa.stat_desc.elems,Ca=-1;Ea.heap_len=0;Ea.heap_max=573;for(Za=0;Za<oa;Za++)0!==fb[2*Za]?(Ea.heap[++Ea.heap_len]=Ca=Za,Ea.depth[Za]=0):fb[2*
Za+1]=0;for(;2>Ea.heap_len;)fb[2*(Ma=Ea.heap[++Ea.heap_len]=2>Ca?++Ca:0)]=1,Ea.depth[Ma]=0,Ea.opt_len--,Na&&(Ea.static_len-=eb[2*Ma+1]);Oa.max_code=Ca;for(Za=Ea.heap_len>>1;1<=Za;Za--)fa(Ea,fb,Za);Ma=oa;do Za=Ea.heap[1],Ea.heap[1]=Ea.heap[Ea.heap_len--],fa(Ea,fb,1),eb=Ea.heap[1],Ea.heap[--Ea.heap_max]=Za,Ea.heap[--Ea.heap_max]=eb,fb[2*Ma]=fb[2*Za]+fb[2*eb],Ea.depth[Ma]=(Ea.depth[Za]>=Ea.depth[eb]?Ea.depth[Za]:Ea.depth[eb])+1,fb[2*Za+1]=fb[2*eb+1]=Ma,Ea.heap[1]=Ma++,fa(Ea,fb,1);while(2<=Ea.heap_len);
Ea.heap[--Ea.heap_max]=Ea.heap[1];var ra,Aa,Ja,Sa,Bb;Za=Oa.dyn_tree;Ma=Oa.max_code;eb=Oa.stat_desc.static_tree;Na=Oa.stat_desc.has_stree;oa=Oa.stat_desc.extra_bits;var ib=Oa.stat_desc.extra_base,Ob=Oa.stat_desc.max_length,Wb=0;for(Ja=0;15>=Ja;Ja++)Ea.bl_count[Ja]=0;Za[2*Ea.heap[Ea.heap_max]+1]=0;for(Oa=Ea.heap_max+1;573>Oa;Oa++)(Ja=Za[2*Za[2*(ra=Ea.heap[Oa])+1]+1]+1)>Ob&&(Ja=Ob,Wb++),Za[2*ra+1]=Ja,ra>Ma||(Ea.bl_count[Ja]++,Sa=0,ra>=ib&&(Sa=oa[ra-ib]),Bb=Za[2*ra],Ea.opt_len+=Bb*(Ja+Sa),Na&&(Ea.static_len+=
Bb*(eb[2*ra+1]+Sa)));if(0!==Wb){do{for(Ja=Ob-1;0===Ea.bl_count[Ja];)Ja--;Ea.bl_count[Ja]--;Ea.bl_count[Ja+1]+=2;Ea.bl_count[Ob]--;Wb-=2}while(0<Wb);for(Ja=Ob;0!==Ja;Ja--)for(ra=Ea.bl_count[Ja];0!==ra;)(Aa=Ea.heap[--Oa])>Ma||(Za[2*Aa+1]!==Ja&&(Ea.opt_len+=(Ja-Za[2*Aa+1])*Za[2*Aa],Za[2*Aa+1]=Ja),ra--)}ka(fb,Ca,Ea.bl_count)}function M(Ea,Oa,Za){var Ma,fb=-1,eb=Oa[1],Na=0,oa=7,Ca=4;0===eb&&(oa=138,Ca=3);Oa[2*(Za+1)+1]=65535;for(Ma=0;Ma<=Za;Ma++){var ra=eb;eb=Oa[2*(Ma+1)+1];++Na<oa&&ra===eb||(Na<Ca?Ea.bl_tree[2*
ra]+=Na:0!==ra?(ra!==fb&&Ea.bl_tree[2*ra]++,Ea.bl_tree[32]++):10>=Na?Ea.bl_tree[34]++:Ea.bl_tree[36]++,Na=0,fb=ra,0===eb?(oa=138,Ca=3):ra===eb?(oa=6,Ca=3):(oa=7,Ca=4))}}function Q(Ea,Oa,Za){var Ma,fb,eb=-1,Na=Oa[1],oa=0,Ca=7,ra=4;0===Na&&(Ca=138,ra=3);for(Ma=0;Ma<=Za;Ma++)if(fb=Na,Na=Oa[2*(Ma+1)+1],!(++oa<Ca&&fb===Na)){if(oa<ra){do n(Ea,fb,Ea.bl_tree);while(0!=--oa)}else 0!==fb?(fb!==eb&&(n(Ea,fb,Ea.bl_tree),oa--),n(Ea,16,Ea.bl_tree),t(Ea,oa-3,2)):10>=oa?(n(Ea,17,Ea.bl_tree),t(Ea,oa-3,3)):(n(Ea,18,
Ea.bl_tree),t(Ea,oa-11,7));oa=0;eb=fb;0===Na?(Ca=138,ra=3):fb===Na?(Ca=6,ra=3):(Ca=7,ra=4)}}function D(Ea,Oa,Za,Ma){t(Ea,Ma?1:0,3);ma(Ea);u(Ea,Za);u(Ea,~Za);O.arraySet(Ea.pending_buf,Ea.window,Oa,Za,Ea.pending);Ea.pending+=Za}var O=f(9187),P=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ba=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],X=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ha=Array(576);w(ha);var K=Array(60);
w(K);var Z=Array(512);w(Z);var ea=Array(256);w(ea);var ca=Array(29);w(ca);var pa,za,ya,Ha=Array(30);w(Ha);var Ua=!1;h._tr_init=function(Ea){if(!Ua){var Oa,Za,Ma,fb=Array(16);for(Ma=Za=0;28>Ma;Ma++)for(ca[Ma]=Za,Oa=0;Oa<1<<P[Ma];Oa++)ea[Za++]=Ma;ea[Za-1]=Ma;for(Ma=Za=0;16>Ma;Ma++)for(Ha[Ma]=Za,Oa=0;Oa<1<<ba[Ma];Oa++)Z[Za++]=Ma;for(Za>>=7;30>Ma;Ma++)for(Ha[Ma]=Za<<7,Oa=0;Oa<1<<ba[Ma]-7;Oa++)Z[256+Za++]=Ma;for(Oa=0;15>=Oa;Oa++)fb[Oa]=0;for(Oa=0;143>=Oa;)ha[2*Oa+1]=8,Oa++,fb[8]++;for(;255>=Oa;)ha[2*Oa+
1]=9,Oa++,fb[9]++;for(;279>=Oa;)ha[2*Oa+1]=7,Oa++,fb[7]++;for(;287>=Oa;)ha[2*Oa+1]=8,Oa++,fb[8]++;ka(ha,287,fb);for(Oa=0;30>Oa;Oa++)K[2*Oa+1]=5,K[2*Oa]=R(Oa,5);pa=new x(ha,P,257,286,15);za=new x(K,ba,0,30,15);ya=new x([],X,0,19,7);!0;Ua=!0}Ea.l_desc=new J(Ea.dyn_ltree,pa);Ea.d_desc=new J(Ea.dyn_dtree,za);Ea.bl_desc=new J(Ea.bl_tree,ya);Ea.bi_buf=0;Ea.bi_valid=0;L(Ea)};h._tr_stored_block=D;h._tr_flush_block=function(Ea,Oa,Za,Ma){var fb,eb,Na=0;0<Ea.level?(2===Ea.strm.data_type&&(Ea.strm.data_type=
function(oa){var Ca,ra=4093624447;for(Ca=0;31>=Ca;Ca++,ra>>>=1)if(1&ra&&0!==oa.dyn_ltree[2*Ca])return 0;if(0!==oa.dyn_ltree[18]||0!==oa.dyn_ltree[20]||0!==oa.dyn_ltree[26])return 1;for(Ca=32;256>Ca;Ca++)if(0!==oa.dyn_ltree[2*Ca])return 1;return 0}(Ea)),aa(Ea,Ea.l_desc),aa(Ea,Ea.d_desc),Na=function(oa){var Ca;M(oa,oa.dyn_ltree,oa.l_desc.max_code);M(oa,oa.dyn_dtree,oa.d_desc.max_code);aa(oa,oa.bl_desc);for(Ca=18;3<=Ca&&0===oa.bl_tree[2*F[Ca]+1];Ca--);return oa.opt_len+=3*(Ca+1)+14,Ca}(Ea),fb=Ea.opt_len+
3+7>>>3,(eb=Ea.static_len+3+7>>>3)<=fb&&(fb=eb)):fb=eb=Za+5;Za+4<=fb&&-1!==Oa?D(Ea,Oa,Za,Ma):4===Ea.strategy||eb===fb?(t(Ea,2+(Ma?1:0),3),H(Ea,ha,K)):(t(Ea,4+(Ma?1:0),3),function(oa,Ca,ra,Aa){var Ja;t(oa,Ca-257,5);t(oa,ra-1,5);t(oa,Aa-4,4);for(Ja=0;Ja<Aa;Ja++)t(oa,oa.bl_tree[2*F[Ja]+1],3);Q(oa,oa.dyn_ltree,Ca-1);Q(oa,oa.dyn_dtree,ra-1)}(Ea,Ea.l_desc.max_code+1,Ea.d_desc.max_code+1,Na+1),H(Ea,Ea.dyn_ltree,Ea.dyn_dtree));L(Ea);Ma&&ma(Ea)};h._tr_tally=function(Ea,Oa,Za){return Ea.pending_buf[Ea.d_buf+
2*Ea.last_lit]=Oa>>>8&255,Ea.pending_buf[Ea.d_buf+2*Ea.last_lit+1]=255&Oa,Ea.pending_buf[Ea.l_buf+Ea.last_lit]=255&Za,Ea.last_lit++,0===Oa?Ea.dyn_ltree[2*Za]++:(Ea.matches++,Oa--,Ea.dyn_ltree[2*(ea[Za]+256+1)]++,Ea.dyn_dtree[2*z(Oa)]++),Ea.last_lit===Ea.lit_bufsize-1};h._tr_align=function(Ea){t(Ea,2,3);n(Ea,256,ha);16===Ea.bi_valid?(u(Ea,Ea.bi_buf),Ea.bi_buf=0,Ea.bi_valid=0):8<=Ea.bi_valid&&(Ea.pending_buf[Ea.pending++]=255&Ea.bi_buf,Ea.bi_buf>>=8,Ea.bi_valid-=8)}},249:function(k){k.exports=function(){this.input=
null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},9066:function(k){k.exports=function(h){h.data&&h.name&&(h=h.data);for(var f=!0,w="",x="",J=0;J<h.length;J++){var z=h[J];if(f)z?x+=String.fromCharCode(z):f=!1;else{if(!z)throw Error("Invalid NULL character found. 0x00 character is not permitted in tEXt content");w+=String.fromCharCode(z)}}return{keyword:x,text:w}}},9686:function(k){k.exports=
function(h,f){if(h=String(h),f=String(f),!/^[\x00-\xFF]+$/.test(h)||!/^[\x00-\xFF]+$/.test(f))throw Error("Only Latin-1 characters are permitted in PNG tEXt chunks. You might want to consider base64 encoding and/or zEXt compression");if(80<=h.length)throw Error('Keyword "'+h+'" is longer than the 79-character limit imposed by the PNG specification');for(var w,x=new Uint8Array(h.length+f.length+1),J=0,z=0;z<h.length;z++){if(!(w=h.charCodeAt(z)))throw Error("0x00 character is not permitted in tEXt keywords");
x[J++]=w}for(h=x[J++]=0;h<f.length;h++){if(!(w=f.charCodeAt(h)))throw Error("0x00 character is not permitted in tEXt content");x[J++]=w}return{name:"tEXt",data:x}}},1194:function(k,h,f){h.encode=f(9686);h.decode=f(9066)},3434:function(k,h,f){var w=f(5714),x=f(6233);k.exports=function(t){var n,R=8,ka=R;for(n=0;n<t.length;n++)R+=t[n].data.length,R+=12;R=new Uint8Array(R);R[0]=137;R[1]=80;R[2]=78;R[3]=71;R[4]=13;R[5]=10;R[6]=26;R[7]=10;for(n=0;n<t.length;n++){var L=t[n],ma=L.name;L=L.data;var Y=L.length;
ma=[ma.charCodeAt(0),ma.charCodeAt(1),ma.charCodeAt(2),ma.charCodeAt(3)];u[0]=Y;R[ka++]=J[3];R[ka++]=J[2];R[ka++]=J[1];R[ka++]=J[0];R[ka++]=ma[0];R[ka++]=ma[1];R[ka++]=ma[2];R[ka++]=ma[3];for(var fa=0;fa<Y;)R[ka++]=L[fa++];L=ma.concat(w(L));L=x.buf(L);z[0]=L;R[ka++]=J[3];R[ka++]=J[2];R[ka++]=J[1];R[ka++]=J[0]}return R};var J=new Uint8Array(4),z=new Int32Array(J.buffer),u=new Uint32Array(J.buffer)},2983:function(k,h,f){var w=f(6233);k.exports=function(u){if(137!==u[0])throw Error("Invalid .png file header");
if(80!==u[1])throw Error("Invalid .png file header");if(78!==u[2])throw Error("Invalid .png file header");if(71!==u[3])throw Error("Invalid .png file header");if(13!==u[4])throw Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(10!==u[5])throw Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(26!==u[6])throw Error("Invalid .png file header");if(10!==u[7])throw Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");
for(var t=!1,n=[],R=8;R<u.length;){x[3]=u[R++];x[2]=u[R++];x[1]=u[R++];x[0]=u[R++];var ka=z[0]+4,L=new Uint8Array(ka);L[0]=u[R++];L[1]=u[R++];L[2]=u[R++];L[3]=u[R++];var ma=String.fromCharCode(L[0])+String.fromCharCode(L[1])+String.fromCharCode(L[2])+String.fromCharCode(L[3]);if(!n.length&&"IHDR"!==ma)throw Error("IHDR header missing");if("IEND"===ma){t=!0;n.push({name:ma,data:new Uint8Array(0)});break}for(var Y=4;Y<ka;Y++)L[Y]=u[R++];x[3]=u[R++];x[2]=u[R++];x[1]=u[R++];x[0]=u[R++];ka=J[0];if(w.buf(L)!==
ka)throw Error("CRC values for "+ma+" header do not match, PNG file is likely corrupted");L=new Uint8Array(L.buffer.slice(4));n.push({name:ma,data:L})}if(!t)throw Error(".png file ended prematurely: no IEND header was found");return n};var x=new Uint8Array(4),J=new Int32Array(x.buffer),z=new Uint32Array(x.buffer)},1493:function(k,h,f){function w(n,R){return Math.pow(n[0]-R[0],2)+Math.pow(n[1]-R[1],2)}function x(n,R,ka){return[n[0]+(R[0]-n[0])*ka,n[1]+(R[1]-n[1])*ka]}function J(n,R,ka,L){L=L||[];var ma=
n[R+0],Y=n[R+1],fa=n[R+2];const H=n[R+3];var aa=3*Y[0]-2*ma[0]-H[0];aa*=aa;Y=3*Y[1]-2*ma[1]-H[1];Y*=Y;let M=3*fa[0]-2*H[0]-ma[0];M*=M;ma=3*fa[1]-2*H[1]-ma[1];(ma*=ma,aa<M&&(aa=M),Y<ma&&(Y=ma),aa+Y)<ka?(ka=n[R+0],L.length?1<(Q=L[L.length-1],D=ka,Math.sqrt(w(Q,D)))&&L.push(ka):L.push(ka),L.push(n[R+3])):(Q=n[R+0],aa=n[R+1],D=n[R+2],n=n[R+3],R=x(Q,aa,.5),ma=x(aa,D,.5),D=x(D,n,.5),aa=x(R,ma,.5),ma=x(ma,D,.5),fa=x(aa,ma,.5),J([Q,R,aa,fa],0,ka,L),J([fa,ma,D,n],0,ka,L));var Q,D;return L}function z(n,R){return u(n,
0,n.length,R)}function u(n,R,ka,L,ma){ma=ma||[];const Y=n[R],fa=n[ka-1];let H=0,aa=1;for(let P=R+1;P<ka-1;++P){a:{var M=n[P],Q=Y,D=fa;var O=w(Q,D);if(0===O){O=w(M,Q);break a}let ba=((M[0]-Q[0])*(D[0]-Q[0])+(M[1]-Q[1])*(D[1]-Q[1]))/O;O=(ba=Math.max(0,Math.min(1,ba)),w(M,x(Q,D,ba)))}M=O;M>H&&(H=M,aa=P)}return Math.sqrt(H)>L?(u(n,R,aa+1,L,ma),u(n,aa,ka,L,ma)):(ma.length||ma.push(Y),ma.push(fa)),ma}function t(n,R=.15,ka){const L=[],ma=(n.length-1)/3;for(let Y=0;Y<ma;Y++)J(n,3*Y,R,L);return ka&&0<ka?u(L,
0,L.length,ka):L}f.d(h,{o:function(){return z},s:function(){return t}})},6094:function(k,h,f){function w(t,n,R){var ka,L={},ma=null,Y=null;for(ka in void 0!==R&&(ma=""+R),void 0!==n.key&&(ma=""+n.key),void 0!==n.ref&&(Y=n.ref),n)z.call(n,ka)&&!u.hasOwnProperty(ka)&&(L[ka]=n[ka]);if(t&&t.defaultProps)for(ka in n=t.defaultProps)void 0===L[ka]&&(L[ka]=n[ka]);return{$$typeof:x,type:t,key:ma,ref:Y,props:L,_owner:J.current}}f(4516);k=f(9787);var x=60103;if(h.Fragment=60107,"function"==typeof Symbol&&Symbol.for)f=
Symbol.for,x=f("react.element"),h.Fragment=f("react.fragment");var J=k.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,z=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};h.jsx=w;h.jsxs=w},4512:function(k,h,f){k.exports=f(6094)},1602:function(k){k=function(h){function f(ca,pa,za){return Object.defineProperty(ca,pa,{value:za,enumerable:!0,configurable:!0,writable:!0}),ca[pa]}function w(ca,pa,za,ya){pa=Object.create((pa&&pa.prototype instanceof J?pa:J).prototype);
ya=new ma(ya||[]);return pa._invoke=function(Ha,Ua,Ea){var Oa=ba;return function(Za,Ma){if(Oa===F)throw Error("Generator is already running");if(Oa===ha){if("throw"===Za)throw Ma;return fa()}Ea.method=Za;for(Ea.arg=Ma;;){if(Za=Ea.delegate)if(Za=R(Za,Ea)){if(Za===K)continue;return Za}if("next"===Ea.method)Ea.sent=Ea._sent=Ea.arg;else if("throw"===Ea.method){if(Oa===ba)throw Oa=ha,Ea.arg;Ea.dispatchException(Ea.arg)}else"return"===Ea.method&&Ea.abrupt("return",Ea.arg);Oa=F;Za=x(Ha,Ua,Ea);if("normal"===
Za.type){if(Oa=Ea.done?ha:X,Za.arg===K)continue;return{value:Za.arg,done:Ea.done}}"throw"===Za.type&&(Oa=ha,Ea.method="throw",Ea.arg=Za.arg)}}}(ca,za,ya),pa}function x(ca,pa,za){try{return{type:"normal",arg:ca.call(pa,za)}}catch(ya){return{type:"throw",arg:ya}}}function J(){}function z(){}function u(){}function t(ca){["next","throw","return"].forEach(function(pa){f(ca,pa,function(za){return this._invoke(pa,za)})})}function n(ca,pa){function za(Ha,Ua,Ea,Oa){Ha=x(ca[Ha],ca,Ua);if("throw"!==Ha.type){var Za=
Ha.arg;return(Ha=Za.value)&&"object"==typeof Ha&&M.call(Ha,"__await")?pa.resolve(Ha.__await).then(function(Ma){za("next",Ma,Ea,Oa)},function(Ma){za("throw",Ma,Ea,Oa)}):pa.resolve(Ha).then(function(Ma){Za.value=Ma;Ea(Za)},function(Ma){return za("throw",Ma,Ea,Oa)})}Oa(Ha.arg)}var ya;this._invoke=function(Ha,Ua){function Ea(){return new pa(function(Oa,Za){za(Ha,Ua,Oa,Za)})}return ya=ya?ya.then(Ea,Ea):Ea()}}function R(ca,pa){var za=ca.iterator[pa.method];if(za===H){if(pa.delegate=null,"throw"===pa.method){if(ca.iterator.return&&
(pa.method="return",pa.arg=H,R(ca,pa),"throw"===pa.method))return K;pa.method="throw";pa.arg=new TypeError("The iterator does not provide a 'throw' method")}return K}za=x(za,ca.iterator,pa.arg);return"throw"===za.type?(pa.method="throw",pa.arg=za.arg,pa.delegate=null,K):(za=za.arg)?za.done?(pa[ca.resultName]=za.value,pa.next=ca.nextLoc,"return"!==pa.method&&(pa.method="next",pa.arg=H),pa.delegate=null,K):za:(pa.method="throw",pa.arg=new TypeError("iterator result is not an object"),pa.delegate=null,
K)}function ka(ca){var pa={tryLoc:ca[0]};1 in ca&&(pa.catchLoc=ca[1]);2 in ca&&(pa.finallyLoc=ca[2],pa.afterLoc=ca[3]);this.tryEntries.push(pa)}function L(ca){var pa=ca.completion||{};pa.type="normal";delete pa.arg;ca.completion=pa}function ma(ca){this.tryEntries=[{tryLoc:"root"}];ca.forEach(ka,this);this.reset(!0)}function Y(ca){if(ca){var pa=ca[D];if(pa)return pa.call(ca);if("function"==typeof ca.next)return ca;if(!isNaN(ca.length)){var za=-1;pa=function Ha(){for(;++za<ca.length;)if(M.call(ca,za))return Ha.value=
ca[za],Ha.done=!1,Ha;return Ha.value=H,Ha.done=!0,Ha};return pa.next=pa}}return{next:fa}}function fa(){return{value:H,done:!0}}var H,aa=Object.prototype,M=aa.hasOwnProperty,Q="function"==typeof Symbol?Symbol:{},D=Q.iterator||"@@iterator",O=Q.asyncIterator||"@@asyncIterator",P=Q.toStringTag||"@@toStringTag";try{f({},"")}catch(ca){f=function(pa,za,ya){return pa[za]=ya}}h.wrap=w;var ba="suspendedStart",X="suspendedYield",F="executing",ha="completed",K={};Q={};Q[D]=function(){return this};var Z=Object.getPrototypeOf;
(Z=Z&&Z(Z(Y([]))))&&Z!==aa&&M.call(Z,D)&&(Q=Z);var ea=u.prototype=J.prototype=Object.create(Q);return z.prototype=ea.constructor=u,u.constructor=z,z.displayName=f(u,P,"GeneratorFunction"),h.isGeneratorFunction=function(ca){ca="function"==typeof ca&&ca.constructor;return!!ca&&(ca===z||"GeneratorFunction"===(ca.displayName||ca.name))},h.mark=function(ca){return Object.setPrototypeOf?Object.setPrototypeOf(ca,u):(ca.__proto__=u,f(ca,P,"GeneratorFunction")),ca.prototype=Object.create(ea),ca},h.awrap=function(ca){return{__await:ca}},
t(n.prototype),n.prototype[O]=function(){return this},h.AsyncIterator=n,h.async=function(ca,pa,za,ya,Ha){void 0===Ha&&(Ha=Promise);var Ua=new n(w(ca,pa,za,ya),Ha);return h.isGeneratorFunction(pa)?Ua:Ua.next().then(function(Ea){return Ea.done?Ea.value:Ua.next()})},t(ea),f(ea,P,"Generator"),ea[D]=function(){return this},ea.toString=function(){return"[object Generator]"},h.keys=function(ca){var pa=[],za;for(za in ca)pa.push(za);return pa.reverse(),function Ha(){for(;pa.length;){var Ua=pa.pop();if(Ua in
ca)return Ha.value=Ua,Ha.done=!1,Ha}return Ha.done=!0,Ha}},h.values=Y,ma.prototype={constructor:ma,reset:function(ca){if(this.prev=0,this.next=0,this.sent=this._sent=H,this.done=!1,this.delegate=null,this.method="next",this.arg=H,this.tryEntries.forEach(L),!ca)for(var pa in this)"t"===pa.charAt(0)&&M.call(this,pa)&&!isNaN(+pa.slice(1))&&(this[pa]=H)},stop:function(){this.done=!0;var ca=this.tryEntries[0].completion;if("throw"===ca.type)throw ca.arg;return this.rval},dispatchException:function(ca){function pa(Za,
Ma){return Ua.type="throw",Ua.arg=ca,za.next=Za,Ma&&(za.method="next",za.arg=H),!!Ma}if(this.done)throw ca;for(var za=this,ya=this.tryEntries.length-1;0<=ya;--ya){var Ha=this.tryEntries[ya],Ua=Ha.completion;if("root"===Ha.tryLoc)return pa("end");if(Ha.tryLoc<=this.prev){var Ea=M.call(Ha,"catchLoc"),Oa=M.call(Ha,"finallyLoc");if(Ea&&Oa){if(this.prev<Ha.catchLoc)return pa(Ha.catchLoc,!0);if(this.prev<Ha.finallyLoc)return pa(Ha.finallyLoc)}else if(Ea){if(this.prev<Ha.catchLoc)return pa(Ha.catchLoc,!0)}else{if(!Oa)throw Error("try statement without catch or finally");
if(this.prev<Ha.finallyLoc)return pa(Ha.finallyLoc)}}}},abrupt:function(ca,pa){for(var za=this.tryEntries.length-1;0<=za;--za){var ya=this.tryEntries[za];if(ya.tryLoc<=this.prev&&M.call(ya,"finallyLoc")&&this.prev<ya.finallyLoc){var Ha=ya;break}}Ha&&("break"===ca||"continue"===ca)&&Ha.tryLoc<=pa&&pa<=Ha.finallyLoc&&(Ha=null);za=Ha?Ha.completion:{};return za.type=ca,za.arg=pa,Ha?(this.method="next",this.next=Ha.finallyLoc,K):this.complete(za)},complete:function(ca,pa){if("throw"===ca.type)throw ca.arg;
return"break"===ca.type||"continue"===ca.type?this.next=ca.arg:"return"===ca.type?(this.rval=this.arg=ca.arg,this.method="return",this.next="end"):"normal"===ca.type&&pa&&(this.next=pa),K},finish:function(ca){for(var pa=this.tryEntries.length-1;0<=pa;--pa){var za=this.tryEntries[pa];if(za.finallyLoc===ca)return this.complete(za.completion,za.afterLoc),L(za),K}},catch:function(ca){for(var pa=this.tryEntries.length-1;0<=pa;--pa){var za=this.tryEntries[pa];if(za.tryLoc===ca){ca=za.completion;if("throw"===
ca.type){var ya=ca.arg;L(za)}return ya}}throw Error("illegal catch attempt");},delegateYield:function(ca,pa,za){return this.delegate={iterator:Y(ca),resultName:pa,nextLoc:za},"next"===this.method&&(this.arg=H),K}},h}(k.exports);try{regeneratorRuntime=k}catch(h){Function("r","regeneratorRuntime \x3d r")(k)}},8152:function(k,h,f){function w(){return Math.floor(Math.random()*2**31)}f.d(h,{W:function(){return w},k:function(){return x}});class x{constructor(J){this.seed=J}next(){return this.seed?(2**31-
1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}},8234:function(k,h,f){function w(oa,Ca,ra){if(oa&&oa.length){const [Aa,Ja]=Ca;Ca=Math.PI/180*ra;const Sa=Math.cos(Ca),Bb=Math.sin(Ca);oa.forEach(ib=>{const [Ob,Wb]=ib;ib[0]=(Ob-Aa)*Sa-(Wb-Ja)*Bb+Aa;ib[1]=(Ob-Aa)*Bb+(Wb-Ja)*Sa+Ja})}}function x(oa){const Ca=oa[0];oa=oa[1];return Math.sqrt(Math.pow(Ca[0]-oa[0],2)+Math.pow(Ca[1]-oa[1],2))}function J(oa,Ca){const ra=Ca.hachureAngle+90;var Aa=Ca.hachureGap;0>Aa&&(Aa=4*Ca.strokeWidth);Aa=Math.max(Aa,
.1);Ca=[0,0];if(ra)for(const Ja of oa)w(Ja,Ca,ra);Aa=function(Ja,Sa){var Bb=[];for(var ib of Ja)Ja=[...ib],Ja[0].join(",")!==Ja[Ja.length-1].join(",")&&Ja.push([Ja[0][0],Ja[0][1]]),2<Ja.length&&Bb.push(Ja);ib=[];Sa=Math.max(Sa,.1);Ja=[];for(var Ob of Bb)for(Bb=0;Bb<Ob.length-1;Bb++){const Pa=Ob[Bb],nb=Ob[Bb+1];if(Pa[1]!==nb[1]){const ob=Math.min(Pa[1],nb[1]);Ja.push({ymin:ob,ymax:Math.max(Pa[1],nb[1]),x:ob===Pa[1]?Pa[0]:nb[0],islope:(nb[0]-Pa[0])/(nb[1]-Pa[1])})}}if(Ja.sort((Pa,nb)=>Pa.ymin<nb.ymin?
-1:Pa.ymin>nb.ymin?1:Pa.x<nb.x?-1:Pa.x>nb.x?1:Pa.ymax===nb.ymax?0:(Pa.ymax-nb.ymax)/Math.abs(Pa.ymax-nb.ymax)),!Ja.length)return ib;let Wb=[],ic=Ja[0].ymin;for(;Wb.length||Ja.length;){if(Ja.length){Ob=-1;for(Bb=0;Bb<Ja.length&&!(Ja[Bb].ymin>ic);Bb++)Ob=Bb;Ja.splice(0,Ob+1).forEach(Pa=>{Wb.push({s:ic,edge:Pa})})}if(Wb=Wb.filter(Pa=>!(Pa.edge.ymax<=ic)),Wb.sort((Pa,nb)=>Pa.edge.x===nb.edge.x?0:(Pa.edge.x-nb.edge.x)/Math.abs(Pa.edge.x-nb.edge.x)),1<Wb.length)for(Ob=0;Ob<Wb.length;Ob+=2){Bb=Ob+1;if(Bb>=
Wb.length)break;ib.push([[Math.round(Wb[Ob].edge.x),ic],[Math.round(Wb[Bb].edge.x),ic]])}ic+=Sa;Wb.forEach(Pa=>{Pa.edge.x+=Sa*Pa.edge.islope})}return ib}(oa,Aa);if(ra){for(const Ja of oa)w(Ja,Ca,-ra);!function(Ja,Sa,Bb){const ib=[];Ja.forEach(Ob=>ib.push(...Ob));w(ib,Sa,Bb)}(Aa,Ca,-ra)}return Aa}function z(oa){const Ca=[];a:{var ra=oa;for(var Aa=[];""!==ra;){if(!ra.match(/^([ \t\r\n,]+)/))if(ra.match(/^([aAcChHlLmMqQsStTvVzZ])/))Aa[Aa.length]={type:0,text:RegExp.$1};else{if(!ra.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/)){ra=
[];break a}Aa[Aa.length]={type:1,text:`${parseFloat(RegExp.$1)}`}}ra=ra.substr(RegExp.$1.length)}ra=(Aa[Aa.length]={type:2,text:""},Aa)}Aa="BOD";let Ja=0;for(var Sa=ra[Ja];2!==Sa.type;){let Bb=0;const ib=[];if("BOD"===Aa){if("M"!==Sa.text&&"m"!==Sa.text)return z("M0,0"+oa);Ja++;Bb=Ea[Sa.text];Aa=Sa.text}else 1===Sa.type?Bb=Ea[Aa]:(Ja++,Bb=Ea[Sa.text],Aa=Sa.text);if(!(Ja+Bb<ra.length))throw Error("Path data ended short");for(Sa=Ja;Sa<Ja+Bb;Sa++){const Ob=ra[Sa];if(1!==Ob.type)throw Error("Param not a number: "+
Aa+","+Ob.text);ib[ib.length]=+Ob.text}if("number"!=typeof Ea[Aa])throw Error("Bad segment: "+Aa);Ca.push({key:Aa,data:ib});Ja+=Bb;Sa=ra[Ja];"M"===Aa&&(Aa="L");"m"===Aa&&(Aa="l")}return Ca}function u(oa){let Ca=0,ra=0,Aa=0,Ja=0;const Sa=[];for(const {key:Bb,data:ib}of oa)switch(Bb){case "M":Sa.push({key:"M",data:[...ib]});[Ca,ra]=ib;[Aa,Ja]=ib;break;case "m":Ca+=ib[0];ra+=ib[1];Sa.push({key:"M",data:[Ca,ra]});Aa=Ca;Ja=ra;break;case "L":Sa.push({key:"L",data:[...ib]});[Ca,ra]=ib;break;case "l":Ca+=
ib[0];ra+=ib[1];Sa.push({key:"L",data:[Ca,ra]});break;case "C":Sa.push({key:"C",data:[...ib]});Ca=ib[4];ra=ib[5];break;case "c":oa=ib.map((Ob,Wb)=>Wb%2?Ob+ra:Ob+Ca);Sa.push({key:"C",data:oa});Ca=oa[4];ra=oa[5];break;case "Q":Sa.push({key:"Q",data:[...ib]});Ca=ib[2];ra=ib[3];break;case "q":oa=ib.map((Ob,Wb)=>Wb%2?Ob+ra:Ob+Ca);Sa.push({key:"Q",data:oa});Ca=oa[2];ra=oa[3];break;case "A":Sa.push({key:"A",data:[...ib]});Ca=ib[5];ra=ib[6];break;case "a":Ca+=ib[5];ra+=ib[6];Sa.push({key:"A",data:[ib[0],
ib[1],ib[2],ib[3],ib[4],Ca,ra]});break;case "H":Sa.push({key:"H",data:[...ib]});Ca=ib[0];break;case "h":Ca+=ib[0];Sa.push({key:"H",data:[Ca]});break;case "V":Sa.push({key:"V",data:[...ib]});ra=ib[0];break;case "v":ra+=ib[0];Sa.push({key:"V",data:[ra]});break;case "S":Sa.push({key:"S",data:[...ib]});Ca=ib[2];ra=ib[3];break;case "s":oa=ib.map((Ob,Wb)=>Wb%2?Ob+ra:Ob+Ca);Sa.push({key:"S",data:oa});Ca=oa[2];ra=oa[3];break;case "T":Sa.push({key:"T",data:[...ib]});Ca=ib[0];ra=ib[1];break;case "t":Ca+=ib[0];
ra+=ib[1];Sa.push({key:"T",data:[Ca,ra]});break;case "Z":case "z":Sa.push({key:"Z",data:[]}),Ca=Aa,ra=Ja}return Sa}function t(oa){const Ca=[];var ra="";let Aa=0,Ja=0,Sa=0,Bb=0,ib=0,Ob=0;for(const {key:ic,data:Pa}of oa){switch(ic){case "M":Ca.push({key:"M",data:[...Pa]});[Aa,Ja]=Pa;[Sa,Bb]=Pa;break;case "C":Ca.push({key:"C",data:[...Pa]});Aa=Pa[4];Ja=Pa[5];ib=Pa[2];Ob=Pa[3];break;case "L":Ca.push({key:"L",data:[...Pa]});[Aa,Ja]=Pa;break;case "H":Aa=Pa[0];Ca.push({key:"L",data:[Aa,Ja]});break;case "V":Ja=
Pa[0];Ca.push({key:"L",data:[Aa,Ja]});break;case "S":var Wb=oa=0;"C"===ra||"S"===ra?(oa=Aa+(Aa-ib),Wb=Ja+(Ja-Ob)):(oa=Aa,Wb=Ja);Ca.push({key:"C",data:[oa,Wb,...Pa]});ib=Pa[0];Ob=Pa[1];Aa=Pa[2];Ja=Pa[3];break;case "T":const [nb,ob]=Pa;Wb=oa=0;"Q"===ra||"T"===ra?(oa=Aa+(Aa-ib),Wb=Ja+(Ja-Ob)):(oa=Aa,Wb=Ja);Ca.push({key:"C",data:[Aa+2*(oa-Aa)/3,Ja+2*(Wb-Ja)/3,nb+2*(oa-nb)/3,ob+2*(Wb-ob)/3,nb,ob]});ib=oa;Ob=Wb;Aa=nb;Ja=ob;break;case "Q":const [Zb,Jc,ad,Nc]=Pa;Ca.push({key:"C",data:[Aa+2*(Zb-Aa)/3,Ja+2*
(Jc-Ja)/3,ad+2*(Zb-ad)/3,Nc+2*(Jc-Nc)/3,ad,Nc]});ib=Zb;Ob=Jc;Aa=ad;Ja=Nc;break;case "A":ra=Math.abs(Pa[0]);oa=Math.abs(Pa[1]);Wb=Pa[2];const Gb=Pa[3],xc=Pa[4],Wc=Pa[5],hd=Pa[6];if(0===ra||0===oa)Ca.push({key:"C",data:[Aa,Ja,Wc,hd,Wc,hd]}),Aa=Wc,Ja=hd;else if(Aa!==Wc||Ja!==hd)R(Aa,Ja,Wc,hd,ra,oa,Wb,Gb,xc).forEach(function(Nd){Ca.push({key:"C",data:Nd})}),Aa=Wc,Ja=hd;break;case "Z":Ca.push({key:"Z",data:[]}),Aa=Sa,Ja=Bb}ra=ic}return Ca}function n(oa,Ca,ra){return[oa*Math.cos(ra)-Ca*Math.sin(ra),oa*
Math.sin(ra)+Ca*Math.cos(ra)]}function R(oa,Ca,ra,Aa,Ja,Sa,Bb,ib,Ob,Wb){const ic=(Pa=Bb,Math.PI*Pa/180);var Pa;Pa=[];if(Wb)[ib,nb,ob,Zb]=Wb;else{[oa,Ca]=n(oa,Ca,-ic);[ra,Aa]=n(ra,Aa,-ic);var nb=(oa-ra)/2;var ob=(Ca-Aa)/2;var Zb=nb*nb/(Ja*Ja)+ob*ob/(Sa*Sa);1<Zb&&(Zb=Math.sqrt(Zb),Ja*=Zb,Sa*=Zb);Zb=Ja*Ja;var Jc=Sa*Sa;ib=(ib===Ob?-1:1)*Math.sqrt(Math.abs((Zb*Jc-Zb*ob*ob-Jc*nb*nb)/(Zb*ob*ob+Jc*nb*nb)));ob=ib*Ja*ob/Sa+(oa+ra)/2;Zb=ib*-Sa*nb/Ja+(Ca+Aa)/2;ib=Math.asin(parseFloat(((Ca-Zb)/Sa).toFixed(9)));
nb=Math.asin(parseFloat(((Aa-Zb)/Sa).toFixed(9)));oa<ob&&(ib=Math.PI-ib);ra<ob&&(nb=Math.PI-nb);0>ib&&(ib=2*Math.PI+ib);0>nb&&(nb=2*Math.PI+nb);Ob&&ib>nb&&(ib-=2*Math.PI);!Ob&&nb>ib&&(nb-=2*Math.PI)}if(Math.abs(nb-ib)>120*Math.PI/180){Jc=nb;const ad=ra,Nc=Aa;nb=Ob&&nb>ib?ib+120*Math.PI/180:ib+120*Math.PI/180*-1;Pa=R(ra=ob+Ja*Math.cos(nb),Aa=Zb+Sa*Math.sin(nb),ad,Nc,Ja,Sa,Bb,0,Ob,[nb,Jc,ob,Zb])}Bb=Math.tan((nb-ib)/4);Ja=4/3*Ja*Bb;Bb*=4/3*Sa;Sa=[oa,Ca];oa=[oa+Ja*Math.sin(ib),Ca-Bb*Math.cos(ib)];Ca=
[ra+Ja*Math.sin(nb),Aa-Bb*Math.cos(nb)];ra=[ra,Aa];if(oa[0]=2*Sa[0]-oa[0],oa[1]=2*Sa[1]-oa[1],Wb)return[oa,Ca,ra].concat(Pa);Pa=[oa,Ca,ra].concat(Pa);Wb=[];for(ra=0;ra<Pa.length;ra+=3)Aa=n(Pa[ra][0],Pa[ra][1],ic),oa=n(Pa[ra+1][0],Pa[ra+1][1],ic),Ca=n(Pa[ra+2][0],Pa[ra+2][1],ic),Wb.push([Aa[0],Aa[1],oa[0],oa[1],Ca[0],Ca[1]]);return Wb}function ka(oa,Ca,ra){const Aa=(oa||[]).length;if(2<Aa){const Ja=[];for(let Sa=0;Sa<Aa-1;Sa++)Ja.push(...O(oa[Sa][0],oa[Sa][1],oa[Sa+1][0],oa[Sa+1][1],ra));return Ca&&
Ja.push(...O(oa[Aa-1][0],oa[Aa-1][1],oa[0][0],oa[0][1],ra)),{type:"path",ops:Ja}}return 2===Aa?{type:"path",ops:O(oa[0][0],oa[0][1],oa[1][0],oa[1][1],ra)}:{type:"path",ops:[]}}function L(oa,Ca){let ra=ba(oa,1+.2*Ca.roughness,Ca);if(!Ca.disableMultiStroke){var Aa=1.5*(1+.22*Ca.roughness);const Ja=Object.assign({},Ca);Ja.randomizer=void 0;Ca.seed&&(Ja.seed=Ca.seed+1);oa=ba(oa,Aa,Ja);ra=ra.concat(oa)}return{type:"path",ops:ra}}function ma(oa,Ca,ra){const Aa=2*Math.PI/Math.ceil(Math.max(ra.curveStepCount,
ra.curveStepCount/Math.sqrt(200)*Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(oa/2,2)+Math.pow(Ca/2,2))/2))));oa=Math.abs(oa/2);Ca=Math.abs(Ca/2);const Ja=1-ra.curveFitting;return oa+=D(oa*Ja,ra),Ca+=D(Ca*Ja,ra),{increment:Aa,rx:oa,ry:Ca}}function Y(oa,Ca,ra,Aa){const [Ja,Sa]=F(Aa.increment,oa,Ca,Aa.rx,Aa.ry,1,Aa.increment*Q(.1,Q(.4,1,ra),ra),ra);let Bb=X(Ja,null,ra);ra.disableMultiStroke||0===ra.roughness||([oa]=F(Aa.increment,oa,Ca,Aa.rx,Aa.ry,1.5,0,ra),ra=X(oa,null,ra),Bb=Bb.concat(ra));return{estimatedPoints:Sa,
opset:{type:"path",ops:Bb}}}function fa(oa,Ca,ra,Aa,Ja,Sa,Bb,ib,Ob){ra=Math.abs(ra/2);Aa=Math.abs(Aa/2);ra+=D(.01*ra,Ob);for(Aa+=D(.01*Aa,Ob);0>Ja;)Ja+=2*Math.PI,Sa+=2*Math.PI;Sa-Ja>2*Math.PI&&(Ja=0,Sa=2*Math.PI);var Wb=Math.min(2*Math.PI/Ob.curveStepCount/2,(Sa-Ja)/2);const ic=ha(Wb,oa,Ca,ra,Aa,Ja,Sa,1,Ob);Ob.disableMultiStroke||(Wb=ha(Wb,oa,Ca,ra,Aa,Ja,Sa,1.5,Ob),ic.push(...Wb));return Bb&&(ib?ic.push(...O(oa,Ca,oa+ra*Math.cos(Ja),Ca+Aa*Math.sin(Ja),Ob),...O(oa,Ca,oa+ra*Math.cos(Sa),Ca+Aa*Math.sin(Sa),
Ob)):ic.push({op:"lineTo",data:[oa,Ca]},{op:"lineTo",data:[oa+ra*Math.cos(Ja),Ca+Aa*Math.sin(Ja)]})),{type:"path",ops:ic}}function H(oa,Ca){const ra=[];for(const Aa of oa)if(Aa.length){oa=Ca.maxRandomnessOffset||0;const Ja=Aa.length;if(2<Ja){ra.push({op:"move",data:[Aa[0][0]+D(oa,Ca),Aa[0][1]+D(oa,Ca)]});for(let Sa=1;Sa<Ja;Sa++)ra.push({op:"lineTo",data:[Aa[Sa][0]+D(oa,Ca),Aa[Sa][1]+D(oa,Ca)]})}}return{type:"fillPath",ops:ra}}function aa(oa,Ca){var ra=Oa;let Aa=Ca.fillStyle||"hachure";if(!Ha[Aa])switch(Aa){case "zigzag":Ha[Aa]||
(Ha[Aa]=new ea(ra));break;case "cross-hatch":Ha[Aa]||(Ha[Aa]=new ca(ra));break;case "dots":Ha[Aa]||(Ha[Aa]=new pa(ra));break;case "dashed":Ha[Aa]||(Ha[Aa]=new za(ra));break;case "zigzag-line":Ha[Aa]||(Ha[Aa]=new ya(ra));break;default:Aa="hachure",Ha[Aa]||(Ha[Aa]=new Z(ra))}return Ha[Aa].fillPolygons(oa,Ca)}function M(oa){return oa.randomizer||(oa.randomizer=new Ua.k(oa.seed||0)),oa.randomizer.next()}function Q(oa,Ca,ra,Aa=1){return ra.roughness*Aa*(M(ra)*(Ca-oa)+oa)}function D(oa,Ca,ra=1){return Q(-oa,
oa,Ca,ra)}function O(oa,Ca,ra,Aa,Ja,Sa=!1){const Bb=Sa?Ja.disableMultiStrokeFill:Ja.disableMultiStroke;Sa=P(oa,Ca,ra,Aa,Ja,!0,!1);if(Bb)return Sa;oa=P(oa,Ca,ra,Aa,Ja,!0,!0);return Sa.concat(oa)}function P(oa,Ca,ra,Aa,Ja,Sa,Bb){var ib=Math.pow(oa-ra,2)+Math.pow(Ca-Aa,2),Ob=Math.sqrt(ib);let Wb;Wb=200>Ob?1:500<Ob?.4:-.0016668*Ob+1.233334;let ic=Ja.maxRandomnessOffset||0;ic*ic*100>ib&&(ic=Ob/10);ib=ic/2;Ob=.2+.2*M(Ja);let Pa=Ja.bowing*Ja.maxRandomnessOffset*(Aa-Ca)/200,nb=Ja.bowing*Ja.maxRandomnessOffset*
(oa-ra)/200;Pa=D(Pa,Ja,Wb);nb=D(nb,Ja,Wb);const ob=[],Zb=Ja.preserveVertices;return Sa&&(Bb?ob.push({op:"move",data:[oa+(Zb?0:D(ib,Ja,Wb)),Ca+(Zb?0:D(ib,Ja,Wb))]}):ob.push({op:"move",data:[oa+(Zb?0:D(ic,Ja,Wb)),Ca+(Zb?0:D(ic,Ja,Wb))]})),Bb?ob.push({op:"bcurveTo",data:[Pa+oa+(ra-oa)*Ob+D(ib,Ja,Wb),nb+Ca+(Aa-Ca)*Ob+D(ib,Ja,Wb),Pa+oa+2*(ra-oa)*Ob+D(ib,Ja,Wb),nb+Ca+2*(Aa-Ca)*Ob+D(ib,Ja,Wb),ra+(Zb?0:D(ib,Ja,Wb)),Aa+(Zb?0:D(ib,Ja,Wb))]}):ob.push({op:"bcurveTo",data:[Pa+oa+(ra-oa)*Ob+D(ic,Ja,Wb),nb+Ca+(Aa-
Ca)*Ob+D(ic,Ja,Wb),Pa+oa+2*(ra-oa)*Ob+D(ic,Ja,Wb),nb+Ca+2*(Aa-Ca)*Ob+D(ic,Ja,Wb),ra+(Zb?0:D(ic,Ja,Wb)),Aa+(Zb?0:D(ic,Ja,Wb))]}),ob}function ba(oa,Ca,ra){const Aa=[];Aa.push([oa[0][0]+D(Ca,ra),oa[0][1]+D(Ca,ra)]);Aa.push([oa[0][0]+D(Ca,ra),oa[0][1]+D(Ca,ra)]);for(let Ja=1;Ja<oa.length;Ja++)Aa.push([oa[Ja][0]+D(Ca,ra),oa[Ja][1]+D(Ca,ra)]),Ja===oa.length-1&&Aa.push([oa[Ja][0]+D(Ca,ra),oa[Ja][1]+D(Ca,ra)]);return X(Aa,null,ra)}function X(oa,Ca,ra){const Aa=oa.length,Ja=[];if(3<Aa){const Sa=[],Bb=1-ra.curveTightness;
Ja.push({op:"move",data:[oa[1][0],oa[1][1]]});for(let ib=1;ib+2<Aa;ib++){const Ob=oa[ib];Sa[0]=[Ob[0],Ob[1]];Sa[1]=[Ob[0]+(Bb*oa[ib+1][0]-Bb*oa[ib-1][0])/6,Ob[1]+(Bb*oa[ib+1][1]-Bb*oa[ib-1][1])/6];Sa[2]=[oa[ib+1][0]+(Bb*oa[ib][0]-Bb*oa[ib+2][0])/6,oa[ib+1][1]+(Bb*oa[ib][1]-Bb*oa[ib+2][1])/6];Sa[3]=[oa[ib+1][0],oa[ib+1][1]];Ja.push({op:"bcurveTo",data:[Sa[1][0],Sa[1][1],Sa[2][0],Sa[2][1],Sa[3][0],Sa[3][1]]})}Ca&&2===Ca.length&&(oa=ra.maxRandomnessOffset,Ja.push({op:"lineTo",data:[Ca[0]+D(oa,ra),Ca[1]+
D(oa,ra)]}))}else 3===Aa?(Ja.push({op:"move",data:[oa[1][0],oa[1][1]]}),Ja.push({op:"bcurveTo",data:[oa[1][0],oa[1][1],oa[2][0],oa[2][1],oa[2][0],oa[2][1]]})):2===Aa&&Ja.push(...O(oa[0][0],oa[0][1],oa[1][0],oa[1][1],ra));return Ja}function F(oa,Ca,ra,Aa,Ja,Sa,Bb,ib){const Ob=[],Wb=[];if(0===ib.roughness){oa/=4;Wb.push([Ca+Aa*Math.cos(-oa),ra+Ja*Math.sin(-oa)]);for(Sa=0;Sa<=2*Math.PI;Sa+=oa)Bb=[Ca+Aa*Math.cos(Sa),ra+Ja*Math.sin(Sa)],Ob.push(Bb),Wb.push(Bb);Wb.push([Ca+Aa*Math.cos(0),ra+Ja*Math.sin(0)]);
Wb.push([Ca+Aa*Math.cos(oa),ra+Ja*Math.sin(oa)])}else{const ic=D(.5,ib)-Math.PI/2;Wb.push([D(Sa,ib)+Ca+.9*Aa*Math.cos(ic-oa),D(Sa,ib)+ra+.9*Ja*Math.sin(ic-oa)]);const Pa=2*Math.PI+ic-.01;for(let nb=ic;nb<Pa;nb+=oa){const ob=[D(Sa,ib)+Ca+Aa*Math.cos(nb),D(Sa,ib)+ra+Ja*Math.sin(nb)];Ob.push(ob);Wb.push(ob)}Wb.push([D(Sa,ib)+Ca+Aa*Math.cos(ic+2*Math.PI+.5*Bb),D(Sa,ib)+ra+Ja*Math.sin(ic+2*Math.PI+.5*Bb)]);Wb.push([D(Sa,ib)+Ca+.98*Aa*Math.cos(ic+Bb),D(Sa,ib)+ra+.98*Ja*Math.sin(ic+Bb)]);Wb.push([D(Sa,ib)+
Ca+.9*Aa*Math.cos(ic+.5*Bb),D(Sa,ib)+ra+.9*Ja*Math.sin(ic+.5*Bb)])}return[Wb,Ob]}function ha(oa,Ca,ra,Aa,Ja,Sa,Bb,ib,Ob){var Wb=Sa+D(.1,Ob);Sa=[];for(Sa.push([D(ib,Ob)+Ca+.9*Aa*Math.cos(Wb-oa),D(ib,Ob)+ra+.9*Ja*Math.sin(Wb-oa)]);Wb<=Bb;Wb+=oa)Sa.push([D(ib,Ob)+Ca+Aa*Math.cos(Wb),D(ib,Ob)+ra+Ja*Math.sin(Wb)]);return Sa.push([Ca+Aa*Math.cos(Bb),ra+Ja*Math.sin(Bb)]),Sa.push([Ca+Aa*Math.cos(Bb),ra+Ja*Math.sin(Bb)]),X(Sa,null,Ob)}function K(oa,Ca,ra,Aa,Ja,Sa,Bb,ib){const Ob=[],Wb=[ib.maxRandomnessOffset||
1,(ib.maxRandomnessOffset||1)+.3];let ic;const Pa=ib.disableMultiStroke?1:2,nb=ib.preserveVertices;for(let ob=0;ob<Pa;ob++)0===ob?Ob.push({op:"move",data:[Bb[0],Bb[1]]}):Ob.push({op:"move",data:[Bb[0]+(nb?0:D(Wb[0],ib)),Bb[1]+(nb?0:D(Wb[0],ib))]}),ic=nb?[Ja,Sa]:[Ja+D(Wb[ob],ib),Sa+D(Wb[ob],ib)],Ob.push({op:"bcurveTo",data:[oa+D(Wb[ob],ib),Ca+D(Wb[ob],ib),ra+D(Wb[ob],ib),Aa+D(Wb[ob],ib),ic[0],ic[1]]});return Ob}f.d(h,{Z:function(){return Na}});class Z{constructor(oa){this.helper=oa}fillPolygons(oa,
Ca){return this._fillPolygons(oa,Ca)}_fillPolygons(oa,Ca){oa=J(oa,Ca);return{type:"fillSketch",ops:this.renderLines(oa,Ca)}}renderLines(oa,Ca){const ra=[];for(const Aa of oa)ra.push(...this.helper.doubleLineOps(Aa[0][0],Aa[0][1],Aa[1][0],Aa[1][1],Ca));return ra}}class ea extends Z{fillPolygons(oa,Ca){var ra=Ca.hachureGap;0>ra&&(ra=4*Ca.strokeWidth);ra=Math.max(ra,.1);oa=J(oa,Object.assign({},Ca,{hachureGap:ra}));const Aa=Math.PI/180*Ca.hachureAngle,Ja=[],Sa=.5*ra*Math.cos(Aa);ra=.5*ra*Math.sin(Aa);
for(const [Bb,ib]of oa)x([Bb,ib])&&Ja.push([[Bb[0]-Sa,Bb[1]+ra],[...ib]],[[Bb[0]+Sa,Bb[1]-ra],[...ib]]);return{type:"fillSketch",ops:this.renderLines(Ja,Ca)}}}class ca extends Z{fillPolygons(oa,Ca){const ra=this._fillPolygons(oa,Ca);Ca=Object.assign({},Ca,{hachureAngle:Ca.hachureAngle+90});oa=this._fillPolygons(oa,Ca);return ra.ops=ra.ops.concat(oa.ops),ra}}class pa{constructor(oa){this.helper=oa}fillPolygons(oa,Ca){oa=J(oa,Ca=Object.assign({},Ca,{hachureAngle:0}));return this.dotsOnLines(oa,Ca)}dotsOnLines(oa,
Ca){const ra=[];let Aa=Ca.hachureGap;0>Aa&&(Aa=4*Ca.strokeWidth);Aa=Math.max(Aa,.1);let Ja=Ca.fillWeight;0>Ja&&(Ja=Ca.strokeWidth/2);const Sa=Aa/4;for(const ib of oa){var Bb=x(ib);oa=Math.ceil(Bb/Aa)-1;Bb-=oa*Aa;const Ob=(ib[0][0]+ib[1][0])/2-Aa/4,Wb=Math.min(ib[0][1],ib[1][1]);for(let ic=0;ic<oa;ic++){const Pa=this.helper.ellipse(Ob-Sa+2*Math.random()*Sa,Wb+Bb+ic*Aa-Sa+2*Math.random()*Sa,Ja,Ja,Ca);ra.push(...Pa.ops)}}return{type:"fillSketch",ops:ra}}}class za{constructor(oa){this.helper=oa}fillPolygons(oa,
Ca){oa=J(oa,Ca);return{type:"fillSketch",ops:this.dashedLine(oa,Ca)}}dashedLine(oa,Ca){const ra=0>Ca.dashOffset?0>Ca.hachureGap?4*Ca.strokeWidth:Ca.hachureGap:Ca.dashOffset,Aa=0>Ca.dashGap?0>Ca.hachureGap?4*Ca.strokeWidth:Ca.hachureGap:Ca.dashGap,Ja=[];return oa.forEach(Sa=>{var Bb=x(Sa);const ib=Math.floor(Bb/(ra+Aa));Bb=(Bb+Aa-ib*(ra+Aa))/2;let Ob=Sa[0];var Wb=Sa[1];Ob[0]>Wb[0]&&(Ob=Sa[1],Wb=Sa[0]);Sa=Math.atan((Wb[1]-Ob[1])/(Wb[0]-Ob[0]));for(Wb=0;Wb<ib;Wb++){var ic=Wb*(ra+Aa),Pa=ic+ra;ic=[Ob[0]+
ic*Math.cos(Sa)+Bb*Math.cos(Sa),Ob[1]+ic*Math.sin(Sa)+Bb*Math.sin(Sa)];Pa=[Ob[0]+Pa*Math.cos(Sa)+Bb*Math.cos(Sa),Ob[1]+Pa*Math.sin(Sa)+Bb*Math.sin(Sa)];Ja.push(...this.helper.doubleLineOps(ic[0],ic[1],Pa[0],Pa[1],Ca))}}),Ja}}class ya{constructor(oa){this.helper=oa}fillPolygons(oa,Ca){const ra=0>Ca.hachureGap?4*Ca.strokeWidth:Ca.hachureGap,Aa=0>Ca.zigzagOffset?ra:Ca.zigzagOffset;oa=J(oa,Ca=Object.assign({},Ca,{hachureGap:ra+Aa}));return{type:"fillSketch",ops:this.zigzagLines(oa,Aa,Ca)}}zigzagLines(oa,
Ca,ra){const Aa=[];return oa.forEach(Ja=>{var Sa=x(Ja);Sa=Math.round(Sa/(2*Ca));let Bb=Ja[0];var ib=Ja[1];Bb[0]>ib[0]&&(Bb=Ja[1],ib=Ja[0]);Ja=Math.atan((ib[1]-Bb[1])/(ib[0]-Bb[0]));for(ib=0;ib<Sa;ib++){var Ob=2*ib*Ca,Wb=2*(ib+1)*Ca,ic=Math.sqrt(2*Math.pow(Ca,2));Ob=[Bb[0]+Ob*Math.cos(Ja),Bb[1]+Ob*Math.sin(Ja)];Wb=[Bb[0]+Wb*Math.cos(Ja),Bb[1]+Wb*Math.sin(Ja)];ic=[Ob[0]+ic*Math.cos(Ja+Math.PI/4),Ob[1]+ic*Math.sin(Ja+Math.PI/4)];Aa.push(...this.helper.doubleLineOps(Ob[0],Ob[1],ic[0],ic[1],ra),...this.helper.doubleLineOps(ic[0],
ic[1],Wb[0],Wb[1],ra))}}),Aa}}const Ha={};var Ua=f(8152);const Ea={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0},Oa={randOffset:function(oa,Ca){return D(oa,Ca)},randOffsetWithRange:function(oa,Ca,ra){return Q(oa,Ca,ra)},ellipse:function(oa,Ca,ra,Aa,Ja){ra=ma(ra,Aa,Ja);return Y(oa,Ca,Ja,ra).opset},doubleLineOps:function(oa,Ca,ra,Aa,Ja){return O(oa,Ca,ra,Aa,Ja,!0)}};var Za=f(1493);class Ma{constructor(oa){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,
stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1};this.config=oa||{};this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return(0,Ua.W)()}_o(oa){return oa?Object.assign({},this.defaultOptions,oa):this.defaultOptions}_d(oa,Ca,ra){return{shape:oa,sets:Ca||
[],options:ra||this.defaultOptions}}line(oa,Ca,ra,Aa,Ja){Ja=this._o(Ja);return this._d("line",[{type:"path",ops:O(oa,Ca,ra,Aa,Ja)}],Ja)}rectangle(oa,Ca,ra,Aa,Ja){Ja=this._o(Ja);const Sa=[];var Bb=ka([[oa,Ca],[oa+ra,Ca],[oa+ra,Ca+Aa],[oa,Ca+Aa]],!0,Ja);Ja.fill&&(oa=[[oa,Ca],[oa+ra,Ca],[oa+ra,Ca+Aa],[oa,Ca+Aa]],"solid"===Ja.fillStyle?Sa.push(H([oa],Ja)):Sa.push(aa([oa],Ja)));return"none"!==Ja.stroke&&Sa.push(Bb),this._d("rectangle",Sa,Ja)}ellipse(oa,Ca,ra,Aa,Ja){Ja=this._o(Ja);const Sa=[];Aa=ma(ra,
Aa,Ja);ra=Y(oa,Ca,Ja,Aa);Ja.fill&&("solid"===Ja.fillStyle?(oa=Y(oa,Ca,Ja,Aa).opset,oa.type="fillPath",Sa.push(oa)):Sa.push(aa([ra.estimatedPoints],Ja)));return"none"!==Ja.stroke&&Sa.push(ra.opset),this._d("ellipse",Sa,Ja)}circle(oa,Ca,ra,Aa){oa=this.ellipse(oa,Ca,ra,ra,Aa);return oa.shape="circle",oa}linearPath(oa,Ca){Ca=this._o(Ca);return this._d("linearPath",[ka(oa,!1,Ca)],Ca)}arc(oa,Ca,ra,Aa,Ja,Sa,Bb=!1,ib){ib=this._o(ib);const Ob=[],Wb=fa(oa,Ca,ra,Aa,Ja,Sa,Bb,!0,ib);if(Bb&&ib.fill)if("solid"===
ib.fillStyle)Bb=Object.assign({},ib),Bb.disableMultiStroke=!0,oa=fa(oa,Ca,ra,Aa,Ja,Sa,!0,!1,Bb),oa.type="fillPath",Ob.push(oa);else{Bb=Ob.push;ra=Math.abs(ra/2);Aa=Math.abs(Aa/2);ra+=D(.01*ra,ib);for(Aa+=D(.01*Aa,ib);0>Ja;)Ja+=2*Math.PI,Sa+=2*Math.PI;Sa-Ja>2*Math.PI&&(Ja=0,Sa=2*Math.PI);const ic=(Sa-Ja)/ib.curveStepCount,Pa=[];for(;Ja<=Sa;Ja+=ic)Pa.push([oa+ra*Math.cos(Ja),Ca+Aa*Math.sin(Ja)]);oa=(Pa.push([oa+ra*Math.cos(Sa),Ca+Aa*Math.sin(Sa)]),Pa.push([oa,Ca]),aa([Pa],ib));Bb.call(Ob,oa)}return"none"!==
ib.stroke&&Ob.push(Wb),this._d("arc",Ob,ib)}curve(oa,Ca){Ca=this._o(Ca);const ra=[],Aa=L(oa,Ca);Ca.fill&&"none"!==Ca.fill&&3<=oa.length&&(oa=function(Ja,Sa=0){var Bb=Ja.length;if(3>Bb)throw Error("A curve must have at least three points.");const ib=[];if(3===Bb)ib.push([...Ja[0]],[...Ja[1]],[...Ja[2]],[...Ja[2]]);else{Bb=[];Bb.push(Ja[0],Ja[0]);for(var Ob=1;Ob<Ja.length;Ob++)Bb.push(Ja[Ob]),Ob===Ja.length-1&&Bb.push(Ja[Ob]);Ja=[];Sa=1-Sa;ib.push([...Bb[0]]);for(Ob=1;Ob+2<Bb.length;Ob++){const Wb=
Bb[Ob];Ja[0]=[Wb[0],Wb[1]];Ja[1]=[Wb[0]+(Sa*Bb[Ob+1][0]-Sa*Bb[Ob-1][0])/6,Wb[1]+(Sa*Bb[Ob+1][1]-Sa*Bb[Ob-1][1])/6];Ja[2]=[Bb[Ob+1][0]+(Sa*Bb[Ob][0]-Sa*Bb[Ob+2][0])/6,Bb[Ob+1][1]+(Sa*Bb[Ob][1]-Sa*Bb[Ob+2][1])/6];Ja[3]=[Bb[Ob+1][0],Bb[Ob+1][1]];ib.push(Ja[1],Ja[2],Ja[3])}}return ib}(oa),oa=(0,Za.s)(oa,10,(1+Ca.roughness)/2),"solid"===Ca.fillStyle?ra.push(H([oa],Ca)):ra.push(aa([oa],Ca)));return"none"!==Ca.stroke&&ra.push(Aa),this._d("curve",ra,Ca)}polygon(oa,Ca){Ca=this._o(Ca);const ra=[],Aa=ka(oa,
!0,Ca);return Ca.fill&&("solid"===Ca.fillStyle?ra.push(H([oa],Ca)):ra.push(aa([oa],Ca))),"none"!==Ca.stroke&&ra.push(Aa),this._d("polygon",ra,Ca)}path(oa,Ca){const ra=this._o(Ca),Aa=[];if(!oa)return this._d("path",Aa,ra);oa=(oa||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");Ca=ra.fill&&"transparent"!==ra.fill&&"none"!==ra.fill;const Ja="none"!==ra.stroke,Sa=!!(ra.simplification&&1>ra.simplification),Bb=function(ib,Ob,Wb){var ic=t(u(z(ib)));ib=[];let Pa=[];var nb=[0,0];let ob=
[];const Zb=()=>{4<=ob.length&&Pa.push(...(0,Za.s)(ob,Ob));ob=[]};for(const {key:Jc,data:ad}of ic)switch(Jc){case "M":Zb();Pa.length&&(ib.push(Pa),Pa=[]);nb=[ad[0],ad[1]];Pa.push(nb);break;case "L":Zb();Pa.push([ad[0],ad[1]]);break;case "C":ob.length||(ic=Pa.length?Pa[Pa.length-1]:nb,ob.push([ic[0],ic[1]]));ob.push([ad[0],ad[1]]);ob.push([ad[2],ad[3]]);ob.push([ad[4],ad[5]]);break;case "Z":Zb(),Pa.push([nb[0],nb[1]])}Zb();Pa.length&&(ib.push(Pa),Pa=[]);if(!Wb)return ib;nb=[];for(const Jc of ib)ib=
(0,Za.o)(Jc,Wb),ib.length&&nb.push(ib);return nb}(oa,1,Sa?4-4*ra.simplification:(1+ra.roughness)/2);return Ca&&("solid"===ra.fillStyle?Aa.push(H(Bb,ra)):Aa.push(aa(Bb,ra))),Ja&&(Sa?Bb.forEach(ib=>{Aa.push(ka(ib,!1,ra))}):Aa.push(function(ib,Ob){ib=t(u(z(ib)));const Wb=[];let ic=[0,0],Pa=[0,0];for(const {key:nb,data:ob}of ib)switch(nb){case "M":const Zb=1*(Ob.maxRandomnessOffset||0),Jc=Ob.preserveVertices;Wb.push({op:"move",data:ob.map(Nd=>Nd+(Jc?0:D(Zb,Ob)))});Pa=[ob[0],ob[1]];ic=[ob[0],ob[1]];break;
case "L":Wb.push(...O(Pa[0],Pa[1],ob[0],ob[1],Ob));Pa=[ob[0],ob[1]];break;case "C":const [ad,Nc,Gb,xc,Wc,hd]=ob;Wb.push(...K(ad,Nc,Gb,xc,Wc,hd,Pa,Ob));Pa=[Wc,hd];break;case "Z":Wb.push(...O(Pa[0],Pa[1],ic[0],ic[1],Ob)),Pa=[ic[0],ic[1]]}return{type:"path",ops:Wb}}(oa,ra))),this._d("path",Aa,ra)}opsToPath(oa,Ca){let ra="";for(const Aa of oa.ops)switch(oa="number"==typeof Ca&&0<=Ca?Aa.data.map(Ja=>+Ja.toFixed(Ca)):Aa.data,Aa.op){case "move":ra+=`M${oa[0]} ${oa[1]} `;break;case "bcurveTo":ra+=`C${oa[0]} ${oa[1]}, ${oa[2]} ${oa[3]}, ${oa[4]} ${oa[5]} `;
break;case "lineTo":ra+=`L${oa[0]} ${oa[1]} `}return ra.trim()}toPaths(oa){var Ca=oa.sets||[];oa=oa.options||this.defaultOptions;const ra=[];for(const Aa of Ca){Ca=null;switch(Aa.type){case "path":Ca={d:this.opsToPath(Aa),stroke:oa.stroke,strokeWidth:oa.strokeWidth,fill:"none"};break;case "fillPath":Ca={d:this.opsToPath(Aa),stroke:"none",strokeWidth:0,fill:oa.fill||"none"};break;case "fillSketch":Ca=this.fillSketch(Aa,oa)}Ca&&ra.push(Ca)}return ra}fillSketch(oa,Ca){let ra=Ca.fillWeight;return 0>ra&&
(ra=Ca.strokeWidth/2),{d:this.opsToPath(oa),stroke:Ca.fill||"none",strokeWidth:ra,fill:"none"}}}class fb{constructor(oa,Ca){this.canvas=oa;this.ctx=this.canvas.getContext("2d");this.gen=new Ma(Ca)}draw(oa){const Ca=oa.sets||[],ra=oa.options||this.getDefaultOptions(),Aa=this.ctx,Ja=oa.options.fixedDecimalPlaceDigits;for(const Sa of Ca)switch(Sa.type){case "path":Aa.save();Aa.strokeStyle="none"===ra.stroke?"transparent":ra.stroke;Aa.lineWidth=ra.strokeWidth;ra.strokeLineDash&&Aa.setLineDash(ra.strokeLineDash);
ra.strokeLineDashOffset&&(Aa.lineDashOffset=ra.strokeLineDashOffset);this._drawToContext(Aa,Sa,Ja);Aa.restore();break;case "fillPath":Aa.save();Aa.fillStyle=ra.fill||"";this._drawToContext(Aa,Sa,Ja,"curve"===oa.shape||"polygon"===oa.shape||"path"===oa.shape?"evenodd":"nonzero");Aa.restore();break;case "fillSketch":this.fillSketch(Aa,Sa,ra)}}fillSketch(oa,Ca,ra){let Aa=ra.fillWeight;0>Aa&&(Aa=ra.strokeWidth/2);oa.save();ra.fillLineDash&&oa.setLineDash(ra.fillLineDash);ra.fillLineDashOffset&&(oa.lineDashOffset=
ra.fillLineDashOffset);oa.strokeStyle=ra.fill||"";oa.lineWidth=Aa;this._drawToContext(oa,Ca,ra.fixedDecimalPlaceDigits);oa.restore()}_drawToContext(oa,Ca,ra,Aa="nonzero"){oa.beginPath();for(const Ja of Ca.ops){const Sa="number"==typeof ra&&0<=ra?Ja.data.map(Bb=>+Bb.toFixed(ra)):Ja.data;switch(Ja.op){case "move":oa.moveTo(Sa[0],Sa[1]);break;case "bcurveTo":oa.bezierCurveTo(Sa[0],Sa[1],Sa[2],Sa[3],Sa[4],Sa[5]);break;case "lineTo":oa.lineTo(Sa[0],Sa[1])}}"fillPath"===Ca.type?oa.fill(Aa):oa.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(oa,
Ca,ra,Aa,Ja){oa=this.gen.line(oa,Ca,ra,Aa,Ja);return this.draw(oa),oa}rectangle(oa,Ca,ra,Aa,Ja){oa=this.gen.rectangle(oa,Ca,ra,Aa,Ja);return this.draw(oa),oa}ellipse(oa,Ca,ra,Aa,Ja){oa=this.gen.ellipse(oa,Ca,ra,Aa,Ja);return this.draw(oa),oa}circle(oa,Ca,ra,Aa){oa=this.gen.circle(oa,Ca,ra,Aa);return this.draw(oa),oa}linearPath(oa,Ca){oa=this.gen.linearPath(oa,Ca);return this.draw(oa),oa}polygon(oa,Ca){oa=this.gen.polygon(oa,Ca);return this.draw(oa),oa}arc(oa,Ca,ra,Aa,Ja,Sa,Bb=!1,ib){oa=this.gen.arc(oa,
Ca,ra,Aa,Ja,Sa,Bb,ib);return this.draw(oa),oa}curve(oa,Ca){oa=this.gen.curve(oa,Ca);return this.draw(oa),oa}path(oa,Ca){oa=this.gen.path(oa,Ca);return this.draw(oa),oa}}class eb{constructor(oa,Ca){this.svg=oa;this.gen=new Ma(Ca)}draw(oa){var Ca=oa.sets||[];const ra=oa.options||this.getDefaultOptions(),Aa=this.svg.ownerDocument||window.document,Ja=Aa.createElementNS("http://www.w3.org/2000/svg","g"),Sa=oa.options.fixedDecimalPlaceDigits;for(const Bb of Ca){Ca=null;switch(Bb.type){case "path":Ca=Aa.createElementNS("http://www.w3.org/2000/svg",
"path");Ca.setAttribute("d",this.opsToPath(Bb,Sa));Ca.setAttribute("stroke",ra.stroke);Ca.setAttribute("stroke-width",ra.strokeWidth+"");Ca.setAttribute("fill","none");ra.strokeLineDash&&Ca.setAttribute("stroke-dasharray",ra.strokeLineDash.join(" ").trim());ra.strokeLineDashOffset&&Ca.setAttribute("stroke-dashoffset",`${ra.strokeLineDashOffset}`);break;case "fillPath":Ca=Aa.createElementNS("http://www.w3.org/2000/svg","path");Ca.setAttribute("d",this.opsToPath(Bb,Sa));Ca.setAttribute("stroke","none");
Ca.setAttribute("stroke-width","0");Ca.setAttribute("fill",ra.fill||"");"curve"!==oa.shape&&"polygon"!==oa.shape||Ca.setAttribute("fill-rule","evenodd");break;case "fillSketch":Ca=this.fillSketch(Aa,Bb,ra)}Ca&&Ja.appendChild(Ca)}return Ja}fillSketch(oa,Ca,ra){let Aa=ra.fillWeight;0>Aa&&(Aa=ra.strokeWidth/2);oa=oa.createElementNS("http://www.w3.org/2000/svg","path");return oa.setAttribute("d",this.opsToPath(Ca,ra.fixedDecimalPlaceDigits)),oa.setAttribute("stroke",ra.fill||""),oa.setAttribute("stroke-width",
Aa+""),oa.setAttribute("fill","none"),ra.fillLineDash&&oa.setAttribute("stroke-dasharray",ra.fillLineDash.join(" ").trim()),ra.fillLineDashOffset&&oa.setAttribute("stroke-dashoffset",`${ra.fillLineDashOffset}`),oa}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(oa,Ca){return this.gen.opsToPath(oa,Ca)}line(oa,Ca,ra,Aa,Ja){oa=this.gen.line(oa,Ca,ra,Aa,Ja);return this.draw(oa)}rectangle(oa,Ca,ra,Aa,Ja){oa=this.gen.rectangle(oa,Ca,ra,Aa,Ja);return this.draw(oa)}ellipse(oa,
Ca,ra,Aa,Ja){oa=this.gen.ellipse(oa,Ca,ra,Aa,Ja);return this.draw(oa)}circle(oa,Ca,ra,Aa){oa=this.gen.circle(oa,Ca,ra,Aa);return this.draw(oa)}linearPath(oa,Ca){oa=this.gen.linearPath(oa,Ca);return this.draw(oa)}polygon(oa,Ca){oa=this.gen.polygon(oa,Ca);return this.draw(oa)}arc(oa,Ca,ra,Aa,Ja,Sa,Bb=!1,ib){oa=this.gen.arc(oa,Ca,ra,Aa,Ja,Sa,Bb,ib);return this.draw(oa)}curve(oa,Ca){oa=this.gen.curve(oa,Ca);return this.draw(oa)}path(oa,Ca){oa=this.gen.path(oa,Ca);return this.draw(oa)}}var Na={canvas:(oa,
Ca)=>new fb(oa,Ca),svg:(oa,Ca)=>new eb(oa,Ca),generator:oa=>new Ma(oa),newSeed:()=>Ma.newSeed()}},5714:function(k){k.exports=function(h,f,w){var x=[],J=h.length;if(0===J)return x;f=0>f?Math.max(0,f+J):f||0;for(void 0!==w&&(J=0>w?w+J:w);J-- >f;)x[J-f]=h[J];return x}},8336:function(k,h,f){h=f(487);f=f(4295);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},554:function(k,h,f){h=f(487);f=f(9135);"string"==typeof(f=f.__esModule?f.default:
f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},2789:function(k,h,f){h=f(487);f=f(3729);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},5080:function(k,h,f){h=f(487);f=f(4241);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},7225:function(k,h,f){h=f(487);f=f(6029);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,
""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},778:function(k,h,f){h=f(487);f=f(9609);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},4220:function(k,h,f){h=f(487);f=f(2345);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},4678:function(k,h,f){h=f(487);f=f(9393);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",
singleton:!1});k.exports=f.locals||{}},1292:function(k,h,f){h=f(487);f=f(6578);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},196:function(k,h,f){h=f(487);f=f(9482);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},2205:function(k,h,f){h=f(487);f=f(7955);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=
f.locals||{}},1310:function(k,h,f){h=f(487);f=f(3195);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},3922:function(k,h,f){h=f(487);f=f(2978);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},7096:function(k,h,f){h=f(487);f=f(1587);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},7117:function(k,
h,f){h=f(487);f=f(9478);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},1106:function(k,h,f){h=f(487);f=f(7369);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},3336:function(k,h,f){h=f(487);f=f(1434);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},4406:function(k,h,f){h=f(487);f=
f(8923);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},6043:function(k,h,f){h=f(487);f=f(6440);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},694:function(k,h,f){h=f(487);f=f(5644);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},8328:function(k,h,f){h=f(487);f=f(6843);"string"==
typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},8051:function(k,h,f){h=f(487);f=f(8461);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},4301:function(k,h,f){h=f(487);f=f(9935);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},9966:function(k,h,f){h=f(487);f=f(532);"string"==typeof(f=f.__esModule?
f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},9295:function(k,h,f){h=f(487);f=f(7589);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},47:function(k,h,f){h=f(487);f=f(5741);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},9781:function(k,h,f){h=f(487);f=f(8465);"string"==typeof(f=f.__esModule?f.default:f)&&(f=
[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},371:function(k,h,f){h=f(487);f=f(5892);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},4623:function(k,h,f){h=f(487);f=f(3874);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},1528:function(k,h,f){h=f(487);f=f(2681);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,
{insert:"head",singleton:!1});k.exports=f.locals||{}},518:function(k,h,f){h=f(487);f=f(6759);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},9757:function(k,h,f){h=f(487);f=f(9650);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},5422:function(k,h,f){h=f(487);f=f(2044);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});
k.exports=f.locals||{}},276:function(k,h,f){h=f(487);f=f(9144);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},6781:function(k,h,f){h=f(487);f=f(6626);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},580:function(k,h,f){h=f(487);f=f(6359);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||
{}},4285:function(k,h,f){h=f(487);f=f(9915);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},3313:function(k,h,f){h=f(487);f=f(9310);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},8635:function(k,h,f){h=f(487);f=f(6464);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},4404:function(k,
h,f){h=f(487);f=f(5260);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[k.id,f,""]]);h(f,{insert:"head",singleton:!1});k.exports=f.locals||{}},487:function(k,h,f){function w(H){for(var aa=-1,M=0;M<ka.length;M++)if(ka[M].identifier===H){aa=M;break}return aa}function x(H,aa){for(var M={},Q=[],D=0;D<H.length;D++){var O=H[D],P=aa.base?O[0]+aa.base:O[0],ba=M[P]||0,X="".concat(P," ").concat(ba);M[P]=ba+1;P=w(X);O={css:O[1],media:O[2],sourceMap:O[3]};-1!==P?(ka[P].references++,ka[P].updater(O)):ka.push({identifier:X,
updater:t(O,aa),references:1});Q.push(X)}return Q}function J(H){var aa=document.createElement("style"),M=H.attributes||{};if(void 0===M.nonce){var Q=f.nc;Q&&(M.nonce=Q)}if(Object.keys(M).forEach(function(D){aa.setAttribute(D,M[D])}),"function"==typeof H.insert)H.insert(aa);else{H=R(H.insert||"head");if(!H)throw Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");H.appendChild(aa)}return aa}function z(H,aa,M,Q){M=M?"":Q.media?"@media ".concat(Q.media,
" {").concat(Q.css,"}"):Q.css;H.styleSheet?H.styleSheet.cssText=ma(aa,M):(M=document.createTextNode(M),Q=H.childNodes,Q[aa]&&H.removeChild(Q[aa]),Q.length?H.insertBefore(M,Q[aa]):H.appendChild(M))}function u(H,aa,M){aa=M.css;var Q=M.media;M=M.sourceMap;if(Q?H.setAttribute("media",Q):H.removeAttribute("media"),M&&"undefined"!=typeof btoa&&(aa+="\n/*# sourceMappingURL\x3ddata:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(M))))," */")),H.styleSheet)H.styleSheet.cssText=
aa;else{for(;H.firstChild;)H.removeChild(H.firstChild);H.appendChild(document.createTextNode(aa))}}function t(H,aa){if(aa.singleton){var M=fa++;var Q=Y||=J(aa);var D=z.bind(null,Q,M,!1);var O=z.bind(null,Q,M,!0)}else Q=J(aa),D=u.bind(null,Q,aa),O=function(){if(null===Q.parentNode)var P=!1;else Q.parentNode.removeChild(Q),P=void 0;!P};return D(H),function(P){P?(P.css!==H.css||P.media!==H.media||P.sourceMap!==H.sourceMap)&&D(H=P):O()}}var n,R=function(){var H={};return function(aa){if(void 0===H[aa]){var M=
document.querySelector(aa);if(window.HTMLIFrameElement&&M instanceof window.HTMLIFrameElement)try{M=M.contentDocument.head}catch(Q){M=null}H[aa]=M}return H[aa]}}(),ka=[],L,ma=(L=[],function(H,aa){return L[H]=aa,L.filter(Boolean).join("\n")}),Y=null,fa=0;k.exports=function(H,aa){(aa=aa||{}).singleton||"boolean"==typeof aa.singleton||(aa.singleton=(void 0===n&&(n=!(!(window&&document&&document.all)||window.atob)),n));var M=x(H=H||[],aa);return function(Q){if(Q=Q||[],"[object Array]"===Object.prototype.toString.call(Q)){for(var D=
0;D<M.length;D++){var O=w(M[D]);ka[O].references--}Q=x(Q,aa);for(D=0;D<M.length;D++)O=w(M[D]),0===ka[O].references&&(ka[O].updater(),ka.splice(O,1));M=Q}}}},940:function(k,h,f){function w(J){if(!f.o(x,J))return Promise.resolve().then(function(){var t=Error("Cannot find module '"+J+"'");throw t.code="MODULE_NOT_FOUND",t;});var z=x[J],u=z[0];return Promise.all(z.slice(1).map(f.e)).then(function(){return f.t(u,19)})}var x={"./ar-SA.json":[7822,91],"./bg-BG.json":[1203,628],"./bn-BD.json":[8525,429],
"./ca-ES.json":[510,130],"./cs-CZ.json":[7605,265],"./da-DK.json":[2392,790],"./de-DE.json":[2853,82],"./el-GR.json":[9876,513],"./en.json":[1463],"./es-ES.json":[9952,759],"./eu-ES.json":[5658,81],"./fa-IR.json":[3747,330],"./fi-FI.json":[9490,512],"./fr-FR.json":[7830,682],"./he-IL.json":[1994,312],"./hi-IN.json":[4646,828],"./hu-HU.json":[6373,368],"./id-ID.json":[3247,808],"./it-IT.json":[3257,239],"./ja-JP.json":[198,204],"./kab-KAB.json":[228,551],"./kk-KZ.json":[8972,22],"./ko-KR.json":[7596,
844],"./lt-LT.json":[3755,340],"./lv-LV.json":[2327,768],"./mr-IN.json":[5297,397],"./my-MM.json":[7704,477],"./nb-NO.json":[1167,359],"./nl-NL.json":[290,24],"./nn-NO.json":[4481,885],"./oc-FR.json":[2284,690],"./pa-IN.json":[6773,162],"./percentages.json":[4451],"./pl-PL.json":[3661,674],"./pt-BR.json":[8881,721],"./pt-PT.json":[5622,395],"./ro-RO.json":[2013,89],"./ru-RU.json":[2253,124],"./si-LK.json":[5497,302],"./sk-SK.json":[4570,750],"./sl-SI.json":[1984,71],"./sv-SE.json":[6006,534],"./ta-IN.json":[3952,
404],"./tr-TR.json":[7315,977],"./uk-UA.json":[334,579],"./zh-CN.json":[1037,680],"./zh-HK.json":[5334,920],"./zh-TW.json":[931,421]};w.keys=function(){return Object.keys(x)};w.id=940;k.exports=w},9713:function(k){k.exports=function(h,f,w){return f in h?Object.defineProperty(h,f,{value:w,enumerable:!0,configurable:!0,writable:!0}):h[f]=w,h}},6479:function(k,h,f){var w=f(7316);k.exports=function(x,J){if(null==x)return{};var z,u=w(x,J);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(x);
for(z=0;z<t.length;z++){var n=t[z];0<=J.indexOf(n)||Object.prototype.propertyIsEnumerable.call(x,n)&&(u[n]=x[n])}}return u}},7316:function(k){k.exports=function(h,f){if(null==h)return{};var w,x={},J=Object.keys(h);for(w=0;w<J.length;w++){var z=J[w];0<=f.indexOf(z)||(x[z]=h[z])}return x}},4295:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645),J=f.n(x);x=f(1667);x=f.n(x);var z=new URL(f(3940),f.b);f=new URL(f(3147),f.b);w=J()(w());J=x()(z);f=x()(f);w.push([k.id,'@font-face{font-family:"Virgil";src:url('+
J+');font-display:swap}@font-face{font-family:"Cascadia";src:url('+f+");font-display:swap}",""]);h.default=w},9135:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,".excalidraw .ActiveFile .ActiveFile__fileName{display:flex;align-items:center}.excalidraw .ActiveFile .ActiveFile__fileName span{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:9.3em}.excalidraw .ActiveFile .ActiveFile__fileName svg{width:1.15em;-webkit-margin-end:.3em;margin-inline-end:.3em;-webkit-transform:scaleY(0.9);transform:scaleY(0.9)}",
""]);h.default=f},3729:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Avatar{width:2.5rem;height:2.5rem;border-radius:1.25rem;display:flex;justify-content:center;align-items:center;color:#fff;cursor:pointer;font-size:.8rem;font-weight:500}.excalidraw .Avatar-img{width:100%;height:100%;border-radius:100%}",""]);h.default=f},4241:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);
var x=f(3645);f=f.n(x)()(w());f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Card{display:flex;flex-direction:column;align-items:center;max-width:290px;margin:1em;text-align:center}.excalidraw .Card .Card-icon{font-size:2.6em;display:flex;flex:0 0 auto;padding:1.4rem;border-radius:50%;background:var(--card-color);color:#fff}.excalidraw .Card .Card-icon svg{width:2.8rem;height:2.8rem}.excalidraw .Card .Card-details{font-size:.96em;min-height:90px;padding:0 1em;margin-bottom:auto}.excalidraw .Card .Card-button.ToolIcon_type_button{height:2.5rem;margin-top:1em;margin-bottom:.3em;background-color:var(--card-color)}.excalidraw .Card .Card-button.ToolIcon_type_button:hover{background-color:var(--card-color-darker)}.excalidraw .Card .Card-button.ToolIcon_type_button:active{background-color:var(--card-color-darkest)}.excalidraw .Card .Card-button.ToolIcon_type_button .ToolIcon__label{color:#fff}.excalidraw .Card .Card-button.ToolIcon_type_button .Spinner{--spinner-color: #fff}",
""]);h.default=f},6029:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Checkbox{margin:4px .3em;display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.excalidraw .Checkbox:hover:not(.is-checked) .Checkbox-box:not(:focus){box-shadow:0 0 0 2px #4dabf7}.excalidraw .Checkbox:hover:not(.is-checked) .Checkbox-box:not(:focus) svg{display:block;opacity:.3}.excalidraw .Checkbox:active .Checkbox-box{box-shadow:0 0 2px 1px inset #1c7ed6 !important}.excalidraw .Checkbox:hover .Checkbox-box{background-color:rgba(208,235,255,.2)}.excalidraw .Checkbox.is-checked .Checkbox-box{background-color:#d0ebff}.excalidraw .Checkbox.is-checked .Checkbox-box svg{display:block}.excalidraw .Checkbox.is-checked:hover .Checkbox-box{background-color:#a5d8ff}.excalidraw .Checkbox .Checkbox-box{width:22px;height:22px;padding:0;flex:0 0 auto;margin:0 1em;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 2px #1c7ed6;background-color:rgba(0,0,0,0);border-radius:4px;color:#1c7ed6}.excalidraw .Checkbox .Checkbox-box:focus{box-shadow:0 0 0 3px #1c7ed6}.excalidraw .Checkbox .Checkbox-box svg{display:none;width:16px;height:16px;stroke-width:3px}.excalidraw .Checkbox .Checkbox-label{display:flex;align-items:center}.excalidraw .Checkbox .excalidraw-tooltip-icon{width:1em;height:1em}",
""]);h.default=f},9609:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .CollabButton.is-collaborating{background-color:var(--button-special-active-bg-color)}.excalidraw .CollabButton.is-collaborating .ToolIcon__icon svg,.excalidraw .CollabButton.is-collaborating .ToolIcon__label{color:var(--icon-green-fill-color)}.excalidraw .CollabButton-collaborators{min-width:1em;min-height:1em;line-height:1;position:absolute;bottom:-5px;padding:3px;border-radius:50%;background-color:#40c057;color:#fff;font-size:.6em;font-family:"Cascadia"}:root[dir\x3dltr] .excalidraw .CollabButton-collaborators{right:-5px}:root[dir\x3drtl] .excalidraw .CollabButton-collaborators{left:-5px}',
""]);h.default=f},2345:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);x=f.n(x);var J=f(1667);J=f.n(J);f=new URL(f(9669),f.b);w=x()(w());f=J()(f);w.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .color-picker{background:var(--popup-bg-color);border:0 solid rgba(255,255,255,.25);box-shadow:rgba(0,0,0,.25) 0 1px 4px;border-radius:4px;position:absolute}:root[dir\x3dltr] .excalidraw .color-picker{left:-5.5px}:root[dir\x3drtl] .excalidraw .color-picker{right:-5.5px}.excalidraw .color-picker-control-container{display:grid;grid-template-columns:auto 1fr;align-items:center}.excalidraw .color-picker-triangle{width:0;height:0;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) var(--popup-bg-color);position:absolute;top:-10px}:root[dir\x3dltr] .excalidraw .color-picker-triangle{left:12px}:root[dir\x3drtl] .excalidraw .color-picker-triangle{right:12px}.excalidraw .color-picker-triangle-shadow{border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,.1);top:-11px}.excalidraw .color-picker-content--default{padding:.5rem;display:grid;grid-template-columns:repeat(5, auto);grid-gap:.5rem;border-radius:4px}.excalidraw .color-picker-content--default:focus{outline:none;box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .color-picker-content--canvas{display:flex;flex-direction:column;padding:.25rem}.excalidraw .color-picker-content--canvas-title{color:#868e96;font-size:12px;padding:0 .25rem}.excalidraw .color-picker-content--canvas-colors{padding:.5rem 0}.excalidraw .color-picker-content--canvas-colors .color-picker-swatch{margin:0 .25rem}.excalidraw .color-picker-content .color-input-container{grid-column:1/span 5}.excalidraw .color-picker-swatch{position:relative;height:1.875rem;width:1.875rem;cursor:pointer;border-radius:4px;margin:0;box-sizing:border-box;border:1px solid #ddd;background-color:currentColor !important;-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .color-picker-swatch:focus{box-shadow:0 0 4px 1px currentColor;border-color:var(--select-highlight-color)}.excalidraw .color-picker-transparent{border-radius:4px;box-shadow:rgba(0,0,0,.1) 0 0 0 1px inset;position:absolute;top:0;right:0;bottom:0;left:0}.excalidraw .color-picker-transparent,.excalidraw .color-picker-label-swatch{background:url("+
f+') left center}.excalidraw .color-picker-hash{background:var(--input-border-color);height:1.875rem;width:1.875rem;color:var(--input-label-color);display:flex;align-items:center;justify-content:center;position:relative}:root[dir\x3dltr] .excalidraw .color-picker-hash{border-radius:4px 0 0 4px}:root[dir\x3drtl] .excalidraw .color-picker-hash{border-radius:0 4px 4px 0}.excalidraw .color-input-container:focus-within .color-picker-hash{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .color-input-container:focus-within .color-picker-hash::before,.excalidraw .color-input-container:focus-within .color-picker-hash::after{content:"";width:1px;height:100%;position:absolute;top:0}.excalidraw .color-input-container:focus-within .color-picker-hash::before{background:var(--input-border-color)}:root[dir\x3dltr] .excalidraw .color-input-container:focus-within .color-picker-hash::before{right:-1px}:root[dir\x3drtl] .excalidraw .color-input-container:focus-within .color-picker-hash::before{left:-1px}.excalidraw .color-input-container:focus-within .color-picker-hash::after{background:var(--input-bg-color)}:root[dir\x3dltr] .excalidraw .color-input-container:focus-within .color-picker-hash::after{right:-2px}:root[dir\x3drtl] .excalidraw .color-input-container:focus-within .color-picker-hash::after{left:-2px}.excalidraw .color-input-container{display:flex}.excalidraw .color-picker-input{width:11ch;margin:0;font-size:1rem;background-color:var(--input-bg-color);color:var(--text-primary-color);border:0;outline:none;height:1.75em;box-shadow:var(--input-border-color) 0 0 0 1px inset;float:left;padding:1px;-webkit-padding-start:.5em;padding-inline-start:.5em;-webkit-appearance:none;appearance:none}:root[dir\x3dltr] .excalidraw .color-picker-input{border-radius:0 4px 4px 0}:root[dir\x3drtl] .excalidraw .color-picker-input{border-radius:4px 0 0 4px}.excalidraw .color-picker-label-swatch{height:1.875rem;width:1.875rem;-webkit-margin-end:.25rem;margin-inline-end:.25rem;border:1px solid #dee2e6;position:relative;overflow:hidden;background-color:rgba(0,0,0,0) !important;-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .color-picker-label-swatch:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:var(--swatch-color)}.excalidraw .color-picker-keybinding{position:absolute;bottom:2px;font-size:.7em}:root[dir\x3dltr] .excalidraw .color-picker-keybinding{right:2px}:root[dir\x3drtl] .excalidraw .color-picker-keybinding{left:2px}.excalidraw--mobile.excalidraw .color-picker-keybinding{display:none}.excalidraw .color-picker-type-canvasBackground .color-picker-keybinding{color:#aaa}.excalidraw .color-picker-type-elementBackground .color-picker-keybinding{color:#fff}.excalidraw .color-picker-swatch[aria-label\x3dtransparent] .color-picker-keybinding{color:#aaa}.excalidraw .color-picker-type-elementStroke .color-picker-keybinding{color:#d4d4d4}.excalidraw.theme--dark .color-picker-type-elementBackground .color-picker-keybinding{color:#000}.excalidraw.theme--dark .color-picker-swatch[aria-label\x3dtransparent] .color-picker-keybinding{color:#000}',
""]);h.default=w},9393:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .confirm-dialog-buttons{display:flex;padding:.2rem 0;justify-content:flex-end}.excalidraw .confirm-dialog .ToolIcon__icon{min-width:2.5rem;width:auto;font-size:1rem}.excalidraw .confirm-dialog .ToolIcon_type_button{margin-left:.8rem;padding:0 .5rem}.excalidraw .confirm-dialog__content{font-size:1rem}.excalidraw .confirm-dialog--confirm.ToolIcon_type_button{background-color:#fa5252}.excalidraw .confirm-dialog--confirm.ToolIcon_type_button:hover{background-color:#e03131}.excalidraw .confirm-dialog--confirm.ToolIcon_type_button .ToolIcon__icon{color:#fff}",
""]);h.default=f},6578:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .context-menu{position:relative;border-radius:4px;box-shadow:0 3px 10px rgba(0,0,0,.2);padding:0;list-style:none;-webkit-user-select:none;user-select:none;margin:-0.25rem 0 0 .125rem;padding:.5rem 0;background-color:var(--popup-secondary-bg-color);border:1px solid var(--button-gray-3);cursor:default}.excalidraw .context-menu button{color:var(--popup-text-color)}.excalidraw .context-menu-option{position:relative;width:100%;min-width:9.5rem;margin:0;padding:.25rem 1rem .25rem 1.25rem;text-align:start;border-radius:0;background-color:rgba(0,0,0,0);border:none;white-space:nowrap;display:grid;grid-template-columns:1fr .2fr;align-items:center}.excalidraw .context-menu-option.checkmark::before{position:absolute;left:6px;margin-bottom:1px;content:"✓"}.excalidraw .context-menu-option.dangerous .context-menu-option__label{color:#f03e3e}.excalidraw .context-menu-option .context-menu-option__label{justify-self:start;-webkit-margin-end:20px;margin-inline-end:20px}.excalidraw .context-menu-option .context-menu-option__shortcut{justify-self:end;opacity:.6;font-family:inherit;font-size:.7rem}.excalidraw .context-menu-option:hover{color:var(--popup-bg-color);background-color:var(--select-highlight-color)}.excalidraw .context-menu-option:hover.dangerous{background-color:#fa5252}.excalidraw .context-menu-option:hover.dangerous .context-menu-option__label{color:var(--popup-bg-color)}.excalidraw .context-menu-option:focus{z-index:1}.excalidraw--mobile.excalidraw .context-menu-option{display:block}.excalidraw--mobile.excalidraw .context-menu-option .context-menu-option__label{-webkit-margin-end:0;margin-inline-end:0}.excalidraw--mobile.excalidraw .context-menu-option .context-menu-option__shortcut{display:none}.excalidraw .context-menu-option-separator{border:none;border-top:1px solid #adb5bd}',
""]);h.default=f},9482:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Dialog{-webkit-user-select:text;user-select:text;cursor:auto}.excalidraw .Dialog__title{display:grid;align-items:center;margin-top:0;grid-template-columns:1fr calc(var(--space-factor)*7);grid-gap:var(--metric);padding:calc(var(--space-factor)*2);text-align:center;font-variant:small-caps;font-size:1.2em}.excalidraw .Dialog__titleContent{flex:1}.excalidraw .Dialog .Modal__close{color:var(--icon-fill-color);margin:0}.excalidraw .Dialog__content{padding:0 16px 16px}.excalidraw--mobile.excalidraw .Dialog{--metric: calc(var(--space-factor) * 4);--inset-left: max(var(--metric), var(--sal));--inset-right: max(var(--metric), var(--sar))}.excalidraw--mobile.excalidraw .Dialog__title{grid-template-columns:calc(var(--space-factor)*7) 1fr calc(var(--space-factor)*7);position:-webkit-sticky;position:sticky;top:0;padding:calc(var(--space-factor)*2);background:var(--island-bg-color);font-size:1.25em;box-sizing:border-box;border-bottom:1px solid var(--button-gray-2);z-index:1}.excalidraw--mobile.excalidraw .Dialog__titleContent{text-align:center}.excalidraw--mobile.excalidraw .Dialog .Island{width:100vw;height:100%;box-sizing:border-box;overflow-y:auto;padding-left:max(calc(var(--padding) * var(--space-factor)), var(--sal));padding-right:max(calc(var(--padding) * var(--space-factor)), var(--sar));padding-bottom:max(calc(var(--padding) * var(--space-factor)), var(--sab))}.excalidraw--mobile.excalidraw .Dialog .Modal__close{order:-1}",
""]);h.default=f},7955:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);x=f.n(x);var J=f(1667);J=f.n(J);f=new URL(f(9669),f.b);w=x()(w());f=J()(f);w.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ExportDialog__preview{--preview-padding: calc(var(--space-factor) * 4);background:url("+f+") left center;text-align:center;padding:var(--preview-padding);margin-bottom:calc(var(--space-factor)*3)}.excalidraw .ExportDialog__preview canvas{max-width:calc(100% - var(--preview-padding)*2);max-height:25rem}.excalidraw.theme--dark .ExportDialog__preview canvas{-webkit-filter:none;filter:none}.excalidraw .ExportDialog__actions{width:100%;display:flex;grid-gap:calc(var(--space-factor)*2);align-items:top;justify-content:space-between}.excalidraw--mobile.excalidraw .ExportDialog{display:flex;flex-direction:column}.excalidraw--mobile.excalidraw .ExportDialog__actions{flex-direction:column;align-items:center}.excalidraw--mobile.excalidraw .ExportDialog__actions\x3e*{margin-bottom:calc(var(--space-factor)*3)}.excalidraw--mobile.excalidraw .ExportDialog__preview canvas{max-height:30vh}.excalidraw--mobile.excalidraw .ExportDialog__dialog,.excalidraw--mobile.excalidraw .ExportDialog__dialog .Island{height:100%;box-sizing:border-box}.excalidraw--mobile.excalidraw .ExportDialog__dialog .Island{overflow-y:auto}.excalidraw .ExportDialog--json .ExportDialog-cards{display:grid;grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));justify-items:center;row-gap:2em}@media(max-width: 460px){.excalidraw .ExportDialog--json .ExportDialog-cards{grid-template-columns:repeat(auto-fit, minmax(240px, 1fr))}.excalidraw .ExportDialog--json .ExportDialog-cards .Card-details{min-height:40px}}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:1em auto;align-items:flex-start;flex-direction:column}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName .TextInput{width:auto}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName-label{margin:.625em 0;font-weight:bold}.excalidraw button.ExportDialog-imageExportButton{width:5rem;height:5rem;margin:0 .2em;border-radius:1rem;background-color:var(--button-color);box-shadow:0 3px 5px -1px rgba(0,0,0,.28),0 6px 10px 0 rgba(0,0,0,.14);font-family:Cascadia;font-size:1.8em;color:#fff}.excalidraw button.ExportDialog-imageExportButton:hover{background-color:var(--button-color-darker)}.excalidraw button.ExportDialog-imageExportButton:active{background-color:var(--button-color-darkest);box-shadow:none}.excalidraw button.ExportDialog-imageExportButton svg{width:.9em}",
""]);h.default=w},3195:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,".excalidraw .FixedSideContainer{position:absolute;pointer-events:none}.excalidraw .FixedSideContainer\x3e*{pointer-events:all}.excalidraw .FixedSideContainer_side_top{left:var(--space-factor);top:var(--space-factor);right:var(--space-factor);z-index:2}.excalidraw .FixedSideContainer_side_top.zen-mode{right:42px}",""]);h.default=f},2978:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=
f(3645);f=f.n(x)()(w());f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .HelpDialog h3{border-bottom:1px solid var(--button-gray-2);padding-bottom:4px}.excalidraw .HelpDialog--island{border:1px solid var(--button-gray-2);margin-bottom:16px}.excalidraw .HelpDialog--island-title{margin:0;padding:4px;background-color:var(--button-gray-1);text-align:center}.excalidraw .HelpDialog--shortcut{border-top:1px solid var(--button-gray-2)}.excalidraw .HelpDialog--key{word-break:keep-all;border:1px solid var(--button-gray-2);padding:2px 8px;margin:auto 4px;background-color:var(--button-gray-1);border-radius:2px;font-size:.8em;min-height:26px;box-sizing:border-box;display:flex;align-items:center;font-family:inherit}.excalidraw .HelpDialog--header{display:flex;flex-direction:row;justify-content:space-evenly;margin-bottom:32px;padding-bottom:16px}.excalidraw .HelpDialog--btn{border:1px solid var(--link-color);padding:8px 32px;border-radius:4px}.excalidraw .HelpDialog--btn:hover{text-decoration:none}",
""]);h.default=f},1587:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .HintViewer{pointer-events:none;box-sizing:border-box;position:absolute;display:flex;justify-content:center;left:0;top:100%;max-width:100%;width:100%;margin-top:6px;text-align:center;color:#868e96;font-size:.8rem}.excalidraw--mobile.excalidraw .HintViewer{position:static;padding-right:2em}.excalidraw .HintViewer\x3espan{padding:.2rem .4rem;background-color:var(--overlay-bg-color);border-radius:4px}",
""]);h.default=f},9478:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .picker-container{display:inline-block;box-sizing:border-box;margin-right:.25rem}.excalidraw .picker{background:var(--popup-bg-color);border:0 solid rgba(255,255,255,.25);box-shadow:rgba(0,0,0,.25) 0 1px 4px;border-radius:4px;position:absolute}.excalidraw .picker-container button,.excalidraw .picker button{position:relative;display:flex;align-items:center;justify-content:center}.excalidraw .picker-container button:focus-visible,.excalidraw .picker button:focus-visible{outline:rgba(0,0,0,0);background-color:var(--button-gray-2)}.excalidraw .picker-container button:focus-visible svg,.excalidraw .picker button:focus-visible svg{opacity:1}.excalidraw .picker-container button:hover,.excalidraw .picker button:hover{background-color:var(--button-gray-2)}.excalidraw .picker-container button:active,.excalidraw .picker button:active{background-color:var(--button-gray-3)}.excalidraw .picker-container button:disabled,.excalidraw .picker button:disabled{cursor:not-allowed}.excalidraw .picker-container button svg,.excalidraw .picker button svg{margin:0;width:36px;height:18px;opacity:.6;pointer-events:none}.excalidraw .picker button{padding:.25rem .28rem .35rem .25rem}.excalidraw .picker-triangle{width:0;height:0;position:relative;top:-10px;z-index:10}:root[dir\x3dltr] .excalidraw .picker-triangle{left:12px}:root[dir\x3drtl] .excalidraw .picker-triangle{right:12px}.excalidraw .picker-triangle:before{content:"";position:absolute;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,.1);top:-1px}.excalidraw .picker-triangle:after{content:"";position:absolute;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) var(--popup-bg-color)}.excalidraw .picker-content{padding:.5rem;display:grid;grid-template-columns:repeat(3, auto);grid-gap:.5rem;border-radius:4px}:root[dir\x3drtl] .excalidraw .picker-content{padding:.4rem}.excalidraw .picker-keybinding{position:absolute;bottom:2px;font-size:.7em;color:var(--keybinding-color)}:root[dir\x3dltr] .excalidraw .picker-keybinding{right:2px}:root[dir\x3drtl] .excalidraw .picker-keybinding{left:2px}.excalidraw--mobile.excalidraw .picker-keybinding{display:none}.excalidraw .picker-type-canvasBackground .picker-keybinding{color:#aaa}.excalidraw .picker-type-elementBackground .picker-keybinding{color:#fff}.excalidraw .picker-swatch[aria-label\x3dtransparent] .picker-keybinding{color:#aaa}.excalidraw .picker-type-elementStroke .picker-keybinding{color:#d4d4d4}.excalidraw.theme--dark .picker-type-elementBackground .picker-keybinding{color:#000}.excalidraw.theme--dark .picker-swatch[aria-label\x3dtransparent] .picker-keybinding{color:#000}',
""]);h.default=f},7369:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,".excalidraw .Island{--padding: 0;background-color:var(--island-bg-color);box-shadow:var(--shadow-island);border-radius:var(--border-radius-lg);padding:calc(var(--padding)*var(--space-factor));position:relative;transition:box-shadow .5s ease-in-out}.excalidraw .Island.zen-mode{box-shadow:none}",""]);h.default=f},1434:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());
f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.layer-ui__sidebar{position:absolute;top:var(--sat);bottom:var(--sab);right:var(--sar);z-index:5;box-shadow:var(--shadow-island);overflow:hidden;border-radius:var(--border-radius-lg);margin:var(--space-factor);width:calc(302px - var(--space-factor) * 2)}.layer-ui__sidebar .Island{box-shadow:none}.layer-ui__sidebar .ToolIcon__icon{border-radius:var(--border-radius-md)}.layer-ui__sidebar .ToolIcon__icon__close .Modal__close{width:calc(var(--space-factor)*7);height:calc(var(--space-factor)*7);display:flex;justify-content:center;align-items:center;color:var(--color-text)}.layer-ui__sidebar .Island{--padding: 0;background-color:var(--island-bg-color);border-radius:var(--border-radius-lg);padding:calc(var(--padding)*var(--space-factor));position:relative;transition:box-shadow .5s ease-in-out}.excalidraw .layer-ui__wrapper.animate{transition:width .1s ease-in-out}.excalidraw .layer-ui__wrapper{position:absolute;width:100%;height:100%;pointer-events:none;z-index:var(--zIndex-layerUI)}.excalidraw .layer-ui__wrapper__top-right{display:flex}.excalidraw .layer-ui__wrapper__footer{width:100%}.excalidraw .layer-ui__wrapper__footer-right{z-index:100;display:flex}.excalidraw .layer-ui__wrapper .zen-mode-transition{transition:-webkit-transform .5s ease-in-out;transition:transform .5s ease-in-out;transition:transform .5s ease-in-out, -webkit-transform .5s ease-in-out}:root[dir\x3dltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-left{-webkit-transform:translate(-999px, 0);transform:translate(-999px, 0)}:root[dir\x3dltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-right{-webkit-transform:translate(999px, 0);transform:translate(999px, 0)}:root[dir\x3drtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-left{-webkit-transform:translate(999px, 0);transform:translate(999px, 0)}:root[dir\x3drtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-right{-webkit-transform:translate(-999px, 0);transform:translate(-999px, 0)}:root[dir\x3dltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.layer-ui__wrapper__footer-left--transition-left{-webkit-transform:translate(-76px, 0);transform:translate(-76px, 0)}:root[dir\x3drtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.layer-ui__wrapper__footer-left--transition-left{-webkit-transform:translate(76px, 0);transform:translate(76px, 0)}.excalidraw .layer-ui__wrapper .zen-mode-transition.layer-ui__wrapper__footer-left--transition-bottom{-webkit-transform:translate(0, 92px);transform:translate(0, 92px)}.excalidraw .layer-ui__wrapper .disable-zen-mode{height:30px;position:absolute;bottom:10px;font-size:10px;padding:10px;font-weight:500;opacity:0;visibility:hidden;transition:visibility 0s linear 0s,opacity .5s}[dir\x3dltr] .excalidraw .layer-ui__wrapper .disable-zen-mode{right:15px}[dir\x3drtl] .excalidraw .layer-ui__wrapper .disable-zen-mode{left:15px}.excalidraw .layer-ui__wrapper .disable-zen-mode--visible{opacity:1;visibility:visible;transition:visibility 0s linear 300ms,opacity .5s;transition-delay:.8s}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-center{pointer-events:none}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-center\x3e*{pointer-events:all}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-left,.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-right,.excalidraw .layer-ui__wrapper .disable-zen-mode--visible{pointer-events:all}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-left{margin-bottom:.2em}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-right{margin-top:auto;margin-bottom:auto;-webkit-margin-end:1em;margin-inline-end:1em}",
""]);h.default=f},8923:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,".excalidraw .layer-ui__library{display:flex;align-items:center;justify-content:center}.excalidraw .layer-ui__library .layer-ui__library-header{display:flex;align-items:center;width:100%;margin:2px 0 15px 0}.excalidraw .layer-ui__library .layer-ui__library-header .Spinner{margin-right:1rem}.excalidraw .layer-ui__library .layer-ui__library-header button{margin:0 2px}.excalidraw .layer-ui__sidebar .layer-ui__library{padding:0;height:100%}.excalidraw .layer-ui__sidebar .library-menu-items-container{height:100%;width:100%}.excalidraw .layer-ui__library-message{padding:2em 4em;min-width:200px;display:flex;flex-direction:column;align-items:center}.excalidraw .layer-ui__library-message .Spinner{margin-bottom:1em}.excalidraw .layer-ui__library-message span{font-size:.8em}.excalidraw .publish-library-success .Dialog__content{display:flex;flex-direction:column}.excalidraw .publish-library-success-close.ToolIcon_type_button{background-color:#228be6;align-self:flex-end}.excalidraw .publish-library-success-close.ToolIcon_type_button:hover{background-color:#1971c2}.excalidraw .publish-library-success-close.ToolIcon_type_button .ToolIcon__icon{width:auto;font-size:1rem;color:#fff;padding:0 .5rem}.excalidraw .library-menu-browse-button{width:80%;min-height:22px;margin:0 auto;margin-top:1rem;padding:10px;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;border-radius:var(--border-radius-lg);background-color:var(--color-primary);color:#fff;text-align:center;white-space:nowrap;text-decoration:none !important}.excalidraw .library-menu-browse-button:hover{background-color:var(--color-primary-darker)}.excalidraw .library-menu-browse-button:active{background-color:var(--color-primary-darkest)}.excalidraw .library-menu-browse-button--mobile{min-height:22px;margin-left:auto}.excalidraw .library-menu-browse-button--mobile a{padding-right:0}",
""]);h.default=f},6440:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,".excalidraw .library-menu-items-container{display:flex;flex-direction:column;height:100%;padding:.5rem;box-sizing:border-box}.excalidraw .library-menu-items-container .library-actions{width:100%;display:flex;margin-right:auto;align-items:center}.excalidraw .library-menu-items-container .library-actions button .library-actions-counter{position:absolute;right:2px;bottom:2px;border-radius:50%;width:1em;height:1em;padding:1px;font-size:.7rem;background:#fff}.excalidraw .library-menu-items-container .library-actions--remove{background-color:#f03e3e}.excalidraw .library-menu-items-container .library-actions--remove:hover{background-color:#e03131}.excalidraw .library-menu-items-container .library-actions--remove:active{background-color:#c92a2a}.excalidraw .library-menu-items-container .library-actions--remove svg{color:#fff}.excalidraw .library-menu-items-container .library-actions--remove .library-actions-counter{color:#f03e3e}.excalidraw .library-menu-items-container .library-actions--export{background-color:#94d82d}.excalidraw .library-menu-items-container .library-actions--export:hover{background-color:#74b816}.excalidraw .library-menu-items-container .library-actions--export:active{background-color:#66a80f}.excalidraw .library-menu-items-container .library-actions--export svg{color:#fff}.excalidraw .library-menu-items-container .library-actions--export .library-actions-counter{color:#94d82d}.excalidraw .library-menu-items-container .library-actions--publish{background-color:#15aabf}.excalidraw .library-menu-items-container .library-actions--publish:hover{background-color:#1098ad}.excalidraw .library-menu-items-container .library-actions--publish:active{background-color:#0b7285}.excalidraw .library-menu-items-container .library-actions--publish svg{color:#fff}.excalidraw .library-menu-items-container .library-actions--publish label{margin-left:-0.2em;margin-right:1.1em;color:#fff;font-size:.86em}.excalidraw .library-menu-items-container .library-actions--publish .library-actions-counter{color:#15aabf}.excalidraw .library-menu-items-container .library-actions--load{background-color:#228be6}.excalidraw .library-menu-items-container .library-actions--load:hover{background-color:#1c7ed6}.excalidraw .library-menu-items-container .library-actions--load:active{background-color:#1864ab}.excalidraw .library-menu-items-container .library-actions--load svg{color:#fff}.excalidraw .library-menu-items-container__items{flex:1;overflow-y:auto;overflow-x:hidden;margin-bottom:1rem}.excalidraw .library-menu-items-container .separator{width:100%;display:flex;align-items:center;font-weight:500;font-size:.9rem;margin:.6em .2em;color:var(--text-primary-color)}",
""]);h.default=f},5644:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .library-unit{align-items:center;border:1px solid rgba(0,0,0,0);display:flex;justify-content:center;position:relative;width:63px;height:63px}.excalidraw .library-unit--hover{box-shadow:inset 0px 0px 0px 2px #339af0;border-color:#339af0}.excalidraw .library-unit--selected{box-shadow:inset 0px 0px 0px 2px #1971c2;border-color:#1971c2}.excalidraw .library-unit__dragger{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.excalidraw .library-unit__dragger\x3esvg{-webkit-filter:var(--theme-filter);filter:var(--theme-filter);flex-grow:1;max-height:100%;max-width:100%}.excalidraw .library-unit__checkbox-container,.excalidraw .library-unit__checkbox-container:hover,.excalidraw .library-unit__checkbox-container:active{align-items:center;background:none;border:none;color:var(--icon-fill-color);display:flex;justify-content:center;margin:0;padding:.5rem;position:absolute;left:2rem;bottom:2rem;cursor:pointer}.excalidraw .library-unit__checkbox-container input,.excalidraw .library-unit__checkbox-container:hover input,.excalidraw .library-unit__checkbox-container:active input{cursor:pointer}.excalidraw .library-unit__checkbox{position:absolute;left:2.3rem;bottom:2.3rem}.excalidraw .library-unit__checkbox .Checkbox-box{width:13px;height:13px;border-radius:2px;margin:.5em .5em .2em .2em;background-color:#d0ebff}.excalidraw .library-unit__checkbox.Checkbox:hover .Checkbox-box{background-color:#a5d8ff}.excalidraw .library-unit__removeFromLibrary\x3esvg{height:16px;width:16px}.excalidraw .library-unit__adder{-webkit-transform:scale(1);transform:scale(1);-webkit-animation:library-unit__adder-animation 1s ease-in infinite;animation:library-unit__adder-animation 1s ease-in infinite}.excalidraw .library-unit__adder{position:absolute;left:40%;top:40%;width:2rem;height:2rem;margin-left:-10px;margin-top:-10px;pointer-events:none}.excalidraw .library-unit:hover .library-unit__adder{fill:#1c7ed6}.excalidraw .library-unit:active .library-unit__adder{-webkit-animation:none;animation:none;-webkit-transform:scale(0.8);transform:scale(0.8);fill:#000}.excalidraw .library-unit__active{cursor:pointer}@-webkit-keyframes library-unit__adder-animation{0%{-webkit-transform:scale(0.85);transform:scale(0.85)}50%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(0.85);transform:scale(0.85)}}@keyframes library-unit__adder-animation{0%{-webkit-transform:scale(0.85);transform:scale(0.85)}50%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(0.85);transform:scale(0.85)}}",
""]);h.default=f},6843:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw.excalidraw-modal-container{position:absolute;z-index:10}.excalidraw .Modal{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;overflow:auto;padding:calc(var(--space-factor)*10)}.excalidraw .Modal__background{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;background-color:rgba(0,0,0,.7)}.excalidraw .Modal__content{position:relative;z-index:2;width:100%;max-width:var(--max-width);max-height:100%;opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px);-webkit-animation:Modal__content_fade-in .1s ease-out .05s forwards;animation:Modal__content_fade-in .1s ease-out .05s forwards;position:relative;overflow-y:auto;background:var(--island-bg-color);border:1px solid var(--dialog-border-color);box-shadow:0 2px 10px rgba(0,0,0,.25);border-radius:6px;box-sizing:border-box}.excalidraw .Modal__content:focus{outline:none}.excalidraw--mobile.excalidraw .Modal__content{max-width:100%;border:0;border-radius:0}@-webkit-keyframes Modal__content_fade-in{from{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes Modal__content_fade-in{from{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.excalidraw .Modal__close{width:calc(var(--space-factor)*7);height:calc(var(--space-factor)*7);display:flex;align-items:center;justify-content:center}.excalidraw .Modal__close svg{height:calc(var(--space-factor)*5)}.excalidraw--mobile.excalidraw .Modal{padding:0}.excalidraw--mobile.excalidraw .Modal__content{position:absolute;top:0;left:0;right:0;bottom:0}",
""]);h.default=f},8461:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw--mobile.excalidraw .PasteChartDialog .Island{display:flex;flex-direction:column}.excalidraw .PasteChartDialog .container{display:flex;align-items:center;justify-content:space-around;flex-wrap:wrap}.excalidraw--mobile.excalidraw .PasteChartDialog .container{flex-direction:column;justify-content:center}.excalidraw .PasteChartDialog .ChartPreview{margin:8px;text-align:center;width:192px;height:128px;border-radius:2px;padding:1px;border:1px solid #ced4da;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0)}.excalidraw .PasteChartDialog .ChartPreview div{display:inline-block}.excalidraw .PasteChartDialog .ChartPreview svg{max-height:120px;max-width:186px}.excalidraw .PasteChartDialog .ChartPreview:hover{padding:0;border:2px solid #339af0}",
""]);h.default=f},9935:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,".excalidraw .popover{position:absolute;z-index:10}",""]);h.default=f},532:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,".ProjectName{margin:auto;display:flex;align-items:center}.ProjectName .TextInput{height:calc(1rem - 3px);width:200px;overflow:hidden;text-align:center;margin-left:8px;text-overflow:ellipsis}.ProjectName .TextInput--readonly{background:none;border:none;width:auto;max-width:200px;padding-left:2px}.ProjectName .TextInput--readonly:hover{background:none}",
""]);h.default=f},7589:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .publish-library__fields{display:flex;flex-direction:column}.excalidraw .publish-library__fields label{padding:1em;display:flex;justify-content:space-between;align-items:center}.excalidraw .publish-library__fields label span{font-weight:500;font-size:1rem;color:#868e96}.excalidraw .publish-library__fields label input,.excalidraw .publish-library__fields label textarea{width:70%;padding:.6em;font-family:var(--ui-font)}.excalidraw .publish-library__fields label .required{color:#e03131;margin:.2rem}.excalidraw .publish-library__buttons{display:flex;padding:.2rem 0;justify-content:flex-end}.excalidraw .publish-library__buttons .ToolIcon__icon{min-width:2.5rem;width:auto;font-size:1rem}.excalidraw .publish-library__buttons .ToolIcon_type_button{margin-left:1rem;padding:0 .5rem}.excalidraw .publish-library__buttons--confirm.ToolIcon_type_button{background-color:#228be6}.excalidraw .publish-library__buttons--confirm.ToolIcon_type_button:hover{background-color:#1971c2}.excalidraw .publish-library__buttons--cancel.ToolIcon_type_button{background-color:#adb5bd}.excalidraw .publish-library__buttons--cancel.ToolIcon_type_button:hover{background-color:#868e96}.excalidraw .publish-library__buttons .ToolIcon__icon{color:#fff}.excalidraw .publish-library__buttons .ToolIcon__icon .Spinner{--spinner-color: #fff}.excalidraw .publish-library__buttons .ToolIcon__icon .Spinner svg{padding:.5rem}.excalidraw .publish-library .selected-library-items{display:flex;padding:0 .8rem;flex-wrap:wrap}.excalidraw .publish-library .selected-library-items .single-library-item-wrapper{width:9rem}.excalidraw .publish-library-warning{color:#fa5252}.excalidraw .publish-library-note{padding:1em;font-style:italic;font-size:14px;display:block}",
""]);h.default=f},5741:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .layer-ui__sidebar-lock-button{margin-right:.2rem}.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_radio+.ToolIcon__icon:active,.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_checkbox+.ToolIcon__icon:active{background:var(--color-primary-light)}.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_checkbox:checked+.ToolIcon__icon{background:var(--color-primary);--icon-fill-color: #ffffff;--keybinding-color: #ffffff}.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_radio:checked+.ToolIcon__icon:active,.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_checkbox:checked+.ToolIcon__icon:active{background:var(--color-primary-darker)}.excalidraw .layer-ui__sidebar-lock-button .ToolIcon__keybinding{bottom:4px;right:4px}.excalidraw .ToolIcon_type_floating .side_lock_icon{width:calc(var(--space-factor)*7);height:calc(var(--space-factor)*7)}.excalidraw .ToolIcon_type_floating .side_lock_icon svg{-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.excalidraw .ToolIcon_type_checkbox:not(.ToolIcon_toggle_opaque):checked+.side_lock_icon{background-color:var(--color-primary)}",
""]);h.default=f},8465:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .single-library-item{position:relative}.excalidraw .single-library-item-status{position:absolute;top:.3rem;left:.3rem;font-size:.7rem;color:#f03e3e;background:rgba(255,255,255,.9);padding:.1rem .2rem;border-radius:.2rem}.excalidraw .single-library-item__svg{background-color:#fff;padding:.3rem;width:7.5rem;height:7.5rem;border:1px solid var(--button-gray-2)}.excalidraw .single-library-item__svg svg{width:100%;height:100%}.excalidraw .single-library-item .ToolIcon__icon{background-color:#fff;width:auto;height:auto;margin:0 .5rem}.excalidraw .single-library-item .ToolIcon,.excalidraw .single-library-item .ToolIcon_type_button:hover{background-color:#fff}.excalidraw .single-library-item .required,.excalidraw .single-library-item .error{color:#e03131;font-weight:bold;font-size:1rem;margin:.2rem}.excalidraw .single-library-item .error{font-weight:500;margin:0;padding:.3em 0}.excalidraw .single-library-item--remove{position:absolute;top:.2rem;right:1rem}.excalidraw .single-library-item--remove .ToolIcon__icon{margin:0}.excalidraw .single-library-item--remove .ToolIcon__icon{background-color:#fa5252}.excalidraw .single-library-item--remove .ToolIcon__icon:hover{background-color:#f03e3e}.excalidraw .single-library-item--remove .ToolIcon__icon:active{background-color:#e03131}.excalidraw .single-library-item--remove svg{color:#fff;padding:.26rem;border-radius:.3em;width:1rem;height:1rem}",
""]);h.default=f},5892:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,".excalidraw .Spinner{display:flex;align-items:center;justify-content:center;height:100%;margin-left:auto;margin-right:auto;--spinner-color: var(--icon-fill-color)}.excalidraw .Spinner svg{-webkit-animation:rotate 1.6s linear infinite;animation:rotate 1.6s linear infinite;-webkit-transform-origin:center center;transform-origin:center center}.excalidraw .Spinner circle{stroke:var(--spinner-color);-webkit-animation:dash 1.6s linear 0s infinite;animation:dash 1.6s linear 0s infinite;stroke-linecap:round}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1,300;stroke-dashoffset:0}50%{stroke-dasharray:150,300;stroke-dashoffset:-200}100%{stroke-dasharray:1,300;stroke-dashoffset:-280}}@keyframes dash{0%{stroke-dasharray:1,300;stroke-dashoffset:0}50%{stroke-dasharray:150,300;stroke-dashoffset:-200}100%{stroke-dasharray:1,300;stroke-dashoffset:-280}}",
""]);h.default=f},3874:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,".excalidraw .Stack{--gap: 0;display:grid;gap:calc(var(--space-factor)*var(--gap))}.excalidraw .Stack_vertical{grid-template-columns:auto;grid-auto-flow:row;grid-auto-rows:-webkit-min-content;grid-auto-rows:min-content}.excalidraw .Stack_horizontal{grid-template-rows:auto;grid-auto-flow:column;grid-auto-columns:-webkit-min-content;grid-auto-columns:min-content}",""]);h.default=f},2681:function(k,
h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Stats{position:absolute;top:64px;right:12px;font-size:12px;z-index:10;pointer-events:all}.excalidraw .Stats h3{margin:0 24px 8px 0;white-space:nowrap}.excalidraw .Stats .close{float:right;height:16px;width:16px;cursor:pointer}.excalidraw .Stats .close svg{width:100%;height:100%}.excalidraw .Stats table{width:100%}.excalidraw .Stats table th{border-bottom:1px solid var(--input-border-color);padding:4px}.excalidraw .Stats table tr td:nth-child(2){min-width:24px;text-align:right}:root[dir\x3drtl] .excalidraw .Stats{left:12px;right:initial}:root[dir\x3drtl] .excalidraw .Stats h3{margin:0 0 8px 24px}:root[dir\x3drtl] .excalidraw .Stats .close{float:left}",
""]);h.default=f},6759:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .TextInput{display:inline-block}",""]);h.default=f},9650:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Toast{-webkit-animation:fade-in .5s;animation:fade-in .5s;background-color:var(--button-gray-1);border-radius:4px;bottom:10px;box-sizing:border-box;cursor:default;left:50%;margin-left:-150px;padding:4px 0;position:absolute;text-align:center;width:300px;z-index:999999}.excalidraw .Toast .Toast__message{padding:0 1.6rem;color:var(--popup-text-color);white-space:pre-wrap}.excalidraw .Toast .close{position:absolute;top:0;right:0;padding:.4rem}.excalidraw .Toast .close .ToolIcon__icon{width:1.2rem;height:1.2rem}@-webkit-keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes fade-in{from{opacity:0}to{opacity:1}}",
""]);h.default=f},2044:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ToolIcon{display:inline-flex;align-items:center;position:relative;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;user-select:none}.excalidraw .ToolIcon--plain{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon--plain .ToolIcon__icon{width:2rem;height:2rem}.excalidraw .ToolIcon_type_radio+.ToolIcon__icon,.excalidraw .ToolIcon_type_checkbox+.ToolIcon__icon{background-color:var(--button-gray-1)}.excalidraw .ToolIcon_type_radio+.ToolIcon__icon:hover,.excalidraw .ToolIcon_type_checkbox+.ToolIcon__icon:hover{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_radio+.ToolIcon__icon:active,.excalidraw .ToolIcon_type_checkbox+.ToolIcon__icon:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon__icon{width:2.5rem;height:2.5rem;color:var(--icon-fill-color);display:flex;justify-content:center;align-items:center;border-radius:var(--border-radius-lg)}.excalidraw .ToolIcon__icon+.ToolIcon__label{-webkit-margin-start:0;margin-inline-start:0}.excalidraw .ToolIcon__icon svg{position:relative;height:1em;fill:var(--icon-fill-color);color:var(--icon-fill-color)}.excalidraw .ToolIcon__label{display:flex;align-items:center;color:var(--icon-fill-color);font-family:var(--ui-font);margin:0 .8em;text-overflow:ellipsis}.excalidraw .ToolIcon__label .Spinner{margin-left:.6em}.excalidraw .ToolIcon_size_small .ToolIcon__icon{width:2rem;height:2rem;font-size:.8em}.excalidraw .excalidraw .ToolIcon_type_button,.excalidraw .Modal .ToolIcon_type_button,.excalidraw .ToolIcon_type_button{padding:0;border:none;margin:0;font-size:inherit}.excalidraw .excalidraw .ToolIcon_type_button:focus-visible,.excalidraw .Modal .ToolIcon_type_button:focus-visible,.excalidraw .ToolIcon_type_button:focus-visible{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .excalidraw .ToolIcon_type_button.ToolIcon--selected,.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected,.excalidraw .ToolIcon_type_button.ToolIcon--selected{background-color:var(--button-gray-2)}.excalidraw .excalidraw .ToolIcon_type_button.ToolIcon--selected:active,.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected:active,.excalidraw .ToolIcon_type_button.ToolIcon--selected:active{background-color:var(--button-gray-3)}.excalidraw .excalidraw .ToolIcon_type_button:hover,.excalidraw .Modal .ToolIcon_type_button:hover,.excalidraw .ToolIcon_type_button:hover{background-color:var(--button-gray-2)}.excalidraw .excalidraw .ToolIcon_type_button:active,.excalidraw .Modal .ToolIcon_type_button:active,.excalidraw .ToolIcon_type_button:active{background-color:var(--button-gray-3)}.excalidraw .excalidraw .ToolIcon_type_button--show,.excalidraw .Modal .ToolIcon_type_button--show,.excalidraw .ToolIcon_type_button--show{visibility:visible}.excalidraw .excalidraw .ToolIcon_type_button--hide,.excalidraw .Modal .ToolIcon_type_button--hide,.excalidraw .ToolIcon_type_button--hide{visibility:hidden}.excalidraw .ToolIcon_type_radio,.excalidraw .ToolIcon_type_checkbox{position:absolute;opacity:0;pointer-events:none}.excalidraw .ToolIcon_type_radio:not(.ToolIcon_toggle_opaque):checked+.ToolIcon__icon,.excalidraw .ToolIcon_type_checkbox:not(.ToolIcon_toggle_opaque):checked+.ToolIcon__icon{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_radio:not(.ToolIcon_toggle_opaque):checked+.ToolIcon__icon:active,.excalidraw .ToolIcon_type_checkbox:not(.ToolIcon_toggle_opaque):checked+.ToolIcon__icon:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon_type_radio:focus-visible+.ToolIcon__icon,.excalidraw .ToolIcon_type_checkbox:focus-visible+.ToolIcon__icon{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .ToolIcon_type_radio:active+.ToolIcon__icon,.excalidraw .ToolIcon_type_checkbox:active+.ToolIcon__icon{background-color:var(--button-gray-3)}.excalidraw .ToolIcon_type_floating{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating:hover{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating:active{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating .ToolIcon__icon{background-color:var(--button-gray-1);width:2rem;height:2rem}.excalidraw .ToolIcon_type_floating .ToolIcon__icon:hover{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_floating .ToolIcon__icon:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon__keybinding{position:absolute;bottom:2px;right:3px;font-size:.5em;color:var(--keybinding-color);font-family:var(--ui-font);-webkit-user-select:none;user-select:none}@media(max-width: 425px){.excalidraw .Shape .ToolIcon__icon{width:2rem;height:2rem}.excalidraw .Shape .ToolIcon__icon svg{height:.8em}}@media(max-width: 760px){.excalidraw .ToolIcon.ToolIcon_type_floating{display:inline-block;position:absolute;right:-8px;margin-left:0;border-radius:20px 0 0 20px;z-index:1;background-color:var(--button-gray-1)}.excalidraw .ToolIcon.ToolIcon_type_floating:hover{background-color:var(--button-gray-1)}.excalidraw .ToolIcon.ToolIcon_type_floating:active{background-color:var(--button-gray-2)}.excalidraw .ToolIcon.ToolIcon_type_floating .ToolIcon__icon{border-radius:inherit}.excalidraw .ToolIcon.ToolIcon_type_floating svg{position:static}.excalidraw .ToolIcon.ToolIcon__library{top:100px}.excalidraw .ToolIcon.ToolIcon__lock{-webkit-margin-end:0;margin-inline-end:0;top:60px}.excalidraw .ToolIcon.ToolIcon__penMode{-webkit-margin-end:0;margin-inline-end:0;top:140px}}:root[dir\x3dltr] .excalidraw .unlocked-icon{left:2px}:root[dir\x3drtl] .excalidraw .unlocked-icon{right:2px}",
""]);h.default=f},9144:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_radio+.ToolIcon__icon:active,.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_checkbox+.ToolIcon__icon:active{background:var(--color-primary-light)}.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_checkbox:checked+.ToolIcon__icon{background:var(--color-primary);--icon-fill-color: #ffffff;--keybinding-color: #ffffff}.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_radio:checked+.ToolIcon__icon:active,.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_checkbox:checked+.ToolIcon__icon:active{background:var(--color-primary-darker)}.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon__keybinding{bottom:4px;right:4px}.excalidraw .App-toolbar-container .ToolIcon_type_floating:not(.is-mobile) .ToolIcon__icon{padding:1px;background-color:var(--island-bg-color);box-shadow:1px 3px 4px 0px rgba(0,0,0,.15);border-radius:50%;transition:box-shadow .5s ease,-webkit-transform .5s ease;transition:box-shadow .5s ease,transform .5s ease;transition:box-shadow .5s ease,transform .5s ease,-webkit-transform .5s ease}.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_radio:focus-within+.ToolIcon__icon,.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_checkbox:focus-within+.ToolIcon__icon{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .App-toolbar-container .ToolIcon__hidden{box-shadow:none !important;background-color:rgba(0,0,0,0) !important;pointer-events:none !important}.excalidraw .App-toolbar-container .ToolIcon.ToolIcon__lock{-webkit-margin-end:var(--space-factor);margin-inline-end:var(--space-factor)}.excalidraw .App-toolbar-container .ToolIcon.ToolIcon__lock.ToolIcon_type_floating{margin-left:.1rem}.excalidraw .App-toolbar-container .ToolIcon__library{-webkit-margin-start:var(--space-factor);margin-inline-start:var(--space-factor)}.excalidraw .App-toolbar-container.zen-mode .ToolIcon_type_floating .ToolIcon__icon{box-shadow:none;-webkit-transform:scale(0.9);transform:scale(0.9)}.excalidraw .App-toolbar-container.zen-mode .ToolIcon_type_floating .ToolIcon_type_checkbox:not(:checked):not(:hover):not(:active)+.ToolIcon__icon svg{fill:#adb5bd;color:#adb5bd}.excalidraw .App-toolbar{border-radius:var(--border-radius-lg);box-shadow:0 0 0 1px rgba(0,0,0,.01),1px 1px 5px rgba(0,0,0,.15)}.excalidraw .App-toolbar .ToolIcon:hover{--icon-fill-color: var( --color-primary-contrast-offset, var(--color-primary) );--keybinding-color: var( --color-primary-contrast-offset, var(--color-primary) )}.excalidraw .App-toolbar .ToolIcon:active{--icon-fill-color: #212529;--keybinding-color: #212529}.excalidraw .App-toolbar .ToolIcon .ToolIcon__icon{background:rgba(0,0,0,0);border-radius:var(--border-radius-lg)}.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_radio+.ToolIcon__icon:active,.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_checkbox+.ToolIcon__icon:active{background:var(--color-primary-light)}.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon{background:var(--color-primary);--icon-fill-color: #ffffff;--keybinding-color: #ffffff}.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon:active,.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon:active{background:var(--color-primary-darker)}.excalidraw .App-toolbar .ToolIcon .ToolIcon__keybinding{bottom:4px;right:4px}.excalidraw .App-toolbar.zen-mode .ToolIcon__keybinding,.excalidraw .App-toolbar.zen-mode .HintViewer{display:none}.excalidraw.theme--dark .App-toolbar .ToolIcon:active{--icon-fill-color: #dee2e6;--keybinding-color: #dee2e6}",
""]);h.default=f},6626:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw-tooltip{position:fixed;z-index:1000;padding:8px;border-radius:6px;box-sizing:border-box;pointer-events:none;word-wrap:break-word;background:#000;line-height:1.5;text-align:center;font-size:13px;font-weight:500;color:#fff;display:none}.excalidraw-tooltip.excalidraw-tooltip--visible{display:block}.excalidraw-tooltip-wrapper{display:flex}.excalidraw-tooltip-icon{width:.9em;height:.9em;margin-left:5px;margin-top:1px;display:flex}.excalidraw--mobile.excalidraw-tooltip-icon{display:none}",
""]);h.default=f},6359:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,".excalidraw .UserList{pointer-events:none;padding:var(--space-factor) var(--space-factor) var(--space-factor) var(--space-factor);display:flex;flex-wrap:wrap;justify-content:flex-end}.excalidraw .UserList:empty{display:none}.excalidraw .UserList\x3e*{pointer-events:all;margin:0 0 var(--space-factor) var(--space-factor)}.excalidraw .UserList_mobile{padding:0;justify-content:normal}.excalidraw .UserList_mobile\x3e*{margin:0 var(--space-factor) var(--space-factor) 0}",
""]);h.default=f},9915:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,".visually-hidden{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);white-space:nowrap;-webkit-user-select:none;user-select:none}.LoadingMessage{position:absolute;top:0;right:0;bottom:0;left:0;z-index:999;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}.LoadingMessage .Spinner{font-size:2.8em}.LoadingMessage .LoadingMessage-text{margin-top:1em;font-size:.8em}",
""]);h.default=f},9310:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645),J=f.n(x);x=f(1667);x=f.n(x);var z=new URL(f(7984),f.b);f=new URL(f(1639),f.b);w=J()(w());J=x()(z);f=x()(f);w.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}:export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--theme-filter: none;--button-destructive-bg-color: #ffe3e3;--button-destructive-color: #c92a2a;--button-gray-1: #e9ecef;--button-gray-2: #ced4da;--button-gray-3: #adb5bd;--button-special-active-bg-color: #ebfbee;--dialog-border-color: #868e96;--dropdown-icon: url("+
J+");--focus-highlight-color: #a5d8ff;--icon-fill-color: #212529;--icon-green-fill-color: #2b8a3e;--default-bg-color: #ffffff;--input-bg-color: #ffffff;--input-border-color: #ced4da;--input-hover-bg-color: #f1f3f5;--input-label-color: #495057;--island-bg-color: rgba(255, 255, 255, 0.96);--keybinding-color: #adb5bd;--link-color: #1c7ed6;--overlay-bg-color: rgba(255, 255, 255, 0.88);--popup-bg-color: #ffffff;--popup-secondary-bg-color: #f1f3f5;--popup-text-color: #000000;--popup-text-inverted-color: #ffffff;--sab: env(safe-area-inset-bottom);--sal: env(safe-area-inset-left);--sar: env(safe-area-inset-right);--sat: env(safe-area-inset-top);--select-highlight-color: #339af0;--shadow-island: 0 0 0 1px rgba(0, 0, 0, 0.01), 1px 1px 5px rgb(0 0 0 / 12%);--space-factor: 0.25rem;--text-primary-color: #343a40;--color-primary: #6965db;--color-primary-darker: #5b57d1;--color-primary-darkest: #4a47b1;--color-primary-light: #e2e1fc;--border-radius-md: 0.375rem;--border-radius-lg: 0.5rem}.excalidraw.theme--dark{background:#000}.excalidraw.theme--dark.theme--dark-background-none{background:none}.excalidraw.theme--dark{--theme-filter: invert(93%) hue-rotate(180deg);--button-destructive-bg-color: #5a0000;--button-destructive-color: #ffa8a8;--button-gray-1: #363636;--button-gray-2: #272727;--button-gray-3: #222;--button-special-active-bg-color: #204624;--dialog-border-color: #212529;--dropdown-icon: url("+
f+');--focus-highlight-color: #228be6;--icon-fill-color: #ced4da;--icon-green-fill-color: #69db7c;--default-bg-color: #121212;--input-bg-color: #121212;--input-border-color: #2e2e2e;--input-hover-bg-color: #181818;--input-label-color: #e9ecef;--island-bg-color: rgba(30, 30, 30, 0.98);--keybinding-color: #868e96;--link-color: #4dabf7;--overlay-bg-color: rgba(52, 58, 64, 0.12);--popup-bg-color: #2c2c2c;--popup-secondary-bg-color: #222;--popup-text-color: #ced4da;--popup-text-inverted-color: #2c2c2c;--select-highlight-color: #4dabf7;--shadow-island: 1px 1px 5px rgba(0, 0, 0, 0.3);--text-primary-color: #ced4da;--color-primary: #5650f0;--color-primary-darker: #4b46d8;--color-primary-darkest: #3e39be;--color-primary-light: #3f3d64}:root{--zIndex-canvas: 1;--zIndex-wysiwyg: 2;--zIndex-layerUI: 3}.excalidraw{position:relative;overflow:hidden;color:var(--text-primary-color);display:flex;top:0;bottom:0;left:0;right:0;height:100%;width:100%;-webkit-user-select:none;user-select:none}.excalidraw:focus{outline:none}.excalidraw a{font-weight:500;text-decoration:none;color:var(--link-color)}.excalidraw a:hover{text-decoration:underline}.excalidraw canvas{touch-action:none;image-rendering:pixelated;image-rendering:-moz-crisp-edges;z-index:var(--zIndex-canvas)}.excalidraw__canvas{position:absolute}.excalidraw.theme--dark canvas{-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .FixedSideContainer{padding-top:var(--sat, 0);padding-right:var(--sar, 0);padding-bottom:var(--sab, 0);padding-left:var(--sal, 0)}.excalidraw .panelRow{display:flex;justify-content:space-between}.excalidraw .panelColumn{display:flex;flex-direction:column}.excalidraw .panelColumn h3,.excalidraw .panelColumn legend,.excalidraw .panelColumn .control-label{margin-top:.333rem;margin-bottom:.333rem;font-size:.75rem;color:var(--text-primary-color);font-weight:bold;display:block}.excalidraw .panelColumn .control-label input{display:block;width:100%}.excalidraw .panelColumn h3:first-child,.excalidraw .panelColumn legend:first-child,.excalidraw .panelColumn .control-label:first-child{margin-top:0}.excalidraw .panelColumn legend{padding:0}.excalidraw .panelColumn .iconSelectList{flex-wrap:wrap;position:relative}.excalidraw .panelColumn .buttonList{flex-wrap:wrap}.excalidraw .panelColumn .buttonList label{margin-right:.25rem;font-size:.75rem;display:inline-block}.excalidraw .panelColumn .buttonList input[type\x3dradio],.excalidraw .panelColumn .buttonList input[type\x3dbutton]{opacity:0;position:absolute;pointer-events:none}.excalidraw .panelColumn .buttonList .iconRow{margin-top:8px}.excalidraw .panelColumn .buttonList .ToolIcon{margin:0;-webkit-margin-end:8px;margin-inline-end:8px}.excalidraw .panelColumn .buttonList .ToolIcon:focus{outline:rgba(0,0,0,0);box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .panelColumn .buttonList .ToolIcon:hover{background-color:var(--button-gray-2)}.excalidraw .panelColumn .buttonList .ToolIcon:active{background-color:var(--button-gray-3)}.excalidraw .panelColumn .buttonList .ToolIcon:disabled{cursor:not-allowed}.excalidraw .panelColumn .buttonList .ToolIcon__icon{width:28px;height:28px}.excalidraw .panelColumn fieldset{margin:0;margin-top:.333rem;padding:0;border:none}.excalidraw .divider{width:1px;background-color:#e9ecef;margin:1px}.excalidraw .buttonList label:focus-within,.excalidraw input:focus-visible{outline:rgba(0,0,0,0);box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw button,.excalidraw .buttonList label{-webkit-user-select:none;user-select:none;background-color:var(--button-gray-1);border:0;border-radius:var(--border-radius-md);margin:.125rem 0;padding:.25rem;white-space:nowrap;cursor:pointer}.excalidraw button:focus-visible,.excalidraw .buttonList label:focus-visible{outline:rgba(0,0,0,0);box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw button:hover,.excalidraw .buttonList label:hover{background-color:var(--button-gray-2)}.excalidraw button:active,.excalidraw .buttonList label:active{background-color:var(--button-gray-3)}.excalidraw button:disabled,.excalidraw .buttonList label:disabled{cursor:not-allowed}.excalidraw .active,.excalidraw .buttonList label.active{background-color:var(--color-primary);--icon-fill-color: #ffffff}.excalidraw .active:hover,.excalidraw .buttonList label.active:hover{background-color:var(--color-primary-darker)}.excalidraw .active:active,.excalidraw .buttonList label.active:active{background-color:var(--color-primary-darkest)}.excalidraw .buttonList.buttonListIcon label{display:inline-flex;justify-content:center;align-items:center}.excalidraw .buttonList.buttonListIcon label svg{width:35px;height:14px;padding:2px;opacity:.6}.excalidraw .buttonList.buttonListIcon label.active svg{opacity:1}.excalidraw .App-top-bar{z-index:var(--zIndex-layerUI);display:flex;flex-direction:column;align-items:center}.excalidraw .App-bottom-bar{position:absolute;top:0;bottom:0;left:0;right:0;--bar-padding: calc(4 * var(--space-factor));padding-top:max(var(--bar-padding), var(--sat,0));padding-right:var(--sar, 0);padding-bottom:var(--sab, 0);padding-left:var(--sal, 0);z-index:4;display:flex;align-items:flex-end;pointer-events:none}.excalidraw .App-bottom-bar\x3e.Island{width:100%;max-width:100%;min-width:100%;box-sizing:border-box;max-height:100%;display:flex;flex-direction:column;pointer-events:initial}.excalidraw .App-bottom-bar\x3e.Island .panelColumn{padding:8px 8px 0 8px}.excalidraw .App-toolbar{width:100%;box-sizing:border-box}.excalidraw .App-toolbar .eraser.ToolIcon:hover{--icon-fill-color: #fff;--keybinding-color: #fff}.excalidraw .App-toolbar .eraser.active{background-color:var(--color-primary)}.excalidraw .App-toolbar-content{display:flex;align-items:center;justify-content:space-between;padding:8px}.excalidraw .App-mobile-menu{width:100%;overflow-x:visible;overflow-y:auto;box-sizing:border-box;margin-bottom:var(--bar-padding)}.excalidraw .App-menu{display:grid;color:var(--icon-fill-color)}.excalidraw .App-menu_top{grid-template-columns:auto -webkit-max-content auto;grid-template-columns:auto max-content auto;grid-gap:4px;align-items:flex-start;cursor:default;pointer-events:none !important}.excalidraw .layer-ui__wrapper:not(.disable-pointerEvents) .App-menu_top\x3e*{pointer-events:all}.excalidraw .App-menu_top\x3e*:first-child{justify-self:flex-start}.excalidraw .App-menu_top\x3e*:last-child{justify-self:flex-end}.excalidraw .App-menu_bottom{position:absolute;bottom:0;grid-template-columns:-webkit-min-content auto -webkit-min-content;grid-template-columns:min-content auto min-content;grid-gap:15px;align-items:flex-start;cursor:default;pointer-events:none !important}:root[dir\x3dltr] .excalidraw .App-menu_bottom{left:.25rem}:root[dir\x3drtl] .excalidraw .App-menu_bottom{right:.25rem}.excalidraw .App-menu_bottom--transition-left section{width:185px}.excalidraw .App-menu_bottom section{display:flex}.excalidraw .App-menu_bottom\x3e*:first-child{justify-self:flex-start}.excalidraw .App-menu_bottom\x3e*:last-child{justify-self:flex-end}.excalidraw .App-menu_left{grid-template-rows:1fr auto 1fr;height:100%}.excalidraw .App-menu_right{grid-template-rows:1fr;height:100%}.excalidraw .App-menu__left{overflow-y:auto;box-shadow:var(--shadow-island)}.excalidraw .dropdown-select{height:1.5rem;padding:0;-webkit-padding-start:.5rem;padding-inline-start:.5rem;-webkit-padding-end:1.5rem;padding-inline-end:1.5rem;color:var(--icon-fill-color);background-color:var(--button-gray-1);border-radius:var(--space-factor);border:1px solid var(--button-gray-2);font-size:.8rem;outline:none;-webkit-appearance:none;appearance:none;background-image:var(--dropdown-icon);background-repeat:no-repeat;background-position:right .7rem top 50%,0 0;background-size:.65em auto,100%}:root[dir\x3drtl] .excalidraw .dropdown-select{background-position:left .7rem top 50%,0 0}.excalidraw .dropdown-select:focus{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .dropdown-select:hover{background-color:var(--button-gray-2)}.excalidraw .dropdown-select:active{background-color:var(--button-gray-2)}.excalidraw .zIndexButton{margin:0;-webkit-margin-end:8px;margin-inline-end:8px;padding:5px;display:inline-flex;align-items:center;justify-content:center}.excalidraw .zIndexButton svg{width:18px;height:18px}.excalidraw .scroll-back-to-content{color:var(--popup-text-color);position:absolute;left:50%;bottom:30px;-webkit-transform:translateX(-50%);transform:translateX(-50%);padding:10px 20px;pointer-events:all}.excalidraw .help-icon{display:flex;cursor:pointer;fill:#868e96;padding:0;margin:0;background:none;color:var(--icon-fill-color)}.excalidraw .help-icon svg{width:1.5rem;height:1.5rem}.excalidraw .help-icon:hover{background:none}.excalidraw .reset-zoom-button{padding:.2em;background:rgba(0,0,0,0);color:var(--text-primary-color);font-family:var(--ui-font)}.excalidraw .finalize-button{display:grid;grid-auto-flow:column;gap:.4em;margin-top:auto;margin-bottom:auto;-webkit-margin-start:.6em;margin-inline-start:.6em}.excalidraw .undo-redo-buttons,.excalidraw .eraser-buttons{display:grid;grid-auto-flow:column;gap:.4em;margin-top:auto;margin-bottom:auto;-webkit-margin-start:.6em;margin-inline-start:.6em}.excalidraw--mobile.excalidraw aside{display:none}.excalidraw--mobile.excalidraw .scroll-back-to-content{bottom:calc(80px + var(--sab, 0));z-index:-1}:root[dir\x3drtl] .excalidraw .rtl-mirror{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.excalidraw .zen-mode-visibility{visibility:visible;opacity:1;height:auto;width:auto;transition:opacity .5s}.excalidraw .zen-mode-visibility.zen-mode-visibility--hidden{visibility:hidden;opacity:0;height:0;width:0;transition:opacity .5s}.excalidraw .disable-pointerEvents{pointer-events:none !important}.excalidraw.excalidraw--view-mode .App-menu{display:flex;justify-content:space-between}.excalidraw input[type\x3dtext],.excalidraw textarea:not(.excalidraw-wysiwyg){color:var(--text-primary-color);border:1.5px solid var(--input-border-color);padding:.75rem;white-space:nowrap;border-radius:var(--space-factor);background-color:var(--input-bg-color)}.excalidraw input[type\x3dtext]:not(:focus):hover,.excalidraw textarea:not(.excalidraw-wysiwyg):not(:focus):hover{background-color:var(--input-hover-bg-color)}.excalidraw input[type\x3dtext]:focus,.excalidraw textarea:not(.excalidraw-wysiwyg):focus{outline:none;box-shadow:0 0 0 2px var(--focus-highlight-color)}@media print{.excalidraw .App-bottom-bar,.excalidraw .FixedSideContainer,.excalidraw .layer-ui__wrapper{display:none}}.excalidraw ::-webkit-scrollbar{width:5px}.excalidraw ::-webkit-scrollbar-thumb{background:var(--button-gray-2);border-radius:10px}.excalidraw ::-webkit-scrollbar-thumb:hover{background:var(--button-gray-3)}.excalidraw ::-webkit-scrollbar-thumb:active{background:var(--button-gray-2)}.ErrorSplash.excalidraw{min-height:100vh;padding:20px 0;overflow:auto;display:flex;align-items:center;justify-content:center;-webkit-user-select:text;user-select:text}.ErrorSplash.excalidraw .ErrorSplash-messageContainer{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;background-color:#ffe3e3;border:3px solid #c92a2a}.ErrorSplash.excalidraw .ErrorSplash-paragraph{margin:15px 0;max-width:600px}.ErrorSplash.excalidraw .ErrorSplash-paragraph.align-center{text-align:center}.ErrorSplash.excalidraw .bigger,.ErrorSplash.excalidraw .bigger button{font-size:1.1em}.ErrorSplash.excalidraw .smaller,.ErrorSplash.excalidraw .smaller button{font-size:.9em}.ErrorSplash.excalidraw .ErrorSplash-details{display:flex;flex-direction:column;align-items:flex-start}.ErrorSplash.excalidraw .ErrorSplash-details textarea{width:100%;margin:10px 0;font-family:"Cascadia";font-size:.8em}',
""]);h.default=w},6464:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,"",""]);f.locals={themeFilter:"invert(93%) hue-rotate(180deg)",rightSidebarWidth:"302px"};h.default=f},5260:function(k,h,f){f.r(h);var w=f(8081);w=f.n(w);var x=f(3645);f=f.n(x)()(w());f.push([k.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw-hyperlinkContainer{display:flex;align-items:center;justify-content:space-between;position:absolute;box-shadow:0px 2px 4px 0 rgba(0,0,0,.3);z-index:100;background:var(--island-bg-color);border-radius:var(--border-radius-md);box-sizing:border-box;min-height:42px}.excalidraw-hyperlinkContainer-input,.excalidraw-hyperlinkContainer button{z-index:100}.excalidraw-hyperlinkContainer-input,.excalidraw-hyperlinkContainer-link{height:24px;padding:0 8px;line-height:24px;font-size:.9rem;font-weight:500;font-family:var(--ui-font)}.excalidraw-hyperlinkContainer-input{width:18rem;border:none;background-color:rgba(0,0,0,0);color:var(--text-primary-color);outline:none;border:none;box-shadow:none !important}.excalidraw-hyperlinkContainer-link{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:15rem}.excalidraw-hyperlinkContainer button{color:#228be6;background-color:rgba(0,0,0,0) !important;font-weight:500}.excalidraw-hyperlinkContainer button.excalidraw-hyperlinkContainer--remove{color:#c92a2a}.excalidraw-hyperlinkContainer .d-none{display:none}.excalidraw-hyperlinkContainer--remove .ToolIcon__icon svg{color:#fa5252}.excalidraw-hyperlinkContainer .ToolIcon__icon{width:2rem;height:2rem}.excalidraw-hyperlinkContainer__buttons{flex:0 0 auto}",
""]);h.default=f},3645:function(k){k.exports=function(h){var f=[];return f.toString=function(){return this.map(function(w){var x="",J=void 0!==w[5];return w[4]&&(x+="@supports (".concat(w[4],") {")),w[2]&&(x+="@media ".concat(w[2]," {")),J&&(x+="@layer".concat(0<w[5].length?" ".concat(w[5]):""," {")),x+=h(w),J&&(x+="}"),w[2]&&(x+="}"),w[4]&&(x+="}"),x}).join("")},f.i=function(w,x,J,z,u){"string"==typeof w&&(w=[[null,w,void 0]]);var t={};if(J)for(var n=0;n<this.length;n++){var R=this[n][0];null!=R&&
(t[R]=!0)}for(n=0;n<w.length;n++)R=[].concat(w[n]),J&&t[R[0]]||(void 0!==u&&(void 0===R[5]||(R[1]="@layer".concat(0<R[5].length?" ".concat(R[5]):""," {").concat(R[1],"}")),R[5]=u),x&&(R[2]?(R[1]="@media ".concat(R[2]," {").concat(R[1],"}"),R[2]=x):R[2]=x),z&&(R[4]?(R[1]="@supports (".concat(R[4],") {").concat(R[1],"}"),R[4]=z):R[4]="".concat(z)),f.push(R))},f}},1667:function(k){k.exports=function(h,f){return f||={},h?(h=String(h.__esModule?h.default:h),/^['"].*['"]$/.test(h)&&(h=h.slice(1,-1)),f.hash&&
(h+=f.hash),/["'() \t\n]|(%20)/.test(h)||f.needQuotes?'"'.concat(h.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):h):h}},8081:function(k){k.exports=function(h){return h[1]}},828:function(k,h,f){function w(za,ya){var Ha=Object.keys(za);if(Object.getOwnPropertySymbols){var Ua=Object.getOwnPropertySymbols(za);ya&&(Ua=Ua.filter(function(Ea){return Object.getOwnPropertyDescriptor(za,Ea).enumerable}));Ha.push.apply(Ha,Ua)}return Ha}function x(za){for(var ya=1;ya<arguments.length;ya++){var Ha=null!=arguments[ya]?
arguments[ya]:{};ya%2?w(Object(Ha),!0).forEach(function(Ua){(0,z.Z)(za,Ua,Ha[Ua])}):Object.getOwnPropertyDescriptors?Object.defineProperties(za,Object.getOwnPropertyDescriptors(Ha)):w(Object(Ha)).forEach(function(Ua){Object.defineProperty(za,Ua,Object.getOwnPropertyDescriptor(Ha,Ua))})}return za}f.d(h,{Lo:function(){return Z},CZ:function(){return ea}});var J=f(2577),z=f(7169),u=f(5564),t=f(3646),n=f(1319),R=f(4041),ka=f(8288),L=f(5118),ma=f(8211),Y=f(6066),fa=f(75),H=f(2264),aa=f(746),M=f(6340);k=
f(7901);var Q=f(9910),D=f(1935),O=f(8897),P=f(9787),ba=f(9660),X=f(4981),F=f(4512),ha=function(za){var ya=za.onConfirm;za=(0,P.useState)(!1);za=(0,J.Z)(za,2);var Ha=za[0],Ua=za[1],Ea=function(){Ua(!Ha)};return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(n.V,{type:"button",icon:t._I,title:(0,ma.t)("buttons.clearReset"),"aria-label":(0,ma.t)("buttons.clearReset"),showAriaLabel:(0,ba.Fy)().isMobile,onClick:Ea,"data-testid":"clear-canvas-button"}),Ha&&(0,F.jsx)(X.Z,{onConfirm:function(){ya();Ea()},onCancel:Ea,
title:(0,ma.t)("clearCanvasDialog.title"),children:(0,F.jsxs)("p",{className:"clear-canvas__content",children:[" ",(0,ma.t)("alerts.clearReset")]})})]})},K=f(45);(0,k.z)({name:"changeViewBackgroundColor",trackEvent:!1,perform:function(za,ya,Ha){return{appState:x(x({},ya),Ha),commitToHistory:!!Ha.viewBackgroundColor}},PanelComponent:function(za){var ya=za.elements,Ha=za.appState,Ua=za.updateData;return(0,F.jsx)("div",{style:{position:"relative"},children:(0,F.jsx)(u.z,{label:(0,ma.t)("labels.canvasBackground"),
type:"canvasBackground",color:Ha.viewBackgroundColor,onChange:function(Ea){return Ua({viewBackgroundColor:Ea})},isActive:"canvasColorPicker"===Ha.openPopup,setActive:function(Ea){return Ua({openPopup:Ea?"canvasColorPicker":null})},"data-testid":"canvas-background-picker",elements:ya,appState:Ha})})}});(0,k.z)({name:"clearCanvas",trackEvent:{category:"canvas"},perform:function(za,ya,Ha,Ua){return Ua.imageCache.clear(),{elements:za.map(function(Ea){return(0,D.BE)(Ea,{isDeleted:!0})}),appState:x(x({},
(0,O.im)()),{},{files:{},theme:ya.theme,penMode:ya.penMode,penDetected:ya.penDetected,exportBackground:ya.exportBackground,exportEmbedScene:ya.exportEmbedScene,gridSize:ya.gridSize,showStats:ya.showStats,pasteDialog:ya.pasteDialog,activeTool:"image"===ya.activeTool.type?x(x({},ya.activeTool),{},{type:"selection"}):ya.activeTool}),commitToHistory:!0}},PanelComponent:function(za){return(0,F.jsx)(ha,{onConfirm:za.updateData})}});var Z=(0,k.z)({name:"zoomIn",trackEvent:{category:"canvas"},perform:function(za,
ya,Ha,Ua){return{appState:x(x({},ya),(0,aa.E)({viewportX:ya.width/2+ya.offsetLeft,viewportY:ya.height/2+ya.offsetTop,nextZoom:(0,fa.j)(ya.zoom.value+ka.V4)},ya)),commitToHistory:!1}},PanelComponent:function(za){var ya=za.updateData;return(0,F.jsx)(n.V,{type:"button",icon:t.kr,title:"".concat((0,ma.t)("buttons.zoomIn")," — ").concat((0,M.uY)("CtrlOrCmd++")),"aria-label":(0,ma.t)("buttons.zoomIn"),onClick:function(){ya(null)},size:"small"})},keyTest:function(za){return(za.code===Y.aU.EQUAL||za.code===
Y.aU.NUM_ADD)&&(za[Y.tW.CTRL_OR_CMD]||za.shiftKey)}}),ea=(0,k.z)({name:"zoomOut",trackEvent:{category:"canvas"},perform:function(za,ya,Ha,Ua){return{appState:x(x({},ya),(0,aa.E)({viewportX:ya.width/2+ya.offsetLeft,viewportY:ya.height/2+ya.offsetTop,nextZoom:(0,fa.j)(ya.zoom.value-ka.V4)},ya)),commitToHistory:!1}},PanelComponent:function(za){var ya=za.updateData;return(0,F.jsx)(n.V,{type:"button",icon:t.vG,title:"".concat((0,ma.t)("buttons.zoomOut")," — ").concat((0,M.uY)("CtrlOrCmd+-")),"aria-label":(0,ma.t)("buttons.zoomOut"),
onClick:function(){ya(null)},size:"small"})},keyTest:function(za){return(za.code===Y.aU.MINUS||za.code===Y.aU.NUM_SUBTRACT)&&(za[Y.tW.CTRL_OR_CMD]||za.shiftKey)}}),ca=((0,k.z)({name:"resetZoom",trackEvent:{category:"canvas"},perform:function(za,ya,Ha,Ua){return{appState:x(x({},ya),(0,aa.E)({viewportX:ya.width/2+ya.offsetLeft,viewportY:ya.height/2+ya.offsetTop,nextZoom:(0,fa.j)(1)},ya)),commitToHistory:!1}},PanelComponent:function(za){var ya=za.updateData;za=za.appState;return(0,F.jsx)(Q.u,{label:(0,ma.t)("buttons.resetZoom"),
style:{height:"100%"},children:(0,F.jsxs)(n.V,{type:"button",className:"reset-zoom-button",title:(0,ma.t)("buttons.resetZoom"),"aria-label":(0,ma.t)("buttons.resetZoom"),onClick:function(){ya(null)},size:"small",children:[(100*za.zoom.value).toFixed(0),"%"]})})},keyTest:function(za){return(za.code===Y.aU.ZERO||za.code===Y.aU.NUM_ZERO)&&(za[Y.tW.CTRL_OR_CMD]||za.shiftKey)}}),function(za,ya){za=(0,J.Z)(za,4);return Math.min(Math.max(Math.floor(Math.min(ya.width/(za[2]-za[0]),ya.height/(za[3]-za[1]))/
ka.V4)*ka.V4,ka.V4),1)}),pa=function(za,ya,Ha){za=(0,L.Lm)(za);var Ua=(0,fa.eD)(za,ya);za=Ha&&0<Ua.length?(0,L.KP)(Ua):(0,L.KP)(za);Ha={value:ca(za,{width:ya.width,height:ya.height})};Ua=(0,J.Z)(za,4);za=(Ua[0]+Ua[2])/2;Ua=(Ua[1]+Ua[3])/2;return{appState:x(x(x({},ya),(0,H.s)({scenePoint:{x:za,y:Ua},viewportDimensions:{width:ya.width,height:ya.height},zoom:Ha})),{},{zoom:Ha}),commitToHistory:!1}};(0,k.z)({name:"zoomToSelection",trackEvent:{category:"canvas"},perform:function(za,ya){return pa(za,ya,
!0)},keyTest:function(za){return za.code===Y.aU.TWO&&za.shiftKey&&!za.altKey&&!za[Y.tW.CTRL_OR_CMD]}});(0,k.z)({name:"zoomToFit",trackEvent:{category:"canvas"},perform:function(za,ya){return pa(za,ya,!1)},keyTest:function(za){return za.code===Y.aU.ONE&&za.shiftKey&&!za.altKey&&!za[Y.tW.CTRL_OR_CMD]}});(0,k.z)({name:"toggleTheme",trackEvent:{category:"canvas"},perform:function(za,ya,Ha){return{appState:x(x({},ya),{},{theme:Ha||(ya.theme===ka.C6.LIGHT?ka.C6.DARK:ka.C6.LIGHT)}),commitToHistory:!1}},
PanelComponent:function(za){var ya=za.updateData;return(0,F.jsx)("div",{style:{marginInlineStart:"0.25rem"},children:(0,F.jsx)(R.J,{value:za.appState.theme,onChange:function(Ha){ya(Ha)}})})},keyTest:function(za){return za.altKey&&za.shiftKey&&za.code===Y.aU.D}});(0,k.z)({name:"eraser",trackEvent:{category:"toolbar"},perform:function(za,ya){var Ha;return Ha=(0,O.EN)(ya)?(0,M.Om)(ya,x(x({},ya.activeTool.lastActiveToolBeforeEraser||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(0,M.Om)(ya,
{type:"eraser",lastActiveToolBeforeEraser:ya.activeTool}),{appState:x(x({},ya),{},{selectedElementIds:{},selectedGroupIds:{},activeTool:Ha}),commitToHistory:!0}},keyTest:function(za){return za.key===Y.tW.E},PanelComponent:function(za){za.elements;var ya=za.updateData,Ha=za.data;return(0,F.jsx)(n.V,{type:"button",icon:t.rn,className:(0,K.Z)("eraser",{active:(0,O.EN)(za.appState)}),title:"".concat((0,ma.t)("toolBar.eraser"),"-").concat((0,M.uY)("E")),"aria-label":(0,ma.t)("toolBar.eraser"),onClick:function(){ya(null)},
size:(null==Ha?void 0:Ha.size)||"medium"})}})},3917:function(k,h,f){function w(Ua,Ea){var Oa=Object.keys(Ua);if(Object.getOwnPropertySymbols){var Za=Object.getOwnPropertySymbols(Ua);Ea&&(Za=Za.filter(function(Ma){return Object.getOwnPropertyDescriptor(Ua,Ma).enumerable}));Oa.push.apply(Oa,Za)}return Oa}function x(Ua){for(var Ea=1;Ea<arguments.length;Ea++){var Oa=null!=arguments[Ea]?arguments[Ea]:{};Ea%2?w(Object(Oa),!0).forEach(function(Za){(0,R.Z)(Ua,Za,Oa[Za])}):Object.getOwnPropertyDescriptors?
Object.defineProperties(Ua,Object.getOwnPropertyDescriptors(Oa)):w(Object(Oa)).forEach(function(Za){Object.defineProperty(Ua,Za,Object.getOwnPropertyDescriptor(Oa,Za))})}return Ua}function J(Ua){var Ea=Ua.options,Oa=Ua.value,Za=Ua.label,Ma=Ua.onChange,fb=Ua.onClose,eb=H().useRef(),Na=H().useRef(),oa=H().useRef(null);H().useEffect(function(){Na.current?Na.current.focus():oa.current&&oa.current.focus()},[]);return(0,L.jsx)("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":Za,
onKeyDown:function(Ca){var ra=Ea.find(function(Bb){return Bb.keyBinding===Ca.key.toLowerCase()});if(Ca.metaKey||Ca.altKey||Ca.ctrlKey||!ra)if(Ca.key===M.tW.TAB)setTimeout(function(){Na.current!==document.activeElement&&fb()},0);else if((0,M.Wl)(Ca.key)){var Aa=document.activeElement;ra=(0,Q.G3)().rtl;Aa=Array.prototype.indexOf.call(oa.current.children,Aa);if(-1!==Aa){var Ja=Ea.length,Sa=Aa;switch(Ca.key){case ra?M.tW.ARROW_LEFT:M.tW.ARROW_RIGHT:case M.tW.ARROW_DOWN:Sa=(Aa+1)%Ja;break;case ra?M.tW.ARROW_RIGHT:
M.tW.ARROW_LEFT:case M.tW.ARROW_UP:Sa=(Ja+Aa-1)%Ja}oa.current.children[Sa].focus()}Ca.preventDefault()}else Ca.key!==M.tW.ESCAPE&&Ca.key!==M.tW.ENTER||(Ca.preventDefault(),fb());else ra=Ea.indexOf(ra),oa.current.children[ra].focus(),Ca.preventDefault();Ca.nativeEvent.stopImmediatePropagation();Ca.stopPropagation()},children:(0,L.jsx)("div",{className:"picker-content",ref:oa,children:Ea.map(function(Ca,ra){return(0,L.jsxs)("button",{className:"picker-option",onClick:function(Aa){Aa.currentTarget.focus();
Ma(Ca.value)},title:"".concat(Ca.text," — ").concat(Ca.keyBinding.toUpperCase()),"aria-label":Ca.text||"none","aria-keyshortcuts":Ca.keyBinding,ref:function(Aa){Aa&&0===ra&&(eb.current=Aa);Aa&&Ca.value===Oa&&(Na.current=Aa)},onFocus:function(){Ma(Ca.value)},children:[Ca.icon,(0,L.jsx)("span",{className:"picker-keybinding",children:Ca.keyBinding})]},Ca.text)})})})}function z(Ua){var Ea,Oa=Ua.value,Za=Ua.label,Ma=Ua.options,fb=Ua.onChange;Ua=Ua.group;Ua=void 0===Ua?"":Ua;var eb=H().useState(!1);eb=
(0,fa.Z)(eb,2);var Na=eb[0],oa=eb[1],Ca=H().useRef(null);eb=(0,Q.G3)().rtl;return(0,L.jsxs)("label",{className:"picker-container",children:[(0,L.jsx)("button",{name:Ua,className:Na?"active":"","aria-label":Za,onClick:function(){return oa(!Na)},ref:Ca,children:null===(Ea=Ma.find(function(ra){return ra.value===Oa}))||void 0===Ea?void 0:Ea.icon}),(0,L.jsx)(H().Suspense,{fallback:"",children:Na?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(aa.J,x(x({onCloseRequest:function(ra){return ra.target!==Ca.current&&
oa(!1)}},eb?{right:5.5}:{left:-5.5}),{},{children:(0,L.jsx)(J,{options:Ma,value:Oa,label:Za,onChange:fb,onClose:function(){var ra;oa(!1);null===(ra=Ca.current)||void 0===ra||ra.focus()}})})),(0,L.jsx)("div",{className:"picker-triangle"})]}):null})]})}function u(Ua,Ea){var Oa=Object.keys(Ua);if(Object.getOwnPropertySymbols){var Za=Object.getOwnPropertySymbols(Ua);Ea&&(Za=Za.filter(function(Ma){return Object.getOwnPropertyDescriptor(Ua,Ma).enumerable}));Oa.push.apply(Oa,Za)}return Oa}function t(Ua){for(var Ea=
1;Ea<arguments.length;Ea++){var Oa=null!=arguments[Ea]?arguments[Ea]:{};Ea%2?u(Object(Oa),!0).forEach(function(Za){(0,R.Z)(Ua,Za,Oa[Za])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ua,Object.getOwnPropertyDescriptors(Oa)):u(Object(Oa)).forEach(function(Za){Object.defineProperty(Ua,Za,Object.getOwnPropertyDescriptor(Oa,Za))})}return Ua}f.d(h,{Tu:function(){return ya},Zq:function(){return Ha}});var n=f(1930),R=f(7169),ka=f(45),L=f(4512),ma=function(Ua){var Ea=Ua.value,Oa=Ua.onChange,
Za=Ua.group;return(0,L.jsx)("div",{className:"buttonList buttonListIcon",children:Ua.options.map(function(Ma){return(0,L.jsxs)("label",{className:(0,ka.Z)({active:Ea===Ma.value}),title:Ma.text,children:[(0,L.jsx)("input",{type:"radio",name:Za,onChange:function(){return Oa(Ma.value)},checked:Ea===Ma.value,"data-testid":Ma.testId}),Ma.icon]},Ma.text)})})},Y=f(5564),fa=f(2577);k=f(9787);var H=f.n(k),aa=f(7288),M=(f(7117),f(6066)),Q=f(8211),D=f(3646),O=f(8288),P=f(5118),ba=f(1935),X=f(5710),F=f(1974),
ha=f(6954),K=f(75),Z=f(8120),ea=f(6340);f=f(7901);var ca=function(Ua,Ea,Oa){var Za=(0,ea.xn)((0,K.eD)(Ua,Ea,3<arguments.length&&void 0!==arguments[3]&&arguments[3]));return Ua.map(function(Ma){var fb;return Za.get(Ma.id)||Ma.id===(null===(fb=Ea.editingElement)||void 0===fb?void 0:fb.id)?Oa(Ma):Ma})},pa=function(Ua,Ea,Oa,Za){var Ma,fb,eb=Ea.editingElement;Ua=(0,P.Lm)(Ua);return null!==(Ma=null!==(fb=eb&&Oa(eb))&&void 0!==fb?fb:(0,K.N)(Ua,Ea)?(0,K.PR)(Ua,Ea,Oa):Za)&&void 0!==Ma?Ma:null},za=function(Ua,
Ea,Oa,Za){var Ma=new Set;return{elements:ca(Ua,Ea,function(fb){if((0,P.iB)(fb)){var eb=Oa(fb);Ma.add(eb);eb=(0,ba.BE)(fb,{fontSize:eb});return(0,P.oN)(eb,(0,X.tl)(fb)),Na=fb,oa=eb,(0,F.Xh)(oa)?oa:(0,ba.DR)(oa,{x:"left"===Na.textAlign?Na.x:Na.x+(Na.width-oa.width)/("center"===Na.textAlign?2:1),y:Na.y+(Na.height-oa.height)/2},!1)}var Na,oa;return fb},!0),appState:t(t({},Ea),{},{currentItemFontSize:1===Ma.size?(0,n.Z)(Ma)[0]:null!=Za?Za:Ea.currentItemFontSize}),commitToHistory:!0}},ya=((0,f.z)({name:"changeStrokeColor",
trackEvent:!1,perform:function(Ua,Ea,Oa){return t(t({},Oa.currentItemStrokeColor&&{elements:ca(Ua,Ea,function(Za){return(0,Z.PD)(Za.type)?(0,ba.BE)(Za,{strokeColor:Oa.currentItemStrokeColor}):Za},!0)}),{},{appState:t(t({},Ea),Oa),commitToHistory:!!Oa.currentItemStrokeColor})},PanelComponent:function(Ua){var Ea=Ua.elements,Oa=Ua.appState,Za=Ua.updateData;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("h3",{"aria-hidden":"true",children:(0,Q.t)("labels.stroke")}),(0,L.jsx)(Y.z,{type:"elementStroke",
label:(0,Q.t)("labels.stroke"),color:pa(Ea,Oa,function(Ma){return Ma.strokeColor},Oa.currentItemStrokeColor),onChange:function(Ma){return Za({currentItemStrokeColor:Ma})},isActive:"strokeColorPicker"===Oa.openPopup,setActive:function(Ma){return Za({openPopup:Ma?"strokeColorPicker":null})},elements:Ea,appState:Oa})]})}}),(0,f.z)({name:"changeBackgroundColor",trackEvent:!1,perform:function(Ua,Ea,Oa){return t(t({},Oa.currentItemBackgroundColor&&{elements:ca(Ua,Ea,function(Za){return(0,ba.BE)(Za,{backgroundColor:Oa.currentItemBackgroundColor})})}),
{},{appState:t(t({},Ea),Oa),commitToHistory:!!Oa.currentItemBackgroundColor})},PanelComponent:function(Ua){var Ea=Ua.elements,Oa=Ua.appState,Za=Ua.updateData;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("h3",{"aria-hidden":"true",children:(0,Q.t)("labels.background")}),(0,L.jsx)(Y.z,{type:"elementBackground",label:(0,Q.t)("labels.background"),color:pa(Ea,Oa,function(Ma){return Ma.backgroundColor},Oa.currentItemBackgroundColor),onChange:function(Ma){return Za({currentItemBackgroundColor:Ma})},
isActive:"backgroundColorPicker"===Oa.openPopup,setActive:function(Ma){return Za({openPopup:Ma?"backgroundColorPicker":null})},elements:Ea,appState:Oa})]})}}),(0,f.z)({name:"changeFillStyle",trackEvent:!1,perform:function(Ua,Ea,Oa){return{elements:ca(Ua,Ea,function(Za){return(0,ba.BE)(Za,{fillStyle:Oa})}),appState:t(t({},Ea),{},{currentItemFillStyle:Oa}),commitToHistory:!0}},PanelComponent:function(Ua){var Ea=Ua.elements,Oa=Ua.appState,Za=Ua.updateData;return(0,L.jsxs)("fieldset",{children:[(0,L.jsx)("legend",
{children:(0,Q.t)("labels.fill")}),(0,L.jsx)(ma,{options:[{value:"hachure",text:(0,Q.t)("labels.hachure"),icon:(0,L.jsx)(D.a0,{theme:Oa.theme})},{value:"cross-hatch",text:(0,Q.t)("labels.crossHatch"),icon:(0,L.jsx)(D.np,{theme:Oa.theme})},{value:"solid",text:(0,Q.t)("labels.solid"),icon:(0,L.jsx)(D.X7,{theme:Oa.theme})}],group:"fill",value:pa(Ea,Oa,function(Ma){return Ma.fillStyle},Oa.currentItemFillStyle),onChange:function(Ma){Za(Ma)}})]})}}),(0,f.z)({name:"changeStrokeWidth",trackEvent:!1,perform:function(Ua,
Ea,Oa){return{elements:ca(Ua,Ea,function(Za){return(0,ba.BE)(Za,{strokeWidth:Oa})}),appState:t(t({},Ea),{},{currentItemStrokeWidth:Oa}),commitToHistory:!0}},PanelComponent:function(Ua){var Ea=Ua.elements,Oa=Ua.appState,Za=Ua.updateData;return(0,L.jsxs)("fieldset",{children:[(0,L.jsx)("legend",{children:(0,Q.t)("labels.strokeWidth")}),(0,L.jsx)(ma,{group:"stroke-width",options:[{value:1,text:(0,Q.t)("labels.thin"),icon:(0,L.jsx)(D.tY,{theme:Oa.theme,strokeWidth:2})},{value:2,text:(0,Q.t)("labels.bold"),
icon:(0,L.jsx)(D.tY,{theme:Oa.theme,strokeWidth:6})},{value:4,text:(0,Q.t)("labels.extraBold"),icon:(0,L.jsx)(D.tY,{theme:Oa.theme,strokeWidth:10})}],value:pa(Ea,Oa,function(Ma){return Ma.strokeWidth},Oa.currentItemStrokeWidth),onChange:function(Ma){return Za(Ma)}})]})}}),(0,f.z)({name:"changeSloppiness",trackEvent:!1,perform:function(Ua,Ea,Oa){return{elements:ca(Ua,Ea,function(Za){return(0,ba.BE)(Za,{seed:(0,ha.LU)(),roughness:Oa})}),appState:t(t({},Ea),{},{currentItemRoughness:Oa}),commitToHistory:!0}},
PanelComponent:function(Ua){var Ea=Ua.elements,Oa=Ua.appState,Za=Ua.updateData;return(0,L.jsxs)("fieldset",{children:[(0,L.jsx)("legend",{children:(0,Q.t)("labels.sloppiness")}),(0,L.jsx)(ma,{group:"sloppiness",options:[{value:0,text:(0,Q.t)("labels.architect"),icon:(0,L.jsx)(D.bf,{theme:Oa.theme})},{value:1,text:(0,Q.t)("labels.artist"),icon:(0,L.jsx)(D.kM,{theme:Oa.theme})},{value:2,text:(0,Q.t)("labels.cartoonist"),icon:(0,L.jsx)(D.W2,{theme:Oa.theme})}],value:pa(Ea,Oa,function(Ma){return Ma.roughness},
Oa.currentItemRoughness),onChange:function(Ma){return Za(Ma)}})]})}}),(0,f.z)({name:"changeStrokeStyle",trackEvent:!1,perform:function(Ua,Ea,Oa){return{elements:ca(Ua,Ea,function(Za){return(0,ba.BE)(Za,{strokeStyle:Oa})}),appState:t(t({},Ea),{},{currentItemStrokeStyle:Oa}),commitToHistory:!0}},PanelComponent:function(Ua){var Ea=Ua.elements,Oa=Ua.appState,Za=Ua.updateData;return(0,L.jsxs)("fieldset",{children:[(0,L.jsx)("legend",{children:(0,Q.t)("labels.strokeStyle")}),(0,L.jsx)(ma,{group:"strokeStyle",
options:[{value:"solid",text:(0,Q.t)("labels.strokeStyle_solid"),icon:(0,L.jsx)(D.nu,{theme:Oa.theme})},{value:"dashed",text:(0,Q.t)("labels.strokeStyle_dashed"),icon:(0,L.jsx)(D.h0,{theme:Oa.theme})},{value:"dotted",text:(0,Q.t)("labels.strokeStyle_dotted"),icon:(0,L.jsx)(D.aT,{theme:Oa.theme})}],value:pa(Ea,Oa,function(Ma){return Ma.strokeStyle},Oa.currentItemStrokeStyle),onChange:function(Ma){return Za(Ma)}})]})}}),(0,f.z)({name:"changeOpacity",trackEvent:!1,perform:function(Ua,Ea,Oa){return{elements:ca(Ua,
Ea,function(Za){return(0,ba.BE)(Za,{opacity:Oa})},!0),appState:t(t({},Ea),{},{currentItemOpacity:Oa}),commitToHistory:!0}},PanelComponent:function(Ua){var Ea,Oa=Ua.elements,Za=Ua.appState,Ma=Ua.updateData;return(0,L.jsxs)("label",{className:"control-label",children:[(0,Q.t)("labels.opacity"),(0,L.jsx)("input",{type:"range",min:"0",max:"100",step:"10",onChange:function(fb){return Ma(+fb.target.value)},value:null!==(Ea=pa(Oa,Za,function(fb){return fb.opacity},Za.currentItemOpacity))&&void 0!==Ea?Ea:
void 0})]})}}),(0,f.z)({name:"changeFontSize",trackEvent:!1,perform:function(Ua,Ea,Oa){return za(Ua,Ea,function(){return Oa},Oa)},PanelComponent:function(Ua){var Ea=Ua.elements,Oa=Ua.appState,Za=Ua.updateData;return(0,L.jsxs)("fieldset",{children:[(0,L.jsx)("legend",{children:(0,Q.t)("labels.fontSize")}),(0,L.jsx)(ma,{group:"font-size",options:[{value:16,text:(0,Q.t)("labels.small"),icon:(0,L.jsx)(D.q0,{theme:Oa.theme}),testId:"fontSize-small"},{value:20,text:(0,Q.t)("labels.medium"),icon:(0,L.jsx)(D.nq,
{theme:Oa.theme}),testId:"fontSize-medium"},{value:28,text:(0,Q.t)("labels.large"),icon:(0,L.jsx)(D.tW,{theme:Oa.theme}),testId:"fontSize-large"},{value:36,text:(0,Q.t)("labels.veryLarge"),icon:(0,L.jsx)(D.OA,{theme:Oa.theme}),testId:"fontSize-veryLarge"}],value:pa(Ea,Oa,function(Ma){return(0,P.iB)(Ma)?Ma.fontSize:(Ma=(0,X.WJ)(Ma))?Ma.fontSize:null},Oa.currentItemFontSize||O.n5),onChange:function(Ma){return Za(Ma)}})]})}}),(0,f.z)({name:"decreaseFontSize",trackEvent:!1,perform:function(Ua,Ea,Oa){return za(Ua,
Ea,function(Za){return Math.round(1/1.1*Za.fontSize)})},keyTest:function(Ua){return Ua[M.tW.CTRL_OR_CMD]&&Ua.shiftKey&&(Ua.key===M.tW.CHEVRON_LEFT||Ua.key===M.tW.COMMA)}})),Ha=(0,f.z)({name:"increaseFontSize",trackEvent:!1,perform:function(Ua,Ea,Oa){return za(Ua,Ea,function(Za){return Math.round(1.1*Za.fontSize)})},keyTest:function(Ua){return Ua[M.tW.CTRL_OR_CMD]&&Ua.shiftKey&&(Ua.key===M.tW.CHEVRON_RIGHT||Ua.key===M.tW.PERIOD)}});(0,f.z)({name:"changeFontFamily",trackEvent:!1,perform:function(Ua,
Ea,Oa){return{elements:ca(Ua,Ea,function(Za){if((0,P.iB)(Za)){var Ma=(0,ba.BE)(Za,{fontFamily:Oa});return(0,P.oN)(Ma,(0,X.tl)(Za)),Ma}return Za},!0),appState:t(t({},Ea),{},{currentItemFontFamily:Oa}),commitToHistory:!0}},PanelComponent:function(Ua){var Ea=Ua.elements,Oa=Ua.appState,Za=Ua.updateData;Ua=[{value:O.ut.Virgil,text:(0,Q.t)("labels.handDrawn"),icon:(0,L.jsx)(D.kK,{theme:Oa.theme})},{value:O.ut.Helvetica,text:(0,Q.t)("labels.normal"),icon:(0,L.jsx)(D.vo,{theme:Oa.theme})},{value:O.ut.Cascadia,
text:(0,Q.t)("labels.code"),icon:(0,L.jsx)(D.z6,{theme:Oa.theme})}];return(0,L.jsxs)("fieldset",{children:[(0,L.jsx)("legend",{children:(0,Q.t)("labels.fontFamily")}),(0,L.jsx)(ma,{group:"font-family",options:Ua,value:pa(Ea,Oa,function(Ma){return(0,P.iB)(Ma)?Ma.fontFamily:(Ma=(0,X.WJ)(Ma))?Ma.fontFamily:null},Oa.currentItemFontFamily||O.rk),onChange:function(Ma){return Za(Ma)}})]})}});(0,f.z)({name:"changeTextAlign",trackEvent:!1,perform:function(Ua,Ea,Oa){return{elements:ca(Ua,Ea,function(Za){if((0,P.iB)(Za)){var Ma=
(0,ba.BE)(Za,{textAlign:Oa});return(0,P.oN)(Ma,(0,X.tl)(Za)),Ma}return Za},!0),appState:t(t({},Ea),{},{currentItemTextAlign:Oa}),commitToHistory:!0}},PanelComponent:function(Ua){var Ea=Ua.elements,Oa=Ua.appState,Za=Ua.updateData;return(0,L.jsxs)("fieldset",{children:[(0,L.jsx)("legend",{children:(0,Q.t)("labels.textAlign")}),(0,L.jsx)(ma,{group:"text-align",options:[{value:"left",text:(0,Q.t)("labels.left"),icon:(0,L.jsx)(D.rr,{theme:Oa.theme})},{value:"center",text:(0,Q.t)("labels.center"),icon:(0,L.jsx)(D.o3,
{theme:Oa.theme})},{value:"right",text:(0,Q.t)("labels.right"),icon:(0,L.jsx)(D.oT,{theme:Oa.theme})}],value:pa(Ea,Oa,function(Ma){return(0,P.iB)(Ma)?Ma.textAlign:(Ma=(0,X.WJ)(Ma))?Ma.textAlign:null},Oa.currentItemTextAlign),onChange:function(Ma){return Za(Ma)}})]})}});(0,f.z)({name:"changeVerticalAlign",trackEvent:{category:"element"},perform:function(Ua,Ea,Oa){return{elements:ca(Ua,Ea,function(Za){if((0,P.iB)(Za)){var Ma=(0,ba.BE)(Za,{verticalAlign:Oa});return(0,P.oN)(Ma,(0,X.tl)(Za)),Ma}return Za},
!0),appState:t({},Ea),commitToHistory:!0}},PanelComponent:function(Ua){var Ea=Ua.elements,Oa=Ua.appState,Za=Ua.updateData;return(0,L.jsx)("fieldset",{children:(0,L.jsx)(ma,{group:"text-align",options:[{value:O.oX.TOP,text:(0,Q.t)("labels.alignTop"),icon:(0,L.jsx)(D.EO,{theme:Oa.theme})},{value:O.oX.MIDDLE,text:(0,Q.t)("labels.centerVertically"),icon:(0,L.jsx)(D.P7,{theme:Oa.theme})},{value:O.oX.BOTTOM,text:(0,Q.t)("labels.alignBottom"),icon:(0,L.jsx)(D.aA,{theme:Oa.theme})}],value:pa(Ea,Oa,function(Ma){return(0,P.iB)(Ma)&&
Ma.containerId?Ma.verticalAlign:(Ma=(0,X.WJ)(Ma))?Ma.verticalAlign:null}),onChange:function(Ma){return Za(Ma)}})})}});(0,f.z)({name:"changeSharpness",trackEvent:!1,perform:function(Ua,Ea,Oa){var Za=(0,K.Zs)((0,P.Lm)(Ua),Ea),Ma=Za.length?Za.every(function(fb){return!(0,F.bt)(fb)}):!(0,F.dt)(Ea.activeTool.type);Za=Za.length?Za.every(F.bt):(0,F.dt)(Ea.activeTool.type);return{elements:ca(Ua,Ea,function(fb){return(0,ba.BE)(fb,{strokeSharpness:Oa})}),appState:t(t({},Ea),{},{currentItemStrokeSharpness:Ma?
Oa:Ea.currentItemStrokeSharpness,currentItemLinearStrokeSharpness:Za?Oa:Ea.currentItemLinearStrokeSharpness}),commitToHistory:!0}},PanelComponent:function(Ua){var Ea=Ua.elements,Oa=Ua.appState,Za=Ua.updateData;return(0,L.jsxs)("fieldset",{children:[(0,L.jsx)("legend",{children:(0,Q.t)("labels.edges")}),(0,L.jsx)(ma,{group:"edges",options:[{value:"sharp",text:(0,Q.t)("labels.sharp"),icon:(0,L.jsx)(D.wr,{theme:Oa.theme})},{value:"round",text:(0,Q.t)("labels.round"),icon:(0,L.jsx)(D.DS,{theme:Oa.theme})}],
value:pa(Ea,Oa,function(Ma){return Ma.strokeSharpness},(0,K.gP)(Oa.activeTool.type)&&((0,F.dt)(Oa.activeTool.type)?Oa.currentItemLinearStrokeSharpness:Oa.currentItemStrokeSharpness)||null),onChange:function(Ma){return Za(Ma)}})]})}});(0,f.z)({name:"changeArrowhead",trackEvent:!1,perform:function(Ua,Ea,Oa){return{elements:ca(Ua,Ea,function(Za){if((0,F.bt)(Za)){var Ma=Oa.position,fb=Oa.type;if("start"===Ma)return(0,ba.BE)(Za,{startArrowhead:fb});if("end"===Ma)return(0,ba.BE)(Za,{endArrowhead:fb})}return Za}),
appState:t(t({},Ea),{},(0,R.Z)({},"start"===Oa.position?"currentItemStartArrowhead":"currentItemEndArrowhead",Oa.type)),commitToHistory:!0}},PanelComponent:function(Ua){var Ea=Ua.elements,Oa=Ua.appState,Za=Ua.updateData;Ua=(0,Q.G3)().rtl;return(0,L.jsxs)("fieldset",{children:[(0,L.jsx)("legend",{children:(0,Q.t)("labels.arrowheads")}),(0,L.jsxs)("div",{className:"iconSelectList",children:[(0,L.jsx)(z,{label:"arrowhead_start",options:[{value:null,text:(0,Q.t)("labels.arrowhead_none"),icon:(0,L.jsx)(D.fr,
{theme:Oa.theme}),keyBinding:"q"},{value:"arrow",text:(0,Q.t)("labels.arrowhead_arrow"),icon:(0,L.jsx)(D.il,{theme:Oa.theme,flip:!Ua}),keyBinding:"w"},{value:"bar",text:(0,Q.t)("labels.arrowhead_bar"),icon:(0,L.jsx)(D.m,{theme:Oa.theme,flip:!Ua}),keyBinding:"e"},{value:"dot",text:(0,Q.t)("labels.arrowhead_dot"),icon:(0,L.jsx)(D.tn,{theme:Oa.theme,flip:!Ua}),keyBinding:"r"},{value:"triangle",text:(0,Q.t)("labels.arrowhead_triangle"),icon:(0,L.jsx)(D.j8,{theme:Oa.theme,flip:!Ua}),keyBinding:"t"}],value:pa(Ea,
Oa,function(Ma){return(0,F.bt)(Ma)&&(0,K.Un)(Ma.type)?Ma.startArrowhead:Oa.currentItemStartArrowhead},Oa.currentItemStartArrowhead),onChange:function(Ma){return Za({position:"start",type:Ma})}}),(0,L.jsx)(z,{label:"arrowhead_end",group:"arrowheads",options:[{value:null,text:(0,Q.t)("labels.arrowhead_none"),keyBinding:"q",icon:(0,L.jsx)(D.fr,{theme:Oa.theme})},{value:"arrow",text:(0,Q.t)("labels.arrowhead_arrow"),keyBinding:"w",icon:(0,L.jsx)(D.il,{theme:Oa.theme,flip:Ua})},{value:"bar",text:(0,Q.t)("labels.arrowhead_bar"),
keyBinding:"e",icon:(0,L.jsx)(D.m,{theme:Oa.theme,flip:Ua})},{value:"dot",text:(0,Q.t)("labels.arrowhead_dot"),keyBinding:"r",icon:(0,L.jsx)(D.tn,{theme:Oa.theme,flip:Ua})},{value:"triangle",text:(0,Q.t)("labels.arrowhead_triangle"),icon:(0,L.jsx)(D.j8,{theme:Oa.theme,flip:Ua}),keyBinding:"t"}],value:pa(Ea,Oa,function(Ma){return(0,F.bt)(Ma)&&(0,K.Un)(Ma.type)?Ma.endArrowhead:Oa.currentItemEndArrowhead},Oa.currentItemEndArrowhead),onChange:function(Ma){return Za({position:"end",type:Ma})}})]})]})}})},
7901:function(k,h,f){f.d(h,{N:function(){return w},z:function(){return x}});var w=[],x=function(J){return w=w.concat(J),J}},7047:function(k,h,f){var w,x;f.d(h,{L:function(){return J}});var J="undefined"!=typeof p&&null!==(w={REACT_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",REACT_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",REACT_APP_LIBRARY_URL:"https://libraries.excalidraw.com",REACT_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",
REACT_APP_PORTAL_URL:"https://portal.excalidraw.com",REACT_APP_WS_SERVER_URL:"",REACT_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',REACT_APP_GOOGLE_ANALYTICS_ID:"UA-387204-13",
REACT_APP_PLUS_APP:"https://app.excalidraw.com",PKG_NAME:"@excalidraw/excalidraw",PKG_VERSION:"0.12.0",IS_EXCALIDRAW_NPM_PACKAGE:!0})&&void 0!==w&&w.REACT_APP_GOOGLE_ANALYTICS_ID&&"undefined"!=typeof window&&window.gtag?function(z,u,t,n){try{window.gtag("event",u,{event_category:z,event_label:t,value:n})}catch(R){console.error("error logging to ga",R)}}:("undefined"!=typeof p&&null!==(x={REACT_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",REACT_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",
REACT_APP_LIBRARY_URL:"https://libraries.excalidraw.com",REACT_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",REACT_APP_PORTAL_URL:"https://portal.excalidraw.com",REACT_APP_WS_SERVER_URL:"",REACT_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',
REACT_APP_GOOGLE_ANALYTICS_ID:"UA-387204-13",REACT_APP_PLUS_APP:"https://app.excalidraw.com",PKG_NAME:"@excalidraw/excalidraw",PKG_VERSION:"0.12.0",IS_EXCALIDRAW_NPM_PACKAGE:!0})&&void 0!==x&&x.JEST_WORKER_ID,function(z,u,t,n){})},8897:function(k,h,f){function w(H,aa){var M="undefined"!=typeof Symbol&&H[Symbol.iterator]||H["@@iterator"];if(!M){if(Array.isArray(H)||(M=function(ba,X){if(ba){if("string"==typeof ba)return x(ba,X);var F=Object.prototype.toString.call(ba).slice(8,-1);"Object"===F&&ba.constructor&&
(F=ba.constructor.name);if("Map"===F||"Set"===F)return Array.from(ba);if("Arguments"===F||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F))return x(ba,X)}}(H))||aa&&H&&"number"==typeof H.length){M&&(H=M);var Q=0;aa=function(){};return{s:aa,n:function(){return Q>=H.length?{done:!0}:{done:!1,value:H[Q++]}},e:function(ba){throw ba;},f:aa}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var D,
O=!0,P=!1;return{s:function(){M=M.call(H)},n:function(){var ba=M.next();return O=ba.done,ba},e:function(ba){P=!0;D=ba},f:function(){try{O||null==M.return||M.return()}finally{if(P)throw D;}}}}function x(H,aa){(null==aa||aa>H.length)&&(aa=H.length);for(var M=0,Q=Array(aa);M<aa;M++)Q[M]=H[M];return Q}f.d(h,{EN:function(){return fa},eS:function(){return Y},im:function(){return R},s:function(){return ma}});var J=f(5284),z=f(8288),u=f(8211),t=f(6340),n=z.ZB.includes(devicePixelRatio)?devicePixelRatio:1,
R=function(){return{theme:z.C6.LIGHT,collaborators:new Map,currentChartType:"bar",currentItemBackgroundColor:"transparent",currentItemEndArrowhead:"arrow",currentItemFillStyle:"hachure",currentItemFontFamily:z.rk,currentItemFontSize:z.n5,currentItemLinearStrokeSharpness:"round",currentItemOpacity:100,currentItemRoughness:1,currentItemStartArrowhead:null,currentItemStrokeColor:J.black,currentItemStrokeSharpness:"sharp",currentItemStrokeStyle:"solid",currentItemStrokeWidth:1,currentItemTextAlign:z.Hg,
cursorButton:"up",draggingElement:null,editingElement:null,editingGroupId:null,editingLinearElement:null,activeTool:{type:"selection",customType:null,locked:!1,lastActiveToolBeforeEraser:null},penMode:!1,penDetected:!1,errorMessage:null,exportBackground:!0,exportScale:n,exportEmbedScene:!1,exportWithDarkMode:!1,fileHandle:null,gridSize:null,isBindingEnabled:!0,isLibraryOpen:!1,isLibraryMenuDocked:!1,isLoading:!1,isResizing:!1,isRotating:!1,lastPointerDownWith:"mouse",multiElement:null,name:"".concat((0,u.t)("labels.untitled"),
"-").concat((0,t.Fc)()),openMenu:null,openPopup:null,pasteDialog:{shown:!1,data:null},previousSelectedElementIds:{},resizingElement:null,scrolledOutside:!1,scrollX:0,scrollY:0,selectedElementIds:{},selectedGroupIds:{},selectionElement:null,shouldCacheIgnoreZoom:!1,showHelpDialog:!1,showStats:!1,startBoundElement:null,suggestedBindings:[],toastMessage:null,viewBackgroundColor:J.white,zenModeEnabled:!1,zoom:{value:1},viewModeEnabled:!1,pendingImageElementId:null,showHyperlinkPopup:!1}},ka={theme:{browser:!0,
export:!1,server:!1},collaborators:{browser:!1,export:!1,server:!1},currentChartType:{browser:!0,export:!1,server:!1},currentItemBackgroundColor:{browser:!0,export:!1,server:!1},currentItemEndArrowhead:{browser:!0,export:!1,server:!1},currentItemFillStyle:{browser:!0,export:!1,server:!1},currentItemFontFamily:{browser:!0,export:!1,server:!1},currentItemFontSize:{browser:!0,export:!1,server:!1},currentItemLinearStrokeSharpness:{browser:!0,export:!1,server:!1},currentItemOpacity:{browser:!0,export:!1,
server:!1},currentItemRoughness:{browser:!0,export:!1,server:!1},currentItemStartArrowhead:{browser:!0,export:!1,server:!1},currentItemStrokeColor:{browser:!0,export:!1,server:!1},currentItemStrokeSharpness:{browser:!0,export:!1,server:!1},currentItemStrokeStyle:{browser:!0,export:!1,server:!1},currentItemStrokeWidth:{browser:!0,export:!1,server:!1},currentItemTextAlign:{browser:!0,export:!1,server:!1},cursorButton:{browser:!0,export:!1,server:!1},draggingElement:{browser:!1,export:!1,server:!1},
editingElement:{browser:!1,export:!1,server:!1},editingGroupId:{browser:!0,export:!1,server:!1},editingLinearElement:{browser:!1,export:!1,server:!1},activeTool:{browser:!0,export:!1,server:!1},penMode:{browser:!0,export:!1,server:!1},penDetected:{browser:!0,export:!1,server:!1},errorMessage:{browser:!1,export:!1,server:!1},exportBackground:{browser:!0,export:!1,server:!1},exportEmbedScene:{browser:!0,export:!1,server:!1},exportScale:{browser:!0,export:!1,server:!1},exportWithDarkMode:{browser:!0,
export:!1,server:!1},fileHandle:{browser:!1,export:!1,server:!1},gridSize:{browser:!0,export:!0,server:!0},height:{browser:!1,export:!1,server:!1},isBindingEnabled:{browser:!1,export:!1,server:!1},isLibraryOpen:{browser:!0,export:!1,server:!1},isLibraryMenuDocked:{browser:!0,export:!1,server:!1},isLoading:{browser:!1,export:!1,server:!1},isResizing:{browser:!1,export:!1,server:!1},isRotating:{browser:!1,export:!1,server:!1},lastPointerDownWith:{browser:!0,export:!1,server:!1},multiElement:{browser:!1,
export:!1,server:!1},name:{browser:!0,export:!1,server:!1},offsetLeft:{browser:!1,export:!1,server:!1},offsetTop:{browser:!1,export:!1,server:!1},openMenu:{browser:!0,export:!1,server:!1},openPopup:{browser:!1,export:!1,server:!1},pasteDialog:{browser:!1,export:!1,server:!1},previousSelectedElementIds:{browser:!0,export:!1,server:!1},resizingElement:{browser:!1,export:!1,server:!1},scrolledOutside:{browser:!0,export:!1,server:!1},scrollX:{browser:!0,export:!1,server:!1},scrollY:{browser:!0,export:!1,
server:!1},selectedElementIds:{browser:!0,export:!1,server:!1},selectedGroupIds:{browser:!0,export:!1,server:!1},selectionElement:{browser:!1,export:!1,server:!1},shouldCacheIgnoreZoom:{browser:!0,export:!1,server:!1},showHelpDialog:{browser:!1,export:!1,server:!1},showStats:{browser:!0,export:!1,server:!1},startBoundElement:{browser:!1,export:!1,server:!1},suggestedBindings:{browser:!1,export:!1,server:!1},toastMessage:{browser:!1,export:!1,server:!1},viewBackgroundColor:{browser:!0,export:!0,server:!0},
width:{browser:!1,export:!1,server:!1},zenModeEnabled:{browser:!0,export:!1,server:!1},zoom:{browser:!0,export:!1,server:!1},viewModeEnabled:{browser:!1,export:!1,server:!1},pendingImageElementId:{browser:!1,export:!1,server:!1},showHyperlinkPopup:{browser:!1,export:!1,server:!1}},L=function(H,aa){var M,Q={},D=w(Object.keys(H));try{for(D.s();!(M=D.n()).done;){var O=M.value,P=ka[O];null!=P&&P[aa]&&(Q[O]=H[O])}}catch(ba){D.e(ba)}finally{D.f()}return Q},ma=function(H){return L(H,"export")},Y=function(H){return L(H,
"server")},fa=function(H){return"eraser"===H.activeTool.type}},5674:function(k,h,f){function w(X,F){var ha="undefined"!=typeof Symbol&&X[Symbol.iterator]||X["@@iterator"];if(!ha){if(Array.isArray(X)||(ha=function(pa,za){if(pa){if("string"==typeof pa)return x(pa,za);var ya=Object.prototype.toString.call(pa).slice(8,-1);"Object"===ya&&pa.constructor&&(ya=pa.constructor.name);if("Map"===ya||"Set"===ya)return Array.from(pa);if("Arguments"===ya||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ya))return x(pa,
za)}}(X))||F&&X&&"number"==typeof X.length){ha&&(X=ha);var K=0;F=function(){};return{s:F,n:function(){return K>=X.length?{done:!0}:{done:!1,value:X[K++]}},e:function(pa){throw pa;},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var Z,ea=!0,ca=!1;return{s:function(){ha=ha.call(X)},n:function(){var pa=ha.next();return ea=pa.done,pa},e:function(pa){ca=!0;Z=pa},f:function(){try{ea||null==
ha.return||ha.return()}finally{if(ca)throw Z;}}}}function x(X,F){(null==F||F>X.length)&&(F=X.length);for(var ha=0,K=Array(F);ha<F;ha++)K[ha]=X[ha];return K}function J(X,F){var ha=Object.keys(X);if(Object.getOwnPropertySymbols){var K=Object.getOwnPropertySymbols(X);F&&(K=K.filter(function(Z){return Object.getOwnPropertyDescriptor(X,Z).enumerable}));ha.push.apply(ha,K)}return ha}function z(X){for(var F=1;F<arguments.length;F++){var ha=null!=arguments[F]?arguments[F]:{};F%2?J(Object(ha),!0).forEach(function(K){(0,t.Z)(X,
K,ha[K])}):Object.getOwnPropertyDescriptors?Object.defineProperties(X,Object.getOwnPropertyDescriptors(ha)):J(Object(ha)).forEach(function(K){Object.defineProperty(X,K,Object.getOwnPropertyDescriptor(ha,K))})}return X}f.d(h,{dz:function(){return M},i$:function(){return Y},ps:function(){return ba}});var u=f(1930),t=f(7169),n=f(2577),R=f(56),ka=f(8288),L=f(5118),ma=f(6954),Y="VALID_SPREADSHEET",fa=function(X){return(X=/^([-+]?)[$€£¥₩]?([-+]?)([\d.,]+)[%]?$/.exec(X))?parseFloat("".concat((X[1]||X[2])+
X[3]).replace(/,/g,"")):null},H=function(X,F){return X.slice(1).every(function(ha){return null!==fa(ha[F])})},aa=function(X){var F=X[0].length;if(2<F)return{type:"NOT_SPREADSHEET",reason:"More than 2 columns"};if(1===F){if(!H(X,0))return{type:"NOT_SPREADSHEET",reason:"Value is not numeric"};F=null===fa(X[0][0]);var ha=(F?X.slice(1):X).map(function(ea){return fa(ea[0])});return 2>ha.length?{type:"NOT_SPREADSHEET",reason:"Less than two rows"}:{type:Y,spreadsheet:{title:F?X[0][0]:null,labels:null,values:ha}}}F=
H(X,0);ha=H(X,1);if(!F&&!ha)return{type:"NOT_SPREADSHEET",reason:"Value is not numeric"};F=(0,n.Z)(ha?[0,1]:[1,0],2);var K=F[0],Z=F[1];ha=(F=null===fa(X[0][Z]))?X.slice(1):X;return 2>ha.length?{type:"NOT_SPREADSHEET",reason:"Less than 2 rows"}:{type:Y,spreadsheet:{title:F?X[0][Z]:null,labels:ha.map(function(ea){return ea[K]}),values:ha.map(function(ea){return fa(ea[Z])})}}},M=function(X){var F=X.trim().split("\n").map(function(K){return K.trim().split("\t")});if(F.length&&2!==F[0].length&&(F=X.trim().split("\n").map(function(K){return K.trim().split(",")})),
0===F.length)return{type:"NOT_SPREADSHEET",reason:"No values"};var ha=F[0].length;if(!F.every(function(K){return K.length===ha}))return{type:"NOT_SPREADSHEET",reason:"All rows don't have same number of columns"};X=aa(F);return X.type!==Y&&(F=aa(function(K){for(var Z=[],ea=0;ea<K[0].length;ea++){for(var ca=[],pa=0;pa<K.length;pa++)ca.push(K[pa][ea]);Z.push(ca)}return Z}(F)),F.type===Y)?F:X},Q=R.Z.elementBackground.slice(2,R.Z.elementBackground.length),D={fillStyle:"hachure",fontFamily:ka.rk,fontSize:ka.n5,
opacity:100,roughness:1,strokeColor:R.Z.elementStroke[0],strokeSharpness:"sharp",strokeStyle:"solid",strokeWidth:1,verticalAlign:ka.oX.MIDDLE,locked:!1},O=function(X){return{chartWidth:44*X.values.length+12,chartHeight:280}},P=function(X,F,ha,K,Z,ea){var ca=O(X),pa=ca.chartWidth,za=ca.chartHeight;ca=X.title?(0,L.VL)(z(z({backgroundColor:Z,groupIds:[K]},D),{},{text:X.title,x:F+pa/2,y:ha-256-24-ka.n5,strokeSharpness:"sharp",strokeStyle:"solid",textAlign:"center"})):null;ea=ea?(0,L.Up)(z(z({backgroundColor:Z,
groupIds:[K]},D),{},{type:"rectangle",x:F,y:ha-za,width:pa,height:za,strokeColor:R.Z.elementStroke[0],fillStyle:"solid",opacity:6})):null;return[].concat((0,u.Z)(ea?[ea]:[]),(0,u.Z)(ca?[ca]:[]),(0,u.Z)(function(ya,Ha,Ua,Ea,Oa){var Za;return(null===(Za=ya.labels)||void 0===Za?void 0:Za.map(function(Ma,fb){return(0,L.VL)(z(z({groupIds:[Ea],backgroundColor:Oa},D),{},{text:8<Ma.length?"".concat(Ma.slice(0,5),"..."):Ma,x:Ha+44*fb+24,y:Ua+6,width:32,angle:5.87,fontSize:16,textAlign:"center",verticalAlign:"top"}))}))||
[]}(X,F,ha,K,Z)),(0,u.Z)(function(ya,Ha,Ua,Ea,Oa){var Za=(0,L.VL)(z(z({groupIds:[Ea],backgroundColor:Oa},D),{},{x:Ha-12,y:Ua-12,text:"0",textAlign:"right"}));return[Za,(0,L.VL)(z(z({groupIds:[Ea],backgroundColor:Oa},D),{},{x:Ha-12,y:Ua-256-Za.height/2,text:Math.max.apply(Math,(0,u.Z)(ya.values)).toLocaleString(),textAlign:"right"}))]}(X,F,ha,K,Z)),(0,u.Z)(function(ya,Ha,Ua,Ea,Oa){var Za=O(ya);ya=Za.chartWidth;Za=Za.chartHeight;return[(0,L.y8)(z(z({backgroundColor:Oa,groupIds:[Ea]},D),{},{type:"line",
x:Ha,y:Ua,startArrowhead:null,endArrowhead:null,width:ya,points:[[0,0],[ya,0]]})),(0,L.y8)(z(z({backgroundColor:Oa,groupIds:[Ea]},D),{},{type:"line",x:Ha,y:Ua,startArrowhead:null,endArrowhead:null,height:Za,points:[[0,0],[0,-Za]]})),(0,L.y8)(z(z({backgroundColor:Oa,groupIds:[Ea]},D),{},{type:"line",x:Ha,y:Ua-256-12,startArrowhead:null,endArrowhead:null,strokeStyle:"dotted",width:ya,opacity:50,points:[[0,0],[ya,0]]}))]}(X,F,ha,K,Z)))},ba=function(X,F,ha,K){return"line"===X?function(Z,ea,ca){var pa,
za=Math.max.apply(Math,(0,u.Z)(Z.values)),ya=(0,ma.kb)(),Ha=Q[Math.floor(Math.random()*Q.length)],Ua=0,Ea=[],Oa=w(Z.values);try{for(Oa.s();!(pa=Oa.n()).done;)Ea.push([44*Ua,-pa.value/za*256]),Ua++}catch(Ma){Oa.e(Ma)}finally{Oa.f()}pa=Math.max.apply(Math,(0,u.Z)(Ea.map(function(Ma){return Ma[0]})));Ua=Math.max.apply(Math,(0,u.Z)(Ea.map(function(Ma){return Ma[1]})));Oa=Math.min.apply(Math,(0,u.Z)(Ea.map(function(Ma){return Ma[0]})));var Za=Math.min.apply(Math,(0,u.Z)(Ea.map(function(Ma){return Ma[1]})));
Ea=(0,L.y8)(z(z({backgroundColor:Ha,groupIds:[ya]},D),{},{type:"line",x:ea+12+16,y:ca-12,startArrowhead:null,endArrowhead:null,height:Ua-Za,width:pa-Oa,strokeWidth:2,points:Ea}));pa=Z.values.map(function(Ma,fb){fb=44*fb+6;Ma=-Ma/za*256+6;return(0,L.Up)(z(z({backgroundColor:Ha,groupIds:[ya]},D),{},{fillStyle:"solid",strokeWidth:2,type:"ellipse",x:ea+fb+16,y:ca+Ma-24,width:12,height:12}))});Ua=Z.values.map(function(Ma,fb){fb=44*fb+6;Ma=Ma/za*256+18;return(0,L.y8)(z(z({backgroundColor:Ha,groupIds:[ya]},
D),{},{type:"line",x:ea+fb+16+6,y:ca-Ma,startArrowhead:null,endArrowhead:null,height:Ma,strokeStyle:"dotted",opacity:50,points:[[0,0],[0,Ma]]}))});return[].concat((0,u.Z)(P(Z,ea,ca,ya,Ha,"production"===ka.Vi.DEVELOPMENT)),[Ea],(0,u.Z)(Ua),(0,u.Z)(pa))}(F,ha,K):function(Z,ea,ca){var pa=Math.max.apply(Math,(0,u.Z)(Z.values)),za=(0,ma.kb)(),ya=Q[Math.floor(Math.random()*Q.length)],Ha=Z.values.map(function(Ua,Ea){Ua=Ua/pa*256;return(0,L.Up)(z(z({backgroundColor:ya,groupIds:[za]},D),{},{type:"rectangle",
x:ea+44*Ea+12,y:ca-Ua-12,width:32,height:Ua}))});return[].concat((0,u.Z)(Ha),(0,u.Z)(P(Z,ea,ca,za,ya,"production"===ka.Vi.DEVELOPMENT)))}(F,ha,K)}},8982:function(k,h,f){f.d(h,{X:function(){return x},f:function(){return J}});var w=f(56),x=function(z,u){if(null!=u&&u.collaborators&&(u=u.collaborators.get(z),null!=u&&u.color))return u.color;z=z.split("").reduce(function(n,R){return n+R.charCodeAt(0)},0);u=w.Z.elementBackground.slice(1);var t=w.Z.elementStroke.slice(1);return{background:u[z%u.length],
stroke:t[z%t.length]}},J=function(z){if(!z)return"?";z=z.trim().split(" ");return 2>z.length?z[0].substring(0,2).toUpperCase():(z[0][0]+z[z.length-1][0]).toUpperCase()}},6665:function(k,h,f){f.d(h,{dd:function(){return O},mQ:function(){return Q},uR:function(){return D},vQ:function(){return H},vt:function(){return fa},wx:function(){return Y}});var w=f(7169),x=f(8950);k=f(7945);var J=f.n(k),z=f(4162),u=f(5674),t=f(8288),n=f(1974),R=f(6340),ka="",L=!1,ma="clipboard"in navigator&&"readText"in navigator.clipboard,
Y="clipboard"in navigator&&"writeText"in navigator.clipboard,fa="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,H=function(){var P=(0,x.Z)(J().mark(function K(X,F,ha){var Z,ea;return J().wrap(function(ca){for(;;)switch(ca.prev=ca.next){case 0:return Z={type:t.r8.excalidrawClipboard,elements:X,files:ha?X.reduce(function(pa,za){return(0,n.wi)(za)&&ha[za.fileId]&&(pa[za.fileId]=ha[za.fileId]),pa},{}):void 0},ea=JSON.stringify(Z),
ka=ea,ca.prev=3,L=!1,ca.next=7,O(ea);case 7:ca.next=13;break;case 9:ca.prev=9,ca.t0=ca.catch(3),L=!0,console.error(ca.t0);case 13:case "end":return ca.stop()}},K,null,[[3,9]])}));return function(X,F,ha){return P.apply(this,arguments)}}(),aa=function(){if(!ka)return{};try{return JSON.parse(ka)}catch(P){return console.error(P),{}}},M=function(){var P=(0,x.Z)(J().mark(function F(X){var ha,K;return J().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(Z.prev=0,!X){Z.next=5;break}Z.t0=null===(ha=
X.clipboardData)||void 0===ha?void 0:ha.getData("text/plain").trim();Z.next=11;break;case 5:if(Z.t1=ma,!Z.t1){Z.next=10;break}return Z.next=9,navigator.clipboard.readText();case 9:Z.t1=Z.sent;case 10:Z.t0=Z.t1;case 11:return K=Z.t0,Z.abrupt("return",K||"");case 15:return Z.prev=15,Z.t2=Z.catch(0),Z.abrupt("return","");case 18:case "end":return Z.stop()}},F,null,[[0,15]])}));return function(X){return P.apply(this,arguments)}}(),Q=function(){var P=(0,x.Z)(J().mark(function F(X){var ha,K,Z,ea;return J().wrap(function(ca){for(;;)switch(ca.prev=
ca.next){case 0:return ca.next=2,M(X);case 2:if((ha=ca.sent)&&!ha.includes(z.oj)){ca.next=5;break}return ca.abrupt("return",aa());case 5:if(za=ha,ya=void 0,ya=(0,u.dz)(za),!(K=ya.type===u.i$?{spreadsheet:ya.spreadsheet}:null)){ca.next=8;break}return ca.abrupt("return",K);case 8:if(Z=aa(),ca.prev=9,ea=JSON.parse(ha),pa=ea,![t.r8.excalidraw,t.r8.excalidrawClipboard].includes(null==pa?void 0:pa.type)||!Array.isArray(pa.elements)){ca.next=13;break}return ca.abrupt("return",{elements:ea.elements,files:ea.files});
case 13:return ca.abrupt("return",Z);case 16:return ca.prev=16,ca.t0=ca.catch(9),ca.abrupt("return",L&&Z.elements?Z:{text:ha});case 19:case "end":return ca.stop()}var pa,za,ya},F,null,[[9,16]])}));return function(X){return P.apply(this,arguments)}}(),D=function(){var P=(0,x.Z)(J().mark(function F(X){var ha;return J().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:K.prev=0;ha=navigator.clipboard.write([new window.ClipboardItem((0,w.Z)({},t.LO.png,X))]);K.next=23;break;case 4:if(K.prev=4,K.t0=
K.catch(0),!(0,R.y8)(X)){K.next=22;break}return K.t1=navigator.clipboard,K.t2=window.ClipboardItem,K.t3=w.Z,K.t4={},K.t5=t.LO.png,K.next=14,X;case 14:return K.t6=K.sent,K.t7=(0,K.t3)(K.t4,K.t5,K.t6),K.t8=new K.t2(K.t7),K.t9=[K.t8],K.next=20,K.t1.write.call(K.t1,K.t9);case 20:K.next=23;break;case 22:throw K.t0;case 23:return K.next=25,ha;case 25:case "end":return K.stop()}},F,null,[[0,4]])}));return function(X){return P.apply(this,arguments)}}(),O=function(){var P=(0,x.Z)(J().mark(function F(X){var ha;
return J().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:if(ha=!1,!Y){K.next=11;break}return K.prev=2,K.next=5,navigator.clipboard.writeText(X||"");case 5:ha=!0;K.next=11;break;case 8:K.prev=8,K.t0=K.catch(2),console.error(K.t0);case 11:var Z;if(!(Z=ha)){var ea=X||" ",ca="rtl"===document.documentElement.getAttribute("dir");Z=document.createElement("textarea");Z.style.border="0";Z.style.padding="0";Z.style.margin="0";Z.style.position="absolute";Z.style[ca?"right":"left"]="-9999px";Z.style.top=
"".concat(window.pageYOffset||document.documentElement.scrollTop,"px");Z.style.fontSize="12pt";Z.setAttribute("readonly","");Z.value=ea;document.body.appendChild(Z);ea=!1;try{Z.select(),Z.setSelectionRange(0,Z.value.length),ea=document.execCommand("copy")}catch(pa){console.error(pa)}Z=(Z.remove(),ea)}if(Z){K.next=13;break}throw Error("couldn't copy");case 13:case "end":return K.stop()}},F,null,[[2,8]])}));return function(X){return P.apply(this,arguments)}}()},56:function(k,h,f){k=f(1930);var w=f(5284);
f=function(x){return[w.red[x],w.pink[x],w.grape[x],w.violet[x],w.indigo[x],w.blue[x],w.cyan[x],w.teal[x],w.green[x],w.lime[x],w.yellow[x],w.orange[x]]};h.Z={canvasBackground:[w.white,w.gray[0],w.gray[1]].concat((0,k.Z)(f(0))),elementBackground:["transparent",w.gray[4],w.gray[6]].concat((0,k.Z)(f(6))),elementStroke:[w.black,w.gray[8],w.gray[7]].concat((0,k.Z)(f(9)))}},9660:function(k,h,f){function w(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);
fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function x(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?w(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):w(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}
function J(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function z(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?J(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):J(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,
ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function u(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function t(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?u(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,
Object.getOwnPropertyDescriptors(dc)):u(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function n(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function R(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?n(Object(dc),
!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):n(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function ka(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function L(Qb){for(var fc=
1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?ka(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):ka(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function ma(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,
Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function Y(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?ma(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):ma(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function fa(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=
Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function H(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?fa(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):fa(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,
ja))})}return Qb}function aa(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function M(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?aa(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):
aa(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function Q(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function D(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?Q(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,
ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):Q(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function O(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function P(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=
null!=arguments[fc]?arguments[fc]:{};fc%2?O(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):O(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function ba(Qb,fc){var dc="undefined"!=typeof Symbol&&Qb[Symbol.iterator]||Qb["@@iterator"];if(!dc){if(Array.isArray(Qb)||(dc=function(zb,Pb){if(zb){if("string"==typeof zb)return X(zb,
Pb);var sb=Object.prototype.toString.call(zb).slice(8,-1);"Object"===sb&&zb.constructor&&(sb=zb.constructor.name);if("Map"===sb||"Set"===sb)return Array.from(zb);if("Arguments"===sb||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(sb))return X(zb,Pb)}}(Qb))||fc&&Qb&&"number"==typeof Qb.length){dc&&(Qb=dc);var ja=0;fc=function(){};return{s:fc,n:function(){return ja>=Qb.length?{done:!0}:{done:!1,value:Qb[ja++]}},e:function(zb){throw zb;},f:fc}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}var Fb,Tb=!0,wb=!1;return{s:function(){dc=dc.call(Qb)},n:function(){var zb=dc.next();return Tb=zb.done,zb},e:function(zb){wb=!0;Fb=zb},f:function(){try{Tb||null==dc.return||dc.return()}finally{if(wb)throw Fb;}}}}function X(Qb,fc){(null==fc||fc>Qb.length)&&(fc=Qb.length);for(var dc=0,ja=Array(fc);dc<fc;dc++)ja[dc]=Qb[dc];return ja}function F(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,
Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function ha(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?F(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):F(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function K(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=
Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function Z(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?K(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):K(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,
ja))})}return Qb}function ea(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function ca(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?ea(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):
ea(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function pa(Qb,fc){var dc="undefined"!=typeof Symbol&&Qb[Symbol.iterator]||Qb["@@iterator"];if(!dc){if(Array.isArray(Qb)||(dc=function(zb,Pb){if(zb){if("string"==typeof zb)return za(zb,Pb);var sb=Object.prototype.toString.call(zb).slice(8,-1);"Object"===sb&&zb.constructor&&(sb=zb.constructor.name);if("Map"===sb||"Set"===sb)return Array.from(zb);if("Arguments"===sb||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(sb))return za(zb,
Pb)}}(Qb))||fc&&Qb&&"number"==typeof Qb.length){dc&&(Qb=dc);var ja=0;fc=function(){};return{s:fc,n:function(){return ja>=Qb.length?{done:!0}:{done:!1,value:Qb[ja++]}},e:function(zb){throw zb;},f:fc}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var Fb,Tb=!0,wb=!1;return{s:function(){dc=dc.call(Qb)},n:function(){var zb=dc.next();return Tb=zb.done,zb},e:function(zb){wb=!0;Fb=zb},f:function(){try{Tb||
null==dc.return||dc.return()}finally{if(wb)throw Fb;}}}}function za(Qb,fc){(null==fc||fc>Qb.length)&&(fc=Qb.length);for(var dc=0,ja=Array(fc);dc<fc;dc++)ja[dc]=Qb[dc];return ja}function ya(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function Ha(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:
{};fc%2?ya(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):ya(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function Ua(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,
ja)}return dc}function Ea(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?Ua(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):Ua(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function Oa(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);
fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function Za(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?Oa(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):Oa(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}
function Ma(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function fb(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?Ma(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):
Ma(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function eb(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function Na(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?eb(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,
ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):eb(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function oa(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function Ca(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=
null!=arguments[fc]?arguments[fc]:{};fc%2?oa(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):oa(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function ra(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,
Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function Aa(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?ra(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):ra(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function Ja(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=
Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function Sa(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?Ja(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):Ja(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,
ja))})}return Qb}function Bb(Qb,fc){var dc="undefined"!=typeof Symbol&&Qb[Symbol.iterator]||Qb["@@iterator"];if(!dc){if(Array.isArray(Qb)||(dc=function(zb,Pb){if(zb){if("string"==typeof zb)return ib(zb,Pb);var sb=Object.prototype.toString.call(zb).slice(8,-1);"Object"===sb&&zb.constructor&&(sb=zb.constructor.name);if("Map"===sb||"Set"===sb)return Array.from(zb);if("Arguments"===sb||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(sb))return ib(zb,Pb)}}(Qb))||fc&&Qb&&"number"==typeof Qb.length){dc&&
(Qb=dc);var ja=0;fc=function(){};return{s:fc,n:function(){return ja>=Qb.length?{done:!0}:{done:!1,value:Qb[ja++]}},e:function(zb){throw zb;},f:fc}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var Fb,Tb=!0,wb=!1;return{s:function(){dc=dc.call(Qb)},n:function(){var zb=dc.next();return Tb=zb.done,zb},e:function(zb){wb=!0;Fb=zb},f:function(){try{Tb||null==dc.return||dc.return()}finally{if(wb)throw Fb;
}}}}function ib(Qb,fc){(null==fc||fc>Qb.length)&&(fc=Qb.length);for(var dc=0,ja=Array(fc);dc<fc;dc++)ja[dc]=Qb[dc];return ja}function Ob(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function Wb(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?Ob(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,
ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):Ob(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function ic(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function Pa(Qb,fc){var dc=Object.keys(Qb);
if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function nb(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function ob(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?
arguments[fc]:{};fc%2?nb(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):nb(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function Zb(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));
dc.push.apply(dc,ja)}return dc}function Jc(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?Zb(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):Zb(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function ad(Qb,fc){var dc="undefined"!=typeof Symbol&&Qb[Symbol.iterator]||Qb["@@iterator"];
if(!dc){if(Array.isArray(Qb)||(dc=function(zb,Pb){if(zb){if("string"==typeof zb)return Nc(zb,Pb);var sb=Object.prototype.toString.call(zb).slice(8,-1);"Object"===sb&&zb.constructor&&(sb=zb.constructor.name);if("Map"===sb||"Set"===sb)return Array.from(zb);if("Arguments"===sb||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(sb))return Nc(zb,Pb)}}(Qb))||fc&&Qb&&"number"==typeof Qb.length){dc&&(Qb=dc);var ja=0;fc=function(){};return{s:fc,n:function(){return ja>=Qb.length?{done:!0}:{done:!1,value:Qb[ja++]}},
e:function(zb){throw zb;},f:fc}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var Fb,Tb=!0,wb=!1;return{s:function(){dc=dc.call(Qb)},n:function(){var zb=dc.next();return Tb=zb.done,zb},e:function(zb){wb=!0;Fb=zb},f:function(){try{Tb||null==dc.return||dc.return()}finally{if(wb)throw Fb;}}}}function Nc(Qb,fc){(null==fc||fc>Qb.length)&&(fc=Qb.length);for(var dc=0,ja=Array(fc);dc<fc;dc++)ja[dc]=
Qb[dc];return ja}function Gb(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function xc(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function Wc(Qb){for(var fc=
1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?xc(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):xc(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function hd(Qb,fc){var dc="undefined"!=typeof Symbol&&Qb[Symbol.iterator]||Qb["@@iterator"];if(!dc){if(Array.isArray(Qb)||(dc=function(zb,Pb){if(zb){if("string"==
typeof zb)return Nd(zb,Pb);var sb=Object.prototype.toString.call(zb).slice(8,-1);"Object"===sb&&zb.constructor&&(sb=zb.constructor.name);if("Map"===sb||"Set"===sb)return Array.from(zb);if("Arguments"===sb||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(sb))return Nd(zb,Pb)}}(Qb))||fc&&Qb&&"number"==typeof Qb.length){dc&&(Qb=dc);var ja=0;fc=function(){};return{s:fc,n:function(){return ja>=Qb.length?{done:!0}:{done:!1,value:Qb[ja++]}},e:function(zb){throw zb;},f:fc}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}var Fb,Tb=!0,wb=!1;return{s:function(){dc=dc.call(Qb)},n:function(){var zb=dc.next();return Tb=zb.done,zb},e:function(zb){wb=!0;Fb=zb},f:function(){try{Tb||null==dc.return||dc.return()}finally{if(wb)throw Fb;}}}}function Nd(Qb,fc){(null==fc||fc>Qb.length)&&(fc=Qb.length);for(var dc=0,ja=Array(fc);dc<fc;dc++)ja[dc]=Qb[dc];return ja}function Ld(Qb,fc){var dc=Object.keys(Qb);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(Qb);fc&&(ja=ja.filter(function(Fb){return Object.getOwnPropertyDescriptor(Qb,
Fb).enumerable}));dc.push.apply(dc,ja)}return dc}function pc(Qb){for(var fc=1;fc<arguments.length;fc++){var dc=null!=arguments[fc]?arguments[fc]:{};fc%2?Ld(Object(dc),!0).forEach(function(ja){(0,ld.Z)(Qb,ja,dc[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qb,Object.getOwnPropertyDescriptors(dc)):Ld(Object(dc)).forEach(function(ja){Object.defineProperty(Qb,ja,Object.getOwnPropertyDescriptor(dc,ja))})}return Qb}function Ed(Qb){var fc=function(){if("undefined"==typeof Reflect||!Reflect.construct||
Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(dc){return!1}}();return function(){var dc=(0,mb.Z)(Qb);if(fc){var ja=(0,mb.Z)(this).constructor;dc=Reflect.construct(dc,arguments,ja)}else dc=dc.apply(this,arguments);return(0,qb.Z)(this,dc)}}f.d(h,{ZP:function(){return Qi},Fy:function(){return gj},J0:function(){return mk}});var xd=f(6655),Yd=f(2577),ud=f(1930),Qd=f(8950),ld=f(7169),Sd=
f(8821),Nb=f(5169),gc=f(3173),Yb=f(2248),qb=f(7245),mb=f(2312),cc=f(7945),uc=f.n(cc),Uc=f(9787),cd=f.n(Uc),Od=f(8234),be=f(45),oe=f(5605),rd=f(75),vc=f(6066),Mc=f(1319),Me=f(3646),qc=f(8211),Le=f(7901),Sb=f(5118),Lc=f(1935),Ub=f(242),ed=f(6938),pe=f(8290),le=f(1974),Dc=f(6340),Cb=f(4512),Kd=function(Qb,fc){return Qb.editingGroupId&&(fc=(0,Ub.Fb)((0,Sb.Lm)(fc),Qb.editingGroupId),fc.length)?x(x({},Qb),{},{selectedElementIds:(0,ld.Z)({},fc[0].id,!0)}):Qb},ce=(0,Le.z)({name:"deleteSelectedElements",trackEvent:{category:"element",
action:"delete"},perform:function(Qb,fc){if(fc.editingLinearElement){var dc=fc.editingLinearElement,ja=dc.selectedPointsIndices,Fb=dc.startBindingElement,Tb=dc.endBindingElement,wb=ed._.getElement(dc.elementId);if(!wb)return!1;if(null==ja||2>wb.points.length)return Qb=Qb.filter(function(zb){return zb.id!==wb.id}),{elements:Qb,appState:x(x({},Kd(fc,Qb)),{},{editingLinearElement:null}),commitToHistory:!1};dc={startBindingElement:null!=ja&&ja.includes(0)?null:Fb,endBindingElement:null!=ja&&ja.includes(wb.points.length-
1)?null:Tb};return ed._.deletePoints(wb,ja),{elements:Qb,appState:x(x({},fc),{},{editingLinearElement:x(x(x({},fc.editingLinearElement),dc),{},{selectedPointsIndices:0<(null==ja?void 0:ja[0])?[ja[0]-1]:[0]})}),commitToHistory:!0}}dc=function(zb,Pb){return{elements:zb.map(function(sb){return Pb.selectedElementIds[sb.id]||(0,le.Xh)(sb)&&Pb.selectedElementIds[sb.containerId]?(0,Lc.BE)(sb,{isDeleted:!0}):sb}),appState:x(x({},Pb),{},{selectedElementIds:{}})}}(Qb,fc);ja=dc.elements;dc=dc.appState;return(0,pe.$q)(ja,
Qb.filter(function(zb){return fc.selectedElementIds[zb.id]})),{elements:ja,appState:x(x({},dc=Kd(dc,ja)),{},{activeTool:(0,Dc.Om)(fc,{type:"selection"}),multiElement:null}),commitToHistory:(0,rd.N)((0,Sb.Lm)(Qb),fc)}},contextItemLabel:"labels.delete",keyTest:function(Qb){return Qb.key===vc.tW.BACKSPACE||Qb.key===vc.tW.DELETE},PanelComponent:function(Qb){var fc=Qb.elements,dc=Qb.appState,ja=Qb.updateData;return(0,Cb.jsx)(Mc.V,{type:"button",icon:Me._I,title:(0,qc.t)("labels.delete"),"aria-label":(0,qc.t)("labels.delete"),
onClick:function(){return ja(null)},visible:(0,rd.N)((0,Sb.Lm)(fc),dc)})}}),pd=f(1564),mc=function(Qb,fc){var dc=[],ja=[],Fb=null,Tb=-1;for(fc=(0,Dc.xn)((0,rd.eD)(Qb,fc,!0));++Tb<Qb.length;)fc.get(Qb[Tb].id)?(ja.length&&(dc=dc.concat(ja),ja=[]),dc.push(Tb),Fb=Tb+1):Qb[Tb].isDeleted&&Fb===Tb?(Fb=Tb+1,ja.push(Tb)):ja=[];return dc},Ne=function(Qb,fc,dc){if("containerId"in Qb&&Qb.containerId){if("left"!==dc||(Qb=pd.Z.getScene(Qb).getElement(Qb.containerId)))return fc.indexOf(Qb)}else{var ja,Fb,Tb=null===
(ja=Qb.boundElements)||void 0===ja||null===(Fb=ja.find(function(wb){return"arrow"!==wb.type}))||void 0===Fb?void 0:Fb.id;if(Tb&&("left"===dc||(Qb=pd.Z.getScene(Qb).getElement(Tb))))return fc.indexOf(Qb)}},Wf=function(Qb,fc){return fc.reduce(function(dc,ja){ja=Qb[ja];return dc[ja.id]=ja,dc},{})},cf=function(Qb,fc,dc){var ja,Fb=mc(fc,Qb),Tb=Wf(fc,Fb),wb=(ja=0,Fb.reduce(function(zb,Pb,sb){return 0<sb&&Fb[sb-1]!==Pb-1&&(ja=++ja),(zb[ja]||(zb[ja]=[])).push(Pb),zb},[]));return"right"===dc&&(wb=wb.reverse()),
wb.forEach(function(zb,Pb){Pb=zb[0];zb=zb[zb.length-1];var sb="left"===dc?Pb:zb,Mb=function(Bc,Pc,Tc,wd){var Rd,Gd=Pc[Tc],Cd=function(xe){return!xe.isDeleted&&(!Bc.editingGroupId||xe.groupIds.includes(Bc.editingGroupId))};Tc="left"===wd?(0,Dc.qr)(Pc,Cd,Math.max(0,Tc-1)):(0,Dc.cx)(Pc,Cd,Tc+1);Cd=Pc[Tc];if(!Cd)return-1;if(Bc.editingGroupId){var Id;if((null==Gd?void 0:Gd.groupIds.join(""))===(null==Cd?void 0:Cd.groupIds.join("")))return null!==(Id=Ne(Cd,Pc,wd))&&void 0!==Id?Id:Tc;if(null==Cd||!Cd.groupIds.includes(Bc.editingGroupId))return-1}if(!Cd.groupIds.length)return null!==
(Rd=Ne(Cd,Pc,wd))&&void 0!==Rd?Rd:Tc;Rd=Bc.editingGroupId?Cd.groupIds[Cd.groupIds.indexOf(Bc.editingGroupId)-1]:Cd.groupIds[Cd.groupIds.length-1];Rd=(0,Ub.Fb)(Pc,Rd);return Rd.length?"left"===wd?Pc.indexOf(Rd[0]):Pc.indexOf(Rd[Rd.length-1]):Tc}(Qb,fc,sb,dc);if(-1!==Mb&&sb!==Mb){sb="left"===dc?fc.slice(0,Mb):fc.slice(0,Pb);var $b=fc.slice(Pb,zb+1);Pb="left"===dc?fc.slice(Mb,Pb):fc.slice(zb+1,Mb+1);zb="left"===dc?fc.slice(zb+1):fc.slice(Mb+1);fc="left"===dc?[].concat((0,ud.Z)(sb),(0,ud.Z)($b),(0,ud.Z)(Pb),
(0,ud.Z)(zb)):[].concat((0,ud.Z)(sb),(0,ud.Z)(Pb),(0,ud.Z)($b),(0,ud.Z)(zb))}}),fc.map(function(zb){return Tb[zb.id]?(0,Lc.ZP)(zb):zb})},pg=function(Qb,fc,dc){var ja=mc(Qb,fc),Fb=Wf(Qb,ja),Tb=[];if("left"===dc){if(fc.editingGroupId){fc=(0,Ub.Fb)(Qb,fc.editingGroupId);if(!fc.length)return Qb;var wb=Qb.indexOf(fc[0])}else wb=0;fc=ja[ja.length-1]}else{if(fc.editingGroupId){fc=(0,Ub.Fb)(Qb,fc.editingGroupId);if(!fc.length)return Qb;fc=Qb.indexOf(fc[fc.length-1])}else fc=Qb.length-1;wb=ja[0]}for(var zb=
wb;zb<fc+1;zb++)ja.includes(zb)||Tb.push(Qb[zb]);ja=Object.values(Fb).map(function(Pb){return(0,Lc.ZP)(Pb)});Fb=Qb.slice(0,wb);Qb=Qb.slice(fc+1);return"left"===dc?[].concat((0,ud.Z)(Fb),(0,ud.Z)(ja),Tb,(0,ud.Z)(Qb)):[].concat((0,ud.Z)(Fb),Tb,(0,ud.Z)(ja),(0,ud.Z)(Qb))},bb=(0,Le.z)({name:"sendBackward",trackEvent:{category:"element"},perform:function(Qb,fc){return{elements:cf(fc,Qb,"left"),appState:fc,commitToHistory:!0}},contextItemLabel:"labels.sendBackward",keyPriority:40,keyTest:function(Qb){return Qb[vc.tW.CTRL_OR_CMD]&&
!Qb.shiftKey&&Qb.code===vc.aU.BRACKET_LEFT},PanelComponent:function(Qb){var fc=Qb.updateData;Qb=Qb.appState;return(0,Cb.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return fc(null)},title:"".concat((0,qc.t)("labels.sendBackward")," — ").concat((0,Dc.uY)("CtrlOrCmd+[")),children:(0,Cb.jsx)(Me.Gc,{theme:Qb.theme})})}}),Db=(0,Le.z)({name:"bringForward",trackEvent:{category:"element"},perform:function(Qb,fc){return{elements:cf(fc,Qb,"right"),appState:fc,commitToHistory:!0}},
contextItemLabel:"labels.bringForward",keyPriority:40,keyTest:function(Qb){return Qb[vc.tW.CTRL_OR_CMD]&&!Qb.shiftKey&&Qb.code===vc.aU.BRACKET_RIGHT},PanelComponent:function(Qb){var fc=Qb.updateData;Qb=Qb.appState;return(0,Cb.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return fc(null)},title:"".concat((0,qc.t)("labels.bringForward")," — ").concat((0,Dc.uY)("CtrlOrCmd+]")),children:(0,Cb.jsx)(Me.t5,{theme:Qb.theme})})}}),db=(0,Le.z)({name:"sendToBack",trackEvent:{category:"element"},
perform:function(Qb,fc){return{elements:pg(Qb,fc,"left"),appState:fc,commitToHistory:!0}},contextItemLabel:"labels.sendToBack",keyTest:function(Qb){return vc.Um?Qb[vc.tW.CTRL_OR_CMD]&&Qb.altKey&&Qb.code===vc.aU.BRACKET_LEFT:Qb[vc.tW.CTRL_OR_CMD]&&Qb.shiftKey&&Qb.code===vc.aU.BRACKET_LEFT},PanelComponent:function(Qb){var fc=Qb.updateData;Qb=Qb.appState;return(0,Cb.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return fc(null)},title:"".concat((0,qc.t)("labels.sendToBack"),
" — ").concat(vc.Um?(0,Dc.uY)("CtrlOrCmd+Alt+["):(0,Dc.uY)("CtrlOrCmd+Shift+[")),children:(0,Cb.jsx)(Me.pw,{theme:Qb.theme})})}}),Eb=(0,Le.z)({name:"bringToFront",trackEvent:{category:"element"},perform:function(Qb,fc){return{elements:pg(Qb,fc,"right"),appState:fc,commitToHistory:!0}},contextItemLabel:"labels.bringToFront",keyTest:function(Qb){return vc.Um?Qb[vc.tW.CTRL_OR_CMD]&&Qb.altKey&&Qb.code===vc.aU.BRACKET_RIGHT:Qb[vc.tW.CTRL_OR_CMD]&&Qb.shiftKey&&Qb.code===vc.aU.BRACKET_RIGHT},PanelComponent:function(Qb){var fc=
Qb.updateData;Qb=Qb.appState;return(0,Cb.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(dc){return fc(null)},title:"".concat((0,qc.t)("labels.bringToFront")," — ").concat(vc.Um?(0,Dc.uY)("CtrlOrCmd+Alt+]"):(0,Dc.uY)("CtrlOrCmd+Shift+]")),children:(0,Cb.jsx)(Me.IN,{theme:Qb.theme})})}}),hc=(0,Le.z)({name:"selectAll",trackEvent:{category:"canvas"},perform:function(Qb,fc){return!fc.editingLinearElement&&{appState:(0,Ub.bO)(z(z({},fc),{},{editingGroupId:null,selectedElementIds:Qb.reduce(function(dc,
ja){return ja.isDeleted||(0,Sb.iB)(ja)&&ja.containerId||!1!==ja.locked||(dc[ja.id]=!0),dc},{})}),(0,Sb.Lm)(Qb)),commitToHistory:!0}},contextItemLabel:"labels.selectAll",keyTest:function(Qb){return Qb[vc.tW.CTRL_OR_CMD]&&Qb.key===vc.tW.A}}),jb=f(8288),gd=f(5710),Dd=(0,Le.z)({name:"duplicateSelection",trackEvent:{category:"element"},perform:function(Qb,fc){return fc.editingLinearElement?(fc=ed._.duplicateSelectedPoints(fc),!!fc&&{elements:Qb,appState:fc.appState,commitToHistory:!0}):t(t({},ke(Qb,fc)),
{},{commitToHistory:!0})},contextItemLabel:"labels.duplicateSelection",keyTest:function(Qb){return Qb[vc.tW.CTRL_OR_CMD]&&Qb.key===vc.tW.D},PanelComponent:function(Qb){var fc=Qb.elements,dc=Qb.appState,ja=Qb.updateData;return(0,Cb.jsx)(Mc.V,{type:"button",icon:Me.d9,title:"".concat((0,qc.t)("labels.duplicateSelection")," — ").concat((0,Dc.uY)("CtrlOrCmd+D")),"aria-label":(0,qc.t)("labels.duplicateSelection"),onClick:function(){return ja(null)},visible:(0,rd.N)((0,Sb.Lm)(fc),dc)})}}),ke=function(Qb,
fc){for(var dc=new Map,ja=[],Fb=[],Tb=new Map,wb=function(Bc){var Pc=(0,Sb.Sy)(fc.editingGroupId,dc,Bc,{x:Bc.x+jb.k/2,y:Bc.y+jb.k/2});return Tb.set(Bc.id,Pc.id),Fb.push(Bc),ja.push(Pc),Pc},zb=[],Pb=0,sb=(0,Dc.xn)((0,rd.eD)(Qb,fc,!0));Pb<Qb.length;){var Mb=Qb[Pb];if(sb.get(Mb.id)){if(Mb.groupIds.length){var $b=(0,Ub.yO)(fc,Mb);if($b){Mb=(0,Ub.Fb)(Qb,$b);zb.push.apply(zb,(0,ud.Z)(Mb).concat((0,ud.Z)(Mb.map(function(Bc){return wb(Bc)}))));Pb+=Mb.length;continue}}zb.push(Mb,wb(Mb))}else zb.push(Mb);Pb++}return(0,gd.P7)(zb,
Fb,Tb),(0,pe.ek)(zb,Fb,Tb),{elements:zb,appState:(0,Ub.bO)(t(t({},fc),{},{selectedGroupIds:{},selectedElementIds:ja.reduce(function(Bc,Pc){return(0,le.Xh)(Pc)||(Bc[Pc.id]=!0),Bc},{})}),(0,Sb.Lm)(zb))}},Xd=(f(3917),f(828),f(6552)),Xe=(0,Le.z)({name:"finalize",trackEvent:!1,perform:function(Qb,fc,dc,ja){var Fb;dc=ja.canvas;var Tb=ja.focusContainer;ja=ja.scene;if(fc.editingLinearElement){var wb=fc.editingLinearElement,zb=wb.startBindingElement,Pb=wb.endBindingElement,sb=ed._.getElement(wb.elementId);
if(sb)return(0,le.Mn)(sb)&&(0,pe.HG)(sb,zb,Pb),{elements:2>sb.points.length||(0,Sb.QD)(sb)?Qb.filter(function(Pc){return Pc.id!==sb.id}):void 0,appState:R(R({},fc),{},{cursorButton:"up",editingLinearElement:null}),commitToHistory:!0}}(ja=fc.pendingImageElementId&&ja.getElement(fc.pendingImageElementId))&&(0,Lc.DR)(ja,{isDeleted:!0},!1);window.document.activeElement instanceof HTMLElement&&Tb();var Mb;if(Tb=fc.multiElement?fc.multiElement:"freedraw"===(null===(Fb=fc.editingElement)||void 0===Fb?void 0:
Fb.type)?fc.editingElement:null){"freedraw"!==Tb.type&&"touch"!==fc.lastPointerDownWith&&(Fb=Tb.points,(ja=Tb.lastCommittedPoint)&&Fb[Fb.length-1]===ja||(0,Lc.DR)(Tb,{points:Tb.points.slice(0,-1)}));(0,Sb.QD)(Tb)&&(Qb=Qb.slice(0,-1));Fb=(0,Xd.g6)(Tb.points,fc.zoom.value);if(("line"===Tb.type||"freedraw"===Tb.type)&&Fb){var $b=Tb.points,Bc=$b[0];(0,Lc.DR)(Tb,{points:$b.map(function(Pc,Tc){return Tc===$b.length-1?[Bc[0],Bc[1]]:Pc})})}(0,le.Mn)(Tb)&&!Fb&&1<Tb.points.length&&(Fb=ed._.getPointAtIndexGlobalCoordinates(Tb,
-1),ja=(0,Yd.Z)(Fb,2),Fb=ja[0],ja=ja[1],(0,pe.R)(Tb,fc,pd.Z.getScene(Tb),{x:Fb,y:ja}));fc.activeTool.locked||"freedraw"===fc.activeTool.type||(fc.selectedElementIds[Tb.id]=!0)}return(fc.activeTool.locked||"freedraw"===fc.activeTool.type)&&Tb||(0,Dc.z8)(dc),Mb="eraser"===fc.activeTool.type?(0,Dc.Om)(fc,R(R({},fc.activeTool.lastActiveToolBeforeEraser||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(0,Dc.Om)(fc,{type:"selection"}),{elements:Qb,appState:R(R({},fc),{},{cursorButton:"up",activeTool:(fc.activeTool.locked||
"freedraw"===fc.activeTool.type)&&Tb?fc.activeTool:Mb,draggingElement:null,multiElement:null,editingElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:Tb&&!fc.activeTool.locked&&"freedraw"!==fc.activeTool.type?R(R({},fc.selectedElementIds),{},(0,ld.Z)({},Tb.id,!0)):fc.selectedElementIds,pendingImageElementId:null}),commitToHistory:"freedraw"===fc.activeTool.type}},keyTest:function(Qb,fc){return Qb.key===vc.tW.ESCAPE&&(null!==fc.editingLinearElement||!fc.draggingElement&&null===
fc.multiElement)||(Qb.key===vc.tW.ESCAPE||Qb.key===vc.tW.ENTER)&&null!==fc.multiElement},PanelComponent:function(Qb){var fc=Qb.appState,dc=Qb.updateData;Qb=Qb.data;return(0,Cb.jsx)(Mc.V,{type:"button",icon:Me.$c,title:(0,qc.t)("buttons.done"),"aria-label":(0,qc.t)("buttons.done"),onClick:dc,visible:null!=fc.multiElement,size:(null==Qb?void 0:Qb.size)||"medium"})}}),qe=(f(518),f(9966),function(Qb){var fc=mk().id,dc=(0,Uc.useState)(Qb.value);dc=(0,Yd.Z)(dc,2);var ja=dc[0],Fb=dc[1];return(0,Cb.jsxs)("div",
{className:"ProjectName",children:[(0,Cb.jsx)("label",{className:"ProjectName-label",htmlFor:"filename",children:"".concat(Qb.label).concat(Qb.isNameEditable?"":":")}),Qb.isNameEditable?(0,Cb.jsx)("input",{type:"text",className:"TextInput",onBlur:function(Tb){(0,Dc.qz)(Tb.target);Tb=Tb.target.value;Tb!==Qb.value&&Qb.onChange(Tb)},onKeyDown:function(Tb){"Enter"!==Tb.key||(Tb.preventDefault(),Tb.nativeEvent.isComposing||229===Tb.keyCode)||Tb.currentTarget.blur()},id:"".concat(fc,"-filename"),value:ja,
onChange:function(Tb){return Fb(Tb.target.value)}}):(0,Cb.jsx)("span",{className:"TextInput TextInput--readonly",id:"".concat(fc,"-filename"),children:Qb.value})]})}),ff=(f(5422),f(9910)),vg=f(4041),uf=f(6665),Ab=f(4162),sa=f(434),qa=f(1393),Ia=f(5523),cb=function(){var Qb=(0,Qd.Z)(uc().mark(function zb(dc,ja,Fb,Tb,wb){var Pb,sb,Mb,$b,Bc,Pc,Tc,wd,Rd,Gd,Cd;return uc().wrap(function(Id){for(;;)switch(Id.prev=Id.next){case 0:if(Pb=wb.exportBackground,sb=wb.exportPadding,Mb=void 0===sb?jb.qy:sb,$b=wb.viewBackgroundColor,
Bc=wb.name,Pc=wb.fileHandle,Tc=void 0===Pc?null:Pc,0!==ja.length){Id.next=3;break}throw Error((0,qc.t)("alerts.cannotExportEmptyCanvas"));case 3:if("svg"!==dc&&"clipboard-svg"!==dc){Id.next=17;break}return Id.next=6,(0,Ab.$D)(ja,{exportBackground:Pb,exportWithDarkMode:Fb.exportWithDarkMode,viewBackgroundColor:$b,exportPadding:Mb,exportScale:Fb.exportScale,exportEmbedScene:Fb.exportEmbedScene&&"svg"===dc},Tb);case 6:if(wd=Id.sent,"svg"!==dc){Id.next=13;break}return Id.next=10,(0,qa.NL)(new Blob([wd.outerHTML],
{type:jb.LO.svg}),{description:"Export to SVG",name:Bc,extension:Fb.exportEmbedScene?"excalidraw.svg":"svg",fileHandle:Tc});case 10:return Id.abrupt("return",Id.sent);case 13:if("clipboard-svg"!==dc){Id.next=17;break}return Id.next=16,(0,uf.dd)(wd.outerHTML);case 16:return Id.abrupt("return");case 17:return Id.next=19,(0,Ab.NL)(ja,Fb,Tb,{exportBackground:Pb,viewBackgroundColor:$b,exportPadding:Mb});case 19:if((Rd=Id.sent).style.display="none",document.body.appendChild(Rd),"png"!==dc){Id.next=38;break}return Id.next=
25,(0,sa._c)(Rd);case 25:if(Gd=Id.sent,Rd.remove(),!Fb.exportEmbedScene){Id.next=33;break}return Id.next=30,Promise.resolve().then(f.bind(f,673));case 30:return Id.next=32,Id.sent.encodePngMetadata({blob:Gd,metadata:(0,Ia.I_)(ja,Fb,Tb,"local")});case 32:Gd=Id.sent;case 33:return Id.next=35,(0,qa.NL)(Gd,{description:"Export to PNG",name:Bc,extension:Fb.exportEmbedScene?"excalidraw.png":"png",fileHandle:Tc});case 35:return Id.abrupt("return",Id.sent);case 38:if("clipboard"!==dc){Id.next=55;break}return Id.prev=
39,Cd=(0,sa._c)(Rd),Id.next=43,(0,uf.uR)(Cd);case 43:Id.next=50;break;case 45:if(Id.prev=45,Id.t0=Id.catch(39),"CANVAS_POSSIBLY_TOO_BIG"!==Id.t0.name){Id.next=49;break}throw Id.t0;case 49:throw Error((0,qc.t)("alerts.couldNotCopyToClipboard"));case 50:return Id.prev=50,Rd.remove(),Id.finish(50);case 53:Id.next=57;break;case 55:throw Rd.remove(),Error("Unsupported export type");case 57:case "end":return Id.stop()}},zb,null,[[39,45,50,53]])}));return function(dc,ja,Fb,Tb,wb){return Qb.apply(this,arguments)}}(),
Jb=function(){var Qb=(0,Qd.Z)(uc().mark(function Tb(dc,ja,Fb){var wb,zb,Pb,sb,Mb,$b;return uc().wrap(function(Bc){for(;;)switch(Bc.prev=Bc.next){case 0:if(zb=(wb=ja).exportBackground,Pb=wb.viewBackgroundColor,sb=wb.name,Mb=wb.fileHandle,$b=(0,sa.Qk)(Mb),Mb&&(0,sa.DQ)($b)){Bc.next=4;break}throw Error("fileHandle should exist and should be of type svg or png when resaving");case 4:return ja=L(L({},ja),{},{exportEmbedScene:!0}),Bc.next=7,cb($b,(0,Sb.Lm)(dc),ja,Fb,{exportBackground:zb,viewBackgroundColor:Pb,
name:sb,fileHandle:Mb});case 7:return Bc.abrupt("return",{fileHandle:Mb});case 8:case "end":return Bc.stop()}},Tb)}));return function(dc,ja,Fb){return Qb.apply(this,arguments)}}(),lc=(f(7225),function(Qb){var fc=Qb.children,dc=Qb.checked,ja=Qb.onChange;return(0,Cb.jsxs)("div",{className:(0,be.Z)("Checkbox",Qb.className,{"is-checked":dc}),onClick:function(Fb){ja(!dc,Fb);Fb.currentTarget.querySelector(".Checkbox-box").focus()},children:[(0,Cb.jsx)("button",{className:"Checkbox-box",role:"checkbox",
"aria-checked":dc,children:Me.eQ}),(0,Cb.jsx)("div",{className:"Checkbox-label",children:fc})]})});f(4623);var Sc=function(Qb){var fc=Qb.children,dc=Qb.gap,ja=Qb.align,Fb=Qb.justifyContent,Tb=Qb.style;return(0,Cb.jsx)("div",{className:(0,be.Z)("Stack Stack_horizontal",Qb.className),style:Y({"--gap":dc,alignItems:ja,justifyContent:Fb},Tb),children:fc})},kd=function(Qb){var fc=Qb.children,dc=Qb.gap,ja=Qb.align,Fb=Qb.justifyContent,Tb=Qb.style;return(0,Cb.jsx)("div",{className:(0,be.Z)("Stack Stack_vertical",
Qb.className),style:Y({"--gap":dc,justifyItems:ja,justifyContent:Fb},Tb),children:fc})},ve=(f(554),function(Qb){var fc=Qb.onSave;return(0,Cb.jsxs)(Sc,{className:"ActiveFile",gap:1,align:"center",children:[(0,Cb.jsxs)("span",{className:"ActiveFile__fileName",children:[Me.tP,(0,Cb.jsx)("span",{children:Qb.fileName})]}),(0,Cb.jsx)(Mc.V,{type:"icon",icon:Me.a1,title:(0,qc.t)("buttons.save"),"aria-label":(0,qc.t)("buttons.save"),onClick:fc,"data-testid":"save-button"})]})});(0,Le.z)({name:"changeProjectName",
trackEvent:!1,perform:function(Qb,fc,dc){return{appState:H(H({},fc),{},{name:dc}),commitToHistory:!1}},PanelComponent:function(Qb){var fc=Qb.appState,dc=Qb.updateData;Qb=Qb.appProps;return(0,Cb.jsx)(qe,{label:(0,qc.t)("labels.fileTitle"),value:fc.name||"Unnamed",onChange:function(ja){return dc(ja)},isNameEditable:void 0===Qb.name&&!fc.viewModeEnabled})}});(0,Le.z)({name:"changeExportScale",trackEvent:{category:"export",action:"scale"},perform:function(Qb,fc,dc){return{appState:H(H({},fc),{},{exportScale:dc}),
commitToHistory:!1}},PanelComponent:function(Qb){var fc=Qb.appState,dc=Qb.updateData;Qb=(0,Sb.Lm)(Qb.elements);var ja=(0,rd.N)(Qb,fc)?(0,rd.eD)(Qb,fc):Qb;return(0,Cb.jsx)(Cb.Fragment,{children:jb.ZB.map(function(Fb){var Tb=(0,Ab.Cg)(ja,jb.qy,Fb),wb=(0,Yd.Z)(Tb,2);Tb=wb[0];wb=wb[1];Tb="".concat((0,qc.t)("buttons.scale")," ").concat(Fb,"x (").concat(Tb,"x").concat(wb,")");return(0,Cb.jsx)(Mc.V,{size:"small",type:"radio",icon:"".concat(Fb,"x"),name:"export-canvas-scale",title:Tb,"aria-label":Tb,id:"export-canvas-scale",
checked:Fb===fc.exportScale,onChange:function(){return dc(Fb)}},Fb)})})}});(0,Le.z)({name:"changeExportBackground",trackEvent:{category:"export",action:"toggleBackground"},perform:function(Qb,fc,dc){return{appState:H(H({},fc),{},{exportBackground:dc}),commitToHistory:!1}},PanelComponent:function(Qb){var fc=Qb.updateData;return(0,Cb.jsx)(lc,{checked:Qb.appState.exportBackground,onChange:function(dc){return fc(dc)},children:(0,qc.t)("labels.withBackground")})}});(0,Le.z)({name:"changeExportEmbedScene",
trackEvent:{category:"export",action:"embedScene"},perform:function(Qb,fc,dc){return{appState:H(H({},fc),{},{exportEmbedScene:dc}),commitToHistory:!1}},PanelComponent:function(Qb){var fc=Qb.updateData;return(0,Cb.jsxs)(lc,{checked:Qb.appState.exportEmbedScene,onChange:function(dc){return fc(dc)},children:[(0,qc.t)("labels.exportEmbedScene"),(0,Cb.jsx)(ff.u,{label:(0,qc.t)("labels.exportEmbedScene_details"),long:!0,children:(0,Cb.jsx)("div",{className:"excalidraw-tooltip-icon",children:Me.Vl})})]})}});
(0,Le.z)({name:"saveToActiveFile",trackEvent:{category:"export"},perform:(Ue=(0,Qd.Z)(uc().mark(function Tb(fc,dc,ja,Fb){var wb,zb,Pb;return uc().wrap(function(sb){for(;;)switch(sb.prev=sb.next){case 0:if(wb=!!dc.fileHandle,sb.prev=1,!(0,sa.g8)(dc.fileHandle)){sb.next=8;break}return sb.next=5,Jb(fc,dc,Fb.files);case 5:sb.t0=sb.sent;sb.next=11;break;case 8:return sb.next=10,(0,Ia.Um)(fc,dc,Fb.files);case 10:sb.t0=sb.sent;case 11:return zb=sb.t0,Pb=zb.fileHandle,sb.abrupt("return",{commitToHistory:!1,
appState:H(H({},dc),{},{fileHandle:Pb,toastMessage:wb?null!=Pb&&Pb.name?(0,qc.t)("toast.fileSavedToFilename").replace("{filename}",'"'.concat(Pb.name,'"')):(0,qc.t)("toast.fileSaved"):null})});case 16:return sb.prev=16,sb.t1=sb.catch(1),"AbortError"!==(null===sb.t1||void 0===sb.t1?void 0:sb.t1.name)?console.error(sb.t1):console.warn(sb.t1),sb.abrupt("return",{commitToHistory:!1});case 20:case "end":return sb.stop()}},Tb,null,[[1,16]])})),function(fc,dc,ja,Fb){return Ue.apply(this,arguments)}),keyTest:function(fc){return fc.key===
vc.tW.S&&fc[vc.tW.CTRL_OR_CMD]&&!fc.shiftKey},PanelComponent:function(fc){var dc,ja=fc.updateData;return(0,Cb.jsx)(ve,{onSave:function(){return ja(null)},fileName:null===(dc=fc.appState.fileHandle)||void 0===dc?void 0:dc.name})}});var Ue,Kf,eg,Hf=(0,Le.z)({name:"saveFileToDisk",trackEvent:{category:"export"},perform:(Kf=(0,Qd.Z)(uc().mark(function wb(dc,ja,Fb,Tb){var zb,Pb;return uc().wrap(function(sb){for(;;)switch(sb.prev=sb.next){case 0:return sb.prev=0,sb.next=3,(0,Ia.Um)(dc,H(H({},ja),{},{fileHandle:null}),
Tb.files);case 3:return zb=sb.sent,Pb=zb.fileHandle,sb.abrupt("return",{commitToHistory:!1,appState:H(H({},ja),{},{fileHandle:Pb})});case 8:return sb.prev=8,sb.t0=sb.catch(0),"AbortError"!==(null===sb.t0||void 0===sb.t0?void 0:sb.t0.name)?console.error(sb.t0):console.warn(sb.t0),sb.abrupt("return",{commitToHistory:!1});case 12:case "end":return sb.stop()}},wb,null,[[0,8]])})),function(dc,ja,Fb,Tb){return Kf.apply(this,arguments)}),keyTest:function(dc){return dc.key===vc.tW.S&&dc.shiftKey&&dc[vc.tW.CTRL_OR_CMD]},
PanelComponent:function(dc){var ja=dc.updateData;return(0,Cb.jsx)(Mc.V,{type:"button",icon:Me.po,title:(0,qc.t)("buttons.saveAs"),"aria-label":(0,qc.t)("buttons.saveAs"),showAriaLabel:gj().isMobile,hidden:!qa.kr,onClick:function(){return ja(null)},"data-testid":"save-as-button"})}});(0,Le.z)({name:"loadScene",trackEvent:{category:"export"},perform:(eg=(0,Qd.Z)(uc().mark(function zb(ja,Fb,Tb,wb){var Pb,sb,Mb,$b;return uc().wrap(function(Bc){for(;;)switch(Bc.prev=Bc.next){case 0:return Bc.prev=0,Bc.next=
3,(0,Ia.n8)(Fb,ja);case 3:return Pb=Bc.sent,sb=Pb.elements,Mb=Pb.appState,$b=Pb.files,Bc.abrupt("return",{elements:sb,appState:Mb,files:$b,commitToHistory:!0});case 10:if(Bc.prev=10,Bc.t0=Bc.catch(0),"AbortError"!==(null===Bc.t0||void 0===Bc.t0?void 0:Bc.t0.name)){Bc.next=15;break}return console.warn(Bc.t0),Bc.abrupt("return",!1);case 15:return Bc.abrupt("return",{elements:ja,appState:H(H({},Fb),{},{errorMessage:Bc.t0.message}),files:wb.files,commitToHistory:!1});case 16:case "end":return Bc.stop()}},
zb,null,[[0,10]])})),function(ja,Fb,Tb,wb){return eg.apply(this,arguments)}),keyTest:function(ja){return ja[vc.tW.CTRL_OR_CMD]&&ja.key===vc.tW.O},PanelComponent:function(ja){var Fb=ja.updateData;ja.appState;return(0,Cb.jsx)(Mc.V,{type:"button",icon:Me.zD,title:(0,qc.t)("buttons.load"),"aria-label":(0,qc.t)("buttons.load"),showAriaLabel:gj().isMobile,onClick:Fb,"data-testid":"load-button"})}});(0,Le.z)({name:"exportWithDarkMode",trackEvent:{category:"export",action:"toggleTheme"},perform:function(ja,
Fb,Tb){return{appState:H(H({},Fb),{},{exportWithDarkMode:Tb}),commitToHistory:!1}},PanelComponent:function(ja){var Fb=ja.updateData;return(0,Cb.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"-45px",marginBottom:"10px"},children:(0,Cb.jsx)(vg.J,{value:ja.appState.exportWithDarkMode?jb.C6.DARK:jb.C6.LIGHT,onChange:function(Tb){Fb(Tb===jb.C6.DARK)},title:(0,qc.t)("labels.toggleExportColorScheme")})})}});var xf="{}",Qf=(0,Le.z)({name:"copyStyles",trackEvent:{category:"element"},
perform:function(ja,Fb){var Tb=[];ja=ja.find(function(zb){return Fb.selectedElementIds[zb.id]});if(Tb.push(ja),ja&&(0,le.Xo)(ja)){var wb=(0,gd.WJ)(ja);Tb.push(wb)}return ja&&(xf=JSON.stringify(Tb)),{appState:M(M({},Fb),{},{toastMessage:(0,qc.t)("toast.copyStyles")}),commitToHistory:!1}},contextItemLabel:"labels.copyStyles",keyTest:function(ja){return ja[vc.tW.CTRL_OR_CMD]&&ja.altKey&&ja.code===vc.aU.C}}),Pg=(0,Le.z)({name:"pasteStyles",trackEvent:{category:"element"},perform:function(ja,Fb){var Tb=
JSON.parse(xf),wb=Tb[0],zb=Tb[1];if(!(0,Sb.r2)(wb))return{elements:ja,commitToHistory:!1};var Pb=(0,rd.eD)(ja,Fb,!0),sb=Pb.map(function(Mb){return Mb.id});return{elements:ja.map(function(Mb){if(sb.includes(Mb.id)){var $b,Bc,Pc,Tc,wd,Rd,Gd,Cd=wb;if((0,Sb.iB)(Mb)&&Mb.containerId&&(Cd=zb),!Cd)return Mb;var Id=(0,Lc.BE)(Mb,{backgroundColor:null===($b=Cd)||void 0===$b?void 0:$b.backgroundColor,strokeWidth:null===(Bc=Cd)||void 0===Bc?void 0:Bc.strokeWidth,strokeColor:null===(Pc=Cd)||void 0===Pc?void 0:
Pc.strokeColor,strokeStyle:null===(Tc=Cd)||void 0===Tc?void 0:Tc.strokeStyle,fillStyle:null===(wd=Cd)||void 0===wd?void 0:wd.fillStyle,opacity:null===(Rd=Cd)||void 0===Rd?void 0:Rd.opacity,roughness:null===(Gd=Cd)||void 0===Gd?void 0:Gd.roughness});if((0,Sb.iB)(Id)){var xe,Tf,se;Mb=null;(Id=(0,Lc.BE)(Id,{fontSize:(null===(xe=Cd)||void 0===xe?void 0:xe.fontSize)||jb.n5,fontFamily:(null===(Tf=Cd)||void 0===Tf?void 0:Tf.fontFamily)||jb.rk,textAlign:(null===(se=Cd)||void 0===se?void 0:se.textAlign)||
jb.Hg})).containerId&&(Mb=Pb.find(function($e){return(0,Sb.iB)(Id)&&$e.id===Id.containerId})||null);(0,Sb.oN)(Id,Mb)}return"arrow"===Id.type&&(Id=(0,Lc.BE)(Id,{startArrowhead:Cd.startArrowhead,endArrowhead:Cd.endArrowhead})),Id}return Mb}),commitToHistory:!0}},contextItemLabel:"labels.pasteStyles",keyTest:function(ja){return ja[vc.tW.CTRL_OR_CMD]&&ja.altKey&&ja.code===vc.aU.V}}),ei=function(ja){return(0,Cb.jsx)("button",{className:"help-icon",onClick:ja.onClick,type:"button",title:"".concat(ja.title,
" — ?"),"aria-label":ja.title,children:Me.Vl})};(0,Le.z)({name:"toggleCanvasMenu",trackEvent:{category:"menu"},perform:function(ja,Fb){return{appState:D(D({},Fb),{},{openMenu:"canvas"===Fb.openMenu?null:"canvas"}),commitToHistory:!1}},PanelComponent:function(ja){var Fb=ja.appState;ja=ja.updateData;return(0,Cb.jsx)(Mc.V,{type:"button",icon:Me.GI,"aria-label":(0,qc.t)("buttons.menu"),onClick:ja,selected:"canvas"===Fb.openMenu})}});(0,Le.z)({name:"toggleEditMenu",trackEvent:{category:"menu"},perform:function(ja,
Fb){return{appState:D(D({},Fb),{},{openMenu:"shape"===Fb.openMenu?null:"shape"}),commitToHistory:!1}},PanelComponent:function(ja){var Fb=ja.appState,Tb=ja.updateData;return(0,Cb.jsx)(Mc.V,{visible:(0,Sb.RT)(Fb,(0,Sb.Lm)(ja.elements)),type:"button",icon:Me.DG,"aria-label":(0,qc.t)("buttons.edit"),onClick:Tb,selected:"shape"===Fb.openMenu})}});(0,Le.z)({name:"toggleFullScreen",trackEvent:{category:"canvas",predicate:function(ja){return!(0,Dc.rB)()}},perform:function(){return(0,Dc.rB)()||(0,Dc.wo)(),
(0,Dc.rB)()&&(0,Dc.Pr)(),{commitToHistory:!1}},keyTest:function(ja){return ja.code===vc.aU.F&&!ja[vc.tW.CTRL_OR_CMD]}});(0,Le.z)({name:"toggleShortcuts",trackEvent:{category:"menu",action:"toggleHelpDialog"},perform:function(ja,Fb,Tb,wb){ja=wb.focusContainer;return Fb.showHelpDialog&&ja(),{appState:D(D({},Fb),{},{showHelpDialog:!Fb.showHelpDialog}),commitToHistory:!1}},PanelComponent:function(ja){ja=ja.updateData;return(0,Cb.jsx)(ei,{title:(0,qc.t)("helpDialog.title"),onClick:ja})},keyTest:function(ja){return ja.key===
vc.tW.QUESTION_MARK}});var uh=f(6954),li=function(ja,Fb){ja=(0,rd.eD)((0,Sb.Lm)(ja),Fb,!0);return 2<=ja.length&&!function(Tb){if(2<=Tb.length){var wb,zb=ba(Tb[0].groupIds);try{var Pb=function(){var Mb=wb.value;if(Tb.reduce(function($b,Bc){return $b&&(0,Ub.Nd)(Bc,Mb)},!0))return{v:!0}};for(zb.s();!(wb=zb.n()).done;){var sb=Pb();if("object"===(0,xd.Z)(sb))return sb.v}}catch(Mb){zb.e(Mb)}finally{zb.f()}}return!1}(ja)},Zh=(0,Le.z)({name:"group",trackEvent:{category:"element"},perform:function(ja,Fb){var Tb=
(0,rd.eD)((0,Sb.Lm)(ja),Fb,!0);if(2>Tb.length)return{appState:Fb,elements:ja,commitToHistory:!1};var wb=(0,Ub.iJ)(Fb);if(1===wb.length){wb=new Set((0,Ub.Fb)(ja,wb[0]).map(function(Mb){return Mb.id}));var zb=new Set(Tb.map(function(Mb){return Mb.id}));if((new Set([].concat((0,ud.Z)(Array.from(wb)),(0,ud.Z)(Array.from(zb))))).size===wb.size)return{appState:Fb,elements:ja,commitToHistory:!1}}var Pb=(0,uh.kb)(),sb=(0,Dc.xn)(Tb);wb=ja.map(function(Mb){return sb.get(Mb.id)?(0,Lc.BE)(Mb,{groupIds:(0,Ub.S_)(Mb.groupIds,
Pb,Fb.editingGroupId)}):Mb});ja=(0,Ub.Fb)(wb,Pb);zb=wb.lastIndexOf(ja[ja.length-1]);Tb=wb.slice(zb+1);wb=wb.slice(0,zb).filter(function(Mb){return!(0,Ub.Nd)(Mb,Pb)});ja=[].concat((0,ud.Z)(wb),(0,ud.Z)(ja),(0,ud.Z)(Tb));return{appState:(0,Ub.F$)(Pb,P(P({},Fb),{},{selectedGroupIds:{}}),(0,Sb.Lm)(ja)),elements:ja,commitToHistory:!0}},contextItemLabel:"labels.group",contextItemPredicate:function(ja,Fb){return li(ja,Fb)},keyTest:function(ja){return!ja.shiftKey&&ja[vc.tW.CTRL_OR_CMD]&&ja.code===vc.aU.G},
PanelComponent:function(ja){var Fb=ja.elements,Tb=ja.appState,wb=ja.updateData;return(0,Cb.jsx)(Mc.V,{hidden:!li(Fb,Tb),type:"button",icon:(0,Cb.jsx)(Me.BF,{theme:Tb.theme}),onClick:function(){return wb(null)},title:"".concat((0,qc.t)("labels.group")," — ").concat((0,Dc.uY)("CtrlOrCmd+G")),"aria-label":(0,qc.t)("labels.group"),visible:(0,rd.N)((0,Sb.Lm)(Fb),Tb)})}}),qg=(0,Le.z)({name:"ungroup",trackEvent:{category:"element"},perform:function(ja,Fb){if(0===(0,Ub.iJ)(Fb).length)return{appState:Fb,elements:ja,
commitToHistory:!1};var Tb=[];ja=ja.map(function(zb){(0,le.Xh)(zb)&&Tb.push(zb.id);var Pb=(0,Ub.h6)(zb.groupIds,Fb.selectedGroupIds);return Pb.length===zb.groupIds.length?zb:(0,Lc.BE)(zb,{groupIds:Pb})});var wb=(0,Ub.bO)(P(P({},Fb),{},{selectedGroupIds:{}}),(0,Sb.Lm)(ja));return Tb.forEach(function(zb){return wb.selectedElementIds[zb]=!1}),{appState:wb,elements:ja,commitToHistory:!0}},keyTest:function(ja){return ja.shiftKey&&ja[vc.tW.CTRL_OR_CMD]&&ja.code===vc.aU.G},contextItemLabel:"labels.ungroup",
contextItemPredicate:function(ja,Fb){return 0<(0,Ub.iJ)(Fb).length},PanelComponent:function(ja){var Fb=ja.elements,Tb=ja.appState,wb=ja.updateData;return(0,Cb.jsx)(Mc.V,{type:"button",hidden:0===(0,Ub.iJ)(Tb).length,icon:(0,Cb.jsx)(Me.RJ,{theme:Tb.theme}),onClick:function(){return wb(null)},title:"".concat((0,qc.t)("labels.ungroup")," — ").concat((0,Dc.uY)("CtrlOrCmd+Shift+G")),"aria-label":(0,qc.t)("labels.ungroup"),visible:(0,rd.N)((0,Sb.Lm)(Fb),Tb)})}}),Rh=f(8982),df=(f(2789),function(ja){var Fb=
ja.color,Tb=ja.border,wb=ja.onClick,zb=ja.src;ja=(0,Rh.f)(ja.name);var Pb=(0,Uc.useState)(!1);Pb=(0,Yd.Z)(Pb,2);var sb=Pb[1];Fb=(Pb=!Pb[0]&&zb)?void 0:{background:Fb,border:"1px solid ".concat(Tb)};return(0,Cb.jsx)("div",{className:"Avatar",style:Fb,onClick:wb,children:Pb?(0,Cb.jsx)("img",{className:"Avatar-img",src:zb,alt:ja,referrerPolicy:"no-referrer",onError:function(){return sb(!0)}}):ja})}),Sh=f(2264);(0,Le.z)({name:"goToCollaborator",trackEvent:{category:"collab"},perform:function(ja,Fb,Tb){return Tb?
{appState:ha(ha(ha({},Fb),(0,Sh.s)({scenePoint:Tb,viewportDimensions:{width:Fb.width,height:Fb.height},zoom:Fb.zoom})),{},{openMenu:"canvas"===Fb.openMenu?null:Fb.openMenu}),commitToHistory:!1}:{appState:Fb,commitToHistory:!1}},PanelComponent:function(ja){var Fb=ja.appState,Tb=ja.updateData;ja=(0,Yd.Z)(ja.data,2);var wb=ja[1];Fb=(0,Rh.X)(ja[0],Fb);return(0,Cb.jsx)(df,{color:Fb.background,border:Fb.stroke,onClick:function(){return Tb(wb.pointer)},name:wb.username||"",src:wb.avatarUrl})}});var yi=f(2791),
Cl=(0,Le.z)({name:"addToLibrary",trackEvent:{category:"element"},perform:function(ja,Fb,Tb,wb){var zb=(0,rd.eD)((0,Sb.Lm)(ja),Fb,!0);return zb.some(function(Pb){return"image"===Pb.type})?{commitToHistory:!1,appState:Z(Z({},Fb),{},{errorMessage:"Support for adding images to the library coming soon!"})}:wb.library.getLatestLibrary().then(function(Pb){return wb.library.setLibrary([{id:(0,uh.kb)(),status:"unpublished",elements:zb.map(yi.OL),created:Date.now()}].concat((0,ud.Z)(Pb)))}).then(function(){return{commitToHistory:!1,
appState:Z(Z({},Fb),{},{toastMessage:(0,qc.t)("toast.addedToLibrary")})}}).catch(function(Pb){return{commitToHistory:!1,appState:Z(Z({},Fb),{},{errorMessage:Pb.message})}})},contextItemLabel:"labels.addToLibrary"}),vj=f(8925),zf=function(ja,Fb,Tb){var wb=Tb.axis;Tb=Tb.position;ja=(0,vj.v2)(ja);var zb=(0,Yd.Z)("x"===wb?["minX","maxX"]:["minY","maxY"],2),Pb=zb[0];zb=zb[1];return ca(ca({},{x:0,y:0}),{},"start"===Tb?(0,ld.Z)({},wb,Fb[Pb]-ja[Pb]):"end"===Tb?(0,ld.Z)({},wb,Fb[zb]-ja[zb]):(0,ld.Z)({},wb,
(Fb[Pb]+Fb[zb])/2-(ja[Pb]+ja[zb])/2))},Bj=function(ja,Fb){return 1<(0,rd.eD)((0,Sb.Lm)(ja),Fb).length},oj=function(ja,Fb,Tb){Fb=function(zb,Pb){var sb=(0,Ub.AI)(zb),Mb=(0,vj.v2)(zb);return sb.flatMap(function($b){var Bc=zf($b,Mb,Pb);return $b.map(function(Pc){return(0,Lc.BE)(Pc,{x:Pc.x+Bc.x,y:Pc.y+Bc.y})})})}((0,rd.eD)((0,Sb.Lm)(ja),Fb),Tb);var wb=(0,Dc.xn)(Fb);return ja.map(function(zb){return wb.get(zb.id)||zb})};(0,Le.z)({name:"alignTop",trackEvent:{category:"element"},perform:function(ja,Fb){return{appState:Fb,
elements:oj(ja,Fb,{position:"start",axis:"y"}),commitToHistory:!0}},keyTest:function(ja){return ja[vc.tW.CTRL_OR_CMD]&&ja.shiftKey&&ja.key===vc.tW.ARROW_UP},PanelComponent:function(ja){var Fb=ja.elements,Tb=ja.appState,wb=ja.updateData;return(0,Cb.jsx)(Mc.V,{hidden:!Bj(Fb,Tb),type:"button",icon:(0,Cb.jsx)(Me.Ct,{theme:Tb.theme}),onClick:function(){return wb(null)},title:"".concat((0,qc.t)("labels.alignTop")," — ").concat((0,Dc.uY)("CtrlOrCmd+Shift+Up")),"aria-label":(0,qc.t)("labels.alignTop"),visible:(0,rd.N)((0,Sb.Lm)(Fb),
Tb)})}});(0,Le.z)({name:"alignBottom",trackEvent:{category:"element"},perform:function(ja,Fb){return{appState:Fb,elements:oj(ja,Fb,{position:"end",axis:"y"}),commitToHistory:!0}},keyTest:function(ja){return ja[vc.tW.CTRL_OR_CMD]&&ja.shiftKey&&ja.key===vc.tW.ARROW_DOWN},PanelComponent:function(ja){var Fb=ja.elements,Tb=ja.appState,wb=ja.updateData;return(0,Cb.jsx)(Mc.V,{hidden:!Bj(Fb,Tb),type:"button",icon:(0,Cb.jsx)(Me.HL,{theme:Tb.theme}),onClick:function(){return wb(null)},title:"".concat((0,qc.t)("labels.alignBottom"),
" — ").concat((0,Dc.uY)("CtrlOrCmd+Shift+Down")),"aria-label":(0,qc.t)("labels.alignBottom"),visible:(0,rd.N)((0,Sb.Lm)(Fb),Tb)})}});(0,Le.z)({name:"alignLeft",trackEvent:{category:"element"},perform:function(ja,Fb){return{appState:Fb,elements:oj(ja,Fb,{position:"start",axis:"x"}),commitToHistory:!0}},keyTest:function(ja){return ja[vc.tW.CTRL_OR_CMD]&&ja.shiftKey&&ja.key===vc.tW.ARROW_LEFT},PanelComponent:function(ja){var Fb=ja.elements,Tb=ja.appState,wb=ja.updateData;return(0,Cb.jsx)(Mc.V,{hidden:!Bj(Fb,
Tb),type:"button",icon:(0,Cb.jsx)(Me.xs,{theme:Tb.theme}),onClick:function(){return wb(null)},title:"".concat((0,qc.t)("labels.alignLeft")," — ").concat((0,Dc.uY)("CtrlOrCmd+Shift+Left")),"aria-label":(0,qc.t)("labels.alignLeft"),visible:(0,rd.N)((0,Sb.Lm)(Fb),Tb)})}});(0,Le.z)({name:"alignRight",trackEvent:{category:"element"},perform:function(ja,Fb){return{appState:Fb,elements:oj(ja,Fb,{position:"end",axis:"x"}),commitToHistory:!0}},keyTest:function(ja){return ja[vc.tW.CTRL_OR_CMD]&&ja.shiftKey&&
ja.key===vc.tW.ARROW_RIGHT},PanelComponent:function(ja){var Fb=ja.elements,Tb=ja.appState,wb=ja.updateData;return(0,Cb.jsx)(Mc.V,{hidden:!Bj(Fb,Tb),type:"button",icon:(0,Cb.jsx)(Me.mh,{theme:Tb.theme}),onClick:function(){return wb(null)},title:"".concat((0,qc.t)("labels.alignRight")," — ").concat((0,Dc.uY)("CtrlOrCmd+Shift+Right")),"aria-label":(0,qc.t)("labels.alignRight"),visible:(0,rd.N)((0,Sb.Lm)(Fb),Tb)})}});(0,Le.z)({name:"alignVerticallyCentered",trackEvent:{category:"element"},perform:function(ja,
Fb){return{appState:Fb,elements:oj(ja,Fb,{position:"center",axis:"y"}),commitToHistory:!0}},PanelComponent:function(ja){var Fb=ja.elements,Tb=ja.appState,wb=ja.updateData;return(0,Cb.jsx)(Mc.V,{hidden:!Bj(Fb,Tb),type:"button",icon:(0,Cb.jsx)(Me.ST,{theme:Tb.theme}),onClick:function(){return wb(null)},title:(0,qc.t)("labels.centerVertically"),"aria-label":(0,qc.t)("labels.centerVertically"),visible:(0,rd.N)((0,Sb.Lm)(Fb),Tb)})}});(0,Le.z)({name:"alignHorizontallyCentered",trackEvent:{category:"element"},
perform:function(ja,Fb){return{appState:Fb,elements:oj(ja,Fb,{position:"center",axis:"x"}),commitToHistory:!0}},PanelComponent:function(ja){var Fb=ja.elements,Tb=ja.appState,wb=ja.updateData;return(0,Cb.jsx)(Mc.V,{hidden:!Bj(Fb,Tb),type:"button",icon:(0,Cb.jsx)(Me.gK,{theme:Tb.theme}),onClick:function(){return wb(null)},title:(0,qc.t)("labels.centerHorizontally"),"aria-label":(0,qc.t)("labels.centerHorizontally"),visible:(0,rd.N)((0,Sb.Lm)(Fb),Tb)})}});var Wh=function(ja,Fb){return 1<(0,rd.eD)((0,Sb.Lm)(ja),
Fb).length},Dl=function(ja,Fb,Tb){Fb=function(zb,Pb){var sb,Mb=(0,Yd.Z)("x"===Pb.axis?["minX","midX","maxX","width"]:["minY","midY","maxY","height"],4),$b=Mb[0],Bc=Mb[1],Pc=Mb[2],Tc=Mb[3],wd=(0,vj.v2)(zb);zb=(0,Ub.AI)(zb).map(function($e){return[$e,(0,vj.v2)($e)]}).sort(function($e,Pe){return $e[1][Bc]-Pe[1][Bc]});Mb=0;var Rd=pa(zb);try{for(Rd.s();!(sb=Rd.n()).done;)Mb+=sb.value[1][Tc]}catch($e){Rd.e($e)}finally{Rd.f()}var Gd=(wd[Tc]-Mb)/(zb.length-1);if(0>Gd){var Cd=zb.findIndex(function($e){return $e[1][$b]===
wd[$b]}),Id=zb.findIndex(function($e){return $e[1][Pc]===wd[Pc]}),xe=(zb[Id][1][Bc]-zb[Cd][1][Bc])/(zb.length-1),Tf=zb[Cd][1][Bc];return zb.flatMap(function($e,Pe){var Re=(0,Yd.Z)($e,2);$e=Re[0];Re=Re[1];var ng={x:0,y:0};return Pe!==Cd&&Pe!==Id&&(Tf+=xe,ng[Pb.axis]=Tf-Re[Bc]),$e.map(function(Rf){return(0,Lc.BE)(Rf,{x:Rf.x+ng.x,y:Rf.y+ng.y})})})}var se=wd[$b];return zb.flatMap(function($e){var Pe=(0,Yd.Z)($e,2);$e=Pe[0];Pe=Pe[1];var Re={x:0,y:0};return Re[Pb.axis]=se-Pe[$b],se+=Gd,se+=Pe[Tc],$e.map(function(ng){return(0,Lc.BE)(ng,
{x:ng.x+Re.x,y:ng.y+Re.y})})})}((0,rd.eD)((0,Sb.Lm)(ja),Fb),Tb);var wb=(0,Dc.xn)(Fb);return ja.map(function(zb){return wb.get(zb.id)||zb})},wk=((0,Le.z)({name:"distributeHorizontally",trackEvent:{category:"element"},perform:function(ja,Fb){return{appState:Fb,elements:Dl(ja,Fb,{space:"between",axis:"x"}),commitToHistory:!0}},keyTest:function(ja){return!ja[vc.tW.CTRL_OR_CMD]&&ja.altKey&&ja.code===vc.aU.H},PanelComponent:function(ja){var Fb=ja.elements,Tb=ja.appState,wb=ja.updateData;return(0,Cb.jsx)(Mc.V,
{hidden:!Wh(Fb,Tb),type:"button",icon:(0,Cb.jsx)(Me.uD,{theme:Tb.theme}),onClick:function(){return wb(null)},title:"".concat((0,qc.t)("labels.distributeHorizontally")," — ").concat((0,Dc.uY)("Alt+H")),"aria-label":(0,qc.t)("labels.distributeHorizontally"),visible:(0,rd.N)((0,Sb.Lm)(Fb),Tb)})}}),(0,Le.z)({name:"distributeVertically",trackEvent:{category:"element"},perform:function(ja,Fb){return{appState:Fb,elements:Dl(ja,Fb,{space:"between",axis:"y"}),commitToHistory:!0}},keyTest:function(ja){return!ja[vc.tW.CTRL_OR_CMD]&&
ja.altKey&&ja.code===vc.aU.V},PanelComponent:function(ja){var Fb=ja.elements,Tb=ja.appState,wb=ja.updateData;return(0,Cb.jsx)(Mc.V,{hidden:!Wh(Fb,Tb),type:"button",icon:(0,Cb.jsx)(Me.W5,{theme:Tb.theme}),onClick:function(){return wb(null)},title:"".concat((0,qc.t)("labels.distributeVertically")," — ").concat((0,Dc.uY)("Alt+V")),"aria-label":(0,qc.t)("labels.distributeVertically"),visible:(0,rd.N)((0,Sb.Lm)(Fb),Tb)})}}),f(8634)),xk=f(267),Kg=(0,Le.z)({name:"flipHorizontal",trackEvent:{category:"element"},
perform:function(ja,Fb){return{elements:Cj(ja,Fb,"horizontal"),appState:Fb,commitToHistory:!0}},keyTest:function(ja){return ja.shiftKey&&"KeyH"===ja.code},contextItemLabel:"labels.flipHorizontal",contextItemPredicate:function(ja,Fb){ja=(0,rd.eD)((0,Sb.Lm)(ja),Fb);return 1===ja.length&&"text"!==ja[0].type}}),Oj=(0,Le.z)({name:"flipVertical",trackEvent:{category:"element"},perform:function(ja,Fb){return{elements:Cj(ja,Fb,"vertical"),appState:Fb,commitToHistory:!0}},keyTest:function(ja){return ja.shiftKey&&
"KeyV"===ja.code},contextItemLabel:"labels.flipVertical",contextItemPredicate:function(ja,Fb){return 1===(0,rd.eD)((0,Sb.Lm)(ja),Fb).length}}),Cj=function(ja,Fb,Tb){var wb=(0,rd.eD)((0,Sb.Lm)(ja),Fb);if(1<wb.length)return ja;Fb=Ki(wb,Fb,Tb);var zb=(0,Dc.xn)(Fb);return ja.map(function(Pb){return zb.get(Pb.id)||Pb})},Ki=function(ja,Fb,Tb){return ja.forEach(function(wb){lk(wb,Fb);if("vertical"===Tb){var zb=wb.x,Pb=wb.y,sb=(0,wk.LW)(wb.angle+Math.PI);0>sb&&(sb=(0,wk.LW)(2*Math.PI+sb));(0,Lc.DR)(wb,{angle:sb});
(0,Lc.DR)(wb,{x:zb,y:Pb})}}),ja},lk=function(ja,Fb){var Tb=ja.x,wb=ja.y,zb=ja.width,Pb=ja.height,sb=(0,wk.LW)(ja.angle),Mb=0;((0,le.bt)(ja)||(0,le.F9)(ja))&&(Mb=2*ja.points.reduce(function(Tc,wd){return Math.max(Tc,wd[0])},0)-ja.width);(0,Lc.DR)(ja,{angle:(0,wk.LW)(0)});Fb=(0,xk.PC)(ja,Fb.zoom);var $b=!0,Bc=0,Pc=Fb.nw;if(Pc||($b=!1,Pc=Fb.ne)){if((0,le.bt)(ja)){for(zb=1;zb<ja.points.length;zb++)ed._.movePoints(ja,[{index:zb,point:[-ja.points[zb][0],ja.points[zb][1]]}]);ed._.normalizePoints(ja)}else Bc=
$b?ja.x+2*zb:ja.x-2*zb,(0,wk.l2)((new Map).set(ja.id,ja),!0,ja,$b?"nw":"ne",!1,Bc,Pc[1]),(0,Lc.DR)(ja,{width:zb,height:Pb});sb=(0,wk.LW)(2*Math.PI-sb);0>sb&&(sb=(0,wk.LW)(sb+2*Math.PI));(0,Lc.DR)(ja,{angle:sb});(0,Lc.DR)(ja,{x:Tb+Mb,y:wb});(0,pe.Ww)(ja)}else(0,Lc.DR)(ja,{angle:sb})},Yj=f(1868),Pj=(0,Le.z)({name:"copy",trackEvent:{category:"element"},perform:function(ja,Fb,Tb,wb){ja=(0,Yj.eD)(ja,Fb,!0);return(0,uf.vQ)(ja,Fb,wb.files),{commitToHistory:!1}},contextItemLabel:"labels.copy",keyTest:void 0}),
kl=(0,Le.z)({name:"cut",trackEvent:{category:"element"},perform:function(ja,Fb,Tb,wb){return Pj.perform(ja,Fb,Tb,wb),ce.perform(ja,Fb)},contextItemLabel:"labels.cut",keyTest:function(ja){return ja[vc.tW.CTRL_OR_CMD]&&ja.code===vc.aU.X}}),Xk=(0,Le.z)({name:"copyAsSvg",trackEvent:{category:"element"},perform:function(){var ja=(0,Qd.Z)(uc().mark(function sb(Tb,wb,zb,Pb){var Mb;return uc().wrap(function($b){for(;;)switch($b.prev=$b.next){case 0:if(Pb.canvas){$b.next=2;break}return $b.abrupt("return",
{commitToHistory:!1});case 2:return Mb=(0,Yj.eD)((0,Sb.Lm)(Tb),wb,!0),$b.prev=3,$b.next=6,cb("clipboard-svg",Mb.length?Mb:(0,Sb.Lm)(Tb),wb,Pb.files,wb);case 6:return $b.abrupt("return",{commitToHistory:!1});case 9:return $b.prev=9,$b.t0=$b.catch(3),console.error($b.t0),$b.abrupt("return",{appState:Ha(Ha({},wb),{},{errorMessage:$b.t0.message}),commitToHistory:!1});case 13:case "end":return $b.stop()}},sb,null,[[3,9]])}));return function(Tb,wb,zb,Pb){return ja.apply(this,arguments)}}(),contextItemLabel:"labels.copyAsSvg"}),
El=(0,Le.z)({name:"copyAsPng",trackEvent:{category:"element"},perform:function(){var ja=(0,Qd.Z)(uc().mark(function sb(Tb,wb,zb,Pb){var Mb;return uc().wrap(function($b){for(;;)switch($b.prev=$b.next){case 0:if(Pb.canvas){$b.next=2;break}return $b.abrupt("return",{commitToHistory:!1});case 2:return Mb=(0,Yj.eD)((0,Sb.Lm)(Tb),wb,!0),$b.prev=3,$b.next=6,cb("clipboard",Mb.length?Mb:(0,Sb.Lm)(Tb),wb,Pb.files,wb);case 6:return $b.abrupt("return",{appState:Ha(Ha({},wb),{},{toastMessage:(0,qc.t)("toast.copyToClipboardAsPng",
{exportSelection:Mb.length?(0,qc.t)("toast.selection"):(0,qc.t)("toast.canvas"),exportColorScheme:wb.exportWithDarkMode?(0,qc.t)("buttons.darkMode"):(0,qc.t)("buttons.lightMode")})}),commitToHistory:!1});case 9:return $b.prev=9,$b.t0=$b.catch(3),console.error($b.t0),$b.abrupt("return",{appState:Ha(Ha({},wb),{},{errorMessage:$b.t0.message}),commitToHistory:!1});case 13:case "end":return $b.stop()}},sb,null,[[3,9]])}));return function(Tb,wb,zb,Pb){return ja.apply(this,arguments)}}(),contextItemLabel:"labels.copyAsPng",
keyTest:function(ja){return ja.code===vc.aU.C&&ja.altKey&&ja.shiftKey}}),Zj=(0,Le.z)({name:"copyText",trackEvent:{category:"element"},perform:function(ja,Fb){ja=(0,Yj.eD)((0,Sb.Lm)(ja),Fb,!0).reduce(function(Tb,wb){return(0,Sb.iB)(wb)&&Tb.push(wb.text),Tb},[]).join("\n\n");return(0,uf.dd)(ja),{commitToHistory:!1}},contextItemPredicate:function(ja,Fb){return uf.wx&&(0,Yj.eD)(ja,Fb,!0).some(Sb.iB)},contextItemLabel:"labels.copyText"}),Qj=(0,Le.z)({name:"gridMode",trackEvent:{category:"canvas",predicate:function(ja){return!ja.gridSize}},
perform:function(ja,Fb){return{appState:Ea(Ea({},Fb),{},{gridSize:this.checked(Fb)?null:jb.k}),commitToHistory:!1}},checked:function(ja){return null!==ja.gridSize},contextItemLabel:"labels.showGrid",keyTest:function(ja){return ja[vc.tW.CTRL_OR_CMD]&&ja.code===vc.aU.QUOTE}}),xg=(0,Le.z)({name:"zenMode",trackEvent:{category:"canvas",predicate:function(ja){return!ja.zenModeEnabled}},perform:function(ja,Fb){return{appState:Za(Za({},Fb),{},{zenModeEnabled:!this.checked(Fb)}),commitToHistory:!1}},checked:function(ja){return ja.zenModeEnabled},
contextItemLabel:"buttons.zenMode",keyTest:function(ja){return!ja[vc.tW.CTRL_OR_CMD]&&ja.altKey&&ja.code===vc.aU.Z}}),jg=(0,Le.z)({name:"stats",trackEvent:{category:"menu"},perform:function(ja,Fb){return{appState:fb(fb({},Fb),{},{showStats:!this.checked(Fb)}),commitToHistory:!1}},checked:function(ja){return ja.showStats},contextItemLabel:"stats.title",keyTest:function(ja){return!ja[vc.tW.CTRL_OR_CMD]&&ja.altKey&&ja.code===vc.aU.SLASH}}),lg=(0,Le.z)({name:"unbindText",contextItemLabel:"labels.unbindText",
trackEvent:{category:"element"},contextItemPredicate:function(ja,Fb){return(0,rd.eD)(ja,Fb).some(function(Tb){return(0,le.Xo)(Tb)})},perform:function(ja,Fb){return(0,rd.eD)((0,Sb.Lm)(ja),Fb).forEach(function(Tb){var wb=(0,gd.WJ)(Tb);if(wb){var zb,Pb=(0,gd.X1)(wb.originalText,(0,Dc.mO)(wb));(0,Lc.DR)(wb,{containerId:null,width:Pb.width,height:Pb.height,baseline:Pb.baseline,text:wb.originalText});(0,Lc.DR)(Tb,{boundElements:null===(zb=Tb.boundElements)||void 0===zb?void 0:zb.filter(function(sb){return sb.id!==
wb.id})})}}),{elements:ja,appState:Fb,commitToHistory:!0}}}),dj=(0,Le.z)({name:"bindText",contextItemLabel:"labels.bindText",trackEvent:{category:"element"},contextItemPredicate:function(ja,Fb){ja=(0,rd.eD)(ja,Fb);if(2===ja.length){var Tb;Fb=(0,Sb.iB)(ja[0])||(0,Sb.iB)(ja[1]);if((0,le.mG)(ja[0])?Tb=ja[0]:(0,le.mG)(ja[1])&&(Tb=ja[1]),Fb&&Tb&&null===(0,gd.WJ)(Tb))return!0}return!1},perform:function(ja,Fb){var Tb,wb,zb=(0,rd.eD)((0,Sb.Lm)(ja),Fb);(0,Sb.iB)(zb[0])&&(0,le.mG)(zb[1])?(Tb=zb[0],wb=zb[1]):
(Tb=zb[1],wb=zb[0]);(0,Lc.DR)(Tb,{containerId:wb.id,verticalAlign:jb.oX.MIDDLE});(0,Lc.DR)(wb,{boundElements:(wb.boundElements||[]).concat({type:"text",id:Tb.id})});(0,gd.oN)(Tb,wb);ja=ja.slice();zb=ja.findIndex(function(Pb){return Pb.id===Tb.id});ja.splice(zb,1);zb=ja.findIndex(function(Pb){return Pb.id===wb.id});return ja.splice(zb+1,0,Tb),{elements:ja,appState:Na(Na({},Fb),{},{selectedElementIds:(0,ld.Z)({},wb.id,!0)}),commitToHistory:!0}}}),Eh=f(2383),Xg=(0,Le.z)({name:"toggleLock",trackEvent:{category:"element"},
perform:function(ja,Fb){var Tb=(0,rd.eD)(ja,Fb,!0);if(!Tb.length)return!1;var wb=ak(Tb),zb=(0,Dc.xn)(Tb);return{elements:ja.map(function(Pb){return zb.has(Pb.id)?(0,Lc.BE)(Pb,{locked:"lock"===wb}):Pb}),appState:Fb,commitToHistory:!0}},contextItemLabel:function(ja,Fb){ja=(0,rd.eD)(ja,Fb,!1);if(1===ja.length)return ja[0].locked?"labels.elementLock.unlock":"labels.elementLock.lock";if(1<ja.length)return"lock"===ak(ja)?"labels.elementLock.lockAll":"labels.elementLock.unlockAll";throw Error("Unexpected zero elements to lock/unlock. This should never happen.");
},keyTest:function(ja,Fb,Tb){return ja.key.toLocaleLowerCase()===vc.tW.L&&ja[vc.tW.CTRL_OR_CMD]&&ja.shiftKey&&0<(0,rd.eD)(Tb,Fb,!1).length}}),ak=function(ja){return ja.some(function(Fb){return!Fb.locked})?"lock":"unlock"},Ag=function(ja,Fb,Tb){if(!(Fb.multiElement||Fb.resizingElement||Fb.editingElement||Fb.draggingElement)){Tb=Tb();if(null===Tb)return{commitToHistory:!1};var wb=(0,Dc.xn)(ja),zb=Tb.elements,Pb=(0,Dc.xn)(zb);ja=ja.filter(function(sb){return!Pb.has(sb.id)});zb=zb.map(function(sb){return(0,Lc.BE)(wb.get(sb.id)||
sb,sb)}).concat(ja.map(function(sb){return(0,Lc.BE)(sb,{isDeleted:!0})}));return(0,pe.$q)(zb,ja),{elements:zb,appState:Ca(Ca({},Fb),Tb.appState),commitToHistory:!1,syncHistory:!0}}return{commitToHistory:!1}},Th=f(7047),nk=function(ja,Fb,Tb,wb,zb,Pb){if(ja.trackEvent)try{"object"===(0,xd.Z)(ja.trackEvent)&&(ja.trackEvent.predicate&&!ja.trackEvent.predicate(Tb,wb,Pb)||(0,Th.L)(ja.trackEvent.category,ja.trackEvent.action||ja.name,"".concat(Fb," (").concat(zb.device.isMobile?"mobile":"desktop",")")))}catch(sb){console.error("error while logging action:",
sb)}},yk=function(){function ja(Fb,Tb,wb,zb){var Pb=this;(0,Sd.Z)(this,ja);this.actions={};this.renderAction=function(sb,Mb){var $b=Pb.app.props.UIOptions.canvasActions;if(Pb.actions[sb]&&"PanelComponent"in Pb.actions[sb]&&(!(sb in $b)||$b[sb])){var Bc=Pb.actions[sb];sb=Bc.PanelComponent;var Pc=Pb.getElementsIncludingDeleted(),Tc=Pb.getAppState();return(0,Cb.jsx)(sb,{elements:Pb.getElementsIncludingDeleted(),appState:Pb.getAppState(),updateData:function(wd){nk(Bc,"ui",Tc,Pc,Pb.app,wd);Pb.updater(Bc.perform(Pb.getElementsIncludingDeleted(),
Pb.getAppState(),wd,Pb.app))},appProps:Pb.app.props,data:Mb})}return null};this.updater=function(sb){if(!(sb&&"then"in sb))return Fb(sb);sb.then(function(Mb){return Fb(Mb)})};this.getAppState=Tb;this.getElementsIncludingDeleted=wb;this.app=zb}return(0,Nb.Z)(ja,[{key:"registerAction",value:function(Fb){this.actions[Fb.name]=Fb}},{key:"registerAll",value:function(Fb){var Tb=this;Fb.forEach(function(wb){return Tb.registerAction(wb)})}},{key:"handleKeyDown",value:function(Fb){var Tb=this,wb=this.app.props.UIOptions.canvasActions,
zb=Object.values(this.actions).sort(function($b,Bc){return(Bc.keyPriority||0)-($b.keyPriority||0)}).filter(function($b){return(!($b.name in wb)||wb[$b.name])&&$b.keyTest&&$b.keyTest(Fb,Tb.getAppState(),Tb.getElementsIncludingDeleted())});if(1!==zb.length)return 1<zb.length&&console.warn("Canceling as multiple actions match this shortcut",zb),!1;var Pb=zb[0];if(this.getAppState().viewModeEnabled&&!Object.values(jb.EH).includes(zb[0].name))return!1;var sb=this.getElementsIncludingDeleted(),Mb=this.getAppState();
return nk(Pb,"keyboard",Mb,sb,this.app,null),Fb.preventDefault(),Fb.stopPropagation(),this.updater(zb[0].perform(sb,Mb,null,this.app)),!0}},{key:"executeAction",value:function(Fb){var Tb=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"api",wb=this.getElementsIncludingDeleted(),zb=this.getAppState();nk(Fb,Tb,zb,wb,this.app,null);this.updater(Fb.perform(wb,zb,null,this.app))}}]),ja}(),Kh=f(8897),Di=f(7053),Lh=f(679),Yk=function(ja){ja=Array.from(ja.values());return{x:wj(ja,function(Fb){return Fb.x})/
ja.length,y:wj(ja,function(Fb){return Fb.y})/ja.length}},bk=function(ja){var Fb=(0,Yd.Z)(ja,2);ja=Fb[0];Fb=Fb[1];return Math.hypot(ja.x-Fb.x,ja.y-Fb.y)},wj=function(ja,Fb){return ja.reduce(function(Tb,wb){return Tb+Fb(wb)},0)},Fl=function(){function ja(){var Fb=this;(0,Sd.Z)(this,ja);this.elementCache=new Map;this.recording=!0;this.stateHistory=[];this.redoStack=[];this.lastEntry=null;this.generateEntry=function(Tb,wb){return Fb.dehydrateHistoryEntry({appState:{selectedElementIds:Tb.selectedElementIds,
selectedGroupIds:Tb.selectedGroupIds,viewBackgroundColor:Tb.viewBackgroundColor,editingLinearElement:Tb.editingLinearElement,editingGroupId:Tb.editingGroupId,name:Tb.name},elements:wb.reduce(function(zb,Pb){if((0,le.bt)(Pb)&&Tb.multiElement&&Tb.multiElement.id===Pb.id){if(Tb.multiElement&&Tb.multiElement.id===Pb.id&&2>Pb.points.length)return zb;zb.push(Aa(Aa({},Pb),{},{points:Pb.lastCommittedPoint!==Pb.points[Pb.points.length-1]?Pb.points.slice(0,-1):Pb.points}))}else zb.push(Pb);return zb},[])})}}
return(0,Nb.Z)(ja,[{key:"hydrateHistoryEntry",value:function(Fb){var Tb=this,wb=Fb.elements;return{appState:JSON.parse(Fb.appState),elements:wb.map(function(zb){var Pb,sb=null===(Pb=Tb.elementCache.get(zb.id))||void 0===Pb?void 0:Pb.get(zb.versionNonce);if(!sb)throw Error("Element not found: ".concat(zb.id,":").concat(zb.versionNonce));return sb})}}},{key:"dehydrateHistoryEntry",value:function(Fb){var Tb=this,wb=Fb.elements;return{appState:JSON.stringify(Fb.appState),elements:wb.map(function(zb){Tb.elementCache.has(zb.id)||
Tb.elementCache.set(zb.id,new Map);var Pb=Tb.elementCache.get(zb.id);return Pb.has(zb.versionNonce)||Pb.set(zb.versionNonce,(0,yi.OL)(zb)),{id:zb.id,versionNonce:zb.versionNonce}})}}},{key:"getSnapshotForTest",value:function(){var Fb=this;return{recording:this.recording,stateHistory:this.stateHistory.map(function(Tb){return Fb.hydrateHistoryEntry(Tb)}),redoStack:this.redoStack.map(function(Tb){return Fb.hydrateHistoryEntry(Tb)})}}},{key:"clear",value:function(){this.stateHistory.length=0;this.redoStack.length=
0;this.lastEntry=null;this.elementCache.clear()}},{key:"shouldCreateEntry",value:function(Fb){var Tb,wb=this.lastEntry;if(!wb||Fb.elements.length!==wb.elements.length)return!0;for(var zb=Fb.elements.length-1;-1<zb;zb--){var Pb=Fb.elements[zb],sb=wb.elements[zb];if(!Pb||!sb||Pb.id!==sb.id||Pb.versionNonce!==sb.versionNonce)return!0}for(Tb in Fb.appState){var Mb,$b;if(("editingLinearElement"!==Tb||(null===(Mb=Fb.appState[Tb])||void 0===Mb?void 0:Mb.elementId)!==(null===($b=wb.appState[Tb])||void 0===
$b?void 0:$b.elementId))&&"selectedElementIds"!==Tb&&"selectedGroupIds"!==Tb&&Fb.appState[Tb]!==wb.appState[Tb])return!0}return!1}},{key:"pushEntry",value:function(Fb,Tb){Fb=this.generateEntry(Fb,Tb);(Tb=this.hydrateHistoryEntry(Fb))&&this.shouldCreateEntry(Tb)&&(this.stateHistory.push(Fb),this.lastEntry=Tb,this.clearRedoStack())}},{key:"clearRedoStack",value:function(){this.redoStack.splice(0,this.redoStack.length)}},{key:"redoOnce",value:function(){if(0===this.redoStack.length)return null;var Fb=
this.redoStack.pop();return void 0!==Fb?(this.stateHistory.push(Fb),this.hydrateHistoryEntry(Fb)):null}},{key:"undoOnce",value:function(){if(1===this.stateHistory.length)return null;var Fb=this.stateHistory.pop(),Tb=this.stateHistory[this.stateHistory.length-1];return void 0!==Fb?(this.redoStack.push(Fb),this.hydrateHistoryEntry(Tb)):null}},{key:"setCurrentState",value:function(Fb,Tb){this.lastEntry=this.hydrateHistoryEntry(this.generateEntry(Fb,Tb))}},{key:"resumeRecording",value:function(){this.recording=
!0}},{key:"record",value:function(Fb,Tb){this.recording&&(this.pushEntry(Fb,Tb),this.recording=!1)}}]),ja}(),Em=f(3547),Rj=f(3063),fi=f(746),Sj=[{icon:(0,Cb.jsx)("svg",{viewBox:"0 0 320 512",className:"",children:(0,Cb.jsx)("path",{d:"M302.189 329.126H196.105l55.831 135.993c3.889 9.428-.555 19.999-9.444 23.999l-49.165 21.427c-9.165 4-19.443-.571-23.332-9.714l-53.053-129.136-86.664 89.138C18.729 472.71 0 463.554 0 447.977V18.299C0 1.899 19.921-6.096 30.277 5.443l284.412 292.542c11.472 11.179 3.007 31.141-12.5 31.141z"})}),
value:"selection",key:vc.tW.V},{icon:(0,Cb.jsx)("svg",{viewBox:"0 0 448 512",children:(0,Cb.jsx)("path",{d:"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z"})}),value:"rectangle",key:vc.tW.R},{icon:(0,Cb.jsx)("svg",{viewBox:"0 0 223.646 223.646",children:(0,Cb.jsx)("path",{d:"M111.823 0L16.622 111.823 111.823 223.646 207.025 111.823z"})}),value:"diamond",key:vc.tW.D},{icon:(0,Cb.jsx)("svg",{viewBox:"0 0 512 512",children:(0,Cb.jsx)("path",
{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8z"})}),value:"ellipse",key:vc.tW.O},{icon:(0,Cb.jsx)("svg",{viewBox:"0 0 448 512",className:"rtl-mirror",children:(0,Cb.jsx)("path",{d:"M313.941 216H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12h301.941v46.059c0 21.382 25.851 32.09 40.971 16.971l86.059-86.059c9.373-9.373 9.373-24.569 0-33.941l-86.059-86.059c-15.119-15.119-40.971-4.411-40.971 16.971V216z"})}),value:"arrow",key:vc.tW.A},{icon:(0,Cb.jsx)("svg",{viewBox:"0 0 6 6",
children:(0,Cb.jsx)("line",{x1:"0",y1:"3",x2:"6",y2:"3",stroke:"currentColor",strokeLinecap:"round"})}),value:"line",key:[vc.tW.P,vc.tW.L]},{icon:(0,Cb.jsx)("svg",{viewBox:"0 0 512 512",children:(0,Cb.jsx)("path",{fill:"currentColor",d:"M290.74 93.24l128.02 128.02-277.99 277.99-114.14 12.6C11.35 513.54-1.56 500.62.14 485.34l12.7-114.22 277.9-277.88zm207.2-19.06l-60.11-60.11c-18.75-18.75-49.16-18.75-67.91 0l-56.55 56.55 128.02 128.02 56.55-56.55c18.75-18.76 18.75-49.16 0-67.91z"})}),value:"freedraw",
key:[vc.tW.X,vc.tW.P.toUpperCase()]},{icon:(0,Cb.jsx)("svg",{viewBox:"0 0 448 512",children:(0,Cb.jsx)("path",{d:"M432 416h-23.41L277.88 53.69A32 32 0 0 0 247.58 32h-47.16a32 32 0 0 0-30.3 21.69L39.41 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-19.58l23.3-64h152.56l23.3 64H304a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM176.85 272L224 142.51 271.15 272z"})}),value:"text",key:vc.tW.T},{icon:(0,Cb.jsx)("svg",{viewBox:"0 0 512 512",
children:(0,Cb.jsx)("path",{fill:"currentColor",d:"M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm-6 336H54a6 6 0 0 1-6-6V118a6 6 0 0 1 6-6h404a6 6 0 0 1 6 6v276a6 6 0 0 1-6 6zM128 152c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zM96 352h320v-80l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L192 304l-39.515-39.515c-4.686-4.686-12.284-4.686-16.971 0L96 304v48z"})}),value:"image",key:null}],Mh=f(5156),
ej=f(7288),Nh=(f(1292),{cut:[(0,Dc.uY)("CtrlOrCmd+X")],copy:[(0,Dc.uY)("CtrlOrCmd+C")],paste:[(0,Dc.uY)("CtrlOrCmd+V")],copyStyles:[(0,Dc.uY)("CtrlOrCmd+Alt+C")],pasteStyles:[(0,Dc.uY)("CtrlOrCmd+Alt+V")],selectAll:[(0,Dc.uY)("CtrlOrCmd+A")],deleteSelectedElements:[(0,Dc.uY)("Del")],duplicateSelection:[(0,Dc.uY)("CtrlOrCmd+D"),(0,Dc.uY)("Alt+".concat((0,qc.t)("helpDialog.drag")))],sendBackward:[(0,Dc.uY)("CtrlOrCmd+[")],bringForward:[(0,Dc.uY)("CtrlOrCmd+]")],sendToBack:[vc.Um?(0,Dc.uY)("CtrlOrCmd+Alt+["):
(0,Dc.uY)("CtrlOrCmd+Shift+[")],bringToFront:[vc.Um?(0,Dc.uY)("CtrlOrCmd+Alt+]"):(0,Dc.uY)("CtrlOrCmd+Shift+]")],copyAsPng:[(0,Dc.uY)("Shift+Alt+C")],copyAsSvg:[],group:[(0,Dc.uY)("CtrlOrCmd+G")],ungroup:[(0,Dc.uY)("CtrlOrCmd+Shift+G")],gridMode:[(0,Dc.uY)("CtrlOrCmd+'")],zenMode:[(0,Dc.uY)("Alt+Z")],stats:[(0,Dc.uY)("Alt+/")],addToLibrary:[],flipHorizontal:[(0,Dc.uY)("Shift+H")],flipVertical:[(0,Dc.uY)("Shift+V")],viewMode:[(0,Dc.uY)("Alt+R")],hyperlink:[(0,Dc.uY)("CtrlOrCmd+K")],toggleLock:[(0,Dc.uY)("CtrlOrCmd+Shift+L")]}),
Yi=function(ja){var Fb=ja.onCloseRequest,Tb=ja.actionManager,wb=ja.appState,zb=ja.elements;return(0,Cb.jsx)(ej.J,{onCloseRequest:Fb,top:ja.top,left:ja.left,fitInViewport:!0,offsetLeft:wb.offsetLeft,offsetTop:wb.offsetTop,viewportWidth:wb.width,viewportHeight:wb.height,children:(0,Cb.jsx)("ul",{className:"context-menu",onContextMenu:function(Pb){return Pb.preventDefault()},children:ja.options.map(function(Pb,sb){var Mb;if("separator"===Pb)return(0,Cb.jsx)("hr",{className:"context-menu-option-separator"},
sb);var $b,Bc=Pb.name,Pc="";return Pb.contextItemLabel&&(Pc="function"==typeof Pb.contextItemLabel?(0,qc.t)(Pb.contextItemLabel(zb,wb)):(0,qc.t)(Pb.contextItemLabel)),(0,Cb.jsx)("li",{"data-testid":Bc,onClick:Fb,children:(0,Cb.jsxs)("button",{className:(0,be.Z)("context-menu-option",{dangerous:"deleteSelectedElements"===Bc,checkmark:null===(Mb=Pb.checked)||void 0===Mb?void 0:Mb.call(Pb,wb)}),onClick:function(){return Tb.executeAction(Pb,"contextMenu")},children:[(0,Cb.jsx)("div",{className:"context-menu-option__label",
children:Pc}),(0,Cb.jsx)("kbd",{className:"context-menu-option__shortcut",children:Bc?($b=Nh[Bc],$b&&0<$b.length?$b[0]:""):""})]})},sb)})})})},mi=new WeakMap,Zk=function(ja){var Fb,Tb,wb=[];ja.options.forEach(function(zb){zb&&wb.push(zb)});wb.length&&(0,Mh.render)((0,Cb.jsx)(Yi,{top:ja.top,left:ja.left,options:wb,onCloseRequest:function(){return zb=ja.container,void((Pb=mi.get(zb))&&((0,Mh.unmountComponentAtNode)(Pb),Pb.remove(),mi.delete(zb)));var zb,Pb},actionManager:ja.actionManager,appState:ja.appState,
elements:ja.elements}),(Fb=ja.container,(Tb=mi.get(Fb))||(Tb=document.createElement("div"),Fb.querySelector(".excalidraw-contextMenuContainer").appendChild(Tb),mi.set(Fb,Tb),Tb)))},ck=f(2726),fj=f(8120),zg=function(ja){var Fb,Tb=ja.appState,wb=ja.renderAction,zb=ja.activeTool;ja=(0,rd.Zs)((0,Sb.Lm)(ja.elements),Tb);var Pb=!1;2===ja.length&&((0,le.Xo)(ja[0])||(0,le.Xo)(ja[1]))&&(Pb=!0);var sb;Tb=!!Tb.editingElement;var Mb=gj(),$b="rtl"===document.documentElement.getAttribute("dir"),Bc=(0,rd.$b)(zb)||
ja.some(function(Rd){return(0,rd.$b)(Rd.type)&&!(0,Dc.Qm)(Rd.backgroundColor)}),Pc=(0,rd.$b)(zb)||ja.some(function(Rd){return(0,rd.$b)(Rd.type)}),Tc=1===ja.length||Pb,wd=(null===(Fb=ja[0])||void 0===Fb?void 0:Fb.type)||null;Fb=Bb(ja);try{for(Fb.s();!(sb=Fb.n()).done;)if(sb.value.type!==wd){wd=null;break}}catch(Rd){Fb.e(Rd)}finally{Fb.f()}return(0,Cb.jsxs)("div",{className:"panelColumn",children:[((0,fj.PD)(zb)&&"image"!==zb&&"image"!==wd||ja.some(function(Rd){return(0,fj.PD)(Rd.type)}))&&wb("changeStrokeColor"),
Pc&&wb("changeBackgroundColor"),Bc&&wb("changeFillStyle"),((0,rd.Zd)(zb)||ja.some(function(Rd){return(0,rd.Zd)(Rd.type)}))&&wb("changeStrokeWidth"),("freedraw"===zb||ja.some(function(Rd){return"freedraw"===Rd.type}))&&wb("changeStrokeShape"),((0,rd.M9)(zb)||ja.some(function(Rd){return(0,rd.M9)(Rd.type)}))&&(0,Cb.jsxs)(Cb.Fragment,{children:[wb("changeStrokeStyle"),wb("changeSloppiness")]}),((0,rd.gP)(zb)||ja.some(function(Rd){return(0,rd.gP)(Rd.type)}))&&(0,Cb.jsx)(Cb.Fragment,{children:wb("changeSharpness")}),
((0,rd.bZ)(zb)||ja.some(function(Rd){return(0,rd.bZ)(Rd.type)}))&&(0,Cb.jsxs)(Cb.Fragment,{children:[wb("changeFontSize"),wb("changeFontFamily"),wb("changeTextAlign")]}),ja.some(function(Rd){return(0,le.Xo)(Rd)||(0,le.Xh)(Rd)})&&wb("changeVerticalAlign"),((0,rd.Un)(zb)||ja.some(function(Rd){return(0,rd.Un)(Rd.type)}))&&(0,Cb.jsx)(Cb.Fragment,{children:wb("changeArrowhead")}),wb("changeOpacity"),(0,Cb.jsxs)("fieldset",{children:[(0,Cb.jsx)("legend",{children:(0,qc.t)("labels.layers")}),(0,Cb.jsxs)("div",
{className:"buttonList",children:[wb("sendToBack"),wb("sendBackward"),wb("bringToFront"),wb("bringForward")]})]}),1<ja.length&&!Pb&&(0,Cb.jsxs)("fieldset",{children:[(0,Cb.jsx)("legend",{children:(0,qc.t)("labels.align")}),(0,Cb.jsxs)("div",{className:"buttonList",children:[$b?(0,Cb.jsxs)(Cb.Fragment,{children:[wb("alignRight"),wb("alignHorizontallyCentered"),wb("alignLeft")]}):(0,Cb.jsxs)(Cb.Fragment,{children:[wb("alignLeft"),wb("alignHorizontallyCentered"),wb("alignRight")]}),2<ja.length&&wb("distributeHorizontally"),
(0,Cb.jsxs)("div",{className:"iconRow",children:[wb("alignTop"),wb("alignVerticallyCentered"),wb("alignBottom"),2<ja.length&&wb("distributeVertically")]})]})]}),!Tb&&0<ja.length&&(0,Cb.jsxs)("fieldset",{children:[(0,Cb.jsx)("legend",{children:(0,qc.t)("labels.actions")}),(0,Cb.jsxs)("div",{className:"buttonList",children:[!Mb.isMobile&&wb("duplicateSelection"),!Mb.isMobile&&wb("deleteSelectedElements"),wb("group"),wb("ungroup"),Tc&&wb("hyperlink")]})]})]})},Ei=function(ja){var Fb=ja.canvas,Tb=ja.activeTool,
wb=ja.setAppState,zb=ja.onImageAction,Pb=ja.appState;return(0,Cb.jsx)(Cb.Fragment,{children:Sj.map(function(sb,Mb){var $b=sb.value,Bc=sb.icon,Pc=sb.key;sb=(0,qc.t)("toolBar.".concat($b));Pc=(Pc=Pc&&("string"==typeof Pc?Pc:Pc[0]))?"".concat((0,Dc.Oo)(Pc)," ").concat((0,qc.t)("helpDialog.or")," ").concat(Mb+1):"".concat(Mb+1);return(0,Cb.jsx)(Mc.V,{className:"Shape",type:"radio",icon:Bc,checked:Tb.type===$b,name:"editor-current-shape",title:"".concat((0,Dc.Oo)(sb)," — ").concat(Pc),keyBindingLabel:"".concat(Mb+
1),"aria-label":(0,Dc.Oo)(sb),"aria-keyshortcuts":Pc,"data-testid":$b,onPointerDown:function(Tc){Tc=Tc.pointerType;Pb.penDetected||"pen"!==Tc||wb({penDetected:!0,penMode:!0})},onChange:function(Tc){Tc=Tc.pointerType;Pb.activeTool.type!==$b&&(0,Th.L)("toolbar",$b,"ui");var wd=(0,Dc.Om)(Pb,{type:$b});wb({activeTool:wd,multiElement:null,selectedElementIds:{}});(0,Dc.Uk)(Fb,Sa(Sa({},Pb),{},{activeTool:wd}));"image"===$b&&zb({pointerType:Tc})}},$b)})})},ni=function(ja){var Fb=ja.renderAction;ja.zoom;return(0,Cb.jsx)(kd,
{gap:1,children:(0,Cb.jsxs)(Sc,{gap:1,align:"center",children:[Fb("zoomOut"),Fb("zoomIn"),Fb("resetZoom")]})})},Ej=function(ja){ja.appState;ja.setAppState;var Fb=ja.actionManager;ja=ja.showThemeBtn;return(0,Cb.jsxs)("div",{style:{display:"flex"},children:[Fb.renderAction("changeViewBackgroundColor"),ja&&Fb.renderAction("toggleTheme")]})},Fh=(f(778),function(ja){var Fb=ja.isCollaborating,Tb=ja.collaboratorCount;ja=ja.onClick;return(0,Cb.jsx)(Cb.Fragment,{children:(0,Cb.jsx)(Mc.V,{className:(0,be.Z)("CollabButton",
{"is-collaborating":Fb}),onClick:ja,icon:Me.rC,type:"button",title:(0,qc.t)("labels.liveCollaboration"),"aria-label":(0,qc.t)("labels.liveCollaboration"),showAriaLabel:gj().isMobile,children:Fb&&(0,Cb.jsx)("div",{className:"CollabButton-collaborators",children:Tb})})})}),zi=f(2939),ok=function(ja){var Fb=ja.message,Tb=ja.onClose;ja=(0,Uc.useState)(!!Fb);var wb=(0,Yd.Z)(ja,2);ja=wb[0];var zb=wb[1],Pb=mk().container;wb=cd().useCallback(function(){zb(!1);Tb&&Tb();null==Pb||Pb.focus()},[Tb,Pb]);return(0,Cb.jsx)(Cb.Fragment,
{children:ja&&(0,Cb.jsx)(zi.V,{small:!0,onCloseRequest:wb,title:(0,qc.t)("errorDialog.title"),children:(0,Cb.jsx)("div",{style:{whiteSpace:"pre-wrap"},children:Fb})})})},hj=f(6797),pj=(f(2205),f(5284)),en="filter"in document.createElement("canvas").getContext("2d"),Ak=function(){return(0,Cb.jsxs)("div",{children:[(0,Cb.jsx)("h3",{children:(0,qc.t)("canvasError.cannotShowPreview")}),(0,Cb.jsx)("p",{children:(0,Cb.jsx)("span",{children:(0,qc.t)("canvasError.canvasTooBig")})}),(0,Cb.jsxs)("em",{children:["(",
(0,qc.t)("canvasError.canvasTooBigTip"),")"]})]})},nl=function(ja,Fb){(0,Mh.unmountComponentAtNode)(Fb);Fb.innerHTML="";ja instanceof HTMLCanvasElement?Fb.appendChild(ja):(0,Mh.render)((0,Cb.jsx)(Ak,{}),Fb)},qj=function(ja){var Fb,Tb=ja.children,wb=ja.title,zb=ja.onClick,Pb=ja.color;ja=ja.shade;ja=void 0===ja?6:ja;return(0,Cb.jsx)("button",{className:"ExportDialog-imageExportButton",style:(Fb={},(0,ld.Z)(Fb,"--button-color",pj[Pb][ja]),(0,ld.Z)(Fb,"--button-color-darker",pj[Pb][ja+1]),(0,ld.Z)(Fb,
"--button-color-darkest",pj[Pb][ja+2]),Fb),title:wb,"aria-label":wb,onClick:zb,children:Tb})},Ol=function(ja){var Fb=ja.elements,Tb=ja.appState,wb=ja.files,zb=ja.exportPadding,Pb=void 0===zb?jb.qy:zb;zb=ja.actionManager;var sb=ja.onExportToPng,Mb=ja.onExportToSvg,$b=ja.onExportToClipboard,Bc=(0,rd.N)(Fb,Tb);ja=(0,Uc.useState)(Bc);ja=(0,Yd.Z)(ja,2);var Pc=ja[0],Tc=ja[1],wd=(0,Uc.useRef)(null),Rd=Tb.exportBackground,Gd=Tb.viewBackgroundColor,Cd=Pc?(0,rd.eD)(Fb,Tb,!0):Fb;return(0,Uc.useEffect)(function(){Tc(Bc)},
[Bc]),(0,Uc.useEffect)(function(){var Id=wd.current;Id&&(0,Ab.NL)(Cd,Tb,wb,{exportBackground:Rd,viewBackgroundColor:Gd,exportPadding:Pb}).then(function(xe){return(0,sa._c)(xe).then(function(){nl(xe,Id)})}).catch(function(xe){console.error(xe);nl(new hj.l,Id)})},[Tb,wb,Cd,Rd,Pb,Gd]),(0,Cb.jsxs)("div",{className:"ExportDialog",children:[(0,Cb.jsx)("div",{className:"ExportDialog__preview",ref:wd}),en&&zb.renderAction("exportWithDarkMode"),(0,Cb.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr"},
children:(0,Cb.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(190px, 1fr))",overflow:"hidden"},children:[zb.renderAction("changeExportBackground"),Bc&&(0,Cb.jsx)(lc,{checked:Pc,onChange:function(Id){return Tc(Id)},children:(0,qc.t)("labels.onlySelected")}),zb.renderAction("changeExportEmbedScene")]})}),(0,Cb.jsxs)("div",{style:{display:"flex",alignItems:"center",marginTop:".6em"},children:[(0,Cb.jsx)(Sc,{gap:2,children:zb.renderAction("changeExportScale")}),(0,Cb.jsx)("p",
{style:{marginLeft:"1em",userSelect:"none"},children:"Scale"})]}),(0,Cb.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",margin:".6em 0"},children:!qa.kr&&zb.renderAction("changeProjectName")}),(0,Cb.jsxs)(Sc,{gap:2,justifyContent:"center",style:{margin:"2em 0"},children:[(0,Cb.jsx)(qj,{color:"indigo",title:(0,qc.t)("buttons.exportToPng"),"aria-label":(0,qc.t)("buttons.exportToPng"),onClick:function(){return sb(Cd)},children:"PNG"}),(0,Cb.jsx)(qj,{color:"red",title:(0,qc.t)("buttons.exportToSvg"),
"aria-label":(0,qc.t)("buttons.exportToSvg"),onClick:function(){return Mb(Cd)},children:"SVG"}),uf.vt&&(0,Cb.jsx)(qj,{title:(0,qc.t)("buttons.copyPngToClipboard"),onClick:function(){return $b(Cd)},color:"gray",shade:7,children:Me.BR})]})]})},sm=function(ja){var Fb=ja.elements,Tb=ja.appState,wb=ja.files,zb=ja.exportPadding;zb=void 0===zb?jb.qy:zb;var Pb=ja.actionManager,sb=ja.onExportToPng,Mb=ja.onExportToSvg;ja=ja.onExportToClipboard;var $b=(0,Uc.useState)(!1),Bc=(0,Yd.Z)($b,2);$b=Bc[0];var Pc=Bc[1];
Bc=cd().useCallback(function(){Pc(!1)},[]);return(0,Cb.jsxs)(Cb.Fragment,{children:[(0,Cb.jsx)(Mc.V,{onClick:function(){Pc(!0)},"data-testid":"image-export-button",icon:Me.Rb,type:"button","aria-label":(0,qc.t)("buttons.exportImage"),showAriaLabel:gj().isMobile,title:(0,qc.t)("buttons.exportImage")}),$b&&(0,Cb.jsx)(zi.V,{onCloseRequest:Bc,title:(0,qc.t)("buttons.exportImage"),children:(0,Cb.jsx)(Ol,{elements:Fb,appState:Tb,files:wb,exportPadding:zb,actionManager:Pb,onExportToPng:sb,onExportToSvg:Mb,
onExportToClipboard:ja,onCloseRequest:Bc})})]})},Pl=(f(1310),function(ja){var Fb=ja.children,Tb=ja.className;return(0,Cb.jsx)("div",{className:(0,be.Z)("FixedSideContainer","FixedSideContainer_side_".concat(ja.side),Tb),children:Fb})}),pk=(f(7096),function(ja){return(ja=function(Fb){var Tb=Fb.appState,wb=Fb.elements;Fb=Fb.isMobile;var zb=Tb.activeTool,Pb=Tb.isResizing,sb=Tb.isRotating,Mb=Tb.lastPointerDownWith,$b=null!==Tb.multiElement;if(Tb.isLibraryOpen)return null;if((0,Kh.EN)(Tb))return(0,qc.t)("hints.eraserRevert");
if("arrow"===zb.type||"line"===zb.type)return $b?(0,qc.t)("hints.linearElementMulti"):(0,qc.t)("hints.linearElement");if("freedraw"===zb.type)return(0,qc.t)("hints.freeDraw");if("text"===zb.type)return(0,qc.t)("hints.text");if("image"===Tb.activeTool.type&&Tb.pendingImageElementId)return(0,qc.t)("hints.placeImage");wb=(0,rd.eD)(wb,Tb);if(Pb&&"mouse"===Mb&&1===wb.length)return Tb=wb[0],(0,le.bt)(Tb)&&2===Tb.points.length?(0,qc.t)("hints.lockAngle"):(0,le.pC)(Tb)?(0,qc.t)("hints.resizeImage"):(0,qc.t)("hints.resize");
if(sb&&"mouse"===Mb)return(0,qc.t)("hints.rotate");if(1===wb.length&&(0,le.iB)(wb[0]))return(0,qc.t)("hints.text_selected");if(Tb.editingElement&&(0,le.iB)(Tb.editingElement))return(0,qc.t)("hints.text_editing");if("selection"===zb.type){var Bc;if("selection"===(null===(Bc=Tb.draggingElement)||void 0===Bc?void 0:Bc.type)&&!Tb.editingElement&&!Tb.editingLinearElement)return(0,qc.t)("hints.deepBoxSelect");if(!wb.length&&!Fb)return(0,qc.t)("hints.canvasPanning")}if(1===wb.length){if((0,le.bt)(wb[0]))return Tb.editingLinearElement?
Tb.editingLinearElement.selectedPointsIndices?(0,qc.t)("hints.lineEditor_pointSelected"):(0,qc.t)("hints.lineEditor_nothingSelected"):(0,qc.t)("hints.lineEditor_info");if((0,le.mG)(wb[0]))return(0,qc.t)("hints.bindTextToElement")}return null}({appState:ja.appState,elements:ja.elements,isMobile:ja.isMobile}))?(ja=(0,Dc.uY)(ja),(0,Cb.jsx)("div",{className:"HintViewer",children:(0,Cb.jsx)("span",{children:ja})})):null}),Tj=f(1226),Ql=f(5440),dk=(0,Cb.jsx)("svg",{width:"1792",height:"1792",viewBox:"0 0 1792 1792",
xmlns:"http://www.w3.org/2000/svg",children:(0,Cb.jsx)("path",{d:"M640 768h512v-192q0-106-75-181t-181-75-181 75-75 181v192zm832 96v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h32v-192q0-184 132-316t316-132 316 132 132 316v192h32q40 0 68 28t28 68z"})}),rg=(0,Cb.jsx)("svg",{width:"1792",height:"1792",viewBox:"0 0 1792 1792",xmlns:"http://www.w3.org/2000/svg",className:"unlocked-icon rtl-mirror",children:(0,Cb.jsx)("path",{d:"M1728 576v256q0 26-19 45t-45 19h-64q-26 0-45-19t-19-45v-256q0-106-75-181t-181-75-181 75-75 181v192h96q40 0 68 28t28 68v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h672v-192q0-185 131.5-316.5t316.5-131.5 316.5 131.5 131.5 316.5z"})}),
bm=function(ja){return(0,Cb.jsxs)("label",{className:(0,be.Z)("ToolIcon ToolIcon__lock ToolIcon_type_floating","ToolIcon_size_".concat("medium"),{"is-mobile":ja.isMobile}),title:"".concat(ja.title," — Q"),children:[(0,Cb.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:ja.name,onChange:ja.onChange,checked:ja.checked,"aria-label":ja.title}),(0,Cb.jsx)("div",{className:"ToolIcon__icon",children:ja.checked?dk:rg})]})},rh=["heading","children"],Li=function(ja){var Fb=ja.heading,Tb=
ja.children;ja=(0,ck.Z)(ja,rh);var wb=mk().id,zb=(0,Cb.jsx)("h2",{className:"visually-hidden",id:"".concat(wb,"-").concat(Fb,"-title"),children:(0,qc.t)("headings.".concat(Fb))});return(0,Cb.jsx)("section",Wb(Wb({},ja),{},{"aria-labelledby":"".concat(wb,"-").concat(Fb,"-title"),children:"function"==typeof Tb?Tb(zb):(0,Cb.jsxs)(Cb.Fragment,{children:[zb,Tb]})}))},sf=f(756),xj=(f(580),function(ja){var Fb=ja.className,Tb=ja.mobile,wb=ja.collaborators,zb=ja.actionManager,Pb=new Map;wb.forEach(function(sb,
Mb){Pb.set(sb.id||Mb,sb)});ja=0<Pb.size&&Array.from(Pb).filter(function(sb){sb=(0,Yd.Z)(sb,2);sb=(sb[0],sb[1]);return 0!==Object.keys(sb).length}).map(function(sb){var Mb=(0,Yd.Z)(sb,2);sb=Mb[0];Mb=Mb[1];var $b=zb.renderAction("goToCollaborator",[sb,Mb]);return Tb?(0,Cb.jsx)(ff.u,{label:Mb.username||"Unknown user",children:$b},sb):(0,Cb.jsx)(cd().Fragment,{children:$b},sb)});return(0,Cb.jsx)("div",{className:(0,be.Z)("UserList",Fb,{UserList_mobile:Tb}),children:ja})}),Mi=(0,Cb.jsx)("svg",{viewBox:"0 0 576 512",
children:(0,Cb.jsx)("path",{fill:"currentColor",d:"M542.22 32.05c-54.8 3.11-163.72 14.43-230.96 55.59-4.64 2.84-7.27 7.89-7.27 13.17v363.87c0 11.55 12.63 18.85 23.28 13.49 69.18-34.82 169.23-44.32 218.7-46.92 16.89-.89 30.02-14.43 30.02-30.66V62.75c.01-17.71-15.35-31.74-33.77-30.7zM264.73 87.64C197.5 46.48 88.58 35.17 33.78 32.05 15.36 31.01 0 45.04 0 62.75V400.6c0 16.24 13.13 29.78 30.02 30.66 49.49 2.6 149.59 12.11 218.77 46.95 10.62 5.35 23.21-1.94 23.21-13.46V100.63c0-5.29-2.62-10.14-7.27-12.99z"})}),
Bk=function(ja){var Fb=ja.appState,Tb=ja.setAppState;ja=ja.isMobile;var wb=gj();return(0,Cb.jsxs)("label",{className:(0,be.Z)("ToolIcon ToolIcon_type_floating ToolIcon__library","ToolIcon_size_medium",{"is-mobile":ja}),title:"".concat((0,Dc.Oo)((0,qc.t)("toolBar.library"))," — 0"),children:[(0,Cb.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:"editor-library",onChange:function(zb){var Pb;null===(Pb=document.querySelector(".layer-ui__wrapper"))||void 0===Pb||Pb.classList.remove("animate");
zb=zb.target.checked;Tb({isLibraryOpen:zb});zb&&(0,Th.L)("library","toggleLibrary (open)","toolbar (".concat(wb.isMobile?"mobile":"desktop",")"))},checked:Fb.isLibraryOpen,"aria-label":(0,Dc.Oo)((0,qc.t)("toolBar.library")),"aria-keyshortcuts":"0"}),(0,Cb.jsx)("div",{className:"ToolIcon__icon",children:Mi})]})},ek=(0,Cb.jsxs)("svg",{width:"205",height:"205",viewBox:"0 0 205 205",xmlns:"http://www.w3.org/2000/svg",children:[(0,Cb.jsx)("path",{d:"m35 195-25-29.17V50h50v115l-25 30"}),(0,Cb.jsx)("path",
{d:"M10 40V10h50v30H10"}),(0,Cb.jsx)("path",{d:"M125 145h70v50h-70"}),(0,Cb.jsx)("path",{d:"M190 145v-30l-10-20h-40l-10 20v30h15v-30l5-5h20l5 5v30h15"})]}),dm=(0,Cb.jsxs)("svg",{width:"205",height:"205",viewBox:"0 0 205 205",xmlns:"http://www.w3.org/2000/svg",className:"unlocked-icon rtl-mirror",children:[(0,Cb.jsx)("path",{d:"m35 195-25-29.17V50h50v115l-25 30"}),(0,Cb.jsx)("path",{d:"M10 40V10h50v30H10"}),(0,Cb.jsx)("path",{d:"M125 145h70v50h-70"}),(0,Cb.jsx)("path",{d:"M145 145v-30l-10-20H95l-10 20v30h15v-30l5-5h20l5 5v30h15"})]}),
re=function(ja){return ja.penDetected?(0,Cb.jsxs)("label",{className:(0,be.Z)("ToolIcon ToolIcon__penMode ToolIcon_type_floating","ToolIcon_size_".concat("medium"),{"is-mobile":ja.isMobile}),title:"".concat(ja.title),children:[(0,Cb.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:ja.name,onChange:ja.onChange,checked:ja.checked,"aria-label":ja.title}),(0,Cb.jsx)("div",{className:"ToolIcon__icon",children:ja.checked?ek:dm})]}):ja.isMobile?null:(0,Cb.jsx)("label",{className:(0,be.Z)("ToolIcon ToolIcon__penMode ToolIcon_type_floating",
"ToolIcon_size_".concat("medium"),{"is-mobile":ja.isMobile}),children:(0,Cb.jsx)("div",{className:"ToolIcon__icon ToolIcon__hidden"})})},Zf=function(ja){var Fb,Tb=ja.appState,wb=ja.elements,zb=ja.libraryMenu,Pb=ja.actionManager,sb=ja.renderJSONExportDialog,Mb=ja.renderImageExportDialog,$b=ja.setAppState,Bc=ja.onCollabButtonClick,Pc=ja.onLockToggle,Tc=ja.onPenModeToggle,wd=ja.canvas,Rd=ja.isCollaborating,Gd=ja.renderCustomFooter,Cd=ja.viewModeEnabled,Id=ja.showThemeBtn,xe=ja.onImageAction,Tf=ja.renderTopRightUI;
ja=ja.renderStats;return(0,Cb.jsxs)(Cb.Fragment,{children:[!Cd&&(0,Cb.jsxs)(Pl,{side:"top",className:"App-top-bar",children:[(0,Cb.jsx)(Li,{heading:"shapes",children:function(se){return(0,Cb.jsxs)(kd,{gap:4,align:"center",children:[(0,Cb.jsxs)(Sc,{gap:1,className:"App-toolbar-container",children:[(0,Cb.jsxs)(Tj.W,{padding:1,className:"App-toolbar",children:[se,(0,Cb.jsx)(Sc,{gap:1,children:(0,Cb.jsx)(Ei,{appState:Tb,canvas:wd,activeTool:Tb.activeTool,setAppState:$b,onImageAction:function($e){xe({insertOnCanvasDirectly:"mouse"!==
$e.pointerType})}})})]}),Tf&&Tf(!0,Tb),(0,Cb.jsx)(bm,{checked:Tb.activeTool.locked,onChange:Pc,title:(0,qc.t)("toolBar.lock"),isMobile:!0}),(0,Cb.jsx)(Bk,{appState:Tb,setAppState:$b,isMobile:!0}),(0,Cb.jsx)(re,{checked:Tb.penMode,onChange:Tc,title:(0,qc.t)("toolBar.penMode"),isMobile:!0,penDetected:Tb.penDetected})]}),zb]})}}),(0,Cb.jsx)(pk,{appState:Tb,elements:wb,isMobile:!0})]}),ja(),(0,Cb.jsx)("div",{className:"App-bottom-bar",style:{marginBottom:sf.nn+2*sf.WM,marginLeft:sf.nn+2*sf.WM,marginRight:sf.nn+
2*sf.WM},children:(0,Cb.jsxs)(Tj.W,{padding:0,children:["canvas"===Tb.openMenu?(0,Cb.jsx)(Li,{className:"App-mobile-menu",heading:"canvasActions",children:(0,Cb.jsx)("div",{className:"panelColumn",children:(0,Cb.jsxs)(kd,{gap:4,children:[Cd?(0,Cb.jsxs)(Cb.Fragment,{children:[sb(),Mb()]}):(0,Cb.jsxs)(Cb.Fragment,{children:[Pb.renderAction("clearCanvas"),Pb.renderAction("loadScene"),sb(),Mb(),Bc&&(0,Cb.jsx)(Fh,{isCollaborating:Rd,collaboratorCount:Tb.collaborators.size,onClick:Bc}),(0,Cb.jsx)(Ej,{actionManager:Pb,
appState:Tb,setAppState:$b,showThemeBtn:Id})]}),null==Gd?void 0:Gd(!0,Tb),0<Tb.collaborators.size&&(0,Cb.jsxs)("fieldset",{children:[(0,Cb.jsx)("legend",{children:(0,qc.t)("labels.collaborators")}),(0,Cb.jsx)(xj,{mobile:!0,collaborators:Tb.collaborators,actionManager:Pb})]})]})})}):"shape"===Tb.openMenu&&!Cd&&(0,Sb.RT)(Tb,wb)?(0,Cb.jsx)(Li,{className:"App-mobile-menu",heading:"selectedShapeActions",children:(0,Cb.jsx)(zg,{appState:Tb,elements:wb,renderAction:Pb.renderAction,activeTool:Tb.activeTool.type})}):
null,(0,Cb.jsxs)("footer",{className:"App-toolbar",children:[(Fb=!Tb.viewModeEnabled&&!Tb.editingElement&&0===(0,rd.eD)(wb,Tb).length,Cd?(0,Cb.jsx)("div",{className:"App-toolbar-content",children:Pb.renderAction("toggleCanvasMenu")}):(0,Cb.jsxs)("div",{className:"App-toolbar-content",children:[Pb.renderAction("toggleCanvasMenu"),Pb.renderAction("toggleEditMenu"),Pb.renderAction("undo"),Pb.renderAction("redo"),Fb&&Pb.renderAction("eraser"),Pb.renderAction(Tb.multiElement?"finalize":"duplicateSelection"),
Pb.renderAction("deleteSelectedElements")]})),Tb.scrolledOutside&&!Tb.openMenu&&(0,Cb.jsx)("button",{className:"scroll-back-to-content",onClick:function(){$b(function(se){for(var $e=1;$e<arguments.length;$e++){var Pe=null!=arguments[$e]?arguments[$e]:{};$e%2?ic(Object(Pe),!0).forEach(function(Re){(0,ld.Z)(se,Re,Pe[Re])}):Object.getOwnPropertyDescriptors?Object.defineProperties(se,Object.getOwnPropertyDescriptors(Pe)):ic(Object(Pe)).forEach(function(Re){Object.defineProperty(se,Re,Object.getOwnPropertyDescriptor(Pe,
Re))})}return se}({},(0,rd.W)(wb,Tb,wd)))},children:(0,qc.t)("buttons.scrollBackToContent")})]})]})})]})},Zi=f(5674),bh=(f(8051),function(ja){var Fb=(0,Uc.useRef)(null),Tb=(0,Uc.useState)(null);Tb=(0,Yd.Z)(Tb,2);var wb=Tb[0],zb=Tb[1];return(0,Uc.useLayoutEffect)(function(){if(ja.spreadsheet){var Pb,sb=(0,Zi.ps)(ja.chartType,ja.spreadsheet,0,0);zb(sb);var Mb=Fb.current;return(0,Qd.Z)(uc().mark(function Bc(){return uc().wrap(function(Pc){for(;;)switch(Pc.prev=Pc.next){case 0:return Pc.next=2,(0,Ab.$D)(sb,
{exportBackground:!1,viewBackgroundColor:pj.white},null);case 2:Pb=Pc.sent,Mb.appendChild(Pb),ja.selected&&Mb.parentNode.focus();case 5:case "end":return Pc.stop()}},Bc)}))(),function(){Mb.removeChild(Pb)}}},[ja.spreadsheet,ja.chartType,ja.selected]),(0,Cb.jsx)("button",{className:"ChartPreview",onClick:function(){wb&&ja.onClick(ja.chartType,wb)},children:(0,Cb.jsx)("div",{ref:Fb})})}),og=function(ja){var Fb=ja.setAppState,Tb=ja.appState,wb=ja.onClose,zb=ja.onInsertChart;ja=cd().useCallback(function(){wb&&
wb()},[wb]);var Pb=function(sb,Mb){zb(Mb);(0,Th.L)("magic","chart",sb);Fb({currentChartType:sb,pasteDialog:{shown:!1,data:null}})};return(0,Cb.jsx)(zi.V,{small:!0,onCloseRequest:ja,title:(0,qc.t)("labels.pasteCharts"),className:"PasteChartDialog",autofocus:!1,children:(0,Cb.jsxs)("div",{className:"container",children:[(0,Cb.jsx)(bh,{chartType:"bar",spreadsheet:Tb.pasteDialog.data,selected:"bar"===Tb.currentChartType,onClick:Pb}),(0,Cb.jsx)(bh,{chartType:"line",spreadsheet:Tb.pasteDialog.data,selected:"line"===
Tb.currentChartType,onClick:Pb})]})})};f(3922);var em=function(){return(0,Cb.jsxs)("div",{className:"HelpDialog--header",children:[(0,Cb.jsx)("a",{className:"HelpDialog--btn",href:"https://github.com/excalidraw/excalidraw#documentation",target:"_blank",rel:"noopener noreferrer",children:(0,qc.t)("helpDialog.documentation")}),(0,Cb.jsx)("a",{className:"HelpDialog--btn",href:"https://blog.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:(0,qc.t)("helpDialog.blog")}),(0,Cb.jsx)("a",
{className:"HelpDialog--btn",href:"https://github.com/excalidraw/excalidraw/issues",target:"_blank",rel:"noopener noreferrer",children:(0,qc.t)("helpDialog.github")})]})},Lk=function(ja){return(0,Cb.jsxs)(Cb.Fragment,{children:[(0,Cb.jsx)("h3",{children:ja.title}),ja.children]})},mg=function(ja){return(0,Cb.jsx)("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between"},children:ja.children})},Ti=function(ja){return(0,Cb.jsx)("div",{style:{width:"49%"},children:ja.children})},
ij=function(ja){return(0,Cb.jsxs)("div",{className:"HelpDialog--island",children:[(0,Cb.jsx)("h3",{className:"HelpDialog--island-title",children:ja.caption}),ja.children]})},If=function(ja){return(0,Cb.jsx)("div",{className:"HelpDialog--shortcut",children:(0,Cb.jsxs)("div",{style:{display:"flex",margin:"0",padding:"4px 8px",alignItems:"center"},children:[(0,Cb.jsx)("div",{style:{lineHeight:1.4},children:ja.label}),(0,Cb.jsx)("div",{style:{display:"flex",flex:"0 0 auto",justifyContent:"flex-end",marginInlineStart:"auto",
minWidth:"30%"},children:ja.shortcuts.map(function(Fb,Tb){return(0,Cb.jsxs)(cd().Fragment,{children:[(0,Cb.jsx)(rk,{children:Fb}),ja.isOr&&Tb!==ja.shortcuts.length-1&&(0,qc.t)("helpDialog.or")]},Tb)})})]})})};If.defaultProps={isOr:!0};var rk=function(ja){return(0,Cb.jsx)("kbd",function(Fb){for(var Tb=1;Tb<arguments.length;Tb++){var wb=null!=arguments[Tb]?arguments[Tb]:{};Tb%2?Pa(Object(wb),!0).forEach(function(zb){(0,ld.Z)(Fb,zb,wb[zb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Fb,
Object.getOwnPropertyDescriptors(wb)):Pa(Object(wb)).forEach(function(zb){Object.defineProperty(Fb,zb,Object.getOwnPropertyDescriptor(wb,zb))})}return Fb}({className:"HelpDialog--key"},ja))},Dj=function(ja){var Fb=ja.onClose;ja=cd().useCallback(function(){Fb&&Fb()},[Fb]);return(0,Cb.jsx)(Cb.Fragment,{children:(0,Cb.jsxs)(zi.V,{onCloseRequest:ja,title:(0,qc.t)("helpDialog.title"),className:"HelpDialog",children:[(0,Cb.jsx)(em,{}),(0,Cb.jsx)(Lk,{title:(0,qc.t)("helpDialog.shortcuts"),children:(0,Cb.jsxs)(mg,
{children:[(0,Cb.jsxs)(Ti,{children:[(0,Cb.jsxs)(ij,{caption:(0,qc.t)("helpDialog.tools"),children:[(0,Cb.jsx)(If,{label:(0,qc.t)("toolBar.selection"),shortcuts:["V","1"]}),(0,Cb.jsx)(If,{label:(0,qc.t)("toolBar.rectangle"),shortcuts:["R","2"]}),(0,Cb.jsx)(If,{label:(0,qc.t)("toolBar.diamond"),shortcuts:["D","3"]}),(0,Cb.jsx)(If,{label:(0,qc.t)("toolBar.ellipse"),shortcuts:["O","4"]}),(0,Cb.jsx)(If,{label:(0,qc.t)("toolBar.arrow"),shortcuts:["A","5"]}),(0,Cb.jsx)(If,{label:(0,qc.t)("toolBar.line"),
shortcuts:["P","6"]}),(0,Cb.jsx)(If,{label:(0,qc.t)("toolBar.freedraw"),shortcuts:["Shift + P","X","7"]}),(0,Cb.jsx)(If,{label:(0,qc.t)("toolBar.text"),shortcuts:["T","8"]}),(0,Cb.jsx)(If,{label:(0,qc.t)("toolBar.image"),shortcuts:["9"]}),(0,Cb.jsx)(If,{label:(0,qc.t)("toolBar.library"),shortcuts:["0"]}),(0,Cb.jsx)(If,{label:(0,qc.t)("toolBar.eraser"),shortcuts:[(0,Dc.uY)("E")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("helpDialog.editSelectedShape"),shortcuts:[(0,Dc.uY)("Enter"),(0,qc.t)("helpDialog.doubleClick")]}),
(0,Cb.jsx)(If,{label:(0,qc.t)("helpDialog.textNewLine"),shortcuts:[(0,Dc.uY)("Enter"),(0,Dc.uY)("Shift+Enter")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("helpDialog.textFinish"),shortcuts:[(0,Dc.uY)("Esc"),(0,Dc.uY)("CtrlOrCmd+Enter")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("helpDialog.curvedArrow"),shortcuts:["A",(0,qc.t)("helpDialog.click"),(0,qc.t)("helpDialog.click"),(0,qc.t)("helpDialog.click")],isOr:!1}),(0,Cb.jsx)(If,{label:(0,qc.t)("helpDialog.curvedLine"),shortcuts:["L",(0,qc.t)("helpDialog.click"),(0,qc.t)("helpDialog.click"),
(0,qc.t)("helpDialog.click")],isOr:!1}),(0,Cb.jsx)(If,{label:(0,qc.t)("toolBar.lock"),shortcuts:["Q"]}),(0,Cb.jsx)(If,{label:(0,qc.t)("helpDialog.preventBinding"),shortcuts:[(0,Dc.uY)("CtrlOrCmd")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("toolBar.link"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+K")]})]}),(0,Cb.jsxs)(ij,{caption:(0,qc.t)("helpDialog.view"),children:[(0,Cb.jsx)(If,{label:(0,qc.t)("buttons.zoomIn"),shortcuts:[(0,Dc.uY)("CtrlOrCmd++")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("buttons.zoomOut"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+-")]}),
(0,Cb.jsx)(If,{label:(0,qc.t)("buttons.resetZoom"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+0")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("helpDialog.zoomToFit"),shortcuts:["Shift+1"]}),(0,Cb.jsx)(If,{label:(0,qc.t)("helpDialog.zoomToSelection"),shortcuts:["Shift+2"]}),(0,Cb.jsx)(If,{label:(0,qc.t)("buttons.fullScreen"),shortcuts:["F"]}),(0,Cb.jsx)(If,{label:(0,qc.t)("buttons.zenMode"),shortcuts:[(0,Dc.uY)("Alt+Z")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.showGrid"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+'")]}),(0,Cb.jsx)(If,
{label:(0,qc.t)("labels.viewMode"),shortcuts:[(0,Dc.uY)("Alt+R")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.toggleTheme"),shortcuts:[(0,Dc.uY)("Alt+Shift+D")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("stats.title"),shortcuts:[(0,Dc.uY)("Alt+/")]})]})]}),(0,Cb.jsx)(Ti,{children:(0,Cb.jsxs)(ij,{caption:(0,qc.t)("helpDialog.editor"),children:[(0,Cb.jsx)(If,{label:(0,qc.t)("labels.selectAll"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+A")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.multiSelect"),shortcuts:[(0,Dc.uY)("Shift+".concat((0,qc.t)("helpDialog.click")))]}),
(0,Cb.jsx)(If,{label:(0,qc.t)("helpDialog.deepSelect"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+".concat((0,qc.t)("helpDialog.click")))]}),(0,Cb.jsx)(If,{label:(0,qc.t)("helpDialog.deepBoxSelect"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+".concat((0,qc.t)("helpDialog.drag")))]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.moveCanvas"),shortcuts:[(0,Dc.uY)("Space+".concat((0,qc.t)("helpDialog.drag"))),(0,Dc.uY)("Wheel+".concat((0,qc.t)("helpDialog.drag")))],isOr:!0}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.cut"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+X")]}),
(0,Cb.jsx)(If,{label:(0,qc.t)("labels.copy"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+C")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.paste"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+V")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.copyAsPng"),shortcuts:[(0,Dc.uY)("Shift+Alt+C")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.copyStyles"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+Alt+C")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.pasteStyles"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+Alt+V")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.delete"),shortcuts:[(0,Dc.uY)("Del")]}),
(0,Cb.jsx)(If,{label:(0,qc.t)("labels.sendToBack"),shortcuts:[vc.Um?(0,Dc.uY)("CtrlOrCmd+Alt+["):(0,Dc.uY)("CtrlOrCmd+Shift+[")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.bringToFront"),shortcuts:[vc.Um?(0,Dc.uY)("CtrlOrCmd+Alt+]"):(0,Dc.uY)("CtrlOrCmd+Shift+]")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.sendBackward"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+[")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.bringForward"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+]")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.alignTop"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+Shift+Up")]}),
(0,Cb.jsx)(If,{label:(0,qc.t)("labels.alignBottom"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+Shift+Down")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.alignLeft"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+Shift+Left")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.alignRight"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+Shift+Right")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.duplicateSelection"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+D"),(0,Dc.uY)("Alt+".concat((0,qc.t)("helpDialog.drag")))]}),(0,Cb.jsx)(If,{label:(0,qc.t)("helpDialog.toggleElementLock"),
shortcuts:[(0,Dc.uY)("CtrlOrCmd+Shift+L")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("buttons.undo"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+Z")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("buttons.redo"),shortcuts:vc.ED?[(0,Dc.uY)("CtrlOrCmd+Y"),(0,Dc.uY)("CtrlOrCmd+Shift+Z")]:[(0,Dc.uY)("CtrlOrCmd+Shift+Z")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.group"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+G")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.ungroup"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+Shift+G")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.flipHorizontal"),
shortcuts:[(0,Dc.uY)("Shift+H")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.flipVertical"),shortcuts:[(0,Dc.uY)("Shift+V")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.showStroke"),shortcuts:[(0,Dc.uY)("S")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.showBackground"),shortcuts:[(0,Dc.uY)("G")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.decreaseFontSize"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+Shift+\x3c")]}),(0,Cb.jsx)(If,{label:(0,qc.t)("labels.increaseFontSize"),shortcuts:[(0,Dc.uY)("CtrlOrCmd+Shift+\x3e")]})]})})]})})]})})},
ll=(f(5080),function(ja){var Fb,Tb=ja.children;ja=ja.color;return(0,Cb.jsx)("div",{className:"Card",style:(Fb={},(0,ld.Z)(Fb,"--card-color","primary"===ja?"var(--color-primary)":pj[ja][7]),(0,ld.Z)(Fb,"--card-color-darker","primary"===ja?"var(--color-primary-darker)":pj[ja][8]),(0,ld.Z)(Fb,"--card-color-darkest","primary"===ja?"var(--color-primary-darkest)":pj[ja][9]),Fb),children:Tb})}),zk=function(ja){var Fb=ja.elements,Tb=ja.appState,wb=ja.files,zb=ja.actionManager,Pb=ja.exportOpts,sb=ja.canvas,
Mb=Pb.onExportToBackend;return(0,Cb.jsx)("div",{className:"ExportDialog ExportDialog--json",children:(0,Cb.jsxs)("div",{className:"ExportDialog-cards",children:[Pb.saveFileToDisk&&(0,Cb.jsxs)(ll,{color:"lime",children:[(0,Cb.jsx)("div",{className:"Card-icon",children:Me.TP}),(0,Cb.jsx)("h2",{children:(0,qc.t)("exportDialog.disk_title")}),(0,Cb.jsxs)("div",{className:"Card-details",children:[(0,qc.t)("exportDialog.disk_details"),!qa.kr&&zb.renderAction("changeProjectName")]}),(0,Cb.jsx)(Mc.V,{className:"Card-button",
type:"button",title:(0,qc.t)("exportDialog.disk_button"),"aria-label":(0,qc.t)("exportDialog.disk_button"),showAriaLabel:!0,onClick:function(){zb.executeAction(Hf,"ui")}})]}),Mb&&(0,Cb.jsxs)(ll,{color:"pink",children:[(0,Cb.jsx)("div",{className:"Card-icon",children:Me.p4}),(0,Cb.jsx)("h2",{children:(0,qc.t)("exportDialog.link_title")}),(0,Cb.jsx)("div",{className:"Card-details",children:(0,qc.t)("exportDialog.link_details")}),(0,Cb.jsx)(Mc.V,{className:"Card-button",type:"button",title:(0,qc.t)("exportDialog.link_button"),
"aria-label":(0,qc.t)("exportDialog.link_button"),showAriaLabel:!0,onClick:function(){Mb(Fb,Tb,wb,sb);(0,Th.L)("export","link","ui (".concat((0,Dc.$h)(),")"))}})]}),Pb.renderCustomUI&&Pb.renderCustomUI(Fb,Tb,wb,sb)]})})},pl=function(ja){var Fb=ja.elements,Tb=ja.appState,wb=ja.files,zb=ja.actionManager,Pb=ja.exportOpts;ja=ja.canvas;var sb=(0,Uc.useState)(!1),Mb=(0,Yd.Z)(sb,2);sb=Mb[0];var $b=Mb[1];Mb=cd().useCallback(function(){$b(!1)},[]);return(0,Cb.jsxs)(Cb.Fragment,{children:[(0,Cb.jsx)(Mc.V,{onClick:function(){$b(!0)},
"data-testid":"json-export-button",icon:Me.WD,type:"button","aria-label":(0,qc.t)("buttons.export"),showAriaLabel:gj().isMobile,title:(0,qc.t)("buttons.export")}),sb&&(0,Cb.jsx)(zi.V,{onCloseRequest:Mb,title:(0,qc.t)("buttons.export"),children:(0,Cb.jsx)(zk,{elements:Fb,appState:Tb,files:wb,actionManager:zb,onCloseRequest:Mb,exportOpts:Pb,canvas:ja})})]})},ui=f(3024);f(9295);f(9781);var Ui=function(ja){var Fb=ja.libItem,Tb=ja.appState,wb=ja.index,zb=ja.onChange;ja=ja.onRemove;var Pb=(0,Uc.useRef)(null),
sb=(0,Uc.useRef)(null);return(0,Uc.useEffect)(function(){var Mb=Pb.current;Mb&&(0,Qd.Z)(uc().mark(function Bc(){var Pc;return uc().wrap(function(Tc){for(;;)switch(Tc.prev=Tc.next){case 0:return Tc.next=2,(0,ui.$D)({elements:Fb.elements,appState:ob(ob({},Tb),{},{viewBackgroundColor:pj.white,exportBackground:!0}),files:null});case 2:Pc=Tc.sent,Mb.innerHTML=Pc.outerHTML;case 4:case "end":return Tc.stop()}},Bc)}))()},[Fb.elements,Tb]),(0,Cb.jsxs)("div",{className:"single-library-item",children:["published"===
Fb.status&&(0,Cb.jsx)("span",{className:"single-library-item-status",children:(0,qc.t)("labels.statusPublished")}),(0,Cb.jsx)("div",{ref:Pb,className:"single-library-item__svg"}),(0,Cb.jsx)(Mc.V,{"aria-label":(0,qc.t)("buttons.remove"),type:"button",icon:Me.xv,className:"single-library-item--remove",onClick:ja.bind(null,Fb.id),title:(0,qc.t)("buttons.remove")}),(0,Cb.jsxs)("div",{style:{display:"flex",margin:"0.8rem 0.3rem",width:"100%",fontSize:"14px",fontWeight:500,flexDirection:"column"},children:[(0,Cb.jsxs)("label",
{style:{display:"flex",justifyContent:"space-between",flexDirection:"column"},children:[(0,Cb.jsxs)("div",{style:{padding:"0.5em 0"},children:[(0,Cb.jsx)("span",{style:{fontWeight:500,color:pj.gray[6]},children:(0,qc.t)("publishDialog.itemName")}),(0,Cb.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,Cb.jsx)("input",{type:"text",ref:sb,style:{width:"80%",padding:"0.2rem"},defaultValue:Fb.name,placeholder:"Item name",onChange:function(Mb){zb(Mb.target.value,wb)}})]}),(0,Cb.jsx)("span",
{className:"error",children:Fb.error})]})]})},$k=function(){var ja=(0,Qd.Z)(uc().mark(function wb(Tb){var zb,Pb,sb,Mb,$b,Bc,Pc,Tc,wd,Rd,Gd,Cd,Id,xe,Tf,se,$e;return uc().wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:zb=6,Pb=128,sb=Math.round(Pb/16),Mb=Math.max(Math.round(Pb/64),2),$b=(0,Dc.yo)(Tb,zb),(Bc=document.createElement("canvas")).width=$b[0].length*Pb+2*($b[0].length+1)*sb-2*sb,Bc.height=$b.length*Pb+2*($b.length+1)*sb-2*sb,(Pc=Bc.getContext("2d")).fillStyle=pj.white,Pc.fillRect(0,
0,Bc.width,Bc.height),Tc=ad(Tb.entries()),Pe.prev=12,Tc.s();case 14:if((wd=Tc.n()).done){Pe.next=28;break}return Rd=(0,Yd.Z)(wd.value,2),Gd=Rd[0],Cd=Rd[1],Pe.next=18,(0,ui.NL)({elements:Cd.elements,files:null,maxWidthOrHeight:Pb});case 18:Id=Pe.sent,xe=Id.width,Tf=Id.height,se=Math.floor(Gd/zb)*(Pb+2*sb),$e=Gd%zb*(Pb+2*sb),Pc.drawImage(Id,$e+(Pb-xe)/2+sb,se+(Pb-Tf)/2+sb),Pc.lineWidth=Mb,Pc.strokeStyle=pj.gray[4],Pc.strokeRect($e+sb/2,se+sb/2,Pb+sb,Pb+sb);case 26:Pe.next=14;break;case 28:Pe.next=33;
break;case 30:Pe.prev=30,Pe.t0=Pe.catch(12),Tc.e(Pe.t0);case 33:return Pe.prev=33,Tc.f(),Pe.finish(33);case 36:return Pe.t1=sa.Tu,Pe.t2=File,Pe.next=40,(0,sa._c)(Bc);case 40:return Pe.t3=Pe.sent,Pe.t4=[Pe.t3],Pe.t5={type:jb.LO.png},Pe.t6=new Pe.t2(Pe.t4,"preview",Pe.t5),Pe.t7={outputType:jb.LO.jpg,maxWidthOrHeight:5E3},Pe.next=47,(0,Pe.t1)(Pe.t6,Pe.t7);case 47:return Pe.abrupt("return",Pe.sent);case 48:case "end":return Pe.stop()}},wb,null,[[12,30,33,36]])}));return function(Tb){return ja.apply(this,
arguments)}}(),sk=function(ja){var Fb=ja.onClose,Tb=ja.libraryItems,wb=ja.appState,zb=ja.onSuccess,Pb=ja.onError,sb=ja.updateItemsInStorage,Mb=ja.onRemove;ja=(0,Uc.useState)({authorName:"",githubHandle:"",name:"",description:"",twitterHandle:"",website:""});ja=(0,Yd.Z)(ja,2);var $b=ja[0],Bc=ja[1];ja=(0,Uc.useState)(!1);var Pc=(0,Yd.Z)(ja,2);ja=Pc[0];var Tc=Pc[1];(0,Uc.useEffect)(function(){a:{try{var se=localStorage.getItem("publish-library-data");if(se){var $e=JSON.parse(se);break a}}catch(Pe){console.error(Pe)}$e=
null}$e&&Bc($e)},[]);Pc=(0,Uc.useState)(Tb.slice());Pc=(0,Yd.Z)(Pc,2);var wd=Pc[0],Rd=Pc[1];(0,Uc.useEffect)(function(){Rd(Tb.slice())},[Tb]);var Gd;Pc=function(se){Bc(Jc(Jc({},$b),{},(0,ld.Z)({},se.target.name,se.target.value)))};var Cd=function(){var se=(0,Qd.Z)(uc().mark(function Re(Pe){var ng,Rf,Ni,Pf,gg,mh,Og;return uc().wrap(function(Lg){for(;;)switch(Lg.prev=Lg.next){case 0:if(Pe.preventDefault(),Tc(!0),ng=[],Rf=!1,wd.forEach(function(lh){var sg="";lh.name||(sg=(0,qc.t)("publishDialog.errors.required"),
Rf=!0);ng.push(Jc(Jc({},lh),{},{error:sg}))}),!Rf){Lg.next=9;break}return Rd(ng),Tc(!1),Lg.abrupt("return");case 9:return Lg.next=11,$k(wd);case 11:Ni=Lg.sent,Pf={type:jb.r8.excalidrawLibrary,version:jb.Kr.excalidrawLibrary,source:jb.pb,libraryItems:wd},gg=JSON.stringify(Pf,null,2),mh=new Blob([gg],{type:"application/json"}),(Og=new FormData).append("excalidrawLib",mh),Og.append("previewImage",Ni),Og.append("previewImageType",Ni.type),Og.append("title",$b.name),Og.append("authorName",$b.authorName),
Og.append("githubHandle",$b.githubHandle),Og.append("name",$b.name),Og.append("description",$b.description),Og.append("twitterHandle",$b.twitterHandle),Og.append("website",$b.website),fetch("".concat("https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries","/submit"),{method:"post",body:Og}).then(function(lh){return lh.ok?lh.json().then(function(sg){sg=sg.url;localStorage.removeItem("publish-library-data");zb({url:sg,authorName:$b.authorName,items:wd})}):lh.json().catch(function(){throw Error(lh.statusText||
"something went wrong");}).then(function(sg){throw Error(sg.message||lh.statusText||"something went wrong");})},function(lh){console.error(lh);Pb(lh);Tc(!1)}).catch(function(lh){console.error(lh);Pb(lh);Tc(!1)});case 27:case "end":return Lg.stop()}},Re)}));return function(Pe){return se.apply(this,arguments)}}(),Id=(0,Uc.useCallback)(function(){sb(wd);try{localStorage.setItem("publish-library-data",JSON.stringify($b))}catch(se){console.error(se)}Fb()},[wd,Fb,sb,$b]),xe=!!Tb.length,Tf=Tb.some(function(se){return"published"===
se.status});return(0,Cb.jsx)(zi.V,{onCloseRequest:Id,title:(0,qc.t)("publishDialog.title"),className:"publish-library",children:xe?(0,Cb.jsxs)("form",{onSubmit:Cd,children:[(0,Cb.jsxs)("div",{className:"publish-library-note",children:[(0,qc.t)("publishDialog.noteDescription.pre"),(0,Cb.jsx)("a",{href:"https://libraries.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:(0,qc.t)("publishDialog.noteDescription.link")})," ",(0,qc.t)("publishDialog.noteDescription.post")]}),(0,Cb.jsxs)("span",
{className:"publish-library-note",children:[(0,qc.t)("publishDialog.noteGuidelines.pre"),(0,Cb.jsx)("a",{href:"https://github.com/excalidraw/excalidraw-libraries#guidelines",target:"_blank",rel:"noopener noreferrer",children:(0,qc.t)("publishDialog.noteGuidelines.link")}),(0,qc.t)("publishDialog.noteGuidelines.post")]}),(0,Cb.jsx)("div",{className:"publish-library-note",children:(0,qc.t)("publishDialog.noteItems")}),Tf&&(0,Cb.jsx)("span",{className:"publish-library-note publish-library-warning",children:(0,qc.t)("publishDialog.republishWarning")}),
(Gd=[],wd.forEach(function(se,$e){Gd.push((0,Cb.jsx)("div",{className:"single-library-item-wrapper",children:(0,Cb.jsx)(Ui,{libItem:se,appState:wb,index:$e,onChange:function(Pe,Re){var ng=wd.slice();ng[Re].name=Pe;Rd(ng)},onRemove:Mb})},$e))}),(0,Cb.jsx)("div",{className:"selected-library-items",children:Gd})),(0,Cb.jsxs)("div",{className:"publish-library__fields",children:[(0,Cb.jsxs)("label",{children:[(0,Cb.jsxs)("div",{children:[(0,Cb.jsx)("span",{children:(0,qc.t)("publishDialog.libraryName")}),
(0,Cb.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,Cb.jsx)("input",{type:"text",name:"name",required:!0,value:$b.name,onChange:Pc,placeholder:(0,qc.t)("publishDialog.placeholder.libraryName")})]}),(0,Cb.jsxs)("label",{style:{alignItems:"flex-start"},children:[(0,Cb.jsxs)("div",{children:[(0,Cb.jsx)("span",{children:(0,qc.t)("publishDialog.libraryDesc")}),(0,Cb.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,Cb.jsx)("textarea",{name:"description",
rows:4,required:!0,value:$b.description,onChange:Pc,placeholder:(0,qc.t)("publishDialog.placeholder.libraryDesc")})]}),(0,Cb.jsxs)("label",{children:[(0,Cb.jsxs)("div",{children:[(0,Cb.jsx)("span",{children:(0,qc.t)("publishDialog.authorName")}),(0,Cb.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,Cb.jsx)("input",{type:"text",name:"authorName",required:!0,value:$b.authorName,onChange:Pc,placeholder:(0,qc.t)("publishDialog.placeholder.authorName")})]}),(0,Cb.jsxs)("label",
{children:[(0,Cb.jsx)("span",{children:(0,qc.t)("publishDialog.githubUsername")}),(0,Cb.jsx)("input",{type:"text",name:"githubHandle",value:$b.githubHandle,onChange:Pc,placeholder:(0,qc.t)("publishDialog.placeholder.githubHandle")})]}),(0,Cb.jsxs)("label",{children:[(0,Cb.jsx)("span",{children:(0,qc.t)("publishDialog.twitterUsername")}),(0,Cb.jsx)("input",{type:"text",name:"twitterHandle",value:$b.twitterHandle,onChange:Pc,placeholder:(0,qc.t)("publishDialog.placeholder.twitterHandle")})]}),(0,Cb.jsxs)("label",
{children:[(0,Cb.jsx)("span",{children:(0,qc.t)("publishDialog.website")}),(0,Cb.jsx)("input",{type:"text",name:"website",pattern:"https?://.+",title:(0,qc.t)("publishDialog.errors.website"),value:$b.website,onChange:Pc,placeholder:(0,qc.t)("publishDialog.placeholder.website")})]}),(0,Cb.jsxs)("span",{className:"publish-library-note",children:[(0,qc.t)("publishDialog.noteLicense.pre"),(0,Cb.jsx)("a",{href:"https://github.com/excalidraw/excalidraw-libraries/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",
children:(0,qc.t)("publishDialog.noteLicense.link")}),(0,qc.t)("publishDialog.noteLicense.post")]})]}),(0,Cb.jsxs)("div",{className:"publish-library__buttons",children:[(0,Cb.jsx)(Mc.V,{type:"button",title:(0,qc.t)("buttons.cancel"),"aria-label":(0,qc.t)("buttons.cancel"),label:(0,qc.t)("buttons.cancel"),onClick:Id,"data-testid":"cancel-clear-canvas-button",className:"publish-library__buttons--cancel"}),(0,Cb.jsx)(Mc.V,{type:"submit",title:(0,qc.t)("buttons.submit"),"aria-label":(0,qc.t)("buttons.submit"),
label:(0,qc.t)("buttons.submit"),className:"publish-library__buttons--confirm",isLoading:ja})]})]}):(0,Cb.jsx)("p",{style:{padding:"1em",textAlign:"center",fontWeight:500},children:(0,qc.t)("publishDialog.atleastOneLibItem")})})},al=(f(4406),f(2891)),um=f(4981),Fm=(f(694),(0,Cb.jsx)("svg",{viewBox:"0 0 1792 1792",children:(0,Cb.jsx)("path",{d:"M1600 736v192c0 26.667-9.33 49.333-28 68-18.67 18.67-41.33 28-68 28h-416v416c0 26.67-9.33 49.33-28 68s-41.33 28-68 28H800c-26.667 0-49.333-9.33-68-28s-28-41.33-28-68v-416H288c-26.667 0-49.333-9.33-68-28-18.667-18.667-28-41.333-28-68V736c0-26.667 9.333-49.333 28-68s41.333-28 68-28h416V224c0-26.667 9.333-49.333 28-68s41.333-28 68-28h192c26.67 0 49.33 9.333 68 28s28 41.333 28 68v416h416c26.67 0 49.33 9.333 68 28s28 41.333 28 68Z",
style:{stroke:"#fff",strokeWidth:140},transform:"translate(0 64)"})})),ml=function(ja){var Fb=ja.id,Tb=ja.elements,wb=ja.files,zb=ja.isPending,Pb=ja.onClick,sb=ja.selected,Mb=ja.onToggle,$b=ja.onDrag,Bc=(0,Uc.useRef)(null);(0,Uc.useEffect)(function(){var Rd=Bc.current;if(Rd)return(0,Qd.Z)(uc().mark(function Cd(){var Id;return uc().wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:if(Tb){xe.next=2;break}return xe.abrupt("return");case 2:return xe.next=4,(0,Ab.$D)(Tb,{exportBackground:!1,viewBackgroundColor:pj.white},
wb);case 4:Id=xe.sent,Rd.innerHTML=Id.outerHTML;case 6:case "end":return xe.stop()}},Cd)}))(),function(){Rd.innerHTML=""}},[Tb,wb]);ja=(0,Uc.useState)(!1);var Pc=(0,Yd.Z)(ja,2);ja=Pc[0];var Tc=Pc[1];Pc=gj().isMobile;var wd=zb&&(0,Cb.jsx)("div",{className:"library-unit__adder",children:Fm});return(0,Cb.jsxs)("div",{className:(0,be.Z)("library-unit",{"library-unit__active":Tb,"library-unit--hover":Tb&&ja,"library-unit--selected":sb}),onMouseEnter:function(){return Tc(!0)},onMouseLeave:function(){return Tc(!1)},
children:[(0,Cb.jsx)("div",{className:(0,be.Z)("library-unit__dragger",{"library-unit__pulse":!!zb}),ref:Bc,draggable:!!Tb,onClick:Tb||zb?function(Rd){Fb&&Rd.shiftKey?Mb(Fb,Rd):Pb()}:void 0,onDragStart:function(Rd){Fb?(Tc(!1),$b(Fb,Rd)):Rd.preventDefault()}}),wd,Fb&&Tb&&(ja||Pc||sb)&&(0,Cb.jsx)(lc,{checked:sb,onChange:function(Rd,Gd){return Mb(Fb,Gd)},className:"library-unit__checkbox"})]})},Qm=(f(6043),f(9101)),Mk=(f(47),(0,Cb.jsx)("svg",{viewBox:"0 0 24 24",fill:"#ffffff",children:(0,Cb.jsx)("path",
{d:"M19 22H5a3 3 0 01-3-3V5a3 3 0 013-3h14a3 3 0 013 3v14a3 3 0 01-3 3zm0-18h-9v16h9a1.01 1.01 0 001-1V5a1.01 1.01 0 00-1-1z"})})),Fj=function(ja){return(0,Cb.jsxs)(ff.u,{label:(0,qc.t)("labels.sidebarLock"),children:[(0,Cb.jsxs)("label",{className:(0,be.Z)("ToolIcon ToolIcon__lock ToolIcon_type_floating","ToolIcon_size_".concat("medium")),children:[(0,Cb.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",onChange:ja.onChange,checked:ja.checked,"aria-label":(0,qc.t)("labels.sidebarLock")}),
" ",(0,Cb.jsx)("div",{className:"ToolIcon__icon side_lock_icon",tabIndex:0,children:Mk})," "]})," "]})},Ck=function(ja){var Fb,Tb,wb,zb=ja.isLoading,Pb=ja.libraryItems,sb=ja.onRemoveFromLibrary,Mb=ja.onAddToLibrary,$b=ja.onInsertLibraryItems,Bc=ja.pendingElements,Pc=ja.theme,Tc=ja.setAppState,wd=ja.appState,Rd=ja.libraryReturnUrl,Gd=ja.library,Cd=ja.files,Id=ja.id,xe=ja.selectedItems,Tf=ja.onSelectItems,se=ja.onPublish,$e=ja.resetLibrary;ja=(0,Uc.useCallback)(function(){var hg=xe.length?(0,qc.t)("alerts.removeItemsFromsLibrary",
{count:xe.length}):(0,qc.t)("alerts.resetLibrary"),$g=xe.length?(0,qc.t)("confirmDialog.removeItemsFromLib"):(0,qc.t)("confirmDialog.resetLibrary");return(0,Cb.jsx)(um.Z,{onConfirm:function(){xe.length?sb():$e();ng(!1)},onCancel:function(){ng(!1)},title:$g,children:(0,Cb.jsx)("p",{children:hg})})},[xe,sb,$e]);var Pe=(0,Uc.useState)(!1),Re=(0,Yd.Z)(Pe,2);Pe=Re[0];var ng=Re[1],Rf=gj(),Ni=Rf.isMobile&&!Rf.isSmScreen?6:4;Rd=Rd||window.location.origin+window.location.pathname;Re=(0,Uc.useState)(null);
Re=(0,Yd.Z)(Re,2);var Pf=Re[0],gg=Re[1],mh=function(hg,$g){var Mf=!xe.includes(hg),Ri=[].concat((0,ud.Z)(lh),(0,ud.Z)(sg));if(Mf){if($g.shiftKey&&Pf){var kh=Ri.findIndex(function(ri){return ri.id===Pf}),hi=Ri.findIndex(function(ri){return ri.id===hg});if(-1===kh||-1===hi)return void Tf([].concat((0,ud.Z)(xe),[hg]));var Nj=(0,Dc.xn)(xe);$g=Ri.reduce(function(ri,Mj,Qh){return(Qh>=kh&&Qh<=hi||Nj.has(Mj.id))&&ri.push(Mj.id),ri},[]);Tf($g)}else Tf([].concat((0,ud.Z)(xe),[hg]));gg(hg)}else gg(null),Tf(xe.filter(function(ri){return ri!==
hg}))},Og=function(hg){return xe.includes(hg)?Pb.filter(function($g){return xe.includes($g.id)}):Pb.filter(function($g){return $g.id===hg})},Lg=function(hg){var $g,Mf,Ri,kh,hi;return(0,Cb.jsx)(kd,{children:(0,Cb.jsx)(ml,{elements:null===($g=hg.item)||void 0===$g?void 0:$g.elements,files:Cd,isPending:!(null!==(Mf=hg.item)&&void 0!==Mf&&Mf.id||null===(Ri=hg.item)||void 0===Ri||!Ri.elements),onClick:hg.onClick||function(){},id:(null===(kh=hg.item)||void 0===kh?void 0:kh.id)||null,selected:!(null===(hi=
hg.item)||void 0===hi||!hi.id)&&xe.includes(hg.item.id),onToggle:mh,onDrag:function(Nj,ri){ri.dataTransfer.setData(jb.LO.excalidrawlib,(0,Ia.NI)(Og(Nj)))}})},hg.key)};Re=function(hg){hg=hg.map(function($g){return $g.id?Lg({item:$g,onClick:function(){return $b(Og($g.id))},key:$g.id}):Lg({key:"__pending__item__",item:$g,onClick:function(){return Mb(Bc)}})});hg=(0,al.chunk)(hg,Ni);return hg.length||(hg=[[]]),hg.map(function($g,Mf,Ri){return Mf===Ri.length-1&&($g=$g.concat(Array(Ni-$g.length).fill(null).map(function(kh,
hi){return Lg({key:"empty_".concat(hi),item:null})}))),(0,Cb.jsx)(Sc,{align:"center",gap:1,children:$g},Mf)})};var lh=Pb.filter(function(hg){return"published"!==hg.status}),sg=Pb.filter(function(hg){return"published"===hg.status});return(0,Cb.jsxs)("div",{className:"library-menu-items-container",style:Rf.isMobile?{minHeight:"200px",maxHeight:"70vh"}:void 0,children:[Pe&&ja(),(0,Cb.jsx)(Cb.Fragment,{children:(0,Cb.jsxs)("div",{className:"layer-ui__library-header",children:[(Fb=!!xe.length,Tb=Fb?Pb.filter(function(hg){return xe.includes(hg.id)}):
Pb,wb=Fb?(0,qc.t)("buttons.remove"):(0,qc.t)("buttons.resetLibrary"),(0,Cb.jsxs)("div",{className:"library-actions",children:[!Fb&&(0,Cb.jsx)(Mc.V,{type:"button",title:(0,qc.t)("buttons.load"),"aria-label":(0,qc.t)("buttons.load"),icon:Me.zD,onClick:(0,Qd.Z)(uc().mark(function $g(){return uc().wrap(function(Mf){for(;;)switch(Mf.prev=Mf.next){case 0:return Mf.prev=0,Mf.next=3,Gd.updateLibrary({libraryItems:(0,qa.I$)({description:"Excalidraw library files"}),merge:!0,openLibraryMenu:!0});case 3:Mf.next=
11;break;case 5:if(Mf.prev=5,Mf.t0=Mf.catch(0),"AbortError"!==(null===Mf.t0||void 0===Mf.t0?void 0:Mf.t0.name)){Mf.next=10;break}return console.warn(Mf.t0),Mf.abrupt("return");case 10:Tc({errorMessage:(0,qc.t)("errors.importLibraryError")});case 11:case "end":return Mf.stop()}},$g,null,[[0,5]])})),className:"library-actions--load"},"import"),!!Tb.length&&(0,Cb.jsxs)(Cb.Fragment,{children:[(0,Cb.jsx)(Mc.V,{type:"button",title:(0,qc.t)("buttons.export"),"aria-label":(0,qc.t)("buttons.export"),icon:Me.TP,
onClick:(0,Qd.Z)(uc().mark(function Mf(){var Ri;return uc().wrap(function(kh){for(;;)switch(kh.prev=kh.next){case 0:if(!Fb){kh.next=4;break}kh.t0=Tb;kh.next=7;break;case 4:return kh.next=6,Gd.getLatestLibrary();case 6:kh.t0=kh.sent;case 7:Ri=kh.t0,(0,Ia.t1)(Ri).catch(Dc.FG).catch(function(hi){Tc({errorMessage:hi.message})});case 9:case "end":return kh.stop()}},Mf)})),className:"library-actions--export",children:0<xe.length&&(0,Cb.jsx)("span",{className:"library-actions-counter",children:xe.length})},
"export"),(0,Cb.jsx)(Mc.V,{type:"button",title:wb,"aria-label":wb,icon:Me._I,onClick:function(){return ng(!0)},className:"library-actions--remove",children:0<xe.length&&(0,Cb.jsx)("span",{className:"library-actions-counter",children:xe.length})},"reset")]}),Fb&&(0,Cb.jsx)(ff.u,{label:(0,qc.t)("hints.publishLibrary"),children:(0,Cb.jsxs)(Mc.V,{type:"button","aria-label":(0,qc.t)("buttons.publishLibrary"),label:(0,qc.t)("buttons.publishLibrary"),icon:Me.Nw,className:"library-actions--publish",onClick:se,
children:[!Rf.isMobile&&(0,Cb.jsx)("label",{children:(0,qc.t)("buttons.publishLibrary")}),0<xe.length&&(0,Cb.jsx)("span",{className:"library-actions-counter",children:xe.length})]})}),Rf.isMobile&&(0,Cb.jsx)("div",{className:"library-menu-browse-button--mobile",children:(0,Cb.jsx)("a",{href:"".concat("https://libraries.excalidraw.com","?target\x3d").concat(window.name||"_blank","\x26referrer\x3d").concat(Rd,"\x26useHash\x3dtrue\x26token\x3d").concat(Id,"\x26theme\x3d").concat(Pc,"\x26version\x3d").concat(jb.Kr.excalidrawLibrary),
target:"_excalidraw_libraries",children:(0,qc.t)("labels.libraries")})})]})),Rf.canDeviceFitSidebar&&(0,Cb.jsx)(Cb.Fragment,{children:(0,Cb.jsx)("div",{className:"layer-ui__sidebar-lock-button",children:(0,Cb.jsx)(Fj,{checked:wd.isLibraryMenuDocked,onChange:function(){var Mf;null===(Mf=document.querySelector(".layer-ui__wrapper"))||void 0===Mf||Mf.classList.add("animate");Mf=!wd.isLibraryMenuDocked;Tc({isLibraryMenuDocked:Mf});(0,Th.L)("library","toggleLibraryDock (".concat(Mf?"dock":"undock",")"),
"sidebar (".concat(Rf.isMobile?"mobile":"desktop",")"))}})})}),!Rf.isMobile&&(0,Cb.jsx)("div",{className:"ToolIcon__icon__close",children:(0,Cb.jsx)("button",{className:"Modal__close",onClick:function(){return Tc({isLibraryOpen:!1})},"aria-label":(0,qc.t)("buttons.close"),children:Me.xv})})]},"library-header")}),(0,Cb.jsxs)(kd,{className:"library-menu-items-container__items",align:"start",gap:1,style:{flex:0<sg.length?1:"0 1 auto",marginBottom:0},children:[(0,Cb.jsxs)(Cb.Fragment,{children:[(0,Cb.jsxs)("div",
{className:"separator",children:[(0<Bc.length||0<lh.length||0<sg.length)&&(0,Cb.jsx)("div",{children:(0,qc.t)("labels.personalLib")}),zb&&(0,Cb.jsx)("div",{style:{marginLeft:"auto",marginRight:"1rem",display:"flex",alignItems:"center",fontWeight:"normal"},children:(0,Cb.jsx)("div",{style:{transform:"translateY(2px)"},children:(0,Cb.jsx)(Qm.Z,{})})})]}),Bc.length||lh.length?Re([].concat((0,ud.Z)(Bc.length?[{id:null,elements:Bc}]:[]),(0,ud.Z)(lh))):(0,Cb.jsxs)("div",{style:{height:65,display:"flex",
flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",fontSize:".9rem"},children:[(0,qc.t)("library.noItems"),(0,Cb.jsx)("div",{style:{margin:".6rem 0",fontSize:".8em",width:"70%",textAlign:"center"},children:0<sg.length?(0,qc.t)("library.hint_emptyPrivateLibrary"):(0,qc.t)("library.hint_emptyLibrary")})]})]}),(0,Cb.jsxs)(Cb.Fragment,{children:[(0<sg.length||!Rf.isMobile&&(0<Bc.length||0<lh.length))&&(0,Cb.jsx)("div",{className:"separator",children:(0,qc.t)("labels.excalidrawLib")}),
0<sg.length?Re(sg):0<lh.length?(0,Cb.jsx)("div",{style:{margin:"1rem 0",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",fontSize:".9rem"},children:(0,qc.t)("library.noItems")}):null]})]}),!Rf.isMobile&&(0,Cb.jsx)("a",{className:"library-menu-browse-button",href:"".concat("https://libraries.excalidraw.com","?target\x3d").concat(window.name||"_blank","\x26referrer\x3d").concat(Rd,"\x26useHash\x3dtrue\x26token\x3d").concat(Id,"\x26theme\x3d").concat(Pc,
"\x26version\x3d").concat(jb.Kr.excalidrawLibrary),target:"_excalidraw_libraries",children:(0,qc.t)("labels.libraries")})]})},Vi=f(4739),Ok=f(9487),Gj=function(ja,Fb){return ja.filter(function(Tb){return Fb.includes(Tb.id)})},Pk=(0,Uc.forwardRef)(function(ja,Fb){return(0,Cb.jsx)(Tj.W,{padding:1,ref:Fb,className:"layer-ui__library",children:ja.children})}),Hj=function(ja){var Fb=ja.onClose,Tb=ja.onInsertLibraryItems,wb=ja.pendingElements,zb=ja.onAddToLibrary,Pb=ja.theme,sb=ja.setAppState,Mb=ja.files,
$b=ja.libraryReturnUrl,Bc=ja.focusContainer,Pc=ja.library,Tc=ja.id,wd=ja.appState;ja=(0,Uc.useRef)(null);var Rd=gj();!function(Pf,gg){(0,Uc.useEffect)(function(){var mh=function(Og){Pf.current&&(Og.target instanceof Element&&(Pf.current.contains(Og.target)||!document.body.contains(Og.target))||gg(Og))};return document.addEventListener("pointerdown",mh,!1),function(){document.removeEventListener("pointerdown",mh)}},[Pf,gg])}(ja,(0,Uc.useCallback)(function(Pf){Pf.target.closest(".ToolIcon__library")||
wd.isLibraryMenuDocked&&Rd.canDeviceFitSidebar||Fb()},[Fb,wd.isLibraryMenuDocked,Rd.canDeviceFitSidebar]));(0,Uc.useEffect)(function(){var Pf=function(gg){gg.key!==vc.tW.ESCAPE||wd.isLibraryMenuDocked&&Rd.canDeviceFitSidebar||Fb()};return document.addEventListener(jb.Ks.KEYDOWN,Pf),function(){document.removeEventListener(jb.Ks.KEYDOWN,Pf)}},[Fb,wd.isLibraryMenuDocked,Rd.canDeviceFitSidebar]);var Gd=(0,Uc.useState)([]);Gd=(0,Yd.Z)(Gd,2);var Cd=Gd[0],Id=Gd[1];Gd=(0,Uc.useState)(!1);var xe=(0,Yd.Z)(Gd,
2);Gd=xe[0];var Tf=xe[1];xe=(0,Uc.useState)(null);xe=(0,Yd.Z)(xe,2);var se=xe[0],$e=xe[1];xe=(0,Vi.KO)(Di.rF,Ok.yE);var Pe=(0,Yd.Z)(xe,1)[0],Re=(0,Uc.useCallback)(function(){var Pf=(0,Qd.Z)(uc().mark(function Og(mh){var Lg;return uc().wrap(function(lh){for(;;)switch(lh.prev=lh.next){case 0:Lg=mh.filter(function(sg){return!Cd.includes(sg.id)}),Pc.setLibrary(Lg).catch(function(){sb({errorMessage:(0,qc.t)("alerts.errorRemovingFromLibrary")})}),Id([]);case 3:case "end":return lh.stop()}},Og)}));return function(mh){return Pf.apply(this,
arguments)}}(),[Pc,sb,Cd,Id]);xe=(0,Uc.useCallback)(function(){Pc.resetLibrary();Bc()},[Pc,Bc]);var ng=(0,Uc.useCallback)(function(){var Pf=(0,Qd.Z)(uc().mark(function Lg(mh,Og){var lh;return uc().wrap(function(sg){for(;;)switch(sg.prev=sg.next){case 0:if((0,Th.L)("element","addToLibrary","ui"),!mh.some(function(hg){return"image"===hg.type})){sg.next=3;break}return sg.abrupt("return",sb({errorMessage:"Support for adding images to the library coming soon!"}));case 3:lh=[{status:"unpublished",elements:mh,
id:(0,uh.kb)(),created:Date.now()}].concat((0,ud.Z)(Og)),zb(),Pc.setLibrary(lh).catch(function(){sb({errorMessage:(0,qc.t)("alerts.errorAddingToLibrary")})});case 6:case "end":return sg.stop()}},Lg)}));return function(mh,Og){return Pf.apply(this,arguments)}}(),[zb,Pc,sb]),Rf=(0,Uc.useCallback)(function(){return(0,Cb.jsxs)(zi.V,{onCloseRequest:function(){return $e(null)},title:(0,qc.t)("publishSuccessDialog.title"),className:"publish-library-success",small:!0,children:[(0,Cb.jsxs)("p",{children:[(0,qc.t)("publishSuccessDialog.content",
{authorName:se.authorName})," ",(0,Cb.jsx)("a",{href:null==se?void 0:se.url,target:"_blank",rel:"noopener noreferrer",children:(0,qc.t)("publishSuccessDialog.link")})]}),(0,Cb.jsx)(Mc.V,{type:"button",title:(0,qc.t)("buttons.close"),"aria-label":(0,qc.t)("buttons.close"),label:(0,qc.t)("buttons.close"),onClick:function(){return $e(null)},"data-testid":"publish-library-success-close",className:"publish-library-success-close"})]})},[$e,se]),Ni=(0,Uc.useCallback)(function(Pf,gg){Tf(!1);$e({url:Pf.url,
authorName:Pf.authorName});Pf=gg.slice();Pf.forEach(function(mh){Cd.includes(mh.id)&&(mh.status="published")});Pc.setLibrary(Pf)},[Tf,$e,Cd,Pc]);return"loading"!==Pe.status||Pe.isInitialized?(0,Cb.jsxs)(Pk,{ref:ja,children:[Gd&&(0,Cb.jsx)(sk,{onClose:function(){return Tf(!1)},libraryItems:Gj(Pe.libraryItems,Cd),appState:wd,onSuccess:function(Pf){return Ni(Pf,Pe.libraryItems)},onError:function(Pf){return window.alert(Pf)},updateItemsInStorage:function(){return Pc.setLibrary(Pe.libraryItems)},onRemove:function(Pf){return Id(Cd.filter(function(gg){return gg!==
Pf}))}}),se&&Rf(),(0,Cb.jsx)(Ck,{isLoading:"loading"===Pe.status,libraryItems:Pe.libraryItems,onRemoveFromLibrary:function(){return Re(Pe.libraryItems)},onAddToLibrary:function(Pf){return ng(Pf,Pe.libraryItems)},onInsertLibraryItems:Tb,pendingElements:wb,setAppState:sb,appState:wd,libraryReturnUrl:$b,library:Pc,theme:Pb,files:Mb,id:Tc,selectedItems:Cd,onSelectItems:function(Pf){return Id(Pf)},onPublish:function(){return Tf(!0)},resetLibrary:xe})]}):(0,Cb.jsx)(Pk,{ref:ja,children:(0,Cb.jsxs)("div",
{className:"layer-ui__library-message",children:[(0,Cb.jsx)(Qm.Z,{size:"2em"}),(0,Cb.jsx)("span",{children:(0,qc.t)("labels.libraryLoadingMessage")})]})})},Vj=(f(3336),f(276),f(1528),function(ja){var Fb,Tb=gj(),wb=(0,vj.KP)(ja.elements),zb=(0,rd.Zs)(ja.elements,ja.appState),Pb=(0,vj.KP)(zb);return Tb.isMobile&&ja.appState.openMenu?null:(0,Cb.jsx)("div",{className:"Stats",children:(0,Cb.jsxs)(Tj.W,{padding:2,children:[(0,Cb.jsx)("div",{className:"close",onClick:ja.onClose,children:Me.xv}),(0,Cb.jsx)("h3",
{children:(0,qc.t)("stats.title")}),(0,Cb.jsx)("table",{children:(0,Cb.jsxs)("tbody",{children:[(0,Cb.jsx)("tr",{children:(0,Cb.jsx)("th",{colSpan:2,children:(0,qc.t)("stats.scene")})}),(0,Cb.jsxs)("tr",{children:[(0,Cb.jsx)("td",{children:(0,qc.t)("stats.elements")}),(0,Cb.jsx)("td",{children:ja.elements.length})]}),(0,Cb.jsxs)("tr",{children:[(0,Cb.jsx)("td",{children:(0,qc.t)("stats.width")}),(0,Cb.jsx)("td",{children:Math.round(wb[2])-Math.round(wb[0])})]}),(0,Cb.jsxs)("tr",{children:[(0,Cb.jsx)("td",
{children:(0,qc.t)("stats.height")}),(0,Cb.jsx)("td",{children:Math.round(wb[3])-Math.round(wb[1])})]}),1===zb.length&&(0,Cb.jsx)("tr",{children:(0,Cb.jsx)("th",{colSpan:2,children:(0,qc.t)("stats.element")})}),1<zb.length&&(0,Cb.jsxs)(Cb.Fragment,{children:[(0,Cb.jsx)("tr",{children:(0,Cb.jsx)("th",{colSpan:2,children:(0,qc.t)("stats.selected")})}),(0,Cb.jsxs)("tr",{children:[(0,Cb.jsx)("td",{children:(0,qc.t)("stats.elements")}),(0,Cb.jsx)("td",{children:zb.length})]})]}),0<zb.length&&(0,Cb.jsxs)(Cb.Fragment,
{children:[(0,Cb.jsxs)("tr",{children:[(0,Cb.jsx)("td",{children:"x"}),(0,Cb.jsx)("td",{children:Math.round(Pb[0])})]}),(0,Cb.jsxs)("tr",{children:[(0,Cb.jsx)("td",{children:"y"}),(0,Cb.jsx)("td",{children:Math.round(Pb[1])})]}),(0,Cb.jsxs)("tr",{children:[(0,Cb.jsx)("td",{children:(0,qc.t)("stats.width")}),(0,Cb.jsx)("td",{children:Math.round(Pb[2]-Pb[0])})]}),(0,Cb.jsxs)("tr",{children:[(0,Cb.jsx)("td",{children:(0,qc.t)("stats.height")}),(0,Cb.jsx)("td",{children:Math.round(Pb[3]-Pb[1])})]})]}),
1===zb.length&&(0,Cb.jsxs)("tr",{children:[(0,Cb.jsx)("td",{children:(0,qc.t)("stats.angle")}),(0,Cb.jsx)("td",{children:"".concat(Math.round(180*zb[0].angle/Math.PI),"°")})]}),null===(Fb=ja.renderCustomStats)||void 0===Fb?void 0:Fb.call(ja,ja.elements,ja.appState)]})})]})})}),tk=["suggestedBindings","startBoundElement"],yj=cd().memo(function(ja){var Fb,Tb=ja.actionManager,wb=ja.appState,zb=ja.files,Pb=ja.setAppState,sb=ja.canvas,Mb=ja.elements,$b=ja.onCollabButtonClick,Bc=ja.onLockToggle,Pc=ja.onPenModeToggle,
Tc=ja.onInsertElements,wd=ja.zenModeEnabled,Rd=ja.showExitZenModeBtn,Gd=ja.showThemeBtn,Cd=ja.toggleZenMode,Id=ja.isCollaborating,xe=ja.renderTopRightUI,Tf=ja.renderCustomFooter,se=ja.renderCustomStats,$e=ja.viewModeEnabled,Pe=ja.libraryReturnUrl,Re=ja.UIOptions,ng=ja.focusContainer,Rf=ja.library,Ni=ja.id,Pf=ja.onImageAction,gg=gj();ja=function(){return Re.canvasActions.export?(0,Cb.jsx)(pl,{elements:Mb,appState:wb,files:zb,actionManager:Tb,exportOpts:Re.canvasActions.export,canvas:sb}):null};var mh=
function(){if(!Re.canvasActions.saveAsImage)return null;var sg=function(hg){return function(){var $g=(0,Qd.Z)(uc().mark(function kh(Ri){var hi;return uc().wrap(function(Nj){for(;;)switch(Nj.prev=Nj.next){case 0:return(0,Th.L)("export",hg,"ui"),Nj.next=3,cb(hg,Ri,wb,zb,{exportBackground:wb.exportBackground,name:wb.name,viewBackgroundColor:wb.viewBackgroundColor}).catch(Dc.FG).catch(function(ri){console.error(ri);Pb({errorMessage:ri.message})});case 3:hi=Nj.sent,wb.exportEmbedScene&&hi&&(0,sa.g8)(hi)&&
Pb({fileHandle:hi});case 5:case "end":return Nj.stop()}},kh)}));return function(Ri){return $g.apply(this,arguments)}}()};return(0,Cb.jsx)(sm,{elements:Mb,appState:wb,files:zb,actionManager:Tb,onExportToPng:sg("png"),onExportToSvg:sg("svg"),onExportToClipboard:sg("clipboard")})},Og=function(){return(0,Cb.jsx)("div",{style:{width:".625em"}})},Lg=(0,Uc.useCallback)(function(){document.querySelector(".Dialog")||Pb({isLibraryOpen:!1})},[Pb]),lh=(0,Uc.useCallback)(function(){Pb({selectedElementIds:{},selectedGroupIds:{}})},
[Pb]);Pe=wb.isLibraryOpen?(0,Cb.jsx)(Hj,{pendingElements:(0,rd.eD)(Mb,wb,!0),onClose:Lg,onInsertLibraryItems:function(sg){Tc((0,Di.WV)(sg))},onAddToLibrary:lh,setAppState:Pb,libraryReturnUrl:Pe,focusContainer:ng,library:Rf,theme:wb.theme,files:zb,id:Ni,appState:wb}):null;ng=(0,Cb.jsxs)(Cb.Fragment,{children:[wb.isLoading&&(0,Cb.jsx)(Ql.z,{delay:250}),wb.errorMessage&&(0,Cb.jsx)(ok,{message:wb.errorMessage,onClose:function(){return Pb({errorMessage:null})}}),wb.showHelpDialog&&(0,Cb.jsx)(Dj,{onClose:function(){Pb({showHelpDialog:!1})}}),
wb.pasteDialog.shown&&(0,Cb.jsx)(og,{setAppState:Pb,appState:wb,onInsertChart:Tc,onClose:function(){return Pb({pasteDialog:{shown:!1,data:null}})}})]});Rf=function(){return wb.showStats?(0,Cb.jsx)(Vj,{appState:wb,setAppState:Pb,elements:Mb,onClose:function(){Tb.executeAction(jg)},renderCustomStats:se}):null};return gg.isMobile?(0,Cb.jsxs)(Cb.Fragment,{children:[ng,(0,Cb.jsx)(Zf,{appState:wb,elements:Mb,actionManager:Tb,libraryMenu:Pe,renderJSONExportDialog:ja,renderImageExportDialog:mh,setAppState:Pb,
onCollabButtonClick:$b,onLockToggle:function(){return Bc()},onPenModeToggle:Pc,canvas:sb,isCollaborating:Id,renderCustomFooter:Tf,viewModeEnabled:$e,showThemeBtn:Gd,onImageAction:Pf,renderTopRightUI:xe,renderStats:Rf})]}):(0,Cb.jsxs)(Cb.Fragment,{children:[(0,Cb.jsxs)("div",{className:(0,be.Z)("layer-ui__wrapper",{"disable-pointerEvents":wb.draggingElement||wb.resizingElement||wb.editingElement&&!(0,Sb.iB)(wb.editingElement)}),style:wb.isLibraryOpen&&wb.isLibraryMenuDocked&&gg.canDeviceFitSidebar?
{width:"calc(100% - ".concat(jb.EE,"px)")}:{},children:[ng,(Fb=(0,Sb.RT)(wb,Mb),(0,Cb.jsx)(Pl,{side:"top",children:(0,Cb.jsxs)("div",{className:"App-menu App-menu_top",children:[(0,Cb.jsxs)(kd,{gap:4,className:(0,be.Z)({"disable-pointerEvents":wd}),children:[$e?(0,Cb.jsx)(Li,{heading:"canvasActions",className:(0,be.Z)("zen-mode-transition",{"transition-left":wd}),children:(0,Cb.jsx)(Tj.W,{padding:2,style:{zIndex:1},children:(0,Cb.jsx)(kd,{gap:4,children:(0,Cb.jsxs)(Sc,{gap:1,justifyContent:"space-between",
children:[ja(),mh()]})})})}):(0,Cb.jsx)(Li,{heading:"canvasActions",className:(0,be.Z)("zen-mode-transition",{"transition-left":wd}),children:(0,Cb.jsx)(Tj.W,{padding:2,style:{zIndex:1},children:(0,Cb.jsxs)(kd,{gap:4,children:[(0,Cb.jsxs)(Sc,{gap:1,justifyContent:"space-between",children:[Tb.renderAction("clearCanvas"),(0,Cb.jsx)(Og,{}),Tb.renderAction("loadScene"),ja(),mh(),(0,Cb.jsx)(Og,{}),$b&&(0,Cb.jsx)(Fh,{isCollaborating:Id,collaboratorCount:wb.collaborators.size,onClick:$b})]}),(0,Cb.jsx)(Ej,
{actionManager:Tb,appState:wb,setAppState:Pb,showThemeBtn:Gd}),wb.fileHandle&&(0,Cb.jsx)(Cb.Fragment,{children:Tb.renderAction("saveToActiveFile")})]})})}),Fb&&(0,Cb.jsx)(Li,{heading:"selectedShapeActions",className:(0,be.Z)("zen-mode-transition",{"transition-left":wd}),children:(0,Cb.jsx)(Tj.W,{className:jb.$C.SHAPE_ACTIONS_MENU,padding:2,style:{maxHeight:"".concat(wb.height-(wb.fileHandle?248:200),"px")},children:(0,Cb.jsx)(zg,{appState:wb,elements:Mb,renderAction:Tb.renderAction,activeTool:wb.activeTool.type})})})]}),
!$e&&(0,Cb.jsx)(Li,{heading:"shapes",children:function(sg){return(0,Cb.jsx)(kd,{gap:4,align:"start",children:(0,Cb.jsxs)(Sc,{gap:1,className:(0,be.Z)("App-toolbar-container",{"zen-mode":wd}),children:[(0,Cb.jsx)(re,{zenModeEnabled:wd,checked:wb.penMode,onChange:Pc,title:(0,qc.t)("toolBar.penMode"),penDetected:wb.penDetected}),(0,Cb.jsx)(bm,{zenModeEnabled:wd,checked:wb.activeTool.locked,onChange:function(){return Bc()},title:(0,qc.t)("toolBar.lock")}),(0,Cb.jsxs)(Tj.W,{padding:1,className:(0,be.Z)("App-toolbar",
{"zen-mode":wd}),children:[(0,Cb.jsx)(pk,{appState:wb,elements:Mb,isMobile:gg.isMobile}),sg,(0,Cb.jsx)(Sc,{gap:1,children:(0,Cb.jsx)(Ei,{appState:wb,canvas:sb,activeTool:wb.activeTool,setAppState:Pb,onImageAction:function(hg){Pf({insertOnCanvasDirectly:"mouse"!==hg.pointerType})}})})]}),(0,Cb.jsx)(Bk,{appState:wb,setAppState:Pb})]})})}}),(0,Cb.jsxs)("div",{className:(0,be.Z)("layer-ui__wrapper__top-right zen-mode-transition",{"transition-right":wd}),children:[(0,Cb.jsx)(xj,{collaborators:wb.collaborators,
actionManager:Tb}),null==xe?void 0:xe(gg.isMobile,wb)]})]})})),(0,Cb.jsxs)("footer",{role:"contentinfo",className:"layer-ui__wrapper__footer App-menu App-menu_bottom",children:[(0,Cb.jsx)("div",{className:(0,be.Z)("layer-ui__wrapper__footer-left zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":wd}),children:(0,Cb.jsx)(kd,{gap:2,children:(0,Cb.jsxs)(Li,{heading:"canvasActions",children:[(0,Cb.jsx)(Tj.W,{padding:1,children:(0,Cb.jsx)(ni,{renderAction:Tb.renderAction,zoom:wb.zoom})}),
!$e&&(0,Cb.jsxs)(Cb.Fragment,{children:[(0,Cb.jsxs)("div",{className:(0,be.Z)("undo-redo-buttons zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":wd}),children:[Tb.renderAction("undo",{size:"small"}),Tb.renderAction("redo",{size:"small"})]}),(0,Cb.jsx)("div",{className:(0,be.Z)("eraser-buttons zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":wd}),children:Tb.renderAction("eraser",{size:"small"})})]}),!$e&&wb.multiElement&&gg.isTouchScreen&&(0,Cb.jsx)("div",
{className:(0,be.Z)("finalize-button zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":wd}),children:Tb.renderAction("finalize",{size:"small"})})]})})}),(0,Cb.jsx)("div",{className:(0,be.Z)("layer-ui__wrapper__footer-center zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":wd}),children:null==Tf?void 0:Tf(!1,wb)}),(0,Cb.jsx)("div",{className:(0,be.Z)("layer-ui__wrapper__footer-right zen-mode-transition",{"transition-right disable-pointerEvents":wd}),children:Tb.renderAction("toggleShortcuts")}),
(0,Cb.jsx)("button",{className:(0,be.Z)("disable-zen-mode",{"disable-zen-mode--visible":Rd}),onClick:Cd,children:(0,qc.t)("buttons.exitZenMode")})]}),Rf(),wb.scrolledOutside&&(0,Cb.jsx)("button",{className:"scroll-back-to-content",onClick:function(){Pb(function(sg){for(var hg=1;hg<arguments.length;hg++){var $g=null!=arguments[hg]?arguments[hg]:{};hg%2?Gb(Object($g),!0).forEach(function(Mf){(0,ld.Z)(sg,Mf,$g[Mf])}):Object.getOwnPropertyDescriptors?Object.defineProperties(sg,Object.getOwnPropertyDescriptors($g)):
Gb(Object($g)).forEach(function(Mf){Object.defineProperty(sg,Mf,Object.getOwnPropertyDescriptor($g,Mf))})}return sg}({},(0,rd.W)(Mb,wb,sb)))},children:(0,qc.t)("buttons.scrollBackToContent")})]}),wb.isLibraryOpen&&(0,Cb.jsx)("div",{className:"layer-ui__sidebar",children:Pe})]})},function(ja,Fb){var Tb=function(Pb){Pb.suggestedBindings;Pb.startBoundElement;return(0,ck.Z)(Pb,tk)},wb=Tb(ja.appState),zb=Tb(Fb.appState);Tb=Object.keys(wb);return ja.renderCustomFooter===Fb.renderCustomFooter&&ja.langCode===
Fb.langCode&&ja.elements===Fb.elements&&ja.files===Fb.files&&Tb.every(function(Pb){return wb[Pb]===zb[Pb]})}),tm=(f(9757),function(ja){var Fb=ja.message,Tb=ja.clearToast,wb=ja.closable;wb=void 0!==wb&&wb;ja=ja.duration;var zb=void 0===ja?5E3:ja,Pb=(0,Uc.useRef)(0),sb=zb!==1/0,Mb=(0,Uc.useCallback)(function(){sb&&(Pb.current=window.setTimeout(function(){return Tb()},zb))},[Tb,zb,sb]);(0,Uc.useEffect)(function(){if(sb)return Mb(),function(){return clearTimeout(Pb.current)}},[Mb,Fb,zb,sb]);return(0,Cb.jsxs)("div",
{className:"Toast",onMouseEnter:sb?function(){return clearTimeout(null==Pb?void 0:Pb.current)}:void 0,onMouseLeave:sb?Mb:void 0,children:[(0,Cb.jsx)("p",{className:"Toast__message",children:Fb}),wb&&(0,Cb.jsx)(Mc.V,{icon:Me.xv,"aria-label":"close",type:"icon",onClick:Tb,className:"close"})]})}),Tl=(0,Le.z)({name:"viewMode",trackEvent:{category:"canvas",predicate:function(ja){return!ja.viewModeEnabled}},perform:function(ja,Fb){return{appState:Wc(Wc({},Fb),{},{viewModeEnabled:!this.checked(Fb)}),commitToHistory:!1}},
checked:function(ja){return ja.viewModeEnabled},contextItemLabel:"labels.viewMode",keyTest:function(ja){return!ja[vc.tW.CTRL_OR_CMD]&&ja.altKey&&ja.code===vc.aU.R}}),sj=f(5637),rj=f(200),gm=f.n(rj),qk=f(2325),fk={isSmScreen:!1,isMobile:!1,isTouchScreen:!1,canDeviceFitSidebar:!1},Jh=cd().createContext(fk),gj=function(){return(0,Uc.useContext)(Jh)},uk=cd().createContext({container:null,id:null}),mk=function(){return(0,Uc.useContext)(uk)},ph=!1,ih=0,Dg=0,Xj=0,Dh=!1,$i=!1,tg=!1,Oi={horizontal:null,vertical:null},
Sf=0,Ig=!1,jj=null,oi=new Map,nh=null,ig=null,Qg=null,Hl=function(ja){function Fb(Pb){(0,Sd.Z)(this,Fb);var sb=zb.call(this,Pb);Ai.call((0,gc.Z)(sb));var Mb,$b=(0,Kh.im)(),Bc=Pb.excalidrawRef,Pc=Pb.viewModeEnabled;Pc=void 0!==Pc&&Pc;var Tc=Pb.zenModeEnabled;Tc=void 0!==Tc&&Tc;var wd=Pb.gridModeEnabled;wd=void 0!==wd&&wd;var Rd=Pb.theme;Rd=void 0===Rd?$b.theme:Rd;Pb=Pb.name;Pb=void 0===Pb?$b.name:Pb;if(sb.state=pc(pc(pc({},$b),{},{theme:Rd,isLoading:!0},sb.getCanvasOffsets()),{},{viewModeEnabled:Pc,
zenModeEnabled:Tc,gridSize:wd?jb.k:null,name:Pb,width:window.innerWidth,height:window.innerHeight,showHyperlinkPopup:!1,isLibraryMenuDocked:!1}),sb.id=(0,oe.x0)(),sb.library=new Di.ZP((0,gc.Z)(sb)),Bc){var Gd;$b="current"in Bc&&(null===(Gd=Bc.current)||void 0===Gd?void 0:Gd.readyPromise)||(0,Dc.PI)();Gd={ready:!0,readyPromise:$b,updateScene:sb.updateScene,updateLibrary:sb.library.updateLibrary,addFiles:sb.addFiles,resetScene:sb.resetScene,getSceneElementsIncludingDeleted:sb.getSceneElementsIncludingDeleted,
history:{clear:sb.resetHistory},scrollToContent:sb.scrollToContent,getSceneElements:sb.getSceneElements,getAppState:function(){return sb.state},getFiles:function(){return sb.files},refresh:sb.refresh,setToastMessage:sb.setToastMessage,id:sb.id,setActiveTool:sb.setActiveTool,setCursor:sb.setCursor,resetCursor:sb.resetCursor};"function"==typeof Bc?Bc(Gd):Bc.current=Gd;$b.resolve(Gd)}return sb.excalidrawContainerValue={container:sb.excalidrawContainerRef.current,id:sb.id},sb.scene=new pd.Z,sb.history=
new Fl,sb.actionManager=new yk(sb.syncActionResult,function(){return sb.state},function(){return sb.scene.getElementsIncludingDeleted()},(0,gc.Z)(sb)),sb.actionManager.registerAll(Le.N),sb.actionManager.registerAction((Mb=sb.history,{name:"undo",trackEvent:{category:"history"},perform:function(Cd,Id){return Ag(Cd,Id,function(){return Mb.undoOnce()})},keyTest:function(Cd){return Cd[vc.tW.CTRL_OR_CMD]&&Cd.key.toLowerCase()===vc.tW.Z&&!Cd.shiftKey},PanelComponent:function(Cd){var Id=Cd.updateData;Cd=
Cd.data;return(0,Cb.jsx)(Mc.V,{type:"button",icon:Me.Yw,"aria-label":(0,qc.t)("buttons.undo"),onClick:Id,size:(null==Cd?void 0:Cd.size)||"medium"})},commitToHistory:function(){return!1}})),sb.actionManager.registerAction(function(Cd){return{name:"redo",trackEvent:{category:"history"},perform:function(Id,xe){return Ag(Id,xe,function(){return Cd.redoOnce()})},keyTest:function(Id){return Id[vc.tW.CTRL_OR_CMD]&&Id.shiftKey&&Id.key.toLowerCase()===vc.tW.Z||vc.ED&&Id.ctrlKey&&!Id.shiftKey&&Id.key===vc.tW.Y},
PanelComponent:function(Id){var xe=Id.updateData;Id=Id.data;return(0,Cb.jsx)(Mc.V,{type:"button",icon:Me.KX,"aria-label":(0,qc.t)("buttons.redo"),onClick:xe,size:(null==Id?void 0:Id.size)||"medium"})},commitToHistory:function(){return!1}}}(sb.history)),sb}(0,Yb.Z)(Fb,ja);var Tb,wb,zb=Ed(Fb);return(0,Nb.Z)(Fb,[{key:"renderCanvas",value:function(){var Pb=window.devicePixelRatio,sb=this.state,Mb=sb.width,$b=sb.height,Bc=Mb*Pb;Pb*=$b;return sb.viewModeEnabled?(0,Cb.jsx)("canvas",{className:"excalidraw__canvas",
style:{width:Mb,height:$b,cursor:jb.oc.GRAB},width:Bc,height:Pb,ref:this.handleCanvasRef,onContextMenu:this.handleCanvasContextMenu,onPointerMove:this.handleCanvasPointerMove,onPointerUp:this.handleCanvasPointerUp,onPointerCancel:this.removePointer,onTouchMove:this.handleTouchMove,onPointerDown:this.handleCanvasPointerDown,children:(0,qc.t)("labels.drawingCanvas")}):(0,Cb.jsx)("canvas",{className:"excalidraw__canvas",style:{width:Mb,height:$b},width:Bc,height:Pb,ref:this.handleCanvasRef,onContextMenu:this.handleCanvasContextMenu,
onPointerDown:this.handleCanvasPointerDown,onDoubleClick:this.handleCanvasDoubleClick,onPointerMove:this.handleCanvasPointerMove,onPointerUp:this.handleCanvasPointerUp,onPointerCancel:this.removePointer,onTouchMove:this.handleTouchMove,children:(0,qc.t)("labels.drawingCanvas")})}},{key:"render",value:function(){var Pb,sb,Mb=this,$b=this.state,Bc=$b.zenModeEnabled;$b=$b.viewModeEnabled;var Pc=(0,rd.eD)(this.scene.getNonDeletedElements(),this.state),Tc=this.props,wd=Tc.onCollabButtonClick,Rd=Tc.renderTopRightUI,
Gd=Tc.renderFooter;Tc=Tc.renderCustomStats;return(0,Cb.jsx)("div",{className:(0,be.Z)("excalidraw excalidraw-container",{"excalidraw--view-mode":$b,"excalidraw--mobile":this.device.isMobile}),ref:this.excalidrawContainerRef,onDrop:this.handleAppOnDrop,tabIndex:0,onKeyDown:this.props.handleKeyboardGlobally?void 0:this.onKeyDown,children:(0,Cb.jsx)(uk.Provider,{value:this.excalidrawContainerValue,children:(0,Cb.jsxs)(Jh.Provider,{value:this.device,children:[(0,Cb.jsx)(yj,{canvas:this.canvas,appState:this.state,
files:this.files,setAppState:this.setAppState,actionManager:this.actionManager,elements:this.scene.getNonDeletedElements(),onCollabButtonClick:wd,onLockToggle:this.toggleLock,onPenModeToggle:this.togglePenMode,onInsertElements:function(Cd){return Mb.addElementsFromPasteOrLibrary({elements:Cd,position:"center",files:null})},zenModeEnabled:Bc,toggleZenMode:this.toggleZenMode,langCode:(0,qc.G3)().code,isCollaborating:this.props.isCollaborating,renderTopRightUI:Rd,renderCustomFooter:Gd,renderCustomStats:Tc,
viewModeEnabled:$b,showExitZenModeBtn:void 0===(null===(Pb=this.props)||void 0===Pb?void 0:Pb.zenModeEnabled)&&Bc,showThemeBtn:void 0===(null===(sb=this.props)||void 0===sb?void 0:sb.theme)&&this.props.UIOptions.canvasActions.theme,libraryReturnUrl:this.props.libraryReturnUrl,UIOptions:this.props.UIOptions,focusContainer:this.focusContainer,library:this.library,id:this.id,onImageAction:this.onImageAction}),(0,Cb.jsx)("div",{className:"excalidraw-textEditorContainer"}),(0,Cb.jsx)("div",{className:"excalidraw-contextMenuContainer"}),
1===Pc.length&&this.state.showHyperlinkPopup&&(0,Cb.jsx)(Eh.nW,{element:Pc[0],appState:this.state,setAppState:this.setAppState,onLinkOpen:this.props.onLinkOpen},Pc[0].id),null!==this.state.toastMessage&&(0,Cb.jsx)(tm,{message:this.state.toastMessage,clearToast:this.clearToast}),(0,Cb.jsx)("main",{children:this.renderCanvas()})]})})})}},{key:"componentDidMount",value:(wb=(0,Qd.Z)(uc().mark(function sb(){var Mb,$b,Bc,Pc,Tc,wd,Rd=this;return uc().wrap(function(Gd){for(;;)switch(Gd.prev=Gd.next){case 0:this.unmounted=
!1,this.excalidrawContainerValue.container=this.excalidrawContainerRef.current,"production"!==jb.Vi.TEST&&"production"!==jb.Vi.DEVELOPMENT||(this.setState.bind(this),Object.defineProperties(window.h,{state:{configurable:!0,get:function(){return Rd.state}},setState:{configurable:!0,value:function(){return Rd.setState.apply(Rd,arguments)}},app:{configurable:!0,value:this},history:{configurable:!0,value:this.history}})),this.scene.addCallback(this.onSceneUpdated),this.addEventListeners(),this.excalidrawContainerRef.current&&
this.focusContainer(),this.excalidrawContainerRef.current&&this.refreshDeviceState(this.excalidrawContainerRef.current),"ResizeObserver"in window&&null!==(Mb=this.excalidrawContainerRef)&&void 0!==Mb&&Mb.current?(this.resizeObserver=new ResizeObserver(function(){Rd.refreshDeviceState(Rd.excalidrawContainerRef.current);Rd.updateDOMRect()}),null===($b=this.resizeObserver)||void 0===$b||$b.observe(this.excalidrawContainerRef.current)):window.matchMedia&&(Bc=window.matchMedia("(max-width: ".concat(jb.kV,
"px), (max-height: ").concat(jb.Yx,"px) and (max-width: ").concat(jb.sS,"px)")),Pc=window.matchMedia("(max-width: ".concat(jb.eF,"px)")),Tc=window.matchMedia("(min-width: ".concat(null!=this.props.UIOptions.dockedSidebarBreakpoint?this.props.UIOptions.dockedSidebarBreakpoint:jb.sk,"px)")),wd=function(){Rd.excalidrawContainerRef.current.getBoundingClientRect();Rd.device=(0,Dc.v4)(Rd.device,{isSmScreen:Pc.matches,isMobile:Bc.matches,canDeviceFitSidebar:Tc.matches})},Bc.addListener(wd),this.detachIsMobileMqHandler=
function(){return Bc.removeListener(wd)}),(new URLSearchParams(window.location.search.slice(1))).has("web-share-target")?this.restoreFileFromShare():this.updateDOMRect(this.initializeScene);case 10:case "end":return Gd.stop()}},sb,this)})),function(){return wb.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){var sb;this.files={};this.imageCache.clear();null===(sb=this.resizeObserver)||void 0===sb||sb.disconnect();this.unmounted=!0;this.removeEventListeners();this.scene.destroy();
clearTimeout(Sf);Sf=0}},{key:"removeEventListeners",value:function(){var sb,Mb,$b,Bc;document.removeEventListener(jb.Ks.POINTER_UP,this.removePointer);document.removeEventListener(jb.Ks.COPY,this.onCopy);document.removeEventListener(jb.Ks.PASTE,this.pasteFromClipboard);document.removeEventListener(jb.Ks.CUT,this.onCut);null===(sb=this.nearestScrollableContainer)||void 0===sb||sb.removeEventListener(jb.Ks.SCROLL,this.onScroll);document.removeEventListener(jb.Ks.KEYDOWN,this.onKeyDown,!1);document.removeEventListener(jb.Ks.MOUSE_MOVE,
this.updateCurrentCursorPosition,!1);document.removeEventListener(jb.Ks.KEYUP,this.onKeyUp);window.removeEventListener(jb.Ks.RESIZE,this.onResize,!1);window.removeEventListener(jb.Ks.UNLOAD,this.onUnload,!1);window.removeEventListener(jb.Ks.BLUR,this.onBlur,!1);null===(Mb=this.excalidrawContainerRef.current)||void 0===Mb||Mb.removeEventListener(jb.Ks.DRAG_OVER,this.disableEvent,!1);null===($b=this.excalidrawContainerRef.current)||void 0===$b||$b.removeEventListener(jb.Ks.DROP,this.disableEvent,!1);
document.removeEventListener(jb.Ks.GESTURE_START,this.onGestureStart,!1);document.removeEventListener(jb.Ks.GESTURE_CHANGE,this.onGestureChange,!1);document.removeEventListener(jb.Ks.GESTURE_END,this.onGestureEnd,!1);null===(Bc=this.detachIsMobileMqHandler)||void 0===Bc||Bc.call(this)}},{key:"addEventListeners",value:function(){var sb,Mb,$b,Bc;this.removeEventListeners();document.addEventListener(jb.Ks.POINTER_UP,this.removePointer);document.addEventListener(jb.Ks.COPY,this.onCopy);this.props.handleKeyboardGlobally&&
document.addEventListener(jb.Ks.KEYDOWN,this.onKeyDown,!1);document.addEventListener(jb.Ks.KEYUP,this.onKeyUp,{passive:!0});document.addEventListener(jb.Ks.MOUSE_MOVE,this.updateCurrentCursorPosition);null===(sb=document.fonts)||void 0===sb||null===(Mb=sb.addEventListener)||void 0===Mb||Mb.call(sb,"loadingdone",this.onFontLoaded);document.addEventListener(jb.Ks.GESTURE_START,this.onGestureStart,!1);document.addEventListener(jb.Ks.GESTURE_CHANGE,this.onGestureChange,!1);document.addEventListener(jb.Ks.GESTURE_END,
this.onGestureEnd,!1);this.state.viewModeEnabled||(document.addEventListener(jb.Ks.PASTE,this.pasteFromClipboard),document.addEventListener(jb.Ks.CUT,this.onCut),this.props.detectScroll&&(this.nearestScrollableContainer=(0,Dc.Ip)(this.excalidrawContainerRef.current),this.nearestScrollableContainer.addEventListener(jb.Ks.SCROLL,this.onScroll)),window.addEventListener(jb.Ks.RESIZE,this.onResize,!1),window.addEventListener(jb.Ks.UNLOAD,this.onUnload,!1),window.addEventListener(jb.Ks.BLUR,this.onBlur,
!1),null===($b=this.excalidrawContainerRef.current)||void 0===$b||$b.addEventListener(jb.Ks.DRAG_OVER,this.disableEvent,!1),null===(Bc=this.excalidrawContainerRef.current)||void 0===Bc||Bc.addEventListener(jb.Ks.DROP,this.disableEvent,!1))}},{key:"componentDidUpdate",value:function(sb,Mb){var $b,Bc,Pc,Tc=this;(this.excalidrawContainerRef.current&&sb.UIOptions.dockedSidebarBreakpoint!==this.props.UIOptions.dockedSidebarBreakpoint&&this.refreshDeviceState(this.excalidrawContainerRef.current),Mb.scrollX===
this.state.scrollX&&Mb.scrollY===this.state.scrollY)||null!==(Bc=this.props)&&void 0!==Bc&&null!==(Pc=Bc.onScrollChange)&&void 0!==Pc&&Pc.call(Bc,this.state.scrollX,this.state.scrollY);Object.keys(this.state.selectedElementIds).length&&(0,Kh.EN)(this.state)&&this.setState({activeTool:(0,Dc.Om)(this.state,{type:"selection"})});"eraser"===this.state.activeTool.type&&Mb.theme!==this.state.theme&&(0,Dc.OF)(this.canvas,this.state.theme);"selection"===Mb.activeTool.type&&"selection"!==this.state.activeTool.type&&
this.state.showHyperlinkPopup&&this.setState({showHyperlinkPopup:!1});sb.langCode!==this.props.langCode&&this.updateLanguage();sb.viewModeEnabled!==this.props.viewModeEnabled&&this.setState({viewModeEnabled:!!this.props.viewModeEnabled});Mb.viewModeEnabled!==this.state.viewModeEnabled&&(this.addEventListeners(),this.deselectElements());sb.zenModeEnabled!==this.props.zenModeEnabled&&this.setState({zenModeEnabled:!!this.props.zenModeEnabled});sb.theme!==this.props.theme&&this.props.theme&&this.setState({theme:this.props.theme});
sb.gridModeEnabled!==this.props.gridModeEnabled&&this.setState({gridSize:this.props.gridModeEnabled?jb.k:null});this.props.name&&sb.name!==this.props.name&&this.setState({name:this.props.name});null===($b=this.excalidrawContainerRef.current)||void 0===$b||$b.classList.toggle("theme--dark","dark"===this.state.theme);this.state.editingLinearElement&&!this.state.selectedElementIds[this.state.editingLinearElement.elementId]&&setTimeout(function(){Tc.actionManager.executeAction(Xe)});sb=Mb.multiElement;
Mb.activeTool!==this.state.activeTool&&null!=sb&&(0,pe.N1)(this.state)&&(0,le.Mn)(sb,!1)&&(0,pe.R)(sb,this.state,this.scene,(0,Dc.AK)(ed._.getPointAtIndexGlobalCoordinates(sb,-1)));var wd={},Rd={},Gd={},Cd={},Id={};this.state.collaborators.forEach(function($e,Pe){if($e.selectedElementIds)for(var Re=0,ng=Object.keys($e.selectedElementIds);Re<ng.length;Re++){var Rf=ng[Re];Rf in Gd||(Gd[Rf]=[]);Gd[Rf].push(Pe)}$e.pointer&&($e.username&&(Cd[Pe]=$e.username),$e.userState&&(Id[Pe]=$e.userState),Rd[Pe]=
(0,Dc._i)({sceneX:$e.pointer.x,sceneY:$e.pointer.y},Tc.state),wd[Pe]=$e.button)});var xe,Tf,se=this.scene.getNonDeletedElements().filter(function($e){return(!(0,le.pC)($e)||Tc.state.pendingImageElementId!==$e.id)&&(!Tc.state.editingElement||"text"!==Tc.state.editingElement.type||$e.id!==Tc.state.editingElement.id)});((0,Em.OO)(se,this.state,this.state.selectionElement,window.devicePixelRatio,this.rc,this.canvas,{scrollX:this.state.scrollX,scrollY:this.state.scrollY,viewBackgroundColor:this.state.viewBackgroundColor,
zoom:this.state.zoom,remotePointerViewportCoords:Rd,remotePointerButton:wd,remoteSelectedElementIds:Gd,remotePointerUsernames:Cd,remotePointerUserStates:Id,shouldCacheIgnoreZoom:this.state.shouldCacheIgnoreZoom,theme:this.state.theme,imageCache:this.imageCache,isExporting:!1,renderScrollbars:!this.device.isMobile},function($e){var Pe=$e.atLeastOneVisibleElement;($e=$e.scrollBars)&&(Oi=$e);Pe=!(0,Sb.iB)(Tc.state.editingElement)&&!Pe&&0<se.length;Tc.state.scrolledOutside!==Pe&&Tc.setState({scrolledOutside:Pe});
Tc.scheduleImageRefresh()}),this.history.record(this.state,this.scene.getElementsIncludingDeleted()),this.state.isLoading)||null===(xe=(Tf=this.props).onChange)||void 0===xe||xe.call(Tf,this.scene.getElementsIncludingDeleted(),this.state,this.files)}},{key:"addTextFromPaste",value:function(sb){var Mb=(0,Dc.dE)({clientX:Dg,clientY:Xj},this.state);sb=(0,Sb.VL)({x:Mb.x,y:Mb.y,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,
strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,strokeSharpness:this.state.currentItemStrokeSharpness,text:sb,fontSize:this.state.currentItemFontSize,fontFamily:this.state.currentItemFontFamily,textAlign:this.state.currentItemTextAlign,verticalAlign:jb.hs,locked:!1});this.scene.replaceAllElements([].concat((0,ud.Z)(this.scene.getElementsIncludingDeleted()),[sb]));this.setState({selectedElementIds:(0,ld.Z)({},
sb.id,!0)});this.history.resumeRecording()}},{key:"handleTextWysiwyg",value:function(sb,Mb){var $b=this;Mb=Mb.isExistingElement;var Bc=void 0!==Mb&&Mb,Pc=function(Tc,wd,Rd){$b.scene.replaceAllElements((0,ud.Z)($b.scene.getElementsIncludingDeleted().map(function(Gd){return Gd.id===sb.id&&(0,Sb.iB)(Gd)?(0,Sb.N_)(Gd,{text:Tc,isDeleted:Rd,originalText:wd}):Gd})))};(0,Sb.b_)({id:sb.id,canvas:this.canvas,getViewportCoords:function(Tc,wd){Tc=(0,Dc._i)({sceneX:Tc,sceneY:wd},$b.state);return[Tc.x-$b.state.offsetLeft,
Tc.y-$b.state.offsetTop]},onChange:(0,Dc.tH)(function(Tc){Pc(Tc,Tc,!1);(0,Sb.qP)(sb)&&(0,pe.Ww)(sb)}),onSubmit:(0,Dc.tH)(function(Tc){var wd=Tc.text,Rd=Tc.viaKeyboard;Tc=Tc.originalText;var Gd=!wd.trim();if(Pc(wd,Tc,Gd),!Gd&&Rd){var Cd=sb.containerId?sb.containerId:sb.id;$b.setState(function(Id){return{selectedElementIds:pc(pc({},Id.selectedElementIds),{},(0,ld.Z)({},Cd,!0))}})}Gd&&(0,pe.$q)($b.scene.getNonDeletedElements(),[sb]);Gd&&!Bc||$b.history.resumeRecording();$b.setState({draggingElement:null,
editingElement:null});$b.state.activeTool.locked&&(0,Dc.Uk)($b.canvas,$b.state);$b.focusContainer()}),element:sb,excalidrawContainer:this.excalidrawContainerRef.current,app:this});this.deselectElements();Pc(sb.text,sb.originalText,!1)}},{key:"deselectElements",value:function(){this.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})}},{key:"getTextElementAtPosition",value:function(sb,Mb){return(sb=this.getElementAtPosition(sb,Mb,{includeBoundTextElement:!0}))&&(0,Sb.iB)(sb)&&
!sb.isDeleted?sb:null}},{key:"getElementAtPosition",value:function(sb,Mb,$b){var Bc=this.getElementsAtPosition(sb,Mb,null==$b?void 0:$b.includeBoundTextElement,null==$b?void 0:$b.includeLockedElements);if(1<Bc.length){if(null!=$b&&$b.preferSelected)for($b=Bc.length-1;-1<$b;$b--)if(this.state.selectedElementIds[Bc[$b].id])return Bc[$b];$b=Bc[Bc.length-1];return(0,Sb.wB)($b,this.state,sb,Mb)?Bc[Bc.length-2]:$b}return 1===Bc.length?Bc[0]:null}},{key:"getElementsAtPosition",value:function(sb,Mb){var $b=
this,Bc=2<arguments.length&&void 0!==arguments[2]&&arguments[2],Pc=3<arguments.length&&void 0!==arguments[3]&&arguments[3],Tc=Bc&&Pc?this.scene.getNonDeletedElements():this.scene.getNonDeletedElements().filter(function(wd){return(Pc||!wd.locked)&&(Bc||!((0,Sb.iB)(wd)&&wd.containerId))});return(0,rd.CJ)(Tc,function(wd){return(0,Sb.wX)(wd,$b.state,sb,Mb)})}},{key:"maybeCleanupAfterMissingPointerUp",value:function(sb){null!==jj&&jj(sb)}},{key:"updateGestureOnPointerDown",value:function(sb){oi.set(sb.pointerId,
{x:sb.clientX,y:sb.clientY});2===oi.size&&(nh=Yk(oi),Qg=this.state.zoom.value,ig=bk(Array.from(oi.values())))}},{key:"initialPointerDownState",value:function(sb){var Mb=(0,Dc.dE)(sb,this.state),$b=(0,rd.eD)(this.scene.getNonDeletedElements(),this.state),Bc=(0,Sb.KP)($b),Pc=(0,Yd.Z)(Bc,4);Bc=Pc[0];var Tc=Pc[1],wd=Pc[2];Pc=Pc[3];return{origin:Mb,withCmdOrCtrl:sb[vc.tW.CTRL_OR_CMD],originInGrid:(0,Dc.AK)((0,Xd.wC)(Mb.x,Mb.y,this.state.gridSize)),scrollbars:(0,rd._4)(Oi,sb.clientX-this.state.offsetLeft,
sb.clientY-this.state.offsetTop),lastCoords:pc({},Mb),originalElements:this.scene.getNonDeletedElements().reduce(function(Rd,Gd){return Rd.set(Gd.id,(0,yi.OL)(Gd)),Rd},new Map),resize:{handleType:!1,isResizing:!1,offset:{x:0,y:0},arrowDirection:"origin",center:{x:(wd+Bc)/2,y:(Pc+Tc)/2}},hit:{element:null,allHitElements:[],wasAddedToSelection:!1,hasBeenDuplicated:!1,hasHitCommonBoundingBoxOfSelectedElements:this.isHittingCommonBoundingBoxOfSelectedElements(Mb,$b),hasHitElementInside:!1},drag:{hasOccurred:!1,
offset:null},eventListeners:{onMove:null,onUp:null,onKeyUp:null,onKeyDown:null},boxSelection:{hasOccurred:!1},elementIdsToErase:{}}}},{key:"handleDraggingScrollBar",value:function(sb,Mb){var $b=this;if(!Mb.scrollbars.isOverEither||this.state.multiElement)return!1;tg=!0;Mb.lastCoords.x=sb.clientX;Mb.lastCoords.y=sb.clientY;var Bc=(0,Dc.$9)(function(Tc){Tc.target instanceof HTMLElement&&$b.handlePointerMoveOverScrollbars(Tc,Mb)}),Pc=(0,Dc.tH)(function(){tg=!1;(0,Dc.Uk)($b.canvas,$b.state);jj=null;$b.setState({cursorButton:"up"});
$b.savePointer(sb.clientX,sb.clientY,"up");window.removeEventListener(jb.Ks.POINTER_MOVE,Bc);window.removeEventListener(jb.Ks.POINTER_UP,Pc);Bc.flush()});return jj=Pc,window.addEventListener(jb.Ks.POINTER_MOVE,Bc),window.addEventListener(jb.Ks.POINTER_UP,Pc),!0}},{key:"isASelectedElement",value:function(sb){return null!=sb&&this.state.selectedElementIds[sb.id]}},{key:"isHittingCommonBoundingBoxOfSelectedElements",value:function(sb,Mb){if(2>Mb.length)return!1;var $b=10/this.state.zoom.value;Mb=(0,Sb.KP)(Mb);
Mb=(0,Yd.Z)(Mb,4);var Bc=Mb[1],Pc=Mb[2],Tc=Mb[3];return sb.x>Mb[0]-$b&&sb.x<Pc+$b&&sb.y>Bc-$b&&sb.y<Tc+$b}},{key:"onKeyDownFromPointerDownHandler",value:function(sb){var Mb=this;return(0,Dc.tH)(function($b){Mb.maybeHandleResize(sb,$b)||Mb.maybeDragNewGenericElement(sb,$b)})}},{key:"onKeyUpFromPointerDownHandler",value:function(sb){var Mb=this;return(0,Dc.tH)(function($b){$b.key===vc.tW.ALT&&$b.preventDefault();Mb.maybeHandleResize(sb,$b)||Mb.maybeDragNewGenericElement(sb,$b)})}},{key:"onPointerMoveFromPointerDownHandler",
value:function(sb){var Mb=this;return(0,Dc.$9)(function($b){var Bc,Pc;if(null===sb.drag.offset&&(sb.drag.offset=(0,Dc.AK)((0,Sb.$V)((0,rd.eD)(Mb.scene.getNonDeletedElements(),Mb.state),sb.origin.x,sb.origin.y))),$b.target instanceof HTMLElement&&!Mb.handlePointerMoveOverScrollbars($b,sb)){var Tc=(0,Dc.dE)($b,Mb.state);if((0,Kh.EN)(Mb.state))Mb.handleEraser($b,sb,Tc);else{var wd=(0,Xd.wC)(Tc.x,Tc.y,Mb.state.gridSize),Rd=(0,Yd.Z)(wd,2);wd=Rd[0];Rd=Rd[1];if(sb.drag.hasOccurred||"arrow"!==Mb.state.activeTool.type&&
"line"!==Mb.state.activeTool.type||!((0,Xd.LW)(Tc.x,Tc.y,sb.origin.x,sb.origin.y)<jb.f)){if(sb.resize.isResizing&&(sb.lastCoords.x=Tc.x,sb.lastCoords.y=Tc.y,Mb.maybeHandleResize(sb,$b)))return!0;if(Mb.state.editingLinearElement&&ed._.handlePointDragging(Mb.state,function(ng){return Mb.setState(ng)},Tc.x,Tc.y,function(ng,Rf){Mb.maybeSuggestBindingsForLinearElementAtCoords(ng,Rf)}))return sb.lastCoords.x=Tc.x,void(sb.lastCoords.y=Tc.y);if(!(!sb.hit.allHitElements.some(function(ng){return Mb.isASelectedElement(ng)})&&
!sb.hit.hasHitCommonBoundingBoxOfSelectedElements||Mb.state.editingLinearElement&&$b.shiftKey||Mb.state.editingLinearElement&&(null===(Bc=Mb.state.editingLinearElement)||void 0===Bc?void 0:Bc.elementId)===(null===(Pc=sb.hit.element)||void 0===Pc?void 0:Pc.id)&&!sb.hit.hasHitElementInside)){Bc=(0,rd.eD)(Mb.scene.getNonDeletedElements(),Mb.state);if(Bc.every(function(ng){return ng.locked}))return;if(sb.drag.hasOccurred=!0,0<Bc.length&&!sb.withCmdOrCtrl){wd=(0,Xd.wC)(Tc.x-sb.drag.offset.x,Tc.y-sb.drag.offset.y,
Mb.state.gridSize);Rd=(0,Yd.Z)(wd,2);wd=Rd[0];Rd=Rd[1];Tc=[Math.abs(Tc.x-sb.origin.x),Math.abs(Tc.y-sb.origin.y)];if((0,Sb.o8)(sb,Bc,wd,Rd,$b.shiftKey,Tc[0],Tc[1],Mb.state),Mb.maybeSuggestBindingForAll(Bc),$b.altKey&&!sb.hit.hasBeenDuplicated){sb.hit.hasBeenDuplicated=!0;var Gd;$b=[];Tc=[];Pc=new Map;Bc=new Map;var Cd=sb.hit.element,Id=Mb.scene.getElementsIncludingDeleted(),xe=(0,rd.eD)(Id,Mb.state,!0).map(function(ng){return ng.id});Id=hd(Id);try{for(Id.s();!(Gd=Id.n()).done;){var Tf=Gd.value;if(xe.includes(Tf.id)||
Tf.id===(null==Cd?void 0:Cd.id)&&sb.hit.wasAddedToSelection){var se=(0,Sb.Sy)(Mb.state.editingGroupId,Pc,Tf),$e=(0,Xd.wC)(sb.origin.x-sb.drag.offset.x,sb.origin.y-sb.drag.offset.y,Mb.state.gridSize),Pe=(0,Yd.Z)($e,2);(0,Lc.DR)(se,{x:se.x+(Pe[0]-wd),y:se.y+(Pe[1]-Rd)});$b.push(se);Tc.push(Tf);Bc.set(Tf.id,se.id)}else $b.push(Tf)}}catch(ng){Id.e(ng)}finally{Id.f()}Gd=[].concat($b,Tc);(0,gd.P7)($b,Tc,Bc);(0,pe.ek)(Gd,Tc,Bc,"duplicatesServeAsOld");Mb.scene.replaceAllElements(Gd)}return}}if(Gd=Mb.state.draggingElement)if("freedraw"===
Gd.type?(Tf=Gd.points,se=Tc.x-Gd.x,$e=Tc.y-Gd.y,Pe=0<Tf.length&&Tf[Tf.length-1],Pe&&Pe[0]===se&&Pe[1]===$e||(Pe=Gd.simulatePressure?Gd.pressures:[].concat((0,ud.Z)(Gd.pressures),[$b.pressure]),(0,Lc.DR)(Gd,{points:[].concat((0,ud.Z)(Tf),[[se,$e]]),pressures:Pe}))):(0,le.bt)(Gd)?(sb.drag.hasOccurred=!0,Tf=Gd.points,se=wd-Gd.x,$e=Rd-Gd.y,(0,vc.Ge)($b)&&2===Tf.length&&($e=(0,Sb.uK)(Mb.state.activeTool.type,se,$e),se=$e.width,$e=$e.height),1===Tf.length?(0,Lc.DR)(Gd,{points:[].concat((0,ud.Z)(Tf),[[se,
$e]])}):1<Tf.length&&(0,Lc.DR)(Gd,{points:[].concat((0,ud.Z)(Tf.slice(0,-1)),[[se,$e]])}),(0,le.Mn)(Gd,!1)&&Mb.maybeSuggestBindingsForLinearElementAtCoords(Gd,[Tc],Mb.state.startBoundElement)):(sb.lastCoords.x=Tc.x,sb.lastCoords.y=Tc.y,Mb.maybeDragNewGenericElement(sb,$b)),"selection"===Mb.state.activeTool.type)if(sb.boxSelection.hasOccurred=!0,Tf=Mb.scene.getNonDeletedElements(),$b.shiftKey||Mb.state.editingLinearElement||!(0,rd.N)(Tf,Mb.state)||(sb.withCmdOrCtrl&&sb.hit.element?Mb.setState(function(ng){return(0,Ub.bO)(pc(pc({},
ng),{},{selectedElementIds:(0,ld.Z)({},sb.hit.element.id,!0)}),Mb.scene.getNonDeletedElements())}):Mb.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})),Mb.state.editingLinearElement)ed._.handleBoxSelection($b,Mb.state,Mb.setState.bind(Mb));else{var Re=(0,rd.Yp)(Tf,Gd);Mb.setState(function(ng){return(0,Ub.bO)(pc(pc({},ng),{},{selectedElementIds:pc(pc(pc({},ng.selectedElementIds),Re.reduce(function(Rf,Ni){return Rf[Ni.id]=!0,Rf},{})),sb.hit.element?(0,ld.Z)({},sb.hit.element.id,
!Re.length):null),showHyperlinkPopup:!(1!==Re.length||!Re[0].link)&&"info"}),Mb.scene.getNonDeletedElements())})}}}}})}},{key:"handlePointerMoveOverScrollbars",value:function(sb,Mb){return Mb.scrollbars.isOverHorizontal?(sb=sb.clientX,this.setState({scrollX:this.state.scrollX-(sb-Mb.lastCoords.x)/this.state.zoom.value}),Mb.lastCoords.x=sb,!0):Mb.scrollbars.isOverVertical?(sb=sb.clientY,this.setState({scrollY:this.state.scrollY-(sb-Mb.lastCoords.y)/this.state.zoom.value}),Mb.lastCoords.y=sb,!0):!1}},
{key:"onPointerUpFromPointerDownHandler",value:function(sb){var Mb=this;return(0,Dc.tH)(function($b){var Bc,Pc,Tc=Mb.state,wd=Tc.draggingElement,Rd=Tc.resizingElement,Gd=Tc.multiElement,Cd=Tc.activeTool,Id=Tc.isResizing;Tc=Tc.isRotating;if(Mb.setState({isResizing:!1,isRotating:!1,resizingElement:null,selectionElement:null,cursorButton:"up",editingElement:Gd||(0,Sb.iB)(Mb.state.editingElement)?Mb.state.editingElement:null}),Mb.savePointer($b.clientX,$b.clientY,"up"),Mb.state.editingLinearElement)sb.boxSelection.hasOccurred||
(null===(Bc=sb.hit)||void 0===Bc||null===(Pc=Bc.element)||void 0===Pc?void 0:Pc.id)===Mb.state.editingLinearElement.elementId&&sb.hit.hasHitElementInside?(Bc=ed._.handlePointerUp($b,Mb.state.editingLinearElement,Mb.state),Bc!==Mb.state.editingLinearElement&&Mb.setState({editingLinearElement:Bc,suggestedBindings:[]})):Mb.actionManager.executeAction(Xe);if(jj=null,sb.eventListeners.onMove&&sb.eventListeners.onMove.flush(),window.removeEventListener(jb.Ks.POINTER_MOVE,sb.eventListeners.onMove),window.removeEventListener(jb.Ks.POINTER_UP,
sb.eventListeners.onUp),window.removeEventListener(jb.Ks.KEYDOWN,sb.eventListeners.onKeyDown),window.removeEventListener(jb.Ks.KEYUP,sb.eventListeners.onKeyUp),Mb.state.pendingImageElementId&&Mb.setState({pendingImageElementId:null}),"freedraw"===(null==wd?void 0:wd.type))return Id=(0,Dc.dE)($b,Mb.state),Gd=wd.points,Cd=Id.x-wd.x,Id=Id.y-wd.y,Cd===Gd[0][0]&&Id===Gd[0][1]&&(Id+=1E-4,Cd+=1E-4),$b=wd.simulatePressure?[]:[].concat((0,ud.Z)(wd.pressures),[$b.pressure]),(0,Lc.DR)(wd,{points:[].concat((0,ud.Z)(Gd),
[[Cd,Id]]),pressures:$b,lastCommittedPoint:[Cd,Id]}),void Mb.actionManager.executeAction(Xe);if((0,le.pC)(wd))try{Mb.initializeImageDimensions(wd),Mb.setState({selectedElementIds:(0,ld.Z)({},wd.id,!0)},function(){Mb.actionManager.executeAction(Xe)})}catch(se){console.error(se),Mb.scene.replaceAllElements(Mb.scene.getElementsIncludingDeleted().filter(function($e){return $e.id!==wd.id})),Mb.actionManager.executeAction(Xe)}else if((0,le.bt)(wd))1<wd.points.length&&Mb.history.resumeRecording(),$b=(0,Dc.dE)($b,
Mb.state),sb.drag.hasOccurred||!wd||Gd?sb.drag.hasOccurred&&!Gd&&((0,pe.N1)(Mb.state)&&(0,le.Mn)(wd,!1)&&(0,pe.R)(wd,Mb.state,Mb.scene,$b),Mb.setState({suggestedBindings:[],startBoundElement:null}),Cd.locked?Mb.setState(function(se){return{draggingElement:null,selectedElementIds:pc(pc({},se.selectedElementIds),{},(0,ld.Z)({},wd.id,!0))}}):((0,Dc.z8)(Mb.canvas),Mb.setState(function(se){return{draggingElement:null,activeTool:(0,Dc.Om)(Mb.state,{type:"selection"}),selectedElementIds:pc(pc({},se.selectedElementIds),
{},(0,ld.Z)({},wd.id,!0))}}))):((0,Lc.DR)(wd,{points:[].concat((0,ud.Z)(wd.points),[[$b.x-wd.x,$b.y-wd.y]])}),Mb.setState({multiElement:wd,editingElement:Mb.state.draggingElement}));else{if("selection"!==Cd.type&&wd&&(0,Sb.QD)(wd))return Mb.scene.replaceAllElements(Mb.scene.getElementsIncludingDeleted().slice(0,-1)),void Mb.setState({draggingElement:null});wd&&(0,Lc.DR)(wd,(0,Sb.Qp)(wd));Rd&&Mb.history.resumeRecording();Rd&&(0,Sb.QD)(Rd)&&Mb.scene.replaceAllElements(Mb.scene.getElementsIncludingDeleted().filter(function(se){return se.id!==
Rd.id}));var xe=sb.hit.element;if((0,Kh.EN)(Mb.state))0===(0,Xd.LW)(Mb.lastPointerDown.clientX,Mb.lastPointerDown.clientY,Mb.lastPointerUp.clientX,Mb.lastPointerUp.clientY)&&($b=(0,Dc.dE)({clientX:Mb.lastPointerUp.clientX,clientY:Mb.lastPointerUp.clientY},Mb.state),Mb.getElementsAtPosition($b.x,$b.y).forEach(function(se){return sb.elementIdsToErase[se.id]={erase:!0,opacity:se.opacity}})),Mb.eraseElements(sb);else{if(Object.keys(sb.elementIdsToErase).length&&Mb.restoreReadyToEraseElements(sb),!(!xe||
sb.drag.hasOccurred||sb.hit.wasAddedToSelection||Mb.state.editingLinearElement&&sb.boxSelection.hasOccurred))if($b.shiftKey&&!Mb.state.editingLinearElement)if(Mb.state.selectedElementIds[xe.id])if((0,Ub.zq)(Mb.state,xe)){var Tf=xe.groupIds.flatMap(function(se){return(0,Ub.Fb)(Mb.scene.getNonDeletedElements(),se)}).map(function(se){return(0,ld.Z)({},se.id,!1)}).reduce(function(se,$e){return pc(pc({},se),$e)},{});Mb.setState(function(se){return{selectedGroupIds:pc(pc({},se.selectedElementIds),xe.groupIds.map(function($e){return(0,ld.Z)({},
$e,!1)}).reduce(function($e,Pe){return pc(pc({},$e),Pe)},{})),selectedElementIds:pc(pc({},se.selectedElementIds),Tf)}})}else Mb.setState(function(se){return(0,Ub.bO)(pc(pc({},se),{},{selectedElementIds:pc(pc({},se.selectedElementIds),{},(0,ld.Z)({},xe.id,!1))}),Mb.scene.getNonDeletedElements())});else Mb.setState(function(se){return{selectedElementIds:pc(pc({},se.selectedElementIds),{},(0,ld.Z)({},xe.id,!0))}});else Mb.setState(function(se){return pc({},(0,Ub.bO)(pc(pc({},se),{},{selectedElementIds:(0,ld.Z)({},
xe.id,!0)}),Mb.scene.getNonDeletedElements()))});Mb.state.editingLinearElement||sb.drag.hasOccurred||Mb.state.isResizing||!(xe&&(0,Sb.wB)(xe,Mb.state,sb.origin.x,sb.origin.y)||!xe&&sb.hit.hasHitCommonBoundingBoxOfSelectedElements)?(!Cd.locked&&"freedraw"!==Cd.type&&wd&&Mb.setState(function(se){return{selectedElementIds:pc(pc({},se.selectedElementIds),{},(0,ld.Z)({},wd.id,!0))}}),("selection"!==Cd.type||(0,rd.N)(Mb.scene.getNonDeletedElements(),Mb.state))&&Mb.history.resumeRecording(),(sb.drag.hasOccurred||
Id||Tc)&&((0,pe.N1)(Mb.state)?pe.el:pe.H)((0,rd.eD)(Mb.scene.getNonDeletedElements(),Mb.state)),Cd.locked||"freedraw"===Cd.type?Mb.setState({draggingElement:null,suggestedBindings:[]}):((0,Dc.z8)(Mb.canvas),Mb.setState({draggingElement:null,suggestedBindings:[],activeTool:(0,Dc.Om)(Mb.state,{type:"selection"})}))):Mb.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})}}})}},{key:"maybeSuggestBindingForAll",value:function(sb){sb=(0,pe.ZB)(sb);this.setState({suggestedBindings:sb})}},
{key:"clearSelection",value:function(sb){this.setState(function(Mb){return{selectedElementIds:{},selectedGroupIds:{},editingGroupId:Mb.editingGroupId&&null!=sb&&(0,Ub.Nd)(sb,Mb.editingGroupId)?Mb.editingGroupId:null}});this.setState({selectedElementIds:{},previousSelectedElementIds:this.state.selectedElementIds})}},{key:"getTextWysiwygSnappedToCenterPosition",value:function(sb,Mb,$b,Bc,Pc){if(Pc=(0,rd.OW)(this.scene.getElementsIncludingDeleted().filter(function(Tc){return!(0,Sb.iB)(Tc)}),sb,Mb))if(Bc=
Pc.x+Pc.width/2,Pc=Pc.y+Pc.height/2,Math.hypot(sb-Bc,Mb-Pc)<jb.wZ)return sb=(0,Dc._i)({sceneX:Bc,sceneY:Pc},$b),{viewportX:sb.x,viewportY:sb.y,elementCenterX:Bc,elementCenterY:Pc}}},{key:"getCanvasOffsets",value:function(){var sb;return null!==(sb=this.excalidrawContainerRef)&&void 0!==sb&&sb.current?(sb=this.excalidrawContainerRef.current.getBoundingClientRect(),{offsetLeft:sb.left,offsetTop:sb.top}):{offsetLeft:0,offsetTop:0}}},{key:"updateLanguage",value:(Tb=(0,Qd.Z)(uc().mark(function Mb(){var $b,
Bc=this;return uc().wrap(function(Pc){for(;;)switch(Pc.prev=Pc.next){case 0:return $b=qc.Mj.find(function(Tc){return Tc.code===Bc.props.langCode})||qc.Fp,Pc.next=3,(0,qc.m0)($b);case 3:this.setAppState({});case 4:case "end":return Pc.stop()}},Mb,this)})),function(){return Tb.apply(this,arguments)})}],[{key:"resetTapTwice",value:function(){ph=!1}}]),Fb}(cd().Component);Hl.defaultProps={UIOptions:jb.cW};var Ai=function(){var ja=this;this.rc=this.canvas=null;this.unmounted=!1;this.device=fk;this.excalidrawContainerRef=
cd().createRef();this.files={};this.imageCache=new Map;this.lastPointerUp=this.lastPointerDown=null;this.contextMenuOpen=!1;this.lastScenePointer=null;this.focusContainer=function(){var Fb;ja.props.autoFocus&&(null===(Fb=ja.excalidrawContainerRef.current)||void 0===Fb||Fb.focus())};this.getSceneElementsIncludingDeleted=function(){return ja.scene.getElementsIncludingDeleted()};this.getSceneElements=function(){return ja.scene.getNonDeletedElements()};this.syncActionResult=(0,Dc.tH)(function(Fb){if(ja.contextMenuOpen=
!1,!ja.unmounted&&!1!==Fb){var Tb=null;if(Fb.elements&&(Fb.elements.forEach(function(Gd){var Cd;(null===(Cd=ja.state.editingElement)||void 0===Cd?void 0:Cd.id)===Gd.id&&ja.state.editingElement!==Gd&&(0,Sb.qP)(Gd)&&(Tb=Gd)}),ja.scene.replaceAllElements(Fb.elements),Fb.commitToHistory&&ja.history.resumeRecording()),Fb.files&&(ja.files=Fb.replaceFiles?Fb.files:pc(pc({},ja.files),Fb.files),ja.addNewImagesToImageCache()),Fb.appState||Tb){var wb,zb,Pb,sb,Mb,$b;Fb.commitToHistory&&ja.history.resumeRecording();
var Bc=(null==Fb||null===(wb=Fb.appState)||void 0===wb?void 0:wb.viewModeEnabled)||!1,Pc=(null==Fb||null===(zb=Fb.appState)||void 0===zb?void 0:zb.zenModeEnabled)||!1,Tc=(null==Fb||null===(Pb=Fb.appState)||void 0===Pb?void 0:Pb.gridSize)||null,wd=(null==Fb||null===(sb=Fb.appState)||void 0===sb?void 0:sb.theme)||jb.C6.LIGHT,Rd=null!==(Mb=null==Fb||null===($b=Fb.appState)||void 0===$b?void 0:$b.name)&&void 0!==Mb?Mb:ja.state.name;void 0!==ja.props.viewModeEnabled&&(Bc=ja.props.viewModeEnabled);void 0!==
ja.props.zenModeEnabled&&(Pc=ja.props.zenModeEnabled);void 0!==ja.props.gridModeEnabled&&(Tc=ja.props.gridModeEnabled?jb.k:null);void 0!==ja.props.theme&&(wd=ja.props.theme);void 0!==ja.props.name&&(Rd=ja.props.name);ja.setState(function(Gd){var Cd;return Object.assign(Fb.appState||{},{editingElement:Tb||(null===(Cd=Fb.appState)||void 0===Cd?void 0:Cd.editingElement)||null,viewModeEnabled:Bc,zenModeEnabled:Pc,gridSize:Tc,theme:wd,name:Rd})},function(){Fb.syncHistory&&ja.history.setCurrentState(ja.state,
ja.scene.getElementsIncludingDeleted())})}}});this.onBlur=(0,Dc.tH)(function(){Dh=!1;ja.setState({isBindingEnabled:!0})});this.onUnload=function(){ja.onBlur()};this.disableEvent=function(Fb){Fb.preventDefault()};this.onFontLoaded=function(){ja.scene.getElementsIncludingDeleted().forEach(function(Fb){(0,Sb.iB)(Fb)&&(0,Rj.bI)(Fb)});ja.onSceneUpdated()};this.resetHistory=function(){ja.history.clear()};this.resetScene=(0,Dc.tH)(function(Fb){ja.scene.replaceAllElements([]);ja.setState(function(Tb){return pc(pc({},
(0,Kh.im)()),{},{isLoading:(null==Fb||!Fb.resetLoadingState)&&Tb.isLoading,theme:ja.state.theme})});ja.resetHistory()});this.initializeScene=(0,Qd.Z)(uc().mark(function Tb(){var wb,zb,Pb,sb,Mb,$b;return uc().wrap(function(Bc){for(;;)switch(Bc.prev=Bc.next){case 0:return"launchQueue"in window&&"LaunchParams"in window&&window.launchQueue.setConsumer(function(){var Pc=(0,Qd.Z)(uc().mark(function Rd(wd){var Gd,Cd;return uc().wrap(function(Id){for(;;)switch(Id.prev=Id.next){case 0:if(wd.files.length){Id.next=
2;break}return Id.abrupt("return");case 2:return Gd=wd.files[0],Id.next=5,Gd.getFile();case 5:Cd=Id.sent,ja.loadFileToCanvas(new File([Cd],Cd.name||"",{type:Cd.type}),Gd);case 7:case "end":return Id.stop()}},Rd)}));return function(wd){return Pc.apply(this,arguments)}}()),ja.state.isLoading||ja.setState({isLoading:!0}),sb=null,Bc.prev=3,Bc.next=6,ja.props.initialData;case 6:if(Bc.t0=Bc.sent,Bc.t0){Bc.next=9;break}Bc.t0=null;case 9:sb=Bc.t0;null!==(Mb=sb)&&void 0!==Mb&&Mb.libraryItems&&ja.library.updateLibrary({libraryItems:sb.libraryItems,
merge:!0}).catch(function(Pc){console.error(Pc)});Bc.next=17;break;case 13:Bc.prev=13,Bc.t1=Bc.catch(3),console.error(Bc.t1),sb={appState:{errorMessage:Bc.t1.message||"Encountered an error during importing or restoring scene data"}};case 17:($b=(0,Lh.nu)(sb,null,null)).appState=pc(pc({},$b.appState),{},{isLibraryOpen:(null===(wb=sb)||void 0===wb||null===(zb=wb.appState)||void 0===zb?void 0:zb.isLibraryOpen)||ja.state.isLibraryOpen,activeTool:"image"===$b.appState.activeTool.type?pc(pc({},$b.appState.activeTool),
{},{type:"selection"}):$b.appState.activeTool,isLoading:!1}),null!==(Pb=sb)&&void 0!==Pb&&Pb.scrollToContent&&($b.appState=pc(pc({},$b.appState),(0,rd.W)($b.elements,pc(pc({},$b.appState),{},{width:ja.state.width,height:ja.state.height,offsetTop:ja.state.offsetTop,offsetLeft:ja.state.offsetLeft}),null))),ja.resetHistory(),ja.syncActionResult(pc(pc({},$b),{},{commitToHistory:!0}));case 22:case "end":return Bc.stop()}},Tb,null,[[3,13]])}));this.refreshDeviceState=function(Tb){var wb=Tb.getBoundingClientRect();
Tb=wb.width;wb=wb.height;ja.device=(0,Dc.v4)(ja.device,{isSmScreen:Tb<jb.eF,isMobile:Tb<jb.kV||wb<jb.Yx&&Tb<jb.sS,canDeviceFitSidebar:Tb>(null!=ja.props.UIOptions.dockedSidebarBreakpoint?ja.props.UIOptions.dockedSidebarBreakpoint:jb.sk)})};this.onResize=(0,Dc.tH)(function(){ja.scene.getElementsIncludingDeleted().forEach(function(Tb){return(0,Rj.bI)(Tb)});ja.setState({})});this.onScroll=(0,Dc.Ds)(function(){var Tb=ja.getCanvasOffsets(),wb=Tb.offsetTop,zb=Tb.offsetLeft;ja.setState(function(Pb){return Pb.offsetLeft===
zb&&Pb.offsetTop===wb?null:{offsetTop:wb,offsetLeft:zb}})},jb.HM);this.onCut=(0,Dc.tH)(function(Tb){var wb;(null===(wb=ja.excalidrawContainerRef.current)||void 0===wb?0:wb.contains(document.activeElement))&&!(0,Dc.s)(Tb.target)&&(ja.cutAll(),Tb.preventDefault(),Tb.stopPropagation())});this.onCopy=(0,Dc.tH)(function(Tb){var wb;(null===(wb=ja.excalidrawContainerRef.current)||void 0===wb?0:wb.contains(document.activeElement))&&!(0,Dc.s)(Tb.target)&&(ja.copyAll(),Tb.preventDefault(),Tb.stopPropagation())});
this.cutAll=function(){ja.actionManager.executeAction(kl,"keyboard")};this.copyAll=function(){ja.actionManager.executeAction(Pj,"keyboard")};this.onTapStart=function(Tb){if(vc.Dt||Tb.preventDefault(),!ph)return ph=!0,clearTimeout(ih),void(ih=window.setTimeout(Hl.resetTapTwice,jb.Gj));if(ph&&1===Tb.touches.length){var wb=(0,Yd.Z)(Tb.touches,1)[0];ja.handleCanvasDoubleClick({clientX:wb.clientX,clientY:wb.clientY});ph=!1;clearTimeout(ih)}vc.Dt&&Tb.preventDefault();2===Tb.touches.length&&ja.setState({selectedElementIds:{}})};
this.onTapEnd=function(Tb){ja.resetContextMenuTimer();0<Tb.touches.length?ja.setState({previousSelectedElementIds:{},selectedElementIds:ja.state.previousSelectedElementIds}):oi.clear()};this.pasteFromClipboard=(0,Dc.tH)(function(){var Tb=(0,Qd.Z)(uc().mark(function Pb(zb){var sb,Mb,$b,Bc,Pc,Tc,wd,Rd,Gd,Cd,Id;return uc().wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:if($b=document.activeElement,null===(sb=ja.excalidrawContainerRef.current)||void 0===sb?void 0:sb.contains($b)){xe.next=4;break}return xe.abrupt("return");
case 4:if(Bc=document.elementFromPoint(Dg,Xj),!zb||Bc instanceof HTMLCanvasElement&&!(0,Dc.s)($b)){xe.next=7;break}return xe.abrupt("return");case 7:return Pc=null==zb||null===(Mb=zb.clipboardData)||void 0===Mb?void 0:Mb.files[0],xe.next=10,(0,uf.mQ)(zb);case 10:if(Tc=xe.sent,!Pc&&Tc.text&&(wd=Tc.text.trim()).startsWith("\x3csvg")&&wd.endsWith("\x3c/svg\x3e")&&(Pc=(0,sa.Pn)(wd)),!(0,sa.Wr)(Pc)||Tc.spreadsheet){xe.next=19;break}return Rd=(0,Dc.dE)({clientX:Dg,clientY:Xj},ja.state),Gd=Rd.x,Cd=Rd.y,
Id=ja.createImageElement({sceneX:Gd,sceneY:Cd}),ja.insertImageElement(Id,Pc),ja.initializeImageDimensions(Id),ja.setState({selectedElementIds:(0,ld.Z)({},Id.id,!0)}),xe.abrupt("return");case 19:if(!ja.props.onPaste){xe.next=31;break}return xe.prev=20,xe.next=23,ja.props.onPaste(Tc,zb);case 23:if(xe.t0=xe.sent,!1!==xe.t0){xe.next=26;break}return xe.abrupt("return");case 26:xe.next=31;break;case 28:xe.prev=28,xe.t1=xe.catch(20),console.error(xe.t1);case 31:Tc.errorMessage?ja.setState({errorMessage:Tc.errorMessage}):
Tc.spreadsheet?ja.setState({pasteDialog:{data:Tc.spreadsheet,shown:!0}}):Tc.elements?ja.addElementsFromPasteOrLibrary({elements:Tc.elements,files:Tc.files||null,position:"cursor"}):Tc.text&&ja.addTextFromPaste(Tc.text),ja.setActiveTool({type:"selection"}),null==zb||zb.preventDefault();case 34:case "end":return xe.stop()}},Pb,null,[[20,28]])}));return function(zb){return Tb.apply(this,arguments)}}());this.addElementsFromPasteOrLibrary=function(Tb){var wb=(0,Lh.ET)(Tb.elements,null),zb=(0,Sb.KP)(wb);
zb=(0,Yd.Z)(zb,4);var Pb=zb[0],sb=zb[1],Mb=zb[3];zb=(0,Dc.TE)(Pb,zb[2])/2;Mb=(0,Dc.TE)(sb,Mb)/2;var $b="object"===(0,xd.Z)(Tb.position)?Tb.position.clientX:"cursor"===Tb.position?Dg:ja.state.width/2+ja.state.offsetLeft,Bc="object"===(0,xd.Z)(Tb.position)?Tb.position.clientY:"cursor"===Tb.position?Xj:ja.state.height/2+ja.state.offsetTop;$b=(0,Dc.dE)({clientX:$b,clientY:Bc},ja.state);zb=$b.x-zb;Mb=$b.y-Mb;var Pc=new Map;zb=(0,Xd.wC)(zb,Mb,ja.state.gridSize);zb=(0,Yd.Z)(zb,2);var Tc=zb[0],wd=zb[1],Rd=
new Map;zb=wb.map(function(Gd){var Cd=(0,Sb.Sy)(ja.state.editingGroupId,Pc,Gd,{x:Gd.x+Tc-Pb,y:Gd.y+wd-sb});return Rd.set(Gd.id,Cd.id),Cd});(0,gd.P7)(zb,wb,Rd);Mb=[].concat((0,ud.Z)(ja.scene.getElementsIncludingDeleted()),(0,ud.Z)(zb));(0,pe.ek)(Mb,wb,Rd);Tb.files&&(ja.files=pc(pc({},ja.files),Tb.files));ja.scene.replaceAllElements(Mb);ja.history.resumeRecording();ja.setState((0,Ub.bO)(pc(pc({},ja.state),{},{isLibraryOpen:!(!ja.state.isLibraryOpen||!ja.device.canDeviceFitSidebar)&&ja.state.isLibraryMenuDocked,
selectedElementIds:zb.reduce(function(Gd,Cd){return(0,le.Xh)(Cd)||(Gd[Cd.id]=!0),Gd},{}),selectedGroupIds:{}}),ja.scene.getNonDeletedElements()),function(){Tb.files&&ja.addNewImagesToImageCache()});ja.setActiveTool({type:"selection"})};this.setAppState=function(Tb){ja.setState(Tb)};this.removePointer=function(Tb){Sf&&ja.resetContextMenuTimer();oi.delete(Tb.pointerId)};this.toggleLock=function(){var Tb=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"ui";ja.state.activeTool.locked||(0,Th.L)("toolbar",
"toggleLock","".concat(Tb," (").concat(ja.device.isMobile?"mobile":"desktop",")"));ja.setState(function(wb){return{activeTool:pc(pc(pc({},wb.activeTool),(0,Dc.Om)(ja.state,wb.activeTool.locked?{type:"selection"}:wb.activeTool)),{},{locked:!wb.activeTool.locked})}})};this.togglePenMode=function(){ja.setState(function(Tb){return{penMode:!Tb.penMode}})};this.toggleZenMode=function(){ja.actionManager.executeAction(xg)};this.scrollToContent=function(){var Tb=0<arguments.length&&void 0!==arguments[0]?arguments[0]:
ja.scene.getNonDeletedElements();ja.setState(pc({},(0,rd.W)(Array.isArray(Tb)?Tb:[Tb],ja.state,ja.canvas)))};this.clearToast=function(){ja.setState({toastMessage:null})};this.setToastMessage=function(Tb){ja.setState({toastMessage:Tb})};this.restoreFileFromShare=(0,Qd.Z)(uc().mark(function wb(){var zb,Pb,sb,Mb;return uc().wrap(function($b){for(;;)switch($b.prev=$b.next){case 0:return $b.prev=0,$b.next=3,caches.open("web-share-target");case 3:return zb=$b.sent,$b.next=6,zb.match("shared-file");case 6:if(!(Pb=
$b.sent)){$b.next=16;break}return $b.next=10,Pb.blob();case 10:return sb=$b.sent,Mb=new File([sb],sb.name||"",{type:sb.type}),ja.loadFileToCanvas(Mb,null),$b.next=15,zb.delete("shared-file");case 15:window.history.replaceState(null,jb.iC,window.location.pathname);case 16:$b.next=21;break;case 18:$b.prev=18,$b.t0=$b.catch(0),ja.setState({errorMessage:$b.t0.message});case 21:case "end":return $b.stop()}},wb,null,[[0,18]])}));this.addFiles=(0,Dc.tH)(function(wb){var zb=wb.reduce(function(Pb,sb){return Pb.set(sb.id,
sb),Pb},new Map);ja.files=pc(pc({},ja.files),Object.fromEntries(zb));ja.scene.getNonDeletedElements().forEach(function(Pb){(0,le.wi)(Pb)&&zb.has(Pb.fileId)&&(ja.imageCache.delete(Pb.fileId),(0,Rj.bI)(Pb))});ja.scene.informMutation();ja.addNewImagesToImageCache()});this.updateScene=(0,Dc.tH)(function(wb){wb.commitToHistory&&ja.history.resumeRecording();wb.appState&&ja.setState(wb.appState);wb.elements&&ja.scene.replaceAllElements(wb.elements);wb.collaborators&&ja.setState({collaborators:wb.collaborators})});
this.onSceneUpdated=function(){ja.setState({})};this.updateCurrentCursorPosition=(0,Dc.tH)(function(wb){Dg=wb.clientX;Xj=wb.clientY});this.onKeyDown=(0,Dc.tH)(function(wb){if("Proxy"in window&&(!wb.shiftKey&&/^[A-Z]$/.test(wb.key)||wb.shiftKey&&/^[a-z]$/.test(wb.key))&&(wb=new Proxy(wb,{get:function($b,Bc){var Pc=$b[Bc];return"function"==typeof Pc?Pc.bind($b):"key"===Bc?wb.shiftKey?$b.key.toUpperCase():$b.key.toLowerCase():Pc}})),!((0,Dc.s)(wb.target)&&wb.key!==vc.tW.ESCAPE||(0,vc.Wl)(wb.key)&&(0,Dc._Z)(wb.target)||
(wb.key===vc.tW.QUESTION_MARK&&ja.setState({showHelpDialog:!0}),ja.actionManager.handleKeyDown(wb)||ja.state.viewModeEnabled))){if(wb[vc.tW.CTRL_OR_CMD]&&ja.state.isBindingEnabled&&ja.setState({isBindingEnabled:!1}),wb.code===vc.aU.ZERO){var zb=!ja.state.isLibraryOpen;ja.setState({isLibraryOpen:zb});zb&&(0,Th.L)("library","toggleLibrary (open)","keyboard (".concat(ja.device.isMobile?"mobile":"desktop",")"))}if((0,vc.Wl)(wb.key)){zb=ja.state.gridSize&&(wb.shiftKey?jb.$e:ja.state.gridSize)||(wb.shiftKey?
jb.Iw:jb.$e);var Pb=(0,rd.eD)(ja.scene.getNonDeletedElements(),ja.state,!0),sb=0,Mb=0;wb.key===vc.tW.ARROW_LEFT?sb=-zb:wb.key===vc.tW.ARROW_RIGHT?sb=zb:wb.key===vc.tW.ARROW_UP?Mb=-zb:wb.key===vc.tW.ARROW_DOWN&&(Mb=zb);Pb.forEach(function($b){(0,Lc.DR)($b,{x:$b.x+sb,y:$b.y+Mb});(0,pe.Ww)($b,{simultaneouslyUpdated:Pb})});ja.maybeSuggestBindingForAll(Pb);wb.preventDefault()}else if(wb.key===vc.tW.ENTER)if(zb=(0,rd.eD)(ja.scene.getNonDeletedElements(),ja.state),1===zb.length&&(0,le.bt)(zb[0]))ja.state.editingLinearElement&&
ja.state.editingLinearElement.elementId===zb[0].id||(ja.history.resumeRecording(),ja.setState({editingLinearElement:new ed._(zb[0],ja.scene)}));else{if(1===zb.length&&!(0,le.bt)(zb[0]))return zb=zb[0],ja.startTextEditing({sceneX:zb.x+zb.width/2,sceneY:zb.y+zb.height/2,shouldBind:!0}),void wb.preventDefault()}else wb.ctrlKey||wb.altKey||wb.metaKey||null!==ja.state.draggingElement||((zb=function($b){var Bc=Sj.find(function(Pc,Tc){return $b===(Tc+1).toString()||Pc.key&&("string"==typeof Pc.key?Pc.key===
$b:Pc.key.includes($b))});return(null==Bc?void 0:Bc.value)||null}(wb.key))?(ja.state.activeTool.type!==zb&&(0,Th.L)("toolbar",zb,"keyboard (".concat(ja.device.isMobile?"mobile":"desktop",")")),ja.setActiveTool({type:zb}),wb.stopPropagation()):wb.key===vc.tW.Q&&(ja.toggleLock("keyboard"),wb.stopPropagation()));if(wb.key===vc.tW.SPACE&&0===oi.size&&(Dh=!0,(0,Dc.KJ)(ja.canvas,jb.oc.GRABBING),wb.preventDefault()),!(wb.key!==vc.tW.G&&wb.key!==vc.tW.S||wb.altKey||wb[vc.tW.CTRL_OR_CMD]))if(zb=(0,rd.eD)(ja.scene.getNonDeletedElements(),
ja.state),"selection"!==ja.state.activeTool.type||zb.length)wb.key===vc.tW.G&&((0,rd.$b)(ja.state.activeTool.type)||zb.some(function($b){return(0,rd.$b)($b.type)}))&&(ja.setState({openPopup:"backgroundColorPicker"}),wb.stopPropagation()),wb.key===vc.tW.S&&(ja.setState({openPopup:"strokeColorPicker"}),wb.stopPropagation())}});this.onKeyUp=(0,Dc.tH)(function(wb){if(wb.key===vc.tW.SPACE&&(ja.state.viewModeEnabled?(0,Dc.KJ)(ja.canvas,jb.oc.GRAB):"selection"===ja.state.activeTool.type?(0,Dc.z8)(ja.canvas):
((0,Dc.Uk)(ja.canvas,ja.state),ja.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})),Dh=!1),wb[vc.tW.CTRL_OR_CMD]||ja.state.isBindingEnabled||ja.setState({isBindingEnabled:!0}),(0,vc.Wl)(wb.key))wb=(0,rd.eD)(ja.scene.getNonDeletedElements(),ja.state),(0,pe.N1)(ja.state)?(0,pe.el)(wb):(0,pe.H)(wb),ja.setState({suggestedBindings:[]})});this.setActiveTool=function(wb){wb=(0,Dc.Om)(ja.state,wb);Dh||(0,Dc.Uk)(ja.canvas,ja.state);(0,Dc.wO)(document.activeElement)&&ja.focusContainer();
(0,le.dt)(wb.type)||ja.setState({suggestedBindings:[]});"image"===wb.type&&ja.onImageAction();"selection"!==wb.type?ja.setState({activeTool:wb,selectedElementIds:{},selectedGroupIds:{},editingGroupId:null}):ja.setState({activeTool:wb})};this.setCursor=function(wb){(0,Dc.KJ)(ja.canvas,wb)};this.resetCursor=function(){(0,Dc.z8)(ja.canvas)};this.isTouchScreenMultiTouchGesture=function(){return 2<=oi.size};this.onGestureStart=(0,Dc.tH)(function(wb){wb.preventDefault();ja.isTouchScreenMultiTouchGesture()&&
ja.setState({selectedElementIds:{}});Qg=ja.state.zoom.value});this.onGestureChange=(0,Dc.tH)(function(wb){if(wb.preventDefault(),!ja.isTouchScreenMultiTouchGesture()){var zb=Qg;zb&&ja.setState(function(Pb){return pc({},(0,fi.E)({viewportX:Dg,viewportY:Xj,nextZoom:(0,rd.j)(zb*wb.scale)},Pb))})}});this.onGestureEnd=(0,Dc.tH)(function(wb){wb.preventDefault();ja.isTouchScreenMultiTouchGesture()&&ja.setState({previousSelectedElementIds:{},selectedElementIds:ja.state.previousSelectedElementIds});Qg=null});
this.startTextEditing=function(wb){var zb,Pb,sb,Mb,$b=wb.sceneX,Bc=wb.sceneY,Pc=wb.shouldBind;wb=wb.insertAtParentCenter;wb=(void 0===wb||wb)&&ja.getTextWysiwygSnappedToCenterPosition($b,Bc,ja.state,ja.canvas,window.devicePixelRatio);var Tc=null,wd=null,Rd=(0,rd.eD)(ja.scene.getNonDeletedElements(),ja.state);if(Tc=1===Rd.length?(0,Sb.iB)(Rd[0])?Rd[0]:(0,le.mG)(Rd[0],!1)?(0,gd.WJ)(Rd[0]):ja.getTextElementAtPosition($b,Bc):ja.getTextElementAtPosition($b,Bc),wd||Tc||!Pc&&!wb||(wd=(0,rd.OW)(ja.scene.getNonDeletedElements().filter(function(Gd){return(0,le.mG)(Gd,
!1)&&!(0,gd.WJ)(Gd)}),$b,Bc)),!Tc&&wd)Bc={fontSize:ja.state.currentItemFontSize,fontFamily:ja.state.currentItemFontFamily},$b=(0,gd.AT)((0,Dc.mO)(Bc)),Bc=(0,gd.w_)((0,Dc.mO)(Bc)),Bc=Math.max(wd.height,Bc),$b=Math.max(wd.width,$b),(0,Lc.DR)(wd,{height:Bc,width:$b}),$b=wd.x+$b/2,Bc=wd.y+Bc/2,wb&&=ja.getTextWysiwygSnappedToCenterPosition($b,Bc,ja.state,ja.canvas,window.devicePixelRatio);$b=Tc||(0,Sb.VL)({x:wb?wb.elementCenterX:$b,y:wb?wb.elementCenterY:Bc,strokeColor:ja.state.currentItemStrokeColor,
backgroundColor:ja.state.currentItemBackgroundColor,fillStyle:ja.state.currentItemFillStyle,strokeWidth:ja.state.currentItemStrokeWidth,strokeStyle:ja.state.currentItemStrokeStyle,roughness:ja.state.currentItemRoughness,opacity:ja.state.currentItemOpacity,strokeSharpness:ja.state.currentItemStrokeSharpness,text:"",fontSize:ja.state.currentItemFontSize,fontFamily:ja.state.currentItemFontFamily,textAlign:wb?"center":ja.state.currentItemTextAlign,verticalAlign:wb?jb.oX.MIDDLE:jb.hs,containerId:null!==
(zb=null===(Pb=wd)||void 0===Pb?void 0:Pb.id)&&void 0!==zb?zb:void 0,groupIds:null!==(sb=null===(Mb=wd)||void 0===Mb?void 0:Mb.groupIds)&&void 0!==sb?sb:[],locked:!1});ja.setState({editingElement:$b});Tc||(ja.scene.replaceAllElements([].concat((0,ud.Z)(ja.scene.getElementsIncludingDeleted()),[$b])),wb||(0,Lc.DR)($b,{y:$b.y-$b.baseline/2}));ja.setState({editingElement:$b});ja.handleTextWysiwyg($b,{isExistingElement:!!Tc})};this.handleCanvasDoubleClick=function(wb){if(!ja.state.multiElement&&"selection"===
ja.state.activeTool.type){var zb=(0,rd.eD)(ja.scene.getNonDeletedElements(),ja.state);if(1===zb.length&&(0,le.bt)(zb[0]))ja.state.editingLinearElement&&ja.state.editingLinearElement.elementId===zb[0].id||(ja.history.resumeRecording(),ja.setState({editingLinearElement:new ed._(zb[0],ja.scene)}));else{(0,Dc.z8)(ja.canvas);var Pb=(0,Dc.dE)(wb,ja.state);zb=Pb.x;Pb=Pb.y;if(0<(0,Ub.iJ)(ja.state).length){var sb=ja.getElementAtPosition(zb,Pb),Mb=sb&&(0,Ub.YS)(sb,ja.state.selectedGroupIds);if(Mb)return void ja.setState(function(Bc){return(0,Ub.bO)(pc(pc({},
Bc),{},{editingGroupId:Mb,selectedElementIds:(0,ld.Z)({},sb.id,!0),selectedGroupIds:{}}),ja.scene.getNonDeletedElements())})}if((0,Dc.z8)(ja.canvas),!wb[vc.tW.CTRL_OR_CMD]&&!ja.state.viewModeEnabled){var $b=(0,rd.eD)(ja.scene.getNonDeletedElements(),ja.state);1===$b.length&&($b=$b[0],(0,le.Xo)($b)&&(zb=$b.x+$b.width/2,Pb=$b.y+$b.height/2));ja.startTextEditing({sceneX:zb,sceneY:Pb,shouldBind:!1,insertAtParentCenter:!wb.altKey})}}}};this.getElementLinkAtPosition=function(wb,zb){var Pb=1/0;return ja.scene.getNonDeletedElements().slice().reverse().find(function(sb,
Mb){return zb&&sb.id===zb.id&&(Pb=Mb),sb.link&&Mb<=Pb&&(0,Eh.wq)(sb,ja.state,[wb.x,wb.y],ja.device.isMobile)})};this.redirectToLink=function(wb,zb){var Pb=(0,Xd.LW)(ja.lastPointerDown.clientX,ja.lastPointerDown.clientY,ja.lastPointerUp.clientX,ja.lastPointerUp.clientY);if(!(!ja.hitLinkElement||zb&&Pb>jb.f||!zb&&0!==Pb)&&(zb=(0,Dc.dE)(ja.lastPointerDown,ja.state),zb=(0,Eh.wq)(ja.hitLinkElement,ja.state,[zb.x,zb.y],ja.device.isMobile),Pb=(0,Dc.dE)(ja.lastPointerUp,ja.state),Pb=(0,Eh.wq)(ja.hitLinkElement,
ja.state,[Pb.x,Pb.y],ja.device.isMobile),zb&&Pb)){var sb,Mb;(zb=ja.hitLinkElement.link)&&(ja.props.onLinkOpen&&(Mb=(0,Dc.ag)(jb.Ks.EXCALIDRAW_LINK,wb.nativeEvent),ja.props.onLinkOpen(ja.hitLinkElement,Mb)),null===(sb=Mb)||void 0===sb||!sb.defaultPrevented)&&(wb=(0,Eh.q$)(zb)?"_self":"_blank",(wb=window.open(void 0,wb))&&(wb.opener=null,wb.location=(0,Eh.$u)(zb)))}};this.handleCanvasPointerMove=function(wb){ja.savePointer(wb.clientX,wb.clientY,ja.state.cursorButton);oi.has(wb.pointerId)&&oi.set(wb.pointerId,
{x:wb.clientX,y:wb.clientY});var zb=Qg;if(2===oi.size&&nh&&zb&&ig){var Pb=Yk(oi),sb=Pb.x-nh.x,Mb=Pb.y-nh.y;nh=Pb;var $b=bk(Array.from(oi.values())),Bc=($b="freedraw"===ja.state.activeTool.type&&ja.state.penMode?1:$b/ig)?(0,rd.j)(zb*$b):ja.state.zoom.value;ja.setState(function(Cd){Cd=(0,fi.E)({viewportX:Pb.x,viewportY:Pb.y,nextZoom:Bc},Cd);return{zoom:Cd.zoom,scrollX:Cd.scrollX+sb/Bc,scrollY:Cd.scrollY+Mb/Bc,shouldCacheIgnoreZoom:!0}});ja.resetShouldCacheIgnoreZoomDebounced()}else nh=ig=Qg=null;if(!(Dh||
$i||tg)){var Pc=(0,rd._4)(Oi,wb.clientX-ja.state.offsetLeft,wb.clientY-ja.state.offsetTop).isOverEither;ja.state.draggingElement||ja.state.multiElement||(Pc?(0,Dc.z8)(ja.canvas):(0,Dc.Uk)(ja.canvas,ja.state));var Tc=(0,Dc.dE)(wb,ja.state);zb=Tc.x;$b=Tc.y;if(ja.state.editingLinearElement&&!ja.state.editingLinearElement.isDragging){var wd=ed._.handlePointerMove(wb,zb,$b,ja.state.editingLinearElement,ja.state.gridSize);wd!==ja.state.editingLinearElement&&ja.setState({editingLinearElement:wd});null!=
wd.lastUncommittedPoint?ja.maybeSuggestBindingAtCursor(Tc):ja.setState({suggestedBindings:[]})}(0,le.Lx)(ja.state.activeTool.type)&&(wd=ja.state.draggingElement,(0,le.Mn)(wd,!1)?ja.maybeSuggestBindingsForLinearElementAtCoords(wd,[Tc],ja.state.startBoundElement):ja.maybeSuggestBindingAtCursor(Tc));if(ja.state.multiElement){wb=ja.state.multiElement;Tc=wb.x;Pc=wb.y;wd=wb.points;var Rd=wb.lastCommittedPoint,Gd=wd[wd.length-1];return(0,Dc.Uk)(ja.canvas,ja.state),void(Gd===Rd?(0,Xd.LW)(zb-Tc,$b-Pc,Gd[0],
Gd[1])>=jb.qx?(0,Lc.DR)(wb,{points:[].concat((0,ud.Z)(wd),[[zb-Tc,$b-Pc]])}):(0,Dc.KJ)(ja.canvas,jb.oc.POINTER):2<wd.length&&Rd&&(0,Xd.LW)(zb-Tc,$b-Pc,Rd[0],Rd[1])<jb.qx?((0,Dc.KJ)(ja.canvas,jb.oc.POINTER),(0,Lc.DR)(wb,{points:wd.slice(0,-1)})):((0,Xd.g6)(wd,ja.state.zoom.value)&&(0,Dc.KJ)(ja.canvas,jb.oc.POINTER),(0,Lc.DR)(wb,{points:[].concat((0,ud.Z)(wd.slice(0,-1)),[[zb-Tc,$b-Pc]])})))}if(!(wb.buttons||"selection"!==ja.state.activeTool.type&&"text"!==ja.state.activeTool.type&&"eraser"!==ja.state.activeTool.type)){Rd=
ja.scene.getNonDeletedElements();wd=(0,rd.eD)(Rd,ja.state);if(1!==wd.length||Pc||ja.state.editingLinearElement){if(1<wd.length&&!Pc&&(zb=(0,Sb.n2)((0,Sb.KP)(wd),zb,$b,ja.state.zoom,wb.pointerType)))return void(0,Dc.KJ)(ja.canvas,(0,Sb.Un)({transformHandleType:zb}))}else if((zb=(0,Sb.jt)(Rd,ja.state,zb,$b,ja.state.zoom,wb.pointerType))&&zb.transformHandleType)return void(0,Dc.KJ)(ja.canvas,(0,Sb.Un)(zb));zb=ja.getElementAtPosition(Tc.x,Tc.y);(ja.hitLinkElement=ja.getElementLinkAtPosition(Tc,zb),(0,Kh.EN)(ja.state))||
(ja.hitLinkElement&&!ja.state.selectedElementIds[ja.hitLinkElement.id]?((0,Dc.KJ)(ja.canvas,jb.oc.POINTER),(0,Eh.Pp)(ja.hitLinkElement,ja.state)):((0,Eh.lV)(),zb&&zb.link&&ja.state.selectedElementIds[zb.id]&&!ja.contextMenuOpen&&!ja.state.showHyperlinkPopup)?ja.setState({showHyperlinkPopup:"info"}):"text"===ja.state.activeTool.type?(0,Dc.KJ)(ja.canvas,(0,Sb.iB)(zb)?jb.oc.TEXT:jb.oc.CROSSHAIR):ja.state.viewModeEnabled?(0,Dc.KJ)(ja.canvas,jb.oc.GRAB):Pc?(0,Dc.KJ)(ja.canvas,jb.oc.AUTO):ja.state.editingLinearElement?
(wb=ed._.getElement(ja.state.editingLinearElement.elementId))&&(0,qk.Qu)(wb,ja.state,[Tc.x,Tc.y])?(0,Dc.KJ)(ja.canvas,jb.oc.MOVE):(0,Dc.KJ)(ja.canvas,jb.oc.AUTO):wb[vc.tW.CTRL_OR_CMD]||!zb&&!ja.isHittingCommonBoundingBoxOfSelectedElements(Tc,wd)||null!=zb&&zb.locked?(0,Dc.KJ)(ja.canvas,jb.oc.AUTO):(0,Dc.KJ)(ja.canvas,jb.oc.MOVE))}}};this.handleEraser=function(wb,zb,Pb){for(var sb=function(Gd){Gd.forEach(function(Cd){Cd.locked||(Mb.push(Cd.id),wb.altKey?zb.elementIdsToErase[Cd.id]&&zb.elementIdsToErase[Cd.id].erase&&
(zb.elementIdsToErase[Cd.id].erase=!1):zb.elementIdsToErase[Cd.id]||(zb.elementIdsToErase[Cd.id]={erase:!0,opacity:Cd.opacity}))})},Mb=[],$b=(0,Xd.LW)(zb.lastCoords.x,zb.lastCoords.y,Pb.x,Pb.y),Bc=10/ja.state.zoom.value,Pc=pc({},zb.lastCoords),Tc=0;Tc<=$b&&(sb(ja.getElementsAtPosition(Pc.x,Pc.y)),Tc!==$b);){var wd=(Tc=Math.min(Tc+Bc,$b))/$b,Rd=(1-wd)*Pc.y+wd*Pb.y;Pc.x=(1-wd)*Pc.x+wd*Pb.x;Pc.y=Rd}sb=ja.scene.getElementsIncludingDeleted().map(function(Gd){var Cd=(0,le.Xh)(Gd)&&Mb.includes(Gd.containerId)?
Gd.containerId:Gd.id;if(Mb.includes(Cd)){if(!wb.altKey)return(0,Lc.BE)(Gd,{opacity:jb.xY});if(zb.elementIdsToErase[Cd]&&!1===zb.elementIdsToErase[Cd].erase)return(0,Lc.BE)(Gd,{opacity:zb.elementIdsToErase[Cd].opacity})}return Gd});ja.scene.replaceAllElements(sb);zb.lastCoords.x=Pb.x;zb.lastCoords.y=Pb.y};this.handleTouchMove=function(wb){Ig=!0};this.handleCanvasPointerDown=function(wb){var zb,Pb,sb=document.getSelection();if(null!=sb&&sb.anchorNode&&sb.removeAllRanges(),ja.maybeOpenContextMenuAfterPointerDownOnTouchDevices(wb),
ja.maybeCleanupAfterMissingPointerUp(wb),ja.state.penDetected||"pen"!==wb.pointerType||ja.setState(function($b){return{penMode:!0,penDetected:!0}}),!ja.device.isTouchScreen&&["pen","touch"].includes(wb.pointerType)&&(ja.device=(0,Dc.v4)(ja.device,{isTouchScreen:!0})),!($i||(ja.lastPointerDown=wb,ja.setState({lastPointerDownWith:wb.pointerType,cursorButton:"down"}),ja.savePointer(wb.clientX,wb.clientY,"down"),ja.updateGestureOnPointerDown(wb),ja.handleCanvasPanUsingWheelOrSpaceDrag(wb)||wb.button!==
jb.Oh.MAIN&&wb.button!==jb.Oh.TOUCH||1<oi.size)))if(sb=ja.initialPointerDownState(wb),!(ja.handleDraggingScrollBar(wb,sb)||(ja.contextMenuOpen=!1,ja.clearSelectionIfNotUsingSelection(),ja.updateBindingEnabledOnPointerMove(wb),ja.handleSelectionOnPointerDown(wb,sb))||ja.state.penMode&&"touch"===wb.pointerType&&"selection"!==ja.state.activeTool.type&&"text"!==ja.state.activeTool.type&&"image"!==ja.state.activeTool.type))if("text"!==ja.state.activeTool.type){if("arrow"===ja.state.activeTool.type||"line"===
ja.state.activeTool.type)ja.handleLinearElementOnPointerDown(wb,ja.state.activeTool.type,sb);else if("image"===ja.state.activeTool.type){(0,Dc.KJ)(ja.canvas,jb.oc.CROSSHAIR);var Mb=ja.state.pendingImageElementId&&ja.scene.getElement(ja.state.pendingImageElementId);if(!Mb)return;ja.setState({draggingElement:Mb,editingElement:Mb,pendingImageElementId:null,multiElement:null});wb=(0,Dc.dE)(wb,ja.state);(0,Lc.DR)(Mb,{x:wb.x,y:wb.y})}else"freedraw"===ja.state.activeTool.type?ja.handleFreeDrawElementOnPointerDown(wb,
ja.state.activeTool.type,sb):"custom"===ja.state.activeTool.type?(0,Dc.KJ)(ja.canvas,jb.oc.AUTO):"eraser"!==ja.state.activeTool.type&&ja.createGenericElementOnPointerDown(ja.state.activeTool.type,sb);null===(zb=ja.props)||void 0===zb||null===(Pb=zb.onPointerDown)||void 0===Pb||Pb.call(zb,ja.state.activeTool,sb);zb=ja.onPointerMoveFromPointerDownHandler(sb);Pb=ja.onPointerUpFromPointerDownHandler(sb);wb=ja.onKeyDownFromPointerDownHandler(sb);Mb=ja.onKeyUpFromPointerDownHandler(sb);jj=Pb;ja.state.viewModeEnabled||
(window.addEventListener(jb.Ks.POINTER_MOVE,zb),window.addEventListener(jb.Ks.POINTER_UP,Pb),window.addEventListener(jb.Ks.KEYDOWN,wb),window.addEventListener(jb.Ks.KEYUP,Mb),sb.eventListeners.onMove=zb,sb.eventListeners.onUp=Pb,sb.eventListeners.onKeyUp=Mb,sb.eventListeners.onKeyDown=wb)}else ja.handleTextOnPointerDown(wb,sb)};this.handleCanvasPointerUp=function(wb){if(ja.lastPointerUp=wb,ja.device.isTouchScreen){var zb=(0,Dc.dE)({clientX:wb.clientX,clientY:wb.clientY},ja.state),Pb=ja.getElementAtPosition(zb.x,
zb.y);ja.hitLinkElement=ja.getElementLinkAtPosition(zb,Pb)}ja.hitLinkElement&&!ja.state.selectedElementIds[ja.hitLinkElement.id]&&ja.redirectToLink(wb,ja.device.isTouchScreen);ja.removePointer(wb)};this.maybeOpenContextMenuAfterPointerDownOnTouchDevices=function(wb){"touch"===wb.pointerType&&(Ig=!1,Sf?Ig=!0:Sf=window.setTimeout(function(){Sf=0;Ig||ja.handleCanvasContextMenu(wb)},jb.nM))};this.resetContextMenuTimer=function(){clearTimeout(Sf);Sf=0;Ig=!1};this.handleCanvasPanUsingWheelOrSpaceDrag=function(wb){if(!(1>=
oi.size&&(wb.button===jb.Oh.WHEEL||wb.button===jb.Oh.MAIN&&Dh||ja.state.viewModeEnabled))||(0,Sb.iB)(ja.state.editingElement))return!1;$i=!0;wb.preventDefault();var zb=!1,Pb=/Linux/.test(window.navigator.platform);(0,Dc.KJ)(ja.canvas,jb.oc.GRABBING);var sb=wb.clientX,Mb=wb.clientY,$b=(0,Dc.$9)(function(Pc){var Tc=sb-Pc.clientX,wd=Mb-Pc.clientY;if(sb=Pc.clientX,Mb=Pc.clientY,Pb&&!zb&&(1<Math.abs(Tc)||1<Math.abs(wd))){zb=!0;var Rd=function Id(Cd){document.body.removeEventListener(jb.Ks.PASTE,Id);Cd.stopPropagation()};
document.body.addEventListener(jb.Ks.PASTE,Rd);window.addEventListener(jb.Ks.POINTER_UP,function Id(){setTimeout(function(){document.body.removeEventListener(jb.Ks.PASTE,Rd);window.removeEventListener(jb.Ks.POINTER_UP,Id)},100)})}ja.setState({scrollX:ja.state.scrollX-Tc/ja.state.zoom.value,scrollY:ja.state.scrollY-wd/ja.state.zoom.value})}),Bc=(0,Dc.tH)(jj=function(){jj=null;$i=!1;Dh||(ja.state.viewModeEnabled?(0,Dc.KJ)(ja.canvas,jb.oc.GRAB):(0,Dc.Uk)(ja.canvas,ja.state));ja.setState({cursorButton:"up"});
ja.savePointer(wb.clientX,wb.clientY,"up");window.removeEventListener(jb.Ks.POINTER_MOVE,$b);window.removeEventListener(jb.Ks.POINTER_UP,Bc);window.removeEventListener(jb.Ks.BLUR,Bc);$b.flush()});return window.addEventListener(jb.Ks.BLUR,Bc),window.addEventListener(jb.Ks.POINTER_MOVE,$b,{passive:!0}),window.addEventListener(jb.Ks.POINTER_UP,Bc),!0};this.clearSelectionIfNotUsingSelection=function(){"selection"!==ja.state.activeTool.type&&ja.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})};
this.handleSelectionOnPointerDown=function(wb,zb){if("selection"===ja.state.activeTool.type){var Pb=ja.scene.getNonDeletedElements(),sb=(0,rd.eD)(Pb,ja.state);1!==sb.length||ja.state.editingLinearElement?1<sb.length&&(zb.resize.handleType=(0,Sb.n2)((0,Sb.KP)(sb),zb.origin.x,zb.origin.y,ja.state.zoom,wb.pointerType)):(Pb=(0,Sb.jt)(Pb,ja.state,zb.origin.x,zb.origin.y,ja.state.zoom,wb.pointerType),null!=Pb&&(ja.setState({resizingElement:Pb.element}),zb.resize.handleType=Pb.transformHandleType));if(zb.resize.handleType)(0,Dc.KJ)(ja.canvas,
(0,Sb.Un)({transformHandleType:zb.resize.handleType})),zb.resize.isResizing=!0,zb.resize.offset=(0,Dc.AK)((0,Sb.xx)(zb.resize.handleType,sb,zb.origin.x,zb.origin.y)),1===sb.length&&(0,le.bt)(sb[0])&&2===sb[0].points.length&&(zb.resize.arrowDirection=(0,Sb.T)(zb.resize.handleType,sb[0]));else{var Mb;if(ja.state.editingLinearElement&&(sb=ed._.handlePointerDown(wb,ja.state,function(Bc){return ja.setState(Bc)},ja.history,zb.origin),sb.hitElement&&(zb.hit.element=sb.hitElement),sb.didAddPoint))return!0;
if(zb.hit.element=null!==(Mb=zb.hit.element)&&void 0!==Mb?Mb:ja.getElementAtPosition(zb.origin.x,zb.origin.y),zb.hit.element){if((0,Eh.wq)(zb.hit.element,ja.state,[zb.origin.x,zb.origin.y],ja.device.isMobile))return!1;zb.hit.hasHitElementInside=(0,qk.Qu)(zb.hit.element,ja.state,[zb.origin.x,zb.origin.y])}zb.hit.allHitElements=ja.getElementsAtPosition(zb.origin.x,zb.origin.y);var $b=zb.hit.element;Mb=zb.hit.allHitElements.some(function(Bc){return ja.isASelectedElement(Bc)});if(null!==$b&&Mb||wb.shiftKey||
zb.hit.hasHitCommonBoundingBoxOfSelectedElements||ja.clearSelection($b),ja.state.editingLinearElement)ja.setState({selectedElementIds:(0,ld.Z)({},ja.state.editingLinearElement.elementId,!0)});else if(null!=$b){if(wb[vc.tW.CTRL_OR_CMD])return ja.state.selectedElementIds[$b.id]||(zb.hit.wasAddedToSelection=!0),ja.setState(function(Bc){return pc(pc({},(0,Ub.iE)(Bc,$b)),{},{previousSelectedElementIds:ja.state.selectedElementIds})}),!1;ja.state.selectedElementIds[$b.id]||(ja.state.editingGroupId&&!(0,Ub.Nd)($b,
ja.state.editingGroupId)&&ja.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null}),Mb||zb.hit.hasHitCommonBoundingBoxOfSelectedElements||(ja.setState(function(Bc){return(0,Ub.bO)(pc(pc({},Bc),{},{selectedElementIds:pc(pc({},Bc.selectedElementIds),{},(0,ld.Z)({},$b.id,!0)),showHyperlinkPopup:!!$b.link&&"info"}),ja.scene.getNonDeletedElements())}),zb.hit.wasAddedToSelection=!0))}ja.setState({previousSelectedElementIds:ja.state.selectedElementIds})}}return!1};this.handleTextOnPointerDown=
function(wb,zb){if(!(0,Sb.iB)(ja.state.editingElement)){var Pb=zb.origin.x;zb=zb.origin.y;var sb=ja.getElementAtPosition(Pb,zb,{includeBoundTextElement:!0});(0,le.Xo)(sb)&&(Pb=sb.x+sb.width/2,zb=sb.y+sb.height/2);ja.startTextEditing({sceneX:Pb,sceneY:zb,shouldBind:!1,insertAtParentCenter:!wb.altKey});(0,Dc.z8)(ja.canvas);ja.state.activeTool.locked||ja.setState({activeTool:(0,Dc.Om)(ja.state,{type:"selection"})})}};this.handleFreeDrawElementOnPointerDown=function(wb,zb,Pb){var sb=(0,Xd.wC)(Pb.origin.x,
Pb.origin.y,null);sb=(0,Yd.Z)(sb,2);var Mb=(0,yi.KE)({type:zb,x:sb[0],y:sb[1],strokeColor:ja.state.currentItemStrokeColor,backgroundColor:ja.state.currentItemBackgroundColor,fillStyle:ja.state.currentItemFillStyle,strokeWidth:ja.state.currentItemStrokeWidth,strokeStyle:ja.state.currentItemStrokeStyle,roughness:ja.state.currentItemRoughness,opacity:ja.state.currentItemOpacity,strokeSharpness:ja.state.currentItemLinearStrokeSharpness,simulatePressure:.5===wb.pressure,locked:!1});ja.setState(function($b){return{selectedElementIds:pc(pc({},
$b.selectedElementIds),{},(0,ld.Z)({},Mb.id,!1))}});wb=Mb.simulatePressure?Mb.pressures:[].concat((0,ud.Z)(Mb.pressures),[wb.pressure]);(0,Lc.DR)(Mb,{points:[[0,0]],pressures:wb});Pb=(0,pe.Y9)(Pb.origin,ja.scene);ja.scene.replaceAllElements([].concat((0,ud.Z)(ja.scene.getElementsIncludingDeleted()),[Mb]));ja.setState({draggingElement:Mb,editingElement:Mb,startBoundElement:Pb,suggestedBindings:[]})};this.createImageElement=function(wb){wb=(0,Xd.wC)(wb.sceneX,wb.sceneY,ja.state.gridSize);wb=(0,Yd.Z)(wb,
2);return(0,Sb.vw)({type:"image",x:wb[0],y:wb[1],strokeColor:ja.state.currentItemStrokeColor,backgroundColor:ja.state.currentItemBackgroundColor,fillStyle:ja.state.currentItemFillStyle,strokeWidth:ja.state.currentItemStrokeWidth,strokeStyle:ja.state.currentItemStrokeStyle,roughness:ja.state.currentItemRoughness,opacity:ja.state.currentItemOpacity,strokeSharpness:ja.state.currentItemLinearStrokeSharpness,locked:!1})};this.handleLinearElementOnPointerDown=function(wb,zb,Pb){if(ja.state.multiElement){var sb=
ja.state.multiElement;if("line"===sb.type&&(0,Xd.g6)(sb.points,ja.state.zoom.value))return(0,Lc.DR)(sb,{lastCommittedPoint:sb.points[sb.points.length-1]}),void ja.actionManager.executeAction(Xe);zb=sb.x;wb=sb.y;var Mb=sb.lastCommittedPoint;if(1<sb.points.length&&Mb&&(0,Xd.LW)(Pb.origin.x-zb,Pb.origin.y-wb,Mb[0],Mb[1])<jb.qx)return void ja.actionManager.executeAction(Xe);ja.setState(function(Tc){return{selectedElementIds:pc(pc({},Tc.selectedElementIds),{},(0,ld.Z)({},sb.id,!0))}});(0,Lc.DR)(sb,{lastCommittedPoint:sb.points[sb.points.length-
1]});(0,Dc.KJ)(ja.canvas,jb.oc.POINTER)}else{wb=(0,Xd.wC)(Pb.origin.x,Pb.origin.y,ja.state.gridSize);Mb=(0,Yd.Z)(wb,2);wb=Mb[0];Mb=Mb[1];var $b=ja.state,Bc=$b.currentItemStartArrowhead;$b=$b.currentItemEndArrowhead;Bc=(0,Yd.Z)("arrow"===zb?[Bc,$b]:[null,null],2);var Pc=(0,Sb.y8)({type:zb,x:wb,y:Mb,strokeColor:ja.state.currentItemStrokeColor,backgroundColor:ja.state.currentItemBackgroundColor,fillStyle:ja.state.currentItemFillStyle,strokeWidth:ja.state.currentItemStrokeWidth,strokeStyle:ja.state.currentItemStrokeStyle,
roughness:ja.state.currentItemRoughness,opacity:ja.state.currentItemOpacity,strokeSharpness:ja.state.currentItemLinearStrokeSharpness,startArrowhead:Bc[0],endArrowhead:Bc[1],locked:!1});ja.setState(function(Tc){return{selectedElementIds:pc(pc({},Tc.selectedElementIds),{},(0,ld.Z)({},Pc.id,!1))}});(0,Lc.DR)(Pc,{points:[].concat((0,ud.Z)(Pc.points),[[0,0]])});Pb=(0,pe.Y9)(Pb.origin,ja.scene);ja.scene.replaceAllElements([].concat((0,ud.Z)(ja.scene.getElementsIncludingDeleted()),[Pc]));ja.setState({draggingElement:Pc,
editingElement:Pc,startBoundElement:Pb,suggestedBindings:[]})}};this.createGenericElementOnPointerDown=function(wb,zb){zb=(0,Xd.wC)(zb.origin.x,zb.origin.y,ja.state.gridSize);zb=(0,Yd.Z)(zb,2);wb=(0,Sb.Up)({type:wb,x:zb[0],y:zb[1],strokeColor:ja.state.currentItemStrokeColor,backgroundColor:ja.state.currentItemBackgroundColor,fillStyle:ja.state.currentItemFillStyle,strokeWidth:ja.state.currentItemStrokeWidth,strokeStyle:ja.state.currentItemStrokeStyle,roughness:ja.state.currentItemRoughness,opacity:ja.state.currentItemOpacity,
strokeSharpness:ja.state.currentItemStrokeSharpness,locked:!1});"selection"===wb.type?ja.setState({selectionElement:wb,draggingElement:wb}):(ja.scene.replaceAllElements([].concat((0,ud.Z)(ja.scene.getElementsIncludingDeleted()),[wb])),ja.setState({multiElement:null,draggingElement:wb,editingElement:wb}))};this.restoreReadyToEraseElements=function(wb){var zb=ja.scene.getElementsIncludingDeleted().map(function(Pb){return wb.elementIdsToErase[Pb.id]&&wb.elementIdsToErase[Pb.id].erase?(0,Lc.BE)(Pb,{opacity:wb.elementIdsToErase[Pb.id].opacity}):
(0,le.Xh)(Pb)&&wb.elementIdsToErase[Pb.containerId]&&wb.elementIdsToErase[Pb.containerId].erase?(0,Lc.BE)(Pb,{opacity:wb.elementIdsToErase[Pb.containerId].opacity}):Pb});ja.scene.replaceAllElements(zb)};this.eraseElements=function(wb){var zb=ja.scene.getElementsIncludingDeleted().map(function(Pb){return wb.elementIdsToErase[Pb.id]&&wb.elementIdsToErase[Pb.id].erase||(0,le.Xh)(Pb)&&wb.elementIdsToErase[Pb.containerId]&&wb.elementIdsToErase[Pb.containerId].erase?(0,Lc.BE)(Pb,{isDeleted:!0}):Pb});ja.history.resumeRecording();
ja.scene.replaceAllElements(zb)};this.initializeImage=function(){var wb=(0,Qd.Z)(uc().mark(function sb(Pb){var Mb,$b,Bc,Pc,Tc,wd,Rd,Gd,Cd,Id,xe,Tf,se,$e,Pe;return uc().wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:if(Pc=Pb.imageFile,Tc=Pb.imageElement,wd=Pb.showCursorImagePreview,Rd=void 0!==wd&&wd,(0,sa.Wr)(Pc)){Re.next=3;break}throw Error((0,qc.t)("errors.unsupportedFileType"));case 3:if(Gd=Pc.type,(0,Dc.KJ)(ja.canvas,"wait"),Gd!==jb.LO.svg){Re.next=23;break}return Re.prev=6,Re.t0=sa.Pn,
Re.t1=sj.bp,Re.next=11,Pc.text();case 11:return Re.t2=Re.sent,Re.next=14,(0,Re.t1)(Re.t2);case 14:Re.t3=Re.sent;Re.t4=Pc.name;Pc=(0,Re.t0)(Re.t3,Re.t4);Re.next=23;break;case 19:throw Re.prev=19,Re.t5=Re.catch(6),console.warn(Re.t5),Error((0,qc.t)("errors.svgImageInsertError"));case 23:return Re.next=25,(null===(Mb=($b=ja.props).generateIdForFile)||void 0===Mb?void 0:Mb.call($b,Pc))||(0,sa.tW)(Pc);case 25:if(Cd=Re.sent){Re.next=29;break}throw console.warn("Couldn't generate file id or the supplied `generateIdForFile` didn't resolve to one."),
Error((0,qc.t)("errors.imageInsertError"));case 29:if(null!=(Id=ja.files[Cd])&&Id.dataURL){Re.next=42;break}return Re.prev=31,Re.next=34,(0,sa.Tu)(Pc,{maxWidthOrHeight:jb.h6});case 34:Pc=Re.sent;Re.next=40;break;case 37:Re.prev=37,Re.t6=Re.catch(31),console.error("error trying to resing image file on insertion",Re.t6);case 40:if(!(Pc.size>jb.$n)){Re.next=42;break}throw Error((0,qc.t)("errors.fileTooBig",{maxSize:"".concat(Math.trunc(jb.$n/1024/1024),"MB")}));case 42:if(Rd&&(Tf=null===(xe=ja.files[Cd])||
void 0===xe?void 0:xe.dataURL,se=Tf&&(0,sa.KG)(Tf),ja.setImagePreviewCursor(se||Pc)),Re.t7=null===(Bc=ja.files[Cd])||void 0===Bc?void 0:Bc.dataURL,Re.t7){Re.next=48;break}return Re.next=47,(0,sa.Sf)(Pc);case 47:Re.t7=Re.sent;case 48:return $e=Re.t7,Pe=(0,Lc.DR)(Tc,{fileId:Cd},!1),Re.abrupt("return",new Promise(function(){var ng=(0,Qd.Z)(uc().mark(function gg(Ni,Pf){var mh,Og;return uc().wrap(function(Lg){for(;;)switch(Lg.prev=Lg.next){case 0:if(Lg.prev=0,ja.files=pc(pc({},ja.files),{},(0,ld.Z)({},
Cd,{mimeType:Gd,id:Cd,dataURL:$e,created:Date.now()})),Og=ja.imageCache.get(Cd)){Lg.next=7;break}return ja.addNewImagesToImageCache(),Lg.next=7,ja.updateImageCache([Pe]);case 7:if(!((null==Og?void 0:Og.image)instanceof Promise)){Lg.next=10;break}return Lg.next=10,Og.image;case 10:ja.state.pendingImageElementId!==Pe.id&&(null===(mh=ja.state.draggingElement)||void 0===mh?void 0:mh.id)!==Pe.id&&ja.initializeImageDimensions(Pe,!0);Ni(Pe);Lg.next=18;break;case 14:Lg.prev=14,Lg.t0=Lg.catch(0),console.error(Lg.t0),
Pf(Error((0,qc.t)("errors.imageInsertError")));case 18:return Lg.prev=18,Rd||(0,Dc.z8)(ja.canvas),Lg.finish(18);case 21:case "end":return Lg.stop()}},gg,null,[[0,14,18,21]])}));return function(Ni,Pf){return ng.apply(this,arguments)}}()));case 51:case "end":return Re.stop()}},sb,null,[[6,19],[31,37]])}));return function(Pb){return wb.apply(this,arguments)}}();this.insertImageElement=function(){var wb=(0,Qd.Z)(uc().mark(function $b(Pb,sb,Mb){return uc().wrap(function(Bc){for(;;)switch(Bc.prev=Bc.next){case 0:return ja.scene.replaceAllElements([].concat((0,ud.Z)(ja.scene.getElementsIncludingDeleted()),
[Pb])),Bc.prev=1,Bc.next=4,ja.initializeImage({imageFile:sb,imageElement:Pb,showCursorImagePreview:Mb});case 4:Bc.next=11;break;case 6:Bc.prev=6,Bc.t0=Bc.catch(1),(0,Lc.DR)(Pb,{isDeleted:!0}),ja.actionManager.executeAction(Xe),ja.setState({errorMessage:Bc.t0.message||(0,qc.t)("errors.imageInsertError")});case 11:case "end":return Bc.stop()}},$b,null,[[1,6]])}));return function(Pb,sb,Mb){return wb.apply(this,arguments)}}();this.setImagePreviewCursor=function(){var wb=(0,Qd.Z)(uc().mark(function sb(Pb){var Mb,
$b,Bc,Pc,Tc,wd,Rd;return uc().wrap(function(Gd){for(;;)switch(Gd.prev=Gd.next){case 0:return Mb=96,Gd.next=3,(0,sa.Tu)(Pb,{maxWidthOrHeight:Mb});case 3:return $b=Gd.sent,Gd.next=6,(0,sa.Sf)($b);case 6:if(Bc=Gd.sent,Pb.type!==jb.LO.svg){Gd.next=20;break}return Gd.next=10,(0,sj.PK)(Bc);case 10:Pc=Gd.sent,Tc=Math.min(Pc.height,Mb),(wd=Pc.width/Pc.height*Tc)>Mb&&(Tc=(wd=Mb)*(Pc.height/Pc.width)),(Rd=document.createElement("canvas")).height=Tc,Rd.width=wd,Rd.getContext("2d").drawImage(Pc,0,0,wd,Tc),Bc=
Rd.toDataURL(jb.LO.svg);case 20:ja.state.pendingImageElementId&&(0,Dc.KJ)(ja.canvas,"url(".concat(Bc,") 4 4, auto"));case 21:case "end":return Gd.stop()}},sb)}));return function(Pb){return wb.apply(this,arguments)}}();this.onImageAction=(0,Qd.Z)(uc().mark(function zb(){var Pb,sb,Mb,$b,Bc,Pc,Tc,wd,Rd,Gd=arguments;return uc().wrap(function(Cd){for(;;)switch(Cd.prev=Cd.next){case 0:return Pb=0<Gd.length&&void 0!==Gd[0]?Gd[0]:{insertOnCanvasDirectly:!1},sb=Pb.insertOnCanvasDirectly,Cd.prev=1,Mb=ja.state.width/
2+ja.state.offsetLeft,$b=ja.state.height/2+ja.state.offsetTop,Bc=(0,Dc.dE)({clientX:Mb,clientY:$b},ja.state),Pc=Bc.x,Tc=Bc.y,Cd.next=7,(0,qa.I$)({description:"Image",extensions:["jpg","png","svg","gif"]});case 7:wd=Cd.sent;Rd=ja.createImageElement({sceneX:Pc,sceneY:Tc});sb?(ja.insertImageElement(Rd,wd),ja.initializeImageDimensions(Rd),ja.setState({selectedElementIds:(0,ld.Z)({},Rd.id,!0)},function(){ja.actionManager.executeAction(Xe)})):ja.setState({pendingImageElementId:Rd.id},function(){ja.insertImageElement(Rd,
wd,!0)});Cd.next=16;break;case 12:Cd.prev=12,Cd.t0=Cd.catch(1),"AbortError"!==Cd.t0.name?console.error(Cd.t0):console.warn(Cd.t0),ja.setState({pendingImageElementId:null,editingElement:null,activeTool:(0,Dc.Om)(ja.state,{type:"selection"})},function(){ja.actionManager.executeAction(Xe)});case 16:case "end":return Cd.stop()}},zb,null,[[1,12]])}));this.initializeImageDimensions=function(zb){var Pb,sb=1<arguments.length&&void 0!==arguments[1]&&arguments[1],Mb=(0,le.wi)(zb)&&(null===(Pb=ja.imageCache.get(zb.fileId))||
void 0===Pb?void 0:Pb.image);if(!Mb||Mb instanceof Promise)zb.width<jb.f/ja.state.zoom.value&&zb.height<jb.f/ja.state.zoom.value&&(Mb=100/ja.state.zoom.value,(0,Lc.DR)(zb,{x:zb.x-Mb/2,y:zb.y-Mb/2,width:Mb,height:Mb}));else if(sb||zb.width<jb.f/ja.state.zoom.value&&zb.height<jb.f/ja.state.zoom.value)Pb=Math.min(Mb.naturalHeight,Math.min(Math.max(ja.state.height-120,160),Math.floor(.5*ja.state.height)/ja.state.zoom.value)),Mb=Mb.naturalWidth/Mb.naturalHeight*Pb,(0,Lc.DR)(zb,{x:zb.x+zb.width/2-Mb/2,
y:zb.y+zb.height/2-Pb/2,width:Mb,height:Pb})};this.updateImageCache=function(){var zb=(0,Qd.Z)(uc().mark(function Mb(sb){var $b,Bc,Pc,Tc,wd,Rd,Gd,Cd=arguments;return uc().wrap(function(Id){for(;;)switch(Id.prev=Id.next){case 0:return $b=1<Cd.length&&void 0!==Cd[1]?Cd[1]:ja.files,Id.next=3,(0,sj.Xx)({imageCache:ja.imageCache,fileIds:sb.map(function(xe){return xe.fileId}),files:$b});case 3:if(Bc=Id.sent,Pc=Bc.updatedFiles,Tc=Bc.erroredFiles,Pc.size||Tc.size){wd=hd(sb);try{for(wd.s();!(Rd=wd.n()).done;)Gd=
Rd.value,Pc.has(Gd.fileId)&&(0,Rj.bI)(Gd)}catch(xe){wd.e(xe)}finally{wd.f()}}return Tc.size&&ja.scene.replaceAllElements(ja.scene.getElementsIncludingDeleted().map(function(xe){return(0,le.wi)(xe)&&Tc.has(xe.fileId)?(0,Lc.BE)(xe,{status:"error"}):xe})),Id.abrupt("return",{updatedFiles:Pc,erroredFiles:Tc});case 9:case "end":return Id.stop()}},Mb)}));return function(sb){return zb.apply(this,arguments)}}();this.addNewImagesToImageCache=(0,Qd.Z)(uc().mark(function Pb(){var sb,Mb,$b,Bc,Pc=arguments;return uc().wrap(function(Tc){for(;;)switch(Tc.prev=
Tc.next){case 0:if(sb=0<Pc.length&&void 0!==Pc[0]?Pc[0]:(0,sj.oA)(ja.scene.getNonDeletedElements()),Mb=1<Pc.length&&void 0!==Pc[1]?Pc[1]:ja.files,!($b=sb.filter(function(wd){return!wd.isDeleted&&!ja.imageCache.has(wd.fileId)})).length){Tc.next=9;break}return Tc.next=6,ja.updateImageCache($b,Mb);case 6:Bc=Tc.sent,Bc.updatedFiles.size&&ja.scene.informMutation();case 9:case "end":return Tc.stop()}},Pb)}));this.scheduleImageRefresh=gm()(function(){ja.addNewImagesToImageCache()},jb.LL);this.updateBindingEnabledOnPointerMove=
function(Pb){Pb=(0,pe.cz)(Pb);ja.state.isBindingEnabled!==Pb&&ja.setState({isBindingEnabled:Pb})};this.maybeSuggestBindingAtCursor=function(Pb){Pb=(0,pe.Y9)(Pb,ja.scene);ja.setState({suggestedBindings:null!=Pb?[Pb]:[]})};this.maybeSuggestBindingsForLinearElementAtCoords=function(Pb,sb,Mb){sb.length&&(sb=sb.reduce(function($b,Bc){Bc=(0,pe.Y9)(Bc,ja.scene);return null==Bc||(0,pe.DK)(Pb,null==Mb?void 0:Mb.id,Bc)||$b.push(Bc),$b},[]),ja.setState({suggestedBindings:sb}))};this.handleCanvasRef=function(Pb){var sb,
Mb,$b;null!==Pb?(ja.canvas=Pb,ja.rc=Od.Z.canvas(ja.canvas),ja.canvas.addEventListener(jb.Ks.WHEEL,ja.handleWheel,{passive:!1}),ja.canvas.addEventListener(jb.Ks.TOUCH_START,ja.onTapStart),ja.canvas.addEventListener(jb.Ks.TOUCH_END,ja.onTapEnd)):(null===(sb=ja.canvas)||void 0===sb||sb.removeEventListener(jb.Ks.WHEEL,ja.handleWheel),null===(Mb=ja.canvas)||void 0===Mb||Mb.removeEventListener(jb.Ks.TOUCH_START,ja.onTapStart),null===($b=ja.canvas)||void 0===$b||$b.removeEventListener(jb.Ks.TOUCH_END,ja.onTapEnd))};
this.handleAppOnDrop=function(){var Pb=(0,Qd.Z)(uc().mark(function $b(Mb){var Bc,Pc,Tc,wd,Rd,Gd,Cd,Id,xe,Tf;return uc().wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return se.next=2,(0,sa.bv)(Mb);case 2:if(Bc=se.sent,Pc=Bc.file,Tc=Bc.fileHandle,se.prev=5,!(0,sa.Wr)(Pc)){se.next=26;break}if((null==Pc?void 0:Pc.type)!==jb.LO.png&&(null==Pc?void 0:Pc.type)!==jb.LO.svg){se.next=20;break}return se.prev=8,se.next=11,(0,sa.cT)(Pc,ja.state,ja.scene.getElementsIncludingDeleted(),Tc);case 11:return wd=
se.sent,ja.syncActionResult(pc(pc({},wd),{},{appState:pc(pc({},wd.appState||ja.state),{},{isLoading:!1}),replaceFiles:!0,commitToHistory:!0})),se.abrupt("return");case 16:if(se.prev=16,se.t0=se.catch(8),"EncodingError"===se.t0.name){se.next=20;break}throw se.t0;case 20:return Rd=(0,Dc.dE)(Mb,ja.state),Gd=Rd.x,Cd=Rd.y,Id=ja.createImageElement({sceneX:Gd,sceneY:Cd}),ja.insertImageElement(Id,Pc),ja.initializeImageDimensions(Id),ja.setState({selectedElementIds:(0,ld.Z)({},Id.id,!0)}),se.abrupt("return");
case 26:se.next=31;break;case 28:return se.prev=28,se.t1=se.catch(5),se.abrupt("return",ja.setState({isLoading:!1,errorMessage:se.t1.message}));case 31:if(!(xe=Mb.dataTransfer.getData(jb.LO.excalidrawlib))||"string"!=typeof xe){se.next=35;break}try{Tf=(0,sa.wf)(xe),ja.addElementsFromPasteOrLibrary({elements:(0,Di.WV)(Tf),position:Mb,files:null})}catch($e){ja.setState({errorMessage:$e.message})}return se.abrupt("return");case 35:if(!Pc){se.next=38;break}return se.next=38,ja.loadFileToCanvas(Pc,Tc);
case 38:case "end":return se.stop()}},$b,null,[[5,28],[8,16]])}));return function(Mb){return Pb.apply(this,arguments)}}();this.loadFileToCanvas=function(){var Pb=(0,Qd.Z)(uc().mark(function Bc(Mb,$b){var Pc;return uc().wrap(function(Tc){for(;;)switch(Tc.prev=Tc.next){case 0:return Tc.next=2,(0,sa.gY)(Mb);case 2:return Mb=Tc.sent,Tc.prev=3,Tc.next=6,(0,sa.ZY)(Mb,ja.state,ja.scene.getElementsIncludingDeleted(),$b);case 6:if((Pc=Tc.sent).type!==jb.LO.excalidraw){Tc.next=12;break}ja.setState({isLoading:!0});
ja.syncActionResult(pc(pc({},Pc.data),{},{appState:pc(pc({},Pc.data.appState||ja.state),{},{isLoading:!1}),replaceFiles:!0,commitToHistory:!0}));Tc.next=15;break;case 12:if(Pc.type!==jb.LO.excalidrawlib){Tc.next=15;break}return Tc.next=15,ja.library.updateLibrary({libraryItems:Mb,merge:!0,openLibraryMenu:!0}).catch(function(wd){console.error(wd);ja.setState({errorMessage:(0,qc.t)("errors.importLibraryError")})});case 15:Tc.next=20;break;case 17:Tc.prev=17,Tc.t0=Tc.catch(3),ja.setState({isLoading:!1,
errorMessage:Tc.t0.message});case 20:case "end":return Tc.stop()}},Bc,null,[[3,17]])}));return function(Mb,$b){return Pb.apply(this,arguments)}}();this.handleCanvasContextMenu=function(Pb){if(Pb.preventDefault(),"touch"!==Pb.nativeEvent.pointerType&&("pen"!==Pb.nativeEvent.pointerType||Pb.button===jb.Oh.SECONDARY)||"selection"===ja.state.activeTool.type){var sb=(0,Dc.dE)(Pb,ja.state),Mb=(sb=ja.getElementAtPosition(sb.x,sb.y,{preferSelected:!0,includeLockedElements:!0}))?"element":"canvas",$b=ja.excalidrawContainerRef.current.getBoundingClientRect(),
Bc=Pb.clientX-$b.left,Pc=Pb.clientY-$b.top;sb&&!ja.state.selectedElementIds[sb.id]?ja.setState((0,Ub.bO)(pc(pc({},ja.state),{},{selectedElementIds:(0,ld.Z)({},sb.id,!0)}),ja.scene.getNonDeletedElements()),function(){ja._openContextMenu({top:Pc,left:Bc},Mb)}):ja._openContextMenu({top:Pc,left:Bc},Mb)}};this.maybeDragNewGenericElement=function(Pb,sb){var Mb=ja.state.draggingElement,$b=Pb.lastCoords;if(Mb)if("selection"===Mb.type&&"eraser"!==ja.state.activeTool.type)(0,Sb.EJ)(Mb,ja.state.activeTool.type,
Pb.origin.x,Pb.origin.y,$b.x,$b.y,(0,Dc.TE)(Pb.origin.x,$b.x),(0,Dc.TE)(Pb.origin.y,$b.y),(0,vc.E0)(sb),(0,vc.OA)(sb));else{var Bc;$b=(0,Xd.wC)($b.x,$b.y,ja.state.gridSize);var Pc=(0,Yd.Z)($b,2);$b=Pc[0];Pc=Pc[1];var Tc=(0,le.wi)(Mb)&&(null===(Bc=ja.imageCache.get(Mb.fileId))||void 0===Bc?void 0:Bc.image);Bc=!Tc||Tc instanceof Promise?null:Tc.width/Tc.height;(0,Sb.EJ)(Mb,ja.state.activeTool.type,Pb.originInGrid.x,Pb.originInGrid.y,$b,Pc,(0,Dc.TE)(Pb.originInGrid.x,$b),(0,Dc.TE)(Pb.originInGrid.y,
Pc),(0,le.pC)(Mb)?!(0,vc.E0)(sb):(0,vc.E0)(sb),(0,vc.OA)(sb),Bc);ja.maybeSuggestBindingForAll([Mb])}};this.maybeHandleResize=function(Pb,sb){var Mb=(0,rd.eD)(ja.scene.getNonDeletedElements(),ja.state),$b=Pb.resize.handleType;ja.setState({isResizing:$b&&"rotation"!==$b,isRotating:"rotation"===$b});var Bc=Pb.lastCoords;Bc=(0,Xd.wC)(Bc.x-Pb.resize.offset.x,Bc.y-Pb.resize.offset.y,ja.state.gridSize);var Pc=(0,Yd.Z)(Bc,2);Bc=Pc[0];Pc=Pc[1];return!!(0,Sb.vY)(Pb,$b,Mb,Pb.resize.arrowDirection,(0,vc.Ge)(sb),
(0,vc.OA)(sb),1===Mb.length&&(0,le.pC)(Mb[0])?!(0,vc.E0)(sb):(0,vc.E0)(sb),Bc,Pc,Pb.resize.center.x,Pb.resize.center.y)&&(ja.maybeSuggestBindingForAll(Mb),!0)};this._openContextMenu=function(Pb,sb){var Mb=Pb.left;Pb=Pb.top;ja.state.showHyperlinkPopup&&ja.setState({showHyperlinkPopup:!1});ja.contextMenuOpen=!0;var $b=Zh.contextItemPredicate(ja.actionManager.getElementsIncludingDeleted(),ja.actionManager.getAppState()),Bc=qg.contextItemPredicate(ja.actionManager.getElementsIncludingDeleted(),ja.actionManager.getAppState()),
Pc=Kg.contextItemPredicate(ja.actionManager.getElementsIncludingDeleted(),ja.actionManager.getAppState()),Tc=Oj.contextItemPredicate(ja.actionManager.getElementsIncludingDeleted(),ja.actionManager.getAppState()),wd=lg.contextItemPredicate(ja.actionManager.getElementsIncludingDeleted(),ja.actionManager.getAppState()),Rd=dj.contextItemPredicate(ja.actionManager.getElementsIncludingDeleted(),ja.actionManager.getAppState()),Gd=ja.scene.getNonDeletedElements(),Cd=(0,rd.eD)(ja.scene.getNonDeletedElements(),
ja.state),Id=[];(uf.vt&&0<Gd.length&&Id.push(El),uf.wx&&0<Gd.length&&Id.push(Xk),"element"===sb&&Zj.contextItemPredicate(Gd,ja.state)&&uf.wx&&Id.push(Zj),"canvas"===sb)?(sb=[].concat(Id,[void 0===ja.props.gridModeEnabled&&Qj,void 0===ja.props.zenModeEnabled&&xg,void 0===ja.props.viewModeEnabled&&Tl,jg]),ja.state.viewModeEnabled?Zk({options:sb,top:Pb,left:Mb,actionManager:ja.actionManager,appState:ja.state,container:ja.excalidrawContainerRef.current,elements:Gd}):Zk({options:[ja.device.isMobile&&navigator.clipboard&&
{trackEvent:!1,name:"paste",perform:function(xe,Tf){return ja.pasteFromClipboard(null),{commitToHistory:!1}},contextItemLabel:"labels.paste"},ja.device.isMobile&&navigator.clipboard&&"separator",uf.vt&&0<Gd.length&&El,uf.wx&&0<Gd.length&&Xk,uf.wx&&0<Cd.length&&Zj,(uf.vt&&0<Gd.length||uf.wx&&0<Gd.length)&&"separator",hc,"separator",void 0===ja.props.gridModeEnabled&&Qj,void 0===ja.props.zenModeEnabled&&xg,void 0===ja.props.viewModeEnabled&&Tl,jg],top:Pb,left:Mb,actionManager:ja.actionManager,appState:ja.state,
container:ja.excalidrawContainerRef.current,elements:Gd})):"element"===sb&&(ja.state.viewModeEnabled?Zk({options:[navigator.clipboard&&Pj].concat(Id),top:Pb,left:Mb,actionManager:ja.actionManager,appState:ja.state,container:ja.excalidrawContainerRef.current,elements:Gd}):Zk({options:[ja.device.isMobile&&kl,ja.device.isMobile&&navigator.clipboard&&Pj,ja.device.isMobile&&navigator.clipboard&&{name:"paste",trackEvent:!1,perform:function(xe,Tf){return ja.pasteFromClipboard(null),{commitToHistory:!1}},
contextItemLabel:"labels.paste"},ja.device.isMobile&&"separator"].concat(Id,["separator",Qf,Pg,"separator",$b&&Zh,wd&&lg,Rd&&dj,Bc&&qg,($b||Bc)&&"separator",Cl,"separator",bb,Db,db,Eb,"separator",Pc&&Kg,Tc&&Oj,(Pc||Tc)&&"separator",Eh.nz.contextItemPredicate(Gd,ja.state)&&Eh.nz,Dd,Xg,"separator",ce]),top:Pb,left:Mb,actionManager:ja.actionManager,appState:ja.state,container:ja.excalidrawContainerRef.current,elements:Gd}))};this.handleWheel=(0,Dc.tH)(function(Pb){if(Pb.preventDefault(),!$i){var sb=
Pb.deltaX,Mb=Pb.deltaY;if(Pb.metaKey||Pb.ctrlKey){Pb=Math.sign(Mb);var $b=Math.abs(Mb),Bc=Mb;10<$b&&(Bc=10*Pb);var Pc=ja.state.zoom.value-Bc/100;return Pc+=Math.log10(Math.max(1,ja.state.zoom.value))*-Pb*Math.min(1,$b/20),ja.setState(function(Tc){return pc(pc({},(0,fi.E)({viewportX:Dg,viewportY:Xj,nextZoom:(0,rd.j)(Pc)},Tc)),{},{shouldCacheIgnoreZoom:!0})}),void ja.resetShouldCacheIgnoreZoomDebounced()}Pb.shiftKey?ja.setState(function(Tc){return{scrollX:Tc.scrollX-(Mb||sb)/Tc.zoom.value}}):ja.setState(function(Tc){var wd=
Tc.zoom;return{scrollX:Tc.scrollX-sb/wd.value,scrollY:Tc.scrollY-Mb/wd.value}})}});this.savePointer=function(Pb,sb,Mb){var $b,Bc;Pb&&sb&&(Pb=(0,Dc.dE)({clientX:Pb,clientY:sb},ja.state),isNaN(Pb.x)||isNaN(Pb.y),null===($b=(Bc=ja.props).onPointerUpdate)||void 0===$b||$b.call(Bc,{pointer:Pb,button:Mb,pointersMap:oi}))};this.resetShouldCacheIgnoreZoomDebounced=(0,Dc.Ds)(function(){ja.unmounted||ja.setState({shouldCacheIgnoreZoom:!1})},300);this.updateDOMRect=function(Pb){var sb;if(null!==(sb=ja.excalidrawContainerRef)&&
void 0!==sb&&sb.current){var Mb=ja.excalidrawContainerRef.current.getBoundingClientRect();sb=Mb.width;var $b=Mb.height,Bc=Mb.left;Mb=Mb.top;var Pc=ja.state,Tc=Pc.height,wd=Pc.offsetTop,Rd=Pc.offsetLeft;if(sb===Pc.width&&$b===Tc&&Bc===Rd&&Mb===wd)return void(Pb&&Pb());ja.setState({width:sb,height:$b,offsetLeft:Bc,offsetTop:Mb},function(){Pb&&Pb()})}};this.refresh=function(){ja.setState(pc({},ja.getCanvasOffsets()))}};"production"!==jb.Vi.TEST&&"production"!==jb.Vi.DEVELOPMENT||(window.h=window.h||
{},Object.defineProperties(window.h,{elements:{configurable:!0,get:function(){var ja;return null===(ja=this.app)||void 0===ja?void 0:ja.scene.getElementsIncludingDeleted()},set:function(ja){var Fb;return null===(Fb=this.app)||void 0===Fb?void 0:Fb.scene.replaceAllElements(ja)}}}));var Qi=Hl},5564:function(k,h,f){f.d(h,{z:function(){return fa}});var w=f(2577);k=f(9787);var x=f.n(k),J=f(7288),z=f(6340),u=(f(4220),f(6066)),t=f(8211),n=f(56),R=f(4512),ka=function(H){var aa=(new Option).style;return aa.color=
H,!!aa.color},L=[["1","2","3","4","5"],["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),ma=function(H){var aa=H.colors,M=H.color,Q=H.onChange,D=H.onClose,O=H.label,P=H.showInput,ba=void 0===P||P,X=H.type,F=H.elements,ha=x().useRef(),K=x().useRef(),Z=x().useRef(),ea=x().useRef();H=x().useState(function(){return"canvasBackground"===X?[]:function(ca,pa){var za=[];ca=ca.filter(function(Ea){return!Ea.isDeleted}).sort(function(Ea,Oa){return Oa.updated-Ea.updated});for(var ya=0,
Ha={elementBackground:"backgroundColor",elementStroke:"strokeColor"}[pa];ya<ca.length&&5>za.length;){var Ua=ca[ya];5>za.length&&!n.Z[pa].includes(Ua[Ha])&&!za.includes(Ua[Ha])&&za.push(Ua[Ha]);ya++}return za}(F,X)});H=(0,w.Z)(H,1)[0];x().useEffect(function(){K.current?K.current.focus():ea.current?ea.current.focus():Z.current&&Z.current.focus()},[]);P=function(ca){var pa=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return ca.map(function(za,ya){var Ha=za.replace("#",""),Ua=pa?L[ya+15]:L[ya];
Ha=pa?Ha:(0,t.t)("colors.".concat(Ha));return(0,R.jsxs)("button",{className:"color-picker-swatch",onClick:function(Ea){Ea.currentTarget.focus();Q(za)},title:"".concat(Ha).concat((0,z.Qm)(za)?"":" (".concat(za,")")," — ").concat(Ua.toUpperCase()),"aria-label":Ha,"aria-keyshortcuts":L[ya],style:{color:za},ref:function(Ea){!pa&&Ea&&0===ya&&(ha.current=Ea);Ea&&za===M&&(K.current=Ea)},onFocus:function(){Q(za)},children:[(0,z.Qm)(za)?(0,R.jsx)("div",{className:"color-picker-transparent"}):void 0,(0,R.jsx)("span",
{className:"color-picker-keybinding",children:Ua})]},za)})};return(0,R.jsxs)("div",{className:"color-picker color-picker-type-".concat(X),role:"dialog","aria-modal":"true","aria-label":(0,t.t)("labels.colorPicker"),onKeyDown:function(ca){var pa=!1;if((0,u.Wl)(ca.key)){var za,ya,Ha;pa=!0;var Ua,Ea=document.activeElement,Oa=(0,t.G3)().rtl,Za=!1,Ma=Array.prototype.indexOf.call(null===(za=Z.current.querySelector(".color-picker-content--default"))||void 0===za?void 0:za.children,Ea);-1===Ma&&-1!==(Ma=
Array.prototype.indexOf.call(null===(Ua=Z.current.querySelector(".color-picker-content--canvas-colors"))||void 0===Ua?void 0:Ua.children,Ea))&&(Za=!0);if((za=Za?null===(ya=Z.current)||void 0===ya?void 0:ya.querySelector(".color-picker-content--canvas-colors"):null===(Ha=Z.current)||void 0===Ha?void 0:Ha.querySelector(".color-picker-content--default"))&&-1!==Ma){var fb;ya=za.children.length-(ba?1:0);null===(fb=za.children[ca.key===(Oa?u.tW.ARROW_LEFT:u.tW.ARROW_RIGHT)?(Ma+1)%ya:ca.key===(Oa?u.tW.ARROW_RIGHT:
u.tW.ARROW_LEFT)?(ya+Ma-1)%ya:Za||ca.key!==u.tW.ARROW_DOWN?Za||ca.key!==u.tW.ARROW_UP?Ma:(ya+Ma-5)%ya:(Ma+5)%ya])||void 0===fb||fb.focus()}ca.preventDefault()}else!L.includes(ca.key.toLowerCase())||ca[u.tW.CTRL_OR_CMD]||ca.altKey||(0,z.s)(ca.target)?ca.key!==u.tW.ESCAPE&&ca.key!==u.tW.ENTER||(pa=!0,ca.preventDefault(),D()):(pa=!0,fb=L.indexOf(ca.key.toLowerCase()),Ha=(ya=15<=fb)?null==Z||null===(Oa=Z.current)||void 0===Oa?void 0:Oa.querySelector(".color-picker-content--canvas-colors"):null==Z||null===
(Za=Z.current)||void 0===Za?void 0:Za.querySelector(".color-picker-content--default"),null==Ha||null===(Ma=Ha.children[ya?fb-15:fb])||void 0===Ma||Ma.focus(),ca.preventDefault());pa&&(ca.nativeEvent.stopImmediatePropagation(),ca.stopPropagation())},children:[(0,R.jsx)("div",{className:"color-picker-triangle color-picker-triangle-shadow"}),(0,R.jsx)("div",{className:"color-picker-triangle"}),(0,R.jsxs)("div",{className:"color-picker-content",ref:function(ca){ca&&(Z.current=ca)},tabIndex:-1,children:[(0,R.jsx)("div",
{className:"color-picker-content--default",children:P(aa)}),!!H.length&&(0,R.jsxs)("div",{className:"color-picker-content--canvas",children:[(0,R.jsx)("span",{className:"color-picker-content--canvas-title",children:(0,t.t)("labels.canvasColors")}),(0,R.jsx)("div",{className:"color-picker-content--canvas-colors",children:P(H,!0)})]}),ba&&(0,R.jsx)(Y,{color:M,label:O,onChange:function(ca){Q(ca)},ref:ea})]})]})},Y=x().forwardRef(function(H,aa){var M=H.color,Q=H.onChange;H=H.label;var D=x().useState(M);
D=(0,w.Z)(D,2);var O=D[0],P=D[1],ba=x().useRef(null);x().useEffect(function(){P(M)},[M]);x().useImperativeHandle(aa,function(){return ba.current});var X=x().useCallback(function(F){F=F.toLowerCase();var ha;(ha=(0,z.Qm)(F)||ka(F)?F:ka("#".concat(F))?"#".concat(F):null)&&Q(ha);P(F)},[Q]);return(0,R.jsxs)("label",{className:"color-input-container",children:[(0,R.jsx)("div",{className:"color-picker-hash",children:"#"}),(0,R.jsx)("input",{spellCheck:!1,className:"color-picker-input","aria-label":H,onChange:function(F){return X(F.target.value)},
value:(O||"").replace(/^#/,""),onBlur:function(){return P(M)},ref:ba})]})}),fa=function(H){var aa=H.type,M=H.color,Q=H.onChange,D=H.label,O=H.isActive,P=H.setActive,ba=H.elements,X=(H.appState,x().useRef(null));return(0,R.jsxs)("div",{children:[(0,R.jsxs)("div",{className:"color-picker-control-container",children:[(0,R.jsx)("button",{className:"color-picker-label-swatch","aria-label":D,style:M?{"--swatch-color":M}:void 0,onClick:function(){return P(!O)},ref:X}),(0,R.jsx)(Y,{color:M,label:D,onChange:function(F){Q(F)}})]}),
(0,R.jsx)(x().Suspense,{fallback:"",children:O?(0,R.jsx)(J.J,{onCloseRequest:function(F){return F.target!==X.current&&P(!1)},children:(0,R.jsx)(ma,{colors:n.Z[aa],color:M||null,onChange:function(F){Q(F)},onClose:function(){var F;P(!1);null===(F=X.current)||void 0===F||F.focus()},label:D,showInput:!1,type:aa,elements:ba})}):null})]})}},4981:function(k,h,f){function w(L,ma){var Y=Object.keys(L);if(Object.getOwnPropertySymbols){var fa=Object.getOwnPropertySymbols(L);ma&&(fa=fa.filter(function(H){return Object.getOwnPropertyDescriptor(L,
H).enumerable}));Y.push.apply(Y,fa)}return Y}function x(L){for(var ma=1;ma<arguments.length;ma++){var Y=null!=arguments[ma]?arguments[ma]:{};ma%2?w(Object(Y),!0).forEach(function(fa){(0,J.Z)(L,fa,Y[fa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(Y)):w(Object(Y)).forEach(function(fa){Object.defineProperty(L,fa,Object.getOwnPropertyDescriptor(Y,fa))})}return L}var J=f(7169),z=f(2726),u=f(8211),t=f(2939),n=f(1319),R=(f(4678),f(4512)),ka="onConfirm onCancel children confirmText cancelText className".split(" ");
h.Z=function(L){var ma=L.onConfirm,Y=L.onCancel,fa=L.children,H=L.confirmText;H=void 0===H?(0,u.t)("buttons.confirm"):H;var aa=L.cancelText;aa=void 0===aa?(0,u.t)("buttons.cancel"):aa;var M=L.className;M=void 0===M?"":M;L=(0,z.Z)(L,ka);return(0,R.jsxs)(t.V,x(x({onCloseRequest:Y,small:!0},L),{},{className:"confirm-dialog ".concat(M),children:[fa,(0,R.jsxs)("div",{className:"confirm-dialog-buttons",children:[(0,R.jsx)(n.V,{type:"button",title:aa,"aria-label":aa,label:aa,onClick:Y,className:"confirm-dialog--cancel"}),
(0,R.jsx)(n.V,{type:"button",title:H,"aria-label":H,label:H,onClick:ma,className:"confirm-dialog--confirm"})]})]}))}},4041:function(k,h,f){f.d(h,{J:function(){return u}});f(5422);var w=f(8211),x=f(1319),J=f(8288),z=f(4512),u=function(n){var R=n.title||("dark"===n.value?(0,w.t)("buttons.lightMode"):(0,w.t)("buttons.darkMode"));return(0,z.jsx)(x.V,{type:"icon",icon:n.value===J.C6.LIGHT?t.MOON:t.SUN,title:R,"aria-label":R,onClick:function(){return n.onChange(n.value===J.C6.DARK?J.C6.LIGHT:J.C6.DARK)},
"data-testid":"toggle-dark-mode"})},t={SUN:(0,z.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,z.jsx)("path",{fill:"currentColor",d:"M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"})}),
MOON:(0,z.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,z.jsx)("path",{fill:"currentColor",d:"M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"})})}},2939:function(k,h,f){f.d(h,{V:function(){return aa}});
var w=f(2577),x=f(45),J=f(9787),z=f(8211),u=f(9660),t=f(6066),n=(f(196),f(3646)),R=f(1226),ka=(f(8328),f(5156)),L=f(8288),ma=f(4512),Y=function(M){var Q=M.theme,D=M.closeOnClickOutside;D=void 0===D||D;return(Q=fa(void 0===Q?L.C6.LIGHT:Q))?(0,ka.createPortal)((0,ma.jsxs)("div",{className:(0,x.Z)("Modal",M.className),role:"dialog","aria-modal":"true",onKeyDown:function(O){O.key===t.tW.ESCAPE&&(O.nativeEvent.stopImmediatePropagation(),O.stopPropagation(),M.onCloseRequest())},"aria-labelledby":M.labelledBy,
children:[(0,ma.jsx)("div",{className:"Modal__background",onClick:D?M.onCloseRequest:void 0}),(0,ma.jsx)("div",{className:"Modal__content",style:{"--max-width":"".concat(M.maxWidth,"px")},tabIndex:0,children:M.children})]}),Q):null},fa=function(M){var Q=(0,J.useState)(null);Q=(0,w.Z)(Q,2);var D=Q[0],O=Q[1],P=(0,u.Fy)(),ba=(0,J.useRef)(P.isMobile);ba.current=P.isMobile;var X=(0,u.J0)().container;return(0,J.useLayoutEffect)(function(){D&&D.classList.toggle("excalidraw--mobile",P.isMobile)},[D,P.isMobile]),
(0,J.useLayoutEffect)(function(){var F=!(null==X||!X.classList.contains("theme--dark"))||"dark"===M,ha=document.createElement("div");return ha.classList.add("excalidraw","excalidraw-modal-container"),ha.classList.toggle("excalidraw--mobile",ba.current),F&&(ha.classList.add("theme--dark"),ha.classList.add("theme--dark-background-none")),document.body.appendChild(ha),O(ha),function(){document.body.removeChild(ha)}},[X,M]),D},H=f(6340),aa=function(M){var Q=function(){var X=(0,J.useState)(null);X=(0,w.Z)(X,
2);var F=X[1];return[X[0],(0,J.useCallback)(function(ha){return F(ha)},[])]}();Q=(0,w.Z)(Q,2);var D=Q[0];Q=Q[1];var O=(0,J.useState)(document.activeElement),P=(0,w.Z)(O,1)[0];O=(0,u.J0)().id;(0,J.useEffect)(function(){if(D){var X=(0,H.xp)(D);0<X.length&&!1!==M.autofocus&&(X[1]||X[0]).focus();var F=function(ha){if(ha.key===t.tW.TAB){var K=(0,H.xp)(D),Z=document.activeElement,ea=K.findIndex(function(ca){return ca===Z});0===ea&&ha.shiftKey?(K[K.length-1].focus(),ha.preventDefault()):ea!==K.length-1||
ha.shiftKey||(K[0].focus(),ha.preventDefault())}};return D.addEventListener("keydown",F),function(){return D.removeEventListener("keydown",F)}}},[D,M.autofocus]);var ba=function(){P.focus();M.onCloseRequest()};return(0,ma.jsx)(Y,{className:(0,x.Z)("Dialog",M.className),labelledBy:"dialog-title",maxWidth:M.small?550:800,onCloseRequest:ba,theme:M.theme,closeOnClickOutside:M.closeOnClickOutside,children:(0,ma.jsxs)(R.W,{ref:Q,children:[(0,ma.jsxs)("h2",{id:"".concat(O,"-dialog-title"),className:"Dialog__title",
children:[(0,ma.jsx)("span",{className:"Dialog__titleContent",children:M.title}),(0,ma.jsx)("button",{className:"Modal__close",onClick:ba,"aria-label":(0,z.t)("buttons.close"),children:(0,u.Fy)().isMobile?n.op:n.xv})]}),(0,ma.jsx)("div",{className:"Dialog__content",children:M.children})]})})}},1226:function(k,h,f){function w(n,R){var ka=Object.keys(n);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(n);R&&(L=L.filter(function(ma){return Object.getOwnPropertyDescriptor(n,ma).enumerable}));
ka.push.apply(ka,L)}return ka}function x(n){for(var R=1;R<arguments.length;R++){var ka=null!=arguments[R]?arguments[R]:{};R%2?w(Object(ka),!0).forEach(function(L){(0,J.Z)(n,L,ka[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(ka)):w(Object(ka)).forEach(function(L){Object.defineProperty(n,L,Object.getOwnPropertyDescriptor(ka,L))})}return n}f.d(h,{W:function(){return t}});var J=f(7169);k=(f(1106),f(9787));k=f.n(k);var z=f(45),u=f(4512),t=k().forwardRef(function(n,
R){var ka=n.children,L=n.padding,ma=n.style;return(0,u.jsx)("div",{className:(0,z.Z)("Island",n.className),style:x({"--padding":L},ma),ref:R,children:ka})})},5440:function(k,h,f){f.d(h,{z:function(){return t}});var w=f(2577),x=f(8211),J=f(9787),z=f(9101),u=f(4512),t=function(n){var R=n.delay;n=(0,J.useState)(!!R);n=(0,w.Z)(n,2);var ka=n[0],L=n[1];return(0,J.useEffect)(function(){if(R){var ma=setTimeout(function(){L(!1)},R);return function(){return clearTimeout(ma)}}},[R]),ka?null:(0,u.jsxs)("div",
{className:"LoadingMessage",children:[(0,u.jsx)("div",{children:(0,u.jsx)(z.Z,{})}),(0,u.jsx)("div",{className:"LoadingMessage-text",children:(0,x.t)("labels.loadingScene")})]})}},7288:function(k,h,f){f.d(h,{J:function(){return t}});var w=f(9787),x=(f(4301),f(5156)),J=f(6340),z=f(6066),u=f(4512),t=function(n){var R=n.children,ka=n.left,L=n.top,ma=n.onCloseRequest,Y=n.fitInViewport,fa=void 0!==Y&&Y;Y=n.offsetLeft;var H=void 0===Y?0:Y;Y=n.offsetTop;var aa=void 0===Y?0:Y;Y=n.viewportWidth;var M=void 0===
Y?window.innerWidth:Y;n=n.viewportHeight;var Q=void 0===n?window.innerHeight:n,D=(0,w.useRef)(null),O=D.current;return(0,w.useEffect)(function(){if(O){var P=function(ba){if(ba.key===z.tW.TAB){var X=(0,J.xp)(O),F=document.activeElement,ha=X.findIndex(function(K){return K===F});0===ha&&ba.shiftKey?(X[X.length-1].focus(),ba.preventDefault(),ba.stopImmediatePropagation()):ha!==X.length-1||ba.shiftKey||(X[0].focus(),ba.preventDefault(),ba.stopImmediatePropagation())}};return O.addEventListener("keydown",
P),function(){return O.removeEventListener("keydown",P)}}},[O]),(0,w.useLayoutEffect)(function(){if(fa&&D.current){var P=D.current,ba=P.getBoundingClientRect(),X=ba.y,F=ba.width,ha=ba.height;ba.x+F-H>M&&(P.style.left="".concat(M-F,"px"));X+ha-aa>Q&&(P.style.top="".concat(Q-ha,"px"))}},[fa,M,Q,H,aa]),(0,w.useEffect)(function(){if(ma){var P=function(ba){var X;null!==(X=D.current)&&void 0!==X&&X.contains(ba.target)||(0,x.unstable_batchedUpdates)(function(){return ma(ba)})};return document.addEventListener("pointerdown",
P,!1),function(){return document.removeEventListener("pointerdown",P,!1)}}},[ma]),(0,u.jsx)("div",{className:"popover",style:{top:L,left:ka},ref:D,children:R})}},9101:function(k,h,f){f(371);var w=f(4512);h.Z=function(x){var J=x.size;J=void 0===J?"1em":J;x=x.circleWidth;x=void 0===x?8:x;return(0,w.jsx)("div",{className:"Spinner",children:(0,w.jsx)("svg",{viewBox:"0 0 100 100",style:{width:J,height:J},children:(0,w.jsx)("circle",{cx:"50",cy:"50",r:50-x/2,strokeWidth:x,fill:"none",strokeMiterlimit:"10"})})})}},
1319:function(k,h,f){f.d(h,{V:function(){return ma}});var w=f(8950),x=f(2577);k=f(7945);var J=f.n(k),z=(f(5422),f(9787)),u=f.n(z),t=f(45),n=f(9660),R=f(6797),ka=f(9101),L=f(4512),ma=u().forwardRef(function(Y,fa){var H=(0,n.J0)().id,aa=u().useRef(null);u().useImperativeHandle(fa,function(){return aa.current});fa="ToolIcon_size_".concat(Y.size);var M=(0,z.useState)(!1),Q=(0,x.Z)(M,2);M=Q[0];var D=Q[1],O=(0,z.useRef)(!0);Q=function(){var ba=(0,w.Z)(J().mark(function ha(F){var K,Z;return J().wrap(function(ea){for(;;)switch(ea.prev=
ea.next){case 0:if(!((Z="onClick"in Y&&(null===(K=Y.onClick)||void 0===K?void 0:K.call(Y,F)))&&"then"in Z)){ea.next=18;break}return ea.prev=2,D(!0),ea.next=6,Z;case 6:ea.next=15;break;case 8:if(ea.prev=8,ea.t0=ea.catch(2),ea.t0 instanceof R._){ea.next=14;break}throw ea.t0;case 14:console.warn(ea.t0);case 15:return ea.prev=15,O.current&&D(!1),ea.finish(15);case 18:case "end":return ea.stop()}},ha,null,[[2,8,15,18]])}));return function(F){return ba.apply(this,arguments)}}();(0,z.useEffect)(function(){return function(){O.current=
!1}},[]);var P=(0,z.useRef)(null);return"button"===Y.type||"icon"===Y.type||"submit"===Y.type?(H="icon"===Y.type?"button":Y.type,(0,L.jsxs)("button",{className:(0,t.Z)("ToolIcon_type_button",fa,Y.className,Y.visible&&!Y.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!Y.hidden,"ToolIcon--selected":Y.selected,"ToolIcon--plain":"icon"===Y.type}),"data-testid":Y["data-testid"],hidden:Y.hidden,title:Y.title,"aria-label":Y["aria-label"],type:H,onClick:Q,ref:aa,disabled:M||Y.isLoading,
children:[(Y.icon||Y.label)&&(0,L.jsxs)("div",{className:"ToolIcon__icon","aria-hidden":"true",children:[Y.icon||Y.label,Y.keyBindingLabel&&(0,L.jsx)("span",{className:"ToolIcon__keybinding",children:Y.keyBindingLabel}),Y.isLoading&&(0,L.jsx)(ka.Z,{})]}),Y.showAriaLabel&&(0,L.jsxs)("div",{className:"ToolIcon__label",children:[Y["aria-label"]," ",M&&(0,L.jsx)(ka.Z,{})]}),Y.children]})):(0,L.jsxs)("label",{className:(0,t.Z)("ToolIcon",Y.className),title:Y.title,onPointerDown:function(ba){var X;P.current=
ba.pointerType||null;null===(X=Y.onPointerDown)||void 0===X||X.call(Y,{pointerType:ba.pointerType||null})},onPointerUp:function(){requestAnimationFrame(function(){P.current=null})},children:[(0,L.jsx)("input",{className:"ToolIcon_type_radio ".concat(fa),type:"radio",name:Y.name,"aria-label":Y["aria-label"],"aria-keyshortcuts":Y["aria-keyshortcuts"],"data-testid":Y["data-testid"],id:"".concat(H,"-").concat(Y.id),onChange:function(){var ba;null===(ba=Y.onChange)||void 0===ba||ba.call(Y,{pointerType:P.current})},
checked:Y.checked,ref:aa}),(0,L.jsxs)("div",{className:"ToolIcon__icon",children:[Y.icon,Y.keyBindingLabel&&(0,L.jsx)("span",{className:"ToolIcon__keybinding",children:Y.keyBindingLabel})]})]})});ma.defaultProps={visible:!0,className:"",size:"medium"}},9910:function(k,h,f){f.d(h,{Js:function(){return z},bK:function(){return J},u:function(){return u}});f(6781);var w=f(9787),x=f(4512),J=function(){var t=document.querySelector(".excalidraw-tooltip");if(t)return t;t=document.createElement("div");return document.body.appendChild(t),
t.classList.add("excalidraw-tooltip"),t},z=function(t,n){var R,ka=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"bottom",L=t.getBoundingClientRect(),ma=window.innerWidth,Y=window.innerHeight,fa=n.left+n.width/2-L.width/2;0>fa?fa=5:fa+L.width>=ma&&(fa=ma-L.width-5);"bottom"===ka?(R=n.top+n.height+5)+L.height>=Y&&(R=n.top-L.height-5):0>(R=n.top-L.height-5)&&(R=n.top+n.height+5);Object.assign(t.style,{top:"".concat(R,"px"),left:"".concat(fa,"px")})},u=function(t){var n=t.children,R=t.label,
ka=t.long,L=void 0!==ka&&ka;t=t.style;return(0,w.useEffect)(function(){return function(){return J().classList.remove("excalidraw-tooltip--visible")}},[]),(0,x.jsx)("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:function(ma){var Y=ma.currentTarget;ma=J();ma.classList.add("excalidraw-tooltip--visible");ma.style.minWidth=L?"50ch":"10ch";ma.style.maxWidth=L?"50ch":"15ch";ma.textContent=R;Y=Y.getBoundingClientRect();z(ma,Y)},onPointerLeave:function(){return J().classList.remove("excalidraw-tooltip--visible")},
style:t,children:n})}},3646:function(k,h,f){f.d(h,{$c:function(){return P},BF:function(){return Ca},BR:function(){return Y},Ct:function(){return pa},DG:function(){return H},DS:function(){return Zb},EO:function(){return ld},GI:function(){return ba},Gc:function(){return Z},HL:function(){return za},IN:function(){return ea},KX:function(){return F},Nw:function(){return gc},OA:function(){return Ld},P7:function(){return Nb},RJ:function(){return ra},Rb:function(){return M},ST:function(){return Oa},TP:function(){return Q},
Vl:function(){return ha},W2:function(){return nb},W5:function(){return Ea},WD:function(){return aa},X7:function(){return Sa},Yw:function(){return X},_I:function(){return fa},a0:function(){return Aa},a1:function(){return ka},aA:function(){return Sd},aT:function(){return Wb},bf:function(){return ic},d9:function(){return Na},eQ:function(){return n},fr:function(){return Jc},gK:function(){return Za},gR:function(){return Yb},h0:function(){return Ob},il:function(){return ad},j8:function(){return xc},kK:function(){return pc},
kM:function(){return Pa},kr:function(){return D},m:function(){return Gb},mh:function(){return Ha},np:function(){return Ja},nq:function(){return hd},nu:function(){return ib},o3:function(){return ud},oT:function(){return Qd},op:function(){return eb},p4:function(){return R},po:function(){return L},pw:function(){return ca},q0:function(){return Wc},rC:function(){return Ma},rn:function(){return qb},rr:function(){return Yd},t5:function(){return K},tP:function(){return oa},tW:function(){return Nd},tY:function(){return Bb},
tn:function(){return Nc},uD:function(){return Ua},vG:function(){return O},vo:function(){return Ed},wr:function(){return ob},xs:function(){return ya},xv:function(){return fb},z6:function(){return xd},zD:function(){return ma}});k=f(9787);k=f.n(k);var w=f(5284),x=f(45),J=f(8288),z=f(4512),u=function(mb){return mb===J.C6.LIGHT?w.orange[4]:w.orange[9]},t=function(mb){var cc=1<arguments.length&&void 0!==arguments[1]?arguments[1]:512;cc="number"==typeof cc?{width:cc}:cc;var uc=cc.width;uc=void 0===uc?512:
uc;var Uc=cc.height;Uc=void 0===Uc?uc:Uc;var cd=cc.mirror;cc=cc.style;return(0,z.jsx)("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 ".concat(uc," ").concat(Uc),className:(0,x.Z)({"rtl-mirror":cd}),style:cc,children:"string"==typeof mb?(0,z.jsx)("path",{fill:"currentColor",d:mb}):mb})},n=t((0,z.jsx)("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),R=t("M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z",
{mirror:!0}),ka=t("M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z",{width:448,height:512}),L=t("M252 54L203 8a28 27 0 00-20-8H28C12 0 0 12 0 27v195c0 15 12 26 28 26h204c15 0 28-11 28-26V73a28 27 0 00-8-19zM130 213c-21 0-37-16-37-36 0-19 16-35 37-35 20 0 37 16 37 35 0 20-17 36-37 36zm56-169v56c0 4-4 6-7 6H44c-4 0-7-2-7-6V42c0-4 3-7 7-7h133l4 2 3 2a7 7 0 012 5z M296 201l87 95-188 205-78 9c-10 1-19-8-18-20l9-84zm141-14l-41-44a31 31 0 00-46 0l-38 41 87 95 38-42c13-14 13-36 0-50z",
{width:448,height:512}),ma=t("M572.694 292.093L500.27 416.248A63.997 63.997 0 0 1 444.989 448H45.025c-18.523 0-30.064-20.093-20.731-36.093l72.424-124.155A64 64 0 0 1 152 256h399.964c18.523 0 30.064 20.093 20.73 36.093zM152 224h328v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v278.046l69.077-118.418C86.214 242.25 117.989 224 152 224z",{width:576,height:512,mirror:!0}),Y=t("M384 112v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h80c0-35.29 28.71-64 64-64s64 28.71 64 64h80c26.51 0 48 21.49 48 48zM192 40c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24m96 114v-20a6 6 0 0 0-6-6H102a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h180a6 6 0 0 0 6-6z",
{width:384,height:512}),fa=t("M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z",{width:448,height:512}),H=t("M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"),
aa=t("M384 121.9c0-6.3-2.5-12.4-7-16.9L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128zM571 308l-95.7-96.4c-10.1-10.1-27.4-3-27.4 11.3V288h-64v64h64v65.2c0 14.3 17.3 21.4 27.4 11.3L571 332c6.6-6.6 6.6-17.4 0-24zm-379 28v-32c0-8.8 7.2-16 16-16h176V160H248c-13.2 0-24-10.8-24-24V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V352H208c-8.8 0-16-7.2-16-16z",{width:576,height:512,mirror:!0}),M=t((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M571 308l-95.7-96.4c-10.1-10.1-27.4-3-27.4 11.3V288h-64v64h64v65.2c0 14.3 17.3 21.4 27.4 11.3L571 332c6.6-6.6 6.6-17.4 0-24zm-187 44v-64 64z"}),
(0,z.jsx)("path",{d:"M384 121.941V128H256V0h6.059c6.362 0 12.471 2.53 16.97 7.029l97.941 97.941a24.01 24.01 0 017.03 16.971zM248 160c-13.2 0-24-10.8-24-24V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248zm-135.455 16c26.51 0 48 21.49 48 48s-21.49 48-48 48-48-21.49-48-48 21.491-48 48-48zm208 240h-256l.485-48.485L104.545 328c4.686-4.686 11.799-4.201 16.485.485L160.545 368 264.06 264.485c4.686-4.686 12.284-4.686 16.971 0L320.545 304v112z"})]}),{width:576,
height:512,mirror:!0}),Q=t("M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z",{width:512,height:512}),D=t("M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",
{width:448,height:512}),O=t("M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),P=t("M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"),ba=t("M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"),
X=t("M255.545 8c-66.269.119-126.438 26.233-170.86 68.685L48.971 40.971C33.851 25.851 8 36.559 8 57.941V192c0 13.255 10.745 24 24 24h134.059c21.382 0 32.09-25.851 16.971-40.971l-41.75-41.75c30.864-28.899 70.801-44.907 113.23-45.273 92.398-.798 170.283 73.977 169.484 169.442C423.236 348.009 349.816 424 256 424c-41.127 0-79.997-14.678-110.63-41.556-4.743-4.161-11.906-3.908-16.368.553L89.34 422.659c-4.872 4.872-4.631 12.815.482 17.433C133.798 479.813 192.074 504 256 504c136.966 0 247.999-111.033 248-247.998C504.001 119.193 392.354 7.755 255.545 8z",
{mirror:!0}),F=t("M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z",
{mirror:!0}),ha=t("M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z",
{mirror:!0}),K=(t("M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z",{width:24,height:24}),t("M16 5l-1.42 1.42-1.59-1.59V16h-1.98V4.83L9.42 6.42 8 5l4-4 4 4zm4 5v11c0 1.1-.9 2-2 2H6c-1.11 0-2-.9-2-2V10c0-1.11.89-2 2-2h3v2H6v11h12V10h-3V8h3c1.1 0 2 .89 2 2z",
{width:24,height:24}),t((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{stroke:"currentColor",fill:"currentColor",d:"M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z"}),(0,z.jsx)("path",{stroke:"currentColor",fill:"currentColor",
d:"M0 36v20h48v-6.2c0-6 0-6.1-2-4.3-1.1 1-2 2.9-2 4.2V52H4V34c0-17.3-.1-18-2-18s-2 .7-2 20z"})]}),{width:64,height:64}),t((0,z.jsx)("path",{stroke:"currentColor",strokeWidth:"40",fill:"currentColor",d:"M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z"}),
{width:1024}),k().memo(function(mb){mb=mb.theme;return t((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M22 9.556C22 8.696 21.303 8 20.444 8H16v8H8v4.444C8 21.304 8.697 22 9.556 22h10.888c.86 0 1.556-.697 1.556-1.556V9.556z",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,z.jsx)("path",{d:"M16 3.556C16 2.696 15.303 2 14.444 2H3.556C2.696 2 2 2.697 2 3.556v10.888C2 15.304 2.697 16 3.556 16h10.888c.86 0 1.556-.697 1.556-1.556V3.556z",fill:u(mb),stroke:u(mb),
strokeWidth:"2"})]}),{width:24,mirror:!0})})),Z=k().memo(function(mb){mb=mb.theme;return t((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M16 3.556C16 2.696 15.303 2 14.444 2H3.556C2.696 2 2 2.697 2 3.556v10.888C2 15.304 2.697 16 3.556 16h10.888c.86 0 1.556-.697 1.556-1.556V3.556z",fill:u(mb),stroke:u(mb),strokeWidth:"2"}),(0,z.jsx)("path",{d:"M22 9.556C22 8.696 21.303 8 20.444 8H9.556C8.696 8 8 8.697 8 9.556v10.888C8 21.304 8.697 22 9.556 22h10.888c.86 0 1.556-.697 1.556-1.556V9.556z",fill:"var(--icon-fill-color)",
stroke:"var(--icon-fill-color)",strokeWidth:"2"})]}),{width:24,mirror:!0})}),ea=k().memo(function(mb){mb=mb.theme;return t((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M13 21a1 1 0 001 1h7a1 1 0 001-1v-7a1 1 0 00-1-1h-3v5h-5v3zM11 3a1 1 0 00-1-1H3a1 1 0 00-1 1v7a1 1 0 001 1h3V6h5V3z",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,z.jsx)("path",{d:"M18 7.333C18 6.597 17.403 6 16.667 6H7.333C6.597 6 6 6.597 6 7.333v9.334C6 17.403 6.597 18 7.333 18h9.334c.736 0 1.333-.597 1.333-1.333V7.333z",
fill:u(mb),stroke:u(mb),strokeWidth:"2"})]}),{width:24,mirror:!0})}),ca=k().memo(function(mb){mb=mb.theme;return t((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M18 7.333C18 6.597 17.403 6 16.667 6H7.333C6.597 6 6 6.597 6 7.333v9.334C6 17.403 6.597 18 7.333 18h9.334c.736 0 1.333-.597 1.333-1.333V7.333z",fill:u(mb),stroke:u(mb),strokeWidth:"2"}),(0,z.jsx)("path",{d:"M11 3a1 1 0 00-1-1H3a1 1 0 00-1 1v7a1 1 0 001 1h8V3zM22 14a1 1 0 00-1-1h-7a1 1 0 00-1 1v7a1 1 0 001 1h8v-8z",fill:"var(--icon-fill-color)",
stroke:"var(--icon-fill-color)",strokeWidth:"2"})]}),{width:24,mirror:!0})}),pa=k().memo(function(mb){mb=mb.theme;return t((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M 2,5 H 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,z.jsx)("path",{d:"M 6,7 C 5.446,7 5,7.446 5,8 v 9.999992 c 0,0.554 0.446,1 1,1 h 3.0000001 c 0.554,0 0.9999999,-0.446 0.9999999,-1 V 8 C 10,7.446 9.5540001,7 9.0000001,7 Z m 9,0 c -0.554,0 -1,0.446 -1,1 v 5.999992 c 0,0.554 0.446,1 1,1 h 3 c 0.554,0 1,-0.446 1,-1 V 8 C 19,7.446 18.554,7 18,7 Z",
fill:u(mb),stroke:u(mb),strokeWidth:"2"})]}),{width:24,mirror:!0})}),za=k().memo(function(mb){mb=mb.theme;return t((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M 2,19 H 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,z.jsx)("path",{d:"m 6,16.999992 c -0.554,0 -1,-0.446 -1,-1 V 6 C 5,5.446 5.446,5 6,5 H 9.0000001 C 9.5540001,5 10,5.446 10,6 v 9.999992 c 0,0.554 -0.4459999,1 -0.9999999,1 z m 9,0 c -0.554,0 -1,-0.446 -1,-1 V 10 c 0,-0.554 0.446,-1 1,-1 h 3 c 0.554,0 1,0.446 1,1 v 5.999992 c 0,0.554 -0.446,1 -1,1 z",
fill:u(mb),stroke:u(mb),strokeWidth:"2"})]}),{width:24,mirror:!0})}),ya=k().memo(function(mb){mb=mb.theme;return t((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M 5,2 V 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,z.jsx)("path",{d:"m 7.000004,5.999996 c 0,-0.554 0.446,-1 1,-1 h 9.999992 c 0.554,0 1,0.446 1,1 v 3.0000001 c 0,0.554 -0.446,0.9999999 -1,0.9999999 H 8.000004 c -0.554,0 -1,-0.4459999 -1,-0.9999999 z m 0,9 c 0,-0.554 0.446,-1 1,-1 h 5.999992 c 0.554,0 1,0.446 1,1 v 3 c 0,0.554 -0.446,1 -1,1 H 8.000004 c -0.554,0 -1,-0.446 -1,-1 z",
fill:u(mb),stroke:u(mb),strokeWidth:"2"})]}),{width:24})}),Ha=k().memo(function(mb){mb=mb.theme;return t((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M 19,2 V 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,z.jsx)("path",{d:"m 16.999996,5.999996 c 0,-0.554 -0.446,-1 -1,-1 H 6.000004 c -0.554,0 -1,0.446 -1,1 v 3.0000001 c 0,0.554 0.446,0.9999999 1,0.9999999 h 9.999992 c 0.554,0 1,-0.4459999 1,-0.9999999 z m 0,9 c 0,-0.554 -0.446,-1 -1,-1 h -5.999992 c -0.554,0 -1,0.446 -1,1 v 3 c 0,0.554 0.446,1 1,1 h 5.999992 c 0.554,0 1,-0.446 1,-1 z",
fill:u(mb),stroke:u(mb),strokeWidth:"2"})]}),{width:24})}),Ua=k().memo(function(mb){mb=mb.theme;return t((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M19 5V19M5 5V19",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,z.jsx)("path",{d:"M15 9C15.554 9 16 9.446 16 10V14C16 14.554 15.554 15 15 15H9C8.446 15 8 14.554 8 14V10C8 9.446 8.446 9 9 9H15Z",fill:u(mb),stroke:u(mb),strokeWidth:"2"})]}),{width:24})}),Ea=k().memo(function(mb){mb=mb.theme;return t((0,z.jsxs)(z.Fragment,
{children:[(0,z.jsx)("path",{d:"M5 5L19 5M5 19H19",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,z.jsx)("path",{d:"M15 9C15.554 9 16 9.446 16 10V14C16 14.554 15.554 15 15 15H9C8.446 15 8 14.554 8 14V10C8 9.446 8.446 9 9 9H15Z",fill:u(mb),stroke:u(mb),strokeWidth:"2"})]}),{width:24})}),Oa=k().memo(function(mb){mb=mb.theme;return t((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"m 5.000004,16.999996 c 0,0.554 0.446,1 1,1 h 3 c 0.554,0 1,-0.446 1,-1 v -10 c 0,-0.554 -0.446,-1 -1,-1 h -3 c -0.554,0 -1,0.446 -1,1 z m 9,-2 c 0,0.554 0.446,1 1,1 h 3 c 0.554,0 1,-0.446 1,-1 v -6 c 0,-0.554 -0.446,-1 -1,-1 h -3 c -0.554,0 -1,0.446 -1,1 z",
fill:u(mb),stroke:u(mb),strokeWidth:"2"}),(0,z.jsx)("path",{d:"M 2,12 H 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeDasharray:"1, 2.8",strokeLinecap:"round"})]}),{width:24,mirror:!0})}),Za=k().memo(function(mb){mb=mb.theme;return t((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M 7 5 C 6.446 5 6 5.446 6 6 L 6 9 C 6 9.554 6.446 10 7 10 L 17 10 C 17.554 10 18 9.554 18 9 L 18 6 C 18 5.446 17.554 5 17 5 L 7 5 z M 9 14 C 8.446 14 8 14.446 8 15 L 8 18 C 8 18.554 8.446 19 9 19 L 15 19 C 15.554 19 16 18.554 16 18 L 16 15 C 16 14.446 15.554 14 15 14 L 9 14 z ",
fill:u(mb),stroke:u(mb),strokeWidth:"2"}),(0,z.jsx)("path",{d:"M 12,2 V 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeDasharray:"1, 2.8",strokeLinecap:"round"})]}),{width:24})}),Ma=t("M192 256c61.9 0 112-50.1 112-112S253.9 32 192 32 80 82.1 80 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C51.6 288 0 339.6 0 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zM480 256c53 0 96-43 96-96s-43-96-96-96-96 43-96 96 43 96 96 96zm48 32h-3.8c-13.9 4.8-28.6 8-44.2 8s-30.3-3.2-44.2-8H432c-20.4 0-39.2 5.9-55.7 15.4 24.4 26.3 39.7 61.2 39.7 99.8v38.4c0 2.2-.5 4.3-.6 6.4H592c26.5 0 48-21.5 48-48 0-61.9-50.1-112-112-112z",
{width:640,height:512,mirror:!0}),fb=(t("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z"),t("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm96 328c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16v160z"),t("M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z",
{width:352,height:512})),eb=t("M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z",{width:320,height:512,style:{marginLeft:"-0.2rem"},mirror:!0}),Na=t("M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z",
{mirror:!0}),oa=(t("M11.553 22.894a.998.998 0 00.894 0s3.037-1.516 5.465-4.097C19.616 16.987 21 14.663 21 12V5a1 1 0 00-.649-.936l-8-3a.998.998 0 00-.702 0l-8 3A1 1 0 003 5v7c0 2.663 1.384 4.987 3.088 6.797 2.428 2.581 5.465 4.097 5.465 4.097zm-1.303-8.481l6.644-6.644a.856.856 0 111.212 1.212l-7.25 7.25a.856.856 0 01-1.212 0l-3.75-3.75a.856.856 0 111.212-1.212l3.144 3.144z",{width:24}),t("M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm32-48h224V288l-23.5-23.5c-4.7-4.7-12.3-4.7-17 0L176 352l-39.5-39.5c-4.7-4.7-12.3-4.7-17 0L80 352v64zm48-240c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z",
{width:384,height:512})),Ca=k().memo(function(mb){mb=mb.theme;return t((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M25 26H111V111H25",fill:"var(--icon-fill-color)"}),(0,z.jsx)("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",
stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,z.jsx)("path",{d:"M100 100H160V160H100",fill:"var(--icon-fill-color)"}),(0,z.jsx)("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",
stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,z.jsxs)("g",{fill:mb===J.C6.LIGHT?w.white:"#1e1e1e",stroke:"var(--icon-fill-color)",strokeWidth:"6",children:[(0,z.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,z.jsx)("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),(0,z.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,z.jsx)("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})}),ra=k().memo(function(mb){mb=mb.theme;return t((0,z.jsxs)(z.Fragment,
{children:[(0,z.jsx)("path",{d:"M25 26H111V111H25",fill:"var(--icon-fill-color)"}),(0,z.jsx)("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,z.jsx)("path",{d:"M100 100H160V160H100",
fill:"var(--icon-fill-color)"}),(0,z.jsx)("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,z.jsxs)("g",{fill:mb===J.C6.LIGHT?w.white:
"#1e1e1e",stroke:"var(--icon-fill-color)",strokeWidth:"6",children:[(0,z.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,z.jsx)("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),(0,z.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,z.jsx)("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),(0,z.jsx)("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),(0,z.jsx)("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})}),Aa=k().memo(function(mb){mb.theme;
return t((0,z.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.101 16H28.0934L36 8.95989V4H33.5779L20.101 16ZM30.5704 4L17.0935 16H9.10101L22.5779 4H30.5704ZM19.5704 4L6.09349 16H4V10.7475L11.5779 4H19.5704ZM8.57036 4H4V8.06952L8.57036 4ZM36 11.6378L31.101 16H36V11.6378ZM2 2V18H38V2H2Z",fill:"var(--icon-fill-color)"}),{width:40,height:20})}),Ja=k().memo(function(mb){mb.theme;return t((0,z.jsxs)("g",{fill:"var(--icon-fill-color)",fillRule:"evenodd",clipRule:"evenodd",children:[(0,z.jsx)("path",
{d:"M20.101 16H28.0934L36 8.95989V4H33.5779L20.101 16ZM30.5704 4L17.0935 16H9.10101L22.5779 4H30.5704ZM19.5704 4L6.09349 16H4V10.7475L11.5779 4H19.5704ZM8.57036 4H4V8.06952L8.57036 4ZM36 11.6378L31.101 16H36V11.6378ZM2 2V18H38V2H2Z"}),(0,z.jsx)("path",{d:"M14.0001 18L3.00006 4.00002L4.5727 2.76438L15.5727 16.7644L14.0001 18ZM25.0001 18L14.0001 4.00002L15.5727 2.76438L26.5727 16.7644L25.0001 18ZM36.0001 18L25.0001 4.00002L26.5727 2.76438L37.5727 16.7644L36.0001 18Z"})]}),{width:40,height:20})}),Sa=
k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",{d:"M2 2H38V18H2V2Z",fill:"var(--icon-fill-color)"}),{width:40,height:20})}),Bb=k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",{d:"M6 10H32",stroke:"var(--icon-fill-color)",strokeWidth:mb.strokeWidth,strokeLinecap:"round",fill:"none"}),{width:40,height:20})}),ib=k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",{d:"M6 10H34",stroke:"var(--icon-fill-color)",strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})}),
Ob=k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",{d:"M6 10H34",stroke:"var(--icon-fill-color)",strokeWidth:2.5,strokeDasharray:"10, 8",fill:"none",strokeLinecap:"round"}),{width:40,height:20})}),Wb=k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",{d:"M6 10H36",stroke:"var(--icon-fill-color)",strokeWidth:2.5,strokeDasharray:"2, 4.5",fill:"none",strokeLinecap:"round"}),{width:40,height:20})}),ic=k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",{d:"M3.00098 16.1691C6.28774 13.9744 19.6399 2.8905 22.7215 3.00082C25.8041 3.11113 19.1158 15.5488 21.4962 16.8309C23.8757 18.1131 34.4155 11.7148 37.0001 10.6919",
stroke:"var(--icon-fill-color)",strokeWidth:2,strokeLinecap:"round",fill:"none"}),{width:40,height:20,mirror:!0})}),Pa=k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",{d:"M3 17C6.68158 14.8752 16.1296 9.09849 22.0648 6.54922C28 3.99995 22.2896 13.3209 25 14C27.7104 14.6791 36.3757 9.6471 36.3757 9.6471M6.40706 15C13 11.1918 20.0468 1.51045 23.0234 3.0052C26 4.49995 20.457 12.8659 22.7285 16.4329C25 20 36.3757 13 36.3757 13",stroke:"var(--icon-fill-color)",strokeWidth:2,strokeLinecap:"round",
fill:"none"}),{width:40,height:20,mirror:!0})}),nb=k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",{d:"M3 15.6468C6.93692 13.5378 22.5544 2.81528 26.6206 3.00242C30.6877 3.18956 25.6708 15.3346 27.4009 16.7705C29.1309 18.2055 35.4001 12.4762 37 11.6177M3.97143 10.4917C6.61158 9.24563 16.3706 2.61886 19.8104 3.01724C23.2522 3.41472 22.0773 12.2013 24.6181 12.8783C27.1598 13.5536 33.3179 8.04068 35.0571 7.07244",stroke:"var(--icon-fill-color)",strokeWidth:2,strokeLinecap:"round",fill:"none"}),
{width:40,height:20,mirror:!0})}),ob=k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",{d:"M10 17L10 5L35 5",stroke:"var(--icon-fill-color)",strokeWidth:2,strokeLinecap:"round",fill:"none"}),{width:40,height:20,mirror:!0})}),Zb=k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",{d:"M10 17V15C10 8 13 5 21 5L33.5 5",stroke:"var(--icon-fill-color)",strokeWidth:2,strokeLinecap:"round",fill:"none"}),{width:40,height:20,mirror:!0})}),Jc=k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",
{d:"M6 10H34",stroke:"var(--icon-fill-color)",strokeWidth:2,fill:"none"}),{width:40,height:20})}),ad=k().memo(function(mb){mb.theme;mb=mb.flip;return t((0,z.jsxs)("g",{transform:void 0!==mb&&mb?"translate(40, 0) scale(-1, 1)":"",stroke:"var(--icon-fill-color)",strokeWidth:2,fill:"none",children:[(0,z.jsx)("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),(0,z.jsx)("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})}),Nc=k().memo(function(mb){mb.theme;mb=mb.flip;return t((0,z.jsxs)("g",{stroke:"var(--icon-fill-color)",
fill:"var(--icon-fill-color)",transform:void 0!==mb&&mb?"translate(40, 0) scale(-1, 1)":"",children:[(0,z.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,z.jsx)("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})}),Gb=k().memo(function(mb){mb.theme;mb=mb.flip;return t((0,z.jsx)("g",{transform:void 0!==mb&&mb?"translate(40, 0) scale(-1, 1)":"",children:(0,z.jsx)("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"var(--icon-fill-color)",strokeWidth:2,fill:"none"})}),
{width:40,height:20})}),xc=k().memo(function(mb){mb.theme;mb=mb.flip;return t((0,z.jsxs)("g",{stroke:"var(--icon-fill-color)",fill:"var(--icon-fill-color)",transform:void 0!==mb&&mb?"translate(40, 0) scale(-1, 1)":"",children:[(0,z.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,z.jsx)("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})}),Wc=k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 0 69.092 L 0 55.03 A 124.24 124.24 0 0 0 4.706 57.02 Q 6.826 57.863 8.708 58.5 A 53.466 53.466 0 0 0 12.231 59.571 Q 17.236 60.889 21.387 60.889 A 20.909 20.909 0 0 0 24.265 60.704 Q 25.719 60.502 26.903 60.077 A 8.649 8.649 0 0 0 29.028 58.985 Q 31.689 57.08 31.689 53.321 Q 31.689 51.221 30.518 49.585 A 10.126 10.126 0 0 0 29.282 48.177 Q 28.352 47.287 27.075 46.436 A 23.719 23.719 0 0 0 25.752 45.627 Q 23.774 44.492 20.176 42.735 A 254.44 254.44 0 0 0 17.822 41.602 Q 11.503 38.631 8.236 35.888 A 19.742 19.742 0 0 1 8.008 35.694 A 22.18 22.18 0 0 1 2.783 29.102 Q 0.83 25.342 0.83 20.313 A 22.471 22.471 0 0 1 1.733 13.778 A 17.283 17.283 0 0 1 7.251 5.42 A 21.486 21.486 0 0 1 15.177 1.272 Q 18.361 0.338 22.166 0.09 A 43.573 43.573 0 0 1 25 0 A 42.399 42.399 0 0 1 34.349 1.01 A 39.075 39.075 0 0 1 35.62 1.319 A 67.407 67.407 0 0 1 42.108 3.382 A 83.357 83.357 0 0 1 46.191 5.03 L 41.309 16.797 Q 35.596 14.453 31.86 13.526 A 30.762 30.762 0 0 0 25.417 12.612 A 28.337 28.337 0 0 0 24.512 12.598 A 14.846 14.846 0 0 0 22.022 12.793 Q 19.498 13.224 17.92 14.6 Q 15.625 16.602 15.625 19.824 Q 15.625 21.826 16.553 23.316 Q 17.48 24.805 19.507 26.197 A 18.343 18.343 0 0 0 20.659 26.912 Q 22.596 28.035 26.516 29.953 A 299.99 299.99 0 0 0 29.102 31.201 Q 37.91 35.412 41.841 39.642 A 16.553 16.553 0 0 1 42.822 40.796 A 17.675 17.675 0 0 1 46.301 49.233 A 23.517 23.517 0 0 1 46.533 52.588 A 21.581 21.581 0 0 1 45.471 59.515 A 17.733 17.733 0 0 1 39.575 67.823 Q 33.745 72.486 24.094 73.243 A 49.683 49.683 0 0 1 20.215 73.389 A 51.712 51.712 0 0 1 9.448 72.315 A 40.672 40.672 0 0 1 0 69.092 Z"}),
{width:47,height:77})}),hd=k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 44.092 71.387 L 30.225 71.387 L 13.037 15.381 L 12.598 15.381 A 1505.093 1505.093 0 0 1 12.959 22.313 Q 13.426 31.715 13.508 36.4 A 102.991 102.991 0 0 1 13.525 38.184 L 13.525 71.387 L 0 71.387 L 0 0 L 20.605 0 L 37.5 54.59 L 37.793 54.59 L 55.713 0 L 76.318 0 L 76.318 71.387 L 62.207 71.387 L 62.207 37.598 Q 62.207 35.205 62.28 32.08 A 160.703 160.703 0 0 1 62.326 30.544 Q 62.452 26.754 62.866 17.168 A 5390.536 5390.536 0 0 1 62.939 15.479 L 62.5 15.479 L 44.092 71.387 Z"}),
{width:77,height:75})}),Nd=k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 44.092 71.387 L 0 71.387 L 0 0 L 15.137 0 L 15.137 58.887 L 44.092 58.887 L 44.092 71.387 Z"}),{width:45,height:75})}),Ld=k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 42.578 35.4 L 66.699 71.387 L 49.414 71.387 L 32.813 44.385 L 16.211 71.387 L 0 71.387 L 23.682 34.57 L 1.514 0 L 18.213 0 L 33.594 25.684 L 48.682 0 L 64.99 0 L 42.578 35.4 Z M 119.775 71.387 L 75.684 71.387 L 75.684 0 L 90.82 0 L 90.82 58.887 L 119.775 58.887 L 119.775 71.387 Z"}),
{width:120,height:75})}),pc=k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",{fill:"var(--icon-fill-color)",d:"M290.74 93.24l128.02 128.02-277.99 277.99-114.14 12.6C11.35 513.54-1.56 500.62.14 485.34l12.7-114.22 277.9-277.88zm207.2-19.06l-60.11-60.11c-18.75-18.75-49.16-18.75-67.91 0l-56.55 56.55 128.02 128.02 56.55-56.55c18.75-18.76 18.75-49.16 0-67.91z"}),{width:448,height:512})}),Ed=k().memo(function(mb){mb.theme;return t((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{fill:"var(--icon-fill-color)",
d:"M 63.818 71.68 L 54.492 71.68 L 45.898 49.561 L 17.578 49.561 L 9.082 71.68 L 0 71.68 L 27.881 0 L 35.986 0 L 63.818 71.68 Z M 20.605 41.602 L 43.213 41.602 L 35.205 19.971 L 31.787 9.277 Q 30.322 15.137 28.711 19.971 L 20.605 41.602 Z"}),(0,z.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 68.994 71.68 L 52.686 71.68 L 47.51 54.688 L 21.484 54.688 L 16.309 71.68 L 0 71.68 L 25.195 0 L 43.701 0 L 68.994 71.68 Z M 25.293 41.992 L 43.896 41.992 A 27590.463 27590.463 0 0 1 42.2 36.532 Q 36.965 19.676 35.937 16.273 A 120.932 120.932 0 0 1 35.815 15.869 A 131.65 131.65 0 0 1 35.396 14.435 Q 34.951 12.879 34.675 11.741 A 34.866 34.866 0 0 1 34.521 11.084 A 141.762 141.762 0 0 1 33.706 14.075 Q 31.482 21.957 25.293 41.992 Z"})]}),
{width:70,height:78})}),xd=k().memo(function(mb){mb.theme;return t((0,z.jsx)(z.Fragment,{children:(0,z.jsx)("path",{fill:"var(--icon-fill-color)",d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"})}),
{width:640,height:512})}),Yd=k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",{d:"M12.83 352h262.34A12.82 12.82 0 00288 339.17v-38.34A12.82 12.82 0 00275.17 288H12.83A12.82 12.82 0 000 300.83v38.34A12.82 12.82 0 0012.83 352zm0-256h262.34A12.82 12.82 0 00288 83.17V44.83A12.82 12.82 0 00275.17 32H12.83A12.82 12.82 0 000 44.83v38.34A12.82 12.82 0 0012.83 96zM432 160H16a16 16 0 00-16 16v32a16 16 0 0016 16h416a16 16 0 0016-16v-32a16 16 0 00-16-16zm0 256H16a16 16 0 00-16 16v32a16 16 0 0016 16h416a16 16 0 0016-16v-32a16 16 0 00-16-16z",
fill:"var(--icon-fill-color)",strokeLinecap:"round"}),{width:448,height:512})}),ud=k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",{d:"M432 160H16a16 16 0 00-16 16v32a16 16 0 0016 16h416a16 16 0 0016-16v-32a16 16 0 00-16-16zm0 256H16a16 16 0 00-16 16v32a16 16 0 0016 16h416a16 16 0 0016-16v-32a16 16 0 00-16-16zM108.1 96h231.81A12.09 12.09 0 00352 83.9V44.09A12.09 12.09 0 00339.91 32H108.1A12.09 12.09 0 0096 44.09V83.9A12.1 12.1 0 00108.1 96zm231.81 256A12.09 12.09 0 00352 339.9v-39.81A12.09 12.09 0 00339.91 288H108.1A12.09 12.09 0 0096 300.09v39.81a12.1 12.1 0 0012.1 12.1z",
fill:"var(--icon-fill-color)"}),{width:448,height:512})}),Qd=k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",{d:"M16 224h416a16 16 0 0016-16v-32a16 16 0 00-16-16H16a16 16 0 00-16 16v32a16 16 0 0016 16zm416 192H16a16 16 0 00-16 16v32a16 16 0 0016 16h416a16 16 0 0016-16v-32a16 16 0 00-16-16zm3.17-384H172.83A12.82 12.82 0 00160 44.83v38.34A12.82 12.82 0 00172.83 96h262.34A12.82 12.82 0 00448 83.17V44.83A12.82 12.82 0 00435.17 32zm0 256H172.83A12.82 12.82 0 00160 300.83v38.34A12.82 12.82 0 00172.83 352h262.34A12.82 12.82 0 00448 339.17v-38.34A12.82 12.82 0 00435.17 288z",
fill:"var(--icon-fill-color)",strokeLinecap:"round"}),{width:448,height:512})}),ld=k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",{d:"m16,132l416,0c8.837,0 16,-7.163 16,-16l0,-40c0,-8.837 -7.163,-16 -16,-16l-416,0c-8.837,0 -16,7.163 -16,16l0,40c0,8.837 7.163,16 16,16zm0,160l416,0c8.837,0 16,-7.163 16,-16l0,-40c0,-8.837 -7.163,-16 -16,-16l-416,0c-8.837,0 -16,7.163 -16,16l0,40c0,8.837 7.163,16 16,16z",fill:"var(--icon-fill-color)",strokeLinecap:"round"}),{width:448,height:512})}),Sd=k().memo(function(mb){mb.theme;
return t((0,z.jsx)("path",{d:"M16,292L432,292C440.837,292 448,284.837 448,276L448,236C448,227.163 440.837,220 432,220L16,220C7.163,220 0,227.163 0,236L0,276C0,284.837 7.163,292 16,292ZM16,452L432,452C440.837,452 448,444.837 448,436L448,396C448,387.163 440.837,380 432,380L16,380C7.163,380 0,387.163 0,396L0,436C0,444.837 7.163,452 16,452Z",fill:"var(--icon-fill-color)",strokeLinecap:"round"}),{width:448,height:512})}),Nb=k().memo(function(mb){mb.theme;return t((0,z.jsx)("path",{transform:"matrix(1,0,0,1,0,80)",
d:"M16,132L432,132C440.837,132 448,124.837 448,116L448,76C448,67.163 440.837,60 432,60L16,60C7.163,60 0,67.163 0,76L0,116C0,124.837 7.163,132 16,132ZM16,292L432,292C440.837,292 448,284.837 448,276L448,236C448,227.163 440.837,220 432,220L16,220C7.163,220 0,227.163 0,236L0,276C0,284.837 7.163,292 16,292Z",fill:"var(--icon-fill-color)",strokeLinecap:"round"}),{width:448,height:512})}),gc=t((0,z.jsx)("path",{d:"M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z",
fill:"currentColor"}),{width:640,height:512}),Yb=t((0,z.jsx)("path",{fill:"currentColor",d:"M402.3 344.9l32-32c5-5 13.7-1.5 13.7 5.7V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h273.5c7.1 0 10.7 8.6 5.7 13.7l-32 32c-1.5 1.5-3.5 2.3-5.7 2.3H48v352h352V350.5c0-2.1.8-4.1 2.3-5.6zm156.6-201.8L296.3 405.7l-90.4 10c-26.2 2.9-48.5-19.2-45.6-45.6l10-90.4L432.9 17.1c22.9-22.9 59.9-22.9 82.7 0l43.2 43.2c22.9 22.9 22.9 60 .1 82.8zM460.1 174L402 115.9 216.2 301.8l-7.3 65.3 65.3-7.3L460.1 174zm64.8-79.7l-43.2-43.2c-4.1-4.1-10.8-4.1-14.8 0L436 82l58.1 58.1 30.9-30.9c4-4.2 4-10.8-.1-14.9z"}),
{width:640,height:512}),qb=t((0,z.jsx)("path",{d:"M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z"}))},8288:function(k,h,f){f.d(h,{$C:function(){return Y},$e:function(){return t},$n:function(){return Sa},C6:function(){return H},
EE:function(){return Na},EH:function(){return za},Gj:function(){return K},HM:function(){return ea},Hg:function(){return D},Iw:function(){return u},Kr:function(){return ib},Ks:function(){return w},LL:function(){return ha},LO:function(){return ba},Oh:function(){return L},UO:function(){return Ha},V4:function(){return ca},Vi:function(){return ma},Yx:function(){return fb},ZB:function(){return Ca},ZF:function(){return ya},_D:function(){return aa},ah:function(){return Ua},ay:function(){return R},cW:function(){return Ea},
eF:function(){return Oa},f:function(){return J},gK:function(){return Ob},h6:function(){return Aa},hR:function(){return Bb},hs:function(){return O},iC:function(){return x},jo:function(){return Ja},k:function(){return P},kV:function(){return Za},n5:function(){return M},nM:function(){return Z},oX:function(){return Wb},oc:function(){return ka},pb:function(){return F},qx:function(){return z},qy:function(){return ra},r8:function(){return X},rk:function(){return Q},sA:function(){return pa},sS:function(){return Ma},
sk:function(){return eb},ut:function(){return fa},wZ:function(){return n},xY:function(){return ic},zK:function(){return oa}});var w;k=f(8635);f=f.n(k);var x="Excalidraw",J=10,z=8,u=5,t=1,n=30,R=Math.PI/12,ka={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},L={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1};!function(Pa){Pa.COPY="copy";Pa.PASTE="paste";Pa.CUT="cut";Pa.KEYDOWN="keydown";Pa.KEYUP="keyup";Pa.MOUSE_MOVE="mousemove";Pa.RESIZE="resize";Pa.UNLOAD=
"unload";Pa.FOCUS="focus";Pa.BLUR="blur";Pa.DRAG_OVER="dragover";Pa.DROP="drop";Pa.GESTURE_END="gestureend";Pa.BEFORE_UNLOAD="beforeunload";Pa.GESTURE_START="gesturestart";Pa.GESTURE_CHANGE="gesturechange";Pa.POINTER_MOVE="pointermove";Pa.POINTER_UP="pointerup";Pa.STATE_CHANGE="statechange";Pa.WHEEL="wheel";Pa.TOUCH_START="touchstart";Pa.TOUCH_END="touchend";Pa.HASHCHANGE="hashchange";Pa.VISIBILITY_CHANGE="visibilitychange";Pa.SCROLL="scroll";Pa.EXCALIDRAW_LINK="excalidraw-link"}(w||={});var ma={TEST:"test",
DEVELOPMENT:"development"},Y={SHAPE_ACTIONS_MENU:"App-menu__left"},fa={Virgil:1,Helvetica:2,Cascadia:3},H={LIGHT:"light",DARK:"dark"},aa="Segoe UI Emoji",M=20,Q=fa.Virgil,D="left",O="top",P=20,ba={excalidraw:"application/vnd.excalidraw+json",excalidrawlib:"application/vnd.excalidrawlib+json",json:"application/json",svg:"image/svg+xml","excalidraw.svg":"image/svg+xml",png:"image/png","excalidraw.png":"image/png",jpg:"image/jpeg",gif:"image/gif",binary:"application/octet-stream"},X={excalidraw:"excalidraw",
excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib"},F=window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,ha=500,K=300,Z=500,ea=100,ca=.1,pa=300,za={VIEW:"viewMode",ZEN:"zenMode",GRID:"gridMode"},ya=f().themeFilter,Ha={addLibrary:"addLibrary"},Ua={addLibrary:"addLibrary"},Ea={canvasActions:{changeViewBackgroundColor:!0,clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,theme:!0,saveAsImage:!0}},Oa=640,Za=730,Ma=1E3,fb=500,eb=1229,Na=parseInt(f().rightSidebarWidth),
oa=2,Ca=[1,2,3],ra=10,Aa=1440,Ja=[ba.png,ba.jpg,ba.svg,ba.gif],Sa=2097152,Bb="http://www.w3.org/2000/svg",ib={excalidraw:2,excalidrawLibrary:2},Ob=5,Wb={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},ic=20},434:function(k,h,f){function w(Na,oa){var Ca=Object.keys(Na);if(Object.getOwnPropertySymbols){var ra=Object.getOwnPropertySymbols(Na);oa&&(ra=ra.filter(function(Aa){return Object.getOwnPropertyDescriptor(Na,Aa).enumerable}));Ca.push.apply(Ca,ra)}return Ca}function x(Na){for(var oa=1;oa<arguments.length;oa++){var Ca=
null!=arguments[oa]?arguments[oa]:{};oa%2?w(Object(Ca),!0).forEach(function(ra){(0,u.Z)(Na,ra,Ca[ra])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Na,Object.getOwnPropertyDescriptors(Ca)):w(Object(Ca)).forEach(function(ra){Object.defineProperty(Na,ra,Object.getOwnPropertyDescriptor(Ca,ra))})}return Na}f.d(h,{DQ:function(){return ba},KG:function(){return ya},Pn:function(){return Ua},Qk:function(){return P},Sf:function(){return za},Tu:function(){return Ha},Wr:function(){return F},ZY:function(){return ha},
_c:function(){return ca},bv:function(){return Ea},cT:function(){return K},g8:function(){return X},gY:function(){return fb},lV:function(){return ea},tW:function(){return pa},vZ:function(){return eb},wf:function(){return Z}});var J=f(1930),z=f(2577),u=f(7169),t=f(8950);k=f(7945);var n=f.n(k),R=f(5605),ka=f(8897),L=f(8288),ma=f(5118),Y=f(6797),fa=f(8211),H=f(75),aa=f(6340),M=f(1393),Q=f(5523),D=f(679),O=function(){var Na=(0,t.Z)(n().mark(function ra(Ca){var Aa;return n().wrap(function(Ja){for(;;)switch(Ja.prev=
Ja.next){case 0:if(Ca.type!==L.LO.png){Ja.next=18;break}return Ja.prev=1,Ja.next=4,Promise.resolve().then(f.bind(f,673));case 4:return Ja.next=6,Ja.sent.decodePngMetadata(Ca);case 6:return Ja.abrupt("return",Ja.sent);case 9:if(Ja.prev=9,Ja.t0=Ja.catch(1),"INVALID"!==Ja.t0.message){Ja.next=15;break}throw new DOMException((0,fa.t)("alerts.imageDoesNotContainScene"),"EncodingError");case 15:throw new DOMException((0,fa.t)("alerts.cannotRestoreFromImage"),"EncodingError");case 16:Ja.next=43;break;case 18:if(!("text"in
Blob)){Ja.next=24;break}return Ja.next=21,Ca.text();case 21:Aa=Ja.sent;Ja.next=27;break;case 24:return Ja.next=26,new Promise(function(Sa){var Bb=new FileReader;Bb.readAsText(Ca,"utf8");Bb.onloadend=function(){Bb.readyState===FileReader.DONE&&Sa(Bb.result)}});case 26:Aa=Ja.sent;case 27:if(Ca.type!==L.LO.svg){Ja.next=43;break}return Ja.prev=28,Ja.next=31,Promise.resolve().then(f.bind(f,673));case 31:return Ja.next=33,Ja.sent.decodeSvgMetadata({svg:Aa});case 33:return Ja.abrupt("return",Ja.sent);case 36:if(Ja.prev=
36,Ja.t1=Ja.catch(28),"INVALID"!==Ja.t1.message){Ja.next=42;break}throw new DOMException((0,fa.t)("alerts.imageDoesNotContainScene"),"EncodingError");case 42:throw new DOMException((0,fa.t)("alerts.cannotRestoreFromImage"),"EncodingError");case 43:return Ja.abrupt("return",Aa);case 44:case "end":return Ja.stop()}},ra,null,[[1,9],[28,36]])}));return function(Ca){return Na.apply(this,arguments)}}(),P=function(Na){var oa;return Na&&(null===(oa=Na.name.match(/\.(json|excalidraw|png|svg)$/))||void 0===
oa?void 0:oa[1])||null},ba=function(Na){return"png"===Na||"svg"===Na},X=function(Na){Na=P(Na);return"png"===Na||"svg"===Na},F=function(Na){Na=(Na||{}).type;return!!Na&&L.jo.includes(Na)},ha=function(){var Na=(0,t.Z)(n().mark(function Sa(Ca,ra,Aa,Ja){var Bb,ib;return n().wrap(function(Ob){for(;;)switch(Ob.prev=Ob.next){case 0:return Ob.next=2,O(Ca);case 2:if(Bb=Ob.sent,Ob.prev=3,ib=JSON.parse(Bb),!(0,Q.dS)(ib)){Ob.next=9;break}return Ob.abrupt("return",{type:L.LO.excalidraw,data:(0,D.nu)({elements:(0,ma._M)(ib.elements||
[]),appState:x(x({theme:null==ra?void 0:ra.theme,fileHandle:Ja||Ca.handle||null},(0,ka.s)(ib.appState||{})),ra?(0,H.W)(ib.elements||[],ra,null):{}),files:ib.files},ra,Aa)});case 9:if(!(0,Q.HT)(ib)){Ob.next=11;break}return Ob.abrupt("return",{type:L.LO.excalidrawlib,data:ib});case 11:throw Error((0,fa.t)("alerts.couldNotLoadInvalidFile"));case 14:throw Ob.prev=14,Ob.t0=Ob.catch(3),console.error(Ob.t0.message),Error((0,fa.t)("alerts.couldNotLoadInvalidFile"));case 18:case "end":return Ob.stop()}},Sa,
null,[[3,14]])}));return function(Ca,ra,Aa,Ja){return Na.apply(this,arguments)}}(),K=function(){var Na=(0,t.Z)(n().mark(function Sa(Ca,ra,Aa,Ja){var Bb;return n().wrap(function(ib){for(;;)switch(ib.prev=ib.next){case 0:return ib.next=2,ha(Ca,ra,Aa,Ja);case 2:if((Bb=ib.sent).type===L.LO.excalidraw){ib.next=5;break}throw Error((0,fa.t)("alerts.couldNotLoadInvalidFile"));case 5:return ib.abrupt("return",Bb.data);case 6:case "end":return ib.stop()}},Sa)}));return function(Ca,ra,Aa,Ja){return Na.apply(this,
arguments)}}(),Z=function(Na){var oa=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"unpublished",Ca=JSON.parse(Na);if(!(0,Q.HT)(Ca))throw Error("Invalid library");return(0,D.wJ)(Ca.libraryItems||Ca.library,oa)},ea=function(){var Na=(0,t.Z)(n().mark(function ra(Ca){var Aa,Ja=arguments;return n().wrap(function(Sa){for(;;)switch(Sa.prev=Sa.next){case 0:return Aa=1<Ja.length&&void 0!==Ja[1]?Ja[1]:"unpublished",Sa.t0=Z,Sa.next=4,O(Ca);case 4:return Sa.t1=Sa.sent,Sa.t2=Aa,Sa.abrupt("return",(0,Sa.t0)(Sa.t1,
Sa.t2));case 7:case "end":return Sa.stop()}},ra)}));return function(Ca){return Na.apply(this,arguments)}}(),ca=function(){var Na=(0,t.Z)(n().mark(function ra(Ca){return n().wrap(function(Aa){for(;;)switch(Aa.prev=Aa.next){case 0:return Aa.abrupt("return",new Promise(function(Ja,Sa){try{Ca.toBlob(function(Bb){if(!Bb)return Sa(new Y.l((0,fa.t)("canvasError.canvasTooBig"),"CANVAS_POSSIBLY_TOO_BIG"));Ja(Bb)})}catch(Bb){Sa(Bb)}}));case 1:case "end":return Aa.stop()}},ra)}));return function(Ca){return Na.apply(this,
arguments)}}(),pa=function(){var Na=(0,t.Z)(n().mark(function ra(Ca){var Aa;return n().wrap(function(Ja){for(;;)switch(Ja.prev=Ja.next){case 0:return Ja.prev=0,Ja.t0=window.crypto.subtle,Ja.next=4,eb(Ca);case 4:return Ja.t1=Ja.sent,Ja.next=7,Ja.t0.digest.call(Ja.t0,"SHA-1",Ja.t1);case 7:return Aa=Ja.sent,Ja.abrupt("return",(0,aa.G3)(new Uint8Array(Aa)));case 11:return Ja.prev=11,Ja.t2=Ja.catch(0),console.error(Ja.t2),Ja.abrupt("return",(0,R.x0)(40));case 15:case "end":return Ja.stop()}},ra,null,[[0,
11]])}));return function(Ca){return Na.apply(this,arguments)}}(),za=function(){var Na=(0,t.Z)(n().mark(function ra(Ca){return n().wrap(function(Aa){for(;;)switch(Aa.prev=Aa.next){case 0:return Aa.abrupt("return",new Promise(function(Ja,Sa){var Bb=new FileReader;Bb.onload=function(){Ja(Bb.result)};Bb.onerror=function(ib){return Sa(ib)};Bb.readAsDataURL(Ca)}));case 1:case "end":return Aa.stop()}},ra)}));return function(Ca){return Na.apply(this,arguments)}}(),ya=function(Na){var oa=1<arguments.length&&
void 0!==arguments[1]?arguments[1]:"",Ca=Na.indexOf(","),ra=atob(Na.slice(Ca+1));Ca=Na.slice(0,Ca).split(":")[1].split(";")[0];for(var Aa=new ArrayBuffer(ra.length),Ja=new Uint8Array(Aa),Sa=0;Sa<ra.length;Sa++)Ja[Sa]=ra.charCodeAt(Sa);return new File([Aa],oa,{type:Ca})},Ha=function(){var Na=(0,t.Z)(n().mark(function Aa(Ca,ra){var Ja,Sa,Bb,ib,Ob,Wb;return n().wrap(function(ic){for(;;)switch(ic.prev=ic.next){case 0:if(Ca.type!==L.LO.svg){ic.next=2;break}return ic.abrupt("return",Ca);case 2:return ic.next=
4,Promise.all([f.e(736).then(f.t.bind(f,4881,23)).then(function(Pa){return Pa.default}),f.e(736).then(f.bind(f,100)).then(function(Pa){return Pa.default})]);case 4:if(Ja=ic.sent,Sa=(0,z.Z)(Ja,2),Bb=Sa[0],ib=Sa[1],Ob=ib({pica:Bb({features:["js","wasm"]})}),ra.outputType&&(Wb=ra.outputType,Ob._create_blob=function(Pa){return this.pica.toBlob(Pa.out_canvas,Wb,.8).then(function(nb){return Pa.out_blob=nb,Pa})}),F(Ca)){ic.next=12;break}throw Error((0,fa.t)("errors.unsupportedFileType"));case 12:return ic.t0=
File,ic.next=15,Ob.toBlob(Ca,{max:ra.maxWidthOrHeight});case 15:return ic.t1=ic.sent,ic.t2=[ic.t1],ic.t3=Ca.name,ic.t4={type:ra.outputType||Ca.type},ic.abrupt("return",new ic.t0(ic.t2,ic.t3,ic.t4));case 20:case "end":return ic.stop()}},Aa)}));return function(Ca,ra){return Na.apply(this,arguments)}}(),Ua=function(Na){var oa=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";return new File([(new TextEncoder).encode(Na)],oa,{type:L.LO.svg})},Ea=function(){var Na=(0,t.Z)(n().mark(function ra(Ca){var Aa,
Ja;return n().wrap(function(Sa){for(;;)switch(Sa.prev=Sa.next){case 0:return Aa=Ca.dataTransfer.files.item(0),Sa.next=3,Oa(Ca);case 3:if(Ja=Sa.sent,!Aa){Sa.next=10;break}return Sa.next=7,fb(Aa);case 7:Sa.t0=Sa.sent;Sa.next=11;break;case 10:Sa.t0=null;case 11:return Sa.t1=Sa.t0,Sa.t2=Ja,Sa.abrupt("return",{file:Sa.t1,fileHandle:Sa.t2});case 14:case "end":return Sa.stop()}},ra)}));return function(Ca){return Na.apply(this,arguments)}}(),Oa=function(){var Na=(0,t.Z)(n().mark(function ra(Ca){var Aa,Ja;
return n().wrap(function(Sa){for(;;)switch(Sa.prev=Sa.next){case 0:if(!M.kr){Sa.next=16;break}return Sa.prev=1,Aa=Ca.dataTransfer.items[0],Sa.next=5,Aa.getAsFileSystemHandle();case 5:if(Sa.t0=Sa.sent,Sa.t0){Sa.next=8;break}Sa.t0=null;case 8:return Ja=Sa.t0,Sa.abrupt("return",Ja);case 12:return Sa.prev=12,Sa.t1=Sa.catch(1),console.warn(Sa.t1.name,Sa.t1.message),Sa.abrupt("return",null);case 16:return Sa.abrupt("return",null);case 17:case "end":return Sa.stop()}},ra,null,[[1,12]])}));return function(Ca){return Na.apply(this,
arguments)}}(),Za=function(Na){var oa=null;Na="".concat((0,J.Z)((new Uint8Array(Na)).slice(0,8)).join(" ")," ");return"137 80 78 71 13 10 26 10 "===Na?oa=L.LO.png:Na.startsWith("255 216 255 ")?oa=L.LO.jpg:Na.startsWith("71 73 70 56 57 97 ")&&(oa=L.LO.gif),oa},Ma=function(Na,oa,Ca){return new File([Na],Ca||"",{type:oa})},fb=function(){var Na=(0,t.Z)(n().mark(function ra(Ca){var Aa,Ja,Sa,Bb,ib,Ob,Wb,ic;return n().wrap(function(Pa){for(;;)switch(Pa.prev=Pa.next){case 0:if(Ca.type){Pa.next=28;break}if(null===
(Aa=Ca)||void 0===Aa||null===(Ja=Aa.name)||void 0===Ja||!Ja.endsWith(".excalidrawlib")){Pa.next=11;break}return Pa.t0=Ma,Pa.next=5,eb(Ca);case 5:Pa.t1=Pa.sent;Pa.t2=L.LO.excalidrawlib;Pa.t3=Ca.name;Ca=(0,Pa.t0)(Pa.t1,Pa.t2,Pa.t3);Pa.next=26;break;case 11:if(null===(Sa=Ca)||void 0===Sa||null===(Bb=Sa.name)||void 0===Bb||!Bb.endsWith(".excalidraw")){Pa.next=21;break}return Pa.t4=Ma,Pa.next=15,eb(Ca);case 15:Pa.t5=Pa.sent;Pa.t6=L.LO.excalidraw;Pa.t7=Ca.name;Ca=(0,Pa.t4)(Pa.t5,Pa.t6,Pa.t7);Pa.next=26;
break;case 21:return Pa.next=23,eb(Ca);case 23:ib=Pa.sent,(Ob=Za(ib))&&(Ca=Ma(ib,Ob,Ca.name));case 26:Pa.next=34;break;case 28:if(!F(Ca)){Pa.next=34;break}return Pa.next=31,eb(Ca);case 31:Wb=Pa.sent,(ic=Za(Wb))&&ic!==Ca.type&&(Ca=Ma(Wb,ic,Ca.name));case 34:return Pa.abrupt("return",Ca);case 35:case "end":return Pa.stop()}},ra)}));return function(Ca){return Na.apply(this,arguments)}}(),eb=function(Na){return"arrayBuffer"in Na?Na.arrayBuffer():new Promise(function(oa,Ca){var ra=new FileReader;ra.onload=
function(Aa){var Ja;if(null===(Ja=Aa.target)||void 0===Ja||!Ja.result)return Ca(Error("Couldn't convert blob to ArrayBuffer"));oa(Aa.target.result)};ra.readAsArrayBuffer(Na)})}},1393:function(k,h,f){function w(){return w=(0,z.Z)(u.mark(function aa(){var M,Q=arguments;return u.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,n;case 2:return D.abrupt("return",(M=D.sent).default.apply(M,Q));case 3:case "end":return D.stop()}},aa)})),w.apply(this,arguments)}function x(){return x=(0,z.Z)(u.mark(function aa(){var M,
Q=arguments;return u.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,R;case 2:return D.abrupt("return",(M=D.sent).default.apply(M,Q));case 3:case "end":return D.stop()}},aa)})),x.apply(this,arguments)}f.d(h,{I$:function(){return Y},NL:function(){return fa},kr:function(){return t}});var J=f(1930),z=f(8950),u=f(7945),t=function(){if("undefined"==typeof self)return!1;if("top"in self&&self!==top)try{top}catch(H){}else if("showOpenFilePicker"in self)return"showOpenFilePicker";return!1}(),
n=t?f.e(736).then(f.bind(f,2254)):f.e(736).then(f.bind(f,3499));t?f.e(736).then(f.bind(f,6474)):f.e(736).then(f.bind(f,9521));var R=t?f.e(736).then(f.bind(f,9475)):f.e(736).then(f.bind(f,6281)),ka=f(8288),L=f(6797),ma=f(6340),Y=function(H){var aa,M,Q,D=null===(aa=H.extensions)||void 0===aa?void 0:aa.reduce(function(O,P){return O.push(ka.LO[P]),O},[]);aa=null===(M=H.extensions)||void 0===M?void 0:M.reduce(function(O,P){return"jpg"===P?O.concat(".jpg",".jpeg"):O.concat(".".concat(P))},[]);return function(){return w.apply(this,
arguments)}({description:H.description,extensions:aa,mimeTypes:D,multiple:null!==(Q=H.multiple)&&void 0!==Q&&Q,legacySetup:function(O,P,ba){var X=(0,ma.Ds)(P,500),F=function(){ha();document.addEventListener(ka.Ks.KEYUP,X);document.addEventListener(ka.Ks.POINTER_UP,X);X()},ha=function(){var Z;null!==(Z=ba.files)&&void 0!==Z&&Z.length&&(Z=H.multiple?(0,J.Z)(ba.files):ba.files[0],O(Z))};requestAnimationFrame(function(){window.addEventListener(ka.Ks.FOCUS,F)});var K=window.setInterval(function(){ha()},
500);return function(Z){clearInterval(K);X.cancel();window.removeEventListener(ka.Ks.FOCUS,F);document.removeEventListener(ka.Ks.KEYUP,X);document.removeEventListener(ka.Ks.POINTER_UP,X);Z&&(console.warn("Opening the file was canceled (legacy-fs)."),Z(new L._))}}})},fa=function(H,aa){return function(){return x.apply(this,arguments)}(H,{fileName:"".concat(aa.name,".").concat(aa.extension),description:aa.description,extensions:[".".concat(aa.extension)]},aa.fileHandle)}},673:function(k,h,f){f.r(h);
f.d(h,{decodePngMetadata:function(){return D},decodeSvgMetadata:function(){return P},encodePngMetadata:function(){return Q},encodeSvgMetadata:function(){return O},getTEXtChunk:function(){return M}});var w=f(8950);k=f(7945);var x=f.n(k);k=f(2983);var J=f.n(k),z=f(1194);k=f(3434);var u=f.n(k),t=f(2744),n=f(8288),R=f(434),ka=function(ba){return new Promise(function(X,F){var ha="string"==typeof ba?new Blob([(new TextEncoder).encode(ba)]):new Blob([ba instanceof Uint8Array?ba:new Uint8Array(ba)]),K=new FileReader;
K.onload=function(Z){if(!Z.target||"string"!=typeof Z.target.result)return F(Error("couldn't convert to byte string"));X(Z.target.result)};K.readAsBinaryString(ha)})},L=function(ba){for(var X=new ArrayBuffer(ba.length),F=new Uint8Array(X),ha=0,K=ba.length;ha<K;ha++)F[ha]=ba.charCodeAt(ha);return X},ma=function(ba){return(new TextDecoder("utf-8")).decode(L(ba))},Y=function(){var ba=(0,w.Z)(x().mark(function ha(F){var K=arguments;return x().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(!(1<
K.length&&void 0!==K[1]&&K[1])){Z.next=5;break}Z.t0=window.btoa(F);Z.next=10;break;case 5:return Z.t1=window,Z.next=8,ka(F);case 8:Z.t2=Z.sent,Z.t0=Z.t1.btoa.call(Z.t1,Z.t2);case 10:return Z.abrupt("return",Z.t0);case 11:case "end":return Z.stop()}},ha)}));return function(F){return ba.apply(this,arguments)}}(),fa=function(){var ba=(0,w.Z)(x().mark(function ha(F){var K,Z=arguments;return x().wrap(function(ea){for(;;)switch(ea.prev=ea.next){case 0:return K=1<Z.length&&void 0!==Z[1]&&Z[1],ea.abrupt("return",
K?window.atob(F):ma(window.atob(F)));case 2:case "end":return ea.stop()}},ha)}));return function(F){return ba.apply(this,arguments)}}(),H=function(){var ba=(0,w.Z)(x().mark(function ha(F){var K,Z;return x().wrap(function(ea){for(;;)switch(ea.prev=ea.next){case 0:if(K=F.text,!1===F.compress){ea.next=11;break}return ea.prev=2,ea.next=5,ka((0,t.deflate)(K));case 5:Z=ea.sent;ea.next=11;break;case 8:ea.prev=8,ea.t0=ea.catch(2),console.error("encode: cannot deflate",ea.t0);case 11:if(ea.t1=!!Z,ea.t2=Z,
ea.t2){ea.next=17;break}return ea.next=16,ka(K);case 16:ea.t2=ea.sent;case 17:return ea.t3=ea.t2,ea.abrupt("return",{version:"1",encoding:"bstring",compressed:ea.t1,encoded:ea.t3});case 19:case "end":return ea.stop()}},ha,null,[[2,8]])}));return function(F){return ba.apply(this,arguments)}}(),aa=function(){var ba=(0,w.Z)(x().mark(function ha(F){var K;return x().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:Z.t0=F.encoding;Z.next="bstring"===Z.t0?3:12;break;case 3:if(!F.compressed){Z.next=7;
break}Z.t1=F.encoded;Z.next=10;break;case 7:return Z.next=9,ma(F.encoded);case 9:Z.t1=Z.sent;case 10:return K=Z.t1,Z.abrupt("break",13);case 12:throw Error('decode: unknown encoding "'.concat(F.encoding,'"'));case 13:if(!F.compressed){Z.next=15;break}return Z.abrupt("return",(0,t.inflate)(new Uint8Array(L(K)),{to:"string"}));case 15:return Z.abrupt("return",K);case 16:case "end":return Z.stop()}},ha)}));return function(F){return ba.apply(this,arguments)}}(),M=function(){var ba=(0,w.Z)(x().mark(function ha(F){var K,
Z;return x().wrap(function(ea){for(;;)switch(ea.prev=ea.next){case 0:return ea.t0=J(),ea.t1=Uint8Array,ea.next=4,(0,R.vZ)(F);case 4:if(ea.t2=ea.sent,ea.t3=new ea.t1(ea.t2),K=(0,ea.t0)(ea.t3),!(Z=K.find(function(ca){return"tEXt"===ca.name}))){ea.next=10;break}return ea.abrupt("return",z.decode(Z.data));case 10:return ea.abrupt("return",null);case 11:case "end":return ea.stop()}},ha)}));return function(F){return ba.apply(this,arguments)}}(),Q=function(){var ba=(0,w.Z)(x().mark(function ha(F){var K,
Z,ea,ca;return x().wrap(function(pa){for(;;)switch(pa.prev=pa.next){case 0:return K=F.blob,Z=F.metadata,pa.t0=J(),pa.t1=Uint8Array,pa.next=5,(0,R.vZ)(K);case 5:return pa.t2=pa.sent,pa.t3=new pa.t1(pa.t2),ea=(0,pa.t0)(pa.t3),pa.t4=z,pa.t5=n.LO.excalidraw,pa.t6=JSON,pa.next=13,H({text:Z,compress:!0});case 13:return pa.t7=pa.sent,pa.t8=pa.t6.stringify.call(pa.t6,pa.t7),ca=pa.t4.encode.call(pa.t4,pa.t5,pa.t8),ea.splice(-1,0,ca),pa.abrupt("return",new Blob([u()(ea)],{type:n.LO.png}));case 18:case "end":return pa.stop()}},
ha)}));return function(F){return ba.apply(this,arguments)}}(),D=function(){var ba=(0,w.Z)(x().mark(function ha(F){var K,Z;return x().wrap(function(ea){for(;;)switch(ea.prev=ea.next){case 0:return ea.next=2,M(F);case 2:if((null==(K=ea.sent)?void 0:K.keyword)!==n.LO.excalidraw){ea.next=19;break}if(ea.prev=4,"encoded"in(Z=JSON.parse(K.text))){ea.next=10;break}if(!("type"in Z)||Z.type!==n.r8.excalidraw){ea.next=9;break}return ea.abrupt("return",K.text);case 9:throw Error("FAILED");case 10:return ea.next=
12,aa(Z);case 12:return ea.abrupt("return",ea.sent);case 15:throw ea.prev=15,ea.t0=ea.catch(4),console.error(ea.t0),Error("FAILED");case 19:throw Error("INVALID");case 20:case "end":return ea.stop()}},ha,null,[[4,15]])}));return function(F){return ba.apply(this,arguments)}}(),O=function(){var ba=(0,w.Z)(x().mark(function ha(F){var K,Z,ea;return x().wrap(function(ca){for(;;)switch(ca.prev=ca.next){case 0:return K=F.text,ca.t0=Y,ca.t1=JSON,ca.next=5,H({text:K});case 5:return ca.t2=ca.sent,ca.t3=ca.t1.stringify.call(ca.t1,
ca.t2),ca.next=9,(0,ca.t0)(ca.t3,!0);case 9:return Z=ca.sent,ea="",ea+="\x3c!-- payload-type:".concat(n.LO.excalidraw," --\x3e"),ea+="\x3c!-- payload-version:2 --\x3e",ea+="\x3c!-- payload-start --\x3e",ea+=Z,ea+="\x3c!-- payload-end --\x3e",ca.abrupt("return",ea);case 17:case "end":return ca.stop()}},ha)}));return function(F){return ba.apply(this,arguments)}}(),P=function(){var ba=(0,w.Z)(x().mark(function ha(F){var K,Z,ea,ca,pa,za,ya;return x().wrap(function(Ha){for(;;)switch(Ha.prev=Ha.next){case 0:if(!(K=
F.svg).includes("payload-type:".concat(n.LO.excalidraw))){Ha.next=26;break}if(Z=K.match(/\x3c!-- payload-start --\x3e\s*(.+?)\s*\x3c!-- payload-end --\x3e/)){Ha.next=5;break}throw Error("INVALID");case 5:return ea=K.match(/\x3c!-- payload-version:(\d+) --\x3e/),ca=(null==ea?void 0:ea[1])||"1",pa="1"!==ca,Ha.prev=8,Ha.next=11,fa(Z[1],pa);case 11:if(za=Ha.sent,"encoded"in(ya=JSON.parse(za))){Ha.next=17;break}if(!("type"in ya)||ya.type!==n.r8.excalidraw){Ha.next=16;break}return Ha.abrupt("return",za);
case 16:throw Error("FAILED");case 17:return Ha.next=19,aa(ya);case 19:return Ha.abrupt("return",Ha.sent);case 22:throw Ha.prev=22,Ha.t0=Ha.catch(8),console.error(Ha.t0),Error("FAILED");case 26:throw Error("INVALID");case 27:case "end":return Ha.stop()}},ha,null,[[8,22]])}));return function(F){return ba.apply(this,arguments)}}()},5523:function(k,h,f){function w(D,O){var P="undefined"!=typeof Symbol&&D[Symbol.iterator]||D["@@iterator"];if(!P){if(Array.isArray(D)||(P=function(K,Z){if(K){if("string"==
typeof K)return x(K,Z);var ea=Object.prototype.toString.call(K).slice(8,-1);"Object"===ea&&K.constructor&&(ea=K.constructor.name);if("Map"===ea||"Set"===ea)return Array.from(K);if("Arguments"===ea||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ea))return x(K,Z)}}(D))||O&&D&&"number"==typeof D.length){P&&(D=P);var ba=0;O=function(){};return{s:O,n:function(){return ba>=D.length?{done:!0}:{done:!1,value:D[ba++]}},e:function(K){throw K;},f:O}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}var X,F=!0,ha=!1;return{s:function(){P=P.call(D)},n:function(){var K=P.next();return F=K.done,K},e:function(K){ha=!0;X=K},f:function(){try{F||null==P.return||P.return()}finally{if(ha)throw X;}}}}function x(D,O){(null==O||O>D.length)&&(O=D.length);for(var P=0,ba=Array(O);P<O;P++)ba[P]=D[P];return ba}f.d(h,{HT:function(){return aa},I_:function(){return ma},NI:function(){return M},Um:function(){return Y},dS:function(){return H},n8:function(){return fa},t1:function(){return Q}});var J=f(6655),z=f(8950);
k=f(7945);var u=f.n(k),t=f(1393),n=f(8897),R=f(8288),ka=f(5118),L=f(434),ma=function(D,O,P,ba){var X=R.r8.excalidraw,F=R.Kr.excalidraw,ha=R.pb,K="local"===ba?(0,ka._M)(D):(0,ka.BQ)(D);O="local"===ba?(0,n.s)(O):(0,n.eS)(O);if("local"===ba){var Z;ba={};D=w(D);try{for(D.s();!(Z=D.n()).done;){var ea=Z.value;!ea.isDeleted&&"fileId"in ea&&ea.fileId&&P[ea.fileId]&&(ba[ea.fileId]=P[ea.fileId])}}catch(ca){D.e(ca)}finally{D.f()}P=ba}else P=void 0;return JSON.stringify({type:X,version:F,source:ha,elements:K,
appState:O,files:P},null,2)},Y=function(){var D=(0,z.Z)(u().mark(function F(P,ba,X){var ha,K,Z;return u().wrap(function(ea){for(;;)switch(ea.prev=ea.next){case 0:return ha=ma(P,ba,X,"local"),K=new Blob([ha],{type:R.LO.excalidraw}),ea.next=4,(0,t.NL)(K,{name:ba.name,extension:"excalidraw",description:"Excalidraw file",fileHandle:(0,L.g8)(ba.fileHandle)?null:ba.fileHandle});case 4:return Z=ea.sent,ea.abrupt("return",{fileHandle:Z});case 6:case "end":return ea.stop()}},F)}));return function(P,ba,X){return D.apply(this,
arguments)}}(),fa=function(){var D=(0,z.Z)(u().mark(function X(P,ba){var F;return u().wrap(function(ha){for(;;)switch(ha.prev=ha.next){case 0:return ha.next=2,(0,t.I$)({description:"Excalidraw files"});case 2:return F=ha.sent,ha.t0=L.cT,ha.next=6,(0,L.gY)(F);case 6:return ha.t1=ha.sent,ha.t2=P,ha.t3=ba,ha.t4=F.handle,ha.abrupt("return",(0,ha.t0)(ha.t1,ha.t2,ha.t3,ha.t4));case 11:case "end":return ha.stop()}},X)}));return function(P,ba){return D.apply(this,arguments)}}(),H=function(D){return(null==
D?void 0:D.type)===R.r8.excalidraw&&(!D.elements||Array.isArray(D.elements)&&(!D.appState||"object"===(0,J.Z)(D.appState)))},aa=function(D){return"object"===(0,J.Z)(D)&&D&&D.type===R.r8.excalidrawLibrary&&(1===D.version||2===D.version)},M=function(D){return JSON.stringify({type:R.r8.excalidrawLibrary,version:R.Kr.excalidrawLibrary,source:R.pb,libraryItems:D},null,2)},Q=function(){var D=(0,z.Z)(u().mark(function ba(P){var X;return u().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return X=M(P),
F.next=3,(0,t.NL)(new Blob([X],{type:R.LO.excalidrawlib}),{name:"library",extension:"excalidrawlib",description:"Excalidraw library file"});case 3:case "end":return F.stop()}},ba)}));return function(P){return D.apply(this,arguments)}}()},7053:function(k,h,f){function w(Z,ea){var ca=Object.keys(Z);if(Object.getOwnPropertySymbols){var pa=Object.getOwnPropertySymbols(Z);ea&&(pa=pa.filter(function(za){return Object.getOwnPropertyDescriptor(Z,za).enumerable}));ca.push.apply(ca,pa)}return ca}function x(Z){for(var ea=
1;ea<arguments.length;ea++){var ca=null!=arguments[ea]?arguments[ea]:{};ea%2?w(Object(ca),!0).forEach(function(pa){(0,u.Z)(Z,pa,ca[pa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Z,Object.getOwnPropertyDescriptors(ca)):w(Object(ca)).forEach(function(pa){Object.defineProperty(Z,pa,Object.getOwnPropertyDescriptor(ca,pa))})}return Z}function J(Z,ea){var ca="undefined"!=typeof Symbol&&Z[Symbol.iterator]||Z["@@iterator"];if(!ca){if(Array.isArray(Z)||(ca=function(Ua,Ea){if(Ua){if("string"==
typeof Ua)return z(Ua,Ea);var Oa=Object.prototype.toString.call(Ua).slice(8,-1);"Object"===Oa&&Ua.constructor&&(Oa=Ua.constructor.name);if("Map"===Oa||"Set"===Oa)return Array.from(Ua);if("Arguments"===Oa||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Oa))return z(Ua,Ea)}}(Z))||ea&&Z&&"number"==typeof Z.length){ca&&(Z=ca);var pa=0;ea=function(){};return{s:ea,n:function(){return pa>=Z.length?{done:!0}:{done:!1,value:Z[pa++]}},e:function(Ua){throw Ua;},f:ea}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}var za,ya=!0,Ha=!1;return{s:function(){ca=ca.call(Z)},n:function(){var Ua=ca.next();return ya=Ua.done,Ua},e:function(Ua){Ha=!0;za=Ua},f:function(){try{ya||null==ca.return||ca.return()}finally{if(Ha)throw za;}}}}function z(Z,ea){(null==ea||ea>Z.length)&&(ea=Z.length);for(var ca=0,pa=Array(ea);ca<ea;ca++)pa[ca]=Z[ca];return pa}f.d(h,{Di:function(){return ha},WV:function(){return F},rF:function(){return O},xS:function(){return K},zh:function(){return X}});var u=f(7169),t=f(8950);k=f(5169);var n=f(8821),
R=f(1930),ka=f(7945),L=f.n(ka),ma=f(434),Y=f(679);ka=f(4739);var fa=f(9487),H=f(8925),aa=f(6797),M=f(8211),Q=f(9787),D=f(8288),O=(0,ka.cn)({status:"loaded",isInitialized:!0,libraryItems:[]}),P=function(Z){return JSON.parse(JSON.stringify(Z))},ba=function(Z,ea){return!Z.find(function(ca){return ca.elements.length===ea.elements.length&&ca.elements.every(function(pa,za){return pa.id===ea.elements[za].id&&pa.versionNonce===ea.elements[za].versionNonce})})},X=function(Z,ea){var ca,pa=[];ea=J(ea);try{for(ea.s();!(ca=
ea.n()).done;){var za=ca.value;ba(Z,za)&&pa.push(za)}}catch(ya){ea.e(ya)}finally{ea.f()}return[].concat(pa,(0,R.Z)(Z))};f=(0,k.Z)(function ca(ea){var pa=this;(0,n.Z)(this,ca);this.lastLibraryItems=[];this.isInitialized=!1;this.updateQueue=[];this.getLastUpdateTask=function(){return pa.updateQueue[pa.updateQueue.length-1]};this.notifyListeners=function(){if(0<pa.updateQueue.length)fa.e_.set(O,{status:"loading",libraryItems:pa.lastLibraryItems,isInitialized:pa.isInitialized});else{pa.isInitialized=
!0;fa.e_.set(O,{status:"loaded",libraryItems:pa.lastLibraryItems,isInitialized:pa.isInitialized});try{var za,ya;null===(za=(ya=pa.app.props).onLibraryChange)||void 0===za||za.call(ya,P(pa.lastLibraryItems))}catch(Ha){console.error(Ha)}}};this.resetLibrary=function(){return pa.setLibrary([])};this.getLatestLibrary=function(){return new Promise(function(){var za=(0,t.Z)(L().mark(function Ua(Ha){var Ea;return L().wrap(function(Oa){for(;;)switch(Oa.prev=Oa.next){case 0:return Oa.prev=0,Oa.next=3,pa.getLastUpdateTask()||
pa.lastLibraryItems;case 3:Ea=Oa.sent;0<pa.updateQueue.length?Ha(pa.getLatestLibrary()):Ha(P(Ea));Oa.next=10;break;case 7:return Oa.prev=7,Oa.t0=Oa.catch(0),Oa.abrupt("return",Ha(pa.lastLibraryItems));case 10:case "end":return Oa.stop()}},Ua,null,[[0,7]])}));return function(Ha){return za.apply(this,arguments)}}())};this.updateLibrary=function(){var za=(0,t.Z)(L().mark(function Ua(Ha){var Ea,Oa,Za,Ma,fb,eb,Na,oa,Ca;return L().wrap(function(ra){for(;;)switch(ra.prev=ra.next){case 0:return Ea=Ha.libraryItems,
Oa=Ha.prompt,Za=void 0!==Oa&&Oa,Ma=Ha.merge,fb=void 0!==Ma&&Ma,eb=Ha.openLibraryMenu,Na=void 0!==eb&&eb,oa=Ha.defaultStatus,Ca=void 0===oa?"unpublished":oa,Na&&pa.app.setState({isLibraryOpen:!0}),ra.abrupt("return",pa.setLibrary(function(){return new Promise(function(){var Aa=(0,t.Z)(L().mark(function ib(Sa,Bb){var Ob,Wb;return L().wrap(function(ic){for(;;)switch(ic.prev=ic.next){case 0:return ic.prev=0,ic.next=3,"function"==typeof Ea?Ea(pa.lastLibraryItems):Ea;case 3:if(!((Ob=ic.sent)instanceof Blob)){ic.next=
10;break}return ic.next=7,(0,ma.lV)(Ob,Ca);case 7:Wb=ic.sent;ic.next=11;break;case 10:Wb=(0,Y.wJ)(Ob,Ca);case 11:!Za||window.confirm((0,M.t)("alerts.confirmAddLibrary",{numShapes:Wb.length}))?Sa(fb?X(pa.lastLibraryItems,Wb):Wb):Bb(new aa._);ic.next=17;break;case 14:ic.prev=14,ic.t0=ic.catch(0),Bb(ic.t0);case 17:case "end":return ic.stop()}},ib,null,[[0,14]])}));return function(Sa,Bb){return Aa.apply(this,arguments)}}())}).finally(function(){pa.app.focusContainer()}));case 3:case "end":return ra.stop()}},
Ua)}));return function(Ha){return za.apply(this,arguments)}}();this.setLibrary=function(za){var ya=(new Promise(function(){var Ha=(0,t.Z)(L().mark(function Za(Ea,Oa){return L().wrap(function(Ma){for(;;)switch(Ma.prev=Ma.next){case 0:return Ma.prev=0,Ma.next=3,pa.getLastUpdateTask();case 3:return"function"==typeof za&&(za=za(pa.lastLibraryItems)),Ma.t0=P,Ma.next=7,za;case 7:Ma.t1=Ma.sent;pa.lastLibraryItems=(0,Ma.t0)(Ma.t1);Ea(pa.lastLibraryItems);Ma.next=15;break;case 12:Ma.prev=12,Ma.t2=Ma.catch(0),
Oa(Ma.t2);case 15:case "end":return Ma.stop()}},Za,null,[[0,12]])}));return function(Ea,Oa){return Ha.apply(this,arguments)}}())).catch(function(Ha){if("AbortError"===Ha.name)return console.warn("Library update aborted by user"),pa.lastLibraryItems;throw Ha;}).finally(function(){pa.updateQueue=pa.updateQueue.filter(function(Ha){return Ha!==ya});pa.notifyListeners()});return pa.updateQueue.push(ya),pa.notifyListeners(),ya};this.app=ea});h.ZP=f;var F=function(ea){var ca,pa=Math.ceil(Math.sqrt(ea.length)),
za=[],ya=0,Ha=0,Ua=0,Ea=0,Oa=0,Za=0,Ma=0,fb=J(ea);try{var eb=function(){var Na=ca.value;Oa&&0==Oa%pa&&(Ha+=Ua+50,ya=0,Za=0,Ma++);0===Za&&(Ua=function(Sa){return ea.slice(Sa*pa,Sa*pa+pa).reduce(function(Bb,ib){ib=(0,H.v2)(ib.elements).height;return Math.max(Bb,ib)},0)}(Ma));Ea=function(Sa){var Bb,ib=0,Ob=0,Wb=0,ic=J(ea);try{for(ic.s();!(Bb=ic.n()).done;){var Pa=Bb.value;if(0==ib%pa&&(Ob=0),Ob===Sa){var nb=(0,H.v2)(Pa.elements).width;Wb=Math.max(Wb,nb)}ib++;Ob++}}catch(ob){ic.e(ob)}finally{ic.f()}return Wb}(Za);
var oa=(0,H.v2)(Na.elements),Ca=oa.minX,ra=oa.minY,Aa=(Ea-oa.width)/2,Ja=(Ua-oa.height)/2;za.push.apply(za,(0,R.Z)(Na.elements.map(function(Sa){return x(x({},Sa),{},{x:Sa.x+ya+Aa-Ca,y:Sa.y+Ha+Ja-ra})})));ya+=Ea+50;Oa++;Za++};for(fb.s();!(ca=fb.n()).done;)eb()}catch(Na){fb.e(Na)}finally{fb.f()}return za},ha=function(){var ea=(new URLSearchParams(window.location.hash.slice(1))).get(D.ah.addLibrary)||(new URLSearchParams(window.location.search)).get(D.UO.addLibrary),ca=ea?(new URLSearchParams(window.location.hash.slice(1))).get("token"):
null;return ea?{libraryUrl:ea,idToken:ca}:null},K=function(ea){var ca=ea.excalidrawAPI,pa=(0,Q.useRef)(ea.getInitialLibraryItems);(0,Q.useEffect)(function(){if(ca){var za=function(Ua){var Ea=Ua.libraryUrl;Ua=Ua.idToken;if(window.location.hash.includes(D.ah.addLibrary)){var Oa=new URLSearchParams(window.location.hash.slice(1));Oa.delete(D.ah.addLibrary);window.history.replaceState({},D.iC,"#".concat(Oa.toString()))}else window.location.search.includes(D.UO.addLibrary)&&(Oa=new URLSearchParams(window.location.search),
Oa.delete(D.UO.addLibrary),window.history.replaceState({},D.iC,"?".concat(Oa.toString())));ca.updateLibrary({libraryItems:new Promise(function(){var Za=(0,t.Z)(L().mark(function Na(fb,eb){var oa,Ca;return L().wrap(function(ra){for(;;)switch(ra.prev=ra.next){case 0:return ra.prev=0,ra.next=3,fetch(decodeURIComponent(Ea));case 3:return oa=ra.sent,ra.next=6,oa.blob();case 6:Ca=ra.sent;fb(Ca);ra.next=13;break;case 10:ra.prev=10,ra.t0=ra.catch(0),eb(ra.t0);case 13:case "end":return ra.stop()}},Na,null,
[[0,10]])}));return function(fb,eb){return Za.apply(this,arguments)}}()),prompt:Ua!==ca.id,merge:!0,defaultStatus:"published",openLibraryMenu:!0})},ya=function(Ua){Ua.preventDefault();var Ea=ha();Ea&&(Ua.stopImmediatePropagation(),window.history.replaceState({},"",Ua.oldURL),za(Ea))};pa.current&&ca.updateLibrary({libraryItems:pa.current()});var Ha=ha();return Ha&&za(Ha),window.addEventListener(D.Ks.HASHCHANGE,ya),function(){window.removeEventListener(D.Ks.HASHCHANGE,ya)}}},[ca])}},679:function(k,
h,f){function w(F,ha){var K="undefined"!=typeof Symbol&&F[Symbol.iterator]||F["@@iterator"];if(!K){if(Array.isArray(F)||(K=function(za,ya){if(za){if("string"==typeof za)return x(za,ya);var Ha=Object.prototype.toString.call(za).slice(8,-1);"Object"===Ha&&za.constructor&&(Ha=za.constructor.name);if("Map"===Ha||"Set"===Ha)return Array.from(za);if("Arguments"===Ha||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ha))return x(za,ya)}}(F))||ha&&F&&"number"==typeof F.length){K&&(F=K);var Z=0;ha=function(){};
return{s:ha,n:function(){return Z>=F.length?{done:!0}:{done:!1,value:F[Z++]}},e:function(za){throw za;},f:ha}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var ea,ca=!0,pa=!1;return{s:function(){K=K.call(F)},n:function(){var za=K.next();return ca=za.done,za},e:function(za){pa=!0;ea=za},f:function(){try{ca||null==K.return||K.return()}finally{if(pa)throw ea;}}}}function x(F,ha){(null==ha||
ha>F.length)&&(ha=F.length);for(var K=0,Z=Array(ha);K<ha;K++)Z[K]=F[K];return Z}function J(F,ha){var K=Object.keys(F);if(Object.getOwnPropertySymbols){var Z=Object.getOwnPropertySymbols(F);ha&&(Z=Z.filter(function(ea){return Object.getOwnPropertyDescriptor(F,ea).enumerable}));K.push.apply(K,Z)}return K}function z(F){for(var ha=1;ha<arguments.length;ha++){var K=null!=arguments[ha]?arguments[ha]:{};ha%2?J(Object(K),!0).forEach(function(Z){(0,t.Z)(F,Z,K[Z])}):Object.getOwnPropertyDescriptors?Object.defineProperties(F,
Object.getOwnPropertyDescriptors(K)):J(Object(K)).forEach(function(Z){Object.defineProperty(F,Z,Object.getOwnPropertyDescriptor(K,Z))})}return F}f.d(h,{ET:function(){return D},lY:function(){return O},nu:function(){return P},wJ:function(){return X}});var u=f(2577),t=f(7169),n=f(5118),R=f(1974),ka=f(6954),L=f(8288),ma=f(8897),Y=f(6938),fa=f(1935),H=f(6340),aa={selection:!0,text:!0,rectangle:!0,diamond:!0,ellipse:!0,line:!0,image:!0,arrow:!0,freedraw:!0,eraser:!1,custom:!0},M=function(F,ha){var K,Z,
ea,ca,pa,za,ya,Ha,Ua,Ea,Oa,Za,Ma,fb,eb,Na={type:ha.type||F.type,version:F.version||1,versionNonce:null!==(K=F.versionNonce)&&void 0!==K?K:0,isDeleted:null!==(Z=F.isDeleted)&&void 0!==Z&&Z,id:F.id||(0,ka.kb)(),fillStyle:F.fillStyle||"hachure",strokeWidth:F.strokeWidth||1,strokeStyle:null!==(ea=F.strokeStyle)&&void 0!==ea?ea:"solid",roughness:null!==(ca=F.roughness)&&void 0!==ca?ca:1,opacity:null==F.opacity?100:F.opacity,angle:F.angle||0,x:null!==(pa=null!==(za=ha.x)&&void 0!==za?za:F.x)&&void 0!==
pa?pa:0,y:null!==(ya=null!==(Ha=ha.y)&&void 0!==Ha?Ha:F.y)&&void 0!==ya?ya:0,strokeColor:F.strokeColor,backgroundColor:F.backgroundColor,width:F.width||0,height:F.height||0,seed:null!==(Ua=F.seed)&&void 0!==Ua?Ua:1,groupIds:null!==(Ea=F.groupIds)&&void 0!==Ea?Ea:[],strokeSharpness:null!==(Oa=F.strokeSharpness)&&void 0!==Oa?Oa:(0,R.dt)(F.type)?"round":"sharp",boundElements:F.boundElementIds?F.boundElementIds.map(function(oa){return{type:"arrow",id:oa}}):null!==(Za=F.boundElements)&&void 0!==Za?Za:
[],updated:null!==(Ma=F.updated)&&void 0!==Ma?Ma:(0,H.C3)(),link:null!==(fb=F.link)&&void 0!==fb?fb:null,locked:null!==(eb=F.locked)&&void 0!==eb&&eb};return z(z(z({},Na),(0,n.Qp)(Na)),ha)},Q=function(F){var ha,K;switch(F.type){case "text":var Z=F.fontSize,ea=F.fontFamily;"font"in F&&(Z=F.font.split(" "),Z=(0,u.Z)(Z,2),ea=Z[1],Z=parseInt(Z[0],10),ea=Object.keys(L.ut).includes(ea)?L.ut[ea]:L.rk);return M(F,{fontSize:Z,fontFamily:ea,text:null!==(ha=F.text)&&void 0!==ha?ha:"",baseline:F.baseline,textAlign:F.textAlign||
L.Hg,verticalAlign:F.verticalAlign||L.hs,containerId:null!==(K=F.containerId)&&void 0!==K?K:null,originalText:F.originalText||F.text});case "freedraw":return M(F,{points:F.points,lastCommittedPoint:null,simulatePressure:F.simulatePressure,pressures:F.pressures});case "image":return M(F,{status:F.status||"pending",fileId:F.fileId,scale:F.scale||[1,1]});case "line":case "draw":case "arrow":ha=F.startArrowhead;ha=void 0===ha?null:ha;K=F.endArrowhead;K=void 0===K?"arrow"===F.type?"arrow":null:K;Z=F.x;
var ca=F.y;ea=!Array.isArray(F.points)||2>F.points.length?[[0,0],[F.width,F.height]]:F.points;if(0!==ea[0][0]||0!==ea[0][1])ca=Y._.getNormalizedPoints(F),ea=ca.points,Z=ca.x,ca=ca.y;return M(F,{type:"draw"===F.type?"line":F.type,startBinding:F.startBinding,endBinding:F.endBinding,lastCommittedPoint:null,startArrowhead:ha,endArrowhead:K,points:ea,x:Z,y:ca});case "ellipse":case "rectangle":case "diamond":return M(F,{})}},D=function(F,ha){var K=ha?(0,H.xn)(ha):null;return(F||[]).reduce(function(Z,ea){if("selection"!==
ea.type&&!(0,n.QD)(ea)){var ca=Q(ea);ca&&((ea=null==K?void 0:K.get(ea.id))&&ea.version>ca.version&&(ca=(0,fa.ZP)(ca,ea.version)),Z.push(ca))}return Z},[])},O=function(F,ha){var K,Z,ea;F=F||{};var ca,pa=(0,ma.im)(),za={},ya=w(Object.entries(pa));try{for(ya.s();!(ca=ya.n()).done;){var Ha=(0,u.Z)(ca.value,2),Ua=Ha[0],Ea=Ha[1],Oa=F[Ua],Za=ha?ha[Ua]:void 0;za[Ua]=void 0!==Oa?Oa:void 0!==Za?Za:Ea}}catch(Ma){ya.e(Ma)}finally{ya.f()}return z(z({},za),{},{cursorButton:(null==ha?void 0:ha.cursorButton)||"up",
penDetected:null!==(K=null==ha?void 0:ha.penDetected)&&void 0!==K?K:!!F.penMode&&null!==(Z=F.penDetected)&&void 0!==Z&&Z,activeTool:z(z({},(0,H.Om)(pa,za.activeTool.type&&aa[za.activeTool.type]?za.activeTool:{type:"selection"})),{},{lastActiveToolBeforeEraser:null,locked:null!==(ea=za.activeTool.locked)&&void 0!==ea&&ea}),zoom:"number"==typeof F.zoom?{value:F.zoom}:F.zoom||pa.zoom,isLibraryOpen:!!za.isLibraryMenuDocked&&za.isLibraryOpen})},P=function(F,ha,K){return{elements:D(null==F?void 0:F.elements,
K),appState:O(null==F?void 0:F.appState,ha||null),files:(null==F?void 0:F.files)||{}}},ba=function(F){var ha=D((0,n.Lm)(F.elements),null);return ha.length?z(z({},F),{},{elements:ha}):null},X=function(){var F,ha=1<arguments.length?arguments[1]:void 0,K=[],Z=w(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]);try{for(Z.s();!(F=Z.n()).done;){var ea=F.value;if(Array.isArray(ea)){var ca=ba({status:ha,elements:ea,id:(0,ka.kb)(),created:Date.now()});ca&&K.push(ca)}else{var pa=ea,za=ba(z(z({},pa),
{},{id:pa.id||(0,ka.kb)(),status:pa.status||ha,created:pa.created||Date.now()}));za&&K.push(za)}}}catch(ya){Z.e(ya)}finally{Z.f()}return K}},2383:function(k,h,f){function w(Za,Ma){var fb=Object.keys(Za);if(Object.getOwnPropertySymbols){var eb=Object.getOwnPropertySymbols(Za);Ma&&(eb=eb.filter(function(Na){return Object.getOwnPropertyDescriptor(Za,Na).enumerable}));fb.push.apply(fb,eb)}return fb}function x(Za){for(var Ma=1;Ma<arguments.length;Ma++){var fb=null!=arguments[Ma]?arguments[Ma]:{};Ma%2?
w(Object(fb),!0).forEach(function(eb){(0,J.Z)(Za,eb,fb[eb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Za,Object.getOwnPropertyDescriptors(fb)):w(Object(fb)).forEach(function(eb){Object.defineProperty(Za,eb,Object.getOwnPropertyDescriptor(fb,eb))})}return Za}f.d(h,{$u:function(){return Z},Pp:function(){return Ua},lV:function(){return Ea},nW:function(){return ha},nz:function(){return ca},q$:function(){return ea},rj:function(){return X},sw:function(){return za},wq:function(){return ya}});
var J=f(7169),z=f(2577),u=f(6340),t=f(1935);k=f(7901);var n=f(1319),R=f(3646),ka=f(8211),L=f(9787),ma=f(45),Y=f(6066),fa=f(3063),H=f(6552),aa=f(8288),M=f(9910),Q=f(75),D=f(2325),O=f(5118),P=(f(4404),f(7047)),ba=f(4512),X=document.createElement("img");X.src="data:".concat(aa.LO.svg,", ").concat(encodeURIComponent('\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" width\x3d"16" height\x3d"16" viewBox\x3d"0 0 24 24" fill\x3d"none" stroke\x3d"#1971c2" stroke-width\x3d"2" stroke-linecap\x3d"round" stroke-linejoin\x3d"round" class\x3d"feather feather-external-link"\x3e\x3cpath d\x3d"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"\x3e\x3c/path\x3e\x3cpolyline points\x3d"15 3 21 3 21 9"\x3e\x3c/polyline\x3e\x3cline x1\x3d"10" y1\x3d"14" x2\x3d"21" y2\x3d"3"\x3e\x3c/line\x3e\x3c/svg\x3e'));
var F=!1,ha=function(Za){var Ma=Za.element,fb=Za.appState,eb=Za.setAppState,Na=Za.onLinkOpen;Za=Ma.link||"";var oa=(0,L.useState)(Za),Ca=(0,z.Z)(oa,2);oa=Ca[0];var ra=Ca[1],Aa=(0,L.useRef)(null),Ja="editor"===fb.showHyperlinkPopup||!Za,Sa=(0,L.useCallback)(function(){if(Aa.current){var Ob=Z(Aa.current.value);!Ma.link&&Ob&&(0,P.L)("hyperlink","create");(0,t.DR)(Ma,{link:Ob});eb({showHyperlinkPopup:"info"})}},[Ma,eb]);(0,L.useLayoutEffect)(function(){return function(){Sa()}},[Sa]);(0,L.useEffect)(function(){var Ob=
null,Wb=function(ic){Ja||(Ob&&clearTimeout(Ob),Oa(Ma,fb,[ic.clientX,ic.clientY])&&(Ob=window.setTimeout(function(){eb({showHyperlinkPopup:!1})},500)))};return window.addEventListener(aa.Ks.POINTER_MOVE,Wb,!1),function(){window.removeEventListener(aa.Ks.POINTER_MOVE,Wb,!1);Ob&&clearTimeout(Ob)}},[fb,Ma,Ja,eb]);Ca=(0,L.useCallback)(function(){(0,P.L)("hyperlink","delete");(0,t.DR)(Ma,{link:null});Ja&&(Aa.current.value="");eb({showHyperlinkPopup:!1})},[eb,Ma,Ja]);var Bb=K(Ma,fb),ib=Bb.x;Bb=Bb.y;return fb.draggingElement||
fb.resizingElement||fb.isRotating||fb.openMenu?null:(0,ba.jsxs)("div",{className:"excalidraw-hyperlinkContainer",style:{top:"".concat(Bb,"px"),left:"".concat(ib,"px"),width:320,padding:5},children:[Ja?(0,ba.jsx)("input",{className:(0,ma.Z)("excalidraw-hyperlinkContainer-input"),placeholder:"Type or paste your link here",ref:Aa,value:oa,onChange:function(Ob){return ra(Ob.target.value)},autoFocus:!0,onKeyDown:function(Ob){Ob.stopPropagation();Ob[Y.tW.CTRL_OR_CMD]&&Ob.key===Y.tW.K&&Ob.preventDefault();
Ob.key!==Y.tW.ENTER&&Ob.key!==Y.tW.ESCAPE||Sa()}}):(0,ba.jsx)("a",{href:Ma.link||"",className:(0,ma.Z)("excalidraw-hyperlinkContainer-link",{"d-none":Ja}),target:ea(Ma.link)?"_self":"_blank",onClick:function(Ob){if(Ma.link&&Na){var Wb=(0,u.ag)(aa.Ks.EXCALIDRAW_LINK,Ob.nativeEvent);Na(Ma,Wb);Wb.defaultPrevented&&Ob.preventDefault()}},rel:"noopener noreferrer",children:Ma.link}),(0,ba.jsxs)("div",{className:"excalidraw-hyperlinkContainer__buttons",children:[!Ja&&(0,ba.jsx)(n.V,{type:"button",title:(0,ka.t)("buttons.edit"),
"aria-label":(0,ka.t)("buttons.edit"),label:(0,ka.t)("buttons.edit"),onClick:function(){(0,P.L)("hyperlink","edit","popup-ui");eb({showHyperlinkPopup:"editor"})},className:"excalidraw-hyperlinkContainer--edit",icon:R.gR}),Za&&(0,ba.jsx)(n.V,{type:"button",title:(0,ka.t)("buttons.remove"),"aria-label":(0,ka.t)("buttons.remove"),label:(0,ka.t)("buttons.remove"),onClick:Ca,className:"excalidraw-hyperlinkContainer--remove",icon:R._I})]})]})},K=function(Za,Ma){var fb=(0,O.qf)(Za);fb=(0,z.Z)(fb,2);Za=(0,u._i)({sceneX:fb[0]+
Za.width/2,sceneY:fb[1]},Ma);return{x:Za.x-Ma.offsetLeft-160,y:Za.y-Ma.offsetTop-85}},Z=function(Za){return(Za=Za.trim())&&(Za.includes("://")||/^[[\\/]/.test(Za)||(Za="https://".concat(Za))),Za},ea=function(Za){return!!(null!=Za&&Za.includes(location.origin)||null!=Za&&Za.startsWith("/"))},ca=(0,k.z)({name:"hyperlink",perform:function(Za,Ma){return"editor"!==Ma.showHyperlinkPopup&&{elements:Za,appState:x(x({},Ma),{},{showHyperlinkPopup:"editor",openMenu:null}),commitToHistory:!0}},trackEvent:{category:"hyperlink",
action:"click"},keyTest:function(Za){return Za[Y.tW.CTRL_OR_CMD]&&Za.key===Y.tW.K},contextItemLabel:function(Za,Ma){return pa(Za,Ma)},contextItemPredicate:function(Za,Ma){return 1===(0,Q.eD)(Za,Ma).length},PanelComponent:function(Za){var Ma=Za.elements,fb=Za.appState,eb=Za.updateData;Za=(0,Q.eD)(Ma,fb);return(0,ba.jsx)(n.V,{type:"button",icon:R.p4,"aria-label":(0,ka.t)(pa(Ma,fb)),title:"".concat((0,ka.t)("labels.link.label")," - ").concat((0,u.uY)("CtrlOrCmd+K")),onClick:function(){return eb(null)},
selected:1===Za.length&&!!Za[0].link})}}),pa=function(Za,Ma){return(0,Q.eD)(Za,Ma)[0].link?"labels.link.edit":"labels.link.create"},za=function(Za,Ma,fb){var eb=(0,z.Z)(Za,4),Na=eb[1],oa=eb[2],Ca=fa.Dn;Za=Ca/fb.zoom.value;var ra=Ca/fb.zoom.value,Aa=(Ca-8)/(2*fb.zoom.value),Ja=4/fb.zoom.value;Ma=(0,H.U1)(oa+Ja-Aa+Za/2,Na-Ja-Ca/fb.zoom.value+Aa+ra/2,(eb[0]+oa)/2,(Na+eb[3])/2,Ma);Ma=(0,z.Z)(Ma,2);return[Ma[0]-Za/2,Ma[1]-ra/2,Za,ra]},ya=function(Za,Ma,fb,eb){var Na=(0,z.Z)(fb,2);fb=Na[0];Na=Na[1];if(!Za.link||
Ma.selectedElementIds[Za.id])return!1;var oa=4/Ma.zoom.value;if(!eb&&Ma.viewModeEnabled&&(0,D.pX)(Za,[fb,Na],oa))return!0;eb=(0,O.qf)(Za);eb=(0,z.Z)(eb,4);Za=za([eb[0],eb[1],eb[2],eb[3]],Za.angle,Ma);var Ca=(0,z.Z)(Za,4);Za=Ca[0];Ma=Ca[1];eb=Ca[2];Ca=Ca[3];return fb>Za-oa&&fb<Za+oa+eb&&Na>Ma-oa&&Na<Ma+Ca+oa},Ha=null,Ua=function(Za,Ma){Ha&&clearTimeout(Ha);Ha=window.setTimeout(function(){if(Za.link){var fb=(0,M.bK)();fb.classList.add("excalidraw-tooltip--visible");fb.style.maxWidth="20rem";fb.textContent=
Za.link;var eb=(0,O.qf)(Za);eb=(0,z.Z)(eb,4);eb=za([eb[0],eb[1],eb[2],eb[3]],Za.angle,Ma);var Na=(0,z.Z)(eb,4);eb=Na[2];var oa=Na[3];Na=(0,u._i)({sceneX:Na[0],sceneY:Na[1]},Ma);(0,M.Js)(fb,{left:Na.x,top:Na.y,width:eb,height:oa},"top");(0,P.L)("hyperlink","tooltip","link-icon");F=!0}},aa.sA)},Ea=function(){Ha&&clearTimeout(Ha);F&&(F=!1,(0,M.bK)().classList.remove("excalidraw-tooltip--visible"))},Oa=function(Za,Ma,fb){var eb=(0,z.Z)(fb,2);fb=eb[0];eb=eb[1];var Na=(0,u.dE)({clientX:fb,clientY:eb},Ma),
oa=Na.x,Ca=Na.y;Na=15/Ma.zoom.value;if((0,D.pX)(Za,[oa,Ca],Na))return!1;var ra=(0,O.qf)(Za);ra=(0,z.Z)(ra,3);var Aa=ra[1],Ja=ra[2];if(oa>=ra[0]&&oa<=Ja&&Ca>=Aa-85&&Ca<=Aa)return!1;Ma=K(Za,Ma);Za=Ma.x;Ma=Ma.y;return!(fb>=Za-Na&&fb<=Za+320+10+Na&&eb>=Ma-Na&&eb<=Ma+Na+10+42)}},8290:function(k,h,f){function w(Na,oa){var Ca=Object.keys(Na);if(Object.getOwnPropertySymbols){var ra=Object.getOwnPropertySymbols(Na);oa&&(ra=ra.filter(function(Aa){return Object.getOwnPropertyDescriptor(Na,Aa).enumerable}));
Ca.push.apply(Ca,ra)}return Ca}f.d(h,{$q:function(){return Ma},DK:function(){return X},H:function(){return F},HG:function(){return aa},N1:function(){return fa},R:function(){return O},Ww:function(){return Z},Y9:function(){return ha},ZB:function(){return za},cz:function(){return Y},ek:function(){return Oa},el:function(){return Q}});var x=f(7169),J=f(2577),z=f(75),u=f(1974),t=f(2325),n=f(1935),R=f(1564),ka=f(6938),L=f(6340),ma=f(6066),Y=function(Na){return!Na[ma.tW.CTRL_OR_CMD]},fa=function(Na){return Na.isBindingEnabled},
H=function(Na,oa){var Ca=[];return oa.forEach(function(ra){ra=Na.getNonDeletedElement(ra);null!=ra&&Ca.push(ra)}),Ca},aa=function(Na,oa,Ca){var ra=new Set,Aa=new Set;M(Na,oa,Ca,"start",ra,Aa);M(Na,Ca,oa,"end",ra,Aa);oa=Array.from(Aa).filter(function(Ja){return!ra.has(Ja)});H(R.Z.getScene(Na),oa).forEach(function(Ja){var Sa;(0,n.DR)(Ja,{boundElements:null===(Sa=Ja.boundElements)||void 0===Sa?void 0:Sa.filter(function(Bb){return"arrow"!==Bb.type||Bb.id!==Na.id})})})},M=function(Na,oa,Ca,ra,Aa,Ja){"keep"!==
oa&&(null!=oa?null!=Ca&&("keep"===Ca?ba(Na,oa,ra):"start"!==ra&&Ca.id===oa.id)||(P(Na,oa,ra),Aa.add(oa.id)):(oa="start"===ra?"startBinding":"endBinding",Ca=Na[oa],Na=null==Ca?null:((0,n.DR)(Na,(0,x.Z)({},oa,null)),Ca.elementId),null!=Na&&Ja.add(Na)))},Q=function(Na){Na.forEach(function(oa){(0,u.Mn)(oa)?aa(oa,Ha(oa,"start"),Ha(oa,"end")):(0,u.f0)(oa)&&D(oa)})},D=function(Na){Ua(Na).forEach(function(oa){oa=(0,J.Z)(oa,2);var Ca=oa[1];return aa(oa[0],"end"===Ca?"keep":Na,"start"===Ca?"keep":Na)})},O=
function(Na,oa,Ca,ra){null!=oa.startBoundElement&&P(Na,oa.startBoundElement,"start");oa=ha(ra,Ca);null==oa||ba(Na,oa,"end")||P(Na,oa,"end")},P=function(Na,oa,Ca){(0,n.DR)(Na,(0,x.Z)({},"start"===Ca?"startBinding":"endBinding",function(ra){for(var Aa=1;Aa<arguments.length;Aa++){var Ja=null!=arguments[Aa]?arguments[Aa]:{};Aa%2?w(Object(Ja),!0).forEach(function(Sa){(0,x.Z)(ra,Sa,Ja[Sa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ra,Object.getOwnPropertyDescriptors(Ja)):w(Object(Ja)).forEach(function(Sa){Object.defineProperty(ra,
Sa,Object.getOwnPropertyDescriptor(Ja,Sa))})}return ra}({elementId:oa.id},K(Na,oa,Ca))));(0,L.xn)(oa.boundElements||[]).has(Na.id)||(0,n.DR)(oa,{boundElements:(oa.boundElements||[]).concat({id:Na.id,type:"arrow"})})},ba=function(Na,oa,Ca){Ca=Na["start"===Ca?"endBinding":"startBinding"];return X(Na,null==Ca?void 0:Ca.elementId,oa)},X=function(Na,oa,Ca){return oa===Ca.id&&3>Na.points.length},F=function(Na){Na.forEach(function(oa){(0,u.Mn)(oa)&&aa(oa,null,null)})},ha=function(Na,oa){return(0,z.QG)(oa.getNonDeletedElements(),
function(Ca){return(0,u.f0)(Ca,!1)&&(0,t.uu)(Ca,Na)})},K=function(Na,oa,Ca){var ra="start"===Ca?-1:1;Ca=-1===ra?0:Na.points.length-1;ra=Ca-ra;Ca=ka._.getPointAtIndexGlobalCoordinates(Na,Ca);Na=ka._.getPointAtIndexGlobalCoordinates(Na,ra);return{focus:(0,t.T_)(oa,Na,Ca),gap:Math.max(1,(0,t.oT)(oa,Ca))}},Z=function(Na,oa){var Ca,ra=(null!==(Ca=Na.boundElements)&&void 0!==Ca?Ca:[]).filter(function(Sa){return"arrow"===Sa.type});if(0!==ra.length){oa=null!=oa?oa:{};var Aa=oa.newSize,Ja=ea(oa.simultaneouslyUpdated);
H(R.Z.getScene(Na),ra.map(function(Sa){return Sa.id})).forEach(function(Sa){if((0,u.bt)(Sa)){var Bb,ib;if((null===(Bb=Sa.startBinding)||void 0===Bb?void 0:Bb.elementId)===Na.id||(null===(ib=Sa.endBinding)||void 0===ib?void 0:ib.elementId)===Na.id)Bb=pa(Na,Sa.startBinding,Aa),ib=pa(Na,Sa.endBinding,Aa),Ja.has(Sa.id)?(0,n.DR)(Sa,{startBinding:Bb,endBinding:ib}):(ca(Sa,"start",Bb,Na),ca(Sa,"end",ib,Na))}})}},ea=function(Na){return new Set((Na||[]).map(function(oa){return oa.id}))},ca=function(Na,oa,
Ca,ra){if(!(null==Ca||Ca.elementId!==ra.id&&2<Na.points.length)){var Aa=R.Z.getScene(Na).getElement(Ca.elementId);if(null!=Aa){var Ja="start"===oa?-1:1;ra=-1===Ja?0:Na.points.length-1;var Sa=ka._.getPointAtIndexGlobalCoordinates(Na,ra-Ja);Ja=(0,t.j_)(Aa,Ca.focus,Sa);0===Ca.gap?Aa=Ja:(Aa=(0,t.MZ)(Aa,Sa,Ja,Ca.gap),Aa=0===Aa.length?Ja:Aa[0]);ka._.movePoints(Na,[{index:ra,point:ka._.pointFromAbsoluteCoords(Na,Aa)}],(0,x.Z)({},"start"===oa?"startBinding":"endBinding",Ca))}}},pa=function(Na,oa,Ca){if(null==
oa||null==Ca)return oa;var ra=oa.gap,Aa=oa.focus,Ja=Ca.width;Ca=Ca.height;var Sa=Na.width,Bb=Na.height;return{elementId:oa.elementId,gap:Math.max(1,Math.min((0,t.fb)(Na,Ja,Ca),ra*(Ja<Ca?Ja/Sa:Ca/Bb))),focus:Aa}},za=function(Na){var oa=new Set(Na.map(function(Ca){return Ca.id}));return Na.flatMap(function(Ca){return(0,u.Mn)(Ca,!1)?ya(Ca).filter(function(ra){return!oa.has(ra.id)}):(0,u.f0)(Ca,!1)?Ua(Ca).filter(function(ra){return!oa.has(ra[0].id)}):[]})},ya=function(Na){return[Ha(Na,"start"),Ha(Na,
"end")].filter(function(oa){return null!=oa})},Ha=function(Na,oa){return ha((0,L.AK)(ka._.getPointAtIndexGlobalCoordinates(Na,"start"===oa?0:-1)),R.Z.getScene(Na))},Ua=function(Na){return R.Z.getScene(Na).getNonDeletedElements().map(function(oa){if(!(0,u.Mn)(oa,!1))return null;var Ca=Ea(oa,"start",Na),ra=Ea(oa,"end",Na);return Ca||ra?[oa,Ca&&ra?"both":Ca?"start":"end",Na]:null}).filter(function(oa){return null!=oa})},Ea=function(Na,oa,Ca){return null==Na["start"===oa?"startBinding":"endBinding"]&&
!ba(Na,Ca,oa)&&(0,t.uu)(Ca,(0,L.AK)(ka._.getPointAtIndexGlobalCoordinates(Na,"start"===oa?0:-1)))},Oa=function(Na,oa,Ca,ra){var Aa=new Set,Ja=new Set,Sa="duplicatesServeAsOld"===ra;oa.forEach(function(Bb){var ib=Bb.boundElements;if(null!=ib&&0<ib.length&&(ib.forEach(function(Ob){Sa&&!Ca.has(Ob.id)&&Aa.add(Ob.id)}),Ja.add(Ca.get(Bb.id))),(0,u.Mn)(Bb))null!=Bb.startBinding&&(ib=Bb.startBinding.elementId,Sa&&!Ca.has(ib)&&Ja.add(ib)),null!=Bb.endBinding&&(ib=Bb.endBinding.elementId,Sa&&!Ca.has(ib)&&Ja.add(ib)),
null==Bb.startBinding&&null==Bb.endBinding||Aa.add(Ca.get(Bb.id))});Na.filter(function(Bb){return Aa.has(Bb.id)}).forEach(function(Bb){var ib=Bb.endBinding;(0,n.DR)(Bb,{startBinding:Za(Bb.startBinding,Ca),endBinding:Za(ib,Ca)})});Na.filter(function(Bb){return Ja.has(Bb.id)}).forEach(function(Bb){var ib=Bb.boundElements;null!=ib&&0<ib.length&&(0,n.DR)(Bb,{boundElements:ib.map(function(Ob){return Ca.has(Ob.id)?{id:Ca.get(Ob.id),type:Ob.type}:Ob})})})},Za=function(Na,oa){var Ca;if(null==Na)return null;
var ra=Na.elementId;return{focus:Na.focus,gap:Na.gap,elementId:null!==(Ca=oa.get(ra))&&void 0!==Ca?Ca:ra}},Ma=function(Na,oa){var Ca=new Set(oa.map(function(Aa){return Aa.id})),ra=new Set;oa.forEach(function(Aa){var Ja;(0,u.f0)(Aa)?null===(Ja=Aa.boundElements)||void 0===Ja||Ja.forEach(function(Sa){Ca.has(Sa.id)||ra.add(Sa.id)}):(0,u.Mn)(Aa)&&(Aa.startBinding&&ra.add(Aa.startBinding.elementId),Aa.endBinding&&ra.add(Aa.endBinding.elementId))});Na.filter(function(Aa){return ra.has(Aa.id)}).forEach(function(Aa){(0,u.f0)(Aa)?
(0,n.DR)(Aa,{boundElements:eb(Aa.boundElements,Ca)}):(0,u.Mn)(Aa)&&(0,n.DR)(Aa,{startBinding:fb(Aa.startBinding,Ca),endBinding:fb(Aa.endBinding,Ca)})})},fb=function(Na,oa){return null==Na||oa.has(Na.elementId)?null:Na},eb=function(Na,oa){return Na?Na.filter(function(Ca){return!oa.has(Ca.id)}):null}},8925:function(k,h,f){function w(X,F){var ha="undefined"!=typeof Symbol&&X[Symbol.iterator]||X["@@iterator"];if(!ha){if(Array.isArray(X)||(ha=function(pa,za){if(pa){if("string"==typeof pa)return x(pa,za);
var ya=Object.prototype.toString.call(pa).slice(8,-1);"Object"===ya&&pa.constructor&&(ya=pa.constructor.name);if("Map"===ya||"Set"===ya)return Array.from(pa);if("Arguments"===ya||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ya))return x(pa,za)}}(X))||F&&X&&"number"==typeof X.length){ha&&(X=ha);var K=0;F=function(){};return{s:F,n:function(){return K>=X.length?{done:!0}:{done:!1,value:X[K++]}},e:function(pa){throw pa;},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}var Z,ea=!0,ca=!1;return{s:function(){ha=ha.call(X)},n:function(){var pa=ha.next();return ea=pa.done,pa},e:function(pa){ca=!0;Z=pa},f:function(){try{ea||null==ha.return||ha.return()}finally{if(ca)throw Z;}}}}function x(X,F){(null==F||F>X.length)&&(F=X.length);for(var ha=0,K=Array(F);ha<F;ha++)K[ha]=X[ha];return K}f.d(h,{CM:function(){return ma},KP:function(){return Q},Pi:function(){return M},UC:function(){return L},Ut:function(){return O},Y5:function(){return aa},os:function(){return P},qf:function(){return ka},
v2:function(){return ba},wC:function(){return D}});var J=f(2577),z=f(6552),u=f(8234),t=f(3063),n=f(1974),R=f(5001),ka=function(X){if((0,n.F9)(X)){var F=fa(X.points);F=(0,J.Z)(F,4);X=[F[0]+X.x,F[1]+X.y,F[2]+X.x,F[3]+X.y]}else X=(0,n.bt)(X)?H(X):[X.x,X.y,X.x+X.width,X.y+X.height];return X},L=function(X){var F=Math.floor(X.width/2)+1,ha=Math.floor(X.height/2)+1;return[F,0,X.width,ha,F,X.height,0,ha]},ma=function(X){var F,ha=w(X.sets);try{for(ha.s();!(F=ha.n()).done;){var K=F.value;if("path"===K.type)return K.ops}}catch(Z){ha.e(Z)}finally{ha.f()}return X.sets[0].ops},
Y=function(X,F){var ha=[0,0];X=X.reduce(function(K,Z){var ea=Z.op;Z=Z.data;if("move"===ea)ha=Z;else if("bcurveTo"===ea){var ca=[Z[0],Z[1]],pa=[Z[2],Z[3]],za=[Z[4],Z[5]],ya=ha;ha=za;ea=function(Ea,Oa){return Math.pow(1-Ea,3)*za[Oa]+3*Ea*Math.pow(1-Ea,2)*pa[Oa]+3*Math.pow(Ea,2)*(1-Ea)*ca[Oa]+ya[Oa]*Math.pow(Ea,3)};for(Z=0;1>=Z;){var Ha=ea(Z,0),Ua=ea(Z,1);F&&(Ha=F(Ha,Ua),Ua=(0,J.Z)(Ha,2),Ha=Ua[0],Ua=Ua[1]);K.minY=Math.min(K.minY,Ua);K.minX=Math.min(K.minX,Ha);K.maxX=Math.max(K.maxX,Ha);K.maxY=Math.max(K.maxY,
Ua);Z+=.1}}return K},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});return[X.minX,X.minY,X.maxX,X.maxY]},fa=function(X){var F,ha=1/0,K=1/0,Z=-1/0,ea=-1/0;X=w(X);try{for(X.s();!(F=X.n()).done;){var ca=(0,J.Z)(F.value,2),pa=ca[0],za=ca[1];ha=Math.min(ha,pa);K=Math.min(K,za);Z=Math.max(Z,pa);ea=Math.max(ea,za)}}catch(ya){X.e(ya)}finally{X.f()}return[ha,K,Z,ea]},H=function(X){if(2>X.points.length||!(0,t.R2)(X)){var F=X.points.reduce(function(ha,K){var Z=(0,J.Z)(K,2);K=Z[0];Z=Z[1];return ha.minY=Math.min(ha.minY,
Z),ha.minX=Math.min(ha.minX,K),ha.maxX=Math.max(ha.maxX,K),ha.maxY=Math.max(ha.maxY,Z),ha},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});X=[F.minX+X.x,F.minY+X.y,F.maxX+X.x,F.maxY+X.y]}else F=(0,t.R2)(X),F=ma(F[0]),F=Y(F),F=(0,J.Z)(F,4),X=[F[0]+X.x,F[1]+X.y,F[2]+X.x,F[3]+X.y];return X},aa=function(X,F,ha,K){F=ma(F[0]);if(1>F.length)return null;var Z="start"===ha?1:F.length-1,ea=F[Z].data,ca=[ea[4],ea[5]],pa=[ea[2],ea[3]],za=[ea[0],ea[1]];F=F[Z-1];var ya=[0,0];"move"===F.op?ya=F.data:"bcurveTo"===F.op&&
(ya=[F.data[4],F.data[5]]);Z=function(fb,eb){return Math.pow(1-fb,3)*ca[eb]+3*fb*Math.pow(1-fb,2)*pa[eb]+3*Math.pow(fb,2)*(1-fb)*za[eb]+ya[eb]*Math.pow(fb,3)};F=(0,J.Z)("start"===ha?ya:ca,2);ha=F[0];F=F[1];ea=[Z(.3,0),Z(.3,1)];Z=ea[0];ea=ea[1];var Ha=Math.hypot(ha-Z,F-ea);Z=(ha-Z)/Ha;ea=(F-ea)/Ha;Ha={arrow:30,bar:15,dot:15,triangle:15}[K];var Ua=0;if("arrow"===K){var Ea=(0,J.Z)(X.points[X.points.length-1],2);Ua=Ea[0];Ea=Ea[1];var Oa=(0,J.Z)(1<X.points.length?X.points[X.points.length-2]:[0,0],2);Ua=
Math.hypot(Ua-Oa[0],Ea-Oa[1])}else for(Ea=0;Ea<X.points.length;Ea++){var Za=(0,J.Z)(X.points[Ea-1]||[0,0],2);Oa=Za[0];Za=Za[1];var Ma=(0,J.Z)(X.points[Ea],2);Ua+=Math.hypot(Ma[0]-Oa,Ma[1]-Za)}Ha=Math.min(Ha,Ua/2);Z=ha-Z*Ha;ea=F-ea*Ha;if("dot"===K)return[ha,F,Math.hypot(ea-F,Z-ha)+X.strokeWidth];K={arrow:20,bar:90,triangle:25}[K];X=(0,z.U1)(Z,ea,ha,F,-K*Math.PI/180);Ha=(0,J.Z)(X,2);X=Ha[0];Ha=Ha[1];K=(0,z.U1)(Z,ea,ha,F,K*Math.PI/180);K=(0,J.Z)(K,2);return[ha,F,X,Ha,K[0],K[1]]},M=function(X){var F=
ka(X);var ha=(0,J.Z)(F,4),K=ha[0],Z=ha[1];F=ha[2];var ea=ha[3],ca=(K+F)/2,pa=(Z+ea)/2;if((0,n.F9)(X))return F=fa(X.points.map(function(Ua){Ua=(0,J.Z)(Ua,2);return(0,z.U1)(Ua[0],Ua[1],ca-X.x,pa-X.y,X.angle)})),F=(0,J.Z)(F,4),[F[0]+X.x,F[1]+X.y,F[2]+X.x,F[3]+X.y];if((0,n.bt)(X))F=function(Ua,Ea,Oa){if(2>Ua.points.length||!(0,t.R2)(Ua)){var Za=Ua.points.reduce(function(Ma,fb){var eb=(0,J.Z)(fb,2);fb=eb[0];eb=eb[1];var Na=(0,z.U1)(Ua.x+fb,Ua.y+eb,Ea,Oa,Ua.angle);Na=(0,J.Z)(Na,2);return fb=Na[0],eb=Na[1],
Ma.minY=Math.min(Ma.minY,eb),Ma.minX=Math.min(Ma.minX,fb),Ma.maxX=Math.max(Ma.maxX,fb),Ma.maxY=Math.max(Ma.maxY,eb),Ma},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});return[Za.minX,Za.minY,Za.maxX,Za.maxY]}Za=(0,t.R2)(Ua);Za=ma(Za[0]);return Y(Za,function(Ma,fb){return(0,z.U1)(Ua.x+Ma,Ua.y+fb,Ea,Oa,Ua.angle)})}(X,ca,pa);else if("diamond"===X.type){ha=(0,z.U1)(ca,Z,ca,pa,X.angle);Z=(0,J.Z)(ha,2);ha=Z[0];Z=Z[1];var za=(0,z.U1)(ca,ea,ca,pa,X.angle);ea=(0,J.Z)(za,2);za=ea[0];ea=ea[1];K=(0,z.U1)(K,pa,ca,pa,
X.angle);var ya=(0,J.Z)(K,2);K=ya[0];ya=ya[1];F=(0,z.U1)(F,pa,ca,pa,X.angle);var Ha=(0,J.Z)(F,2);F=Ha[0];Ha=Ha[1];F=[Math.min(ha,za,K,F),Math.min(Z,ea,ya,Ha),Math.max(ha,za,K,F),Math.max(Z,ea,ya,Ha)]}else"ellipse"===X.type?(F=(F-K)/2,Z=(ea-Z)/2,za=Math.cos(X.angle),K=Math.sin(X.angle),ha=Math.hypot(F*za,Z*K),F=Math.hypot(Z*za,F*K),F=[ca-ha,pa-F,ca+ha,pa+F]):(ha=(0,z.U1)(K,Z,ca,pa,X.angle),za=(0,J.Z)(ha,2),ha=za[0],za=za[1],K=(0,z.U1)(K,ea,ca,pa,X.angle),ya=(0,J.Z)(K,2),K=ya[0],ya=ya[1],ea=(0,z.U1)(F,
ea,ca,pa,X.angle),Ha=(0,J.Z)(ea,2),ea=Ha[0],Ha=Ha[1],F=(0,z.U1)(F,Z,ca,pa,X.angle),Z=(0,J.Z)(F,2),F=Z[0],Z=Z[1],F=[Math.min(ha,K,ea,F),Math.min(za,ya,Ha,Z),Math.max(ha,K,ea,F),Math.max(za,ya,Ha,Z)]);return F},Q=function(X){if(!X.length)return[0,0,0,0];var F=1/0,ha=-1/0,K=1/0,Z=-1/0;return X.forEach(function(ea){ea=M(ea);ea=(0,J.Z)(ea,4);var ca=ea[1],pa=ea[2],za=ea[3];F=Math.min(F,ea[0]);K=Math.min(K,ca);ha=Math.max(ha,pa);Z=Math.max(Z,za)}),[F,K,ha,Z]},D=function(X,F,ha){if(!(0,n.bt)(X)&&!(0,n.F9)(X))return[X.x,
X.y,X.x+F,X.y+ha];F=(0,R.z)(0,F,(0,R.z)(1,ha,X.points));(0,n.F9)(X)?F=fa(F):(ha=u.Z.generator(),F="sharp"===X.strokeSharpness?ha.linearPath(F,(0,t.i)(X)):ha.curve(F,(0,t.i)(X)),F=ma(F),F=Y(F));F=(0,J.Z)(F,4);return[F[0]+X.x,F[1]+X.y,F[2]+X.x,F[3]+X.y]},O=function(X,F,ha){var K=u.Z.generator();F="sharp"===ha?K.linearPath(F,(0,t.i)(X)):K.curve(F,(0,t.i)(X));F=ma(F);F=Y(F);F=(0,J.Z)(F,4);return[F[0]+X.x,F[1]+X.y,F[2]+X.x,F[3]+X.y]},P=function(X,F){if(!X.length)return[0,0,0,0];var ha=1/0,K=X[0];return X.forEach(function(Z){var ea=
M(Z);ea=(0,J.Z)(ea,4);ea=(0,z.LW)((ea[0]+ea[2])/2,(ea[1]+ea[3])/2,F.x,F.y);ea<ha&&(ha=ea,K=Z)}),M(K)},ba=function(X){X=Q(X);var F=(0,J.Z)(X,4);X=F[0];var ha=F[1],K=F[2];F=F[3];return{minX:X,minY:ha,maxX:K,maxY:F,width:K-X,height:F-ha,midX:(X+K)/2,midY:(ha+F)/2}}},2325:function(k,h,f){function w(Pa,nb){var ob="undefined"!=typeof Symbol&&Pa[Symbol.iterator]||Pa["@@iterator"];if(!ob){if(Array.isArray(Pa)||(ob=function(Gb,xc){if(Gb){if("string"==typeof Gb)return x(Gb,xc);var Wc=Object.prototype.toString.call(Gb).slice(8,
-1);"Object"===Wc&&Gb.constructor&&(Wc=Gb.constructor.name);if("Map"===Wc||"Set"===Wc)return Array.from(Gb);if("Arguments"===Wc||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Wc))return x(Gb,xc)}}(Pa))||nb&&Pa&&"number"==typeof Pa.length){ob&&(Pa=ob);var Zb=0;nb=function(){};return{s:nb,n:function(){return Zb>=Pa.length?{done:!0}:{done:!1,value:Pa[Zb++]}},e:function(Gb){throw Gb;},f:nb}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}var Jc,ad=!0,Nc=!1;return{s:function(){ob=ob.call(Pa)},n:function(){var Gb=ob.next();return ad=Gb.done,Gb},e:function(Gb){Nc=!0;Jc=Gb},f:function(){try{ad||null==ob.return||ob.return()}finally{if(Nc)throw Jc;}}}}function x(Pa,nb){(null==nb||nb>Pa.length)&&(nb=Pa.length);for(var ob=0,Zb=Array(nb);ob<nb;ob++)Zb[ob]=Pa[ob];return Zb}f.d(h,{uu:function(){return pa},T_:function(){return ra},j_:function(){return Aa},oT:function(){return Ha},wX:function(){return K},MZ:function(){return Ja},wB:function(){return Z},
Qu:function(){return ea},pX:function(){return ca},fb:function(){return za}});var J=f(2577),z=function(Pa,nb){return[0,0,0,0,nb,Pa,1,0]};k=function(){var Pa=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,nb=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,ob=[0,0,0,0,0,0,0,0];if(0>nb||7<nb)throw Error("Expected `index` between 0 and 7, got `".concat(nb,"`"));return 0!==Pa&&(ob[nb]=Pa),ob};var u=function(Pa){return[Pa[0],Pa[1],Pa[2],Pa[3],-Pa[4],-Pa[5],-Pa[6],-Pa[7]]},t=function(Pa,
nb){return"number"==typeof nb?[Pa[0]-nb,Pa[1],Pa[2],Pa[3],Pa[4],Pa[5],Pa[6],Pa[7]]:[Pa[0]-nb[0],Pa[1]-nb[1],Pa[2]-nb[2],Pa[3]-nb[3],Pa[4]-nb[4],Pa[5]-nb[5],Pa[6]-nb[6],Pa[7]-nb[7]]},n=function(Pa,nb){return"number"==typeof nb?[Pa[0]*nb,Pa[1]*nb,Pa[2]*nb,Pa[3]*nb,Pa[4]*nb,Pa[5]*nb,Pa[6]*nb,Pa[7]*nb]:[nb[0]*Pa[0]+nb[2]*Pa[2]+nb[3]*Pa[3]-nb[6]*Pa[6],nb[1]*Pa[0]+nb[0]*Pa[1]-nb[4]*Pa[2]+nb[5]*Pa[3]+nb[2]*Pa[4]-nb[3]*Pa[5]-nb[7]*Pa[6]-nb[6]*Pa[7],nb[2]*Pa[0]+nb[0]*Pa[2]-nb[6]*Pa[3]+nb[3]*Pa[6],nb[3]*Pa[0]+
nb[6]*Pa[2]+nb[0]*Pa[3]-nb[2]*Pa[6],nb[4]*Pa[0]+nb[2]*Pa[1]-nb[1]*Pa[2]+nb[7]*Pa[3]+nb[0]*Pa[4]+nb[6]*Pa[5]-nb[5]*Pa[6]+nb[3]*Pa[7],nb[5]*Pa[0]-nb[3]*Pa[1]+nb[7]*Pa[2]+nb[1]*Pa[3]-nb[6]*Pa[4]+nb[0]*Pa[5]+nb[4]*Pa[6]+nb[2]*Pa[7],nb[6]*Pa[0]+nb[3]*Pa[2]-nb[2]*Pa[3]+nb[0]*Pa[6],nb[7]*Pa[0]+nb[6]*Pa[1]+nb[5]*Pa[2]+nb[4]*Pa[3]+nb[3]*Pa[4]+nb[2]*Pa[5]+nb[1]*Pa[6]+nb[0]*Pa[7]]},R=function(Pa,nb){return[ka(Pa,nb),Pa[1]*nb[7]+Pa[4]*nb[5]-Pa[5]*nb[4]+Pa[7]*nb[1],Pa[2]*nb[7]-Pa[4]*nb[6]+Pa[6]*nb[4]+Pa[7]*nb[2],
Pa[3]*nb[7]+Pa[5]*nb[6]-Pa[6]*nb[5]+Pa[7]*nb[3],Pa[4]*nb[7]+Pa[7]*nb[4],Pa[5]*nb[7]+Pa[7]*nb[5],Pa[6]*nb[7]+Pa[7]*nb[6],Pa[7]*nb[7]]},ka=function(Pa,nb){return Pa[0]*nb[7]+Pa[1]*nb[6]+Pa[2]*nb[5]+Pa[3]*nb[4]+Pa[4]*nb[3]+Pa[5]*nb[2]+Pa[6]*nb[1]+Pa[7]*nb[0]},L=function(Pa){return Math.sqrt(Math.abs(Pa[0]*Pa[0]-Pa[2]*Pa[2]-Pa[3]*Pa[3]+Pa[6]*Pa[6]))},ma=function(Pa){var nb=L(Pa);return 0===nb||1===nb?Pa:n(Pa,(0>Pa[6]?-1:1)/nb)},Y=(k(1,1),k(1,2),k(1,3),k(1,4),k(1,5),k(1,6),k(1,7),function(Pa,nb,ob){return ma([0,
ob,Pa,nb,0,0,0,0])}),fa=function(Pa,nb){return ob=Pa,[(Zb=nb)[0]*ob[0]+Zb[2]*ob[2]+Zb[3]*ob[3]-Zb[6]*ob[6],Zb[1]*ob[0]+Zb[0]*ob[1]-Zb[4]*ob[2]+Zb[5]*ob[3]+Zb[2]*ob[4]-Zb[3]*ob[5]-Zb[7]*ob[6]-Zb[6]*ob[7],Zb[2]*ob[0]+Zb[0]*ob[2]-Zb[6]*ob[3]+Zb[3]*ob[6],Zb[3]*ob[0]+Zb[6]*ob[2]+Zb[0]*ob[3]-Zb[2]*ob[6],Zb[4]*ob[0]+Zb[7]*ob[3]+Zb[0]*ob[4]+Zb[3]*ob[7],Zb[5]*ob[0]+Zb[7]*ob[2]+Zb[0]*ob[5]+Zb[2]*ob[7],Zb[6]*ob[0]+Zb[0]*ob[6],Zb[7]*ob[0]+Zb[0]*ob[7]];var ob,Zb},H=function(Pa){Pa=(0,J.Z)(Pa,2);return[0,0,0,0,
Pa[1],Pa[0],1,0]},aa=function(Pa){return[Pa[5],Pa[4]]},M=function(Pa,nb){return ob=n(Pa,Math.sin(nb/2)),Zb=Math.cos(nb/2),"number"==typeof Zb?[ob[0]+Zb,ob[1],ob[2],ob[3],ob[4],ob[5],ob[6],ob[7]]:[ob[0]+Zb[0],ob[1]+Zb[1],ob[2]+Zb[2],ob[3]+Zb[3],ob[4]+Zb[4],ob[5]+Zb[5],ob[6]+Zb[6],ob[7]+Zb[7]];var ob,Zb},Q=function(Pa,nb){return ma(n(n(Pa,nb),u(Pa)))},D=f(6552),O=f(1493),P=f(8925),ba=f(3063),X=f(1974),F=f(5118),ha=f(6340),K=function(Pa,nb,ob,Zb){var Jc=10/nb.zoom.value;ob=[ob,Zb];return nb.selectedElementIds[Pa.id]?
ca(Pa,ob,Jc):ea(Pa,nb,ob)},Z=function(Pa,nb,ob,Zb){var Jc=10/nb.zoom.value;return!ea(Pa,nb,[ob,Zb])&&ca(Pa,[ob,Zb],Jc)},ea=function(Pa,nb,ob){nb=10/nb.zoom.value;if((0,F.iB)(Pa))var Zb=Ua;else"arrow"===Pa.type?Zb=!1:"freedraw"===Pa.type?Zb=!0:(Zb=!(0,ha.Qm)(Pa.backgroundColor)||(0,X.Xo)(Pa),Zb="line"===Pa.type?Zb&&(0,D.g6)(Pa.points):Zb||(0,X.pC)(Pa)),Zb=Zb?Ea:Oa;return ya({element:Pa,point:ob,threshold:nb,check:Zb})},ca=function(Pa,nb,ob){nb=(0,J.Z)(nb,2);var Zb=nb[0],Jc=nb[1];nb=(0,P.qf)(Pa);var ad=
(0,J.Z)(nb,4);nb=ad[0];var Nc=ad[1],Gb=ad[2];ad=ad[3];Pa=(0,D.U1)(Zb,Jc,(nb+Gb)/2,(Nc+ad)/2,-Pa.angle);Zb=(0,J.Z)(Pa,2);Pa=Zb[0];Zb=Zb[1];return Pa>nb-ob&&Pa<Gb+ob&&Zb>Nc-ob&&Zb<ad+ob},pa=function(Pa,nb){var ob=nb.x;nb=nb.y;var Zb=za(Pa,Pa.width,Pa.height);return ya({element:Pa,point:[ob,nb],threshold:Zb,check:Za})},za=function(Pa,nb,ob){return Math.max(16,Math.min(.25*("diamond"===Pa.type?1/Math.sqrt(2):1)*Math.min(nb,ob),32))},ya=function(Pa){switch(Pa.element.type){case "rectangle":case "image":case "text":case "diamond":case "ellipse":var nb=
Ha(Pa.element,Pa.point);return Pa.check(nb,Pa.threshold);case "freedraw":if(nb=!!Pa.check(Ma(Pa.element,Pa.point),Pa.threshold))a:{nb=Pa.element;var ob=Pa.point;Pa=Pa.threshold;if(0===nb.angle){var Zb=ob[0]-nb.x;ob=ob[1]-nb.y}else{Zb=(0,P.qf)(nb);Zb=(0,J.Z)(Zb,4);var Jc=Zb[0],ad=Zb[1];ob=(0,D.xj)(ob,[Jc+(Zb[2]-Jc)/2,ad+(Zb[3]-ad)/2],-nb.angle);Zb=ob[0]-nb.x;ob=ob[1]-nb.y}ad=(0,J.Z)(nb.points,2);Jc=ad[0];ad=ad[1];if((0,D.LW)(Jc[0],Jc[1],Zb,ob)<Pa||(0,D.LW)(ad[0],ad[1],Zb,ob)<Pa)nb=!0;else{for(var Nc=
0;Nc<nb.points.length;Nc++){var Gb=[ad[0]-Jc[0],ad[1]-Jc[1]];var xc=Math.hypot(Gb[1],Gb[0]);Gb=[Gb[0]/xc,Gb[1]/xc];var Wc=[Zb-Jc[0],ob-Jc[1]];Wc=(Wc[0]*Gb[0]+Wc[1]*Gb[1])/Math.hypot(Gb[1],Gb[0]);Gb=[Jc[0]+Gb[0]*Wc,Jc[1]+Gb[1]*Wc];Wc=(0,D.LW)(Gb[0],Gb[1],Jc[0],Jc[1]);var hd=(0,D.LW)(Gb[0],Gb[1],ad[0],ad[1]);if(Gb=hd<Wc&&Wc>xc?ad:Wc<hd&&hd>xc?Jc:Gb,Math.hypot(ob-Gb[1],Zb-Gb[0])<Pa){nb=!0;break a}Jc=ad;ad=nb.points[Nc+1]}nb=(0,ba.R2)(nb);nb=!(!nb||!nb.sets.length)&&ic(nb,Zb,ob,Pa)}}return nb;case "arrow":case "line":return eb(Pa);
case "selection":return console.warn("This should not happen, we need to investigate why it does."),!1}},Ha=function(Pa,nb){switch(Pa.type){case "rectangle":case "image":case "text":return Ma(Pa,nb);case "diamond":Pa=Na(Pa,nb);var ob=(0,J.Z)(Pa,4);Pa=ob[1];nb=ob[2];ob=ob[3];nb=Y(ob,nb,-ob*nb);return ka(Pa,nb);case "ellipse":return Pa=fb(Pa,nb),Pa=(0,J.Z)(Pa,2),nb=Pa[1],-Math.sign(nb[1])*ka(Pa[0],nb)}},Ua=function(Pa,nb){return 0>Pa},Ea=function(Pa,nb){return Pa<nb},Oa=function(Pa,nb){return Math.abs(Pa)<
nb},Za=function(Pa,nb){return 0<=Pa&&Pa<nb},Ma=function(Pa,nb){Pa=Na(Pa,nb);var ob=(0,J.Z)(Pa,4),Zb=ob[1],Jc=ob[2];Pa=Math;nb=Pa.max;ob=Y(0,1,-ob[3]);ob=ka(Zb,ob);Jc=Y(1,0,-Jc);Zb=ka(Zb,Jc);return nb.call(Pa,ob,Zb)},fb=function(Pa,nb){Pa=Na(Pa,nb);nb=(0,J.Z)(Pa,4);Pa=nb[1];var ob=nb[2],Zb=nb[3];nb=aa(Pa);nb=(0,J.Z)(nb,2);var Jc=nb[0],ad=nb[1],Nc=.707,Gb=.707;[0,1,2,3].forEach(function(xc){xc=(ob*ob-Zb*Zb)*Math.pow(Nc,3)/ob;var Wc=(Zb*Zb-ob*ob)*Math.pow(Gb,3)/Zb,hd=Jc-xc,Nd=ad-Wc,Ld=Math.hypot(Zb*
Gb-Wc,ob*Nc-xc),pc=Math.hypot(Nd,hd);Nc=Math.min(1,Math.max(0,(hd*Ld/pc+xc)/ob));Gb=Math.min(1,Math.max(0,(Nd*Ld/pc+Wc)/Zb));xc=Math.hypot(Gb,Nc);Nc/=xc;Gb/=xc});nb=z(ob*Nc,Zb*Gb);return[Pa,fa(ma(R(nb,Pa)),nb)]},eb=function(Pa){var nb=Pa.element,ob=Pa.threshold;if(!(0,ba.R2)(nb))return!1;var Zb=Na(Pa.element,Pa.point),Jc=(0,J.Z)(Zb,4);Zb=Jc[0];var ad=Jc[1],Nc=Jc[2];Jc=Y(0,1,-Jc[3]);Nc=Y(1,0,-Nc);if(!Ea(ka(ad,Jc),ob)||!Ea(ka(ad,Nc),ob))return!1;Zb=aa(Zb);Zb=(0,J.Z)(Zb,2);var Gb=Zb[0],xc=Zb[1];return(Zb=
(0,ba.R2)(nb))?Pa.check===Ea&&Zb.some(function(Wc){return Wb(Wc,Gb,xc,nb.strokeSharpness)})?!0:Zb.some(function(Wc){return ic(Wc,Gb,xc,ob)}):!1},Na=function(Pa,nb){var ob,Zb=H(nb);nb=(0,P.qf)(Pa);var Jc=Ca(nb),ad=M(Jc,Pa.angle);Zb=Q(ad,Zb);Jc=t(Zb,[0,0,0,0,Jc[4],Jc[5],0,0]);Jc=[0,0,0,0,Math.abs(Jc[4]),Math.abs(Jc[5]),1,0];ad=(ob=Pa.x,[0,0,0,0,Pa.y,ob,0,0]);Pa=t(Zb,ad);ob=(0,J.Z)(nb,4);return[Pa,Jc,(ob[2]-ob[0])/2,(ob[3]-ob[1])/2]},oa=function(Pa){var nb=(0,P.qf)(Pa);nb=Ca(nb);Pa=M(nb,Pa.angle);nb=
[0,0,0,0,nb[4],nb[5],0,0];nb=u([1,0,0,0,-.5*nb[5],.5*nb[4],0,0]);return n(nb,Pa)},Ca=function(Pa){Pa=(0,J.Z)(Pa,4);return z((Pa[0]+Pa[2])/2,(Pa[1]+Pa[3])/2)},ra=function(Pa,nb,ob){var Zb=oa(Pa);nb=Q(Zb,H(nb));ob=Q(Zb,H(ob));var Jc=ma(R(ob,nb));ob=Pa.height/Pa.width;Zb=Pa.width/2;nb=Pa.height/2;var ad=Jc[2],Nc=Jc[3];Jc=Jc[1];var Gb=Math.abs(Nc),xc=Math.abs(ad);switch(Pa.type){case "rectangle":case "image":case "text":return Jc/(Zb*(xc+ob*Gb));case "diamond":return Gb<xc?Jc/(xc*Zb):Jc/(Gb*nb);case "ellipse":return Jc/
(Zb*Math.sqrt(Math.pow(ad,2)+Math.pow(ob,2)*Math.pow(Nc,2)))}},Aa=function(Pa,nb,ob){if(0===nb){var Zb=(0,P.qf)(Pa);Zb=Ca(Zb);return aa(Zb)}Zb=oa(Pa);ob=Q(Zb,H(ob));Zb=u(Zb);switch(Pa.type){case "rectangle":case "image":case "text":case "diamond":var Jc=Ob(Pa,nb,ob);break;case "ellipse":var ad=Math.abs(nb);Jc=Pa.width*ad/2;Pa=Pa.height*ad/2;nb=Math.sign(nb);ob=aa(ob);ad=(0,J.Z)(ob,2);ob=ad[0];ad=ad[1];ad=0===ad?1E-4:ad;var Nc=Math.pow(ob,2)*Math.pow(Pa,2)+Math.pow(ad,2)*Math.pow(Jc,2);nb=(-ob*Math.pow(Pa,
2)+nb*ad*Math.sqrt(Math.max(0,Nc-Math.pow(Jc,2)*Math.pow(Pa,2))))/Nc;ob=(-nb*ob-1)/ad;Jc=-Math.pow(Jc,2)*nb/(Math.pow(ob,2)*Math.pow(Pa,2)+Math.pow(nb,2)*Math.pow(Jc,2));Jc=z(Jc,(-nb*Jc-1)/ob)}return aa(Q(Zb,Jc))},Ja=function(Pa,nb,ob){var Zb=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,Jc=oa(Pa),ad=Q(Jc,H(nb)),Nc=Q(Jc,H(ob));Nc=ma(R(Nc,ad));var Gb=u(Jc);return Sa(Pa,Nc,ad,Zb).map(function(xc){return aa(Q(Gb,xc))})},Sa=function(Pa,nb,ob){var Zb=3<arguments.length&&void 0!==arguments[3]?
arguments[3]:0;switch(Pa.type){case "rectangle":case "image":case "text":case "diamond":var Jc=Bb(Pa);var ad=Jc.flatMap(function(Nc,Gb){Gb=(0,J.Z)([Nc,Jc[(Gb+1)%4]],2);Nc=Gb[0];Gb=Gb[1];var xc=[0,0,0,0,Gb[4]-Nc[4],Gb[5]-Nc[5],0,0];var Wc=Math.sqrt(Math.abs(xc[7]*xc[7]-xc[5]*xc[5]-xc[4]*xc[4]+xc[1]*xc[1]));xc=0===Wc||1===Wc?xc:n(xc,1/Wc);Wc=.5*Zb;xc=[1,0,0,0,Wc*xc[4],Wc*xc[5],0,0];Nc=[Q(xc,Nc),Q(xc,Gb)];Gb=(0,J.Z)(Nc,2);Nc=Gb[0];Gb=Gb[1];if(0<=ka(Nc,nb)*ka(Gb,nb))var hd=[];else{a:{Gb=ma(R(Gb,Nc));
Nc=ma((hd=nb,[(Nd=Gb)[0]*hd[0],Nd[1]*hd[0]+Nd[0]*hd[1],Nd[2]*hd[0]+Nd[0]*hd[2],Nd[3]*hd[0]+Nd[0]*hd[3],Nd[4]*hd[0]+Nd[2]*hd[1]-Nd[1]*hd[2]+Nd[0]*hd[4],Nd[5]*hd[0]-Nd[3]*hd[1]+Nd[1]*hd[3]+Nd[0]*hd[5],Nd[6]*hd[0]+Nd[3]*hd[2]-Nd[2]*hd[3]+Nd[0]*hd[6],Nd[7]*hd[0]+Nd[6]*hd[1]+Nd[5]*hd[2]+Nd[4]*hd[3]+Nd[3]*hd[4]+Nd[2]*hd[5]+Nd[1]*hd[6]]));break a;var Nd}hd=[Nc]}return hd}).concat(Jc.flatMap(function(Nc){if(0===Zb)var Gb=0===ka(nb,Nc)?[Nc]:[];else{Gb=nb[2];var xc=nb[3],Wc=nb[1];Nc=aa(Nc);var hd=(0,J.Z)(Nc,
2);Nc=hd[0];var Nd=hd[1];hd=Gb*Gb+xc*xc;var Ld=Zb*Zb*hd-Math.pow(Gb*Nc+xc*Nd+Wc,2);if(0===hd||0>=Ld)Gb=[];else{Ld=Math.sqrt(Ld);var pc=Nc*xc*xc-Nd*Gb*xc-Gb*Wc;Wc=Nd*Gb*Gb-Nc*Gb*xc-xc*Wc;Gb=[z((pc+xc*Ld)/hd,(Wc-Gb*Ld)/hd),z((pc-xc*Ld)/hd,(Wc+Gb*Ld)/hd)]}}return Gb}));break;case "ellipse":ad=ib(Pa,Zb,nb)}if(2>ad.length)return[];ad=ad.sort(function(Nc,Gb){return L(R(Nc,ob))-L(R(Gb,ob))});return[ad[0],ad[ad.length-1]]},Bb=function(Pa){var nb=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,ob=
nb*Pa.width/2;nb=nb*Pa.height/2;switch(Pa.type){case "rectangle":case "image":case "text":return[z(ob,nb),z(ob,-nb),z(-ob,-nb),z(-ob,nb)];case "diamond":return[z(0,nb),z(ob,0),z(0,-nb),z(-ob,0)]}},ib=function(Pa,nb,ob){var Zb=Pa.width/2+nb;Pa=Pa.height/2+nb;nb=ob[2];var Jc=ob[3],ad=ob[1];ob=Zb*Zb*nb*nb+Pa*Pa*Jc*Jc;var Nc=ob-ad*ad;if(0===ob||0>=Nc)return[];Nc=Math.sqrt(Nc);var Gb=-Zb*Zb*nb*ad;ad*=-Pa*Pa*Jc;return[z((Gb+Zb*Pa*Jc*Nc)/ob,(ad-Zb*Pa*nb*Nc)/ob),z((Gb-Zb*Pa*Jc*Nc)/ob,(ad+Zb*Pa*nb*Nc)/ob)]},
Ob=function(Pa,nb,ob){var Zb=Math.sign(nb),Jc=0,ad=null;return Bb(Pa,Math.abs(nb)).forEach(function(Nc){var Gb=Zb*ma(R(Nc,ob))[1];Gb>Jc&&(Jc=Gb,ad=Nc)}),ad},Wb=function(Pa,nb,ob,Zb){var Jc,ad=[],Nc=!1;Pa=w((0,P.CM)(Pa));try{for(Pa.s();!(Jc=Pa.n()).done;){var Gb=Jc.value;"move"===Gb.op?(Nc=!Nc)&&ad.push([Gb.data[0],Gb.data[1]]):"bcurveTo"===Gb.op?Nc&&(ad.push([Gb.data[0],Gb.data[1]]),ad.push([Gb.data[2],Gb.data[3]]),ad.push([Gb.data[4],Gb.data[5]])):"lineTo"===Gb.op&&Nc&&ad.push([Gb.data[0],Gb.data[1]])}}catch(xc){Pa.e(xc)}finally{Pa.f()}if(4<=
ad.length){if("sharp"===Zb)return(0,D.c9)(ad,nb,ob);Zb=(0,O.s)(ad,10,5);return(0,D.c9)(Zb,nb,ob)}return!1},ic=function(Pa,nb,ob,Zb){var Jc=[0,0];return(0,P.CM)(Pa).some(function(ad,Nc){Nc=ad.op;var Gb=ad.data;if("move"===Nc)Jc=Gb;else{if("bcurveTo"===Nc){ad=[Gb[0],Gb[1]];Nc=[Gb[2],Gb[3]];Gb=[Gb[4],Gb[5]];var xc=Jc;Jc=Gb;return function(Wc,hd,Nd,Ld,pc,Ed){var xd=(0,J.Z)(pc,2);pc=xd[0];xd=xd[1];for(var Yd=function(Sd,Nb){return Math.pow(1-Sd,3)*Ld[Nb]+3*Sd*Math.pow(1-Sd,2)*Nd[Nb]+3*Math.pow(Sd,2)*(1-
Sd)*hd[Nb]+Wc[Nb]*Math.pow(Sd,3)},ud=0;1>=ud;){var Qd=Yd(ud,0),ld=Yd(ud,1);if(Math.sqrt(Math.pow(Qd-pc,2)+Math.pow(ld-xd,2))<Ed)return!0;ud+=.01}return!1}(xc,ad,Nc,Gb,[nb,ob],Zb)}if("lineTo"===Nc)return Wb(Pa,nb,ob,"sharp");"qcurveTo"===Nc&&console.warn("qcurveTo is not implemented yet")}return!1})}},5637:function(k,h,f){function w(H,aa){var M=Object.keys(H);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(H);aa&&(Q=Q.filter(function(D){return Object.getOwnPropertyDescriptor(H,
D).enumerable}));M.push.apply(M,Q)}return M}function x(H){for(var aa=1;aa<arguments.length;aa++){var M=null!=arguments[aa]?arguments[aa]:{};aa%2?w(Object(M),!0).forEach(function(Q){(0,z.Z)(H,Q,M[Q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(M)):w(Object(M)).forEach(function(Q){Object.defineProperty(H,Q,Object.getOwnPropertyDescriptor(M,Q))})}return H}f.d(h,{PK:function(){return L},Xx:function(){return ma},bp:function(){return fa},oA:function(){return Y}});
var J=f(2577),z=f(7169),u=f(8950);k=f(7945);var t=f.n(k),n=f(8288),R=f(8211),ka=f(1974),L=function(H){return new Promise(function(aa,M){var Q=new Image;Q.onload=function(){aa(Q)};Q.onerror=function(D){M(D)};Q.src=H})},ma=function(){var H=(0,u.Z)(t().mark(function Q(M){var D,O,P,ba,X;return t().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return D=M.fileIds,O=M.files,P=M.imageCache,ba=new Map,X=new Map,F.next=5,Promise.all(D.reduce(function(ha,K){var Z=O[K];return Z&&!ba.has(K)?(ba.set(K,!0),
ha.concat((0,u.Z)(t().mark(function ca(){var pa,za,ya;return t().wrap(function(Ha){for(;;)switch(Ha.prev=Ha.next){case 0:if(Ha.prev=0,Z.mimeType!==n.LO.binary){Ha.next=3;break}throw Error("Only images can be added to ImageCache");case 3:return pa=L(Z.dataURL),za={image:pa,mimeType:Z.mimeType},P.set(K,za),Ha.next=8,pa;case 8:ya=Ha.sent;P.set(K,x(x({},za),{},{image:ya}));Ha.next=15;break;case 12:Ha.prev=12,Ha.t0=Ha.catch(0),X.set(K,!0);case 15:case "end":return Ha.stop()}},ca,null,[[0,12]])}))())):
ha},[]));case 5:return F.abrupt("return",{imageCache:P,updatedFiles:ba,erroredFiles:X});case 6:case "end":return F.stop()}},Q)}));return function(M){return H.apply(this,arguments)}}(),Y=function(H){return H.filter(function(aa){return(0,ka.wi)(aa)})},fa=function(){var H=(0,u.Z)(t().mark(function Q(M){var D,O,P,ba,X,F,ha;return t().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:if(D=(new DOMParser).parseFromString(M,n.LO.svg),O=D.querySelector("svg"),!D.querySelector("parsererror")&&"svg"===(null==
(Z=O)?void 0:Z.nodeName.toLowerCase())){K.next=7;break}throw Error((0,R.t)("errors.invalidSVGString"));case 7:return O.hasAttribute("xmlns")||O.setAttribute("xmlns",n.hR),O.hasAttribute("width")&&O.hasAttribute("height")||(P=O.getAttribute("viewBox"),ba=O.getAttribute("width")||"50",X=O.getAttribute("height")||"50",P&&(F=P.match(/\d+ +\d+ +(\d+) +(\d+)/))&&(ha=(0,J.Z)(F,3),ba=ha[1],X=ha[2]),O.setAttribute("width",ba),O.setAttribute("height",X)),K.abrupt("return",O.outerHTML);case 10:case "end":return K.stop()}var Z},
Q)}));return function(M){return H.apply(this,arguments)}}()},5118:function(k,h,f){function w(ra,Aa){var Ja=Object.keys(ra);if(Object.getOwnPropertySymbols){var Sa=Object.getOwnPropertySymbols(ra);Aa&&(Sa=Sa.filter(function(Bb){return Object.getOwnPropertyDescriptor(ra,Bb).enumerable}));Ja.push.apply(Ja,Sa)}return Ja}function x(ra){for(var Aa=1;Aa<arguments.length;Aa++){var Ja=null!=arguments[Aa]?arguments[Aa]:{};Aa%2?w(Object(Ja),!0).forEach(function(Sa){(0,J.Z)(ra,Sa,Ja[Sa])}):Object.getOwnPropertyDescriptors?
Object.defineProperties(ra,Object.getOwnPropertyDescriptors(Ja)):w(Object(Ja)).forEach(function(Sa){Object.defineProperty(ra,Sa,Object.getOwnPropertyDescriptor(Ja,Sa))})}return ra}f.d(h,{ox:function(){return R.ox},BQ:function(){return oa},_M:function(){return Ca},EJ:function(){return Z},o8:function(){return F},Sy:function(){return t.Sy},os:function(){return n.os},KP:function(){return n.KP},Un:function(){return Q},$V:function(){return K},qf:function(){return n.qf},Pi:function(){return n.Pi},jt:function(){return H},
Lm:function(){return fb},Qp:function(){return z.Qp},uK:function(){return z.uK},T:function(){return D.T},xx:function(){return D.xx},Uo:function(){return Za},n2:function(){return aa},PC:function(){return R.PC},kK:function(){return R.kK},n_:function(){return Ma},wX:function(){return ka.wX},r2:function(){return u.r2},wB:function(){return ka.wB},QD:function(){return z.QD},qP:function(){return eb},iB:function(){return u.iB},Up:function(){return t.Up},vw:function(){return t.vw},y8:function(){return t.y8},
VL:function(){return t.VL},oN:function(){return ba.oN},RT:function(){return Oa},b_:function(){return Ua},vY:function(){return D.vY},N_:function(){return t.N_}});var J=f(7169),z=f(6126),u=f(1974),t=f(2791),n=f(8925),R=f(267),ka=f(2325),L=f(2577),ma=f(2726),Y=["rotation"],fa=function(ra,Aa,Ja){return Aa>=ra[0]&&Aa<=ra[0]+ra[2]&&Ja>=ra[1]&&Ja<=ra[1]+ra[3]},H=function(ra,Aa,Ja,Sa,Bb,ib){return ra.reduce(function(Ob,Wb){return Ob?Ob:(Ob=function(ic,Pa,nb,ob,Zb,Jc){if(!Pa.selectedElementIds[ic.id])return!1;
ic=(0,R.PC)(ic,Zb,Jc);Pa=ic.rotation;var ad=(0,ma.Z)(ic,Y);if(Pa&&fa(Pa,nb,ob))return"rotation";ic=Object.keys(ad).filter(function(Nc){Nc=ad[Nc];return!!Nc&&fa(Nc,nb,ob)});return 0<ic.length&&ic[0]}(Wb,Aa,Ja,Sa,Bb,ib))?{element:Wb,transformHandleType:Ob}:null},null)},aa=function(ra,Aa,Ja,Sa,Bb){ra=(0,L.Z)(ra,4);var ib=(0,R.kK)([ra[0],ra[1],ra[2],ra[3]],0,Sa,Bb,R.ox);return Object.keys(ib).find(function(Ob){return(Ob=ib[Ob])&&fa(Ob,Aa,Ja)})||!1},M=["ns","nesw","ew","nwse"],Q=function(ra){var Aa=ra.element,
Ja=Aa&&-1==Math.sign(Aa.height)*Math.sign(Aa.width),Sa=null;switch(ra.transformHandleType){case "n":case "s":Sa="ns";break;case "w":case "e":Sa="ew";break;case "nw":case "se":Sa=Ja?"nesw":"nwse";break;case "ne":case "sw":Sa=Ja?"nwse":"nesw";break;case "rotation":return"grab"}Sa&&Aa&&(ra=Sa,Aa=Aa.angle,Ja=M.indexOf(ra),0<=Ja&&(ra=M[(Ja+Math.round(Aa/(Math.PI/4)))%M.length]),Sa=ra);return Sa?"".concat(Sa,"-resize"):""},D=f(8634),O=f(8290),P=f(1935),ba=f(5710),X=f(242),F=function(ra,Aa,Ja,Sa){var Bb=
4<arguments.length&&void 0!==arguments[4]&&arguments[4],ib=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0,Ob=6<arguments.length&&void 0!==arguments[6]?arguments[6]:0,Wb=7<arguments.length?arguments[7]:void 0,ic=(0,n.KP)(Aa);ic=(0,L.Z)(ic,2);var Pa={x:Ja-ic[0],y:Sa-ic[1]};Aa.forEach(function(nb){if(ha(Bb,ib,Ob,ra,nb,Pa),!nb.groupIds.length||Wb.editingGroupId&&!(0,X.zq)(Wb,nb)){var ob=(0,ba.WJ)(nb);ob&&ha(Bb,ib,Ob,ra,ob,Pa)}(0,O.Ww)(nb,{simultaneouslyUpdated:Aa})})},ha=function(ra,Aa,Ja,Sa,
Bb,ib){if(ra){var Ob=ra&&Aa<Ja;ra=ra&&Aa>Ja;Sa=Sa.originalElements.get(Bb.id);Ob=Ob&&Sa?Sa.x:Bb.x+ib.x;ib=ra&&Sa?Sa.y:Bb.y+ib.y}else Ob=Bb.x+ib.x,ib=Bb.y+ib.y;(0,P.DR)(Bb,{x:Ob,y:ib})},K=function(ra,Aa,Ja){ra=(0,n.KP)(ra);ra=(0,L.Z)(ra,2);return[Aa-ra[0],Ja-ra[1]]},Z=function(ra,Aa,Ja,Sa,Bb,ib,Ob,Wb,ic,Pa,nb){ic&&(nb?Wb=Ob/nb:(Aa=(0,z.uK)(Aa,Ob,ib<Sa?-Wb:Wb),Ob=Aa.width,0>(Wb=Aa.height)&&(Wb=-Wb)));Bb=Bb<Ja?Ja-Ob:Ja;ib=ib<Sa?Sa-Wb:Sa;Pa&&(Bb=Ja-(Ob+=Ob)/2,ib=Sa-(Wb+=Wb)/2);0!==Ob&&0!==Wb&&(0,P.DR)(ra,
{x:Bb,y:ib,width:Ob,height:Wb})},ea=f(6066),ca=f(6340),pa=f(1564),za=f(8288),ya=f(3917),Ha=f(828),Ua=function(ra){var Aa,Ja=ra.id,Sa=ra.onChange,Bb=ra.onSubmit,ib=ra.getViewportCoords,Ob=ra.element,Wb=ra.canvas,ic=ra.excalidrawContainer,Pa=ra.app,nb=function(){var ud,Qd=Pa.state,ld=null===(ud=pa.Z.getScene(Ob))||void 0===ud?void 0:ud.getElement(Ja);if(ld){ud=ld.textAlign;var Sd=ld.verticalAlign,Nb=(0,ba.hP)((0,ca.mO)(ld));if(ld&&(0,u.iB)(ld)){var gc=ld.x,Yb=ld.y,qb=(0,ba.tl)(ld),mb=ld.width,cc=ld.height,
uc=ld.width,Uc=ld.height;if(qb&&ld.containerId){gc=ob;uc=gc.style.fontFamily.replace(/"/g,"");var cd=(0,ca.$g)({fontFamily:ld.fontFamily})!==uc||"".concat(ld.fontSize,"px")!==gc.style.fontSize;gc=Number(ob.style.height.slice(0,-2));if(0<gc&&(Uc=gc),cd&&(Aa=qb.height,Uc=ld.height),Aa||=qb.height,mb=qb.width-2*za.gK,cc=qb.height-2*za.gK,uc=mb,gc=qb.x+za.gK,Uc>cc)return void(0,P.DR)(qb,{height:qb.height+Math.min(Uc-cc,Nb)});qb.height>Aa&&Uc<cc?(0,P.DR)(qb,{height:qb.height-Math.min(cc-Uc,Nb)}):(Sd===
za.oX.MIDDLE&&(Yb=qb.y+qb.height/2-Uc/2),Sd===za.oX.BOTTOM&&(Yb=qb.y+qb.height-Uc-za.gK))}cc=ib(gc,Yb);cd=(0,L.Z)(cc,2);cc=cd[0];cd=cd[1];var Od=ob.selectionStart,be=ob.selectionEnd,oe=ob.value.length;if(ob.value=ld.originalText,Od===be&&be!==oe)Od=oe-be,ob.selectionStart=ob.value.length-Od,ob.selectionEnd=ob.value.length-Od;Od=ld.originalText.split("\n");var rd=ld.containerId?Nb:ld.height/Od.length;qb||(mb=(Qd.width-8-cc)/Qd.zoom.value);Nb=(Qd.height-cd)/Qd.zoom.value;var vc=qb?qb.angle:ld.angle;
qb=Object;Od=qb.assign;be=ob.style;oe=(0,ca.mO)(ld);rd="".concat(rd,"px");var Mc="".concat(uc,"px"),Me="".concat(Uc,"px");cc="".concat(cc,"px");cd="".concat(cd,"px");Qd=Qd.zoom;vc=180*vc/Math.PI;var qc=uc*(Qd.value-1)/2,Le=Uc*(Qd.value-1)/2;uc=(uc>mb&&1!==Qd.value&&(qc=mb*(Qd.value-1)/2),Uc>Nb&&1!==Qd.value&&(Le=Nb*(Qd.value-1)/2),"translate(".concat(qc,"px, ").concat(Le,"px) scale(").concat(Qd.value,") rotate(").concat(vc,"deg)"));Od.call(qb,be,{font:oe,lineHeight:rd,width:Mc,height:Me,left:cc,top:cd,
transform:uc,textAlign:ud,verticalAlign:Sd,color:ld.strokeColor,opacity:ld.opacity/100,filter:"var(--theme-filter)",maxWidth:"".concat(mb,"px"),maxHeight:"".concat(Nb,"px")});(0,ca.h2)()&&(ob.style.fontFamily=(0,ca.$g)(ld));(0,P.DR)(ld,{x:gc,y:Yb})}}},ob=document.createElement("textarea");ob.dir="auto";ob.tabIndex=0;ob.dataset.type="wysiwyg";ob.wrap="off";ob.classList.add("excalidraw-wysiwyg");ra="pre";var Zb="normal";(0,u.Xh)(Ob)&&(ra="pre-wrap",Zb="break-word");Object.assign(ob.style,{position:"absolute",
display:"inline-block",minHeight:"1em",backfaceVisibility:"hidden",margin:0,padding:0,border:0,outline:0,resize:"none",background:"transparent",overflow:"hidden",zIndex:"var(--zIndex-wysiwyg)",wordBreak:Zb,whiteSpace:ra,overflowWrap:"break-word"});nb();Sa&&(ob.oninput=function(){var ud,Qd=null===(ud=pa.Z.getScene(Ob))||void 0===ud?void 0:ud.getElement(Ja);ud=(0,ca.mO)(Qd);var ld=Math.round(ob.scrollHeight/(0,ba.hP)(ud));(0,u.Xh)(Ob)&&1<ld&&(Qd="auto",2===ld&&(ld=(0,ba.tl)(Ob),1===(0,ba.lD)(ob.value,
ud,ld.width).split("\n").length&&(Qd="".concat(ob.scrollHeight/2,"px"))),ob.style.height=Qd,ob.style.height="".concat(ob.scrollHeight,"px"));Sa(ob.value.replace(/\t/g,"        ").replace(/\r?\n|\r/g,"\n"))});ob.onkeydown=function(ud){!ud.shiftKey&&Ha.Lo.keyTest(ud)?(ud.preventDefault(),Pa.actionManager.executeAction(Ha.Lo),nb()):!ud.shiftKey&&Ha.CZ.keyTest(ud)?(ud.preventDefault(),Pa.actionManager.executeAction(Ha.CZ),nb()):ya.Tu.keyTest(ud)?Pa.actionManager.executeAction(ya.Tu):ya.Zq.keyTest(ud)?
Pa.actionManager.executeAction(ya.Zq):ud.key===ea.tW.ESCAPE?(ud.preventDefault(),hd=!0,Nd()):ud.key===ea.tW.ENTER&&ud[ea.tW.CTRL_OR_CMD]?(ud.preventDefault(),ud.isComposing||229===ud.keyCode)||(hd=!0,Nd()):(ud.key===ea.tW.TAB||ud[ea.tW.CTRL_OR_CMD]&&(ud.code===ea.aU.BRACKET_LEFT||ud.code===ea.aU.BRACKET_RIGHT))&&(ud.preventDefault(),ud.shiftKey||ud.code===ea.aU.BRACKET_LEFT?Gb():Nc(),ob.dispatchEvent(new Event("input")))};var Jc=" ".repeat(4),ad=new RegExp("^ {1,".concat(4,"}")),Nc=function(){var ud=
ob.selectionStart,Qd=ob.selectionEnd,ld=xc(),Sd=ob.value;ld.forEach(function(Nb){var gc=Sd.slice(0,Nb);Nb=Sd.slice(Nb);Sd="".concat(gc).concat(Jc).concat(Nb)});ob.value=Sd;ob.selectionStart=ud+4;ob.selectionEnd=Qd+4*ld.length},Gb=function(){var ud=ob.selectionStart,Qd=ob.selectionEnd,ld=xc(),Sd=[],Nb=ob.value;ld.forEach(function(gc){var Yb=Nb.slice(gc,gc+4).match(ad);if(Yb){var qb=Nb.slice(0,gc);Yb=Nb.slice(gc+Yb[0].length);Nb="".concat(qb).concat(Yb);Sd.push(gc)}});ob.value=Nb;Sd.length&&(ud>Sd[Sd.length-
1]?ob.selectionStart=Math.max(ud-4,Sd[Sd.length-1]):ob.selectionStart=ud,ob.selectionEnd=Math.max(ob.selectionStart,Qd-4*Sd.length))},xc=function(){var ud=ob.selectionStart,Qd=ob.selectionEnd,ld=ob.value,Sd=ld.slice(0,ud).match(/[^\n]*$/)[0].length;return ud-=Sd,ld.slice(ud,Qd).split("\n").reduce(function(Nb,gc,Yb,qb){return Nb.concat(Yb?Nb[Yb-1]+qb[Yb-1].length+1:ud)},[]).reverse()},Wc=function(ud){ud.preventDefault();ud.stopPropagation()},hd=!1,Nd=function(){var ud;xd||(xd=!0,ob.onblur=null,ob.oninput=
null,ob.onkeydown=null,Yd&&Yd.disconnect(),window.removeEventListener("resize",nb),window.removeEventListener("wheel",Wc,!0),window.removeEventListener("pointerdown",pc),window.removeEventListener("pointerup",Ld),window.removeEventListener("blur",Nd),Ed(),ob.remove());var Qd=null===(ud=pa.Z.getScene(Ob))||void 0===ud?void 0:ud.getElement(Ob.id);if(Qd){ud=ob.value;var ld=(0,ba.tl)(Qd);if(ld)if(ud=Qd.text,ob.value)(Qd=(0,ba.xB)(ld))&&Qd===Ob.id||(0,P.DR)(ld,{boundElements:(ld.boundElements||[]).concat({type:"text",
id:Ob.id})});else{var Sd;(0,P.DR)(ld,{boundElements:null===(Sd=ld.boundElements)||void 0===Sd?void 0:Sd.filter(function(Nb){return!(0,u.iB)(Nb)})})}Bb({text:ud,viaKeyboard:hd,originalText:ob.value})}},Ld=function ld(Qd){window.removeEventListener("pointerup",ld);var Sd=null==Qd?void 0:Qd.target,Nb=Sd instanceof HTMLInputElement&&Sd.closest(".color-picker-input")&&(0,ca.s)(Sd);setTimeout(function(){ob.onblur=Nd;Sd&&Nb&&(Sd.onblur=function(){ob.focus()});Nb||ob.focus()})},pc=function(Qd){var ld=Qd.target instanceof
HTMLInputElement&&Qd.target.closest(".color-picker-input")&&(0,ca.s)(Qd.target);((Qd.target instanceof HTMLElement||Qd.target instanceof SVGElement)&&Qd.target.closest(".".concat(za.$C.SHAPE_ACTIONS_MENU))&&!(0,ca.s)(Qd.target)||ld)&&(ob.onblur=null,window.addEventListener("pointerup",Ld),window.addEventListener("blur",Nd))},Ed=pa.Z.getScene(Ob).addCallback(function(){var Qd;nb();null!==(Qd=document.activeElement)&&void 0!==Qd&&Qd.closest(".color-picker-input")||ob.focus()}),xd=!1;ob.select();Ld();
var Yd=null;Wb&&"ResizeObserver"in window?(Yd=new window.ResizeObserver(function(){nb()})).observe(Wb):window.addEventListener("resize",nb);window.addEventListener("pointerdown",pc);window.addEventListener("wheel",Wc,{passive:!1,capture:!0});null==ic||ic.querySelector(".excalidraw-textEditorContainer").appendChild(ob)},Ea=f(75),Oa=function(ra,Aa){return!!(!ra.viewModeEnabled&&"custom"!==ra.activeTool.type&&(ra.editingElement||"selection"!==ra.activeTool.type&&"eraser"!==ra.activeTool.type)||(0,Ea.eD)(Aa,
ra).length)},Za=function(ra){return ra.reduce(function(Aa,Ja){return Aa+Ja.version},0)},Ma=function(ra){return ra.filter(function(Aa){return!Aa.isDeleted&&!(0,z.QD)(Aa)})},fb=function(ra){return ra.filter(function(Aa){return!Aa.isDeleted})},eb=function(ra){return!ra.isDeleted},Na=function(ra){return fb(ra).map(function(Aa){return(0,u.dt)(Aa.type)?x(x({},Aa),{},{lastCommittedPoint:null}):Aa})},oa=function(ra){return Na(ra)},Ca=function(ra){return Na(ra)}},6938:function(k,h,f){function w(P,ba){var X=
"undefined"!=typeof Symbol&&P[Symbol.iterator]||P["@@iterator"];if(!X){if(Array.isArray(P)||(X=function(ea,ca){if(ea){if("string"==typeof ea)return x(ea,ca);var pa=Object.prototype.toString.call(ea).slice(8,-1);"Object"===pa&&ea.constructor&&(pa=ea.constructor.name);if("Map"===pa||"Set"===pa)return Array.from(ea);if("Arguments"===pa||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(pa))return x(ea,ca)}}(P))||ba&&P&&"number"==typeof P.length){X&&(P=X);var F=0;ba=function(){};return{s:ba,n:function(){return F>=
P.length?{done:!0}:{done:!1,value:P[F++]}},e:function(ea){throw ea;},f:ba}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var ha,K=!0,Z=!1;return{s:function(){X=X.call(P)},n:function(){var ea=X.next();return K=ea.done,ea},e:function(ea){Z=!0;ha=ea},f:function(){try{K||null==X.return||X.return()}finally{if(Z)throw ha;}}}}function x(P,ba){(null==ba||ba>P.length)&&(ba=P.length);for(var X=0,
F=Array(ba);X<ba;X++)F[X]=P[X];return F}function J(P,ba){var X=Object.keys(P);if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(P);ba&&(F=F.filter(function(ha){return Object.getOwnPropertyDescriptor(P,ha).enumerable}));X.push.apply(X,F)}return X}function z(P){for(var ba=1;ba<arguments.length;ba++){var X=null!=arguments[ba]?arguments[ba]:{};ba%2?J(Object(X),!0).forEach(function(F){(0,t.Z)(P,F,X[F])}):Object.getOwnPropertyDescriptors?Object.defineProperties(P,Object.getOwnPropertyDescriptors(X)):
J(Object(X)).forEach(function(F){Object.defineProperty(P,F,Object.getOwnPropertyDescriptor(X,F))})}return P}f.d(h,{_:function(){return D}});var u=f(1930),t=f(7169),n=f(2577),R=f(8821),ka=f(5169),L=f(6552),ma=f(5118),Y=f(8925),fa=f(1935),H=f(1564),aa=f(8290),M=f(6340),Q=f(1974),D=function(){function P(ba,X){(0,R.Z)(this,P);this.elementId=ba.id;H.Z.mapElementToScene(this.elementId,X);P.normalizePoints(ba);this.lastUncommittedPoint=this.selectedPointsIndices=null;this.isDragging=!1;this.pointerOffset=
{x:0,y:0};this.endBindingElement=this.startBindingElement="keep";this.pointerDownState={prevSelectedPointsIndices:null,lastClickedPoint:-1}}return(0,ka.Z)(P,null,[{key:"getElement",value:function(ba){var X;return(null===(X=H.Z.getScene(ba))||void 0===X?void 0:X.getNonDeletedElement(ba))||null}},{key:"handleBoxSelection",value:function(ba,X,F){var ha;if(!X.editingLinearElement||"selection"!==(null===(ha=X.draggingElement)||void 0===ha?void 0:ha.type))return!1;ha=X.editingLinearElement;var K=ha.selectedPointsIndices,
Z=P.getElement(ha.elementId);if(!Z)return!1;X=(0,ma.qf)(X.draggingElement);X=(0,n.Z)(X,4);var ea=X[0],ca=X[1],pa=X[2],za=X[3];Z=P.getPointsGlobalCoordinates(Z).reduce(function(ya,Ha,Ua){return(Ha[0]>=ea&&Ha[0]<=pa&&Ha[1]>=ca&&Ha[1]<=za||ba.shiftKey&&null!=K&&K.includes(Ua))&&ya.push(Ua),ya},[]);F({editingLinearElement:z(z({},ha),{},{selectedPointsIndices:Z.length?Z:null})})}},{key:"handlePointDragging",value:function(ba,X,F,ha,K){if(!ba.editingLinearElement)return!1;var Z=ba.editingLinearElement,
ea=Z.selectedPointsIndices,ca=Z.isDragging,pa=P.getElement(Z.elementId);if(!pa)return!1;var za=pa.points[Z.pointerDownState.lastClickedPoint];if(ea&&za){!1===ca&&X({editingLinearElement:z(z({},Z),{},{isDragging:!0})});X=P.createPointAt(pa,F-Z.pointerOffset.x,ha-Z.pointerOffset.y,ba.gridSize);var ya=X[0]-za[0],Ha=X[1]-za[1];if(P.movePoints(pa,ea.map(function(Ua){return{index:Ua,point:Ua===Z.pointerDownState.lastClickedPoint?P.createPointAt(pa,F-Z.pointerOffset.x,ha-Z.pointerOffset.y,ba.gridSize):[pa.points[Ua][0]+
ya,pa.points[Ua][1]+Ha],isDragging:Ua===Z.pointerDownState.lastClickedPoint}})),(0,Q.Mn)(pa,!1))za=[],0===ea[0]&&za.push((0,M.AK)(P.getPointGlobalCoordinates(pa,pa.points[0]))),ea=ea[ea.length-1],ea===pa.points.length-1&&za.push((0,M.AK)(P.getPointGlobalCoordinates(pa,pa.points[ea]))),za.length&&K(pa,za);return!0}return!1}},{key:"handlePointerUp",value:function(ba,X,F){var ha,K=X.selectedPointsIndices,Z=X.isDragging,ea=X.pointerDownState,ca=P.getElement(X.elementId);if(!ca)return X;var pa={};if(Z&&
K){var za,ya=w(K);try{for(ya.s();!(za=ya.n()).done;){var Ha=za.value;if(0===Ha||Ha===ca.points.length-1){(0,L.g6)(ca.points,F.zoom.value)&&P.movePoints(ca,[{index:Ha,point:0===Ha?ca.points[ca.points.length-1]:ca.points[0]}]);var Ua=(0,aa.N1)(F)?(0,aa.Y9)((0,M.AK)(P.getPointAtIndexGlobalCoordinates(ca,Ha)),H.Z.getScene(ca)):null;pa[0===Ha?"startBindingElement":"endBindingElement"]=Ua}}}catch(Ea){ya.e(Ea)}finally{ya.f()}}return z(z(z({},X),pa),{},{selectedPointsIndices:Z||ba.shiftKey?!Z&&ba.shiftKey&&
null!==(ha=ea.prevSelectedPointsIndices)&&void 0!==ha&&ha.includes(ea.lastClickedPoint)?K&&K.filter(function(Ea){return Ea!==ea.lastClickedPoint}):K:null!=K&&K.includes(ea.lastClickedPoint)?[ea.lastClickedPoint]:K,isDragging:!1,pointerOffset:{x:0,y:0}})}},{key:"handlePointerDown",value:function(ba,X,F,ha,K){var Z,ea={didAddPoint:!1,hitElement:null};if(!X.editingLinearElement)return ea;var ca=P.getElement(X.editingLinearElement.elementId);if(!ca)return ea;if(ba.altKey)return null==X.editingLinearElement.lastUncommittedPoint&&
(0,fa.DR)(ca,{points:[].concat((0,u.Z)(ca.points),[P.createPointAt(ca,K.x,K.y,X.gridSize)])}),ha.resumeRecording(),F({editingLinearElement:z(z({},X.editingLinearElement),{},{pointerDownState:{prevSelectedPointsIndices:X.editingLinearElement.selectedPointsIndices,lastClickedPoint:-1},selectedPointsIndices:[ca.points.length-1],lastUncommittedPoint:null,endBindingElement:(0,aa.Y9)(K,H.Z.getScene(ca))})}),ea.didAddPoint=!0,ea;ha=P.getPointIndexUnderCursor(ca,X.zoom,K.x,K.y);if(-1<ha)ea.hitElement=ca;
else{var pa=X.editingLinearElement,za=pa.startBindingElement;pa=pa.endBindingElement;(0,aa.N1)(X)&&(0,Q.Mn)(ca)&&(0,aa.HG)(ca,za,pa)}za=(0,ma.qf)(ca);pa=(0,n.Z)(za,4);za=(pa[0]+pa[2])/2;pa=(pa[1]+pa[3])/2;ca=-1<ha&&(0,L.U1)(ca.x+ca.points[ha][0],ca.y+ca.points[ha][1],za,pa,ca.angle);ba=-1<ha||ba.shiftKey?ba.shiftKey||null!==(Z=X.editingLinearElement.selectedPointsIndices)&&void 0!==Z&&Z.includes(ha)?O([].concat((0,u.Z)(X.editingLinearElement.selectedPointsIndices||[]),[ha])):[ha]:null;return F({editingLinearElement:z(z({},
X.editingLinearElement),{},{pointerDownState:{prevSelectedPointsIndices:X.editingLinearElement.selectedPointsIndices,lastClickedPoint:ha},selectedPointsIndices:ba,pointerOffset:ca?{x:K.x-ca[0],y:K.y-ca[1]}:{x:0,y:0}})}),ea}},{key:"handlePointerMove",value:function(ba,X,F,ha,K){var Z=ha.lastUncommittedPoint,ea=P.getElement(ha.elementId);if(!ea)return ha;var ca=ea.points,pa=ca[ca.length-1];if(!ba.altKey)return pa===Z&&P.deletePoints(ea,[ca.length-1]),z(z({},ha),{},{lastUncommittedPoint:null});ba=P.createPointAt(ea,
X-ha.pointerOffset.x,F-ha.pointerOffset.y,K);return pa===Z?P.movePoints(ea,[{index:ea.points.length-1,point:ba}]):P.addPoints(ea,[{point:ba}]),z(z({},ha),{},{lastUncommittedPoint:ea.points[ea.points.length-1]})}},{key:"getPointGlobalCoordinates",value:function(ba,X){var F=(0,ma.qf)(ba);F=(0,n.Z)(F,4);ba=(0,L.U1)(ba.x+X[0],ba.y+X[1],(F[0]+F[2])/2,(F[1]+F[3])/2,ba.angle);ba=(0,n.Z)(ba,2);return[ba[0],ba[1]]}},{key:"getPointsGlobalCoordinates",value:function(ba){var X=(0,ma.qf)(ba);X=(0,n.Z)(X,4);var F=
(X[0]+X[2])/2,ha=(X[1]+X[3])/2;return ba.points.map(function(K){K=(0,L.U1)(ba.x+K[0],ba.y+K[1],F,ha,ba.angle);K=(0,n.Z)(K,2);return[K[0],K[1]]})}},{key:"getPointAtIndexGlobalCoordinates",value:function(ba,X){X=0>X?ba.points.length+X:X;var F=(0,ma.qf)(ba);F=(0,n.Z)(F,4);X=ba.points[X];return(0,L.U1)(ba.x+X[0],ba.y+X[1],(F[0]+F[2])/2,(F[1]+F[3])/2,ba.angle)}},{key:"pointFromAbsoluteCoords",value:function(ba,X){var F=(0,ma.qf)(ba);F=(0,n.Z)(F,4);X=(0,L.U1)(X[0],X[1],(F[0]+F[2])/2,(F[1]+F[3])/2,-ba.angle);
X=(0,n.Z)(X,2);return[X[0]-ba.x,X[1]-ba.y]}},{key:"getPointIndexUnderCursor",value:function(ba,X,F,ha){ba=this.getPointsGlobalCoordinates(ba);for(var K=ba.length;-1<--K;){var Z=ba[K];if((0,L.LW)(F,ha,Z[0],Z[1])*X.value<this.POINT_HANDLE_SIZE/2+1)return K}return-1}},{key:"createPointAt",value:function(ba,X,F,ha){X=(0,L.wC)(X,F,ha);F=(0,ma.qf)(ba);F=(0,n.Z)(F,4);X=(0,L.U1)(X[0],X[1],(F[0]+F[2])/2,(F[1]+F[3])/2,-ba.angle);X=(0,n.Z)(X,2);return[X[0]-ba.x,X[1]-ba.y]}},{key:"getNormalizedPoints",value:function(ba){var X=
ba.points,F=X[0][0],ha=X[0][1];return{points:X.map(function(K,Z){return[K[0]-F,K[1]-ha]}),x:ba.x+F,y:ba.y+ha}}},{key:"normalizePoints",value:function(ba){(0,fa.DR)(ba,P.getNormalizedPoints(ba))}},{key:"duplicateSelectedPoints",value:function(ba){if(!ba.editingLinearElement)return!1;var X=ba.editingLinearElement,F=X.selectedPointsIndices;X=P.getElement(X.elementId);if(!X||null===F)return!1;var ha=X.points,K=[],Z=!1,ea=-1,ca=ha.reduce(function(pa,za,ya){if(++ea,pa.push(za),F.includes(ya))(ya=ha[ya+
1])||(Z=!0),pa.push(ya?[(za[0]+ya[0])/2,(za[1]+ya[1])/2]:[za[0],za[1]]),K.push(ea+1),++ea;return pa},[]);if((0,fa.DR)(X,{points:ca}),Z)ca=X.points[X.points.length-1],P.movePoints(X,[{index:X.points.length-1,point:[ca[0]+30,ca[1]+30]}]);return{appState:z(z({},ba),{},{editingLinearElement:z(z({},ba.editingLinearElement),{},{selectedPointsIndices:K})})}}},{key:"deletePoints",value:function(ba,X){var F=0,ha=0;if(X.includes(0)){var K=ba.points.find(function(Z,ea){return!X.includes(ea)});K&&(F=K[0],ha=
K[1])}K=ba.points.reduce(function(Z,ea,ca){return X.includes(ca)||Z.push(Z.length?[ea[0]-F,ea[1]-ha]:[0,0]),Z},[]);P._updatePoints(ba,K,F,ha)}},{key:"addPoints",value:function(ba,X){X=[].concat((0,u.Z)(ba.points),(0,u.Z)(X.map(function(F){return F.point})));P._updatePoints(ba,X,0,0)}},{key:"movePoints",value:function(ba,X,F){var ha=ba.points,K=0,Z=0,ea=X.find(function(pa){return 0===pa.index});ea&&(K=ea.point[0]-ha[ea.index][0],Z=ea.point[1]-ha[ea.index][1]);var ca=ha.map(function(pa,za){var ya=X.find(function(Ha){return Ha.index===
za});return ya?ea?pa:[pa[0]+(ya.point[0]-ha[ya.index][0]),pa[1]+(ya.point[1]-ha[ya.index][1])]:K||Z?[pa[0]-K,pa[1]-Z]:pa});P._updatePoints(ba,ca,K,Z,F)}},{key:"_updatePoints",value:function(ba,X,F,ha,K){var Z=(0,Y.Ut)(ba,X,ba.strokeSharpness||"round"),ea=(0,Y.Ut)(ba,ba.points,ba.strokeSharpness||"round");F=(0,L.U1)(F,ha,(ea[0]+ea[2])/2-(Z[0]+Z[2])/2,(ea[1]+ea[3])/2-(Z[1]+Z[3])/2,ba.angle);(0,fa.DR)(ba,z(z({},K),{},{points:X,x:ba.x+F[0],y:ba.y+F[1]}))}}]),P}();D.POINT_HANDLE_SIZE=20;var O=function(P){P=
(0,u.Z)(new Set(P.filter(function(ba){return null!==ba&&-1!==ba})));return(P=P.sort(function(ba,X){return ba-X})).length?P:null}},1935:function(k,h,f){function w(fa,H){var aa=Object.keys(fa);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(fa);H&&(M=M.filter(function(Q){return Object.getOwnPropertyDescriptor(fa,Q).enumerable}));aa.push.apply(aa,M)}return aa}function x(fa){for(var H=1;H<arguments.length;H++){var aa=null!=arguments[H]?arguments[H]:{};H%2?w(Object(aa),!0).forEach(function(M){(0,z.Z)(fa,
M,aa[M])}):Object.getOwnPropertyDescriptors?Object.defineProperties(fa,Object.getOwnPropertyDescriptors(aa)):w(Object(aa)).forEach(function(M){Object.defineProperty(fa,M,Object.getOwnPropertyDescriptor(aa,M))})}return fa}f.d(h,{BE:function(){return ma},DR:function(){return L},ZP:function(){return Y}});var J=f(6655),z=f(7169),u=f(3063),t=f(1564),n=f(5001),R=f(6954),ka=f(6340),L=function(fa,H){var aa,M=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],Q=!1,D=H,O=D.points;D=D.fileId;for(var P in void 0!==
O&&(H=x(x({},(0,n.k)(O)),H)),H){var ba=H[P];if(void 0!==ba&&(fa[P]!==ba||"object"===(0,J.Z)(ba)&&null!==ba&&"groupIds"!==P&&"scale"!==P)){if("scale"===P){var X=fa[P],F=ba;if(X[0]===F[0]&&X[1]===F[1])continue}else if("points"===P&&(X=fa[P],F=ba,X.length===F.length)){for(var ha=!1,K=X.length;--K;){var Z=X[K],ea=F[K];if(Z[0]!==ea[0]||Z[1]!==ea[1]){ha=!0;break}}if(!ha)continue}fa[P]=ba;Q=!0}}if(!Q)return fa;(void 0===H.height&&void 0===H.width&&void 0===D&&void 0===O||(0,u.bI)(fa),fa.version++,fa.versionNonce=
(0,R.LU)(),fa.updated=(0,ka.C3)(),M)&&(null===(aa=t.Z.getScene(fa))||void 0===aa||aa.informMutation());return fa},ma=function(fa,H){var aa=!1,M;for(M in H){var Q=H[M];void 0!==Q&&(fa[M]!==Q||"object"===(0,J.Z)(Q)&&null!==Q)&&(aa=!0)}return aa?x(x(x({},fa),H),{},{updated:(0,ka.C3)(),version:fa.version+1,versionNonce:(0,R.LU)()}):fa},Y=function(fa,H){return fa.version=(null!=H?H:fa.version)+1,fa.versionNonce=(0,R.LU)(),fa.updated=(0,ka.C3)(),fa}},2791:function(k,h,f){function w(ea,ca){var pa=Object.keys(ea);
if(Object.getOwnPropertySymbols){var za=Object.getOwnPropertySymbols(ea);ca&&(za=za.filter(function(ya){return Object.getOwnPropertyDescriptor(ea,ya).enumerable}));pa.push.apply(pa,za)}return pa}function x(ea){for(var ca=1;ca<arguments.length;ca++){var pa=null!=arguments[ca]?arguments[ca]:{};ca%2?w(Object(pa),!0).forEach(function(za){(0,u.Z)(ea,za,pa[za])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ea,Object.getOwnPropertyDescriptors(pa)):w(Object(pa)).forEach(function(za){Object.defineProperty(ea,
za,Object.getOwnPropertyDescriptor(pa,za))})}return ea}f.d(h,{KE:function(){return X},N_:function(){return ba},OL:function(){return K},Sy:function(){return Z},Up:function(){return D},VL:function(){return P},vw:function(){return ha},y8:function(){return F}});var J=f(6655),z=f(2577),u=f(7169),t=f(2726),n=f(6340),R=f(6954),ka=f(1935),L=f(242),ma=f(5118),Y=f(6552),fa=f(8925),H=f(5710),aa=f(8288),M="x y strokeColor backgroundColor fillStyle strokeWidth strokeStyle roughness opacity width height angle groupIds strokeSharpness boundElements link locked".split(" "),
Q=function(ea,ca){var pa,za,ya=ca.x,Ha=ca.y,Ua=ca.strokeColor,Ea=ca.backgroundColor,Oa=ca.fillStyle,Za=ca.strokeWidth,Ma=ca.strokeStyle,fb=ca.roughness,eb=ca.opacity,Na=ca.width;Na=void 0===Na?0:Na;var oa=ca.height;oa=void 0===oa?0:oa;var Ca=ca.angle;Ca=void 0===Ca?0:Ca;var ra=ca.groupIds;ra=void 0===ra?[]:ra;var Aa=ca.strokeSharpness,Ja=ca.boundElements;Ja=void 0===Ja?null:Ja;var Sa=ca.link;Sa=void 0===Sa?null:Sa;var Bb=ca.locked;ca=(0,t.Z)(ca,M);return{id:ca.id||(0,R.kb)(),type:ea,x:ya,y:Ha,width:Na,
height:oa,angle:Ca,strokeColor:Ua,backgroundColor:Ea,fillStyle:Oa,strokeWidth:Za,strokeStyle:Ma,roughness:fb,opacity:eb,groupIds:ra,strokeSharpness:Aa,seed:null!==(pa=ca.seed)&&void 0!==pa?pa:(0,R.LU)(),version:ca.version||1,versionNonce:null!==(za=ca.versionNonce)&&void 0!==za?za:0,isDeleted:!1,boundElements:Ja,updated:(0,n.C3)(),link:Sa,locked:Bb}},D=function(ea){return Q(ea.type,ea)},O=function(ea,ca){return{x:"center"===ea.textAlign?ca.width/2:"right"===ea.textAlign?ca.width:0,y:"middle"===ea.verticalAlign?
ca.height/2:0}},P=function(ea){var ca=(0,H.X1)(ea.text,(0,n.mO)(ea)),pa=O(ea,ca);return(0,ka.BE)(x(x({},Q("text",ea)),{},{text:ea.text,fontSize:ea.fontSize,fontFamily:ea.fontFamily,textAlign:ea.textAlign,verticalAlign:ea.verticalAlign,x:ea.x-pa.x,y:ea.y-pa.y,width:ca.width,height:ca.height,baseline:ca.baseline,containerId:ea.containerId||null,originalText:ea.text}),{})},ba=function(ea,ca){var pa=ca.text,za=ca.isDeleted;ca=ca.originalText;var ya=(0,H.tl)(ea);ya&&(pa=(0,H.lD)(pa,(0,n.mO)(ea),ya.width));
var Ha=pa,Ua=null;(ya=(0,H.tl)(ea))&&(Ua=ya.width-2*aa.gK);var Ea=(0,H.X1)(Ha,(0,n.mO)(ea),Ua);Ha=Ea.width;var Oa=Ea.height;Ea=Ea.baseline;var Za=ea.textAlign;var Ma=ea.verticalAlign;if("center"!==Za||Ma!==aa.oX.MIDDLE||ea.containerId){Ua=(0,ma.qf)(ea);var fb=(0,z.Z)(Ua,4);Ua=fb[0];Ma=fb[1];var eb=fb[2];fb=fb[3];var Na=(0,fa.wC)(ea,Ha,Oa);Na=(0,z.Z)(Na,4);Za=(0,Y.yq)({s:!0,e:"center"===Za||"left"===Za,w:"center"===Za||"right"===Za},ea.x,ea.y,ea.angle,(Ua-Na[0])/2,(Ma-Na[1])/2,(eb-Na[2])/2,(fb-Na[3])/
2);Ua=(0,z.Z)(Za,2);Za=Ua[0];Ua=Ua[1]}else Za=(0,H.X1)(ea.text,(0,n.mO)(ea),Ua),Ua=O(ea,{width:Ha-Za.width,height:Oa-Za.height}),Za=ea.x-Ua.x,Ua=ea.y-Ua.y;ya&&(Ma=ya.height,eb=ya.width,Oa>Ma-2*aa.gK&&(Ma=Oa+2*aa.gK),Ha>eb-2*aa.gK&&(eb=Ha+2*aa.gK),Ma===ya.height&&eb===ya.width||(0,ka.DR)(ya,{height:Ma,width:eb}));ya={width:Ha,height:Oa,x:Number.isFinite(Za)?Za:ea.x,y:Number.isFinite(Ua)?Ua:ea.y,baseline:Ea};return(0,ka.BE)(ea,x({text:pa,originalText:ca,isDeleted:null!=za?za:ea.isDeleted},ya))},X=function(ea){return x(x({},
Q(ea.type,ea)),{},{points:ea.points||[],pressures:[],simulatePressure:ea.simulatePressure,lastCommittedPoint:null})},F=function(ea){return x(x({},Q(ea.type,ea)),{},{points:ea.points||[],lastCommittedPoint:null,startBinding:null,endBinding:null,startArrowhead:ea.startArrowhead,endArrowhead:ea.endArrowhead})},ha=function(ea){return x(x({},Q("image",ea)),{},{strokeColor:"transparent",status:"pending",fileId:null,scale:[1,1]})},K=function pa(ca){var za=1<arguments.length&&void 0!==arguments[1]?arguments[1]:
0;if(null==ca||"object"!==(0,J.Z)(ca))return ca;if("[object Object]"===Object.prototype.toString.call(ca)){var ya="function"==typeof ca.constructor?Object.create(Object.getPrototypeOf(ca)):{},Ha;for(Ha in ca)ca.hasOwnProperty(Ha)&&(0!==za||"shape"!==Ha&&"canvas"!==Ha)&&(ya[Ha]=pa(ca[Ha],za+1));return ya}if(Array.isArray(ca)){ya=ca.length;for(Ha=Array(ya);ya--;)Ha[ya]=pa(ca[ya],za+1);return Ha}return ca},Z=function(ca,pa,za,ya){var Ha,Ua,Ea=K(za);(0,n.h2)()?(Ea.id="".concat(Ea.id,"_copy"),null!==(Ha=
window.h)&&void 0!==Ha&&null!==(Ua=Ha.app)&&void 0!==Ua&&Ua.getSceneElementsIncludingDeleted().find(function(Oa){return Oa.id===Ea.id})&&(Ea.id+="_copy")):Ea.id=(0,R.kb)();return Ea.updated=(0,n.C3)(),Ea.seed=(0,R.LU)(),Ea.groupIds=(0,L.Qy)(Ea.groupIds,ca,function(Oa){return pa.has(Oa)||pa.set(Oa,(0,R.kb)()),pa.get(Oa)}),ya&&(Ea=Object.assign(Ea,ya)),Ea}},8634:function(k,h,f){function w(Z,ea){var ca=Object.keys(Z);if(Object.getOwnPropertySymbols){var pa=Object.getOwnPropertySymbols(Z);ea&&(pa=pa.filter(function(za){return Object.getOwnPropertyDescriptor(Z,
za).enumerable}));ca.push.apply(ca,pa)}return ca}function x(Z){for(var ea=1;ea<arguments.length;ea++){var ca=null!=arguments[ea]?arguments[ea]:{};ea%2?w(Object(ca),!0).forEach(function(pa){(0,J.Z)(Z,pa,ca[pa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Z,Object.getOwnPropertyDescriptors(ca)):w(Object(ca)).forEach(function(pa){Object.defineProperty(Z,pa,Object.getOwnPropertyDescriptor(ca,pa))})}return Z}f.d(h,{LW:function(){return Q},T:function(){return K},l2:function(){return ba},
vY:function(){return D},xx:function(){return ha}});var J=f(7169),z=f(1930),u=f(2577),t=f(8288),n=f(5001),R=f(6552),ka=f(8925),L=f(1974),ma=f(1935),Y=f(6126),fa=f(6340),H=f(8290),aa=f(1564),M=f(5710),Q=function(Z){return Z>=2*Math.PI?Z-2*Math.PI:Z},D=function(Z,ea,ca,pa,za,ya,Ha,Ua,Ea,Oa,Za){if(1===ca.length){ca=(0,u.Z)(ca,1)[0];if("rotation"===ea){ea=(0,ka.qf)(ca);ea=(0,u.Z)(ea,4);ea=5*Math.PI/2+Math.atan2(Ea-(ea[1]+ea[3])/2,Ua-(ea[0]+ea[2])/2);za&&(ea+=t.ay/2,ea-=ea%t.ay);ea=Q(ea);(0,ma.DR)(ca,{angle:ea});
if(ya=(0,M.xB)(ca))ya=aa.Z.getScene(ca).getElement(ya),(0,ma.DR)(ya,{angle:ea});(0,H.Ww)(ca)}else if(!(0,L.bt)(ca)||2!==ca.points.length||"nw"!==ea&&"ne"!==ea&&"sw"!==ea&&"se"!==ea)if(!(0,L.iB)(ca)||"nw"!==ea&&"ne"!==ea&&"sw"!==ea&&"se"!==ea)ea&&ba(Z.originalElements,Ha,ca,ea,ya,Ua,Ea);else{pa=(0,ka.qf)(ca);za=(0,u.Z)(pa,4);Ha=za[0];Z=za[1];pa=za[2];za=za[3];Ua=(0,R.U1)(Ua,Ea,(Ha+pa)/2,(Z+za)/2,-ca.angle);Ea=(0,u.Z)(Ua,2);Ua=Ea[0];Ea=Ea[1];switch(ea){case "se":var Ma=Math.max((Ua-Ha)/(pa-Ha),(Ea-
Z)/(za-Z));break;case "nw":Ma=Math.max((pa-Ua)/(pa-Ha),(za-Ea)/(za-Z));break;case "ne":Ma=Math.max((Ua-Ha)/(pa-Ha),(za-Ea)/(za-Z));break;case "sw":Ma=Math.max((pa-Ua)/(pa-Ha),(Ea-Z)/(za-Z))}0<Ma&&(Ua=ca.width*Ma,Ma*=ca.height,Ea=P(ca,Ua,Ma),null!==Ea&&(Oa=(0,ka.wC)(ca,Ua,Ma),Oa=(0,u.Z)(Oa,4),Ha=(Ha-Oa[0])/2,Z=(Z-Oa[1])/2,pa=(pa-Oa[2])/2,za=(za-Oa[3])/2,Oa=R.yq,ea={n:/^(n|ne|nw)$/.test(ea)||ya&&/^(s|se|sw)$/.test(ea),s:/^(s|se|sw)$/.test(ea)||ya&&/^(n|ne|nw)$/.test(ea),w:/^(w|nw|sw)$/.test(ea)||ya&&
/^(e|ne|se)$/.test(ea),e:/^(e|ne|se)$/.test(ea)||ya&&/^(w|nw|sw)$/.test(ea)},ea=Oa.call(R,ea,ca.x,ca.y,ca.angle,Ha,Z,pa,za),ea=(0,u.Z)(ea,2),(0,ma.DR)(ca,{fontSize:Ea.size,width:Ua,height:Ma,baseline:Ea.baseline,x:ea[0],y:ea[1]})));(0,H.Ww)(ca)}else ea=(0,ka.qf)(ca),ea=(0,u.Z)(ea,4),ea=(0,R.U1)(Ua,Ea,(ea[0]+ea[2])/2,(ea[1]+ea[3])/2,-ca.angle),ya=(0,u.Z)(ea,2),ea=ya[0],ya=ya[1],ya=(0,u.Z)("end"===pa?[ea-ca.x,ya-ca.y]:[ca.x+ca.points[1][0]-ea,ca.y+ca.points[1][1]-ya],2),ea=ya[0],ya=ya[1],za&&(za=ca.angle,
ea=Y.uK.apply(void 0,[ca.type].concat((0,z.Z)((0,R.U1)(ea,ya,0,0,za)))),ea=(0,R.U1)(ea.width,ea.height,0,0,-za),ya=(0,u.Z)(ea,2),ea=ya[0],ya=ya[1]),pa=(0,R.yq)("end"===pa?{s:!0,e:!0}:{n:!0,w:!0},ca.x,ca.y,ca.angle,0,0,(ca.points[1][0]-ea)/2,(ca.points[1][1]-ya)/2),pa=(0,u.Z)(pa,2),(0,ma.DR)(ca,{x:pa[0],y:pa[1],points:[[0,0],[ea,ya]]});return!0}if(1<ca.length){if("rotation"===ea)return F(Z,ca,Ua,Ea,za,Oa,Za),!0;if("nw"===ea||"ne"===ea||"sw"===ea||"se"===ea)return X(ca,ea,Ua,Ea),!0}return!1},O=function(Z,
ea,ca){return(0,L.bt)(Z)||(0,L.F9)(Z)?{points:(0,n.z)(0,ea,(0,n.z)(1,ca,Z.points))}:{}},P=function(Z,ea,ca){ea=ea/Z.width*Z.fontSize;if(1>ea)return null;Z=(0,M.X1)(Z.text,(0,fa.mO)({fontSize:ea,fontFamily:Z.fontFamily}),Z.containerId?Z.width:null);return{size:ea,baseline:Z.baseline+(ca-Z.height)}},ba=function(Z,ea,ca,pa,za,ya,Ha){var Ua=Z.get(ca.id),Ea=(0,ka.wC)(Ua,Ua.width,Ua.height);Ea=(0,u.Z)(Ea,4);var Oa=[Ea[0],Ea[1]],Za=[Ea[2],Ea[3]];Ea=(0,R.H5)(Oa,Za);var Ma=(0,R.xj)([ya,Ha],Ea,-Ua.angle);ya=
(0,ka.wC)(ca,ca.width,ca.height);ya=(0,u.Z)(ya,4);var fb=ya[2]-ya[0],eb=ya[3]-ya[1];ya=(Za[0]-Oa[0])/fb;Ha=(Za[1]-Oa[1])/eb;var Na={},oa=(0,M.WJ)(ca);pa.includes("e")&&(ya=(Ma[0]-Oa[0])/fb);pa.includes("s")&&(Ha=(Ma[1]-Oa[1])/eb);pa.includes("w")&&(ya=(Za[0]-Ma[0])/fb);pa.includes("n")&&(Ha=(Za[1]-Ma[1])/eb);eb=Ua.width;var Ca=Ua.height;Ma=ca.width*ya;fb=ca.height*Ha;if(za&&(Ma=2*Ma-eb,fb=2*fb-Ca),ea){var ra=Math.abs(Ma)/eb,Aa=Math.abs(fb)/Ca;if(1===pa.length&&(fb*=ra,Ma*=Aa),2===pa.length)ra=Math.max(ra,
Aa),Ma=eb*ra*Math.sign(Ma),fb=Ca*ra*Math.sign(fb)}if(oa)if(Z=Z.get(oa.id),Z&&(Na={fontSize:Z.fontSize,baseline:Z.baseline}),ea){Na=P(oa,Ma-2*t.gK,fb-2*t.gK);if(null===Na)return;Na={fontSize:Na.size,baseline:Na.baseline}}else Z=(0,M.AT)((0,fa.mO)(oa)),eb=(0,M.w_)((0,fa.mO)(oa)),Ma=Math.ceil(Math.max(Ma,Z)),fb=Math.ceil(Math.max(fb,eb));Z=(0,ka.wC)(Ua,Ma,fb);ra=(0,u.Z)(Z,4);Z=ra[0];eb=ra[1];Ca=ra[2]-Z;ra=ra[3]-eb;Aa=[].concat(Oa);if(["n","w","nw"].includes(pa)&&(Aa=[Za[0]-Math.abs(Ca),Za[1]-Math.abs(ra)]),
"ne"===pa)Aa=[Oa[0],Za[1]],Aa=[Aa[0],Aa[1]-Math.abs(ra)];"sw"===pa&&(Oa=[Za[0],Oa[1]],Aa=[Oa[0]-Math.abs(Ca),Oa[1]]);ea&&(["s","n"].includes(pa)&&(Aa[0]=Ea[0]-Ca/2),["e","w"].includes(pa)&&(Aa[1]=Ea[1]-ra/2));0>Ma&&(pa.includes("e")&&(Aa[0]-=Math.abs(Ca)),pa.includes("w")&&(Aa[0]+=Math.abs(Ca)));0>fb&&(pa.includes("s")&&(Aa[1]-=Math.abs(ra)),pa.includes("n")&&(Aa[1]+=Math.abs(ra)));za&&(Aa[0]=Ea[0]-Math.abs(Ca)/2,Aa[1]=Ea[1]-Math.abs(ra)/2);ea=Ua.angle;za=(0,R.xj)(Aa,Ea,ea);Ea=(0,R.xj)([Aa[0]+Math.abs(Ca)/
2,Aa[1]+Math.abs(ra)/2],Ea,ea);Aa=(0,R.xj)(za,Ea,-ea);ea=O(Ua,Ma,fb);za=(0,z.Z)(Aa);za[0]+=Ua.x-Z;za[1]+=Ua.y-eb;ea=x({width:Math.abs(Ma),height:Math.abs(fb),x:za[0],y:za[1]},ea);"scale"in ca&&"scale"in Ua&&(0,ma.DR)(ca,{scale:[(Math.sign(ya)||Ua.scale[0])*Ua.scale[0],(Math.sign(Ha)||Ua.scale[1])*Ua.scale[1]]});0!==ea.width&&0!==ea.height&&Number.isFinite(ea.x)&&Number.isFinite(ea.y)&&((0,H.Ww)(ca,{newSize:{width:ea.width,height:ea.height}}),(0,ma.DR)(ca,ea),oa&&Na&&(0,ma.DR)(oa,{fontSize:Na.fontSize}),
(0,M.RB)(ca,pa))},X=function(Z,ea,ca,pa){var za=(0,ka.KP)(Z);za=(0,u.Z)(za,4);var ya=za[0],Ha=za[1],Ua=za[2],Ea=za[3];switch(ea){case "se":var Oa=Math.max((ca-ya)/(Ua-ya),(pa-Ha)/(Ea-Ha));var Za=function(fb,eb,Na){var oa=(0,u.Z)(eb,2);eb=oa[0];oa=oa[1];Na=(0,u.Z)(Na,2);return{x:fb.x+(eb-ya)*(Oa-1)+eb-Na[0],y:fb.y+(oa-Ha)*(Oa-1)+oa-Na[1]}};break;case "nw":Oa=Math.max((Ua-ca)/(Ua-ya),(Ea-pa)/(Ea-Ha));Za=function(fb,eb,Na){var oa=(0,u.Z)(eb,4);eb=oa[2];oa=oa[3];Na=(0,u.Z)(Na,4);return{x:fb.x-(Ua-eb)*
(Oa-1)+eb-Na[2],y:fb.y-(Ea-oa)*(Oa-1)+oa-Na[3]}};break;case "ne":Oa=Math.max((ca-ya)/(Ua-ya),(Ea-pa)/(Ea-Ha));Za=function(fb,eb,Na){var oa=(0,u.Z)(eb,4);eb=oa[0];oa=oa[3];Na=(0,u.Z)(Na,4);return{x:fb.x+(eb-ya)*(Oa-1)+eb-Na[0],y:fb.y-(Ea-oa)*(Oa-1)+oa-Na[3]}};break;case "sw":Oa=Math.max((Ua-ca)/(Ua-ya),(pa-Ha)/(Ea-Ha)),Za=function(fb,eb,Na){var oa=(0,u.Z)(eb,3);eb=oa[1];oa=oa[2];Na=(0,u.Z)(Na,3);return{x:fb.x-(Ua-oa)*(Oa-1)+oa-Na[2],y:fb.y+(eb-Ha)*(Oa-1)+eb-Na[1]}}}if(0<Oa){var Ma=Z.reduce(function(fb,
eb){if(!fb)return fb;var Na=eb.width*Oa,oa=eb.height*Oa,Ca=(0,M.WJ)(eb),ra={};if(Ca){ra=P(Ca,Na-2*t.gK,oa-2*t.gK);if(null===ra)return null;ra={fontSize:ra.size,baseline:ra.baseline}}if((0,L.iB)(eb)){ra=P(eb,Na,oa);if(null===ra)return null;ra={fontSize:ra.size,baseline:ra.baseline}}var Aa=(0,ka.qf)(eb);Ca=O(eb,Na,oa);(0,H.Ww)(eb,{newSize:{width:Na,height:oa},simultaneouslyUpdated:Z});var Ja=(0,ka.wC)(x(x({},eb),Ca),Na,oa);Aa=Za(eb,Aa,Ja);eb=Aa.x;Aa=Aa.y;return[].concat((0,z.Z)(fb),[x(x({width:Na,height:oa,
x:eb,y:Aa},Ca),ra)])},[]);Ma&&Z.forEach(function(fb,eb){(0,ma.DR)(fb,Ma[eb]);var Na=(0,M.WJ)(fb);Na&&((0,ma.DR)(Na,{fontSize:Ma[eb].fontSize,baseline:Ma[eb].baseline}),(0,M.RB)(fb,ea))})}},F=function(Z,ea,ca,pa,za,ya,Ha){var Ua=5*Math.PI/2+Math.atan2(pa-Ha,ca-ya);za&&(Ua+=t.ay/2,Ua-=Ua%t.ay);ea.forEach(function(Ea,Oa){var Za,Ma;Oa=(0,ka.qf)(Ea);var fb=(0,u.Z)(Oa,4);Oa=(fb[0]+fb[2])/2;fb=(fb[1]+fb[3])/2;var eb=null!==(Za=null===(Ma=Z.originalElements.get(Ea.id))||void 0===Ma?void 0:Ma.angle)&&void 0!==
Za?Za:Ea.angle;Za=(0,R.U1)(Oa,fb,ya,Ha,Ua+eb-Ea.angle);Ma=(0,u.Z)(Za,2);Za=Ma[0];Ma=Ma[1];(0,ma.DR)(Ea,{x:Ea.x+(Za-Oa),y:Ea.y+(Ma-fb),angle:Q(Ua+eb)});var Na=(0,M.xB)(Ea);Na&&(Ea=aa.Z.getScene(Ea).getElement(Na),(0,ma.DR)(Ea,{x:Ea.x+(Za-Oa),y:Ea.y+(Ma-fb),angle:Q(Ua+eb)}))})},ha=function(Z,ea,ca,pa){var za=1===ea.length?(0,ka.qf)(ea[0]):(0,ka.KP)(ea),ya=(0,u.Z)(za,4);za=ya[0];var Ha=ya[1],Ua=ya[2];ya=ya[3];ea=1===ea.length?ea[0].angle:0;ca=(0,R.U1)(ca,pa,(za+Ua)/2,(Ha+ya)/2,-ea);var Ea=(0,u.Z)(ca,
2);switch(ca=Ea[0],pa=Ea[1],Z){case "n":return(0,R.U1)(ca-(za+Ua)/2,pa-Ha,0,0,ea);case "s":return(0,R.U1)(ca-(za+Ua)/2,pa-ya,0,0,ea);case "w":return(0,R.U1)(ca-za,pa-(Ha+ya)/2,0,0,ea);case "e":return(0,R.U1)(ca-Ua,pa-(Ha+ya)/2,0,0,ea);case "nw":return(0,R.U1)(ca-za,pa-Ha,0,0,ea);case "ne":return(0,R.U1)(ca-Ua,pa-Ha,0,0,ea);case "sw":return(0,R.U1)(ca-za,pa-ya,0,0,ea);case "se":return(0,R.U1)(ca-Ua,pa-ya,0,0,ea);default:return[0,0]}},K=function(Z,ea){ea=(0,u.Z)(ea.points,2);var ca=(0,u.Z)(ea[1],2);
ea=ca[0];ca=ca[1];return"nw"===Z&&(0>ea||0>ca)||"ne"===Z&&0<=ea||"sw"===Z&&0>=ea||"se"===Z&&(0<ea||0<ca)?"end":"origin"}},6126:function(k,h,f){f.d(h,{QD:function(){return J},Qp:function(){return u},uK:function(){return z}});f(1935);var w=f(1974),x=f(8288),J=function(t){return(0,w.bt)(t)||(0,w.F9)(t)?2>t.points.length:0===t.width&&0===t.height},z=function(t,n,R){var ka=Math.abs(n),L=Math.abs(R);"line"===t||"arrow"===t||"freedraw"===t?(t=Math.round(Math.atan(L/ka)/x.ay)*x.ay,0===t?R=0:t===Math.PI/2?
n=0:R=Math.round(ka*Math.tan(t))*Math.sign(R)||R):"selection"!==t&&(R=ka*Math.sign(R));return{width:n,height:R}},u=function(t){var n={width:t.width,height:t.height,x:t.x,y:t.y};if(0>t.width){var R=Math.abs(t.width);n.width=R;n.x=t.x-R}0>t.height&&(R=Math.abs(t.height),n.height=R,n.y=t.y-R);return n}},5710:function(k,h,f){f.d(h,{AT:function(){return O},P7:function(){return L},RB:function(){return ma},WJ:function(){return F},X1:function(){return Y},hP:function(){return aa},lD:function(){return Q},oN:function(){return ka},
tl:function(){return ha},w_:function(){return P},xB:function(){return X}});var w,x,J=f(1930),z=f(6340),u=f(1935),t=f(8288),n=f(1564),R=f(5118),ka=function(K,Z){var ea=Z?Z.width-2*t.gK:void 0,ca=K.text;Z&&(ca=Q(K.originalText,(0,z.mO)(K),Z.width));ea=Y(K.originalText,(0,z.mO)(K),ea);var pa=K.y,za=K.x;if(Z){var ya=Z.height;za=Z.x+t.gK;K.verticalAlign===t.oX.TOP?pa=Z.y+t.gK:K.verticalAlign===t.oX.BOTTOM?pa=Z.y+Z.height-ea.height-t.gK:(pa=Z.y+Z.height/2-ea.height/2,ea.height>Z.height-2*t.gK&&(ya=ea.height+
2*t.gK,pa=Z.y+ya/2-ea.height/2));(0,u.DR)(Z,{height:ya})}(0,u.DR)(K,{width:ea.width,height:ea.height,baseline:ea.baseline,y:pa,x:za,text:ca})},L=function(K,Z,ea){var ca=(0,z.xn)(K);Z.forEach(function(pa){var za=ea.get(pa.id),ya=X(pa);if(ya){var Ha=ea.get(ya);if(Ha){var Ua;(ya=ca.get(za))&&(0,u.DR)(ya,{boundElements:null===(Ua=pa.boundElements)||void 0===Ua?void 0:Ua.concat({type:"text",id:Ha})});(pa=ca.get(Ha))&&(0,R.iB)(pa)&&(0,u.DR)(pa,{containerId:ya?za:null})}}})},ma=function(K,Z){var ea=X(K);
if(ea&&(ea=n.Z.getScene(K).getElement(ea))&&ea.text&&K){var ca=ea.text,pa=ea.height,za=ea.baseline;if("n"!==Z&&"s"!==Z){ca&&=Q(ea.originalText,(0,z.mO)(ea),K.width);var ya=Y(ca,(0,z.mO)(ea),K.width);pa=ya.height;za=ya.baseline}if(pa>K.height-2*t.gK){var Ha=(ya=pa+2*t.gK)-K.height;(0,u.DR)(K,{height:ya,y:"ne"===Z||"nw"===Z||"n"===Z?K.y-Ha:K.y})}(0,u.DR)(ea,{text:ca,width:K.width-2*t.gK,height:pa,x:K.x+t.gK,y:ea.verticalAlign===t.oX.TOP?K.y+t.gK:ea.verticalAlign===t.oX.BOTTOM?K.y+K.height-pa-t.gK:K.y+
K.height/2-pa/2,baseline:za})}},Y=function(K,Z,ea){K=K.split("\n").map(function(pa){return pa||" "}).join("\n");var ca=document.createElement("div");if(ca.style.position="absolute",ca.style.whiteSpace="pre",ca.style.font=Z,ca.style.minHeight="1em",ea)Z=aa(Z),ca.style.width="".concat(String(ea),"px"),ca.style.maxWidth="".concat(String(ea),"px"),ca.style.overflow="hidden",ca.style.wordBreak="break-word",ca.style.lineHeight="".concat(String(Z),"px"),ca.style.whiteSpace="pre-wrap";document.body.appendChild(ca);
ca.innerText=K;K=document.createElement("span");K.style.display="inline-block";K.style.overflow="hidden";K.style.width="1px";K.style.height="1px";ca.appendChild(K);K=K.offsetTop+K.offsetHeight;ea=ca.offsetWidth;Z=ca.offsetHeight;return document.body.removeChild(ca),{width:ea,height:Z,baseline:K}},fa="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".toLocaleUpperCase(),H={},aa=function(K){return H[K]||(H[K]=Y(fa,K,null).height),H[K]},M=function(K,Z){w||=document.createElement("canvas");var ea=w.getContext("2d");
ea.font=Z;K=ea.measureText(K);return(0,z.h2)()?10*K.width:K.width},Q=function(K,Z,ea){var ca=ea-2*t.gK,pa=[];K=K.split("\n");var za=M(" ",Z);return K.forEach(function(ya){ya=ya.split(" ");if(1===ya.length&&""===ya[0])pa.push(ya[0]);else{for(var Ha="",Ua=0,Ea=0;Ea<ya.length;)if(M(ya[Ea],Z)>=ca){Ha&&pa.push(Ha);Ha="";for(Ua=0;0<ya[Ea].length;){var Oa=ya[Ea][0],Za=D.calculate(Oa,Z);Ua+=Za;ya[Ea]=ya[Ea].slice(1);Ua>=ca?(" "===Ha.slice(-1)&&(Ha=Ha.slice(0,-1)),pa.push(Ha),Ha=Oa,(Ua=Za)===ca&&(Ha="",Ua=
0)):Ha+=Oa}Ua+za>=ca?(pa.push(Ha),Ha="",Ua=0):(Ha+=" ",Ua+=za);Ea++}else{for(;Ua<ca&&Ea<ya.length;){Oa=ya[Ea];if((Ua=M(Ha+Oa,Z))>=ca){pa.push(Ha);Ua=0;Ha="";break}if(Ea++,Ha+="".concat(Oa," "),Ua+za>=ca){pa.push(Ha.slice(0,-1));Ha="";Ua=0;break}}Ua===ca&&(Ha="",Ua=0)}Ha&&(" "===Ha.slice(-1)&&(Ha=Ha.slice(0,-1)),pa.push(Ha))}}),pa.join("\n")},D=(x={},{calculate:function(K,Z){var ea=K.charCodeAt(0);(x[Z]||(x[Z]=[]),x[Z][ea])||(K=M(K,Z),x[Z][ea]=K);return x[Z][ea]},getCache:function(K){return x[K]}}),
O=function(K){var Z=ba(K);return 0===Z?Y(fa.split("").join("\n"),K).width+2*t.gK:Z+2*t.gK},P=function(K){return aa(K)+2*t.gK},ba=function(K){K=D.getCache(K);if(!K)return 0;K=K.filter(function(Z){return void 0!==Z});return Math.max.apply(Math,(0,J.Z)(K))},X=function(K){var Z,ea,ca;return null!=K&&null!==(Z=K.boundElements)&&void 0!==Z&&Z.length&&(null==K||null===(ea=K.boundElements)||void 0===ea||null===(ca=ea.filter(function(pa){return"text"===pa.type})[0])||void 0===ca?void 0:ca.id)||null},F=function(K){if(!K)return null;
var Z,ea=X(K);return ea&&(null===(Z=n.Z.getScene(K))||void 0===Z?void 0:Z.getElement(ea))||null},ha=function(K){return K&&K.containerId&&(null===(Z=n.Z.getScene(K))||void 0===Z?void 0:Z.getElement(K.containerId))||null;var Z}},267:function(k,h,f){f.d(h,{PC:function(){return Y},kK:function(){return ma},ox:function(){return t}});var w=f(2577),x=f(8925),J=f(6552),z=f(5118),u={mouse:8,pen:16,touch:28},t={e:!0,s:!0,n:!0,w:!0},n={e:!0,s:!0,n:!0,w:!0},R={e:!0,s:!0,n:!0,w:!0,nw:!0,se:!0},ka={e:!0,s:!0,n:!0,
w:!0,ne:!0,sw:!0},L=function(fa,H,aa,M,Q,D,O){fa=(0,J.U1)(fa+aa/2,H+M/2,Q,D,O);fa=(0,w.Z)(fa,2);return[fa[0]-aa/2,fa[1]-M/2,aa,M]},ma=function(fa,H,aa,M){var Q=(0,w.Z)(fa,4),D=Q[0],O=Q[1],P=Q[2];Q=Q[3];var ba=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},X=u[M],F=X/aa.value,ha=X/aa.value,K=X/aa.value,Z=X/aa.value,ea=P-D,ca=Q-O,pa=(D+P)/2,za=(O+Q)/2,ya=4/aa.value;X=(X-8)/(2*aa.value);var Ha={nw:ba.nw?void 0:L(D-ya-K+X,O-ya-Z+X,F,ha,pa,za,H),ne:ba.ne?void 0:L(P+ya-X,O-ya-Z+X,F,ha,pa,za,
H),sw:ba.sw?void 0:L(D-ya-K+X,Q+ya-X,F,ha,pa,za,H),se:ba.se?void 0:L(P+ya-X,Q+ya-X,F,ha,pa,za,H),rotation:ba.rotation?void 0:L(D+ea/2-F/2,O-ya-Z+X-16/aa.value,F,ha,pa,za,H)},Ua=5*u.mouse/aa.value;return Math.abs(ea)>Ua&&(ba.n||(Ha.n=L(D+ea/2-F/2,O-ya-Z+X,F,ha,pa,za,H)),ba.s||(Ha.s=L(D+ea/2-F/2,Q+ya-X,F,ha,pa,za,H))),Math.abs(ca)>Ua&&(ba.w||(Ha.w=L(D-ya-K+X,O+ca/2-ha/2,F,ha,pa,za,H)),ba.e||(Ha.e=L(P+ya-X,O+ca/2-ha/2,F,ha,pa,za,H))),Ha},Y=function(fa,H){var aa=2<arguments.length&&void 0!==arguments[2]?
arguments[2]:"mouse";if(fa.locked)return{};var M={};if("arrow"===fa.type||"line"===fa.type||"freedraw"===fa.type){if(2===fa.points.length){var Q=(0,w.Z)(fa.points,2)[1];0===Q[0]||0===Q[1]?M=ka:0<Q[0]&&0>Q[1]?M=R:0<Q[0]&&0<Q[1]?M=ka:0>Q[0]&&0<Q[1]?M=R:0>Q[0]&&0>Q[1]&&(M=ka)}}else(0,z.iB)(fa)&&(M=n);return ma((0,x.qf)(fa),fa.angle,H,aa,M)}},1974:function(k,h,f){f.d(h,{F9:function(){return z},Lx:function(){return R},Mn:function(){return n},Xh:function(){return fa},Xo:function(){return Y},bt:function(){return u},
dt:function(){return t},f0:function(){return ka},iB:function(){return J},mG:function(){return L},pC:function(){return x},r2:function(){return ma},wi:function(){return w}});var w=function(H){return!!H&&"image"===H.type&&!!H.fileId},x=function(H){return!!H&&"image"===H.type},J=function(H){return null!=H&&"text"===H.type},z=function(H){return null!=H&&"freedraw"===H.type},u=function(H){return null!=H&&t(H.type)},t=function(H){return"arrow"===H||"line"===H},n=function(H){var aa=!(1<arguments.length&&
void 0!==arguments[1])||arguments[1];return null!=H&&(!H.locked||!0===aa)&&R(H.type)},R=function(H){return"arrow"===H},ka=function(H){var aa=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];return!(null==H||H.locked&&!0!==aa||"rectangle"!==H.type&&"diamond"!==H.type&&"ellipse"!==H.type&&"image"!==H.type&&("text"!==H.type||H.containerId))},L=function(H){var aa=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];return!(null==H||H.locked&&!0!==aa||"rectangle"!==H.type&&"diamond"!==
H.type&&"ellipse"!==H.type&&"image"!==H.type)},ma=function(H){return"text"===(null==H?void 0:H.type)||"diamond"===(null==H?void 0:H.type)||"rectangle"===(null==H?void 0:H.type)||"ellipse"===(null==H?void 0:H.type)||"arrow"===(null==H?void 0:H.type)||"freedraw"===(null==H?void 0:H.type)||"line"===(null==H?void 0:H.type)},Y=function(H){var aa;return ka(H)&&!(null===(aa=H.boundElements)||void 0===aa||!aa.some(function(M){return"text"===M.type}))},fa=function(H){return null!==H&&J(H)&&null!==H.containerId}},
6797:function(k,h,f){function w(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(fa){return!1}}function x(fa,H,aa){return x=w()?Reflect.construct:function(M,Q,D){var O=[null];O.push.apply(O,Q);M=new (Function.bind.apply(M,O));return D&&(0,L.Z)(M,D.prototype),M},x.apply(null,arguments)}function J(fa){var H="function"==typeof Map?new Map:
void 0;return J=function(aa){function M(){return x(aa,arguments,(0,ka.Z)(this).constructor)}if(null===aa||(Q=aa,-1===Function.toString.call(Q).indexOf("[native code]")))return aa;var Q;if("function"!=typeof aa)throw new TypeError("Super expression must either be null or a function");if(void 0!==H){if(H.has(aa))return H.get(aa);H.set(aa,M)}return M.prototype=Object.create(aa.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),(0,L.Z)(M,aa)},J(fa)}function z(fa){var H=function(){if("undefined"==
typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(aa){return!1}}();return function(){var aa=(0,ka.Z)(fa);if(H){var M=(0,ka.Z)(this).constructor;aa=Reflect.construct(aa,arguments,M)}else aa=aa.apply(this,arguments);return(0,R.Z)(this,aa)}}f.d(h,{_:function(){return Y},l:function(){return ma}});var u=f(5169),t=f(8821),n=f(2248),R=f(7245),ka=f(2312),L=
f(5901),ma=function(fa){function H(){var M,Q=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"Couldn't export canvas.",D=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"CANVAS_ERROR";return(0,t.Z)(this,H),(M=aa.call(this)).name=D,M.message=Q,M}(0,n.Z)(H,fa);var aa=z(H);return(0,u.Z)(H)}(J(Error)),Y=function(fa){function H(){var M=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"Request Aborted";return(0,t.Z)(this,H),aa.call(this,M,"AbortError")}(0,n.Z)(H,fa);var aa=z(H);return(0,u.Z)(H)}(J(DOMException))},
242:function(k,h,f){function w(F,ha){var K="undefined"!=typeof Symbol&&F[Symbol.iterator]||F["@@iterator"];if(!K){if(Array.isArray(F)||(K=function(za,ya){if(za){if("string"==typeof za)return x(za,ya);var Ha=Object.prototype.toString.call(za).slice(8,-1);"Object"===Ha&&za.constructor&&(Ha=za.constructor.name);if("Map"===Ha||"Set"===Ha)return Array.from(za);if("Arguments"===Ha||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ha))return x(za,ya)}}(F))||ha&&F&&"number"==typeof F.length){K&&(F=K);var Z=
0;ha=function(){};return{s:ha,n:function(){return Z>=F.length?{done:!0}:{done:!1,value:F[Z++]}},e:function(za){throw za;},f:ha}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var ea,ca=!0,pa=!1;return{s:function(){K=K.call(F)},n:function(){var za=K.next();return ca=za.done,za},e:function(za){pa=!0;ea=za},f:function(){try{ca||null==K.return||K.return()}finally{if(pa)throw ea;}}}}function x(F,
ha){(null==ha||ha>F.length)&&(ha=F.length);for(var K=0,Z=Array(ha);K<ha;K++)Z[K]=F[K];return Z}function J(F,ha){var K=Object.keys(F);if(Object.getOwnPropertySymbols){var Z=Object.getOwnPropertySymbols(F);ha&&(Z=Z.filter(function(ea){return Object.getOwnPropertyDescriptor(F,ea).enumerable}));K.push.apply(K,Z)}return K}function z(F){for(var ha=1;ha<arguments.length;ha++){var K=null!=arguments[ha]?arguments[ha]:{};ha%2?J(Object(K),!0).forEach(function(Z){(0,n.Z)(F,Z,K[Z])}):Object.getOwnPropertyDescriptors?
Object.defineProperties(F,Object.getOwnPropertyDescriptors(K)):J(Object(K)).forEach(function(Z){Object.defineProperty(F,Z,Object.getOwnPropertyDescriptor(K,Z))})}return F}f.d(h,{AI:function(){return X},F$:function(){return L},Fb:function(){return Q},Nd:function(){return M},Qy:function(){return O},S_:function(){return P},YS:function(){return D},bO:function(){return H},h6:function(){return ba},iE:function(){return aa},iJ:function(){return fa},yO:function(){return Y},zq:function(){return ma}});var u=
f(1930),t=f(2577),n=f(7169),R=f(75),ka=f(5710),L=function(F,ha,K){K=K.filter(function(Z){return Z.groupIds.includes(F)});return 2>K.length?ha.selectedGroupIds[F]||ha.editingGroupId===F?z(z({},ha),{},{selectedGroupIds:z(z({},ha.selectedGroupIds),{},(0,n.Z)({},F,!1)),editingGroupId:null}):ha:z(z({},ha),{},{selectedGroupIds:z(z({},ha.selectedGroupIds),{},(0,n.Z)({},F,!0)),selectedElementIds:z(z({},ha.selectedElementIds),Object.fromEntries(K.map(function(Z){return[Z.id,!0]})))})},ma=function(F,ha){return null!=
Y(F,ha)},Y=function(F,ha){return ha.groupIds.filter(function(K){return K!==F.editingGroupId}).find(function(K){return F.selectedGroupIds[K]})},fa=function(F){return Object.entries(F.selectedGroupIds).filter(function(ha){ha=(0,t.Z)(ha,2);ha[0];return ha[1]}).map(function(ha){ha=(0,t.Z)(ha,2);var K=ha[0];ha[1];return K})},H=function(F,ha){var K=z(z({},F),{},{selectedGroupIds:{}}),Z=(0,R.eD)(ha,F);if(!Z.length)return z(z({},K),{},{editingGroupId:null});var ea;Z=w(Z);try{for(Z.s();!(ea=Z.n()).done;){var ca=
ea.value.groupIds;if(F.editingGroupId){var pa=ca.indexOf(F.editingGroupId);-1<pa&&(ca=ca.slice(0,pa))}0<ca.length&&(K=L(ca[ca.length-1],K,ha))}}catch(za){Z.e(za)}finally{Z.f()}return K},aa=function(F,ha){return z(z({},F),{},{editingGroupId:ha.groupIds.length?ha.groupIds[0]:null,selectedGroupIds:{},selectedElementIds:(0,n.Z)({},ha.id,!0)})},M=function(F,ha){return F.groupIds.includes(ha)},Q=function(F,ha){return F.filter(function(K){return M(K,ha)})},D=function(F,ha){return F.groupIds.find(function(K){return ha[K]})},
O=function(F,ha,K){var Z=(0,u.Z)(F);ha=ha?F.indexOf(ha):-1;F=-1<ha?ha:F.length;for(ha=0;ha<F;ha++)Z[ha]=K(Z[ha]);return Z},P=function(F,ha,K){F=(0,u.Z)(F);K=K?F.indexOf(K):-1;return F.splice(-1<K?K:F.length,0,ha),F},ba=function(F,ha){return F.filter(function(K){return!ha[K]})},X=function(F){var ha=new Map;return F.forEach(function(K){var Z=0===K.groupIds.length?K.id:K.groupIds[K.groupIds.length-1],ea=ha.get(Z)||[],ca=(0,ka.WJ)(K);ca&&ea.push(ca);ha.set(Z,[].concat((0,u.Z)(ea),[K]))}),Array.from(ha.values())}},
8211:function(k,h,f){f.d(h,{Fp:function(){return u},G3:function(){return L},Mj:function(){return t},m0:function(){return ka},t:function(){return Y}});var w=f(8950);k=f(7945);var x=f.n(k),J=f(1463),z=f(4451);k=f(8288);var u={code:"en",label:"English"},t=[{code:"ar-SA",label:"العربية",rtl:!0},{code:"bg-BG",label:"Български"},{code:"ca-ES",label:"Català"},{code:"cs-CZ",label:"Česky"},{code:"de-DE",label:"Deutsch"},{code:"el-GR",label:"Ελληνικά"},{code:"es-ES",label:"Español"},{code:"eu-ES",label:"Euskara"},
{code:"fa-IR",label:"فارسی",rtl:!0},{code:"fi-FI",label:"Suomi"},{code:"fr-FR",label:"Français"},{code:"he-IL",label:"עברית",rtl:!0},{code:"hi-IN",label:"हिन्दी"},{code:"hu-HU",label:"Magyar"},{code:"id-ID",label:"Bahasa Indonesia"},{code:"it-IT",label:"Italiano"},{code:"ja-JP",label:"日本語"},{code:"kab-KAB",label:"Taqbaylit"},{code:"kk-KZ",label:"Қазақ тілі"},{code:"ko-KR",label:"한국어"},{code:"lt-LT",label:"Lietuvių"},{code:"lv-LV",label:"Latviešu"},{code:"my-MM",label:"Burmese"},{code:"nb-NO",label:"Norsk bokmål"},
{code:"nl-NL",label:"Nederlands"},{code:"nn-NO",label:"Norsk nynorsk"},{code:"oc-FR",label:"Occitan"},{code:"pa-IN",label:"ਪੰਜਾਬੀ"},{code:"pl-PL",label:"Polski"},{code:"pt-BR",label:"Português Brasileiro"},{code:"pt-PT",label:"Português"},{code:"ro-RO",label:"Română"},{code:"ru-RU",label:"Русский"},{code:"sk-SK",label:"Slovenčina"},{code:"sv-SE",label:"Svenska"},{code:"tr-TR",label:"Türkçe"},{code:"uk-UA",label:"Українська"},{code:"zh-CN",label:"简体中文"},{code:"zh-TW",label:"繁體中文"}].concat([u]).sort(function(fa,
H){return fa.label>H.label?1:-1}).filter(function(fa){return 85<=z[fa.code]});"production"===k.Vi.DEVELOPMENT&&t.unshift({code:"__test__",label:"test language"},{code:"".concat("__test__",".rtl"),label:"‪test language (rtl)‬",rtl:!0});var n=u,R={},ka=function(){var fa=(0,w.Z)(x().mark(function M(aa){return x().wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:if(n=aa,document.documentElement.dir=n.rtl?"rtl":"ltr",document.documentElement.lang=n.code,!aa.code.startsWith("__test__")){Q.next=7;break}R=
{};Q.next=10;break;case 7:return Q.next=9,f(940)("./".concat(n.code,".json"));case 9:R=Q.sent;case 10:case "end":return Q.stop()}},M)}));return function(aa){return fa.apply(this,arguments)}}(),L=function(){return n},ma=function(fa,H){for(var aa=0;aa<H.length;++aa){var M=H[aa];if(void 0===fa[M])return;fa=fa[M]}if("string"==typeof fa)return fa},Y=function(fa,H){if(n.code.startsWith("__test__"))return fa=H?"".concat(fa,"(").concat(JSON.stringify(H).slice(1,-1),")"):fa,"‪[[".concat(fa,"]]‬");var aa=fa.split(".");
aa=ma(R,aa)||ma(J,aa);if(void 0===aa)throw Error("Can't find translation for ".concat(fa));if(H)for(var M in H)aa=aa.replace("{{".concat(M,"}}"),String(H[M]));return aa}},9487:function(k,h,f){f.d(h,{e_:function(){return x},yE:function(){return w}});k=f(4739);var w=(f(9787),Symbol()),x=(0,k.Vv)()},6066:function(k,h,f){f.d(h,{Dt:function(){return J},E0:function(){return R},ED:function(){return x},Ge:function(){return ka},OA:function(){return n},Um:function(){return w},Wl:function(){return t},aU:function(){return z},
tW:function(){return u}});var w=/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),x=/^Win/.test(window.navigator.platform),J=/\b(android)\b/i.test(navigator.userAgent),z={EQUAL:"Equal",MINUS:"Minus",NUM_ADD:"NumpadAdd",NUM_SUBTRACT:"NumpadSubtract",NUM_ZERO:"Numpad0",BRACKET_RIGHT:"BracketRight",BRACKET_LEFT:"BracketLeft",ONE:"Digit1",TWO:"Digit2",NINE:"Digit9",QUOTE:"Quote",ZERO:"Digit0",SLASH:"Slash",C:"KeyC",D:"KeyD",G:"KeyG",F:"KeyF",H:"KeyH",V:"KeyV",X:"KeyX",Z:"KeyZ",R:"KeyR"},u={ARROW_DOWN:"ArrowDown",
ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",ALT:"Alt",CTRL_OR_CMD:w?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"\x3c",CHEVRON_RIGHT:"\x3e",PERIOD:".",COMMA:",",A:"a",D:"d",E:"e",G:"g",I:"i",L:"l",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",V:"v",X:"x",Y:"y",Z:"z",K:"k"},t=function(L){return L===u.ARROW_LEFT||L===u.ARROW_RIGHT||L===u.ARROW_DOWN||L===u.ARROW_UP},n=function(L){return L.altKey},
R=function(L){return L.shiftKey},ka=function(L){return L.shiftKey}},6552:function(k,h,f){f.d(h,{H5:function(){return t},LW:function(){return u},U1:function(){return x},c9:function(){return R},g6:function(){return n},wC:function(){return ma},xj:function(){return J},yq:function(){return z}});var w=f(8288),x=function(Y,fa,H,aa,M){return[(Y-H)*Math.cos(M)-(fa-aa)*Math.sin(M)+H,(Y-H)*Math.sin(M)+(fa-aa)*Math.cos(M)+aa]},J=function(Y,fa,H){return x(Y[0],Y[1],fa[0],fa[1],H)},z=function(Y,fa,H,aa,M,Q,D,O){var P=
Math.cos(aa);aa=Math.sin(aa);return Y.e&&Y.w?fa+=M+D:Y.e?(fa+=M*(1+P),H+=M*aa,fa+=D*(1-P),H+=D*-aa):Y.w&&(fa+=M*(1-P),H+=M*-aa,fa+=D*(1+P),H+=D*aa),Y.n&&Y.s?H+=Q+O:Y.n?(fa+=Q*aa,H+=Q*(1-P),fa+=O*-aa,H+=O*(1+P)):Y.s&&(fa+=Q*-aa,H+=Q*(1+P),fa+=O*aa,H+=O*(1-P)),[fa,H]},u=function(Y,fa,H,aa){return Math.hypot(H-Y,aa-fa)},t=function(Y,fa){return[(Y[0]+fa[0])/2,(Y[1]+fa[1])/2]},n=function(Y){var fa=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;if(3<=Y.length){var H=[Y[0],Y[Y.length-1]],aa=H[0];
H=H[1];return u(aa[0],aa[1],H[0],H[1])<=w.qx/fa}return!1},R=function(Y,fa,H){var aa=Y.length;if(3>aa)return!1;var M=[Number.MAX_SAFE_INTEGER,H];fa=[fa,H];for(var Q=H=0;Q<aa;Q++){var D=Y[Q],O=Y[(Q+1)%aa],P=D,ba=O,X=fa,F=M,ha=L(P,ba,X),K=L(P,ba,F),Z=L(X,F,P),ea=L(X,F,ba);if(ha!==K&&Z!==ea||0===ha&&ka(P,X,ba)||0===K&&ka(P,F,ba)||0===Z&&ka(X,P,F)||0===ea&&ka(X,ba,F)){if(0===L(D,fa,O))return ka(D,fa,O);H++}}return 1==H%2},ka=function(Y,fa,H){return fa[0]<=Math.max(Y[0],H[0])&&fa[0]>=Math.min(Y[0],H[0])&&
fa[1]<=Math.max(Y[1],H[1])&&fa[1]>=Math.min(Y[1],H[1])},L=function(Y,fa,H){Y=(fa[1]-Y[1])*(H[0]-fa[0])-(fa[0]-Y[0])*(H[1]-fa[1]);return 0===Y?0:0<Y?1:2},ma=function(Y,fa,H){return H?[Math.round(Y/H)*H,Math.round(fa/H)*H]:[Y,fa]}},3024:function(k,h,f){function w(ba,X){var F=Object.keys(ba);if(Object.getOwnPropertySymbols){var ha=Object.getOwnPropertySymbols(ba);X&&(ha=ha.filter(function(K){return Object.getOwnPropertyDescriptor(ba,K).enumerable}));F.push.apply(F,ha)}return F}function x(ba){for(var X=
1;X<arguments.length;X++){var F=null!=arguments[X]?arguments[X]:{};X%2?w(Object(F),!0).forEach(function(ha){(0,z.Z)(ba,ha,F[ha])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ba,Object.getOwnPropertyDescriptors(F)):w(Object(F)).forEach(function(ha){Object.defineProperty(ba,ha,Object.getOwnPropertyDescriptor(F,ha))})}return ba}f.d(h,{$D:function(){return O},Fl:function(){return D},I_:function(){return Y.I_},N7:function(){return aa.N7},NI:function(){return Y.NI},NL:function(){return Q},
ZY:function(){return H.ZY},cT:function(){return H.cT},i1:function(){return P},lV:function(){return H.lV},zh:function(){return M.zh}});var J=f(8950),z=f(7169);k=f(7945);var u=f.n(k),t=f(4162),n=f(8897),R=f(5118),ka=f(679),L=f(8288),ma=f(673),Y=f(5523),fa=f(6665),H=f(434),aa=f(3063),M=f(7053),Q=function(ba){var X=ba.files,F=ba.maxWidthOrHeight,ha=ba.getDimensions;ba=(0,ka.nu)({elements:ba.elements,appState:ba.appState},null,null);var K=ba.appState,Z=K.exportBackground,ea=K.viewBackgroundColor;return(0,t.NL)((0,R.Lm)(ba.elements),
x(x({},K),{},{offsetTop:0,offsetLeft:0,width:0,height:0}),X||{},{exportBackground:Z,viewBackgroundColor:ea},function(ca,pa){var za=document.createElement("canvas");if(F){"function"==typeof ha&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");var ya=F/Math.max(ca,pa);return za.width=ca*ya,za.height=pa*ya,{canvas:za,scale:ya}}ca=(null==ha?void 0:ha(ca,pa))||{width:ca,height:pa};return za.width=ca.width,za.height=ca.height,{canvas:za,scale:null!==(ya=ca.scale)&&void 0!==
ya?ya:1}})},D=function(){var ba=(0,J.Z)(u().mark(function ha(F){var K,Z,ea,ca,pa,za;return u().wrap(function(ya){for(;;)switch(ya.prev=ya.next){case 0:return ea=(Z=F).mimeType,ca=void 0===ea?L.LO.png:ea,pa=Z.quality,ca===L.LO.png&&"number"==typeof pa&&console.warn('"quality" will be ignored for "'.concat(L.LO.png,'" mimeType')),"image/jpg"===ca&&(ca=L.LO.jpg),ca!==L.LO.jpg||null!==(K=F.appState)&&void 0!==K&&K.exportBackground||(console.warn('Defaulting "exportBackground" to "true" for "'.concat(L.LO.jpg,
'" mimeType')),F=x(x({},F),{},{appState:x(x({},F.appState),{},{exportBackground:!0})})),ya.next=6,Q(F);case 6:return za=ya.sent,pa=pa||(/image\/jpe?g/.test(ca)?.92:.8),ya.abrupt("return",new Promise(function(Ha,Ua){za.toBlob(function(){var Ea=(0,J.Z)(u().mark(function Ma(Za){var fb;return u().wrap(function(eb){for(;;)switch(eb.prev=eb.next){case 0:if(Za){eb.next=2;break}return eb.abrupt("return",Ua(Error("couldn't export to blob")));case 2:if(!Za||ca!==L.LO.png||null===(fb=F.appState)||void 0===fb||
!fb.exportEmbedScene){eb.next=6;break}return eb.next=5,(0,ma.encodePngMetadata)({blob:Za,metadata:(0,Y.I_)(F.elements,F.appState,F.files||{},"local")});case 5:Za=eb.sent;case 6:Ha(Za);case 7:case "end":return eb.stop()}},Ma)}));return function(Za){return Ea.apply(this,arguments)}}(),ca,pa)}));case 9:case "end":return ya.stop()}},ha)}));return function(F){return ba.apply(this,arguments)}}(),O=function(){var ba=(0,J.Z)(u().mark(function ha(F){var K,Z,ea,ca,pa,za,ya,Ha,Ua;return u().wrap(function(Ea){for(;;)switch(Ea.prev=
Ea.next){case 0:return K=F.elements,Z=F.appState,ea=void 0===Z?(0,n.im)():Z,ca=F.files,pa=void 0===ca?{}:ca,za=F.exportPadding,ya=(0,ka.nu)({elements:K,appState:ea},null,null),Ha=ya.elements,Ua=ya.appState,Ea.abrupt("return",(0,t.$D)((0,R.Lm)(Ha),x(x({},Ua),{},{exportPadding:za}),pa));case 3:case "end":return Ea.stop()}},ha)}));return function(F){return ba.apply(this,arguments)}}(),P=function(){var ba=(0,J.Z)(u().mark(function ha(F){var K,Z;return u().wrap(function(ea){for(;;)switch(ea.prev=ea.next){case 0:if("svg"!==
F.type){ea.next=8;break}return ea.next=3,O(F);case 3:return K=ea.sent,ea.next=6,(0,fa.dd)(K.outerHTML);case 6:case 11:case 17:ea.next=20;break;case 8:if("png"!==F.type){ea.next=13;break}return ea.next=11,(0,fa.uR)(D(F));case 13:if("json"!==F.type){ea.next=19;break}return Z=x(x({offsetTop:0,offsetLeft:0,width:0,height:0},(0,n.im)()),F.appState),ea.next=17,(0,fa.vQ)(F.elements,Z,F.files);case 19:throw Error("Invalid export type");case 20:case "end":return ea.stop()}},ha)}));return function(F){return ba.apply(this,
arguments)}}()},5001:function(k,h,f){f.d(h,{k:function(){return x},z:function(){return J}});var w=f(1930),x=function(z){var u=z.map(function(t){return t[0]});z=z.map(function(t){return t[1]});return{width:Math.max.apply(Math,(0,w.Z)(u))-Math.min.apply(Math,(0,w.Z)(u)),height:Math.max.apply(Math,(0,w.Z)(z))-Math.min.apply(Math,(0,w.Z)(z))}},J=function(z,u,t){var n=t.map(function(Y){return Y[z]}),R=Math.max.apply(Math,(0,w.Z)(n));n=Math.min.apply(Math,(0,w.Z)(n));R-=n;var ka=0===R?1:u/R,L=1/0;u=t.map(function(Y){return Y.map(function(fa,
H){if(H!==z)return fa;fa*=ka;return L=Math.min(fa,L),fa})});if(2===u.length)return u;var ma=n-L;return u.map(function(Y){return Y.map(function(fa,H){return H===z?fa+ma:fa})})}},6954:function(k,h,f){f.d(h,{LU:function(){return u},kb:function(){return t}});k=f(8152);var w=f(5605),x=f(6340),J=new k.k(Date.now()),z=0,u=function(){return Math.floor(J.next()*Math.pow(2,31))},t=function(){return(0,x.h2)()?"id".concat(z++):(0,w.x0)()}},3063:function(k,h,f){function w(Pa,nb,ob,Zb=Jc=>Jc){return Pa*Zb(.5-nb*
(.5-ob))}function x(Pa,nb){return[Pa[0]+nb[0],Pa[1]+nb[1]]}function J(Pa,nb){return[Pa[0]-nb[0],Pa[1]-nb[1]]}function z(Pa,nb){return[Pa[0]*nb,Pa[1]*nb]}function u(Pa){return[Pa[1],-Pa[0]]}function t(Pa,nb){return Pa[0]===nb[0]&&Pa[1]===nb[1]}function n(Pa,nb){Pa=J(Pa,nb);return Pa[0]*Pa[0]+Pa[1]*Pa[1]}function R(Pa){var nb=Math.hypot(Pa[0],Pa[1]);return[Pa[0]/nb,Pa[1]/nb]}function ka(Pa,nb){return Math.hypot(Pa[1]-nb[1],Pa[0]-nb[0])}function L(Pa,nb,ob){let Zb=Math.sin(ob);ob=Math.cos(ob);let Jc=
Pa[0]-nb[0];Pa=Pa[1]-nb[1];return[Jc*ob-Pa*Zb+nb[0],Jc*Zb+Pa*ob+nb[1]]}function ma(Pa,nb,ob){return x(Pa,z(J(nb,Pa),ob))}function Y(Pa,nb,ob){return x(Pa,z(nb,ob))}function fa(Pa,nb={}){return function(ob,Zb={}){let {size:Jc=16,smoothing:ad=.5,thinning:Nc=.5,simulatePressure:Gb=!0,easing:xc=rd=>rd,start:Wc={},end:hd={},last:Nd=!1}=Zb,{cap:Ld=!0,taper:pc=0,easing:Ed=rd=>rd*(2-rd)}=Wc,{cap:xd=!0,taper:Yd=0,easing:ud=rd=>--rd*rd*rd+1}=hd;if(0===ob.length||0>=Jc)return[];var Qd,ld=ob[ob.length-1].runningLength,
Sd=Math.pow(Jc*ad,2);Zb=[];let Nb=[];var gc=ob.slice(0,10).reduce((rd,vc)=>{var Mc=vc.pressure;Gb&&(vc=ca(1,vc.distance/Jc),Mc=ca(1,1-vc),Mc=ca(1,rd+.275*vc*(Mc-rd)));return(rd+Mc)/2},ob[0].pressure),Yb=w(Jc,Nc,ob[ob.length-1].pressure,xc);let qb=ob[0].vector;var mb=ob[0].point;let cc=mb;var uc=mb;let Uc=cc;for(var cd=0;cd<ob.length;cd++){var {pressure:Od}=ob[cd];let {point:rd,vector:vc,distance:Mc,runningLength:Me}=ob[cd];if(!(cd<ob.length-1&&3>ld-Me)){Nc?(Gb&&(Yb=ca(1,Mc/Jc),Od=ca(1,1-Yb),Od=ca(1,
gc+.275*Yb*(Od-gc))),Yb=w(Jc,Nc,Od,xc)):Yb=Jc/2;void 0===Qd&&(Qd=Yb);var be=Me<pc?Ed(Me/pc):1,oe=ld-Me<Yd?ud((ld-Me)/Yd):1;if(Yb=Math.max(.01,Yb*Math.min(be,oe)),cd===ob.length-1)Od=z(u(vc),Yb),Zb.push(J(rd,Od)),Nb.push(x(rd,Od));else if(be=ob[cd+1].vector,oe=vc[0]*be[0]+vc[1]*be[1],0>oe){mb=z(u(qb),Yb);for(let qc=1/13,Le=0;1>=Le;Le+=qc)uc=L(J(rd,mb),rd,za*Le),Zb.push(uc),Uc=L(x(rd,mb),rd,za*-Le),Nb.push(Uc);mb=uc;cc=Uc}else gc=z(u(ma(be,vc,oe)),Yb),uc=J(rd,gc),(1>=cd||n(mb,uc)>Sd)&&(Zb.push(uc),
mb=uc),Uc=x(rd,gc),(1>=cd||n(cc,Uc)>Sd)&&(Nb.push(Uc),cc=Uc),gc=Od,qb=vc}}ld=ob[0].point.slice(0,2);Sd=1<ob.length?ob[ob.length-1].point.slice(0,2):x(ob[0].point,[1,1]);uc=[];cd=[];if(1===ob.length){if(!pc&&!Yd||Nd){ob=Y(ld,R(u(J(ld,Sd))),-(Qd||Yb));Zb=[];for(let rd=1/13,vc=rd;1>=vc;vc+=rd)Zb.push(L(ob,ld,2*za*vc));return Zb}}else{if(!(pc||Yd&&1===ob.length))if(Ld)for(let rd=1/13,vc=rd;1>=vc;vc+=rd)Qd=L(Nb[0],ld,za*vc),uc.push(Qd);else gc=J(Zb[0],Nb[0]),Qd=z(gc,.5),gc=z(gc,.51),uc.push(J(ld,Qd),J(ld,
gc),x(ld,gc),x(ld,Qd));Qd=u(function(rd){return[-rd[0],-rd[1]]}(ob[ob.length-1].vector));if(Yd||pc&&1===ob.length)cd.push(Sd);else if(xd){ob=Y(Sd,Qd,Yb);for(let rd=1/29,vc=rd;1>vc;vc+=rd)cd.push(L(ob,Sd,3*za*vc))}else cd.push(x(Sd,z(Qd,Yb)),x(Sd,z(Qd,.99*Yb)),J(Sd,z(Qd,.99*Yb)),J(Sd,z(Qd,Yb)))}return Zb.concat(cd,Nb.reverse(),uc)}(function(ob,Zb={}){var Jc;let {streamline:ad=.5,size:Nc=16,last:Gb=!1}=Zb;if(0===ob.length)return[];Zb=.15+.85*(1-ad);ob=Array.isArray(ob[0])?ob:ob.map(({x:pc,y:Ed,pressure:xd=
.5})=>[pc,Ed,xd]);if(2===ob.length){var xc=ob[1];ob=ob.slice(0,-1);for(var Wc=1;5>Wc;Wc++)ob.push(ma(ob[0],xc,Wc/4))}1===ob.length&&(ob=[...ob,[...x(ob[0],[1,1]),...ob[0].slice(2)]]);xc=[{point:[ob[0][0],ob[0][1]],pressure:0<=ob[0][2]?ob[0][2]:.25,vector:[1,1],distance:0,runningLength:0}];Wc=!1;let hd=0,Nd=xc[0],Ld=ob.length-1;for(let pc=1;pc<ob.length;pc++){let Ed=Gb&&pc===Ld?ob[pc].slice(0,2):ma(Nd.point,ob[pc],Zb);if(t(Nd.point,Ed))continue;let xd=ka(Ed,Nd.point);if(hd+=xd,pc<Ld&&!Wc){if(hd<Nc)continue;
Wc=!0}Nd={point:Ed,pressure:0<=ob[pc][2]?ob[pc][2]:.5,vector:R(J(Nd.point,Ed)),distance:xd,runningLength:hd};xc.push(Nd)}return xc[0].vector=(null==(Jc=xc[1])?void 0:Jc.vector)||[0,0],xc}(Pa,nb),nb)}function H(Pa,nb){var ob=Object.keys(Pa);if(Object.getOwnPropertySymbols){var Zb=Object.getOwnPropertySymbols(Pa);nb&&(Zb=Zb.filter(function(Jc){return Object.getOwnPropertyDescriptor(Pa,Jc).enumerable}));ob.push.apply(ob,Zb)}return ob}function aa(Pa){for(var nb=1;nb<arguments.length;nb++){var ob=null!=
arguments[nb]?arguments[nb]:{};nb%2?H(Object(ob),!0).forEach(function(Zb){(0,P.Z)(Pa,Zb,ob[Zb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Pa,Object.getOwnPropertyDescriptors(ob)):H(Object(ob)).forEach(function(Zb){Object.defineProperty(Pa,Zb,Object.getOwnPropertyDescriptor(ob,Zb))})}return Pa}function M(Pa){var nb=Q(Pa);nb=new Path2D(nb);return Wb.set(Pa,nb),nb}function Q(Pa){return function(nb){if(!nb.length)return"";var ob=nb.length-1;return nb.reduce(function(Zb,Jc,ad,Nc){return ad===
ob?Zb.push(Jc,D(Jc,Nc[0]),"L",Nc[0],"Z"):Zb.push(Jc,D(Jc,Nc[ad+1])),Zb},["M",nb[0],"Q"]).join(" ").replace(ic,"$1")}(fa(Pa.simulatePressure?Pa.points:Pa.points.length?Pa.points.map(function(nb,ob){nb=(0,ba.Z)(nb,2);return[nb[0],nb[1],Pa.pressures[ob]]}):[[0,0,.5]],{simulatePressure:Pa.simulatePressure,size:4.25*Pa.strokeWidth,thinning:.6,smoothing:.5,streamline:.5,easing:function(nb){return Math.sin(nb*Math.PI/2)},last:!!Pa.lastCommittedPoint}))}function D(Pa,nb){return[(Pa[0]+nb[0])/2,(Pa[1]+nb[1])/
2]}f.d(h,{Dn:function(){return Oa},i:function(){return ra},N7:function(){return Q},R2:function(){return oa},bI:function(){return Ca},lw:function(){return Bb},Rg:function(){return Ob}});var O=f(1930),P=f(7169),ba=f(2577),X=f(1974),F=f(8925),ha=f(6340),K=f(6552),Z=f(8234);k=f(8897);var ea=f(8288),{min:ca,PI:pa}=Math,za=pa+1E-4,ya=f(5710),Ha=(0,k.im)(),Ua=function(Pa,nb){return(0,X.wi)(Pa)&&!nb.imageCache.has(Pa.fileId)},Ea=function(Pa,nb){var ob;return"dark"===nb.theme&&(0,X.wi)(Pa)&&!Ua(Pa,nb)&&(null===
(ob=nb.imageCache.get(Pa.fileId))||void 0===ob?void 0:ob.mimeType)!==ea.LO.svg},Oa=14,Za=document.createElement("img");Za.src="data:".concat(ea.LO.svg,",").concat(encodeURIComponent('\x3csvg aria-hidden\x3d"true" focusable\x3d"false" data-prefix\x3d"fas" data-icon\x3d"image" class\x3d"svg-inline--fa fa-image fa-w-16" role\x3d"img" xmlns\x3d"http://www.w3.org/2000/svg" viewBox\x3d"0 0 512 512"\x3e\x3cpath fill\x3d"#888" d\x3d"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"\x3e\x3c/path\x3e\x3c/svg\x3e'));
var Ma=document.createElement("img");Ma.src="data:".concat(ea.LO.svg,",").concat(encodeURIComponent('\x3csvg viewBox\x3d"0 0 668 668" xmlns\x3d"http://www.w3.org/2000/svg" xml:space\x3d"preserve" style\x3d"fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"\x3e\x3cpath d\x3d"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48ZM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56ZM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48Z" style\x3d"fill:#888;fill-rule:nonzero" transform\x3d"matrix(.81709 0 0 .81709 124.825 145.825)"/\x3e\x3cpath d\x3d"M256 8C119.034 8 8 119.033 8 256c0 136.967 111.034 248 248 248s248-111.034 248-248S392.967 8 256 8Zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676ZM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676Z" style\x3d"fill:#888;fill-rule:nonzero" transform\x3d"matrix(.30366 0 0 .30366 506.822 60.065)"/\x3e\x3c/svg\x3e'));
var fb=function(Pa,nb,ob,Zb){switch(ob.globalAlpha=Pa.opacity/100,Pa.type){case "rectangle":case "diamond":case "ellipse":ob.lineJoin="round";ob.lineCap="round";nb.draw(oa(Pa));break;case "arrow":case "line":ob.lineJoin="round";ob.lineCap="round";oa(Pa).forEach(function(xc){nb.draw(xc)});break;case "freedraw":ob.save();ob.fillStyle=Pa.strokeColor;Zb=Wb.get(Pa);var Jc=oa(Pa);Jc&&nb.draw(Jc);ob.fillStyle=Pa.strokeColor;ob.fill(Zb);ob.restore();break;case "image":var ad=(0,X.wi)(Pa)?null===(Jc=Zb.imageCache.get(Pa.fileId))||
void 0===Jc?void 0:Jc.image:void 0;null==ad||ad instanceof Promise?function(xc,Wc,hd){Wc.fillStyle="#E7E7E7";Wc.fillRect(0,0,xc.width,xc.height);hd=Math.min(xc.width,xc.height);hd=Math.min(hd,Math.min(.4*hd,100));Wc.drawImage("error"===xc.status?Ma:Za,xc.width/2-hd/2,xc.height/2-hd/2,hd,hd)}(Pa,ob,Zb.zoom.value):ob.drawImage(ad,0,0,Pa.width,Pa.height);break;default:if(!(0,X.iB)(Pa))throw Error("Unimplemented type ".concat(Pa.type));(Zb=(Jc=(0,ha.dZ)(Pa.text))&&!ob.canvas.isConnected)&&document.body.appendChild(ob.canvas);
ob.canvas.setAttribute("dir",Jc?"rtl":"ltr");ob.save();ob.font=(0,ha.mO)(Pa);ob.fillStyle=Pa.strokeColor;ob.textAlign=Pa.textAlign;Jc=Pa.text.replace(/\r\n?/g,"\n").split("\n");ad=Pa.containerId?(0,ya.hP)((0,ha.mO)(Pa)):Pa.height/Jc.length;var Nc=Pa.height-Pa.baseline;Pa.verticalAlign===ea.oX.BOTTOM&&(Nc=ea.gK);Pa="center"===Pa.textAlign?Pa.width/2:"right"===Pa.textAlign?Pa.width:0;for(var Gb=0;Gb<Jc.length;Gb++)ob.fillText(Jc[Gb],Pa,(Gb+1)*ad-Nc);ob.restore();Zb&&ob.canvas.remove()}ob.globalAlpha=
1},eb=new WeakMap,Na=new WeakMap,oa=function(Pa){return Na.get(Pa)},Ca=function(Pa){return Na.delete(Pa)},ra=function(Pa){var nb={seed:Pa.seed,strokeLineDash:"dashed"===Pa.strokeStyle?[8,8+Pa.strokeWidth]:"dotted"===Pa.strokeStyle?[1.5,6+Pa.strokeWidth]:void 0,disableMultiStroke:"solid"!==Pa.strokeStyle,strokeWidth:"solid"!==Pa.strokeStyle?Pa.strokeWidth+.5:Pa.strokeWidth,fillWeight:Pa.strokeWidth/2,hachureGap:4*Pa.strokeWidth,roughness:Pa.roughness,stroke:Pa.strokeColor,preserveVertices:1<arguments.length&&
void 0!==arguments[1]&&arguments[1]};switch(Pa.type){case "rectangle":case "diamond":case "ellipse":return nb.fillStyle=Pa.fillStyle,nb.fill="transparent"===Pa.backgroundColor?void 0:Pa.backgroundColor,"ellipse"===Pa.type&&(nb.curveFitting=1),nb;case "line":case "freedraw":return(0,K.g6)(Pa.points)&&(nb.fillStyle=Pa.fillStyle,nb.fill="transparent"===Pa.backgroundColor?void 0:Pa.backgroundColor),nb;case "arrow":return nb;default:throw Error("Unimplemented type ".concat(Pa.type));}},Aa=function(Pa,
nb){var ob=Na.get(Pa);if(void 0===ob)switch(eb.delete(Pa),Pa.type){case "rectangle":if("round"===Pa.strokeSharpness){var Zb=Pa.width;ob=Pa.height;var Jc=.25*Math.min(Zb,ob);ob=nb.path("M ".concat(Jc," 0 L ").concat(Zb-Jc," 0 Q ").concat(Zb," 0, ").concat(Zb," ").concat(Jc," L ").concat(Zb," ").concat(ob-Jc," Q ").concat(Zb," ").concat(ob,", ").concat(Zb-Jc," ").concat(ob," L ").concat(Jc," ").concat(ob," Q 0 ").concat(ob,", 0 ").concat(ob-Jc," L 0 ").concat(Jc," Q 0 0, ").concat(Jc," 0"),ra(Pa,!0))}else ob=
nb.rectangle(0,0,Pa.width,Pa.height,ra(Pa));Na.set(Pa,ob);break;case "diamond":Zb=(0,F.UC)(Pa);var ad=(0,ba.Z)(Zb,8);Zb=ad[0];ob=ad[1];Jc=ad[2];var Nc=ad[3],Gb=ad[4],xc=ad[5],Wc=ad[6];ad=ad[7];ob="round"===Pa.strokeSharpness?nb.path("M ".concat(Zb+.25*(Jc-Zb)," ").concat(ob+.25*(Nc-ob)," L ").concat(Jc-.25*(Jc-Zb)," ").concat(Nc-.25*(Nc-ob),"\n            C ").concat(Jc," ").concat(Nc,", ").concat(Jc," ").concat(Nc,", ").concat(Jc-.25*(Jc-Gb)," ").concat(Nc+.25*(xc-Nc),"\n            L ").concat(Gb+
.25*(Jc-Gb)," ").concat(xc-.25*(xc-Nc),"\n            C ").concat(Gb," ").concat(xc,", ").concat(Gb," ").concat(xc,", ").concat(Gb-.25*(Gb-Wc)," ").concat(xc-.25*(xc-ad),"\n            L ").concat(Wc+.25*(Gb-Wc)," ").concat(ad+.25*(xc-ad),"\n            C ").concat(Wc," ").concat(ad,", ").concat(Wc," ").concat(ad,", ").concat(Wc+.25*(Zb-Wc)," ").concat(ad-.25*(ad-ob),"\n            L ").concat(Zb-.25*(Zb-Wc)," ").concat(ob+.25*(ad-ob),"\n            C ").concat(Zb," ").concat(ob,", ").concat(Zb," ").concat(ob,
", ").concat(Zb+.25*(Jc-Zb)," ").concat(ob+.25*(Nc-ob)),ra(Pa,!0)):nb.polygon([[Zb,ob],[Jc,Nc],[Gb,xc],[Wc,ad]],ra(Pa));Na.set(Pa,ob);break;case "ellipse":ob=nb.ellipse(Pa.width/2,Pa.height/2,Pa.width,Pa.height,ra(Pa));Na.set(Pa,ob);break;case "line":case "arrow":var hd=ra(Pa);ob=Pa.points.length?Pa.points:[[0,0]];if(ob="sharp"===Pa.strokeSharpness?hd.fill?[nb.polygon(ob,hd)]:[nb.linearPath(ob,hd)]:[nb.curve(ob,hd)],"arrow"===Pa.type)Nc=Pa.startArrowhead,Nc=void 0===Nc?null:Nc,Gb=Pa.endArrowhead,
Gb=void 0===Gb?"arrow":Gb,xc=function(Nd,Ld,pc,Ed){Ld=(0,F.Y5)(Nd,Ld,pc,Ed);if(null===Ld)return[];if("dot"===Ed)return Ed=(0,ba.Z)(Ld,3),[nb.circle(Ed[0],Ed[1],Ed[2],aa(aa({},hd),{},{fill:Nd.strokeColor,fillStyle:"solid",stroke:"none"}))];if("triangle"===Ed){var xd=(0,ba.Z)(Ld,6);Ed=xd[0];Ld=xd[1];pc=xd[2];var Yd=xd[3],ud=xd[4];xd=xd[5];return delete hd.strokeLineDash,[nb.polygon([[Ed,Ld],[pc,Yd],[ud,xd],[Ed,Ld]],aa(aa({},hd),{},{fill:Nd.strokeColor,fillStyle:"solid"}))]}xd=(0,ba.Z)(Ld,6);Ed=xd[0];
Ld=xd[1];pc=xd[2];Yd=xd[3];ud=xd[4];xd=xd[5];"dotted"===Nd.strokeStyle?(Nd=[1.5,6+(Nd.strokeWidth-1)],hd.strokeLineDash=[Nd[0],Nd[1]-1]):delete hd.strokeLineDash;return[nb.line(pc,Yd,Ed,Ld,hd),nb.line(ud,xd,Ed,Ld,hd)]},null!==Nc&&(Nc=xc(Pa,ob,"start",Nc),(Jc=ob).push.apply(Jc,(0,O.Z)(Nc))),null!==Gb&&(Jc=xc(Pa,ob,"end",Gb),(Zb=ob).push.apply(Zb,(0,O.Z)(Jc)));Na.set(Pa,ob);break;case "freedraw":M(Pa);ob=(0,K.g6)(Pa.points)?nb.polygon(Pa.points,aa(aa({},ra(Pa)),{},{stroke:"none"})):null;Na.set(Pa,ob);
break;case "text":case "image":Na.set(Pa,null)}},Ja=function(Pa,nb){var ob=nb?nb.zoom:Ha.zoom,Zb=eb.get(Pa),Jc=Zb&&Zb.canvasZoom!==ob.value&&!(null!=nb&&nb.shouldCacheIgnoreZoom);if(!Zb||Jc||Zb.theme!==nb.theme){Zb=document.createElement("canvas");Jc=Zb.getContext("2d");var ad="freedraw"===Pa.type?12*Pa.strokeWidth:20,Nc=0,Gb=0;if((0,X.bt)(Pa)||(0,X.F9)(Pa)){Gb=(0,F.qf)(Pa);Nc=(0,ba.Z)(Gb,4);var xc=Nc[0];Gb=Nc[1];var Wc=Nc[3];Zb.width=(0,ha.TE)(xc,Nc[2])*window.devicePixelRatio*ob.value+ad*ob.value*
2;Zb.height=(0,ha.TE)(Gb,Wc)*window.devicePixelRatio*ob.value+ad*ob.value*2;Nc=Pa.x>xc?(0,ha.TE)(Pa.x,xc)*window.devicePixelRatio*ob.value:0;Gb=Pa.y>Gb?(0,ha.TE)(Pa.y,Gb)*window.devicePixelRatio*ob.value:0;Jc.translate(Nc,Gb)}else Zb.width=Pa.width*window.devicePixelRatio*ob.value+ad*ob.value*2,Zb.height=Pa.height*window.devicePixelRatio*ob.value+ad*ob.value*2;Jc.save();Jc.translate(ad*ob.value,ad*ob.value);Jc.scale(window.devicePixelRatio*ob.value,window.devicePixelRatio*ob.value);ad=Z.Z.canvas(Zb);
nb=(Ea(Pa,nb)&&(Jc.filter="invert(100%) hue-rotate(180deg) saturate(1.25)"),fb(Pa,ad,Jc,nb),Jc.restore(),{element:Pa,canvas:Zb,theme:nb.theme,canvasZoom:ob.value,canvasOffsetX:Nc,canvasOffsetY:Gb});return eb.set(Pa,nb),nb}return Zb},Sa=function(Pa,nb,ob,Zb){nb=Pa.element;var Jc="freedraw"===nb.type?12*nb.strokeWidth:20,ad=(0,F.qf)(nb),Nc=(0,ba.Z)(ad,4);ad=Nc[0];var Gb=Nc[1],xc=Nc[2];Nc=Nc[3];(0,X.F9)(nb)&&(ad=Math.floor(ad),xc=Math.ceil(xc),Gb=Math.floor(Gb),Nc=Math.ceil(Nc));var Wc=((ad+xc)/2+Zb.scrollX)*
window.devicePixelRatio,hd=((Gb+Nc)/2+Zb.scrollY)*window.devicePixelRatio,Nd=Ua(nb,Zb);Zb="scale"in Pa.element&&!Nd?Pa.element.scale[0]:1;Nd="scale"in Pa.element&&!Nd?Pa.element.scale[1]:1;ob.save();ob.scale(1/window.devicePixelRatio*Zb,1/window.devicePixelRatio*Nd);ob.translate(Wc*Zb,hd*Nd);ob.rotate(nb.angle*Zb*Nd);ob.drawImage(Pa.canvas,-(xc-ad)/2*window.devicePixelRatio-Jc*Pa.canvasZoom/Pa.canvasZoom,-(Nc-Gb)/2*window.devicePixelRatio-Jc*Pa.canvasZoom/Pa.canvasZoom,Pa.canvas.width/Pa.canvasZoom,
Pa.canvas.height/Pa.canvasZoom);ob.restore()},Bb=function(Pa,nb,ob,Zb){var Jc=nb.generator;switch(Pa.type){case "selection":ob.save();ob.translate(Pa.x+Zb.scrollX,Pa.y+Zb.scrollY);ob.fillStyle="rgba(0, 0, 255, 0.10)";ob.fillRect(0,0,Pa.width,Pa.height);ob.restore();break;case "freedraw":if(Aa(Pa,Jc),Zb.isExporting)Pa=Ja(Pa,Zb),Sa(Pa,0,ob,Zb);else{Jc=(0,F.qf)(Pa);var ad=(0,ba.Z)(Jc,4),Nc=ad[0];Jc=ad[1];var Gb=ad[2],xc=ad[3];ad=(Nc+Gb)/2+Zb.scrollX;var Wc=(Jc+xc)/2+Zb.scrollY;Nc=(Gb-Nc)/2-(Pa.x-Nc);
Jc=(xc-Jc)/2-(Pa.y-Jc);ob.save();ob.translate(ad,Wc);ob.rotate(Pa.angle);ob.translate(-Nc,-Jc);fb(Pa,nb,ob,Zb);ob.restore()}break;case "rectangle":case "diamond":case "ellipse":case "line":case "arrow":case "image":case "text":(Aa(Pa,Jc),Zb.isExporting)?(Jc=(0,F.qf)(Pa),ad=(0,ba.Z)(Jc,4),Nc=ad[0],Jc=ad[1],Gb=ad[2],xc=ad[3],ad=(Nc+Gb)/2+Zb.scrollX,Wc=(Jc+xc)/2+Zb.scrollY,Nc=(Gb-Nc)/2-(Pa.x-Nc),Jc=(xc-Jc)/2-(Pa.y-Jc),ob.save(),ob.translate(ad,Wc),ob.rotate(Pa.angle),ob.translate(-Nc,-Jc),Ea(Pa,Zb)&&
(ob.filter="none"),fb(Pa,nb,ob,Zb),ob.restore()):(Pa=Ja(Pa,Zb),Sa(Pa,0,ob,Zb));break;default:throw Error("Unimplemented type ".concat(Pa.type));}},ib=function(Pa,nb,ob){if(void 0===ob)return Pa.draw(nb);nb={sets:nb.sets,shape:nb.shape,options:aa(aa({},nb.options),{},{fixedDecimalPlaceDigits:ob})};return Pa.draw(nb)},Ob=function(Pa,nb,ob,Zb,Jc,ad,Nc){var Gb=(0,F.qf)(Pa);Gb=(0,ba.Z)(Gb,4);var xc=Gb[0],Wc=Gb[1],hd=(Gb[2]-xc)/2-(Pa.x-xc),Nd=(Gb[3]-Wc)/2-(Pa.y-Wc),Ld=180*Pa.angle/Math.PI;xc=nb.generator;
Gb=ob;Pa.link&&(Wc=ob.ownerDocument.createElementNS(ea.hR,"a"),Wc.setAttribute("href",Pa.link),Gb.appendChild(Wc),Gb=Wc);switch(Pa.type){case "selection":throw Error("Selection rendering is not supported for SVG");case "rectangle":case "diamond":case "ellipse":Aa(Pa,xc);ob=ib(nb,oa(Pa),ea.zK);Nc=Pa.opacity/100;1!==Nc&&(ob.setAttribute("stroke-opacity","".concat(Nc)),ob.setAttribute("fill-opacity","".concat(Nc)));ob.setAttribute("stroke-linecap","round");ob.setAttribute("transform","translate(".concat(Jc||
0," ").concat(ad||0,") rotate(").concat(Ld," ").concat(hd," ").concat(Nd,")"));Gb.appendChild(ob);break;case "line":case "arrow":Aa(Pa,xc);var pc=ob.ownerDocument.createElementNS(ea.hR,"g"),Ed=Pa.opacity/100;pc.setAttribute("stroke-linecap","round");oa(Pa).forEach(function(Sd){Sd=ib(nb,Sd,ea.zK);1!==Ed&&(Sd.setAttribute("stroke-opacity","".concat(Ed)),Sd.setAttribute("fill-opacity","".concat(Ed)));Sd.setAttribute("transform","translate(".concat(Jc||0," ").concat(ad||0,") rotate(").concat(Ld," ").concat(hd,
" ").concat(Nd,")"));"line"===Pa.type&&(0,K.g6)(Pa.points)&&"transparent"!==Pa.backgroundColor&&Sd.setAttribute("fill-rule","evenodd");pc.appendChild(Sd)});Gb.appendChild(pc);break;case "freedraw":Aa(Pa,xc);M(Pa);Nc=Pa.opacity/100;Zb=(Zb=oa(Pa))?ib(nb,Zb,ea.zK):ob.ownerDocument.createElementNS(ea.hR,"g");1!==Nc&&(Zb.setAttribute("stroke-opacity","".concat(Nc)),Zb.setAttribute("fill-opacity","".concat(Nc)));Zb.setAttribute("transform","translate(".concat(Jc||0," ").concat(ad||0,") rotate(").concat(Ld,
" ").concat(hd," ").concat(Nd,")"));Zb.setAttribute("stroke","none");ob=ob.ownerDocument.createElementNS(ea.hR,"path");ob.setAttribute("fill",Pa.strokeColor);ob.setAttribute("d",Q(Pa));Zb.appendChild(ob);Gb.appendChild(Zb);break;case "image":if(Zb=(0,X.wi)(Pa)&&Zb[Pa.fileId]){xc="image-".concat(Zb.id);Wc=ob.querySelector("#".concat(xc));if(!Wc){(Wc=ob.ownerDocument.createElementNS(ea.hR,"symbol")).id=xc;var xd=ob.ownerDocument.createElementNS(ea.hR,"image");xd.setAttribute("width","100%");xd.setAttribute("height",
"100%");xd.setAttribute("href",Zb.dataURL);Wc.appendChild(xd);Gb.prepend(Wc)}ob=ob.ownerDocument.createElementNS(ea.hR,"use");ob.setAttribute("href","#".concat(xc));Nc&&Zb.mimeType!==ea.LO.svg&&ob.setAttribute("filter","invert(100%) hue-rotate(180deg) saturate(1.25)");ob.setAttribute("width","".concat(Math.round(Pa.width)));ob.setAttribute("height","".concat(Math.round(Pa.height)));ob.setAttribute("transform","translate(".concat(Jc||0," ").concat(ad||0,") rotate(").concat(Ld," ").concat(hd," ").concat(Nd,
")"));Gb.appendChild(ob)}break;default:if(!(0,X.iB)(Pa))throw Error("Unimplemented type ".concat(Pa.type));Zb=Pa.opacity/100;Nc=ob.ownerDocument.createElementNS(ea.hR,"g");1!==Zb&&(Nc.setAttribute("stroke-opacity","".concat(Zb)),Nc.setAttribute("fill-opacity","".concat(Zb)));Nc.setAttribute("transform","translate(".concat(Jc||0," ").concat(ad||0,") rotate(").concat(Ld," ").concat(hd," ").concat(Nd,")"));Zb=Pa.text.replace(/\r\n?/g,"\n").split("\n");xc=Pa.height/Zb.length;Wc=Pa.height-Pa.baseline;
xd="center"===Pa.textAlign?Pa.width/2:"right"===Pa.textAlign?Pa.width:0;for(var Yd=(0,ha.dZ)(Pa.text)?"rtl":"ltr",ud="center"===Pa.textAlign?"middle":"right"===Pa.textAlign||"rtl"===Yd?"end":"start",Qd=0;Qd<Zb.length;Qd++){var ld=ob.ownerDocument.createElementNS(ea.hR,"text");ld.textContent=Zb[Qd];ld.setAttribute("x","".concat(xd));ld.setAttribute("y","".concat((Qd+1)*xc-Wc));ld.setAttribute("font-family",(0,ha.$g)(Pa));ld.setAttribute("font-size","".concat(Pa.fontSize,"px"));ld.setAttribute("fill",
Pa.strokeColor);ld.setAttribute("text-anchor",ud);ld.setAttribute("style","white-space: pre;");ld.setAttribute("direction",Yd);Nc.appendChild(ld)}Gb.appendChild(Nc)}},Wb=new WeakMap([]),ic=/(\s?[A-Z]?,?-?[0-9]*\.[0-9]{0,2})(([0-9]|e|-)*)/g},3547:function(k,h,f){function w(pa,za){var ya="undefined"!=typeof Symbol&&pa[Symbol.iterator]||pa["@@iterator"];if(!ya){if(Array.isArray(pa)||(ya=function(Za,Ma){if(Za){if("string"==typeof Za)return x(Za,Ma);var fb=Object.prototype.toString.call(Za).slice(8,-1);
"Object"===fb&&Za.constructor&&(fb=Za.constructor.name);if("Map"===fb||"Set"===fb)return Array.from(Za);if("Arguments"===fb||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(fb))return x(Za,Ma)}}(pa))||za&&pa&&"number"==typeof pa.length){ya&&(pa=ya);var Ha=0;za=function(){};return{s:za,n:function(){return Ha>=pa.length?{done:!0}:{done:!1,value:pa[Ha++]}},e:function(Za){throw Za;},f:za}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}var Ua,Ea=!0,Oa=!1;return{s:function(){ya=ya.call(pa)},n:function(){var Za=ya.next();return Ea=Za.done,Za},e:function(Za){Oa=!0;Ua=Za},f:function(){try{Ea||null==ya.return||ya.return()}finally{if(Oa)throw Ua;}}}}function x(pa,za){(null==za||za>pa.length)&&(za=pa.length);for(var ya=0,Ha=Array(za);ya<za;ya++)Ha[ya]=pa[ya];return Ha}f.d(h,{Eu:function(){return F},OO:function(){return ha},M_:function(){return ca}});var J,z=f(2577),u=f(1930),t=f(5284),n=f(5118),R=f(756),ka=f(1868),L=f(3063),ma=f(8982),
Y=f(6938),fa=f(242),H=f(2325),aa=f(8290),M=f(6340);!function(pa){pa.ACTIVE="active";pa.AWAY="away";pa.IDLE="idle"}(J||={});var Q=f(8288),D=f(2383),O,P=(0,M.Q5)(),ba=function(pa,za,ya,Ha,Ua,Ea,Oa,Za){var Ma=8<arguments.length&&void 0!==arguments[8]&&arguments[8];pa.save();pa.translate(Ea,Oa);pa.rotate(Za);Ma&&pa.fillRect(za-Ea,ya-Oa,Ha,Ua);pa.strokeRect(za-Ea,ya-Oa,Ha,Ua);pa.restore()},X=function(pa,za,ya,Ha){pa.beginPath();pa.arc(za,ya,Ha,0,2*Math.PI);pa.fill();pa.stroke()},F=function(pa,za,ya,Ha,
Ua,Ea,Oa){if(null===Ea)return{atLeastOneVisibleElement:!1};var Za=Oa.renderScrollbars;Za=void 0===Za||Za;var Ma=Oa.renderSelection;Ma=void 0===Ma||Ma;var fb=Oa.renderGrid;fb=void 0===fb||fb;var eb=Oa.isExporting,Na=Ea.getContext("2d");Na.setTransform(1,0,0,1,0,0);Na.save();Na.scale(Ha,Ha);var oa=Ea.width/Ha,Ca=Ea.height/Ha;(eb&&"dark"===Oa.theme&&(Na.filter=Q.ZF),"string"==typeof Oa.viewBackgroundColor)?(("transparent"===Oa.viewBackgroundColor||5===Oa.viewBackgroundColor.length||9===Oa.viewBackgroundColor.length||
/(hsla|rgba)\(/.test(Oa.viewBackgroundColor))&&Na.clearRect(0,0,oa,Ca),Na.save(),Na.fillStyle=Oa.viewBackgroundColor,Na.fillRect(0,0,oa,Ca),Na.restore()):Na.clearRect(0,0,oa,Ca);Na.save();Na.scale(Oa.zoom.value,Oa.zoom.value);fb&&za.gridSize&&function(Wb,ic,Pa,nb,ob,Zb){Wb.save();Wb.strokeStyle="rgba(0,0,0,0.1)";Wb.beginPath();for(var Jc=Pa;Jc<Pa+ob+2*ic;Jc+=ic)Wb.moveTo(Jc,nb-ic),Wb.lineTo(Jc,nb+Zb+2*ic);for(Jc=nb;Jc<nb+Zb+2*ic;Jc+=ic)Wb.moveTo(Pa-ic,Jc),Wb.lineTo(Pa+ob+2*ic,Jc);Wb.stroke();Wb.restore()}(Na,
za.gridSize,-Math.ceil(Oa.zoom.value/za.gridSize)*za.gridSize+Oa.scrollX%za.gridSize,-Math.ceil(Oa.zoom.value/za.gridSize)*za.gridSize+Oa.scrollY%za.gridSize,oa/Oa.zoom.value,Ca/Oa.zoom.value);var ra;Ha=pa.filter(function(Wb){var ic={zoom:Oa.zoom,offsetLeft:za.offsetLeft,offsetTop:za.offsetTop,scrollX:Oa.scrollX,scrollY:Oa.scrollY};Wb=(0,n.Pi)(Wb);var Pa=(0,z.Z)(Wb,4);Wb=Pa[0];var nb=Pa[1],ob=Pa[2];Pa=Pa[3];var Zb=(0,M.dE)({clientX:ic.offsetLeft,clientY:ic.offsetTop},ic);ic=(0,M.dE)({clientX:ic.offsetLeft+
oa,clientY:ic.offsetTop+Ca},ic);return Zb.x<=ob&&Zb.y<=Pa&&ic.x>=Wb&&ic.y>=nb});(Ha.forEach(function(Wb){try{if((0,L.lw)(Wb,Ua,Na,Oa),!eb&&Wb.link&&!za.selectedElementIds[Wb.id]){var ic=(0,n.qf)(Wb),Pa=(0,z.Z)(ic,4),nb=(0,D.sw)([Pa[0],Pa[1],Pa[2],Pa[3]],Wb.angle,za),ob=(0,z.Z)(nb,4),Zb=ob[0],Jc=ob[1],ad=ob[2],Nc=ob[3];ic=Zb+ad/2;Pa=Jc+Nc/2;if(Na.save(),Na.translate(za.scrollX+ic,za.scrollY+Pa),Na.rotate(Wb.angle),!O||O.zoom!==za.zoom.value){(O=document.createElement("canvas")).zoom=za.zoom.value;
O.width=ad*window.devicePixelRatio*za.zoom.value;O.height=Nc*window.devicePixelRatio*za.zoom.value;var Gb=O.getContext("2d");Gb.scale(window.devicePixelRatio*za.zoom.value,window.devicePixelRatio*za.zoom.value);Gb.fillStyle="#fff";Gb.fillRect(0,0,ad,Nc);Gb.drawImage(D.rj,0,0,ad,Nc);Gb.restore()}Na.drawImage(O,Zb-ic,Jc-Pa,ad,Nc);Na.restore()}}catch(xc){console.error(xc)}}),za.editingLinearElement)&&(Ea=Y._.getElement(za.editingLinearElement.elementId))&&function(Wb,ic,Pa,nb){Wb.save();Wb.translate(Pa.scrollX,
Pa.scrollY);Wb.lineWidth=1/Pa.zoom.value;Y._.getPointsGlobalCoordinates(nb).forEach(function(ob,Zb){var Jc,ad;Wb.strokeStyle="red";Wb.setLineDash([]);Wb.fillStyle=null!==(Jc=ic.editingLinearElement)&&void 0!==Jc&&null!==(ad=Jc.selectedPointsIndices)&&void 0!==ad&&ad.includes(Zb)?"rgba(255, 127, 127, 0.9)":"rgba(255, 255, 255, 0.9)";X(Wb,ob[0],ob[1],Y._.POINT_HANDLE_SIZE/2/Pa.zoom.value)});Wb.restore()}(Na,za,Oa,Ea);if(ya)try{(0,L.lw)(ya,Ua,Na,Oa)}catch(Wb){console.error(Wb)}if((0,aa.N1)(za)&&za.suggestedBindings.filter(function(Wb){return null!=
Wb}).forEach(function(Wb){var ic=Array.isArray(Wb)?ea:Z;Na.save();Na.translate(Oa.scrollX,Oa.scrollY);ic(Na,Wb);Na.restore()}),Ma&&!za.multiElement&&!za.editingLinearElement){var Aa,Ja=pa.reduce(function(Wb,ic){var Pa=[];if(za.selectedElementIds[ic.id]&&!(0,fa.zq)(za,ic)&&Pa.push(t.black),Oa.remoteSelectedElementIds[ic.id]&&Pa.push.apply(Pa,(0,u.Z)(Oa.remoteSelectedElementIds[ic.id].map(function(ob){return(0,ma.X)(ob,za).background}))),Pa.length){var nb=(0,n.qf)(ic);nb=(0,z.Z)(nb,4);Wb.push({angle:ic.angle,
elementX1:nb[0],elementY1:nb[1],elementX2:nb[2],elementY2:nb[3],selectionColors:Pa})}return Wb},[]);ya=function(Wb){Wb=(0,fa.Fb)(pa,Wb);Wb=(0,n.KP)(Wb);Wb=(0,z.Z)(Wb,4);Ja.push({angle:0,elementX1:Wb[0],elementX2:Wb[2],elementY1:Wb[1],elementY2:Wb[3],selectionColors:[t.black]})};Ea=w((0,fa.iJ)(za));try{for(Ea.s();!(Aa=Ea.n()).done;)ya(Aa.value)}catch(Wb){Ea.e(Wb)}finally{Ea.f()}za.editingGroupId&&ya(za.editingGroupId);Ja.forEach(function(Wb){var ic=Wb.angle,Pa=Wb.elementX1,nb=Wb.elementY1,ob=Wb.selectionColors,
Zb=Wb.elementX2-Pa;Wb=Wb.elementY2-nb;var Jc=4/Oa.zoom.value,ad=8/Oa.zoom.value,Nc=4/Oa.zoom.value;Na.save();Na.translate(Oa.scrollX,Oa.scrollY);Na.lineWidth=1/Oa.zoom.value;for(var Gb=ob.length,xc=0;xc<Gb;++xc)Na.strokeStyle=ob[xc],Na.setLineDash([ad,Nc+(ad+Nc)*(Gb-1)]),Na.lineDashOffset=(ad+Nc)*xc,ba(Na,Pa-Jc,nb-Jc,Zb+2*Jc,Wb+2*Jc,Pa+Zb/2,nb+Wb/2,ic);Na.restore()});Aa=(0,ka.eD)(pa,za);if(Na.save(),Na.translate(Oa.scrollX,Oa.scrollY),1===Aa.length)Na.fillStyle=t.white,ya=(0,n.PC)(Aa[0],Oa.zoom,"mouse"),
za.viewModeEnabled||K(Na,Oa,ya,Aa[0].angle);else if(1<Aa.length&&!za.isRotating){ya=4/Oa.zoom.value;Na.fillStyle=t.white;Ea=(0,n.KP)(Aa);var Sa=(0,z.Z)(Ea,4);Ea=Sa[0];Ma=Sa[1];fb=Sa[2];Sa=Sa[3];var Bb=Na.getLineDash();Na.setLineDash([2/Oa.zoom.value]);var ib=Na.lineWidth;Na.lineWidth=1/Oa.zoom.value;ba(Na,Ea-ya,Ma-ya,fb-Ea+2*ya,Sa-Ma+2*ya,(Ea+fb)/2,(Ma+Sa)/2,0);Na.lineWidth=ib;Na.setLineDash(Bb);ya=(0,n.kK)([Ea,Ma,fb,Sa],0,Oa.zoom,"mouse",n.ox);Aa.some(function(Wb){return!Wb.locked})&&K(Na,Oa,ya,
0)}Na.restore()}for(var Ob in Na.restore(),Oa.remotePointerViewportCoords)Aa=Oa.remotePointerViewportCoords[Ob],Ea=Aa.x,Ma=Aa.y,Ea-=za.offsetLeft,Ma-=za.offsetTop,fb=0>Ea||Ea>oa-9||0>Ma||Ma>Ca-14,Ea=Math.max(Ea,0),Ea=Math.min(Ea,oa-9),Ma=Math.max(Ma,0),Ma=Math.min(Ma,Ca-14),ya=(0,ma.X)(Ob,za),Aa=ya.background,ya=ya.stroke,Na.save(),Na.strokeStyle=ya,Na.fillStyle=Aa,Sa=Oa.remotePointerUserStates[Ob],(fb||Sa===J.AWAY)&&(Na.globalAlpha=.48),Oa.remotePointerButton&&"down"===Oa.remotePointerButton[Ob]&&
(Na.beginPath(),Na.arc(Ea,Ma,15,0,2*Math.PI,!1),Na.lineWidth=3,Na.strokeStyle="#ffffff88",Na.stroke(),Na.closePath(),Na.beginPath(),Na.arc(Ea,Ma,15,0,2*Math.PI,!1),Na.lineWidth=1,Na.strokeStyle=ya,Na.stroke(),Na.closePath()),Na.beginPath(),Na.moveTo(Ea,Ma),Na.lineTo(Ea+1,Ma+14),Na.lineTo(Ea+4,Ma+9),Na.lineTo(Ea+9,Ma+10),Na.lineTo(Ea,Ma),Na.fill(),Na.stroke(),Bb=Oa.remotePointerUsernames[Ob],ib="",Sa===J.AWAY?ib=P?"⚫️":" (".concat(J.AWAY,")"):Sa===J.IDLE?ib=P?"\ud83d\udca4":" (".concat(J.IDLE,")"):
Sa===J.ACTIVE&&(ib=P?"\ud83d\udfe2":""),Sa="".concat(Bb?"".concat(Bb," "):"").concat(ib),!fb&&Sa&&(Ea+=9,Ma+=14,fb=Na.measureText(Sa),Bb=fb.actualBoundingBoxDescent+fb.actualBoundingBoxAscent,Na.fillStyle=ya,Na.fillRect(Ea-1,Ma-1,fb.width+8+2,Bb+8+2),Na.fillStyle=Aa,Na.fillRect(Ea,Ma,fb.width+8,Bb+8),Na.fillStyle=t.white,Na.fillText(Sa,Ea+4,Ma+4+fb.actualBoundingBoxAscent)),Na.restore(),Na.closePath();return Za&&(ra=(0,R.tJ)(pa,oa,Ca,Oa),Na.save(),Na.fillStyle=R.w1,Na.strokeStyle="rgba(255,255,255,0.8)",
[ra.horizontal,ra.vertical].forEach(function(Wb){if(Wb){var ic=Wb.x,Pa=Wb.y,nb=Wb.width;Wb=Wb.height;var ob=R.nn/2;Na.beginPath();Na.moveTo(ic+ob,Pa);Na.lineTo(ic+nb-ob,Pa);Na.quadraticCurveTo(ic+nb,Pa,ic+nb,Pa+ob);Na.lineTo(ic+nb,Pa+Wb-ob);Na.quadraticCurveTo(ic+nb,Pa+Wb,ic+nb-ob,Pa+Wb);Na.lineTo(ic+ob,Pa+Wb);Na.quadraticCurveTo(ic,Pa+Wb,ic,Pa+Wb-ob);Na.lineTo(ic,Pa+ob);Na.quadraticCurveTo(ic,Pa,ic+ob,Pa);Na.closePath();Na.fill();Na.stroke()}}),Na.restore()),Na.restore(),{atLeastOneVisibleElement:0<
Ha.length,scrollBars:ra}},ha=(0,M.hR)(function(pa,za,ya,Ha,Ua,Ea,Oa,Za){pa=F(pa,za,ya,Ha,Ua,Ea,Oa);null==Za||Za(pa)},{trailing:!0}),K=function(pa,za,ya,Ha){Object.keys(ya).forEach(function(Ua){var Ea=ya[Ua];void 0!==Ea&&(pa.save(),pa.lineWidth=1/za.zoom.value,"rotation"===Ua?X(pa,Ea[0]+Ea[2]/2,Ea[1]+Ea[3]/2,Ea[2]/2):ba(pa,Ea[0],Ea[1],Ea[2],Ea[3],Ea[0]+Ea[2]/2,Ea[1]+Ea[3]/2,Ha,!0),pa.restore())})},Z=function(pa,za){var ya=(0,n.qf)(za),Ha=(0,z.Z)(ya,4);ya=Ha[0];var Ua=Ha[1],Ea=Ha[2]-ya;Ha=Ha[3]-Ua;
var Oa=(0,H.fb)(za,Ea,Ha);pa.strokeStyle="rgba(0,0,0,.05)";pa.lineWidth=Oa-4;Oa=2+Oa/2;switch(za.type){case "rectangle":case "text":case "image":ba(pa,ya-Oa,Ua-Oa,Ea+2*Oa,Ha+2*Oa,ya+Ea/2,Ua+Ha/2,za.angle);break;case "diamond":var Za=Math.hypot(Ea,Ha);!function(Ma,fb,eb,Na,oa,Ca){Ma.save();Ma.translate(Na,oa);Ma.rotate(Ca);Ma.beginPath();Ma.moveTo(0,eb/2);Ma.lineTo(fb/2,0);Ma.lineTo(0,-eb/2);Ma.lineTo(-fb/2,0);Ma.closePath();Ma.stroke();Ma.restore()}(pa,Ea+Oa*Za/Ha*2,Ha+Oa*Za/Ea*2,ya+Ea/2,Ua+Ha/2,
za.angle);break;case "ellipse":!function(Ma,fb,eb,Na,oa,Ca){Ma.beginPath();Ma.ellipse(Na,oa,fb/2,eb/2,Ca,0,2*Math.PI);Ma.stroke()}(pa,Ea+2*Oa,Ha+2*Oa,ya+Ea/2,Ua+Ha/2,za.angle)}},ea=function(pa,za){var ya=(0,z.Z)(za,3),Ha=ya[0];za=ya[1];ya=ya[2];var Ua=(0,H.fb)(ya,ya.width,ya.height);pa.strokeStyle="rgba(0,0,0,0)";pa.fillStyle="rgba(0,0,0,.05)";("both"===za?[0,-1]:"start"===za?[0]:[-1]).forEach(function(Ea){Ea=Y._.getPointAtIndexGlobalCoordinates(Ha,Ea);Ea=(0,z.Z)(Ea,2);X(pa,Ea[0],Ea[1],Ua)})},ca=
function(pa,za,ya,Ha){var Ua=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},Ea=Ua.offsetX,Oa=void 0===Ea?0:Ea;Ea=Ua.offsetY;var Za=void 0===Ea?0:Ea;Ua=Ua.exportWithDarkMode;var Ma=void 0!==Ua&&Ua;ya&&pa.forEach(function(fb){if(!fb.isDeleted)try{(0,L.Rg)(fb,za,ya,Ha,fb.x+Oa,fb.y+Za,Ma)}catch(eb){console.error(eb)}})}},1564:function(k,h,f){var w=f(8821),x=f(5169),J=f(5118);k=function(){function z(){(0,w.Z)(this,z);this.callbacks=new Set;this.nonDeletedElements=[];this.elements=[];this.elementsMap=
new Map}return(0,x.Z)(z,[{key:"getElementsIncludingDeleted",value:function(){return this.elements}},{key:"getNonDeletedElements",value:function(){return this.nonDeletedElements}},{key:"getElement",value:function(u){return this.elementsMap.get(u)||null}},{key:"getNonDeletedElement",value:function(u){return(u=this.getElement(u))&&(0,J.qP)(u)?u:null}},{key:"replaceAllElements",value:function(u){var t=this;this.elements=u;this.elementsMap.clear();u.forEach(function(n){t.elementsMap.set(n.id,n);z.mapElementToScene(n,
t)});this.nonDeletedElements=(0,J.Lm)(this.elements);this.informMutation()}},{key:"informMutation",value:function(){for(var u=0,t=Array.from(this.callbacks);u<t.length;u++)(0,t[u])()}},{key:"addCallback",value:function(u){var t=this;if(this.callbacks.has(u))throw Error();return this.callbacks.add(u),function(){if(!t.callbacks.has(u))throw Error();t.callbacks.delete(u)}}},{key:"destroy",value:function(){var u=this;z.sceneMapById.forEach(function(t,n){t===u&&z.sceneMapById.delete(n)});this.callbacks.clear()}}],
[{key:"mapElementToScene",value:function(u,t){"string"==typeof u?this.sceneMapById.set(u,t):this.sceneMapByElement.set(u,t)}},{key:"getScene",value:function(u){return"string"==typeof u?this.sceneMapById.get(u)||null:this.sceneMapByElement.get(u)||null}}]),z}();k.sceneMapByElement=new WeakMap;k.sceneMapById=new Map;h.Z=k},8120:function(k,h,f){f.d(h,{$b:function(){return z},CJ:function(){return Y},M9:function(){return n},OW:function(){return fa},PD:function(){return u},QG:function(){return ma},Un:function(){return L},
Zd:function(){return t},bZ:function(){return ka},gP:function(){return R}});var w=f(2577),x=f(5118),J=f(1974),z=function(H){return"rectangle"===H||"ellipse"===H||"diamond"===H||"line"===H||"freedraw"===H},u=function(H){return"image"!==H},t=function(H){return"rectangle"===H||"ellipse"===H||"diamond"===H||"freedraw"===H||"arrow"===H||"line"===H},n=function(H){return"rectangle"===H||"ellipse"===H||"diamond"===H||"arrow"===H||"line"===H},R=function(H){return"rectangle"===H||"arrow"===H||"line"===H||"diamond"===
H},ka=function(H){return"text"===H},L=function(H){return"arrow"===H},ma=function(H,aa){for(var M=null,Q=H.length-1;0<=Q;--Q){var D=H[Q];if(!D.isDeleted&&aa(D)){M=D;break}}return M},Y=function(H,aa){return H.filter(function(M){return!M.isDeleted&&aa(M)})},fa=function(H,aa,M){for(var Q=null,D=H.length-1;0<=D;--D)if(!H[D].isDeleted){var O=(0,x.qf)(H[D]);O=(0,w.Z)(O,4);var P=O[1],ba=O[2],X=O[3];if(O[0]<aa&&aa<ba&&P<M&&M<X){Q=H[D];break}}return(0,J.mG)(Q,!1)?Q:null}},4162:function(k,h,f){f.d(h,{$D:function(){return H},
Cg:function(){return M},NL:function(){return fa},oj:function(){return Y}});var w=f(2577),x=f(8950);k=f(7945);var J=f.n(k),z=f(8234),u=f(8925),t=f(3547),n=f(6340),R=f(8288),ka=f(8897),L=f(5523),ma=f(5637),Y="\x3c!-- svg-source:excalidraw --\x3e",fa=function(){var Q=(0,x.Z)(J().mark(function F(O,P,ba,X){var ha,K,Z,ea,ca,pa,za,ya,Ha,Ua,Ea,Oa,Za,Ma,fb,eb,Na,oa,Ca=arguments;return J().wrap(function(ra){for(;;)switch(ra.prev=ra.next){case 0:return ha=X.exportBackground,K=X.exportPadding,Z=void 0===K?R.qy:
K,ea=X.viewBackgroundColor,ca=4<Ca.length&&void 0!==Ca[4]?Ca[4]:function(Aa,Ja){var Sa=document.createElement("canvas");return Sa.width=Aa*P.exportScale,Sa.height=Ja*P.exportScale,{canvas:Sa,scale:P.exportScale}},pa=aa(O,Z),za=(0,w.Z)(pa,4),ya=za[0],Ha=za[1],Ua=za[2],Ea=za[3],Oa=ca(Ua,Ea),Za=Oa.canvas,Ma=Oa.scale,fb=void 0===Ma?1:Ma,eb=(0,ka.im)(),ra.next=7,(0,ma.Xx)({imageCache:new Map,fileIds:(0,ma.oA)(O).map(function(Aa){return Aa.fileId}),files:ba});case 7:return Na=ra.sent,oa=Na.imageCache,(0,t.Eu)(O,
P,null,fb,z.Z.canvas(Za),Za,{viewBackgroundColor:ha?ea:null,scrollX:-ya+Z,scrollY:-Ha+Z,zoom:eb.zoom,remotePointerViewportCoords:{},remoteSelectedElementIds:{},shouldCacheIgnoreZoom:!1,remotePointerUsernames:{},remotePointerUserStates:{},theme:P.exportWithDarkMode?"dark":"light",imageCache:oa,renderScrollbars:!1,renderSelection:!1,renderGrid:!1,isExporting:!0}),ra.abrupt("return",Za);case 11:case "end":return ra.stop()}},F)}));return function(O,P,ba,X){return Q.apply(this,arguments)}}(),H=function(){var Q=
(0,x.Z)(J().mark(function X(O,P,ba){var F,ha,K,Z,ea,ca,pa,za,ya,Ha,Ua,Ea,Oa,Za,Ma,fb,eb,Na;return J().wrap(function(oa){for(;;)switch(oa.prev=oa.next){case 0:if(F=P.exportPadding,ha=void 0===F?R.qy:F,K=P.viewBackgroundColor,Z=P.exportScale,ea=void 0===Z?1:Z,ca=P.exportEmbedScene,pa="",!ca){oa.next=14;break}return oa.prev=3,oa.next=6,Promise.resolve().then(f.bind(f,673));case 6:return oa.next=8,oa.sent.encodeSvgMetadata({text:(0,L.I_)(O,P,ba||{},"local")});case 8:pa=oa.sent;oa.next=14;break;case 11:oa.prev=
11,oa.t0=oa.catch(3),console.error(oa.t0);case 14:return za=aa(O,ha),ya=(0,w.Z)(za,4),Ha=ya[0],Ua=ya[1],Ea=ya[2],Oa=ya[3],(Za=document.createElementNS(R.hR,"svg")).setAttribute("version","1.1"),Za.setAttribute("xmlns",R.hR),Za.setAttribute("viewBox","0 0 ".concat(Ea," ").concat(Oa)),Za.setAttribute("width","".concat(Ea*ea)),Za.setAttribute("height","".concat(Oa*ea)),P.exportWithDarkMode&&Za.setAttribute("filter",R.ZF),Ma="https://excalidraw.com/",Ma=window.EXCALIDRAW_ASSET_PATH||"https://unpkg.com/".concat("@excalidraw/excalidraw",
"@").concat("0.12.0"),null!==(fb=Ma)&&void 0!==fb&&fb.startsWith("/")&&(Ma=Ma.replace("/","".concat(window.location.origin,"/"))),Ma="".concat(Ma,"/dist/excalidraw-assets/"),Za.innerHTML="\n  ".concat(Y,"\n  ").concat(pa,'\n  \x3cdefs\x3e\n    \x3cstyle\x3e\n      @font-face {\n        font-family: "Virgil";\n        src: url("').concat(Ma,'Virgil.woff2");\n      }\n      @font-face {\n        font-family: "Cascadia";\n        src: url("').concat(Ma,'Cascadia.woff2");\n      }\n    \x3c/style\x3e\n  \x3c/defs\x3e\n  '),
P.exportBackground&&K&&((eb=Za.ownerDocument.createElementNS(R.hR,"rect")).setAttribute("x","0"),eb.setAttribute("y","0"),eb.setAttribute("width","".concat(Ea)),eb.setAttribute("height","".concat(Oa)),eb.setAttribute("fill",K),Za.appendChild(eb)),Na=z.Z.svg(Za),(0,t.M_)(O,Na,Za,ba||{},{offsetX:-Ha+ha,offsetY:-Ua+ha,exportWithDarkMode:P.exportWithDarkMode}),oa.abrupt("return",Za);case 29:case "end":return oa.stop()}},X,null,[[3,11]])}));return function(O,P,ba){return Q.apply(this,arguments)}}(),aa=
function(Q,D){Q=(0,u.KP)(Q);Q=(0,w.Z)(Q,4);var O=Q[0],P=Q[1],ba=Q[3];return[O,P,(0,n.TE)(O,Q[2])+2*D,(0,n.TE)(P,ba)+D+D]},M=function(Q,D,O){Q=aa(Q,D).map(function(P){return Math.trunc(P*O)});Q=(0,w.Z)(Q,4);return[Q[2],Q[3]]}},75:function(k,h,f){f.d(h,{$b:function(){return z.$b},CJ:function(){return z.CJ},M9:function(){return z.M9},N:function(){return x.N},OW:function(){return z.OW},PR:function(){return x.PR},QG:function(){return z.QG},Un:function(){return z.Un},W:function(){return J.W},Yp:function(){return x.Yp},
Zd:function(){return z.Zd},Zs:function(){return x.Zs},_4:function(){return w._4},bZ:function(){return z.bZ},eD:function(){return x.eD},gP:function(){return z.gP},j:function(){return u.j}});var w=f(756),x=f(1868),J=f(2264),z=f(8120),u=f(746)},2264:function(k,h,f){f.d(h,{W:function(){return u},s:function(){return z}});var w=f(2577),x=f(5118),J=f(6340),z=function(t){var n=t.scenePoint,R=t.viewportDimensions;t=t.zoom;return{scrollX:R.width/2*(1/t.value)-n.x,scrollY:R.height/2*(1/t.value)-n.y}},u=function(t,
n,R){if(!(t=(0,x.n_)(t)).length)return{scrollX:0,scrollY:0};R=(0,x.KP)(t);var ka=(0,w.Z)(R,4);R=ka[0];var L=ka[1],ma=ka[2];ka=ka[3];var Y=(0,w.Z)([R,L,ma,ka],4),fa=Y[2],H=Y[3],aa=(0,J._i)({sceneX:Y[0],sceneY:Y[1]},n);Y=aa.x;aa=aa.y;fa=(0,J._i)({sceneX:fa,sceneY:H},n);H=fa.y;if(fa.x-Y>n.width||H-aa>n.height)t=(0,x.os)(t,(0,J.dE)({clientX:n.scrollX,clientY:n.scrollY},n)),t=(0,w.Z)(t,4),R=t[0],L=t[1],ma=t[2],ka=t[3];return z({scenePoint:{x:(R+ma)/2,y:(L+ka)/2},viewportDimensions:{width:n.width,height:n.height},
zoom:n.zoom})}},756:function(k,h,f){f.d(h,{WM:function(){return u},_4:function(){return ka},nn:function(){return t},tJ:function(){return R},w1:function(){return n}});var w=f(2577),x=f(5118),J=f(6340),z=f(8211),u=4,t=6,n="rgba(0,0,0,0.3)",R=function(L,ma,Y,fa){var H=fa.scrollX,aa=fa.scrollY,M=fa.zoom;if(0===L.length)return{horizontal:null,vertical:null};L=(0,x.KP)(L);fa=(0,w.Z)(L,4);var Q=fa[0],D=fa[1];L=fa[2];fa=fa[3];var O=ma/M.value,P=Y/M.value,ba=ma-O,X=Y-P;M=parseInt((0,J.IH)("sat"));var F=parseInt((0,J.IH)("sab")),
ha=parseInt((0,J.IH)("sal")),K=parseInt((0,J.IH)("sar")),Z=(0,z.G3)().rtl;H=ba/2-H+ha;aa=X/2-aa+M;O=H+O-K;P=aa+P-F;Q=Math.min(Q,H);D=Math.min(D,aa);L=Math.max(L,O);fa=Math.max(fa,P);return{horizontal:H===Q&&O===L?null:{x:Math.max(ha,u)+(H-Q)/(L-Q)*ma,y:Y-t-Math.max(u,F),width:(O-H)/(L-Q)*ma-Math.max(2*u,ha+K),height:t},vertical:aa===D&&P===fa?null:{x:Z?Math.max(ha,u):ma-t-Math.max(K,u),y:(aa-D)/(fa-D)*Y+Math.max(M,u),width:t,height:(P-aa)/(fa-D)*Y-Math.max(2*u,M+F)}}},ka=function(L,ma,Y){L=[L.horizontal,
L.vertical].map(function(H){return null!=H&&H.x<=ma&&ma<=H.x+H.width&&H.y<=Y&&Y<=H.y+H.height});var fa=(0,w.Z)(L,2);L=fa[0];fa=fa[1];return{isOverEither:L||fa,isOverHorizontal:L,isOverVertical:fa}}},1868:function(k,h,f){f.d(h,{N:function(){return u},PR:function(){return t},Yp:function(){return z},Zs:function(){return R},eD:function(){return n}});var w=f(2577),x=f(5118),J=f(1974),z=function(ka,L){L=(0,x.qf)(L);L=(0,w.Z)(L,4);var ma=L[0],Y=L[1],fa=L[2],H=L[3];return ka.filter(function(aa){var M=(0,x.Pi)(aa),
Q=(0,w.Z)(M,4);M=Q[0];var D=Q[1],O=Q[2];Q=Q[3];return!1===aa.locked&&"selection"!==aa.type&&!(0,J.Xh)(aa)&&ma<=M&&Y<=D&&fa>=O&&H>=Q})},u=function(ka,L){return ka.some(function(ma){return L.selectedElementIds[ma.id]})},t=function(ka,L,ma){ka=Array.from(new Set(n(ka,L).map(function(Y){return ma(Y)})));return 1===ka.length?ka[0]:null},n=function(ka,L){var ma=2<arguments.length&&void 0!==arguments[2]&&arguments[2];return ka.filter(function(Y){return L.selectedElementIds[Y.id]||ma&&(0,J.Xh)(Y)&&L.selectedElementIds[null==
Y?void 0:Y.containerId]?Y:null})},R=function(ka,L){return L.editingElement?[L.editingElement]:n(ka,L,!0)}},746:function(k,h,f){f.d(h,{E:function(){return x},j:function(){return w}});var w=function(J){return Math.max(.1,Math.min(J,30))},x=function(J,z){var u=J.nextZoom,t=J.viewportX-z.offsetLeft;J=J.viewportY-z.offsetTop;var n=z.zoom.value;return{scrollX:z.scrollX+(t-t/n)+-(t-t/u),scrollY:z.scrollY+(J-J/n)+-(J-J/u),zoom:{value:u}}}},6340:function(k,h,f){function w(Gb,xc){var Wc=Object.keys(Gb);if(Object.getOwnPropertySymbols){var hd=
Object.getOwnPropertySymbols(Gb);xc&&(hd=hd.filter(function(Nd){return Object.getOwnPropertyDescriptor(Gb,Nd).enumerable}));Wc.push.apply(Wc,hd)}return Wc}function x(Gb){for(var xc=1;xc<arguments.length;xc++){var Wc=null!=arguments[xc]?arguments[xc]:{};xc%2?w(Object(Wc),!0).forEach(function(hd){(0,z.Z)(Gb,hd,Wc[hd])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Gb,Object.getOwnPropertyDescriptors(Wc)):w(Object(Wc)).forEach(function(hd){Object.defineProperty(Gb,hd,Object.getOwnPropertyDescriptor(Wc,
hd))})}return Gb}f.d(h,{$9:function(){return Sa},$g:function(){return O},$h:function(){return Jc},AK:function(){return eb},C3:function(){return ic},Ds:function(){return ba},FG:function(){return Na},Fc:function(){return H},G3:function(){return Wb},IH:function(){return Za},Ip:function(){return ib},KJ:function(){return ea},OF:function(){return ca},Om:function(){return K},Oo:function(){return aa},PI:function(){return Aa},Pr:function(){return Ha},Q5:function(){return Bb},Qm:function(){return ra},TE:function(){return ha},
Uk:function(){return pa},_Z:function(){return Q},_i:function(){return Oa},ag:function(){return ob},cx:function(){return oa},dE:function(){return Ea},dZ:function(){return fb},h2:function(){return nb},hR:function(){return X},mO:function(){return P},qr:function(){return Ca},qz:function(){return Ob},rB:function(){return za},s:function(){return D},tH:function(){return Ja},uY:function(){return Ua},v4:function(){return Zb},wO:function(){return M},wo:function(){return ya},xn:function(){return Pa},xp:function(){return Nc},
y8:function(){return ad},yo:function(){return F},z8:function(){return Z}});var J=f(6655),z=f(7169),u=f(1930),t=f(2577),n=f(5284),R=f(56),ka=f(8288),L=f(5156),ma=f(6066),Y,fa,H=function(){var Gb=new Date,xc=Gb.getFullYear(),Wc="".concat(Gb.getMonth()+1).padStart(2,"0"),hd="".concat(Gb.getDate()).padStart(2,"0"),Nd="".concat(Gb.getHours()).padStart(2,"0");Gb="".concat(Gb.getMinutes()).padStart(2,"0");return"".concat(xc,"-").concat(Wc,"-").concat(hd,"-").concat(Nd).concat(Gb)},aa=function(Gb){return Gb.charAt(0).toUpperCase()+
Gb.slice(1)},M=function(Gb){return Gb instanceof HTMLElement&&Gb.className.includes("ToolIcon")},Q=function(Gb){return Gb instanceof HTMLElement&&"wysiwyg"===Gb.dataset.type||Gb instanceof HTMLBRElement||Gb instanceof HTMLInputElement||Gb instanceof HTMLTextAreaElement||Gb instanceof HTMLSelectElement},D=function(Gb){return Gb instanceof HTMLElement&&"wysiwyg"===Gb.dataset.type||Gb instanceof HTMLBRElement||Gb instanceof HTMLTextAreaElement||Gb instanceof HTMLInputElement&&("text"===Gb.type||"number"===
Gb.type)},O=function(Gb){Gb=Gb.fontFamily;for(var xc=0,Wc=Object.entries(ka.ut);xc<Wc.length;xc++){var hd=(0,t.Z)(Wc[xc],2),Nd=hd[0];if(hd[1]===Gb)return"".concat(Nd,", ").concat(ka._D)}return ka._D},P=function(Gb){var xc=Gb.fontFamily;return"".concat(Gb.fontSize,"px ").concat(O({fontFamily:xc}))},ba=function(Gb,xc){var Wc=0,hd=null,Nd=function(){for(var Ld=arguments.length,pc=Array(Ld),Ed=0;Ed<Ld;Ed++)pc[Ed]=arguments[Ed];hd=pc;clearTimeout(Wc);Wc=window.setTimeout(function(){hd=null;Gb.apply(void 0,
pc)},xc)};return Nd.flush=function(){if(clearTimeout(Wc),hd){var Ld=hd;hd=null;Gb.apply(void 0,(0,u.Z)(Ld))}},Nd.cancel=function(){hd=null;clearTimeout(Wc)},Nd},X=function(Gb,xc){var Wc=null,hd=null,Nd=null,Ld=function Yd(xd){Wc=window.requestAnimationFrame(function(){Wc=null;Gb.apply(void 0,(0,u.Z)(xd));hd=null;Nd&&(hd=Nd,Nd=null,Yd(hd))})},pc=function(){for(var xd=arguments.length,Yd=Array(xd),ud=0;ud<xd;ud++)Yd[ud]=arguments[ud];hd=Yd;null===Wc?Ld(hd):null!=xc&&xc.trailing&&(Nd=Yd)};return pc.flush=
function(){null!==Wc&&(cancelAnimationFrame(Wc),Wc=null);hd&&(Gb.apply(void 0,(0,u.Z)(Nd||hd)),hd=Nd=null)},pc.cancel=function(){hd=Nd=null;null!==Wc&&(cancelAnimationFrame(Wc),Wc=null)},pc},F=function(Gb,xc){if(!Gb.length||1>xc)return[];for(var Wc=0,hd=0,Nd=Array(Math.ceil(Gb.length/xc));Wc<Gb.length;)Nd[hd++]=Gb.slice(Wc,Wc+=xc);return Nd},ha=function(Gb,xc){return Math.abs(Gb-xc)},K=function(Gb,xc){return"custom"===xc.type?x(x({},Gb.activeTool),{},{type:"custom",customType:xc.customType}):x(x({},
Gb.activeTool),{},{lastActiveToolBeforeEraser:void 0===xc.lastActiveToolBeforeEraser?Gb.activeTool.lastActiveToolBeforeEraser:xc.lastActiveToolBeforeEraser,type:xc.type,customType:null})},Z=function(Gb){Gb&&(Gb.style.cursor="")},ea=function(Gb,xc){Gb&&(Gb.style.cursor=xc)},ca=function(Gb,xc){if(!Y||Y.theme!==xc){var Wc=xc===ka.C6.DARK;(Y=document.createElement("canvas")).theme=xc;Y.height=20;Y.width=20;xc=Y.getContext("2d");xc.lineWidth=1;xc.beginPath();xc.arc(Y.width/2,Y.height/2,5,0,2*Math.PI);
xc.fillStyle=Wc?n.black:n.white;xc.fill();xc.strokeStyle=Wc?n.white:n.black;xc.stroke();fa=Y.toDataURL(ka.LO.svg)}ea(Gb,"url(".concat(fa,") ").concat(10," ").concat(10,", auto"))},pa=function(Gb,xc){Gb&&("selection"===xc.activeTool.type?Z(Gb):"eraser"===xc.activeTool.type?ca(Gb,xc.theme):["image","custom"].includes(xc.activeTool.type)||(Gb.style.cursor=ka.oc.CROSSHAIR))},za=function(){var Gb;return"HTML"===(null===(Gb=document.fullscreenElement)||void 0===Gb?void 0:Gb.nodeName)},ya=function(){return document.documentElement.requestFullscreen()},
Ha=function(){return document.exitFullscreen()},Ua=function(Gb){return Gb=Gb.replace(/\bAlt\b/i,"Alt").replace(/\bShift\b/i,"Shift").replace(/\b(Enter|Return)\b/i,"Enter").replace(/\bDel\b/i,"Delete"),ma.Um?Gb.replace(/\bCtrlOrCmd\b/i,"Cmd").replace(/\bAlt\b/i,"Option"):Gb.replace(/\bCtrlOrCmd\b/i,"Ctrl")},Ea=function(Gb,xc){var Wc=1/xc.zoom.value;return{x:(Gb.clientX-xc.offsetLeft)*Wc-xc.scrollX,y:(Gb.clientY-xc.offsetTop)*Wc-xc.scrollY}},Oa=function(Gb,xc){var Wc=xc.zoom;return{x:(Gb.sceneX+xc.scrollX)*
Wc.value+xc.offsetLeft,y:(Gb.sceneY+xc.scrollY)*Wc.value+xc.offsetTop}},Za=function(Gb){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(Gb))},Ma=new RegExp("^[^".concat("A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿Ⰰ-﬜﷾-﹯﻽-","]*[").concat("֑-߿יִ-﷽ﹰ-ﻼ","]")),fb=function(Gb){return Ma.test(Gb)},eb=function(Gb){Gb=(0,t.Z)(Gb,2);return{x:Gb[0],y:Gb[1]}},Na=function(Gb){if("AbortError"!==(null==Gb?void 0:Gb.name))throw Gb;console.warn(Gb)},oa=function(Gb,xc){var Wc=2<arguments.length&&void 0!==
arguments[2]?arguments[2]:0;0>Wc&&(Wc=Gb.length+Wc);for(Wc=Math.min(Gb.length,Math.max(Wc,0))-1;++Wc<Gb.length;)if(xc(Gb[Wc],Wc,Gb))return Wc;return-1},Ca=function(Gb,xc){var Wc=2<arguments.length&&void 0!==arguments[2]?arguments[2]:Gb.length-1;0>Wc&&(Wc=Gb.length+Wc);for(Wc=Math.min(Gb.length-1,Math.max(Wc,0))+1;-1<--Wc;)if(xc(Gb[Wc],Wc,Gb))return Wc;return-1},ra=function(Gb){var xc=5===Gb.length&&"0"===Gb.substr(4,1),Wc=9===Gb.length&&"00"===Gb.substr(7,2);return xc||Wc||Gb===R.Z.elementBackground[0]},
Aa=function(){var Gb,xc,Wc=new Promise(function(hd,Nd){Gb=hd;xc=Nd});return Wc.resolve=Gb,Wc.reject=xc,Wc},Ja=function(Gb){return function(xc){(0,L.unstable_batchedUpdates)(Gb,xc)}},Sa=function(Gb){return X(function(xc){(0,L.unstable_batchedUpdates)(Gb,xc)})},Bb=function(){var Gb=document.createElement("canvas").getContext("2d");return Gb?(Gb.fillStyle="#f00",Gb.textBaseline="top",Gb.font="32px Arial",Gb.fillText("\ud83d\ude00",0,0),0!==Gb.getImageData(12,12,1,1).data[0]):!1},ib=function(Gb){for(Gb=
Gb.parentElement;Gb&&Gb!==document.body;){var xc=window.getComputedStyle(Gb).overflowY;if(Gb.scrollHeight>Gb.clientHeight&&("auto"===xc||"scroll"===xc||"overlay"===xc))return Gb;Gb=Gb.parentElement}return document},Ob=function(Gb){for(Gb=Gb.parentElement;Gb;){if(-1<Gb.tabIndex)return void Gb.focus();Gb=Gb.parentElement}},Wb=function(Gb){return Array.from(Gb).map(function(xc){return"0".concat(xc.toString(16)).slice(-2)}).join("")},ic=function(){return nb()?1:Date.now()},Pa=function(Gb){return Gb.reduce(function(xc,
Wc){return xc.set("string"==typeof Wc?Wc:Wc.id,Wc),xc},new Map)},nb=function(){var Gb;return"undefined"!=typeof p&&"test"===(null===(Gb={REACT_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",REACT_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",REACT_APP_LIBRARY_URL:"https://libraries.excalidraw.com",REACT_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",REACT_APP_PORTAL_URL:"https://portal.excalidraw.com",REACT_APP_WS_SERVER_URL:"",
REACT_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',REACT_APP_GOOGLE_ANALYTICS_ID:"UA-387204-13",REACT_APP_PLUS_APP:"https://app.excalidraw.com",PKG_NAME:"@excalidraw/excalidraw",
PKG_VERSION:"0.12.0",IS_EXCALIDRAW_NPM_PACKAGE:!0})||void 0===Gb?void 0:Gb.NODE_ENV)},ob=function(Gb,xc){return new CustomEvent(Gb,{detail:{nativeEvent:xc},cancelable:!0})},Zb=function(Gb,xc){var Wc=!1,hd;for(hd in xc){var Nd=xc[hd];void 0!==Nd&&(Gb[hd]!==Nd||"object"===(0,J.Z)(Nd)&&null!==Nd)&&(Wc=!0)}return Wc?x(x({},Gb),xc):Gb},Jc=function(){try{return window.self===window.top?"top":"iframe"}catch(Gb){return"iframe"}},ad=function(Gb){return!!Gb&&"object"===(0,J.Z)(Gb)&&"then"in Gb&&"catch"in Gb&&
"finally"in Gb},Nc=function(Gb){return(Gb=null==Gb?void 0:Gb.querySelectorAll("button, a, input, select, textarea, div[tabindex], label[tabindex]"))?Array.from(Gb).filter(function(xc){return-1<xc.tabIndex&&!xc.disabled}):[]}},9669:function(k){k.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg\x3d\x3d"},7984:function(k){k.exports='data:image/svg+xml,\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" width\x3d"292.4" height\x3d"292.4" viewBox\x3d"0 0 292 292"\x3e\x3cpath d\x3d"M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/\x3e\x3c/svg\x3e'},
1639:function(k){k.exports='data:image/svg+xml,\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" width\x3d"292.4" height\x3d"292.4" viewBox\x3d"0 0 292 292"\x3e\x3cpath fill\x3d"%23ced4da" d\x3d"M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/\x3e\x3c/svg\x3e'},3147:function(k,h,f){k.exports=f.p+"excalidraw-assets/Cascadia.woff2"},3940:function(k,h,f){k.exports=f.p+"excalidraw-assets/Virgil.woff2"},9787:function(k){k.exports=A},5156:function(k){k.exports=
q},7017:function(k,h,f){function w(x,J){(null==J||J>x.length)&&(J=x.length);for(var z=0,u=Array(J);z<J;z++)u[z]=x[z];return u}f.d(h,{Z:function(){return w}})},3173:function(k,h,f){function w(x){if(void 0===x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}f.d(h,{Z:function(){return w}})},8950:function(k,h,f){function w(J,z,u,t,n,R,ka){try{var L=J[R](ka),ma=L.value}catch(Y){return void u(Y)}L.done?z(ma):Promise.resolve(ma).then(t,n)}function x(J){return function(){var z=
this,u=arguments;return new Promise(function(t,n){function R(ma){w(L,t,n,R,ka,"next",ma)}function ka(ma){w(L,t,n,R,ka,"throw",ma)}var L=J.apply(z,u);R(void 0)})}}f.d(h,{Z:function(){return x}})},8821:function(k,h,f){function w(x,J){if(!(x instanceof J))throw new TypeError("Cannot call a class as a function");}f.d(h,{Z:function(){return w}})},5169:function(k,h,f){function w(J,z){for(var u=0;u<z.length;u++){var t=z[u];t.enumerable=t.enumerable||!1;t.configurable=!0;"value"in t&&(t.writable=!0);Object.defineProperty(J,
t.key,t)}}function x(J,z,u){return z&&w(J.prototype,z),u&&w(J,u),J}f.d(h,{Z:function(){return x}})},7169:function(k,h,f){function w(x,J,z){return J in x?Object.defineProperty(x,J,{value:z,enumerable:!0,configurable:!0,writable:!0}):x[J]=z,x}f.d(h,{Z:function(){return w}})},2312:function(k,h,f){function w(x){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(J){return J.__proto__||Object.getPrototypeOf(J)},w(x)}f.d(h,{Z:function(){return w}})},2248:function(k,h,f){function w(J,z){if("function"!=
typeof z&&null!==z)throw new TypeError("Super expression must either be null or a function");J.prototype=Object.create(z&&z.prototype,{constructor:{value:J,writable:!0,configurable:!0}});z&&(0,x.Z)(J,z)}f.d(h,{Z:function(){return w}});var x=f(5901)},2726:function(k,h,f){function w(x,J){if(null==x)return{};var z;if(null==x)var u={};else{u={};var t=Object.keys(x);for(z=0;z<t.length;z++){var n=t[z];0<=J.indexOf(n)||(u[n]=x[n])}}if(Object.getOwnPropertySymbols)for(t=Object.getOwnPropertySymbols(x),z=
0;z<t.length;z++)n=t[z],0<=J.indexOf(n)||Object.prototype.propertyIsEnumerable.call(x,n)&&(u[n]=x[n]);return u}f.d(h,{Z:function(){return w}})},7245:function(k,h,f){function w(z,u){if(u&&("object"===(0,x.Z)(u)||"function"==typeof u))return u;if(void 0!==u)throw new TypeError("Derived constructors may only return object or undefined");return(0,J.Z)(z)}f.d(h,{Z:function(){return w}});var x=f(6655),J=f(3173)},5901:function(k,h,f){function w(x,J){return w=Object.setPrototypeOf||function(z,u){return z.__proto__=
u,z},w(x,J)}f.d(h,{Z:function(){return w}})},2577:function(k,h,f){function w(J,z){if(!(J=function(u){if(Array.isArray(u))return u}(J)||function(u,t){var n=null==u?null:"undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(null!=n){var R,ka=[],L=!0,ma=!1;try{for(n=n.call(u);!(L=(R=n.next()).done)&&(ka.push(R.value),!t||ka.length!==t);L=!0);}catch(fa){ma=!0;var Y=fa}finally{try{L||null==n.return||n.return()}finally{if(ma)throw Y;}}return ka}}(J,z)||(0,x.Z)(J,z)))throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
return J}f.d(h,{Z:function(){return w}});var x=f(9139)},1930:function(k,h,f){function w(z){var u=Array.isArray(z)?(0,x.Z)(z):void 0;u||(u="undefined"!=typeof Symbol&&null!=z[Symbol.iterator]||null!=z["@@iterator"]?Array.from(z):void 0);if(!(z=u||(0,J.Z)(z)))throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");return z}f.d(h,{Z:function(){return w}});var x=f(7017),J=f(9139)},6655:function(k,h,f){function w(x){return w=
"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(J){return typeof J}:function(J){return J&&"function"==typeof Symbol&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},w(x)}f.d(h,{Z:function(){return w}})},9139:function(k,h,f){function w(J,z){if(J){if("string"==typeof J)return(0,x.Z)(J,z);var u=Object.prototype.toString.call(J).slice(8,-1);return"Object"===u&&J.constructor&&(u=J.constructor.name),"Map"===u||"Set"===u?Array.from(J):"Arguments"===u||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?
(0,x.Z)(J,z):void 0}}f.d(h,{Z:function(){return w}});var x=f(7017)},5605:function(k,h,f){f.d(h,{x0:function(){return w}});let w=(x=21)=>crypto.getRandomValues(new Uint8Array(x)).reduce((J,z)=>J+(36>(z&=63)?z.toString(36):62>z?(z-26).toString(36).toUpperCase():62<z?"-":"_"),"")},5284:function(k){k.exports=JSON.parse('{"white":"#ffffff","black":"#000000","gray":["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],"red":["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],"pink":["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],"grape":["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],"violet":["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],"indigo":["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],"blue":["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],"cyan":["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],"teal":["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],"green":["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],"lime":["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],"yellow":["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],"orange":["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]}')},
1463:function(k){k.exports=JSON.parse('{"labels":{"paste":"Paste","pasteCharts":"Paste charts","selectAll":"Select all","multiSelect":"Add element to selection","moveCanvas":"Move canvas","cut":"Cut","copy":"Copy","copyAsPng":"Copy to clipboard as PNG","copyAsSvg":"Copy to clipboard as SVG","copyText":"Copy to clipboard as text","bringForward":"Bring forward","sendToBack":"Send to back","bringToFront":"Bring to front","sendBackward":"Send backward","delete":"Delete","copyStyles":"Copy styles","pasteStyles":"Paste styles","stroke":"Stroke","background":"Background","fill":"Fill","strokeWidth":"Stroke width","strokeStyle":"Stroke style","strokeStyle_solid":"Solid","strokeStyle_dashed":"Dashed","strokeStyle_dotted":"Dotted","sloppiness":"Sloppiness","opacity":"Opacity","textAlign":"Text align","edges":"Edges","sharp":"Sharp","round":"Round","arrowheads":"Arrowheads","arrowhead_none":"None","arrowhead_arrow":"Arrow","arrowhead_bar":"Bar","arrowhead_dot":"Dot","arrowhead_triangle":"Triangle","fontSize":"Font size","fontFamily":"Font family","onlySelected":"Only selected","withBackground":"Background","exportEmbedScene":"Embed scene","exportEmbedScene_details":"Scene data will be saved into the exported PNG/SVG file so that the scene can be restored from it.\\nWill increase exported file size.","addWatermark":"Add \\"Made with Excalidraw\\"","handDrawn":"Hand-drawn","normal":"Normal","code":"Code","small":"Small","medium":"Medium","large":"Large","veryLarge":"Very large","solid":"Solid","hachure":"Hachure","crossHatch":"Cross-hatch","thin":"Thin","bold":"Bold","left":"Left","center":"Center","right":"Right","extraBold":"Extra bold","architect":"Architect","artist":"Artist","cartoonist":"Cartoonist","fileTitle":"File name","colorPicker":"Color picker","canvasColors":"Used on canvas","canvasBackground":"Canvas background","drawingCanvas":"Drawing canvas","layers":"Layers","actions":"Actions","language":"Language","liveCollaboration":"Live collaboration","duplicateSelection":"Duplicate","untitled":"Untitled","name":"Name","yourName":"Your name","madeWithExcalidraw":"Made with Excalidraw","group":"Group selection","ungroup":"Ungroup selection","collaborators":"Collaborators","showGrid":"Show grid","addToLibrary":"Add to library","removeFromLibrary":"Remove from library","libraryLoadingMessage":"Loading library…","libraries":"Browse libraries","loadingScene":"Loading scene…","align":"Align","alignTop":"Align top","alignBottom":"Align bottom","alignLeft":"Align left","alignRight":"Align right","centerVertically":"Center vertically","centerHorizontally":"Center horizontally","distributeHorizontally":"Distribute horizontally","distributeVertically":"Distribute vertically","flipHorizontal":"Flip horizontal","flipVertical":"Flip vertical","viewMode":"View mode","toggleExportColorScheme":"Toggle export color scheme","share":"Share","showStroke":"Show stroke color picker","showBackground":"Show background color picker","toggleTheme":"Toggle theme","personalLib":"Personal Library","excalidrawLib":"Excalidraw Library","decreaseFontSize":"Decrease font size","increaseFontSize":"Increase font size","unbindText":"Unbind text","bindText":"Bind text to the container","link":{"edit":"Edit link","create":"Create link","label":"Link"},"elementLock":{"lock":"Lock","unlock":"Unlock","lockAll":"Lock all","unlockAll":"Unlock all"},"statusPublished":"Published","sidebarLock":"Keep sidebar open"},"library":{"noItems":"No items added yet...","hint_emptyLibrary":"Select an item on canvas to add it here, or install a library from the public repository, below.","hint_emptyPrivateLibrary":"Select an item on canvas to add it here."},"buttons":{"clearReset":"Reset the canvas","exportJSON":"Export to file","exportImage":"Save as image","export":"Export","exportToPng":"Export to PNG","exportToSvg":"Export to SVG","copyToClipboard":"Copy to clipboard","copyPngToClipboard":"Copy PNG to clipboard","scale":"Scale","save":"Save to current file","saveAs":"Save as","load":"Load","getShareableLink":"Get shareable link","close":"Close","selectLanguage":"Select language","scrollBackToContent":"Scroll back to content","zoomIn":"Zoom in","zoomOut":"Zoom out","resetZoom":"Reset zoom","menu":"Menu","done":"Done","edit":"Edit","undo":"Undo","redo":"Redo","resetLibrary":"Reset library","createNewRoom":"Create new room","fullScreen":"Full screen","darkMode":"Dark mode","lightMode":"Light mode","zenMode":"Zen mode","exitZenMode":"Exit zen mode","cancel":"Cancel","clear":"Clear","remove":"Remove","publishLibrary":"Publish","submit":"Submit","confirm":"Confirm"},"alerts":{"clearReset":"This will clear the whole canvas. Are you sure?","couldNotCreateShareableLink":"Couldn\'t create shareable link.","couldNotCreateShareableLinkTooBig":"Couldn\'t create shareable link: the scene is too big","couldNotLoadInvalidFile":"Couldn\'t load invalid file","importBackendFailed":"Importing from backend failed.","cannotExportEmptyCanvas":"Cannot export empty canvas.","couldNotCopyToClipboard":"Couldn\'t copy to clipboard.","decryptFailed":"Couldn\'t decrypt data.","uploadedSecurly":"The upload has been secured with end-to-end encryption, which means that Excalidraw server and third parties can\'t read the content.","loadSceneOverridePrompt":"Loading external drawing will replace your existing content. Do you wish to continue?","collabStopOverridePrompt":"Stopping the session will overwrite your previous, locally stored drawing. Are you sure?\\n\\n(If you want to keep your local drawing, simply close the browser tab instead.)","errorAddingToLibrary":"Couldn\'t add item to the library","errorRemovingFromLibrary":"Couldn\'t remove item from the library","confirmAddLibrary":"This will add {{numShapes}} shape(s) to your library. Are you sure?","imageDoesNotContainScene":"This image does not seem to contain any scene data. Have you enabled scene embedding during export?","cannotRestoreFromImage":"Scene couldn\'t be restored from this image file","invalidSceneUrl":"Couldn\'t import scene from the supplied URL. It\'s either malformed, or doesn\'t contain valid Excalidraw JSON data.","resetLibrary":"This will clear your library. Are you sure?","removeItemsFromsLibrary":"Delete {{count}} item(s) from library?","invalidEncryptionKey":"Encryption key must be of 22 characters. Live collaboration is disabled."},"errors":{"unsupportedFileType":"Unsupported file type.","imageInsertError":"Couldn\'t insert image. Try again later...","fileTooBig":"File is too big. Maximum allowed size is {{maxSize}}.","svgImageInsertError":"Couldn\'t insert SVG image. The SVG markup looks invalid.","invalidSVGString":"Invalid SVG.","cannotResolveCollabServer":"Couldn\'t connect to the collab server. Please reload the page and try again.","importLibraryError":"Couldn\'t load library"},"toolBar":{"selection":"Selection","image":"Insert image","rectangle":"Rectangle","diamond":"Diamond","ellipse":"Ellipse","arrow":"Arrow","line":"Line","freedraw":"Draw","text":"Text","library":"Library","lock":"Keep selected tool active after drawing","penMode":"Prevent pinch-zoom and accept freedraw input only from pen","link":"Add/ Update link for a selected shape","eraser":"Eraser"},"headings":{"canvasActions":"Canvas actions","selectedShapeActions":"Selected shape actions","shapes":"Shapes"},"hints":{"canvasPanning":"To move canvas, hold mouse wheel or spacebar while dragging","linearElement":"Click to start multiple points, drag for single line","freeDraw":"Click and drag, release when you\'re finished","text":"Tip: you can also add text by double-clicking anywhere with the selection tool","text_selected":"Double-click or press ENTER to edit text","text_editing":"Press Escape or CtrlOrCmd+ENTER to finish editing","linearElementMulti":"Click on last point or press Escape or Enter to finish","lockAngle":"You can constrain angle by holding SHIFT","resize":"You can constrain proportions by holding SHIFT while resizing,\\nhold ALT to resize from the center","resizeImage":"You can resize freely by holding SHIFT,\\nhold ALT to resize from the center","rotate":"You can constrain angles by holding SHIFT while rotating","lineEditor_info":"Double-click or press Enter to edit points","lineEditor_pointSelected":"Press Delete to remove point(s),\\nCtrlOrCmd+D to duplicate, or drag to move","lineEditor_nothingSelected":"Select a point to edit (hold SHIFT to select multiple),\\nor hold Alt and click to add new points","placeImage":"Click to place the image, or click and drag to set its size manually","publishLibrary":"Publish your own library","bindTextToElement":"Press enter to add text","deepBoxSelect":"Hold CtrlOrCmd to deep select, and to prevent dragging","eraserRevert":"Hold Alt to revert the elements marked for deletion"},"canvasError":{"cannotShowPreview":"Cannot show preview","canvasTooBig":"The canvas may be too big.","canvasTooBigTip":"Tip: try moving the farthest elements a bit closer together."},"errorSplash":{"headingMain_pre":"Encountered an error. Try ","headingMain_button":"reloading the page.","clearCanvasMessage":"If reloading doesn\'t work, try ","clearCanvasMessage_button":"clearing the canvas.","clearCanvasCaveat":" This will result in loss of work ","trackedToSentry_pre":"The error with identifier ","trackedToSentry_post":" was tracked on our system.","openIssueMessage_pre":"We were very cautious not to include your scene information on the error. If your scene is not private, please consider following up on our ","openIssueMessage_button":"bug tracker.","openIssueMessage_post":" Please include information below by copying and pasting into the GitHub issue.","sceneContent":"Scene content:"},"roomDialog":{"desc_intro":"You can invite people to your current scene to collaborate with you.","desc_privacy":"Don\'t worry, the session uses end-to-end encryption, so whatever you draw will stay private. Not even our server will be able to see what you come up with.","button_startSession":"Start session","button_stopSession":"Stop session","desc_inProgressIntro":"Live-collaboration session is now in progress.","desc_shareLink":"Share this link with anyone you want to collaborate with:","desc_exitSession":"Stopping the session will disconnect you from the room, but you\'ll be able to continue working with the scene, locally. Note that this won\'t affect other people, and they\'ll still be able to collaborate on their version.","shareTitle":"Join a live collaboration session on Excalidraw"},"errorDialog":{"title":"Error"},"exportDialog":{"disk_title":"Save to disk","disk_details":"Export the scene data to a file from which you can import later.","disk_button":"Save to file","link_title":"Shareable link","link_details":"Export as a read-only link.","link_button":"Export to Link","excalidrawplus_description":"Save the scene to your Excalidraw+ workspace.","excalidrawplus_button":"Export","excalidrawplus_exportError":"Couldn\'t export to Excalidraw+ at this moment..."},"helpDialog":{"blog":"Read our blog","click":"click","deepSelect":"Deep select","deepBoxSelect":"Deep select within box, and prevent dragging","curvedArrow":"Curved arrow","curvedLine":"Curved line","documentation":"Documentation","doubleClick":"double-click","drag":"drag","editor":"Editor","editSelectedShape":"Edit selected shape (text/arrow/line)","github":"Found an issue? Submit","howto":"Follow our guides","or":"or","preventBinding":"Prevent arrow binding","tools":"Tools","shortcuts":"Keyboard shortcuts","textFinish":"Finish editing (text editor)","textNewLine":"Add new line (text editor)","title":"Help","view":"View","zoomToFit":"Zoom to fit all elements","zoomToSelection":"Zoom to selection","toggleElementLock":"Lock/unlock selection"},"clearCanvasDialog":{"title":"Clear canvas"},"publishDialog":{"title":"Publish library","itemName":"Item name","authorName":"Author name","githubUsername":"GitHub username","twitterUsername":"Twitter username","libraryName":"Library name","libraryDesc":"Library description","website":"Website","placeholder":{"authorName":"Your name or username","libraryName":"Name of your library","libraryDesc":"Description of your library to help people understand its usage","githubHandle":"GitHub handle (optional), so you can edit the library once submitted for review","twitterHandle":"Twitter username (optional), so we know who to credit when promoting over Twitter","website":"Link to your personal website or elsewhere (optional)"},"errors":{"required":"Required","website":"Enter a valid URL"},"noteDescription":{"pre":"Submit your library to be included in the ","link":"public library repository","post":"for other people to use in their drawings."},"noteGuidelines":{"pre":"The library needs to be manually approved first. Please read the ","link":"guidelines","post":" before submitting. You will need a GitHub account to communicate and make changes if requested, but it is not strictly required."},"noteLicense":{"pre":"By submitting, you agree the library will be published under the ","link":"MIT License, ","post":"which in short means anyone can use them without restrictions."},"noteItems":"Each library item must have its own name so it\'s filterable. The following library items will be included:","atleastOneLibItem":"Please select at least one library item to get started","republishWarning":"Note: some of the selected items are marked as already published/submitted. You should only resubmit items when updating an existing library or submission."},"publishSuccessDialog":{"title":"Library submitted","content":"Thank you {{authorName}}. Your library has been submitted for review. You can track the status","link":"here"},"confirmDialog":{"resetLibrary":"Reset library","removeItemsFromLib":"Remove selected items from library"},"encrypted":{"tooltip":"Your drawings are end-to-end encrypted so Excalidraw\'s servers will never see them.","link":"Blog post on end-to-end encryption in Excalidraw"},"stats":{"angle":"Angle","element":"Element","elements":"Elements","height":"Height","scene":"Scene","selected":"Selected","storage":"Storage","title":"Stats for nerds","total":"Total","version":"Version","versionCopy":"Click to copy","versionNotAvailable":"Version not available","width":"Width"},"toast":{"addedToLibrary":"Added to library","copyStyles":"Copied styles.","copyToClipboard":"Copied to clipboard.","copyToClipboardAsPng":"Copied {{exportSelection}} to clipboard as PNG\\n({{exportColorScheme}})","fileSaved":"File saved.","fileSavedToFilename":"Saved to {filename}","canvas":"canvas","selection":"selection"},"colors":{"495057":"Gray 7","ffffff":"White","f8f9fa":"Gray 0","f1f3f5":"Gray 1","fff5f5":"Red 0","fff0f6":"Pink 0","f8f0fc":"Grape 0","f3f0ff":"Violet 0","edf2ff":"Indigo 0","e7f5ff":"Blue 0","e3fafc":"Cyan 0","e6fcf5":"Teal 0","ebfbee":"Green 0","f4fce3":"Lime 0","fff9db":"Yellow 0","fff4e6":"Orange 0","transparent":"Transparent","ced4da":"Gray 4","868e96":"Gray 6","fa5252":"Red 6","e64980":"Pink 6","be4bdb":"Grape 6","7950f2":"Violet 6","4c6ef5":"Indigo 6","228be6":"Blue 6","15aabf":"Cyan 6","12b886":"Teal 6","40c057":"Green 6","82c91e":"Lime 6","fab005":"Yellow 6","fd7e14":"Orange 6","000000":"Black","343a40":"Gray 8","c92a2a":"Red 9","a61e4d":"Pink 9","862e9c":"Grape 9","5f3dc4":"Violet 9","364fc7":"Indigo 9","1864ab":"Blue 9","0b7285":"Cyan 9","087f5b":"Teal 9","2b8a3e":"Green 9","5c940d":"Lime 9","e67700":"Yellow 9","d9480f":"Orange 9"}}')},
4451:function(k){k.exports=JSON.parse('{"ar-SA":92,"bg-BG":58,"bn-BD":0,"ca-ES":95,"cs-CZ":23,"da-DK":34,"de-DE":99,"el-GR":83,"en":100,"es-ES":99,"eu-ES":97,"fa-IR":60,"fi-FI":98,"fr-FR":99,"he-IL":95,"hi-IN":61,"hu-HU":96,"id-ID":99,"it-IT":99,"ja-JP":98,"kab-KAB":93,"kk-KZ":22,"ko-KR":98,"lt-LT":22,"lv-LV":100,"mr-IN":100,"my-MM":44,"nb-NO":100,"nl-NL":87,"nn-NO":96,"oc-FR":99,"pa-IN":89,"pl-PL":89,"pt-BR":96,"pt-PT":80,"ro-RO":100,"ru-RU":100,"si-LK":9,"sk-SK":99,"sl-SI":100,"sv-SE":100,"ta-IN":98,"tr-TR":100,"uk-UA":90,"zh-CN":99,"zh-HK":27,"zh-TW":100}')}},
C={};d.m=B;d.n=function(k){var h=k&&k.__esModule?function(){return k.default}:function(){return k};return d.d(h,{a:h}),h};var a=Object.getPrototypeOf?function(k){return Object.getPrototypeOf(k)}:function(k){return k.__proto__};d.t=function(k,h){if((1&h&&(k=this(k)),8&h)||"object"==typeof k&&k&&(4&h&&k.__esModule||16&h&&"function"==typeof k.then))return k;var f=Object.create(null);d.r(f);var w={};r=r||[null,a({}),a([]),a(a)];for(h=2&h&&k;"object"==typeof h&&!~r.indexOf(h);h=a(h))Object.getOwnPropertyNames(h).forEach(function(x){w[x]=
function(){return k[x]}});return w.default=function(){return k},d.d(f,w),f};d.d=function(k,h){for(var f in h)d.o(h,f)&&!d.o(k,f)&&Object.defineProperty(k,f,{enumerable:!0,get:h[f]})};d.f={};d.e=function(k){return Promise.all(Object.keys(d.f).reduce(function(h,f){return d.f[f](k,h),h},[]))};d.u=function(k){return"excalidraw-assets/"+{22:"locales/kk-KZ-json",24:"locales/nl-NL-json",71:"locales/sl-SI-json",81:"locales/eu-ES-json",82:"locales/de-DE-json",89:"locales/ro-RO-json",91:"locales/ar-SA-json",
124:"locales/ru-RU-json",130:"locales/ca-ES-json",162:"locales/pa-IN-json",204:"locales/ja-JP-json",239:"locales/it-IT-json",265:"locales/cs-CZ-json",302:"locales/si-LK-json",312:"locales/he-IL-json",330:"locales/fa-IR-json",340:"locales/lt-LT-json",359:"locales/nb-NO-json",368:"locales/hu-HU-json",395:"locales/pt-PT-json",397:"locales/mr-IN-json",404:"locales/ta-IN-json",421:"locales/zh-TW-json",429:"locales/bn-BD-json",477:"locales/my-MM-json",512:"locales/fi-FI-json",513:"locales/el-GR-json",534:"locales/sv-SE-json",
551:"locales/kab-KAB-json",579:"locales/uk-UA-json",628:"locales/bg-BG-json",674:"locales/pl-PL-json",680:"locales/zh-CN-json",682:"locales/fr-FR-json",690:"locales/oc-FR-json",721:"locales/pt-BR-json",736:"vendor",750:"locales/sk-SK-json",759:"locales/es-ES-json",768:"locales/lv-LV-json",790:"locales/da-DK-json",808:"locales/id-ID-json",828:"locales/hi-IN-json",844:"locales/ko-KR-json",885:"locales/nn-NO-json",920:"locales/zh-HK-json",977:"locales/tr-TR-json"}[k]+"-"+{22:"256f55e01b7d14c51a85",24:"9e2654c18661c817cad2",
71:"053f1aa5c78d021e73e0",81:"5570769d29eb3be6fea1",82:"e7215ff06fe5513fd875",89:"314bb21d9405881aea46",91:"c45aab1368e1467c61fc",124:"7afc1507267127a4039e",130:"a414efadae57479408aa",162:"fff5fde7b22725f4892b",204:"6ca4d0a0a0da6439e399",239:"97f53316658e3c6e3cc2",265:"a898ae3675b2d66f2491",302:"09768735f21a6d7fe6c0",312:"cf135bd5c36e9008cf4c",330:"5f34cbf7e5dc2a5b6694",340:"d6dce1ea118b023d9b66",359:"a061d909ce3f9c28e569",368:"5f4e84e297b66cee16a9",395:"a5412c6c70653dd832bc",397:"f2dbf75cf336121866d9",
404:"8227d446fbfcd3f8c7be",421:"529b943391afcfd5369d",429:"8522a1ce4e8fbd149dd3",477:"f8ea0cde2df903706156",512:"a58f3fd51d0149157782",513:"648c4e8a33d49e3c8d60",534:"daf16f824ce6bf253b94",551:"ca6c8cc0a4c6ce0394e8",579:"1b9f0b315899af8a00fd",628:"c0c83d33de789fc3ecc3",674:"556a5502303d62e61fc5",680:"a965551d944124b24b25",682:"2649082b2724353b1b7c",690:"36b68175896ab5fd8838",721:"8e000700411ca90b0a50",736:"52b1f3361986b6c6a4fe",750:"93cdc341372014e6d68e",759:"d4c3bba2e07c62d27ff7",768:"8cde5d34d4617c13212c",
790:"3f6008b3d7f477f7c6b4",808:"8e2480705d678b85e0d8",828:"e3c279159830df6b85a7",844:"1c5c18219823218aec95",885:"34324eb373b2c86232e9",920:"76ff37dfc9fb93291975",977:"0a8595289a6099a03252"}[k]+".js"};d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||(new Function("return this"))()}catch(k){if("object"==typeof window)return window}}();d.o=function(k,h){return Object.prototype.hasOwnProperty.call(k,h)};var G={};d.l=function(k,h,f,w){if(G[k])G[k].push(h);else{var x;if(void 0!==
f){w=document.getElementsByTagName("script");for(var J=0;J<w.length;J++){var z=w[J];if(z.getAttribute("src")==k||z.getAttribute("data-webpack")=="ExcalidrawLib:"+f){var u=z;break}}}u||(x=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,d.nc&&u.setAttribute("nonce",d.nc),u.setAttribute("data-webpack","ExcalidrawLib:"+f),u.src=k);G[k]=[h];h=function(n,R){u.onerror=u.onload=null;clearTimeout(t);var ka=G[k];if(delete G[k],u.parentNode&&u.parentNode.removeChild(u),ka&&ka.forEach(function(L){return L(R)}),
n)return n(R)};var t=setTimeout(h.bind(null,void 0,{type:"timeout",target:u}),12E4);u.onerror=h.bind(null,u.onerror);u.onload=h.bind(null,u.onload);x&&document.head.appendChild(u)}};d.r=function(k){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(k,Symbol.toStringTag,{value:"Module"});Object.defineProperty(k,"__esModule",{value:!0})};d.nmd=function(k){return k.paths=[],k.children||(k.children=[]),k};d.p="";(function(){d.b=document.baseURI||self.location.href;var k={388:0};d.f.j=
function(w,x){var J=d.o(k,w)?k[w]:void 0;if(0!==J)if(J)x.push(J[2]);else{var z=new Promise(function(t,n){J=k[w]=[t,n]});x.push(J[2]=z);x=d.p+d.u(w);var u=Error();d.l(x,function(t){if(d.o(k,w)&&(0!==(J=k[w])&&(k[w]=void 0),J)){var n=t&&("load"===t.type?"missing":t.type);t=t&&t.target&&t.target.src;u.message="Loading chunk "+w+" failed.\n("+n+": "+t+")";u.name="ChunkLoadError";u.type=n;u.request=t;J[1](u)}},"chunk-"+w,w)}};var h=function(w,x){var J,z=x[0],u=x[1],t=x[2],n=0;if(z.some(function(R){return 0!==
k[R]})){for(J in u)d.o(u,J)&&(d.m[J]=u[J]);t&&t(d)}for(w&&w(x);n<z.length;n++)w=z[n],d.o(k,w)&&k[w]&&k[w][0](),k[w]=0},f=self.webpackChunkExcalidrawLib=self.webpackChunkExcalidrawLib||[];f.forEach(h.bind(null,0));f.push=h.bind(null,f.push.bind(f))})();var v={};return function(){function k(ea,ca){var pa=Object.keys(ea);if(Object.getOwnPropertySymbols){var za=Object.getOwnPropertySymbols(ea);ca&&(za=za.filter(function(ya){return Object.getOwnPropertyDescriptor(ea,ya).enumerable}));pa.push.apply(pa,
za)}return pa}function h(ea){for(var ca=1;ca<arguments.length;ca++){var pa=null!=arguments[ca]?arguments[ca]:{};ca%2?k(Object(pa),!0).forEach(function(za){J()(ea,za,pa[za])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ea,Object.getOwnPropertyDescriptors(pa)):k(Object(pa)).forEach(function(za){Object.defineProperty(ea,za,Object.getOwnPropertyDescriptor(pa,za))})}return ea}d.r(v);d.d(v,{Excalidraw:function(){return Z},FONT_FAMILY:function(){return f.ut},MIME_TYPES:function(){return f.LO},
THEME:function(){return f.C6},bumpVersion:function(){return P.ZP},defaultLang:function(){return L.Fp},exportToBlob:function(){return D.Fl},exportToCanvas:function(){return D.NL},exportToClipboard:function(){return D.i1},exportToSvg:function(){return D.$D},getFreeDrawSvgPath:function(){return D.N7},getNonDeletedElements:function(){return M.Lm},getSceneVersion:function(){return M.Uo},isInvisiblySmallElement:function(){return M.QD},isLinearElement:function(){return O.bt},languages:function(){return L.Mj},
loadFromBlob:function(){return D.cT},loadLibraryFromBlob:function(){return D.lV},loadSceneOrLibraryFromBlob:function(){return D.ZY},mergeLibraryItems:function(){return D.zh},mutateElement:function(){return P.DR},newElementWith:function(){return P.BE},parseLibraryTokensFromUrl:function(){return ba.Di},restore:function(){return Q.nu},restoreAppState:function(){return Q.lY},restoreElements:function(){return Q.ET},restoreLibraryItems:function(){return Q.wJ},sceneCoordsToViewportCoords:function(){return X._i},
serializeAsJSON:function(){return D.I_},serializeLibraryAsJSON:function(){return D.NI},useHandleLibrary:function(){return ba.xS},viewportCoordsToSceneCoords:function(){return X.dE}});var f=d(8288);"production"!==f.Vi.TEST&&(d.p=window.EXCALIDRAW_ASSET_PATH||"https://unpkg.com/".concat("@excalidraw/excalidraw","@").concat("0.12.0","/dist/"));d(8336);var w=d(6479),x=d.n(w);w=d(9713);var J=d.n(w),z=d(9787);w=d.n(z);var u=d(8950),t=d(2577),n=d(7945),R=d.n(n),ka=d(5440),L=d(8211),ma=d(4512),Y=function(ea){var ca=
(0,z.useState)(!0);ca=(0,t.Z)(ca,2);var pa=ca[0],za=ca[1];return(0,z.useEffect)(function(){var ya=function(){var Ua=(0,u.Z)(R().mark(function Oa(){return R().wrap(function(Za){for(;;)switch(Za.prev=Za.next){case 0:return Za.next=2,(0,L.m0)(Ha);case 2:za(!1);case 3:case "end":return Za.stop()}},Oa)}));return function(){return Ua.apply(this,arguments)}}(),Ha=L.Mj.find(function(Ua){return Ua.code===ea.langCode})||L.Fp;ya()},[ea.langCode]),pa?(0,ma.jsx)(ka.z,{}):ea.children},fa=d(9660),H=(d(4285),d(3313),
d(4739)),aa=d(9487),M=d(5118),Q=d(679),D=d(3024),O=d(1974),P=d(1935),ba=d(7053),X=d(6340),F=["initialData","UIOptions"],ha=["initialData","UIOptions"],K=function(ea){var ca,pa,za,ya=ea.onChange,Ha=ea.initialData,Ua=ea.excalidrawRef,Ea=ea.onCollabButtonClick,Oa=ea.isCollaborating;Oa=void 0!==Oa&&Oa;var Za=ea.onPointerUpdate,Ma=ea.renderTopRightUI,fb=ea.renderFooter,eb=ea.langCode;eb=void 0===eb?L.Fp.code:eb;var Na=ea.viewModeEnabled,oa=ea.zenModeEnabled,Ca=ea.gridModeEnabled,ra=ea.libraryReturnUrl,
Aa=ea.theme,Ja=ea.name,Sa=ea.renderCustomStats,Bb=ea.onPaste,ib=ea.detectScroll;ib=void 0===ib||ib;var Ob=ea.handleKeyboardGlobally;Ob=void 0!==Ob&&Ob;var Wb=ea.onLibraryChange,ic=ea.autoFocus;ic=void 0!==ic&&ic;var Pa=ea.generateIdForFile,nb=ea.onLinkOpen,ob=ea.onPointerDown,Zb=ea.onScrollChange,Jc=null===(ca=ea.UIOptions)||void 0===ca?void 0:ca.canvasActions;ea=h(h({},ea.UIOptions),{},{canvasActions:h(h({},f.cW.canvasActions),Jc)});null!=Jc&&Jc.export&&(ea.canvasActions.export.saveFileToDisk=null!==
(pa=null===(za=Jc.export)||void 0===za?void 0:za.saveFileToDisk)&&void 0!==pa?pa:f.cW.canvasActions.export.saveFileToDisk);return(0,z.useEffect)(function(){var ad=function(Nc){"number"==typeof Nc.scale&&1!==Nc.scale&&Nc.preventDefault()};return document.addEventListener("touchmove",ad,{passive:!1}),function(){document.removeEventListener("touchmove",ad)}},[]),(0,ma.jsx)(Y,{langCode:eb,children:(0,ma.jsx)(H.zt,{unstable_createStore:function(){return aa.e_},scope:aa.yE,children:(0,ma.jsx)(fa.ZP,{onChange:ya,
initialData:Ha,excalidrawRef:Ua,onCollabButtonClick:Ea,isCollaborating:Oa,onPointerUpdate:Za,renderTopRightUI:Ma,renderFooter:fb,langCode:eb,viewModeEnabled:Na,zenModeEnabled:oa,gridModeEnabled:Ca,libraryReturnUrl:ra,theme:Aa,name:Ja,renderCustomStats:Sa,UIOptions:ea,onPaste:Bb,detectScroll:ib,handleKeyboardGlobally:Ob,onLibraryChange:Wb,autoFocus:ic,generateIdForFile:Pa,onLinkOpen:nb,onPointerDown:ob,onScrollChange:Zb})})})};n=(0,z.forwardRef)(function(ea,ca){return(0,ma.jsx)(K,h(h({},ea),{},{excalidrawRef:ca}))});
var Z=w().memo(n,function(ea,ca){ea.initialData;var pa=ea.UIOptions,za=void 0===pa?{}:pa,ya=x()(ea,F);pa=(ca.initialData,ca.UIOptions);var Ha=void 0===pa?{}:pa,Ua=x()(ca,ha);pa=Object.keys(za);var Ea=Object.keys(Ha);if(pa.length!==Ea.length)return!1;pa=pa.every(function(Oa){"canvasActions"===Oa&&Object.keys(za.canvasActions).every(function(Za){var Ma,fb,eb,Na;return"export"===Za&&null!=za&&null!==(Ma=za.canvasActions)&&void 0!==Ma&&Ma.export&&null!=Ha&&null!==(fb=Ha.canvasActions)&&void 0!==fb&&fb.export?
za.canvasActions.export.saveFileToDisk===Ha.canvasActions.export.saveFileToDisk:(null==za||null===(eb=za.canvasActions)||void 0===eb?void 0:eb[Za])===(null==Ha||null===(Na=Ha.canvasActions)||void 0===Na?void 0:Na[Za])});return!0});ea=Object.keys(ea);ca=Object.keys(ca);return pa&&ea.length===ca.length&&ea.every(function(Oa){return ya[Oa]===Ua[Oa]})})}(),v}()})};
'use strict';var B6c=function(a,b){var c=$APP.Hy();$APP.n(c)&&$APP.Xs($APP.Uib(c,a),function(d){return b.C?b.C(d):b.call(null,d)},function(d){return $APP.rl.G($APP.E(["Error loading ",a,": ",d]))})},D6c=function(a){var b=$APP.Fs(a);if($APP.n(b)){for(b=b.querySelector(".draw-wrap");;){if(null!=b&&void 0!==b&&void 0!==b.classList)if($APP.n(b.classList.contains("block-content")))b=b.clientWidth,$APP.Yf(C6c.C(a),b);else{b=b.parentNode;continue}break}return a}return null},E6c=new $APP.N(null,"view-mode-enabled",
"view-mode-enabled",-588220561),F6c=new $APP.N("frontend.extensions.excalidraw","grid-mode?","frontend.extensions.excalidraw/grid-mode?",-1189627787),G6c=new $APP.N(null,"grid-mode-enabled","grid-mode-enabled",584978327),H6c=new $APP.N("frontend.extensions.excalidraw","elements","frontend.extensions.excalidraw/elements",1745667967),I6c=new $APP.N("frontend.extensions.excalidraw","resize-observer","frontend.extensions.excalidraw/resize-observer",1997499684),J6c=new $APP.N("frontend.extensions.excalidraw",
"data","frontend.extensions.excalidraw/data",-1371036113),K6c=new $APP.N(null,"zen-mode-enabled","zen-mode-enabled",-955634269),L6c=new $APP.N("frontend.extensions.excalidraw","zen-mode?","frontend.extensions.excalidraw/zen-mode?",1559773511),C6c=new $APP.N("frontend.extensions.excalidraw","draw-width","frontend.extensions.excalidraw/draw-width",-681100043),M6c=new $APP.N("frontend.extensions.excalidraw","view-mode?","frontend.extensions.excalidraw/view-mode?",525380621),N6c=new $APP.N("frontend.extensions.excalidraw",
"loading?","frontend.extensions.excalidraw/loading?",-1335058663),O6c=new $APP.N(null,"initial-data","initial-data",-1315709804);$APP.ida("excalidraw");var P6c=$APP.bn(583);var Q6c,R6c,S6c;$APP.YWc={};Q6c=$APP.QR(P6c.Excalidraw);
R6c=$APP.xs($APP.Cs,function(a,b,c){var d=$APP.H.j(a,C6c),e=$APP.H.j(a,L6c),f=$APP.H.j(a,M6c),g=$APP.H.j(a,F6c),h=$APP.Sy($APP.t7a),l=$APP.H.j(a,H6c);a=$APP.Gf(c);var p=$APP.H.j(a,$APP.Oq),q=$APP.H.j(a,$APP.CQ);return $APP.n(b)?$APP.W("div",{onMouseDown:function(r){return $APP.ft(r)},className:"overflow-hidden"},[$APP.W("div",{style:{fontSize:10},className:"my-1"},[$APP.W("a",{onClick:$APP.u7a,className:"mr-2"},[$APP.ks($APP.Vs("Wide Mode (%s)",$APP.E([$APP.n(h)?"ON":"OFF"])))]),$APP.W("a",{onClick:function(){return $APP.gi.j(e,
$APP.Xb)},className:"mr-2"},[$APP.ks($APP.Vs("Zen Mode (%s)",$APP.E([$APP.n($APP.u(e))?"ON":"OFF"])))]),$APP.W("a",{onClick:function(){return $APP.gi.j(f,$APP.Xb)},className:"mr-2"},[$APP.ks($APP.Vs("View Mode (%s)",$APP.E([$APP.n($APP.u(f))?"ON":"OFF"])))]),$APP.W("a",{onClick:function(){return $APP.gi.j(g,$APP.Xb)},className:"mr-2"},[$APP.ks($APP.Vs("Grid Mode (%s)",$APP.E([$APP.n($APP.u(g))?"ON":"OFF"])))]),$APP.W("a",{onClick:function(){var r=new $APP.O(null,2,5,$APP.Q,[$APP.Kz,q],null);r=$APP.LB?
$APP.LB(r):$APP.NB.call(null,r);return $APP.n(r)?$APP.vQ(0,null):null},className:"mr-2"},["Edit Block"])]),$APP.W("div",{onMouseDown:function(r){$APP.ft(r);return $APP.Ky($APP.u2,!0)},onBlur:function(){return $APP.Ky($APP.u2,!1)},style:{width:$APP.u(d),height:$APP.n(h)?650:500},className:"draw-wrap"},[$APP.ks(function(){var r=$APP.Cm.G($APP.E([new $APP.m(null,6,[$APP.ZR,function(v,y){if($APP.n(function(){var F=$APP.C.j("down",$APP.za(y,"cursorButton"));if(F)return F;F=$APP.za(y,"draggingElement");
if($APP.n(F))return F;F=$APP.za(y,"editingElement");if($APP.n(F))return F;F=$APP.za(y,"editingGroupId");return $APP.n(F)?F:$APP.za(y,"editingLinearElement")}()))return null;var z=$APP.nj(v);return $APP.x(z)&&$APP.qh.j(z,$APP.u(l))?($APP.Yf(l,z),$APP.qmb(p,P6c.serializeAsJSON(v,y))):null},K6c,$APP.u(e),E6c,$APP.u(f),G6c,$APP.u(g),O6c,b,$APP.zA,$APP.Sy($APP.Nz)],null)]));return Q6c.C?Q6c.C(r):Q6c.call(null,r)}())])]):null},new $APP.O(null,8,5,$APP.Q,[$APP.N7,$APP.Gs(800,C6c),$APP.Gs(!0,L6c),$APP.Gs(!1,
M6c),$APP.Gs(!1,F6c),$APP.Gs(null,H6c),$APP.Gs(null,I6c),new $APP.m(null,3,[$APP.ts,function(a){$APP.Yf(I6c.C(a),new ResizeObserver($APP.Ia(function(){return $APP.Yf(C6c.C(a),0)},300)));$APP.u(I6c.C(a)).observe($APP.HBb());return D6c(a)},$APP.us,D6c,$APP.vs,function(a){return $APP.u(I6c.C(a)).disconnect()}],null)],null),"frontend.extensions.excalidraw/draw-inner");
S6c=$APP.xs($APP.Cs,function(a,b){var c=$APP.H.j(a,J6c);a=$APP.H.j(a,N6c);a=$APP.Is(a);c=$APP.Is(c);var d=$APP.Sy($APP.txb);return $APP.n($APP.Oq.C(b))?$APP.n(d)?(b=$APP.bS("Loading"),$APP.W("div",$APP.Td(b)?$APP.js($APP.gs($APP.E([new $APP.m(null,1,[$APP.ds,new $APP.O(null,1,5,$APP.Q,["ls-center"],null)],null),b]))):{className:"ls-center"},$APP.Td(b)?null:[$APP.ks(b)])):!1===a?R6c(c,b):null:null},new $APP.O(null,2,5,$APP.Q,[$APP.N7,new $APP.m(null,1,[$APP.rs,function(a){var b=$APP.zs.C(a);b=$APP.D.F(b,
0,null);b=$APP.Oq.C(b);var c=$APP.fi.C(null),d=$APP.fi.C(!0);$APP.n(b)&&B6c(b,function(e){if($APP.Dk(e))var f=null;else try{f=JSON.parse(e)}catch(g){e=g,$APP.rl.G($APP.E(["from json error:"])),console.dir(e),f=$APP.Xm($APP.Aya("Could not load this invalid excalidraw file"),$APP.ru)}$APP.Yf(c,f);return $APP.Yf(d,!1)});return $APP.R.G(a,J6c,c,$APP.E([N6c,d]))}],null)],null),"frontend.extensions.excalidraw/draw-container");
$APP.ZWc=$APP.xs($APP.Bs,function(a){var b=$APP.Hy(),c=$APP.Sy(new $APP.O(null,2,5,$APP.Q,[$APP.I2a,b],null));return $APP.OA(b)&&$APP.Xb(c)&&$APP.Xb((0,$APP.lt)())&&$APP.Xb($APP.fr())?null:S6c(a)},new $APP.O(null,1,5,$APP.Q,[$APP.N7],null),"frontend.extensions.excalidraw/draw");$APP.fb.Gi();
}).call(this);