@excalidraw/excalidraw 0.17.1-f597bd3 → 0.17.1-f59b4f6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/dev/excalidraw-assets-dev/{chunk-R7HUEHN5.js → chunk-O74FSJNG.js} +77 -49
- package/dist/browser/dev/excalidraw-assets-dev/{chunk-R7HUEHN5.js.map → chunk-O74FSJNG.js.map} +2 -2
- package/dist/browser/dev/excalidraw-assets-dev/{image-CAYW6EUH.js → image-F7EVY5ZQ.js} +2 -2
- package/dist/browser/dev/index.js +4 -3
- package/dist/browser/dev/index.js.map +2 -2
- package/dist/browser/prod/excalidraw-assets/chunk-UVJNWDMS.js +55 -0
- package/dist/browser/prod/excalidraw-assets/image-BSC5ABC2.js +1 -0
- package/dist/browser/prod/index.js +4 -4
- package/dist/dev/index.js +78 -47
- package/dist/dev/index.js.map +2 -2
- package/dist/excalidraw/components/App.js +2 -2
- package/dist/excalidraw/data/url.d.ts +1 -0
- package/dist/excalidraw/data/url.js +4 -1
- package/dist/excalidraw/element/embeddable.js +27 -45
- package/dist/excalidraw/element/types.d.ts +3 -0
- package/dist/excalidraw/renderer/staticScene.js +14 -3
- package/dist/excalidraw/renderer/staticSvgScene.js +10 -0
- package/dist/prod/index.js +26 -26
- package/dist/utils/geometry/shape.d.ts +2 -2
- package/dist/utils/geometry/shape.js +8 -2
- package/package.json +1 -1
- package/dist/browser/prod/excalidraw-assets/chunk-6VLWGOPS.js +0 -55
- package/dist/browser/prod/excalidraw-assets/image-2PF7RELG.js +0 -1
- /package/dist/browser/dev/excalidraw-assets-dev/{image-CAYW6EUH.js.map → image-F7EVY5ZQ.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as f1,$a as ac,$b as Z1,$c as cb,$d as qn,$e as Pl,$f as y0,A as nn,Aa as T1,Ab as cn,Ac as J1,Ad as yb,Ae as Al,Af as d0,Ag as Be,B as Wn,Ba as S1,Bb as Ht,Bc as Cl,Bd as Eb,Be as rp,Bf as hn,Bg as L0,C as al,Ca as k1,Cb as Zn,Cc as Tl,Cd as Xn,Ce as Nb,Cf as m0,Cg as ei,D as Au,Da as Ou,Db as Oi,Dc as Yu,Dd as Br,De as Ob,Df as Ji,Dg as Hr,E as js,Ea as ln,Eb as le,Ec as Q1,Ed as wc,Ee as Fb,Ef as u0,Eg as $r,F as ll,Fa as I1,Fb as Uu,Fc as hc,Fd as wb,Fe as np,Ff as Bc,G as he,Ga as M1,Gb as gl,Gc as Wi,Gd as Cb,Ge as Pc,Gf as p0,H as Ko,Ha as _1,Hb as Ee,Hc as Zu,Hd as $,He as ip,Hf as zc,I as _r,Ia as Co,Ib as Ne,Ic as ue,Id as Io,Ie as ap,If as Hc,J as Ri,Ja as Fu,Jb as mr,Jc as eb,Jd as Oe,Je as Bb,Jf as f0,K as n1,Ka as Zo,Kb as $1,Kc as Sl,Kd as Tb,Ke as zb,Kf as $c,L as Lu,La as dl,Lb as Lr,Lc as tb,Ld as jo,Le as Hb,Lf as pr,M as Pu,Ma as nc,Mb as U1,Mc as ob,Md as pn,Me as $b,Mf as mp,N as sl,Na as Vn,Nb as Pr,Nc as kl,Nd as Xu,Ne as Ub,Nf as h0,O as i1,Oa as A1,Ob as W1,Oc as $t,Od as Sb,Oe as Wb,Of as Uc,P as a1,Pa as L1,Pb as ur,Pc as gc,Pd as Cc,Pe as Gb,Pf as g0,Q as Ar,Qa as Kn,Qb as bt,Qc as bc,Qd as Il,Qe as Vb,Qf as b0,R as l1,Ra as nt,Rb as Fi,Rc as xc,Rd as fn,Re as Kb,Rf as C6,S as Pt,Sa as N,Sb as G1,Sc as rb,Sd as kb,Se as Yb,Sf as Mo,T as Xs,Ta as Ke,Tb as V1,Tc as nb,Td as Ib,Te as lp,Tf as oe,U as s1,Ua as Jt,Ub as K1,Uc as ib,Ud as Mb,Ue as Ll,Uf as me,V as c1,Va as ml,Vb as dn,Vc as ab,Vd as Ml,Ve as Rc,Vf as up,W as d1,Wa as ul,Wb as Bi,Wc as lb,Wd as Tc,We as Zb,Wf as Qn,X as m1,Xa as ic,Xb as Y1,Xc as sb,Xd as Yi,Xe as jb,Xf as Dl,Y as u1,Ya as Bu,Yb as po,Yc as st,Yd as Sc,Ye as Xb,Yf as pp,Z as p1,Za as zu,Zb as zi,Zc as Dr,Zd as kc,Ze as qb,Zf as x0,_ as Gn,_a as Yn,_b as To,_c as vc,_d as qu,_e as Dc,_f as v0,a as It,aa as h1,ab as P1,ac as Rr,ad as db,ae as _b,af as Jb,ag as E0,b as Zg,ba as g1,bb as R1,bc as mn,bd as mb,be as Zi,bf as Qb,bg as w0,c as $n,ca as qs,cb as D1,cc as bl,cd as ub,ce as ji,cf as e0,cg as Wc,d as jg,da as Js,db as xe,dc as Qt,dd as Gi,de as Ic,df as t0,dg as fp,e as Xg,ea as Ru,eb as N1,ec as j1,ed as ju,ee as Ju,ef as o0,eg as hp,f as Ir,fa as b1,fb as lc,fc as xl,fd as pb,fe as Qu,ff as Nc,fg as gp,g as Gs,ga as x1,gb as O1,gc as vl,gd as fb,ge as x6,gf as r0,gg as C0,h as Vs,ha as v1,hb as sc,hc as un,hd as Nr,he as ep,hf as n0,hg as T0,i as Ks,ia as y1,ib as Di,ic as yl,id as Ut,ie as _l,if as sp,ig as S0,j as qg,ja as E1,jb as F1,jc as Wu,jd as Ye,jf as Xi,jg as k0,k as Jg,ka as Qs,kb as Ni,kc as Gu,kd as yc,kf as i0,kg as I0,l as Qg,la as an,lb as pl,lc as Vu,ld as So,lf as a0,lg as M0,m as Vo,ma as w1,mb as Rt,mc as Hi,md as b6,mf as l0,mg as bp,n as Ys,na as Du,nb as sn,nc as X1,nd as Vi,nf as Oc,ng as Qi,o as Mr,oa as C1,ob as cc,oc as pe,od as ko,oe as Ab,of as s0,og as T6,p as e1,pa as ec,pb as B1,pc as T,pd as Or,pe as Lb,pf as qi,pg as xp,q as t1,qa as Nu,qb as Hu,qc as $i,qd as hb,qe as Mc,qf as Jn,qg as vp,r as nl,ra as yo,rb as dr,rc as uc,rd as Dt,re as _c,rf as cp,rg as ve,s as il,sa as cl,sb as $u,sc as Ui,sd as Ec,se as tp,sf as Rl,sg as yp,t as Un,ta as Eo,tb as dc,tc as pc,td as gb,te as Ac,tf as v6,tg as ea,u as Zs,ua as tc,ub as it,uc as q1,ud as Fr,ue as Pb,uf as y6,ug as _0,v as o1,va as oc,vb as z1,vc as jn,vd as bb,ve as op,vf as E6,vg as Ep,w as Mu,wa as Yo,wb as H1,wc as fc,wd as xb,we as zr,wf as w6,wg as Fe,x as r1,xa as rc,xb as mc,xc as El,xd as Ki,xe as Rb,xf as Fc,xg as A0,y as _u,ya as ut,yb as fl,yc as wl,yd as pt,ye as Lc,yf as c0,yg as ye,z as De,za as wo,zb as hl,zc as Ku,zd as vb,ze as Db,zf as dp,zg as ta}from"./excalidraw-assets/chunk-6VLWGOPS.js";import{a as h,b as E}from"./excalidraw-assets/chunk-M2JW2GFW.js";import{E as Iu}from"./excalidraw-assets/chunk-SK23VHAR.js";import{aa as Yg}from"./excalidraw-assets/chunk-V55EI3XA.js";import{b as Vg,d as cr,e as Kg,f as v}from"./excalidraw-assets/chunk-SXMPUQ6M.js";var H=cr((MI,P0)=>{h();P0.exports=React});var $0=cr(Qc=>{"use strict";h();var N6=H(),O6=Symbol.for("react.element"),F6=Symbol.for("react.fragment"),B6=Object.prototype.hasOwnProperty,z6=N6.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,H6={key:!0,ref:!0,__self:!0,__source:!0};function H0(t,e,o){var r,n={},i=null,a=null;o!==void 0&&(i=""+o),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(a=e.ref);for(r in e)B6.call(e,r)&&!H6.hasOwnProperty(r)&&(n[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)n[r]===void 0&&(n[r]=e[r]);return{$$typeof:O6,type:t,key:i,ref:a,props:n,_owner:z6.current}}Qc.Fragment=F6;Qc.jsx=H0;Qc.jsxs=H0});var k=cr((JI,U0)=>{"use strict";h();U0.exports=$0()});var hr=cr((b8,Y0)=>{h();Y0.exports=ReactDOM});var kh=cr((kW,nw)=>{h();var rw="Expected a function",tw=NaN,RT="[object Symbol]",DT=/^\s+|\s+$/g,NT=/^[-+]0x[0-9a-f]+$/i,OT=/^0b[01]+$/i,FT=/^0o[0-7]+$/i,BT=parseInt,zT=typeof global=="object"&&global&&global.Object===Object&&global,HT=typeof self=="object"&&self&&self.Object===Object&&self,$T=zT||HT||Function("return this")(),UT=Object.prototype,WT=UT.toString,GT=Math.max,VT=Math.min,Sh=function(){return $T.Date.now()};function KT(t,e,o){var r,n,i,a,l,s,c=0,d=!1,m=!1,p=!0;if(typeof t!="function")throw new TypeError(rw);e=ow(e)||0,Cm(o)&&(d=!!o.leading,m="maxWait"in o,i=m?GT(ow(o.maxWait)||0,e):i,p="trailing"in o?!!o.trailing:p);function f(I){var _=r,A=n;return r=n=void 0,c=I,a=t.apply(A,_),a}function b(I){return c=I,l=setTimeout(S,e),d?f(I):a}function x(I){var _=I-s,A=I-c,U=e-_;return m?VT(U,i-A):U}function y(I){var _=I-s,A=I-c;return s===void 0||_>=e||_<0||m&&A>=i}function S(){var I=Sh();if(y(I))return C(I);l=setTimeout(S,x(I))}function C(I){return l=void 0,p&&r?f(I):(r=n=void 0,a)}function w(){l!==void 0&&clearTimeout(l),c=0,r=s=n=l=void 0}function M(){return l===void 0?a:C(Sh())}function B(){var I=Sh(),_=y(I);if(r=arguments,n=this,s=I,_){if(l===void 0)return b(s);if(m)return l=setTimeout(S,e),f(s)}return l===void 0&&(l=setTimeout(S,e)),a}return B.cancel=w,B.flush=M,B}function YT(t,e,o){var r=!0,n=!0;if(typeof t!="function")throw new TypeError(rw);return Cm(o)&&(r="leading"in o?!!o.leading:r,n="trailing"in o?!!o.trailing:n),KT(t,e,{leading:r,maxWait:e,trailing:n})}function Cm(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function ZT(t){return!!t&&typeof t=="object"}function jT(t){return typeof t=="symbol"||ZT(t)&&WT.call(t)==RT}function ow(t){if(typeof t=="number")return t;if(jT(t))return tw;if(Cm(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Cm(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(DT,"");var o=OT.test(t);return o||FT.test(t)?BT(t.slice(2),o?2:8):NT.test(t)?tw:+t}nw.exports=YT});var pw=cr((mw,uw)=>{h();(function(){var t=this,e={};typeof mw<"u"?uw.exports=e:t.fuzzy=e,e.simpleFilter=function(o,r){return r.filter(function(n){return e.test(o,n)})},e.test=function(o,r){return e.match(o,r)!==null},e.match=function(o,r,n){n=n||{};var i=0,a=[],l=r.length,s=0,c=0,d=n.pre||"",m=n.post||"",p=n.caseSensitive&&r||r.toLowerCase(),f;o=n.caseSensitive&&o||o.toLowerCase();for(var b=0;b<l;b++)f=r[b],p[b]===o[i]?(f=d+f+m,i+=1,c+=1+c):c=0,s+=c,a[a.length]=f;return i===o.length?(s=p===o?1/0:s,{rendered:a.join(""),score:s}):null},e.filter=function(o,r,n){return!r||r.length===0?[]:typeof o!="string"?r:(n=n||{},r.reduce(function(i,a,l,s){var c=a;n.extract&&(c=n.extract(a));var d=e.match(o,c,n);return d!=null&&(i[i.length]={string:d.rendered,score:d.score,index:l,original:a}),i},[]).sort(function(i,a){var l=a.score-i.score;return l||i.index-a.index}))}})()});var vw=cr(xw=>{"use strict";h();var Va=H();function mS(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var uS=typeof Object.is=="function"?Object.is:mS,pS=Va.useState,fS=Va.useEffect,hS=Va.useLayoutEffect,gS=Va.useDebugValue;function bS(t,e){var o=e(),r=pS({inst:{value:o,getSnapshot:e}}),n=r[0].inst,i=r[1];return hS(function(){n.value=o,n.getSnapshot=e,_h(n)&&i({inst:n})},[t,o,e]),fS(function(){return _h(n)&&i({inst:n}),t(function(){_h(n)&&i({inst:n})})},[t]),gS(o),o}function _h(t){var e=t.getSnapshot;t=t.value;try{var o=e();return!uS(t,o)}catch{return!0}}function xS(t,e){return e()}var vS=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?xS:bS;xw.useSyncExternalStore=Va.useSyncExternalStore!==void 0?Va.useSyncExternalStore:vS});var Ew=cr((fV,yw)=>{"use strict";h();yw.exports=vw()});var Cw=cr(ww=>{"use strict";h();var km=H(),yS=Ew();function ES(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var wS=typeof Object.is=="function"?Object.is:ES,CS=yS.useSyncExternalStore,TS=km.useRef,SS=km.useEffect,kS=km.useMemo,IS=km.useDebugValue;ww.useSyncExternalStoreWithSelector=function(t,e,o,r,n){var i=TS(null);if(i.current===null){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=kS(function(){function s(f){if(!c){if(c=!0,d=f,f=r(f),n!==void 0&&a.hasValue){var b=a.value;if(n(b,f))return m=b}return m=f}if(b=m,wS(d,f))return b;var x=r(f);return n!==void 0&&n(b,x)?b:(d=f,m=x)}var c=!1,d,m,p=o===void 0?null:o;return[function(){return s(e())},p===null?void 0:function(){return s(p())}]},[e,o,r,n]);var l=CS(t,i[0],i[1]);return SS(function(){a.hasValue=!0,a.value=l},[l]),IS(l),l}});var Sw=cr((xV,Tw)=>{"use strict";h();Tw.exports=Cw()});h();var ku=v(H(),1);h();var rd=v(H(),1);h();h();h();h();var ft=v(H(),1);h();var S6=0;function R0(t,e){let o=`atom${++S6}`,r={toString:()=>o};return typeof t=="function"?r.read=t:(r.init=t,r.read=n=>n(r),r.write=(n,i,a)=>i(r,typeof a=="function"?a(n(r)):a)),e&&(r.write=e),r}var gn=Symbol(),Cp=t=>!!t[gn],Gc=t=>!t[gn].c,Nl=t=>{var e;let{b:o,c:r}=t[gn];r&&(r(),(e=I6.get(o))==null||e())},Kc=(t,e)=>{let o=t[gn].o,r=e[gn].o;return o===r||t===r||Cp(o)&&Kc(o,e)},Tp=(t,e)=>{let o={b:t,o:e,c:null},r=new Promise(n=>{o.c=()=>{o.c=null,n()},e.finally(o.c)});return r[gn]=o,r},k6=t=>Tp(t[gn].b,t[gn].o),I6=new WeakMap;var Vc=t=>"init"in t,Ol="r",Yc="w",Fl="c",Zc="s",D0="h",M6="n",_6="l",A6="a",L6="m",N0=t=>{let e=new WeakMap,o=new WeakMap,r=new Map,n,i;if((E&&E.MODE)!=="production"&&(n=new Set,i=new Set),t)for(let[P,D]of t){let V={v:D,r:0,y:!0,d:new Map};(E&&E.MODE)!=="production"&&(Object.freeze(V),Vc(P)||console.warn("Found initial value for derived atom which can cause unexpected behavior",P)),e.set(P,V)}let a=new WeakMap,l=(P,D,V)=>{let K=a.get(D);K||(K=new Map,a.set(D,K)),V.then(()=>{K.get(P)===V&&(K.delete(P),K.size||a.delete(D))}),K.set(P,V)},s=P=>{let D=new Set,V=a.get(P);return V&&(a.delete(P),V.forEach((K,Y)=>{Nl(K),D.add(Y)})),D},c=new WeakMap,d=P=>{let D=c.get(P);return D||(D=new Map,c.set(P,D)),D},m=(P,D)=>{if(P){let V=d(P),K=V.get(D);return K||(K=m(P.p,D),K&&"p"in K&&Gc(K.p)&&(K=void 0),K&&V.set(D,K)),K}return e.get(D)},p=(P,D,V)=>{if((E&&E.MODE)!=="production"&&Object.freeze(V),P)d(P).set(D,V);else{let K=e.get(D);e.set(D,V),r.has(D)||r.set(D,K)}},f=(P,D=new Map,V)=>{if(!V)return D;let K=new Map,Y=!1;return V.forEach(j=>{var J;let re=((J=m(P,j))==null?void 0:J.r)||0;K.set(j,re),D.get(j)!==re&&(Y=!0)}),D.size===K.size&&!Y?D:K},b=(P,D,V,K,Y)=>{let j=m(P,D);if(j){if(Y&&(!("p"in j)||!Kc(j.p,Y)))return j;"p"in j&&Nl(j.p)}let J={v:V,r:j?.r||0,y:!0,d:f(P,j?.d,K)},re=!j?.y;return!j||!("v"in j)||!Object.is(j.v,V)?(re=!0,++J.r,J.d.has(D)&&(J.d=new Map(J.d).set(D,J.r))):J.d!==j.d&&(J.d.size!==j.d.size||!Array.from(J.d.keys()).every(ot=>j.d.has(ot)))&&(re=!0,Promise.resolve().then(()=>{te(P)})),j&&!re?j:(p(P,D,J),J)},x=(P,D,V,K,Y)=>{let j=m(P,D);if(j){if(Y&&(!("p"in j)||!Kc(j.p,Y)))return j;"p"in j&&Nl(j.p)}let J={e:V,r:(j?.r||0)+1,y:!0,d:f(P,j?.d,K)};return p(P,D,J),J},y=(P,D,V,K)=>{let Y=m(P,D);if(Y&&"p"in Y){if(Kc(Y.p,V)&&!Gc(Y.p))return Y.y?Y:{...Y,y:!0};Nl(Y.p)}l(P,D,V);let j={p:V,r:(Y?.r||0)+1,y:!0,d:f(P,Y?.d,K)};return p(P,D,j),j},S=(P,D,V,K)=>{if(V instanceof Promise){let Y=Tp(V,V.then(j=>{b(P,D,j,K,Y)}).catch(j=>{if(j instanceof Promise)return Cp(j)?j.then(()=>{w(P,D,!0)}):j;x(P,D,j,K,Y)}));return y(P,D,Y,K)}return b(P,D,V,K)},C=(P,D)=>{let V=m(P,D);if(V){let K={...V,y:!1};p(P,D,K)}else(E&&E.MODE)!=="production"&&console.warn("[Bug] could not invalidate non existing atom",D)},w=(P,D,V)=>{if(!V){let Y=m(P,D);if(Y){if(Y.y&&"p"in Y&&!Gc(Y.p))return Y;if(Y.d.forEach((j,J)=>{if(J!==D)if(!o.has(J))w(P,J);else{let re=m(P,J);re&&!re.y&&w(P,J)}}),Array.from(Y.d).every(([j,J])=>{let re=m(P,j);return re&&!("p"in re)&&re.r===J}))return Y.y?Y:{...Y,y:!0}}}let K=new Set;try{let Y=D.read(j=>{K.add(j);let J=j===D?m(P,j):w(P,j);if(J){if("e"in J)throw J.e;if("p"in J)throw J.p;return J.v}if(Vc(j))return j.init;throw new Error("no atom init")});return S(P,D,Y,K)}catch(Y){if(Y instanceof Promise){let j=Cp(Y)&&Gc(Y)?k6(Y):Tp(Y,Y);return y(P,D,j,K)}return x(P,D,Y,K)}},M=(P,D)=>w(D,P),B=(P,D)=>{let V=o.get(D);return V||(V=O(P,D)),V},I=(P,D)=>!D.l.size&&(!D.t.size||D.t.size===1&&D.t.has(P)),_=(P,D)=>{let V=o.get(D);V&&I(D,V)&&F(P,D)},A=(P,D)=>{let V=o.get(D);V?.t.forEach(K=>{K!==D&&(C(P,K),A(P,K))})},U=(P,D,V)=>{let K=!0,Y=(re,ot)=>{let rt=w(P,re);if("e"in rt)throw rt.e;if("p"in rt){if(ot?.unstable_promise)return rt.p.then(()=>{let lt=m(P,re);return lt&&"p"in lt&<.p===rt.p?new Promise($e=>setTimeout($e)).then(()=>Y(re,ot)):Y(re,ot)});throw(E&&E.MODE)!=="production"&&console.info("Reading pending atom state in write operation. We throw a promise for now.",re),rt.p}if("v"in rt)return rt.v;throw(E&&E.MODE)!=="production"&&console.warn("[Bug] no value found while reading atom in write operation. This is probably a bug.",re),new Error("no value found")},j=(re,ot)=>{let rt;if(re===D){if(!Vc(re))throw new Error("atom not writable");s(re).forEach(Ws=>{Ws!==P&&S(Ws,re,ot)});let $e=m(P,re),qt=S(P,re,ot);$e!==qt&&A(P,re)}else rt=U(P,re,ot);return K||te(P),rt},J=D.write(Y,j,V);return K=!1,J},R=(P,D,V)=>{let K=U(V,P,D);return te(V),K},W=P=>!!P.write,O=(P,D,V)=>{let K={t:new Set(V&&[V]),l:new Set};if(o.set(D,K),(E&&E.MODE)!=="production"&&i.add(D),w(void 0,D).d.forEach((j,J)=>{let re=o.get(J);re?re.t.add(D):J!==D&&O(P,J,D)}),W(D)&&D.onMount){let j=re=>R(D,re,P),J=D.onMount(j);P=void 0,J&&(K.u=J)}return K},F=(P,D)=>{var V;let K=(V=o.get(D))==null?void 0:V.u;K&&K(),o.delete(D),(E&&E.MODE)!=="production"&&i.delete(D);let Y=m(P,D);Y?("p"in Y&&Nl(Y.p),Y.d.forEach((j,J)=>{if(J!==D){let re=o.get(J);re&&(re.t.delete(D),I(J,re)&&F(P,J))}})):(E&&E.MODE)!=="production"&&console.warn("[Bug] could not find atom state to unmount",D)},ee=(P,D,V,K)=>{let Y=new Set(V.d.keys());K?.forEach((j,J)=>{if(Y.has(J)){Y.delete(J);return}let re=o.get(J);re&&(re.t.delete(D),I(J,re)&&F(P,J))}),Y.forEach(j=>{let J=o.get(j);J?J.t.add(D):o.has(D)&&O(P,j,D)})},te=P=>{if(P){d(P).forEach((V,K)=>{let Y=e.get(K);if(V!==Y){let j=o.get(K);j?.l.forEach(J=>J(P))}});return}for(;r.size;){let D=Array.from(r);r.clear(),D.forEach(([V,K])=>{let Y=m(void 0,V);if(Y&&Y.d!==K?.d&&ee(void 0,V,Y,K?.d),K&&!K.y&&Y?.y)return;let j=o.get(V);j?.l.forEach(J=>J())})}(E&&E.MODE)!=="production"&&n.forEach(D=>D())},be=P=>{d(P).forEach((V,K)=>{let Y=e.get(K);(!Y||V.r>Y.r||V.y!==Y.y||V.r===Y.r&&V.d!==Y.d)&&(e.set(K,V),V.d!==Y?.d&&ee(P,K,V,Y?.d))})},ke=(P,D)=>{D&&be(D),te(void 0)},de=(P,D,V)=>{let Y=B(V,P).l;return Y.add(D),()=>{Y.delete(D),_(V,P)}},Z=(P,D)=>{for(let[V,K]of P)Vc(V)&&(S(D,V,K),A(D,V));te(D)};return(E&&E.MODE)!=="production"?{[Ol]:M,[Yc]:R,[Fl]:ke,[Zc]:de,[D0]:Z,[M6]:P=>(n.add(P),()=>{n.delete(P)}),[_6]:()=>i.values(),[A6]:P=>e.get(P),[L6]:P=>o.get(P)}:{[Ol]:M,[Yc]:R,[Fl]:ke,[Zc]:de,[D0]:Z}},O0=t=>{let e=N0(t),o=a=>{let l=e[Ol](a);if("e"in l)throw l.e;if(!("p"in l))return l.v},r=a=>new Promise((l,s)=>{let c=e[Ol](a);"e"in c?s(c.e):"p"in c?l(c.p.then(()=>r(a))):l(c.v)});return{get:o,asyncGet:r,set:(a,l)=>e[Yc](a,l),sub:(a,l)=>e[Zc](a,l),SECRET_INTERNAL_store:e}},F0=(t,e)=>({s:e?e(t).SECRET_INTERNAL_store:N0(t)}),wp=new Map,Sp=t=>(wp.has(t)||wp.set(t,(0,ft.createContext)(F0())),wp.get(t)),jc=({children:t,initialValues:e,scope:o,unstable_createStore:r,unstable_enableVersionedWrite:n})=>{let[i,a]=(0,ft.useState)({});(0,ft.useEffect)(()=>{let c=l.current;c.w&&(c.s[Fl](null,i),delete i.p,c.v=i)},[i]);let l=(0,ft.useRef)();if(!l.current){let c=F0(e,r);if(n){let d=0;c.w=m=>{a(p=>{let f=d?p:{p};return m(f),f})},c.v=i,c.r=m=>{++d,m(),--d}}l.current=c}let s=Sp(o);return(0,ft.createElement)(s.Provider,{value:l.current},t)};function Ue(t,e){return R0(t,e)}function Bl(t,e){let o=Sp(e),r=(0,ft.useContext)(o),{s:n,v:i}=r,a=p=>{let f=n[Ol](t,p);if((E&&E.MODE)!=="production"&&!f.y)throw new Error("should not be invalidated");if("e"in f)throw f.e;if("p"in f)throw f.p;if("v"in f)return f.v;throw new Error("no atom value")},[[l,s,c],d]=(0,ft.useReducer)((p,f)=>{let b=a(f);return Object.is(p[1],b)&&p[2]===t?p:[f,b,t]},i,p=>{let f=a(p);return[p,f,t]}),m=s;return c!==t&&(d(l),m=a(l)),(0,ft.useEffect)(()=>{let{v:p}=r;p&&n[Fl](t,p);let f=n[Zc](t,d,p);return d(p),f},[n,t,r]),(0,ft.useEffect)(()=>{n[Fl](t,l)}),(0,ft.useDebugValue)(m),m}function Ur(t,e){let o=Sp(e),{s:r,w:n}=(0,ft.useContext)(o);return(0,ft.useCallback)(a=>{if((E&&E.MODE)!=="production"&&!("write"in t))throw new Error("not writable atom");let l=s=>r[Yc](t,a,s);return n?n(l):l()},[r,n,t])}function Ce(t,e){return"scope"in t&&(console.warn("atom.scope is deprecated. Please do useAtom(atom, scope) instead."),e=t.scope),[Bl(t,e),Ur(t,e)]}var P6=v(H(),1),Re=Symbol(),Wt=O0();var R6=Vg({"./locales/ar-SA.json":()=>import("./excalidraw-assets/ar-SA-MV5ZQ2W5.js"),"./locales/az-AZ.json":()=>import("./excalidraw-assets/az-AZ-BK6PNAXT.js"),"./locales/bg-BG.json":()=>import("./excalidraw-assets/bg-BG-GCTBXIHZ.js"),"./locales/bn-BD.json":()=>import("./excalidraw-assets/bn-BD-QTMQMM2A.js"),"./locales/ca-ES.json":()=>import("./excalidraw-assets/ca-ES-CJKR7U4D.js"),"./locales/cs-CZ.json":()=>import("./excalidraw-assets/cs-CZ-E6RD7VRF.js"),"./locales/da-DK.json":()=>import("./excalidraw-assets/da-DK-GA7WAOB4.js"),"./locales/de-DE.json":()=>import("./excalidraw-assets/de-DE-WQGVYODE.js"),"./locales/el-GR.json":()=>import("./excalidraw-assets/el-GR-JRKZ7DCA.js"),"./locales/en.json":()=>import("./excalidraw-assets/en-SMMH575S.js"),"./locales/es-ES.json":()=>import("./excalidraw-assets/es-ES-NNAEPTPN.js"),"./locales/eu-ES.json":()=>import("./excalidraw-assets/eu-ES-UXVZRSMJ.js"),"./locales/fa-IR.json":()=>import("./excalidraw-assets/fa-IR-FFXQODN6.js"),"./locales/fi-FI.json":()=>import("./excalidraw-assets/fi-FI-FVRWY4PK.js"),"./locales/fr-FR.json":()=>import("./excalidraw-assets/fr-FR-YRAHLNH4.js"),"./locales/gl-ES.json":()=>import("./excalidraw-assets/gl-ES-O3MFXO2J.js"),"./locales/he-IL.json":()=>import("./excalidraw-assets/he-IL-UQHONTOV.js"),"./locales/hi-IN.json":()=>import("./excalidraw-assets/hi-IN-QGM3FMHS.js"),"./locales/hu-HU.json":()=>import("./excalidraw-assets/hu-HU-FW4UHMDU.js"),"./locales/id-ID.json":()=>import("./excalidraw-assets/id-ID-QOMISFYK.js"),"./locales/it-IT.json":()=>import("./excalidraw-assets/it-IT-NXPSTWVC.js"),"./locales/ja-JP.json":()=>import("./excalidraw-assets/ja-JP-Z7I24KT4.js"),"./locales/kaa.json":()=>import("./excalidraw-assets/kaa-TXMSCJDQ.js"),"./locales/kab-KAB.json":()=>import("./excalidraw-assets/kab-KAB-RJXRUTDO.js"),"./locales/kk-KZ.json":()=>import("./excalidraw-assets/kk-KZ-JXPULSST.js"),"./locales/km-KH.json":()=>import("./excalidraw-assets/km-KH-WRGO6AYW.js"),"./locales/ko-KR.json":()=>import("./excalidraw-assets/ko-KR-GAYOVASS.js"),"./locales/ku-TR.json":()=>import("./excalidraw-assets/ku-TR-DJF4NWRZ.js"),"./locales/lt-LT.json":()=>import("./excalidraw-assets/lt-LT-QQGY3S4X.js"),"./locales/lv-LV.json":()=>import("./excalidraw-assets/lv-LV-H55DY45V.js"),"./locales/mr-IN.json":()=>import("./excalidraw-assets/mr-IN-QYT2ELER.js"),"./locales/my-MM.json":()=>import("./excalidraw-assets/my-MM-RRPBSH5R.js"),"./locales/nb-NO.json":()=>import("./excalidraw-assets/nb-NO-AMX3MAHH.js"),"./locales/nl-NL.json":()=>import("./excalidraw-assets/nl-NL-LZSLKN37.js"),"./locales/nn-NO.json":()=>import("./excalidraw-assets/nn-NO-WWXPMJY7.js"),"./locales/oc-FR.json":()=>import("./excalidraw-assets/oc-FR-GPZCMCGX.js"),"./locales/pa-IN.json":()=>import("./excalidraw-assets/pa-IN-L5H3H4OA.js"),"./locales/percentages.json":()=>import("./excalidraw-assets/percentages-L6Y3A3ZS.js"),"./locales/pl-PL.json":()=>import("./excalidraw-assets/pl-PL-SYTLCLU7.js"),"./locales/pt-BR.json":()=>import("./excalidraw-assets/pt-BR-BJOSVXBP.js"),"./locales/pt-PT.json":()=>import("./excalidraw-assets/pt-PT-QHWDKICL.js"),"./locales/ro-RO.json":()=>import("./excalidraw-assets/ro-RO-AVSXCJHH.js"),"./locales/ru-RU.json":()=>import("./excalidraw-assets/ru-RU-5Z6AY4FG.js"),"./locales/si-LK.json":()=>import("./excalidraw-assets/si-LK-OMROCHR3.js"),"./locales/sk-SK.json":()=>import("./excalidraw-assets/sk-SK-TLXIBWPH.js"),"./locales/sl-SI.json":()=>import("./excalidraw-assets/sl-SI-JELDMWCI.js"),"./locales/sv-SE.json":()=>import("./excalidraw-assets/sv-SE-2FAONS47.js"),"./locales/ta-IN.json":()=>import("./excalidraw-assets/ta-IN-XN7DVSDK.js"),"./locales/th-TH.json":()=>import("./excalidraw-assets/th-TH-VCIYWJPR.js"),"./locales/tr-TR.json":()=>import("./excalidraw-assets/tr-TR-6QL6T7SM.js"),"./locales/uk-UA.json":()=>import("./excalidraw-assets/uk-UA-Y6YRBHAO.js"),"./locales/vi-VN.json":()=>import("./excalidraw-assets/vi-VN-34I6LTAE.js"),"./locales/zh-CN.json":()=>import("./excalidraw-assets/zh-CN-IGKEMUHO.js"),"./locales/zh-HK.json":()=>import("./excalidraw-assets/zh-HK-MDAU5TWB.js"),"./locales/zh-TW.json":()=>import("./excalidraw-assets/zh-TW-DOGEFI3C.js")});var D6=85,fr={code:"en",label:"English"},ra=[fr,...[{code:"ar-SA",label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",rtl:!0},{code:"bg-BG",label:"\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438"},{code:"ca-ES",label:"Catal\xE0"},{code:"cs-CZ",label:"\u010Cesky"},{code:"de-DE",label:"Deutsch"},{code:"el-GR",label:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC"},{code:"es-ES",label:"Espa\xF1ol"},{code:"eu-ES",label:"Euskara"},{code:"fa-IR",label:"\u0641\u0627\u0631\u0633\u06CC",rtl:!0},{code:"fi-FI",label:"Suomi"},{code:"fr-FR",label:"Fran\xE7ais"},{code:"gl-ES",label:"Galego"},{code:"he-IL",label:"\u05E2\u05D1\u05E8\u05D9\u05EA",rtl:!0},{code:"hi-IN",label:"\u0939\u093F\u0928\u094D\u0926\u0940"},{code:"hu-HU",label:"Magyar"},{code:"id-ID",label:"Bahasa Indonesia"},{code:"it-IT",label:"Italiano"},{code:"ja-JP",label:"\u65E5\u672C\u8A9E"},{code:"kab-KAB",label:"Taqbaylit"},{code:"kk-KZ",label:"\u049A\u0430\u0437\u0430\u049B \u0442\u0456\u043B\u0456"},{code:"ko-KR",label:"\uD55C\uAD6D\uC5B4"},{code:"ku-TR",label:"Kurd\xEE"},{code:"lt-LT",label:"Lietuvi\u0173"},{code:"lv-LV",label:"Latvie\u0161u"},{code:"my-MM",label:"Burmese"},{code:"nb-NO",label:"Norsk bokm\xE5l"},{code:"nl-NL",label:"Nederlands"},{code:"nn-NO",label:"Norsk nynorsk"},{code:"oc-FR",label:"Occitan"},{code:"pa-IN",label:"\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40"},{code:"pl-PL",label:"Polski"},{code:"pt-BR",label:"Portugu\xEAs Brasileiro"},{code:"pt-PT",label:"Portugu\xEAs"},{code:"ro-RO",label:"Rom\xE2n\u0103"},{code:"ru-RU",label:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"},{code:"sk-SK",label:"Sloven\u010Dina"},{code:"sv-SE",label:"Svenska"},{code:"sl-SI",label:"Sloven\u0161\u010Dina"},{code:"tr-TR",label:"T\xFCrk\xE7e"},{code:"uk-UA",label:"\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430"},{code:"zh-CN",label:"\u7B80\u4F53\u4E2D\u6587"},{code:"zh-TW",label:"\u7E41\u9AD4\u4E2D\u6587"},{code:"vi-VN",label:"Ti\u1EBFng Vi\u1EC7t"},{code:"mr-IN",label:"\u092E\u0930\u093E\u0920\u0940"}].filter(t=>Yg[t.code]>=D6).sort((t,e)=>t.label>e.label?1:-1)],qc="__test__";E.DEV&&ra.unshift({code:qc,label:"test language"},{code:`${qc}.rtl`,label:"\u202Atest language (rtl)\u202C",rtl:!0});var oa=fr,Xc={},Jc=async t=>{if(oa=t,document.documentElement.dir=oa.rtl?"rtl":"ltr",document.documentElement.lang=oa.code,t.code.startsWith(qc))Xc={};else try{Xc=await R6(`./locales/${oa.code}.json`)}catch(e){console.error(`Failed to load language ${t.code}:`,e.message),Xc=Iu}Wt.set(z0,t.code)},Wr=()=>oa,B0=(t,e)=>{for(let o=0;o<e.length;++o){let r=e[o];if(t[r]===void 0)return;t=t[r]}if(typeof t=="string")return t},g=(t,e,o)=>{if(oa.code.startsWith(qc))return`\u202A[[${e?`${t}(${JSON.stringify(e).slice(1,-1)})`:t}]]\u202C`;let r=t.split("."),n=B0(Xc,r)||B0(Iu,r)||o;if(n===void 0){let i=`Can't find translation for ${t}`;if(E.PROD)return console.warn(i),"";throw new Error(i)}if(e)for(let i in e)n=n.replace(`{{${i}}}`,String(e[i]));return n},z0=Ue(fr.code),xt=()=>{let t=Bl(z0,Re);return{t:g,langCode:t}};var td=v(H(),1);h();var W0=v(H(),1);var ed=v(k(),1),$6=({size:t="1em",circleWidth:e=8,synchronized:o=!1})=>{let n=-(W0.default.useRef(Date.now()).current%1600);return(0,ed.jsx)("div",{className:"Spinner",children:(0,ed.jsx)("svg",{viewBox:"0 0 100 100",style:{width:t,height:t,"--spinner-delay":o?`${n}ms`:0},children:(0,ed.jsx)("circle",{cx:"50",cy:"50",r:50-e/2,strokeWidth:e,fill:"none",strokeMiterlimit:"10"})})})},Nt=$6;h();function G0(t){var e,o,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(o=G0(t[e]))&&(r&&(r+=" "),r+=o);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function z(){for(var t=0,e,o,r="";t<arguments.length;)(e=arguments[t++])&&(o=G0(e))&&(r&&(r+=" "),r+=o);return r}var na=v(k(),1),od=({delay:t,theme:e})=>{let[o,r]=(0,td.useState)(!!t);return(0,td.useEffect)(()=>{if(!t)return;let n=setTimeout(()=>{r(!1)},t);return()=>clearTimeout(n)},[t]),o?null:(0,na.jsxs)("div",{className:z("LoadingMessage",{"LoadingMessage--dark":e===he.DARK}),children:[(0,na.jsx)("div",{children:(0,na.jsx)(Nt,{})}),(0,na.jsx)("div",{className:"LoadingMessage-text",children:g("labels.loadingScene")})]})};var K0=v(k(),1),V0=t=>{let[e,o]=(0,rd.useState)(!0);return(0,rd.useEffect)(()=>{let r=async()=>{await Jc(n),o(!1)},n=ra.find(i=>i.code===t.langCode)||fr;r()},[t.langCode]),e?(0,K0.jsx)(od,{theme:t.theme}):t.children};h();var Tt=v(H(),1),vu=v(hr(),1);h();h();h();var Xo=v(H(),1);var _o=v(k(),1),se=Xo.default.forwardRef((t,e)=>{let{id:o}=Mt(),r=Xo.default.useRef(null);Xo.default.useImperativeHandle(e,()=>r.current);let n=`ToolIcon_size_${t.size}`,[i,a]=(0,Xo.useState)(!1),l=(0,Xo.useRef)(!0),s=async d=>{let m="onClick"in t&&t.onClick?.(d);if(Ni(m))try{a(!0),await m}catch(p){if(p instanceof Bi)console.warn(p);else throw p}finally{l.current&&a(!1)}};(0,Xo.useEffect)(()=>(l.current=!0,()=>{l.current=!1}),[]);let c=(0,Xo.useRef)(null);if(t.type==="button"||t.type==="icon"||t.type==="submit"){let d=t.type==="icon"?"button":t.type;return(0,_o.jsxs)("button",{className:z("ToolIcon_type_button",n,t.className,t.visible&&!t.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!t.hidden,"ToolIcon--selected":t.selected,"ToolIcon--plain":t.type==="icon"}),style:t.style,"data-testid":t["data-testid"],hidden:t.hidden,title:t.title,"aria-label":t["aria-label"],type:d,onClick:s,ref:r,disabled:i||t.isLoading,children:[(t.icon||t.label)&&(0,_o.jsxs)("div",{className:"ToolIcon__icon","aria-hidden":"true",children:[t.icon||t.label,t.keyBindingLabel&&(0,_o.jsx)("span",{className:"ToolIcon__keybinding",children:t.keyBindingLabel}),t.isLoading&&(0,_o.jsx)(Nt,{})]}),t.showAriaLabel&&(0,_o.jsxs)("div",{className:"ToolIcon__label",children:[t["aria-label"]," ",i&&(0,_o.jsx)(Nt,{})]}),t.children]})}return(0,_o.jsxs)("label",{className:z("ToolIcon",t.className),title:t.title,onPointerDown:d=>{c.current=d.pointerType||null,t.onPointerDown?.({pointerType:d.pointerType||null})},onPointerUp:()=>{requestAnimationFrame(()=>{c.current=null})},children:[(0,_o.jsx)("input",{className:`ToolIcon_type_radio ${n}`,type:"radio",name:t.name,"aria-label":t["aria-label"],"aria-keyshortcuts":t["aria-keyshortcuts"],"data-testid":t["data-testid"],id:`${o}-${t.id}`,onChange:()=>{t.onChange?.({pointerType:c.current})},checked:t.checked,ref:r}),(0,_o.jsxs)("div",{className:"ToolIcon__icon",children:[t.icon,t.keyBindingLabel&&(0,_o.jsx)("span",{className:"ToolIcon__keybinding",children:t.keyBindingLabel})]})]})});se.defaultProps={visible:!0,className:"",size:"medium"};se.displayName="ToolButton";h();var eo=v(H(),1);var u=v(k(),1),qo=t=>"var(--icon-fill-color)",Z0=t=>t===he.LIGHT?It.white:"#1e1e1e",L=(t,e=512)=>{let{width:o=512,height:r=o,mirror:n,style:i,...a}=typeof e=="number"?{width:e}:e;return(0,u.jsx)("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${o} ${r}`,className:z({"rtl-mirror":n}),style:i,...a,children:typeof t=="string"?(0,u.jsx)("path",{fill:"currentColor",d:t}):t})},Q={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},ce={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},R8=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("rect",{x:3,y:8,width:18,height:4,rx:1}),(0,u.jsx)("line",{x1:12,y1:8,x2:12,y2:21}),(0,u.jsx)("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),(0,u.jsx)("path",{d:"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5"})]}),Q),nd=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),(0,u.jsx)("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),(0,u.jsx)("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),(0,u.jsx)("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),(0,u.jsx)("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),Q),j0=L((0,u.jsxs)("svg",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,u.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),Q),X0=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"1"}),(0,u.jsx)("circle",{cx:"12",cy:"19",r:"1"}),(0,u.jsx)("circle",{cx:"12",cy:"5",r:"1"})]}),Q),q0=L((0,u.jsxs)("svg",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),(0,u.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),(0,u.jsx)("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),Q),ti=L((0,u.jsxs)("g",{children:[(0,u.jsx)("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:(0,u.jsx)("path",{stroke:"none",d:"M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481",fill:"#fff"})}),(0,u.jsx)("g",{mask:"url(#UnlockedIcon)",children:(0,u.jsx)("path",{stroke:"none",d:"M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z",fill:"currentColor"})})]}),ce),ia=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z"}),(0,u.jsx)("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),(0,u.jsx)("path",{d:"M6.667 8.333V5.417C6.667 3.806 8.159 2.5 10 2.5c1.841 0 3.333 1.306 3.333 2.917v2.916"})]}),ce),J0=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M38.5 83.5c-14-2-17.833-10.473-21-22.5C14.333 48.984 12 22 12 12.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M12.005 10.478c1.92 3.495 3.838 7 7.905 14.423m-7.905-14.423c3.11 5.683 6.23 11.368 7.905 14.423m0 0c-3.68.226-7.35.455-13.91.85m13.91-.85c-5.279.33-10.566.647-13.91.85m0 0c1.936-4.931 3.882-9.86 6.005-15.273M6 25.75c2.069-5.257 4.135-10.505 6.005-15.272",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:41,height:94,fill:"none"}),Q0=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M18.026 1.232c-5.268 13.125-5.548 33.555 3.285 42.311 8.823 8.75 33.31 12.304 42.422 13.523",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M72.181 59.247c-3.163-2.429-6.337-4.856-13.058-10m13.058 10c-5.145-3.936-10.292-7.882-13.058-10m0 0c-.78 3.603-1.563 7.196-2.948 13.62m2.948-13.62c-1.126 5.168-2.24 10.346-2.948 13.62m0 0c5.168-1.166 10.334-2.343 16.006-3.62m-16.006 3.62c5.51-1.248 11.01-2.495 16.006-3.62",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:85,height:71,fill:"none"}),ex=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M1 77c14-2 31.833-11.973 35-24 3.167-12.016-6-35-9.5-43.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M24.165 1.093c-.522 3.953-1.037 7.916-2.132 16.309m2.131-16.309c-.835 6.424-1.68 12.854-2.13 16.308m0 0c3.51-1.125 7.013-2.243 13.27-4.257m-13.27 4.257c5.038-1.608 10.08-3.232 13.27-4.257m0 0c-3.595-3.892-7.197-7.777-11.14-12.05m11.14 12.05c-3.837-4.148-7.667-8.287-11.14-12.05",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:38,height:78,fill:"none"}),D8=L((0,u.jsx)("g",{fill:"currentColor",children:(0,u.jsx)("path",{d:"M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z",fill:"currentColor"})}),{width:40,height:40,fill:"none"}),tx=L((0,u.jsxs)("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M6 6l4.153 11.793a0.365 .365 0 0 0 .331 .207a0.366 .366 0 0 0 .332 -.207l2.184 -4.793l4.787 -1.994a0.355 .355 0 0 0 .213 -.323a0.355 .355 0 0 0 -.213 -.323l-11.787 -4.36z"}),(0,u.jsx)("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),ox=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),Q),rx=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M10.5 20.4l-6.9 -6.9c-.781 -.781 -.781 -2.219 0 -3l6.9 -6.9c.781 -.781 2.219 -.781 3 0l6.9 6.9c.781 .781 .781 2.219 0 3l-6.9 6.9c-.781 .781 -2.219 .781 -3 0z"})]}),Q),nx=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"9"})]}),Q),ix=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,u.jsx)("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),(0,u.jsx)("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),Q),ax=L((0,u.jsx)("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),ce),lx=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),(0,u.jsx)("path",{d:"M16 7h4"}),(0,u.jsx)("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),Q),aa=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{clipRule:"evenodd",d:"m7.643 15.69 7.774-7.773a2.357 2.357 0 1 0-3.334-3.334L4.31 12.357a3.333 3.333 0 0 0-.977 2.357v1.953h1.953c.884 0 1.732-.352 2.357-.977Z"}),(0,u.jsx)("path",{d:"m11.25 5.417 3.333 3.333"})]}),ce),sx=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),(0,u.jsx)("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),(0,u.jsx)("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),(0,u.jsx)("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),(0,u.jsx)("polyline",{points:"5 20 11 4 13 4 20 20"})]}),Q),cx=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M12.5 6.667h.01"}),(0,u.jsx)("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z"}),(0,u.jsx)("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),(0,u.jsx)("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),ce),dx=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3"}),(0,u.jsx)("path",{d:"M18 13.3l-6.3 -6.3"})]}),Q),kp=L((0,u.jsx)("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),ce),Ip=L((0,u.jsx)("path",{d:"M5 10h10",strokeWidth:"1.25"}),ce),mx=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M21 21l-6 -6"}),(0,u.jsx)("path",{d:"M3.268 12.043a7.017 7.017 0 0 0 6.634 4.957a7.012 7.012 0 0 0 7.043 -6.131a7 7 0 0 0 -5.314 -7.672a7.021 7.021 0 0 0 -8.241 4.403"}),(0,u.jsx)("path",{d:"M3 4v4h4"})]}),Q),Jo=L((0,u.jsx)("path",{strokeWidth:"1.25",d:"M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"}),ce),ux=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("polyline",{points:"12 16 18 10 12 4"}),(0,u.jsx)("polyline",{points:"8 4 2 10 8 16"})]}),ce),zl=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"}),(0,u.jsx)("path",{clipRule:"evenodd",d:"M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"})]}),ce),Hl=L((0,u.jsx)("path",{clipRule:"evenodd",d:"M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z",stroke:"currentColor"}),ce),$l=L((0,u.jsx)("g",{stroke:"currentColor",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667"})}),{...ce,strokeWidth:1.5}),id=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),(0,u.jsx)("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),(0,u.jsx)("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),Q),oi=L((0,u.jsx)("path",{strokeWidth:"1.25",d:"M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10"}),ce),la=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,u.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),(0,u.jsx)("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),Q),px=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,u.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),(0,u.jsx)("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),Q),Mp=L((0,u.jsx)("path",{strokeWidth:"1.25",d:"M9.167 5.833H5.833c-1.254 0-2.5 1.282-2.5 2.5v5.834c0 1.283 1.252 2.5 2.5 2.5h5.834c1.251 0 2.5-1.25 2.5-2.5v-3.334M8.333 11.667l8.334-8.334M12.5 3.333h4.167V7.5"}),ce),ad=L((0,u.jsx)("path",{d:"M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5",strokeWidth:"1.25"}),ce),fx=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0"}),(0,u.jsx)("path",{d:"M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084"})]}),ce),hx=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 4l11.733 16h4.267l-11.733 -16z"}),(0,u.jsx)("path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"})]}),Q),gx=L((0,u.jsx)("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),Ul=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"}),(0,u.jsx)("path",{d:"M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"})]}),ce),bx=L("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}),xx=L("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}),sa=L((0,u.jsx)("path",{d:"m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z",strokeWidth:"1.25"}),ce),N8=L("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}),vx=L("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"),ld=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z"}),(0,u.jsx)("path",{d:"M13.737 9.737c2.299 -2.3 3.23 -5.095 2.081 -6.245c-1.15 -1.15 -3.945 -.217 -6.244 2.082c-2.3 2.299 -3.231 5.095 -2.082 6.244c1.15 1.15 3.946 .218 6.245 -2.081z"}),(0,u.jsx)("path",{d:"M7.492 11.818c.362 .362 .768 .676 1.208 .934l6.895 4.047c1.078 .557 2.255 -.075 3.692 -1.512c1.437 -1.437 2.07 -2.614 1.512 -3.692c-.372 -.718 -1.72 -3.017 -4.047 -6.895a6.015 6.015 0 0 0 -.934 -1.208"})]}),Q),sd=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M15 8h.01"}),(0,u.jsx)("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),(0,u.jsx)("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),(0,u.jsx)("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),(0,u.jsx)("path",{d:"M19 16v6"}),(0,u.jsx)("path",{d:"M22 19l-3 3l-3 -3"})]}),Q),yx=L("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}),O8=L("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}),F8=L("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}),Ex=L("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"),B8=L("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"),_p=L((0,u.jsx)("path",{d:"M7.5 10.833 4.167 7.5 7.5 4.167M4.167 7.5h9.166a3.333 3.333 0 0 1 0 6.667H12.5",strokeWidth:"1.25"}),ce),Ap=L((0,u.jsx)("path",{d:"M12.5 10.833 15.833 7.5 12.5 4.167M15.833 7.5H6.667a3.333 3.333 0 1 0 0 6.667H7.5",strokeWidth:"1.25"}),ce),wx=L("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}),Cx=L((0,u.jsx)("path",{d:"M5 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 17.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7.25 8.917l5.5-2.834M7.25 11.083l5.5 2.834",strokeWidth:"1.5"}),ce),z8=L("M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"),H8=L("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}),$8=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M8 9h-1a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-8a2 2 0 0 0 -2 -2h-1"}),(0,u.jsx)("path",{d:"M12 14v-11"}),(0,u.jsx)("path",{d:"M9 6l3 -3l3 3"})]}),Q),U8=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{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,u.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}),W8=L((0,u.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}),Lp=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{d:"M13.889 4.167H8.333c-.767 0-1.389.622-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.767-.622-1.39-1.39-1.39Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M12.5 12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Pp=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.944 12.5H12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388",fill:"currentColor"}),(0,u.jsx)("path",{d:"M13.889 4.167H8.333c-.767 0-1.389.621-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.768-.622-1.39-1.39-1.39Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Rp=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M8.775 6.458h2.45a2.316 2.316 0 0 1 2.317 2.316v2.452a2.316 2.316 0 0 1-2.316 2.316H8.774a2.316 2.316 0 0 1-2.317-2.316V8.774a2.316 2.316 0 0 1 2.317-2.316Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316ZM12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Dp=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",children:[(0,u.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("mask",{id:"SendToBackIcon",fill:"#fff",children:(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z"})}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M9.167 5.833h1.25v-1.25h-1.25v1.25Zm5 5h1.25v-1.25h-1.25v1.25Zm-3.334 3.334h-1.25v1.25h1.25v-1.25Zm-5-5h-1.25v1.25h1.25v-1.25Zm2.084-3.334v2.06h2.5v-2.06h-2.5Zm0 2.06a4.191 4.191 0 0 0 4.19 4.19v-2.5a1.691 1.691 0 0 1-1.69-1.69h-2.5Zm4.19 4.19h2.06v-2.5h-2.06v2.5Zm.81-1.25v.393h2.5v-.393h-2.5Zm0 .393c0 .933-.758 1.69-1.691 1.69v2.5a4.191 4.191 0 0 0 4.19-4.19h-2.5Zm-1.691 1.69h-.393v2.5h.393v-2.5Zm.857 1.25v-2.058h-2.5v2.059h2.5Zm0-2.058a4.191 4.191 0 0 0-4.19-4.191v2.5c.933 0 1.69.757 1.69 1.69h2.5Zm-4.19-4.191h-2.06v2.5h2.06v-2.5Zm-.81 1.25v-.393h-2.5v.393h2.5Zm0-.393c0-.934.758-1.69 1.692-1.69v-2.5a4.191 4.191 0 0 0-4.192 4.19h2.5Zm1.692-1.69h.392v-2.5h-.392v2.5Z",fill:"currentColor",mask:"url(#SendToBackIcon)"}),(0,u.jsx)("path",{d:"M12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z",stroke:"currentColor",strokeWidth:"1.25"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Np=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v7.083c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V8.125c0-.92-.746-1.667-1.666-1.667ZM6.875 6.458h-.417c-.92 0-1.666.747-1.666 1.667v3.75c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667v-3.75c0-.92-.747-1.667-1.667-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Op=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M6.875 3.125h-.417c-.92 0-1.666.746-1.666 1.667v7.083c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667V4.792c0-.92-.747-1.667-1.667-1.667ZM13.542 5.817h-.417c-.92 0-1.667.747-1.667 1.667v4.391c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V7.484c0-.92-.746-1.667-1.666-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Fp=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M15.208 4.792H8.125c-.92 0-1.667.746-1.667 1.666v.417c0 .92.747 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM12.516 11.458H8.125c-.92 0-1.667.746-1.667 1.667v.417c0 .92.747 1.666 1.667 1.666h4.391c.92 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.667-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Bp=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M11.875 4.792H4.792c-.92 0-1.667.746-1.667 1.666v.417c0 .92.746 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM11.683 11.458H7.292c-.92 0-1.667.746-1.667 1.667v.417c0 .92.746 1.666 1.667 1.666h4.39c.921 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.666-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Tx=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M14.375 10.208v-.416c0-.92-.746-1.667-1.667-1.667H7.292c-.92 0-1.667.746-1.667 1.667v.416c0 .92.746 1.667 1.667 1.667h5.416c.92 0 1.667-.746 1.667-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Sx=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M10.208 5.625h-.416c-.92 0-1.667.746-1.667 1.667v5.416c0 .92.746 1.667 1.667 1.667h.416c.92 0 1.667-.746 1.667-1.667V7.292c0-.92-.746-1.667-1.667-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),zp=L((0,u.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M6.875 4.792h-.417c-.92 0-1.666.746-1.666 1.666v7.084c0 .92.746 1.666 1.666 1.666h.417c.92 0 1.667-.746 1.667-1.666V6.458c0-.92-.747-1.666-1.667-1.666ZM13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v3.75c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667v-3.75c0-.92-.746-1.667-1.666-1.667Z"})]}),ce),Hp=L((0,u.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M4.792 13.125v.417c0 .92.746 1.666 1.666 1.666h7.084c.92 0 1.666-.746 1.666-1.666v-.417c0-.92-.746-1.667-1.666-1.667H6.458c-.92 0-1.666.746-1.666 1.667ZM6.458 6.458v.417c0 .92.747 1.667 1.667 1.667h3.75c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666h-3.75c-.92 0-1.667.746-1.667 1.666Z"})]}),ce),cd=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"9",cy:"7",r:"4"}),(0,u.jsx)("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),(0,u.jsx)("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),(0,u.jsx)("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),Q),G8=L("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"),V8=L("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"),Ao=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M15 5 5 15M5 5l10 10"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),K8=L("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}),Y8=L("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}),Z8=L("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}),$p=eo.default.memo(({theme:t})=>L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M25 26H111V111H25",fill:qo(t)}),(0,u.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:qo(t),strokeWidth:"2"}),(0,u.jsx)("path",{d:"M100 100H160V160H100",fill:qo(t)}),(0,u.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:qo(t),strokeWidth:"2"}),(0,u.jsxs)("g",{fill:Z0(t),stroke:qo(t),strokeWidth:"6",children:[(0,u.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),Up=eo.default.memo(({theme:t})=>L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M25 26H111V111H25",fill:qo(t)}),(0,u.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:qo(t),strokeWidth:"2"}),(0,u.jsx)("path",{d:"M100 100H160V160H100",fill:qo(t)}),(0,u.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:qo(t),strokeWidth:"2"}),(0,u.jsxs)("g",{fill:Z0(t),stroke:qo(t),strokeWidth:"6",children:[(0,u.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),kx=L((0,u.jsx)("g",{strokeWidth:1.25,children:(0,u.jsx)("path",{d:"M5.879 2.625h8.242a3.27 3.27 0 0 1 3.254 3.254v8.242a3.27 3.27 0 0 1-3.254 3.254H5.88a3.27 3.27 0 0 1-3.254-3.254V5.88A3.27 3.27 0 0 1 5.88 2.626l-.001-.001ZM4.518 16.118l7.608-12.83m.198 13.934 5.051-9.897M2.778 9.675l9.348-6.387m-7.608 12.83 12.857-8.793"})}),ce),Ix=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:(0,u.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.25"})}),(0,u.jsx)("g",{mask:"url(#FillHachureIcon)",children:(0,u.jsx)("path",{d:"M2.258 15.156 15.156 2.258M7.324 20.222 20.222 7.325m-20.444 5.35L12.675-.222m-8.157 18.34L17.416 5.22",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})]}),ce),Mx=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",children:[(0,u.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:(0,u.jsx)("path",{d:"M2.426 15.044 15.044 2.426M7.383 20 20 7.383M0 12.617 12.617 0m-7.98 17.941L17.256 5.324m-2.211 12.25L2.426 4.956M20 12.617 7.383 0m5.234 20L0 7.383m17.941 7.98L5.324 2.745",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("g",{mask:"url(#FillCrossHatchIcon)",children:(0,u.jsx)("path",{d:"M14.121 2H5.88A3.879 3.879 0 0 0 2 5.879v8.242A3.879 3.879 0 0 0 5.879 18h8.242A3.879 3.879 0 0 0 18 14.121V5.88A3.879 3.879 0 0 0 14.121 2Z",fill:"currentColor"})})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),_x=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z",stroke:"currentColor",strokeWidth:"1.25"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),{...ce,fill:"currentColor"}),Wp=L((0,u.jsx)(u.Fragment,{children:(0,u.jsx)("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),ce),Ax=L((0,u.jsx)("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),ce),Lx=L((0,u.jsx)("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),ce),j8=eo.default.memo(({theme:t})=>L((0,u.jsx)("path",{d:"M6 10H34",stroke:qo(t),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})),Px=L((0,u.jsxs)("g",{strokeWidth:"2",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M5 12h2"}),(0,u.jsx)("path",{d:"M17 12h2"}),(0,u.jsx)("path",{d:"M11 12h2"})]}),Q),Rx=L((0,u.jsxs)("g",{strokeWidth:"2",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 12v.01"}),(0,u.jsx)("path",{d:"M8 12v.01"}),(0,u.jsx)("path",{d:"M12 12v.01"}),(0,u.jsx)("path",{d:"M16 12v.01"}),(0,u.jsx)("path",{d:"M20 12v.01"})]}),Q),Dx=L((0,u.jsx)("path",{d:"M2.5 12.038c1.655-.885 5.9-3.292 8.568-4.354 2.668-1.063.101 2.821 1.32 3.104 1.218.283 5.112-1.814 5.112-1.814",strokeWidth:"1.25"}),ce),Nx=L((0,u.jsx)("path",{d:"M2.5 12.563c1.655-.886 5.9-3.293 8.568-4.355 2.668-1.062.101 2.822 1.32 3.105 1.218.283 5.112-1.814 5.112-1.814m-13.469 2.23c2.963-1.586 6.13-5.62 7.468-4.998 1.338.623-1.153 4.11-.132 5.595 1.02 1.487 6.133-1.43 6.133-1.43",strokeWidth:"1.25"}),ce),Ox=L((0,u.jsx)("path",{d:"M2.5 11.936c1.737-.879 8.627-5.346 10.42-5.268 1.795.078-.418 5.138.345 5.736.763.598 3.53-1.789 4.235-2.147M2.929 9.788c1.164-.519 5.47-3.28 6.987-3.114 1.519.165 1 3.827 2.121 4.109 1.122.281 3.839-2.016 4.606-2.42",strokeWidth:"1.25"}),ce),Fx=L((0,u.jsxs)("svg",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{d:"M3.33334 9.99998V6.66665C3.33334 6.04326 3.33403 4.9332 3.33539 3.33646C4.95233 3.33436 6.06276 3.33331 6.66668 3.33331H10"}),(0,u.jsx)("path",{d:"M13.3333 3.33331V3.34331"}),(0,u.jsx)("path",{d:"M16.6667 3.33331V3.34331"}),(0,u.jsx)("path",{d:"M16.6667 6.66669V6.67669"}),(0,u.jsx)("path",{d:"M16.6667 10V10.01"}),(0,u.jsx)("path",{d:"M3.33334 13.3333V13.3433"}),(0,u.jsx)("path",{d:"M16.6667 13.3333V13.3433"}),(0,u.jsx)("path",{d:"M3.33334 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M6.66666 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M10 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M13.3333 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M16.6667 16.6667V16.6767"})]}),ce),Bx=L((0,u.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),(0,u.jsx)("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),(0,u.jsx)("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),(0,u.jsx)("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),(0,u.jsx)("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),(0,u.jsx)("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),(0,u.jsx)("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),(0,u.jsx)("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),(0,u.jsx)("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),(0,u.jsx)("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),(0,u.jsx)("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),(0,u.jsx)("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),Q),zx=L((0,u.jsx)("path",{d:"M6 10H34",stroke:"currentColor",strokeWidth:2,fill:"none"}),{width:40,height:20}),Hx=eo.default.memo(({flip:t=!1})=>L((0,u.jsxs)("g",{transform:t?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[(0,u.jsx)("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),(0,u.jsx)("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})),Gp=eo.default.memo(({flip:t=!1})=>L((0,u.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:t?"translate(40, 0) scale(-1, 1)":"",children:[(0,u.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,u.jsx)("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),$x=eo.default.memo(({flip:t=!1})=>L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",transform:t?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[(0,u.jsx)("path",{d:"M26 10L6 10"}),(0,u.jsx)("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),Ux=eo.default.memo(({flip:t=!1})=>L((0,u.jsx)("g",{transform:t?"translate(40, 0) scale(-1, 1)":"",children:(0,u.jsx)("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})),Wx=eo.default.memo(({flip:t=!1})=>L((0,u.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:t?"translate(40, 0) scale(-1, 1)":"",children:[(0,u.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,u.jsx)("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})),Gx=eo.default.memo(({flip:t=!1})=>L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",transform:t?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",children:[(0,u.jsx)("path",{d:"M6,9.5H27"}),(0,u.jsx)("path",{d:"M27,5L34,10L27,14Z",fill:"none"})]}),{width:40,height:20})),Vx=eo.default.memo(({flip:t=!1})=>L((0,u.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:t?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[(0,u.jsx)("path",{d:"M6,9.5H20"}),(0,u.jsx)("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),Kx=eo.default.memo(({flip:t=!1})=>L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",transform:t?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[(0,u.jsx)("path",{d:"M6,9.5H20"}),(0,u.jsx)("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),Yx=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M14.167 6.667a3.333 3.333 0 0 0-3.334-3.334H9.167a3.333 3.333 0 0 0 0 6.667h1.666a3.333 3.333 0 0 1 0 6.667H9.167a3.333 3.333 0 0 1-3.334-3.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Zx=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),jx=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Xx=L((0,u.jsx)(u.Fragment,{children:(0,u.jsx)("path",{d:"m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),ce),Vp=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 7v-2h13v2"}),(0,u.jsx)("path",{d:"M10 5v14"}),(0,u.jsx)("path",{d:"M12 19h-4"}),(0,u.jsx)("path",{d:"M15 13v-1h6v1"}),(0,u.jsx)("path",{d:"M18 12v7"}),(0,u.jsx)("path",{d:"M17 19h2"})]}),Q),qx=L((0,u.jsx)(u.Fragment,{children:(0,u.jsx)("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334"})})}),ce),Jx=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M5.833 6.667 2.5 10l3.333 3.333M14.167 6.667 17.5 10l-3.333 3.333M11.667 3.333 8.333 16.667"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Qx=L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,u.jsx)("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),(0,u.jsx)("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),Q),ev=L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,u.jsx)("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),(0,u.jsx)("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),Q),tv=L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,u.jsx)("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),(0,u.jsx)("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),Q),ov=eo.default.memo(({theme:t})=>L((0,u.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),(0,u.jsx)("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),Q)),rv=eo.default.memo(({theme:t})=>L((0,u.jsxs)("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),(0,u.jsx)("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),Q)),nv=eo.default.memo(({theme:t})=>L((0,u.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),(0,u.jsx)("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),(0,u.jsx)("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),Q)),iv=L((0,u.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}),X8=L((0,u.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"})),dd=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),(0,u.jsx)("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),(0,u.jsx)("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),(0,u.jsx)("path",{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"})]}),Q),Kp=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),(0,u.jsx)("path",{d:"M7 11l5 5l5 -5"}),(0,u.jsx)("path",{d:"M12 4l0 12"})]}),Q),md=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"}),(0,u.jsx)("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]}),Q),av=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),(0,u.jsx)("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),(0,u.jsx)("path",{d:"M9.15 14.85l8.85 -10.85"}),(0,u.jsx)("path",{d:"M6 4l8.85 10.85"})]}),Q),lv=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),(0,u.jsx)("path",{d:"M12 17l0 .01"}),(0,u.jsx)("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),Q),q8=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M7 4v16l13 -8z"})]}),Q),J8=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z",strokeWidth:"0",fill:"currentColor"})]}),Q),Q8=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M5 12l5 5l10 -10"})]}),Q),sv=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z"}),(0,u.jsx)("path",{d:"M12 9v4"}),(0,u.jsx)("path",{d:"M12 17h.01"})]}),Q),cv=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M11 7l6 6"}),(0,u.jsx)("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"})]}),Q),dv=L((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M12 3l-4 7h8z"}),(0,u.jsx)("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),(0,u.jsx)("path",{d:"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"})]}),Q),ud=L((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 7l16 0"}),(0,u.jsx)("path",{d:"M4 17l16 0"}),(0,u.jsx)("path",{d:"M7 4l0 16"}),(0,u.jsx)("path",{d:"M17 4l0 16"})]}),Q),pd=L((0,u.jsx)("path",{fill:"currentColor",d:"M407.48,111.18C335.587,108.103 269.573,152.338 245.08,220C220.587,152.338 154.573,108.103 82.68,111.18C80.285,168.229 107.577,222.632 154.74,254.82C178.908,271.419 193.35,298.951 193.27,328.27L193.27,379.13L296.9,379.13L296.9,328.27C296.816,298.953 311.255,271.42 335.42,254.82C382.596,222.644 409.892,168.233 407.48,111.18Z"})),ca=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M4.16602 10H15.8327"}),(0,u.jsx)("path",{d:"M12.5 13.3333L15.8333 10"}),(0,u.jsx)("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),ce),fd=L((0,u.jsxs)("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[(0,u.jsx)("path",{clipRule:"evenodd",d:"m9.644 13.69 7.774-7.773a2.357 2.357 0 0 0-3.334-3.334l-7.773 7.774L8 12l1.643 1.69Z"}),(0,u.jsx)("path",{d:"m13.25 3.417 3.333 3.333M10 10l2-2M5 15l3-3M2.156 17.894l1-1M5.453 19.029l-.144-1.407M2.377 11.887l.866 1.118M8.354 17.273l-1.194-.758M.953 14.652l1.408.13"})]}),20),da=L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z"}),(0,u.jsx)("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),(0,u.jsx)("path",{d:"M15 6l3 3"}),(0,u.jsx)("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),(0,u.jsx)("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),Q),e7=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z"}),(0,u.jsx)("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),(0,u.jsx)("path",{d:"M15 6l3 3"}),(0,u.jsx)("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),(0,u.jsx)("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),Q),Wl=L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35"}),(0,u.jsx)("path",{d:"M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946"}),(0,u.jsx)("path",{d:"M6 7.63c-1.391 -.236 -2.787 .395 -3.534 1.689a3.474 3.474 0 0 0 1.271 4.745l4.263 2.514l6 -3.348"}),(0,u.jsx)("path",{d:"M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45"}),(0,u.jsx)("path",{d:"M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946"}),(0,u.jsx)("path",{d:"M18 16.302c1.391 .236 2.787 -.395 3.534 -1.689a3.474 3.474 0 0 0 -1.271 -4.745l-4.308 -2.514l-5.955 3.42"})]}),Q),mv=L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),(0,u.jsx)("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),(0,u.jsx)("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),(0,u.jsx)("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"})]}),Q),ma=L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"}),(0,u.jsx)("path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"})]}),Q),uv=L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"}),(0,u.jsx)("path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"}),(0,u.jsx)("path",{d:"M3 3l18 18"})]}),Q),pv=L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),(0,u.jsx)("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),(0,u.jsx)("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),(0,u.jsx)("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),(0,u.jsx)("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),(0,u.jsx)("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),Q),fv=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),(0,u.jsx)("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),(0,u.jsx)("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),(0,u.jsx)("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),(0,u.jsx)("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),(0,u.jsx)("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),Q),hd=L((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),(0,u.jsx)("path",{d:"M21 21l-6 -6"})]}),Q),hv=L((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M20.984 12.53a9 9 0 1 0 -7.552 8.355"}),(0,u.jsx)("path",{d:"M12 7v5l3 3"}),(0,u.jsx)("path",{d:"M19 16l-2 3h4l-2 3"})]}),Q),gv=L((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M9 2m0 3a3 3 0 0 1 3 -3h0a3 3 0 0 1 3 3v5a3 3 0 0 1 -3 3h0a3 3 0 0 1 -3 -3z"}),(0,u.jsx)("path",{d:"M5 10a7 7 0 0 0 14 0"}),(0,u.jsx)("path",{d:"M8 21l8 0"}),(0,u.jsx)("path",{d:"M12 17l0 4"})]}),Q),bv=L((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 3l18 18"}),(0,u.jsx)("path",{d:"M9 5a3 3 0 0 1 6 0v5a3 3 0 0 1 -.13 .874m-2 2a3 3 0 0 1 -3.87 -2.872v-1"}),(0,u.jsx)("path",{d:"M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85"}),(0,u.jsx)("path",{d:"M8 21l8 0"}),(0,u.jsx)("path",{d:"M12 17l0 4"})]}),Q),gd=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"})]}),Q),xv=L((0,u.jsxs)("g",{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M8 8m0 1a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1z"}),(0,u.jsx)("path",{d:"M12 20v.01"}),(0,u.jsx)("path",{d:"M16 20v.01"}),(0,u.jsx)("path",{d:"M8 20v.01"}),(0,u.jsx)("path",{d:"M4 20v.01"}),(0,u.jsx)("path",{d:"M4 16v.01"}),(0,u.jsx)("path",{d:"M4 12v.01"}),(0,u.jsx)("path",{d:"M4 8v.01"}),(0,u.jsx)("path",{d:"M4 4v.01"}),(0,u.jsx)("path",{d:"M8 4v.01"}),(0,u.jsx)("path",{d:"M12 4v.01"}),(0,u.jsx)("path",{d:"M16 4v.01"}),(0,u.jsx)("path",{d:"M20 4v.01"}),(0,u.jsx)("path",{d:"M20 8v.01"}),(0,u.jsx)("path",{d:"M20 12v.01"}),(0,u.jsx)("path",{d:"M20 16v.01"}),(0,u.jsx)("path",{d:"M20 20v.01"})]}),Q),vv=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M5 3v18"}),(0,u.jsx)("path",{d:"M19 21v-18"}),(0,u.jsx)("path",{d:"M5 7h14"}),(0,u.jsx)("path",{d:"M5 15h14"}),(0,u.jsx)("path",{d:"M8 13v4"}),(0,u.jsx)("path",{d:"M11 13v4"}),(0,u.jsx)("path",{d:"M16 13v4"}),(0,u.jsx)("path",{d:"M14 5v4"}),(0,u.jsx)("path",{d:"M11 5v4"}),(0,u.jsx)("path",{d:"M8 5v4"}),(0,u.jsx)("path",{d:"M3 21h18"})]}),Q),yv=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 12l18 0"}),(0,u.jsx)("path",{d:"M7 16l10 0l-10 5l0 -5"}),(0,u.jsx)("path",{d:"M7 8l10 0l-10 -5l0 5"})]}),Q),Ev=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M12 3l0 18"}),(0,u.jsx)("path",{d:"M16 7l0 10l5 0l-5 -10"}),(0,u.jsx)("path",{d:"M8 7l0 10l-5 0l5 -10"})]}),Q),Yp=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"}),(0,u.jsx)("path",{d:"M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"}),(0,u.jsx)("path",{d:"M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"})]}),Q),bd=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"}),(0,u.jsx)("path",{d:"M22 22l-3 -3"}),(0,u.jsx)("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),(0,u.jsx)("path",{d:"M3 11v-1"}),(0,u.jsx)("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),(0,u.jsx)("path",{d:"M10 3h1"}),(0,u.jsx)("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"})]}),Q),wv=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),(0,u.jsx)("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),(0,u.jsx)("path",{d:"M4 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"}),(0,u.jsx)("path",{d:"M10 15l2 6l2 -6"}),(0,u.jsx)("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"})]}),Q),Cv=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),(0,u.jsx)("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),(0,u.jsx)("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"}),(0,u.jsx)("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"}),(0,u.jsx)("path",{d:"M11 21v-6l3 6v-6"})]}),Q),Tv=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 13v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a2 2 0 0 0 6 0v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a8 8 0 0 1 -16 0"}),(0,u.jsx)("path",{d:"M4 8l5 0"}),(0,u.jsx)("path",{d:"M15 8l4 0"})]}),Q),Sv=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 14c.83 .642 2.077 1.017 3.5 1c1.423 .017 2.67 -.358 3.5 -1c.83 -.642 2.077 -1.017 3.5 -1c1.423 -.017 2.67 .358 3.5 1"}),(0,u.jsx)("path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),(0,u.jsx)("path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),(0,u.jsx)("path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z"}),(0,u.jsx)("path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555"})]}),Q),kv=L((0,u.jsxs)("g",{stroke:"currentColor",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 5a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-16a1 1 0 0 1-1-1v-10zM7 20h10M9 16v4M15 16v4"})]}),{...Q,strokeWidth:1.5}),t7=L((0,u.jsxs)("g",{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M10 12l10 0"}),(0,u.jsx)("path",{d:"M10 12l4 4"}),(0,u.jsx)("path",{d:"M10 12l4 -4"}),(0,u.jsx)("path",{d:"M4 4l0 16"})]}),Q),Iv=L((0,u.jsxs)("g",{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8z"}),(0,u.jsx)("path",{d:"M10 9l5 3l-5 3z"})]}),Q);var _v=v(k(),1),U6=(t,e)=>{let o=new Set(ye(t.filter(r=>Ee(r)),e).map(r=>r.id));return{elements:t.map(r=>e.selectedElementIds[r.id]?me(r,{isDeleted:!0}):r.frameId&&o.has(r.frameId)?me(r,{isDeleted:!0}):bt(r)&&e.selectedElementIds[r.containerId]?me(r,{isDeleted:!0}):r),appState:{...e,selectedElementIds:{},selectedGroupIds:{}}}},Mv=(t,e)=>{if(t.editingGroupId){let o=pt(ve(e),t.editingGroupId);if(o.length)return{...t,selectedElementIds:{[o[0].id]:!0}}}return t},Gl=$({name:"deleteSelectedElements",label:"labels.delete",icon:Jo,trackEvent:{category:"element",action:"delete"},perform:(t,e,o,r)=>{if(e.editingLinearElement){let{elementId:a,selectedPointsIndices:l,startBindingElement:s,endBindingElement:c}=e.editingLinearElement,d=r.scene.getNonDeletedElementsMap(),m=ue.getElement(a,d);if(!m||l==null)return!1;if(m.points.length<2){let f=t.map(x=>x.id===m.id?me(x,{isDeleted:!0}):x),b=Mv(e,f);return{elements:f,appState:{...b,editingLinearElement:null},commitToHistory:!1}}let p={startBindingElement:l?.includes(0)?null:s,endBindingElement:l?.includes(m.points.length-1)?null:c};return ue.deletePoints(m,l),{elements:t,appState:{...e,editingLinearElement:{...e.editingLinearElement,...p,selectedPointsIndices:l?.[0]>0?[l[0]-1]:[0]}},commitToHistory:!0}}let{elements:n,appState:i}=U6(t,e);return Wi(n,t.filter(({id:a})=>e.selectedElementIds[a])),i=Mv(i,n),{elements:n,appState:{...i,activeTool:nt(e,{type:"selection"}),multiElement:null,activeEmbeddable:null},commitToHistory:Fe(ve(t),e)}},keyTest:(t,e,o)=>(t.key===T.BACKSPACE||t.key===T.DELETE)&&!t[T.CTRL_OR_CMD],PanelComponent:({elements:t,appState:e,updateData:o})=>(0,_v.jsx)(se,{type:"button",icon:Jo,title:g("labels.delete"),"aria-label":g("labels.delete"),onClick:()=>o(null),visible:Fe(ve(t),e)})});h();h();var Zp=(t,e)=>t.frameId===e||t.id===e,Lv=(t,e,o)=>{let r=[],n=[],i=null,a=-1,l=xe(o||ye(t,e,{includeBoundTextElement:!0,includeElementsInFrames:!0}));for(;++a<t.length;){let s=t[a];l.get(s.id)?(n.length&&(r=r.concat(n),n=[]),r.push(a),i=a+1):s.isDeleted&&i===a?(i=a+1,n.push(a)):n=[]}return r},W6=t=>{let e=0;return t.reduce((o,r,n)=>(n>0&&t[n-1]!==r-1&&(e=++e),(o[e]||(o[e]=[])).push(r),o),[])},Av=(t,e,o)=>{if("containerId"in t&&t.containerId)if(o==="left"){let r=To.getScene(t).getElement(t.containerId);if(r)return e.indexOf(r)}else return e.indexOf(t);else{let r=t.boundElements?.find(n=>n.type!=="arrow")?.id;if(r){if(o==="left")return e.indexOf(t);let n=To.getScene(t).getElement(r);if(n)return e.indexOf(n)}}},G6=(t,e)=>{let o=-1,r=-1;return t.forEach((n,i)=>{Zp(n,e)&&(o===-1&&(o=i),r=i)}),o===-1?[]:t.slice(o,r+1)},V6=(t,e,o,r,n)=>{let i=e[o],a=m=>m.isDeleted?!1:n?m.frameId===n:t.editingGroupId?m.groupIds.includes(t.editingGroupId):!0,l=r==="left"?zu(e,m=>a(m),Math.max(0,o-1)):Bu(e,m=>a(m),o+1),s=e[l];if(!s)return-1;if(t.editingGroupId){if(i?.groupIds.join("")===s?.groupIds.join(""))return Av(s,e,r)??l;if(!s?.groupIds.includes(t.editingGroupId))return-1}if(!n&&(s.frameId||Ee(s))){let m=G6(e,s.frameId||s.id);return r==="left"?e.indexOf(m[0]):e.indexOf(m[m.length-1])}if(!s.groupIds.length)return Av(s,e,r)??l;let c=t.editingGroupId?s.groupIds[s.groupIds.indexOf(t.editingGroupId)-1]:s.groupIds[s.groupIds.length-1],d=pt(e,c);return d.length?r==="left"?e.indexOf(d[0]):e.indexOf(d[d.length-1]):l},Pv=(t,e)=>e.reduce((o,r)=>{let n=t[r];return o.set(n.id,n),o},new Map),Rv=(t,e,o)=>{let r=Lv(t,e),n=Pv(t,r),i=W6(r);o==="right"&&(i=i.reverse());let a=new Set(r.filter(l=>Ee(t[l])).map(l=>t[l].id));return i.forEach((l,s)=>{let c=l[0],d=l[l.length-1],m=o==="left"?c:d,p=l.some(C=>{let w=t[C];return w.frameId&&a.has(w.frameId)})?null:t[m]?.frameId,f=V6(e,t,m,o,p);if(f===-1||m===f)return;let b=o==="left"?t.slice(0,f):t.slice(0,c),x=t.slice(c,d+1),y=o==="left"?t.slice(f,c):t.slice(d+1,f+1),S=o==="left"?t.slice(d+1):t.slice(f+1);t=o==="left"?[...b,...x,...y,...S]:[...b,...y,...x,...S]}),po(t,n),t},Dv=(t,e,o,r,n)=>{let i=Lv(t,e,n),a=Pv(t,i),l=[],s,c;if(o==="left"){if(r)s=Bu(t,b=>Zp(b,r));else if(e.editingGroupId){let b=pt(t,e.editingGroupId);if(!b.length)return t;s=t.indexOf(b[0])}else s=0;c=i[i.length-1]}else{if(r)c=zu(t,b=>Zp(b,r));else if(e.editingGroupId){let b=pt(t,e.editingGroupId);if(!b.length)return t;c=t.indexOf(b[b.length-1])}else c=t.length-1;s=i[0]}s===-1&&(s=0);for(let b=s;b<c+1;b++)i.includes(b)||l.push(t[b]);let d=Array.from(a.values()),m=t.slice(0,s),p=t.slice(c+1),f=o==="left"?[...m,...d,...l,...p]:[...m,...l,...d,...p];return po(f,a),f};function Nv(t,e,o,r){let n=xe(ye(t,e,{includeBoundTextElement:!0,includeElementsInFrames:!0})),i={regularElements:[],frameChildren:new Map},a=new Set;for(let c of t)n.has(c.id)&&Ee(c)&&a.add(c.id);for(let c of t)if(n.has(c.id))if(Ee(c)||c.frameId&&a.has(c.frameId))i.regularElements.push(c);else if(!c.frameId)i.regularElements.push(c);else{let d=i.frameChildren.get(c.frameId)||[];d.push(c),i.frameChildren.set(c.frameId,d)}let l=t,s=Array.from(i.frameChildren.entries());for(let[c,d]of s)l=r(t,e,o,c,d);return r(l,e,o,null,i.regularElements)}var Ov=(t,e)=>Rv(t,e,"left"),Fv=(t,e)=>Rv(t,e,"right"),Bv=(t,e)=>Nv(t,e,"left",Dv),zv=(t,e)=>Nv(t,e,"right",Dv);var Vl=v(k(),1),jp=$({name:"sendBackward",label:"labels.sendBackward",icon:Pp,trackEvent:{category:"element"},perform:(t,e)=>({elements:Ov(t,e),appState:e,commitToHistory:!0}),keyPriority:40,keyTest:t=>t[T.CTRL_OR_CMD]&&!t.shiftKey&&t.code===pe.BRACKET_LEFT,PanelComponent:({updateData:t,appState:e})=>(0,Vl.jsx)("button",{type:"button",className:"zIndexButton",onClick:()=>t(null),title:`${g("labels.sendBackward")} \u2014 ${N("CtrlOrCmd+[")}`,children:Pp})}),Xp=$({name:"bringForward",label:"labels.bringForward",icon:Lp,trackEvent:{category:"element"},perform:(t,e)=>({elements:Fv(t,e),appState:e,commitToHistory:!0}),keyPriority:40,keyTest:t=>t[T.CTRL_OR_CMD]&&!t.shiftKey&&t.code===pe.BRACKET_RIGHT,PanelComponent:({updateData:t,appState:e})=>(0,Vl.jsx)("button",{type:"button",className:"zIndexButton",onClick:()=>t(null),title:`${g("labels.bringForward")} \u2014 ${N("CtrlOrCmd+]")}`,children:Lp})}),qp=$({name:"sendToBack",label:"labels.sendToBack",icon:Dp,trackEvent:{category:"element"},perform:(t,e)=>({elements:Bv(t,e),appState:e,commitToHistory:!0}),keyTest:t=>Vo?t[T.CTRL_OR_CMD]&&t.altKey&&t.code===pe.BRACKET_LEFT:t[T.CTRL_OR_CMD]&&t.shiftKey&&t.code===pe.BRACKET_LEFT,PanelComponent:({updateData:t,appState:e})=>(0,Vl.jsx)("button",{type:"button",className:"zIndexButton",onClick:()=>t(null),title:`${g("labels.sendToBack")} \u2014 ${Vo?N("CtrlOrCmd+Alt+["):N("CtrlOrCmd+Shift+[")}`,children:Dp})}),Jp=$({name:"bringToFront",label:"labels.bringToFront",icon:Rp,trackEvent:{category:"element"},perform:(t,e)=>({elements:zv(t,e),appState:e,commitToHistory:!0}),keyTest:t=>Vo?t[T.CTRL_OR_CMD]&&t.altKey&&t.code===pe.BRACKET_RIGHT:t[T.CTRL_OR_CMD]&&t.shiftKey&&t.code===pe.BRACKET_RIGHT,PanelComponent:({updateData:t,appState:e})=>(0,Vl.jsx)("button",{type:"button",className:"zIndexButton",onClick:o=>t(null),title:`${g("labels.bringToFront")} \u2014 ${Vo?N("CtrlOrCmd+Alt+]"):N("CtrlOrCmd+Shift+]")}`,children:Rp})});h();var Qp=$({name:"selectAll",label:"labels.selectAll",icon:xv,trackEvent:{category:"canvas"},viewMode:!1,perform:(t,e,o,r)=>{if(e.editingLinearElement)return!1;let n=ea(t.filter(i=>!i.isDeleted&&!(le(i)&&i.containerId)&&!i.locked)).reduce((i,a)=>(i[a.id]=!0,i),{});return{appState:{...e,...Dt({editingGroupId:null,selectedElementIds:n},ve(t),e,r),selectedLinearElement:Object.keys(n).length===1&&Ne(t[0])?new ue(t[0]):null},commitToHistory:!0}},keyTest:t=>t[T.CTRL_OR_CMD]&&t.key===T.A});h();h();var K6=t=>{let e=t.slice(),o=new Set,r=i=>{let a=i[0]?.groupIds?.join(""),l=[i[0]],s=[];for(let c of i.slice(1))c.groupIds?.join("")===a?l.push(c):s.push(c);return s.length?[...l,...r(s)]:l},n=new Map;return e.forEach((i,a)=>{if(!n.has(i.id))if(i.groupIds?.length){let l=i.groupIds[i.groupIds.length-1],s=e.slice(a).filter(c=>{let d=c?.groupIds?.some(m=>m===l);return d&&n.set(c.id,!0),d});for(let c of r(s))o.add(c)}else o.add(i)}),o.size!==t.length?(console.error("normalizeGroupElementOrder: lost some elements... bailing!"),t):[...o]},Y6=t=>{let e=N1(t),o=t.slice(),r=new Set;return o.forEach((n,i)=>{n&&(n.boundElements?.length?(r.add(n),o[i]=null,n.boundElements.forEach(a=>{let l=e.get(a.id);l&&a.type==="text"&&(r.add(l[0]),o[l[1]]=null)})):n.type==="text"&&n.containerId&&e.get(n.containerId)?.[0].boundElements?.find(l=>l.id===n.id)||(r.add(n),o[i]=null))}),r.size!==t.length?(console.error("normalizeBoundElementsOrder: lost some elements... bailing!"),t):[...r]},Hv=t=>Y6(K6(t));var $v=v(k(),1),ef=$({name:"duplicateSelection",label:"labels.duplicateSelection",icon:zl,trackEvent:{category:"element"},perform:(t,e,o,r)=>{let n=r.scene.getNonDeletedElementsMap();if(e.editingLinearElement){let i=ue.duplicateSelectedPoints(e,n);return i?{elements:t,appState:i.appState,commitToHistory:!0}:!1}return{...Z6(t,e),commitToHistory:!0}},keyTest:t=>t[T.CTRL_OR_CMD]&&t.key===T.D,PanelComponent:({elements:t,appState:e,updateData:o})=>(0,$v.jsx)(se,{type:"button",icon:zl,title:`${g("labels.duplicateSelection")} \u2014 ${N("CtrlOrCmd+D")}`,"aria-label":g("labels.duplicateSelection"),onClick:()=>o(null),visible:Fe(ve(t),e)})}),Z6=(t,e)=>{let o=Hv(t),r=new Map,n=[],i=[],a=new Map,l=new Map,s=C=>{let w=Sc(e.editingGroupId,r,C,{x:C.x+Ar/2,y:C.y+Ar/2});return l.set(w.id,w),a.set(C.id,w.id),i.push(C),n.push(w),w},c=xe(ye(o,e,{includeBoundTextElement:!0,includeElementsInFrames:!0})),d=new Map,m=C=>{for(let w of C)d.set(w.id,!0);return C},p=[],f=-1;for(;++f<o.length;){let C=o[f];if(d.get(C.id))continue;let w=st(C,xe(t)),M=Ee(C);if(c.get(C.id)){if(C.groupIds.length||w||M){let B=gb(e,C);if(B){let I=pt(o,B).flatMap(_=>Ee(_)?[...hn(t,_.id),_]:[_]);p.push(...m([...I,...I.map(_=>s(_))]));continue}if(w){p.push(...m([C,w,s(C),s(w)]));continue}if(M){let I=hn(o,C.id);p.push(...m([...I,C,...I.map(_=>s(_)),s(C)]));continue}}(!C.frameId||!c.has(C.frameId))&&p.push(...m([C,s(C)]))}else p.push(...m([C]))}let b=[],x=new Map;for(f=p.length;--f>=0;){let C=p[f];x.get(C.id)||(x.set(C.id,!0),b.push(C))}let y=b.reverse();po(y,xe([...i,...n])),gc(p,i,a),hc(p,i,a),Fc(y,i,a);let S=ea(n);return{elements:y,appState:{...e,...Dt({editingGroupId:e.editingGroupId,selectedElementIds:S.reduce((C,w)=>(bt(w)||(C[w.id]=!0),C),{})},ve(y),e,null)}}};h();h();var j6=["ai","command_palette"],ge=(t,e,o,r)=>{try{if(typeof window>"u"||E.VITE_WORKER_ID||E.PROD||!j6.includes(t))return;E.PROD||console.info("trackEvent",{category:t,action:e,label:o,value:r}),window.sa_event&&window.sa_event(e,{category:t,label:o,value:r})}catch(n){console.error("error during analytics",n)}};h();var ua=v(k(),1),gr=t=>(0,ua.jsx)("div",{className:"buttonList buttonListIcon",children:t.options.map(e=>t.type==="button"?(0,ua.jsx)("button",{onClick:o=>t.onClick(e.value,o),className:z({active:e.active??t.value===e.value}),"data-testid":e.testId,title:e.text,children:e.icon},e.text):(0,ua.jsxs)("label",{className:z({active:t.value===e.value}),title:e.text,children:[(0,ua.jsx)("input",{type:"radio",name:t.group,onChange:()=>t.onChange(e.value),checked:t.value===e.value,"data-testid":e.testId}),e.icon]},e.text))});h();h();var xd=v(k(),1),Uv=({onChange:t,type:e,activeColor:o,topPicks:r})=>{let n;return e==="elementStroke"&&(n=Gs),e==="elementBackground"&&(n=Vs),e==="canvasBackground"&&(n=Ks),r&&(n=r),n?(0,xd.jsx)("div",{className:"color-picker__top-picks",children:n.map(i=>(0,xd.jsx)("button",{className:z("color-picker__button",{active:i===o,"is-transparent":i==="transparent"||!i}),style:{"--swatch-color":i},type:"button",title:i,onClick:()=>t(i),"data-testid":`color-top-pick-${i}`,children:(0,xd.jsx)("div",{className:"color-picker__button-outline"})},i))}):(console.error("Invalid type for TopPicks"),null)};h();var xn=v(H(),1);h();var vd=v(H(),1);h();var bn=({palette:t,color:e})=>{for(let[o,r]of Object.entries(t))if(Array.isArray(r)){let n=r.indexOf(e);if(n>-1)return{colorName:o,shade:n}}else if(r===e)return{colorName:o,shade:null};return null},Kl=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),tf=({color:t,palette:e})=>!Object.values(e).flat().includes(t),Gv=(t,e,o)=>{let r={elementBackground:"backgroundColor",elementStroke:"strokeColor"},n=t.filter(a=>{if(a.isDeleted)return!1;let l=a[r[e]];return tf({color:l,palette:o})}),i=new Map;return n.forEach(a=>{let l=a[r[e]];i.has(l)?i.set(l,i.get(l)+1):i.set(l,1)}),[...i.entries()].sort((a,l)=>l[1]-a[1]).map(a=>a[0]).slice(0,Zg)},Lo=Ue(null),Wv=(t,e,o)=>(t*299+e*587+o*114)/1e3>=160?"black":"white",Vv=(t,e)=>{if(e){let i=new Option().style;if(i.color=t,i.color){let a=i.color.replace(/^(rgb|rgba)\(/,"").replace(/\)$/,"").replace(/\s/g,"").split(","),l=parseInt(a[0]),s=parseInt(a[1]),c=parseInt(a[2]);return Wv(l,s,c)}}if(t==="transparent")return"black";let o=parseInt(t.substring(1,3),16),r=parseInt(t.substring(3,5),16),n=parseInt(t.substring(5,7),16);return Wv(o,r,n)};h();var Kv=v(k(),1),X6=({color:t,keyLabel:e,isCustomColor:o=!1,isShade:r=!1})=>(0,Kv.jsxs)("div",{className:"color-picker__button__hotkey-label",style:{color:Vv(t,o)},children:[r&&"\u21E7",e]}),pa=X6;var Gr=v(k(),1),Yv=({hex:t,onChange:e,palette:o})=>{let r=bn({color:t||"transparent",palette:o}),[n,i]=Ce(Lo),a=(0,vd.useRef)(null);if((0,vd.useEffect)(()=>{a.current&&n==="shades"&&a.current.focus()},[r,n]),r){let{colorName:l,shade:s}=r,c=o[l];if(Array.isArray(c))return(0,Gr.jsx)("div",{className:"color-picker-content--default shades",children:c.map((d,m)=>(0,Gr.jsxs)("button",{ref:m===s&&n==="shades"?a:void 0,tabIndex:-1,type:"button",className:z("color-picker__button color-picker__button--large",{active:m===s}),"aria-label":"Shade",title:`${l} - ${m+1}`,style:d?{"--swatch-color":d}:void 0,onClick:()=>{e(d),i("shades")},children:[(0,Gr.jsx)("div",{className:"color-picker__button-outline"}),(0,Gr.jsx)(pa,{color:d,keyLabel:m+1,isShade:!0})]},m))})}return(0,Gr.jsxs)("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[(0,Gr.jsx)("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),(0,Gr.jsx)("div",{tabIndex:-1,style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:"0.75rem"},children:g("colorPicker.noShades")})]})};h();var yd=v(H(),1);var fa=v(k(),1),q6=({palette:t,color:e,onChange:o,label:r,activeShade:n})=>{let i=bn({color:e||"transparent",palette:t}),[a,l]=Ce(Lo),s=(0,yd.useRef)(null);return(0,yd.useEffect)(()=>{s.current&&a==="baseColors"&&s.current.focus()},[i?.colorName,a]),(0,fa.jsx)("div",{className:"color-picker-content--default",children:Object.entries(t).map(([c,d],m)=>{let p=(Array.isArray(d)?d[n]:d)||"transparent",f=Kl[m],b=g(`colors.${c.replace(/\d+/,"")}`,null,"");return(0,fa.jsxs)("button",{ref:i?.colorName===c?s:void 0,tabIndex:-1,type:"button",className:z("color-picker__button color-picker__button--large",{active:i?.colorName===c,"is-transparent":p==="transparent"||!p}),onClick:()=>{o(p),l("baseColors")},title:`${b}${p.startsWith("#")?` ${p}`:""} \u2014 ${f}`,"aria-label":`${b} \u2014 ${f}`,style:p?{"--swatch-color":p}:void 0,"data-testid":`color-${c}`,children:[(0,fa.jsx)("div",{className:"color-picker__button-outline"}),(0,fa.jsx)(pa,{color:p,keyLabel:f})]},c)})})},Zv=q6;h();var Ed=v(H(),1);var ha=v(k(),1),jv=({colors:t,color:e,onChange:o,label:r})=>{let[n,i]=Ce(Lo),a=(0,Ed.useRef)(null);return(0,Ed.useEffect)(()=>{a.current&&a.current.focus()},[e,n]),(0,ha.jsx)("div",{className:"color-picker-content--default",children:t.map((l,s)=>(0,ha.jsxs)("button",{ref:e===l?a:void 0,tabIndex:-1,type:"button",className:z("color-picker__button color-picker__button--large",{active:e===l,"is-transparent":l==="transparent"||!l}),onClick:()=>{o(l),i("custom")},title:l,"aria-label":r,style:{"--swatch-color":l},children:[(0,ha.jsx)("div",{className:"color-picker__button-outline"}),(0,ha.jsx)(pa,{color:l,keyLabel:s+1,isCustomColor:!0})]},s))})};h();var of=(t,e,o)=>{let r=Math.ceil(o/$n);switch(e=e??-1,t){case"ArrowLeft":{let n=e-1;return n<0?o-1:n}case"ArrowRight":return(e+1)%o;case"ArrowDown":{let n=e+$n;return n>=o?e%$n:n}case"ArrowUp":{let n=e-$n,i=n<0?$n*r+n:n;return i>=o?void 0:i}}},J6=({e:t,colorObj:e,onChange:o,palette:r,customColors:n,setActiveColorPickerSection:i,activeShade:a})=>{if(e?.shade!=null&&["Digit1","Digit2","Digit3","Digit4","Digit5"].includes(t.code)&&t.shiftKey){let l=Number(t.code.slice(-1))-1;return o(r[e.colorName][l]),i("shades"),!0}if(["1","2","3","4","5"].includes(t.key)&&n[Number(t.key)-1])return o(n[Number(t.key)-1]),i("custom"),!0;if(Kl.includes(t.key)){let l=Kl.indexOf(t.key),s=Object.keys(r)[l],c=r[s],d=Array.isArray(c)?c[a]:c;return o(d),i("baseColors"),!0}return!1},Xv=({event:t,activeColorPickerSection:e,palette:o,color:r,onChange:n,customColors:i,setActiveColorPickerSection:a,updateData:l,activeShade:s,onEyeDropperToggle:c,onEscape:d})=>{if(t[T.CTRL_OR_CMD])return!1;if(t.key===T.ESCAPE)return d(t),!0;if(t.key===T.ALT)return c(!0),!0;if(t.key===T.I)return c(),!0;let m=bn({color:r,palette:o});if(t.key===T.TAB){let p={custom:!!i.length,baseColors:!0,shades:m?.shade!=null,hex:!0},f=Object.entries(p).reduce((C,[w,M])=>(M&&C.push(w),C),[]),b=f.indexOf(e),x=t.shiftKey?-1:1,y=b+x>f.length-1?0:b+x<0?f.length-1:b+x,S=f[y];return S&&a(S),S==="custom"?n(i[0]):S==="baseColors"&&(Object.entries(o).find(([w,M])=>Array.isArray(M)?M.includes(r):M===r?w:null)||n(Ir.black)),t.preventDefault(),t.stopPropagation(),!0}if(J6({e:t,colorObj:m,onChange:n,palette:o,customColors:i,setActiveColorPickerSection:a,activeShade:s}))return!0;if(e==="shades"&&m){let{shade:p}=m,f=of(t.key,p,$n);if(f!==void 0)return n(o[m.colorName][f]),!0}if(e==="baseColors"&&m){let{colorName:p}=m,f=Object.keys(o),b=f.indexOf(p),x=of(t.key,b,f.length);if(x!==void 0){let y=f[x],S=o[y];return n(Array.isArray(S)?S[s]:S),!0}}if(e==="custom"){let p=i.indexOf(r),f=of(t.key,p,i.length);if(f!==void 0){let b=i[f];return n(b),!0}}return!1};h();var qv=v(k(),1),Q6=({children:t})=>(0,qv.jsx)("div",{className:"color-picker__heading",children:t}),ga=Q6;var fo=v(k(),1),Jv=({color:t,onChange:e,label:o,type:r,elements:n,palette:i,updateData:a,children:l,onEyeDropperToggle:s,onEscape:c})=>{let[d]=xn.default.useState(()=>r==="canvasBackground"?[]:Gv(n,r,i)),[m,p]=Ce(Lo),f=bn({color:t,palette:i});(0,xn.useEffect)(()=>{if(!m){let S=tf({color:t,palette:i}),C=S&&!d.includes(t);p(C?"hex":S?"custom":f?.shade!=null?"shades":"baseColors")}},[m,t,i,p,f,d]);let[b,x]=(0,xn.useState)(f?.shade??(r==="elementBackground"?Xg:jg));(0,xn.useEffect)(()=>{f?.shade!=null&&x(f.shade);let S=C=>{C.key===T.ALT&&s(!1)};return document.addEventListener("keyup",S,{capture:!0}),()=>{document.removeEventListener("keyup",S,{capture:!0})}},[f,s]);let y=xn.default.useRef(null);return(0,fo.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":g("labels.colorPicker"),children:(0,fo.jsxs)("div",{ref:y,onKeyDown:S=>{Xv({event:S,activeColorPickerSection:m,palette:i,color:t,onChange:e,onEyeDropperToggle:s,customColors:d,setActiveColorPickerSection:p,updateData:a,activeShade:b,onEscape:c})&&(S.preventDefault(),S.stopPropagation())},className:"color-picker-content",tabIndex:-1,children:[!!d.length&&(0,fo.jsxs)("div",{children:[(0,fo.jsx)(ga,{children:g("colorPicker.mostUsedCustomColors")}),(0,fo.jsx)(jv,{colors:d,color:t,label:g("colorPicker.mostUsedCustomColors"),onChange:e})]}),(0,fo.jsxs)("div",{children:[(0,fo.jsx)(ga,{children:g("colorPicker.colors")}),(0,fo.jsx)(Zv,{color:t,label:o,palette:i,onChange:e,activeShade:b})]}),(0,fo.jsxs)("div",{children:[(0,fo.jsx)(ga,{children:g("colorPicker.shades")}),(0,fo.jsx)(Yv,{hex:t,onChange:e,palette:i})]}),l]})})};h();h();function we(){return we=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t},we.apply(this,arguments)}var Te=v(H());h();function vt(t,e,{checkForDefaultPrevented:o=!0}={}){return function(n){if(t?.(n),o===!1||!n.defaultPrevented)return e?.(n)}}h();var Qv=v(H());function e4(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function rf(...t){return e=>t.forEach(o=>e4(o,e))}function Ot(...t){return(0,Qv.useCallback)(rf(...t),t)}h();var Qo=v(H());function xr(t,e=[]){let o=[];function r(i,a){let l=(0,Qo.createContext)(a),s=o.length;o=[...o,a];function c(m){let{scope:p,children:f,...b}=m,x=p?.[t][s]||l,y=(0,Qo.useMemo)(()=>b,Object.values(b));return(0,Qo.createElement)(x.Provider,{value:y},f)}function d(m,p){let f=p?.[t][s]||l,b=(0,Qo.useContext)(f);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${m}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,d]}let n=()=>{let i=o.map(a=>(0,Qo.createContext)(a));return function(l){let s=l?.[t]||i;return(0,Qo.useMemo)(()=>({[`__scope${t}`]:{...l,[t]:s}}),[l,s])}};return n.scopeName=t,[r,t4(n,...e)]}function t4(...t){let e=t[0];if(t.length===1)return e;let o=()=>{let r=t.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(i){let a=r.reduce((l,{useScope:s,scopeName:c})=>{let m=s(i)[`__scope${c}`];return{...l,...m}},{});return(0,Qo.useMemo)(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return o.scopeName=e.scopeName,o}h();var ht=v(H());h();var ba=v(H()),e2=v(hr());h();var at=v(H());var vn=(0,at.forwardRef)((t,e)=>{let{children:o,...r}=t,n=at.Children.toArray(o),i=n.find(r4);if(i){let a=i.props.children,l=n.map(s=>s===i?at.Children.count(a)>1?at.Children.only(null):(0,at.isValidElement)(a)?a.props.children:null:s);return(0,at.createElement)(nf,we({},r,{ref:e}),(0,at.isValidElement)(a)?(0,at.cloneElement)(a,void 0,l):null)}return(0,at.createElement)(nf,we({},r,{ref:e}),o)});vn.displayName="Slot";var nf=(0,at.forwardRef)((t,e)=>{let{children:o,...r}=t;return(0,at.isValidElement)(o)?(0,at.cloneElement)(o,{...n4(r,o.props),ref:rf(e,o.ref)}):at.Children.count(o)>1?at.Children.only(null):null});nf.displayName="SlotClone";var o4=({children:t})=>(0,at.createElement)(at.Fragment,null,t);function r4(t){return(0,at.isValidElement)(t)&&t.type===o4}function n4(t,e){let o={...e};for(let r in e){let n=t[r],i=e[r];/^on[A-Z]/.test(r)?n&&i?o[r]=(...l)=>{i(...l),n(...l)}:n&&(o[r]=n):r==="style"?o[r]={...n,...i}:r==="className"&&(o[r]=[n,i].filter(Boolean).join(" "))}return{...t,...o}}var i4=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],ct=i4.reduce((t,e)=>{let o=(0,ba.forwardRef)((r,n)=>{let{asChild:i,...a}=r,l=i?vn:e;return(0,ba.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,ba.createElement)(l,we({},a,{ref:n}))});return o.displayName=`Primitive.${e}`,{...t,[e]:o}},{});function t2(t,e){t&&(0,e2.flushSync)(()=>t.dispatchEvent(e))}h();var xa=v(H());function to(t){let e=(0,xa.useRef)(t);return(0,xa.useEffect)(()=>{e.current=t}),(0,xa.useMemo)(()=>(...o)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...o)},[])}h();var o2=v(H());function r2(t,e=globalThis?.document){let o=to(t);(0,o2.useEffect)(()=>{let r=n=>{n.key==="Escape"&&o(n)};return e.addEventListener("keydown",r),()=>e.removeEventListener("keydown",r)},[o,e])}var af="dismissableLayer.update",a4="dismissableLayer.pointerDownOutside",l4="dismissableLayer.focusOutside",n2,s4=(0,ht.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),a2=(0,ht.forwardRef)((t,e)=>{var o;let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:s,...c}=t,d=(0,ht.useContext)(s4),[m,p]=(0,ht.useState)(null),f=(o=m?.ownerDocument)!==null&&o!==void 0?o:globalThis?.document,[,b]=(0,ht.useState)({}),x=Ot(e,A=>p(A)),y=Array.from(d.layers),[S]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),C=y.indexOf(S),w=m?y.indexOf(m):-1,M=d.layersWithOutsidePointerEventsDisabled.size>0,B=w>=C,I=c4(A=>{let U=A.target,R=[...d.branches].some(W=>W.contains(U));!B||R||(i?.(A),l?.(A),A.defaultPrevented||s?.())},f),_=d4(A=>{let U=A.target;[...d.branches].some(W=>W.contains(U))||(a?.(A),l?.(A),A.defaultPrevented||s?.())},f);return r2(A=>{w===d.layers.size-1&&(n?.(A),!A.defaultPrevented&&s&&(A.preventDefault(),s()))},f),(0,ht.useEffect)(()=>{if(m)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(n2=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),i2(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=n2)}},[m,f,r,d]),(0,ht.useEffect)(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),i2())},[m,d]),(0,ht.useEffect)(()=>{let A=()=>b({});return document.addEventListener(af,A),()=>document.removeEventListener(af,A)},[]),(0,ht.createElement)(ct.div,we({},c,{ref:x,style:{pointerEvents:M?B?"auto":"none":void 0,...t.style},onFocusCapture:vt(t.onFocusCapture,_.onFocusCapture),onBlurCapture:vt(t.onBlurCapture,_.onBlurCapture),onPointerDownCapture:vt(t.onPointerDownCapture,I.onPointerDownCapture)}))});function c4(t,e=globalThis?.document){let o=to(t),r=(0,ht.useRef)(!1),n=(0,ht.useRef)(()=>{});return(0,ht.useEffect)(()=>{let i=l=>{if(l.target&&!r.current){let c=function(){l2(a4,o,s,{discrete:!0})},s={originalEvent:l};l.pointerType==="touch"?(e.removeEventListener("click",n.current),n.current=c,e.addEventListener("click",n.current,{once:!0})):c()}r.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",i),e.removeEventListener("click",n.current)}},[e,o]),{onPointerDownCapture:()=>r.current=!0}}function d4(t,e=globalThis?.document){let o=to(t),r=(0,ht.useRef)(!1);return(0,ht.useEffect)(()=>{let n=i=>{i.target&&!r.current&&l2(l4,o,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",n),()=>e.removeEventListener("focusin",n)},[e,o]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function i2(){let t=new CustomEvent(af);document.dispatchEvent(t)}function l2(t,e,o,{discrete:r}){let n=o.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:o});e&&n.addEventListener(t,e,{once:!0}),r?t2(n,i):n.dispatchEvent(i)}h();var c2=v(H()),lf=0;function d2(){(0,c2.useEffect)(()=>{var t,e;let o=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=o[0])!==null&&t!==void 0?t:s2()),document.body.insertAdjacentElement("beforeend",(e=o[1])!==null&&e!==void 0?e:s2()),lf++,()=>{lf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),lf--}},[])}function s2(){let t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}h();var lo=v(H());var sf="focusScope.autoFocusOnMount",cf="focusScope.autoFocusOnUnmount",m2={bubbles:!1,cancelable:!0};var h2=(0,lo.forwardRef)((t,e)=>{let{loop:o=!1,trapped:r=!1,onMountAutoFocus:n,onUnmountAutoFocus:i,...a}=t,[l,s]=(0,lo.useState)(null),c=to(n),d=to(i),m=(0,lo.useRef)(null),p=Ot(e,x=>s(x)),f=(0,lo.useRef)({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;(0,lo.useEffect)(()=>{if(r){let x=function(S){if(f.paused||!l)return;let C=S.target;l.contains(C)?m.current=C:ri(m.current,{select:!0})},y=function(S){f.paused||!l||l.contains(S.relatedTarget)||ri(m.current,{select:!0})};return document.addEventListener("focusin",x),document.addEventListener("focusout",y),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",y)}}},[r,l,f.paused]),(0,lo.useEffect)(()=>{if(l){p2.add(f);let x=document.activeElement;if(!l.contains(x)){let S=new CustomEvent(sf,m2);l.addEventListener(sf,c),l.dispatchEvent(S),S.defaultPrevented||(m4(g4(g2(l)),{select:!0}),document.activeElement===x&&ri(l))}return()=>{l.removeEventListener(sf,c),setTimeout(()=>{let S=new CustomEvent(cf,m2);l.addEventListener(cf,d),l.dispatchEvent(S),S.defaultPrevented||ri(x??document.body,{select:!0}),l.removeEventListener(cf,d),p2.remove(f)},0)}}},[l,c,d,f]);let b=(0,lo.useCallback)(x=>{if(!o&&!r||f.paused)return;let y=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,S=document.activeElement;if(y&&S){let C=x.currentTarget,[w,M]=u4(C);w&&M?!x.shiftKey&&S===M?(x.preventDefault(),o&&ri(w,{select:!0})):x.shiftKey&&S===w&&(x.preventDefault(),o&&ri(M,{select:!0})):S===C&&x.preventDefault()}},[o,r,f.paused]);return(0,lo.createElement)(ct.div,we({tabIndex:-1},a,{ref:p,onKeyDown:b}))});function m4(t,{select:e=!1}={}){let o=document.activeElement;for(let r of t)if(ri(r,{select:e}),document.activeElement!==o)return}function u4(t){let e=g2(t),o=u2(e,t),r=u2(e.reverse(),t);return[o,r]}function g2(t){let e=[],o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{let n=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||n?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)e.push(o.currentNode);return e}function u2(t,e){for(let o of t)if(!p4(o,{upTo:e}))return o}function p4(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function f4(t){return t instanceof HTMLInputElement&&"select"in t}function ri(t,{select:e=!1}={}){if(t&&t.focus){let o=document.activeElement;t.focus({preventScroll:!0}),t!==o&&f4(t)&&e&&t.select()}}var p2=h4();function h4(){let t=[];return{add(e){let o=t[0];e!==o&&o?.pause(),t=f2(t,e),t.unshift(e)},remove(e){var o;t=f2(t,e),(o=t[0])===null||o===void 0||o.resume()}}}function f2(t,e){let o=[...t],r=o.indexOf(e);return r!==-1&&o.splice(r,1),o}function g4(t){return t.filter(e=>e.tagName!=="A")}h();var wd=v(H());h();var b2=v(H()),Po=globalThis?.document?b2.useLayoutEffect:()=>{};var b4=wd.useId||(()=>{}),x4=0;function va(t){let[e,o]=wd.useState(b4());return Po(()=>{t||o(r=>r??String(x4++))},[t]),t||(e?`radix-${e}`:"")}h();var Ze=v(H());h();h();h();function ii(t){return t.split("-")[0]}function Zl(t){return t.split("-")[1]}function Ea(t){return["top","bottom"].includes(ii(t))?"x":"y"}function mf(t){return t==="y"?"height":"width"}function x2(t,e,o){let{reference:r,floating:n}=t,i=r.x+r.width/2-n.width/2,a=r.y+r.height/2-n.height/2,l=Ea(e),s=mf(l),c=r[s]/2-n[s]/2,d=l==="x",m;switch(ii(e)){case"top":m={x:i,y:r.y-n.height};break;case"bottom":m={x:i,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-n.width,y:a};break;default:m={x:r.x,y:r.y}}switch(Zl(e)){case"start":m[l]-=c*(o&&d?-1:1);break;case"end":m[l]+=c*(o&&d?-1:1)}return m}var w2=async(t,e,o)=>{let{placement:r="bottom",strategy:n="absolute",middleware:i=[],platform:a}=o,l=await(a.isRTL==null?void 0:a.isRTL(e)),s=await a.getElementRects({reference:t,floating:e,strategy:n}),{x:c,y:d}=x2(s,r,l),m=r,p={},f=0;for(let b=0;b<i.length;b++){let{name:x,fn:y}=i[b],{x:S,y:C,data:w,reset:M}=await y({x:c,y:d,initialPlacement:r,placement:m,strategy:n,middlewareData:p,rects:s,platform:a,elements:{reference:t,floating:e}});c=S??c,d=C??d,p={...p,[x]:{...p[x],...w}},M&&f<=50&&(f++,typeof M=="object"&&(M.placement&&(m=M.placement),M.rects&&(s=M.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:n}):M.rects),{x:c,y:d}=x2(s,m,l)),b=-1)}return{x:c,y:d,placement:m,strategy:n,middlewareData:p}};function C2(t){return typeof t!="number"?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(t):{top:t,right:t,bottom:t,left:t}}function Yl(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function ya(t,e){var o;e===void 0&&(e={});let{x:r,y:n,platform:i,rects:a,elements:l,strategy:s}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:p=!1,padding:f=0}=e,b=C2(f),x=l[p?m==="floating"?"reference":"floating":m],y=Yl(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(x)))==null||o?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:s})),S=Yl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:m==="floating"?{...a.floating,x:r,y:n}:a.reference,offsetParent:await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),strategy:s}):a[m]);return{top:y.top-S.top+b.top,bottom:S.bottom-y.bottom+b.bottom,left:y.left-S.left+b.left,right:S.right-y.right+b.right}}var v4=Math.min,ni=Math.max;function df(t,e,o){return ni(t,v4(e,o))}var Td=t=>({name:"arrow",options:t,async fn(e){let{element:o,padding:r=0}=t??{},{x:n,y:i,placement:a,rects:l,platform:s}=e;if(o==null)return{};let c=C2(r),d={x:n,y:i},m=Ea(a),p=Zl(a),f=mf(m),b=await s.getDimensions(o),x=m==="y"?"top":"left",y=m==="y"?"bottom":"right",S=l.reference[f]+l.reference[m]-d[m]-l.floating[f],C=d[m]-l.reference[m],w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o)),M=w?m==="y"?w.clientHeight||0:w.clientWidth||0:0;M===0&&(M=l.floating[f]);let B=S/2-C/2,I=c[x],_=M-b[f]-c[y],A=M/2-b[f]/2+B,U=df(I,A,_),R=(p==="start"?c[x]:c[y])>0&&A!==U&&l.reference[f]<=l.floating[f];return{[m]:d[m]-(R?A<I?I-A:_-A:0),data:{[m]:U,centerOffset:A-U}}}}),y4={left:"right",right:"left",bottom:"top",top:"bottom"};function Cd(t){return t.replace(/left|right|bottom|top/g,e=>y4[e])}function E4(t,e,o){o===void 0&&(o=!1);let r=Zl(t),n=Ea(t),i=mf(n),a=n==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(a=Cd(a)),{main:a,cross:Cd(a)}}var w4={start:"end",end:"start"};function v2(t){return t.replace(/start|end/g,e=>w4[e])}var T2=["top","right","bottom","left"],f9=T2.reduce((t,e)=>t.concat(e,e+"-start",e+"-end"),[]);var uf=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o;let{placement:r,middlewareData:n,rects:i,initialPlacement:a,platform:l,elements:s}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",flipAlignment:f=!0,...b}=t,x=ii(r),y=m||(x===a||!f?[Cd(a)]:function(A){let U=Cd(A);return[v2(A),U,v2(U)]}(a)),S=[a,...y],C=await ya(e,b),w=[],M=((o=n.flip)==null?void 0:o.overflows)||[];if(c&&w.push(C[x]),d){let{main:A,cross:U}=E4(r,i,await(l.isRTL==null?void 0:l.isRTL(s.floating)));w.push(C[A],C[U])}if(M=[...M,{placement:r,overflows:w}],!w.every(A=>A<=0)){var B,I;let A=((B=(I=n.flip)==null?void 0:I.index)!=null?B:0)+1,U=S[A];if(U)return{data:{index:A,overflows:M},reset:{placement:U}};let R="bottom";switch(p){case"bestFit":{var _;let W=(_=M.map(O=>[O,O.overflows.filter(F=>F>0).reduce((F,ee)=>F+ee,0)]).sort((O,F)=>O[1]-F[1])[0])==null?void 0:_[0].placement;W&&(R=W);break}case"initialPlacement":R=a}if(r!==R)return{reset:{placement:R}}}return{}}}};function y2(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function E2(t){return T2.some(e=>t[e]>=0)}var pf=function(t){let{strategy:e="referenceHidden",...o}=t===void 0?{}:t;return{name:"hide",async fn(r){let{rects:n}=r;switch(e){case"referenceHidden":{let i=y2(await ya(r,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:E2(i)}}}case"escaped":{let i=y2(await ya(r,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:i,escaped:E2(i)}}}default:return{}}}}},ff=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){let{x:o,y:r}=e,n=await async function(i,a){let{placement:l,platform:s,elements:c}=i,d=await(s.isRTL==null?void 0:s.isRTL(c.floating)),m=ii(l),p=Zl(l),f=Ea(l)==="x",b=["left","top"].includes(m)?-1:1,x=d&&f?-1:1,y=typeof a=="function"?a(i):a,{mainAxis:S,crossAxis:C,alignmentAxis:w}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return p&&typeof w=="number"&&(C=p==="end"?-1*w:w),f?{x:C*x,y:S*b}:{x:S*b,y:C*x}}(e,t);return{x:o+n.x,y:r+n.y,data:n}}}};function S2(t){return t==="x"?"y":"x"}var hf=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:o,y:r,placement:n}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x:S,y:C}=y;return{x:S,y:C}}},...s}=t,c={x:o,y:r},d=await ya(e,s),m=Ea(ii(n)),p=S2(m),f=c[m],b=c[p];if(i){let y=m==="y"?"bottom":"right";f=df(f+d[m==="y"?"top":"left"],f,f-d[y])}if(a){let y=p==="y"?"bottom":"right";b=df(b+d[p==="y"?"top":"left"],b,b-d[y])}let x=l.fn({...e,[m]:f,[p]:b});return{...x,data:{x:x.x-o,y:x.y-r}}}}},gf=function(t){return t===void 0&&(t={}),{options:t,fn(e){let{x:o,y:r,placement:n,rects:i,middlewareData:a}=e,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=t,d={x:o,y:r},m=Ea(n),p=S2(m),f=d[m],b=d[p],x=typeof l=="function"?l({...i,placement:n}):l,y=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(s){let B=m==="y"?"height":"width",I=i.reference[m]-i.floating[B]+y.mainAxis,_=i.reference[m]+i.reference[B]-y.mainAxis;f<I?f=I:f>_&&(f=_)}if(c){var S,C,w,M;let B=m==="y"?"width":"height",I=["top","left"].includes(ii(n)),_=i.reference[p]-i.floating[B]+(I&&(S=(C=a.offset)==null?void 0:C[p])!=null?S:0)+(I?0:y.crossAxis),A=i.reference[p]+i.reference[B]+(I?0:(w=(M=a.offset)==null?void 0:M[p])!=null?w:0)-(I?y.crossAxis:0);b<_?b=_:b>A&&(b=A)}return{[m]:f,[p]:b}}}},bf=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){let{placement:o,rects:r,platform:n,elements:i}=e,{apply:a,...l}=t,s=await ya(e,l),c=ii(o),d=Zl(o),m,p;c==="top"||c==="bottom"?(m=c,p=d===(await(n.isRTL==null?void 0:n.isRTL(i.floating))?"start":"end")?"left":"right"):(p=c,m=d==="end"?"top":"bottom");let f=ni(s.left,0),b=ni(s.right,0),x=ni(s.top,0),y=ni(s.bottom,0),S={availableHeight:r.floating.height-(["left","right"].includes(o)?2*(x!==0||y!==0?x+y:ni(s.top,s.bottom)):s[m]),availableWidth:r.floating.width-(["top","bottom"].includes(o)?2*(f!==0||b!==0?f+b:ni(s.left,s.right)):s[p])},C=await n.getDimensions(i.floating);a?.({...e,...S});let w=await n.getDimensions(i.floating);return C.width!==w.width||C.height!==w.height?{reset:{rects:!0}}:{}}}};function L2(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function Yr(t){if(t==null)return window;if(!L2(t)){let e=t.ownerDocument;return e&&e.defaultView||window}return t}function Xl(t){return Yr(t).getComputedStyle(t)}function Vr(t){return L2(t)?"":t?(t.nodeName||"").toLowerCase():""}function P2(){let t=navigator.userAgentData;return t!=null&&t.brands?t.brands.map(e=>e.brand+"/"+e.version).join(" "):navigator.userAgent}function vr(t){return t instanceof Yr(t).HTMLElement}function En(t){return t instanceof Yr(t).Element}function vf(t){return typeof ShadowRoot>"u"?!1:t instanceof Yr(t).ShadowRoot||t instanceof ShadowRoot}function Id(t){let{overflow:e,overflowX:o,overflowY:r}=Xl(t);return/auto|scroll|overlay|hidden/.test(e+r+o)}function C4(t){return["table","td","th"].includes(Vr(t))}function k2(t){let e=/firefox/i.test(P2()),o=Xl(t);return o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].includes(o.willChange)||e&&o.willChange==="filter"||e&&!!o.filter&&o.filter!=="none"}function R2(){return!/^((?!chrome|android).)*safari/i.test(P2())}var I2=Math.min,jl=Math.max,Sd=Math.round;function Kr(t,e,o){var r,n,i,a;e===void 0&&(e=!1),o===void 0&&(o=!1);let l=t.getBoundingClientRect(),s=1,c=1;e&&vr(t)&&(s=t.offsetWidth>0&&Sd(l.width)/t.offsetWidth||1,c=t.offsetHeight>0&&Sd(l.height)/t.offsetHeight||1);let d=En(t)?Yr(t):window,m=!R2()&&o,p=(l.left+(m&&(r=(n=d.visualViewport)==null?void 0:n.offsetLeft)!=null?r:0))/s,f=(l.top+(m&&(i=(a=d.visualViewport)==null?void 0:a.offsetTop)!=null?i:0))/c,b=l.width/s,x=l.height/c;return{width:b,height:x,top:f,right:p+b,bottom:f+x,left:p,x:p,y:f}}function yn(t){return(e=t,(e instanceof Yr(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}function Md(t){return En(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function D2(t){return Kr(yn(t)).left+Md(t).scrollLeft}function T4(t,e,o){let r=vr(e),n=yn(e),i=Kr(t,r&&function(s){let c=Kr(s);return Sd(c.width)!==s.offsetWidth||Sd(c.height)!==s.offsetHeight}(e),o==="fixed"),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};if(r||!r&&o!=="fixed")if((Vr(e)!=="body"||Id(n))&&(a=Md(e)),vr(e)){let s=Kr(e,!0);l.x=s.x+e.clientLeft,l.y=s.y+e.clientTop}else n&&(l.x=D2(n));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function N2(t){return Vr(t)==="html"?t:t.assignedSlot||t.parentNode||(vf(t)?t.host:null)||yn(t)}function M2(t){return vr(t)&&getComputedStyle(t).position!=="fixed"?t.offsetParent:null}function xf(t){let e=Yr(t),o=M2(t);for(;o&&C4(o)&&getComputedStyle(o).position==="static";)o=M2(o);return o&&(Vr(o)==="html"||Vr(o)==="body"&&getComputedStyle(o).position==="static"&&!k2(o))?e:o||function(r){let n=N2(r);for(vf(n)&&(n=n.host);vr(n)&&!["html","body"].includes(Vr(n));){if(k2(n))return n;n=n.parentNode}return null}(t)||e}function _2(t){if(vr(t))return{width:t.offsetWidth,height:t.offsetHeight};let e=Kr(t);return{width:e.width,height:e.height}}function O2(t){let e=N2(t);return["html","body","#document"].includes(Vr(e))?t.ownerDocument.body:vr(e)&&Id(e)?e:O2(e)}function kd(t,e){var o;e===void 0&&(e=[]);let r=O2(t),n=r===((o=t.ownerDocument)==null?void 0:o.body),i=Yr(r),a=n?[i].concat(i.visualViewport||[],Id(r)?r:[]):r,l=e.concat(a);return n?l:l.concat(kd(a))}function A2(t,e,o){return e==="viewport"?Yl(function(r,n){let i=Yr(r),a=yn(r),l=i.visualViewport,s=a.clientWidth,c=a.clientHeight,d=0,m=0;if(l){s=l.width,c=l.height;let p=R2();(p||!p&&n==="fixed")&&(d=l.offsetLeft,m=l.offsetTop)}return{width:s,height:c,x:d,y:m}}(t,o)):En(e)?function(r,n){let i=Kr(r,!1,n==="fixed"),a=i.top+r.clientTop,l=i.left+r.clientLeft;return{top:a,left:l,x:l,y:a,right:l+r.clientWidth,bottom:a+r.clientHeight,width:r.clientWidth,height:r.clientHeight}}(e,o):Yl(function(r){var n;let i=yn(r),a=Md(r),l=(n=r.ownerDocument)==null?void 0:n.body,s=jl(i.scrollWidth,i.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),c=jl(i.scrollHeight,i.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),d=-a.scrollLeft+D2(r),m=-a.scrollTop;return Xl(l||i).direction==="rtl"&&(d+=jl(i.clientWidth,l?l.clientWidth:0)-s),{width:s,height:c,x:d,y:m}}(yn(t)))}function S4(t){let e=kd(t),o=["absolute","fixed"].includes(Xl(t).position)&&vr(t)?xf(t):t;return En(o)?e.filter(r=>En(r)&&function(n,i){let a=i.getRootNode==null?void 0:i.getRootNode();if(n.contains(i))return!0;if(a&&vf(a)){let l=i;do{if(l&&n===l)return!0;l=l.parentNode||l.host}while(l)}return!1}(r,o)&&Vr(r)!=="body"):[]}var k4={getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:r,strategy:n}=t,i=[...o==="clippingAncestors"?S4(e):[].concat(o),r],a=i[0],l=i.reduce((s,c)=>{let d=A2(e,c,n);return s.top=jl(d.top,s.top),s.right=I2(d.right,s.right),s.bottom=I2(d.bottom,s.bottom),s.left=jl(d.left,s.left),s},A2(e,a,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:o,strategy:r}=t,n=vr(o),i=yn(o);if(o===i)return e;let a={scrollLeft:0,scrollTop:0},l={x:0,y:0};if((n||!n&&r!=="fixed")&&((Vr(o)!=="body"||Id(i))&&(a=Md(o)),vr(o))){let s=Kr(o,!0);l.x=s.x+o.clientLeft,l.y=s.y+o.clientTop}return{...e,x:e.x-a.scrollLeft+l.x,y:e.y-a.scrollTop+l.y}},isElement:En,getDimensions:_2,getOffsetParent:xf,getDocumentElement:yn,getElementRects:t=>{let{reference:e,floating:o,strategy:r}=t;return{reference:T4(e,xf(o),r),floating:{..._2(o),x:0,y:0}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>Xl(t).direction==="rtl"};function F2(t,e,o,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:l=!1}=r,s=n&&!l,c=i&&!l,d=s||c?[...En(t)?kd(t):[],...kd(e)]:[];d.forEach(b=>{s&&b.addEventListener("scroll",o,{passive:!0}),c&&b.addEventListener("resize",o)});let m,p=null;if(a){let b=!0;p=new ResizeObserver(()=>{b||o(),b=!1}),En(t)&&!l&&p.observe(t),p.observe(e)}let f=l?Kr(t):null;return l&&function b(){let x=Kr(t);!f||x.x===f.x&&x.y===f.y&&x.width===f.width&&x.height===f.height||o(),f=x,m=requestAnimationFrame(b)}(),o(),()=>{var b;d.forEach(x=>{s&&x.removeEventListener("scroll",o),c&&x.removeEventListener("resize",o)}),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(m)}}var B2=(t,e,o)=>w2(t,e,{platform:k4,...o});var Ft=v(H()),_d=v(H()),z2=v(hr()),yf=typeof document<"u"?_d.useLayoutEffect:_d.useEffect;function Ef(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let o,r,n;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(r=o;r--!==0;)if(!Ef(t[r],e[r]))return!1;return!0}if(n=Object.keys(t),o=n.length,o!==Object.keys(e).length)return!1;for(r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,n[r]))return!1;for(r=o;r--!==0;){let i=n[r];if(!(i==="_owner"&&t.$$typeof)&&!Ef(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function I4(t){let e=Ft.useRef(t);return yf(()=>{e.current=t}),e}function H2(t){let{middleware:e,placement:o="bottom",strategy:r="absolute",whileElementsMounted:n}=t===void 0?{}:t,i=Ft.useRef(null),a=Ft.useRef(null),l=I4(n),s=Ft.useRef(null),[c,d]=Ft.useState({x:null,y:null,strategy:r,placement:o,middlewareData:{}}),[m,p]=Ft.useState(e);Ef(m?.map(w=>{let{options:M}=w;return M}),e?.map(w=>{let{options:M}=w;return M}))||p(e);let f=Ft.useCallback(()=>{!i.current||!a.current||B2(i.current,a.current,{middleware:m,placement:o,strategy:r}).then(w=>{b.current&&z2.flushSync(()=>{d(w)})})},[m,o,r]);yf(()=>{b.current&&f()},[f]);let b=Ft.useRef(!1);yf(()=>(b.current=!0,()=>{b.current=!1}),[]);let x=Ft.useCallback(()=>{if(typeof s.current=="function"&&(s.current(),s.current=null),i.current&&a.current)if(l.current){let w=l.current(i.current,a.current,f);s.current=w}else f()},[f,l]),y=Ft.useCallback(w=>{i.current=w,x()},[x]),S=Ft.useCallback(w=>{a.current=w,x()},[x]),C=Ft.useMemo(()=>({reference:i,floating:a}),[]);return Ft.useMemo(()=>({...c,update:f,refs:C,reference:y,floating:S}),[c,f,C,y,S])}var $2=t=>{let{element:e,padding:o}=t;function r(n){return Object.prototype.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){return r(e)?e.current!=null?Td({element:e.current,padding:o}).fn(n):{}:e?Td({element:e,padding:o}).fn(n):{}}}};h();var ql=v(H());var M4=(0,ql.forwardRef)((t,e)=>{let{children:o,width:r=10,height:n=5,...i}=t;return(0,ql.createElement)(ct.svg,we({},i,{ref:e,width:r,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),t.asChild?o:(0,ql.createElement)("polygon",{points:"0,0 30,0 15,10"}))}),U2=M4;h();var W2=v(H());function G2(t){let[e,o]=(0,W2.useState)(void 0);return Po(()=>{if(t){o({width:t.offsetWidth,height:t.offsetHeight});let r=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;let i=n[0],a,l;if("borderBoxSize"in i){let s=i.borderBoxSize,c=Array.isArray(s)?s[0]:s;a=c.inlineSize,l=c.blockSize}else a=t.offsetWidth,l=t.offsetHeight;o({width:a,height:l})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else o(void 0)},[t]),e}var V2="Popper",[wf,Cf]=xr(V2),[_4,K2]=wf(V2),A4=t=>{let{__scopePopper:e,children:o}=t,[r,n]=(0,Ze.useState)(null);return(0,Ze.createElement)(_4,{scope:e,anchor:r,onAnchorChange:n},o)},L4="PopperAnchor",P4=(0,Ze.forwardRef)((t,e)=>{let{__scopePopper:o,virtualRef:r,...n}=t,i=K2(L4,o),a=(0,Ze.useRef)(null),l=Ot(e,a);return(0,Ze.useEffect)(()=>{i.onAnchorChange(r?.current||a.current)}),r?null:(0,Ze.createElement)(ct.div,we({},n,{ref:l}))}),Ad="PopperContent",[R4,D4]=wf(Ad),[N4,O4]=wf(Ad,{hasParent:!1,positionUpdateFns:new Set}),F4=(0,Ze.forwardRef)((t,e)=>{var o,r,n,i,a,l,s,c;let{__scopePopper:d,side:m="bottom",sideOffset:p=0,align:f="center",alignOffset:b=0,arrowPadding:x=0,collisionBoundary:y=[],collisionPadding:S=0,sticky:C="partial",hideWhenDetached:w=!1,avoidCollisions:M=!0,onPlaced:B,...I}=t,_=K2(Ad,d),[A,U]=(0,Ze.useState)(null),R=Ot(e,Pi=>U(Pi)),[W,O]=(0,Ze.useState)(null),F=G2(W),ee=(o=F?.width)!==null&&o!==void 0?o:0,te=(r=F?.height)!==null&&r!==void 0?r:0,be=m+(f!=="center"?"-"+f:""),ke=typeof S=="number"?S:{top:0,right:0,bottom:0,left:0,...S},de=Array.isArray(y)?y:[y],Z=de.length>0,P={padding:ke,boundary:de.filter(U4),altBoundary:Z},{reference:D,floating:V,strategy:K,x:Y,y:j,placement:J,middlewareData:re,update:ot}=H2({strategy:"fixed",placement:be,whileElementsMounted:F2,middleware:[W4(),ff({mainAxis:p+te,alignmentAxis:b}),M?hf({mainAxis:!0,crossAxis:!1,limiter:C==="partial"?gf():void 0,...P}):void 0,W?$2({element:W,padding:x}):void 0,M?uf({...P}):void 0,bf({...P,apply:({elements:Pi,availableWidth:h6,availableHeight:g6})=>{Pi.floating.style.setProperty("--radix-popper-available-width",`${h6}px`),Pi.floating.style.setProperty("--radix-popper-available-height",`${g6}px`)}}),G4({arrowWidth:ee,arrowHeight:te}),w?pf({strategy:"referenceHidden"}):void 0].filter($4)});Po(()=>{D(_.anchor)},[D,_.anchor]);let rt=Y!==null&&j!==null,[lt,$e]=Y2(J),qt=to(B);Po(()=>{rt&&qt?.()},[rt,qt]);let Ws=(n=re.arrow)===null||n===void 0?void 0:n.x,d6=(i=re.arrow)===null||i===void 0?void 0:i.y,m6=((a=re.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[u6,p6]=(0,Ze.useState)();Po(()=>{A&&p6(window.getComputedStyle(A).zIndex)},[A]);let{hasParent:f6,positionUpdateFns:Li}=O4(Ad,d),rl=!f6;(0,Ze.useLayoutEffect)(()=>{if(!rl)return Li.add(ot),()=>{Li.delete(ot)}},[rl,Li,ot]),Po(()=>{rl&&rt&&Array.from(Li).reverse().forEach(Pi=>requestAnimationFrame(Pi))},[rl,rt,Li]);let Gg={"data-side":lt,"data-align":$e,...I,ref:R,style:{...I.style,animation:rt?void 0:"none",opacity:(l=re.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}};return(0,Ze.createElement)("div",{ref:V,"data-radix-popper-content-wrapper":"",style:{position:K,left:0,top:0,transform:rt?`translate3d(${Math.round(Y)}px, ${Math.round(j)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:u6,"--radix-popper-transform-origin":[(s=re.transformOrigin)===null||s===void 0?void 0:s.x,(c=re.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:t.dir},(0,Ze.createElement)(R4,{scope:d,placedSide:lt,onArrowChange:O,arrowX:Ws,arrowY:d6,shouldHideArrow:m6},rl?(0,Ze.createElement)(N4,{scope:d,hasParent:!0,positionUpdateFns:Li},(0,Ze.createElement)(ct.div,Gg)):(0,Ze.createElement)(ct.div,Gg)))}),B4="PopperArrow",z4={top:"bottom",right:"left",bottom:"top",left:"right"},H4=(0,Ze.forwardRef)(function(e,o){let{__scopePopper:r,...n}=e,i=D4(B4,r),a=z4[i.placedSide];return(0,Ze.createElement)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},(0,Ze.createElement)(U2,we({},n,{ref:o,style:{...n.style,display:"block"}})))});function $4(t){return t!==void 0}function U4(t){return t!==null}var W4=()=>({name:"anchorCssProperties",fn(t){let{rects:e,elements:o}=t,{width:r,height:n}=e.reference;return o.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),o.floating.style.setProperty("--radix-popper-anchor-height",`${n}px`),{}}}),G4=t=>({name:"transformOrigin",options:t,fn(e){var o,r,n,i,a;let{placement:l,rects:s,middlewareData:c}=e,m=((o=c.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,p=m?0:t.arrowWidth,f=m?0:t.arrowHeight,[b,x]=Y2(l),y={start:"0%",center:"50%",end:"100%"}[x],S=((r=(n=c.arrow)===null||n===void 0?void 0:n.x)!==null&&r!==void 0?r:0)+p/2,C=((i=(a=c.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+f/2,w="",M="";return b==="bottom"?(w=m?y:`${S}px`,M=`${-f}px`):b==="top"?(w=m?y:`${S}px`,M=`${s.floating.height+f}px`):b==="right"?(w=`${-f}px`,M=m?y:`${C}px`):b==="left"&&(w=`${s.floating.width+f}px`,M=m?y:`${C}px`),{data:{x:w,y:M}}}});function Y2(t){let[e,o="center"]=t.split("-");return[e,o]}var Z2=A4,j2=P4,X2=F4,q2=H4;h();var Ld=v(H()),J2=v(hr());var Q2=(0,Ld.forwardRef)((t,e)=>{var o;let{container:r=globalThis==null||(o=globalThis.document)===null||o===void 0?void 0:o.body,...n}=t;return r?J2.default.createPortal((0,Ld.createElement)(ct.div,we({},n,{ref:e})),r):null});h();var Gt=v(H()),ey=v(hr());function V4(t,e){return(0,Gt.useReducer)((o,r)=>{let n=e[o][r];return n??o},t)}var wa=t=>{let{present:e,children:o}=t,r=K4(e),n=typeof o=="function"?o({present:r.isPresent}):Gt.Children.only(o),i=Ot(r.ref,n.ref);return typeof o=="function"||r.isPresent?(0,Gt.cloneElement)(n,{ref:i}):null};wa.displayName="Presence";function K4(t){let[e,o]=(0,Gt.useState)(),r=(0,Gt.useRef)({}),n=(0,Gt.useRef)(t),i=(0,Gt.useRef)("none"),a=t?"mounted":"unmounted",[l,s]=V4(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return(0,Gt.useEffect)(()=>{let c=Pd(r.current);i.current=l==="mounted"?c:"none"},[l]),Po(()=>{let c=r.current,d=n.current;if(d!==t){let p=i.current,f=Pd(c);t?s("MOUNT"):f==="none"||c?.display==="none"?s("UNMOUNT"):s(d&&p!==f?"ANIMATION_OUT":"UNMOUNT"),n.current=t}},[t,s]),Po(()=>{if(e){let c=m=>{let f=Pd(r.current).includes(m.animationName);m.target===e&&f&&(0,ey.flushSync)(()=>s("ANIMATION_END"))},d=m=>{m.target===e&&(i.current=Pd(r.current))};return e.addEventListener("animationstart",d),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",d),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else s("ANIMATION_END")},[e,s]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:(0,Gt.useCallback)(c=>{c&&(r.current=getComputedStyle(c)),o(c)},[])}}function Pd(t){return t?.animationName||"none"}h();var wn=v(H());function Ca({prop:t,defaultProp:e,onChange:o=()=>{}}){let[r,n]=Y4({defaultProp:e,onChange:o}),i=t!==void 0,a=i?t:r,l=to(o),s=(0,wn.useCallback)(c=>{if(i){let m=typeof c=="function"?c(t):c;m!==t&&l(m)}else n(c)},[i,t,n,l]);return[a,s]}function Y4({defaultProp:t,onChange:e}){let o=(0,wn.useState)(t),[r]=o,n=(0,wn.useRef)(r),i=to(e);return(0,wn.useEffect)(()=>{n.current!==r&&(i(r),n.current=r)},[r,n,i]),o}h();var Z4=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Ta=new WeakMap,Rd=new WeakMap,Dd={},Tf=0,ty=function(t){return t&&(t.host||ty(t.parentNode))},j4=function(t,e){return e.map(function(o){if(t.contains(o))return o;var r=ty(o);return r&&t.contains(r)?r:(console.error("aria-hidden",o,"in not contained inside",t,". Doing nothing"),null)}).filter(function(o){return!!o})},X4=function(t,e,o,r){var n=j4(e,Array.isArray(t)?t:[t]);Dd[o]||(Dd[o]=new WeakMap);var i=Dd[o],a=[],l=new Set,s=new Set(n),c=function(m){!m||l.has(m)||(l.add(m),c(m.parentNode))};n.forEach(c);var d=function(m){!m||s.has(m)||Array.prototype.forEach.call(m.children,function(p){if(l.has(p))d(p);else{var f=p.getAttribute(r),b=f!==null&&f!=="false",x=(Ta.get(p)||0)+1,y=(i.get(p)||0)+1;Ta.set(p,x),i.set(p,y),a.push(p),x===1&&b&&Rd.set(p,!0),y===1&&p.setAttribute(o,"true"),b||p.setAttribute(r,"true")}})};return d(e),l.clear(),Tf++,function(){a.forEach(function(m){var p=Ta.get(m)-1,f=i.get(m)-1;Ta.set(m,p),i.set(m,f),p||(Rd.has(m)||m.removeAttribute(r),Rd.delete(m)),f||m.removeAttribute(o)}),Tf--,Tf||(Ta=new WeakMap,Ta=new WeakMap,Rd=new WeakMap,Dd={})}},oy=function(t,e,o){o===void 0&&(o="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),n=e||Z4(t);return n?(r.push.apply(r,Array.from(n.querySelectorAll("[aria-live]"))),X4(r,n,o,"aria-hidden")):function(){return null}};h();h();h();var yr=function(){return yr=Object.assign||function(e){for(var o,r=1,n=arguments.length;r<n;r++){o=arguments[r];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},yr.apply(this,arguments)};function ry(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(o[r[n]]=t[r[n]]);return o}function ny(t,e,o){if(o||arguments.length===2)for(var r=0,n=e.length,i;r<n;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}var Bd=v(H());h();var Vt=v(H());h();var ai="right-scroll-bar-position",li="width-before-scroll-bar",Sf="with-scroll-bars-hidden",kf="--removed-body-scroll-bar-size";h();h();function iy(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}h();var ay=v(H());function ly(t,e){var o=(0,ay.useState)(function(){return{value:t,callback:e,facade:{get current(){return o.value},set current(r){var n=o.value;n!==r&&(o.value=r,o.callback(r,n))}}}})[0];return o.callback=e,o.facade}h();function If(t,e){return ly(e||null,function(o){return t.forEach(function(r){return iy(r,o)})})}h();h();h();var Sa=function(){return Sa=Object.assign||function(e){for(var o,r=1,n=arguments.length;r<n;r++){o=arguments[r];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},Sa.apply(this,arguments)};function sy(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(o[r[n]]=t[r[n]]);return o}h();function q4(t){return t}function J4(t,e){e===void 0&&(e=q4);var o=[],r=!1,n={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:t},useMedium:function(i){var a=e(i,r);return o.push(a),function(){o=o.filter(function(l){return l!==a})}},assignSyncMedium:function(i){for(r=!0;o.length;){var a=o;o=[],a.forEach(i)}o={push:function(l){return i(l)},filter:function(){return o}}},assignMedium:function(i){r=!0;var a=[];if(o.length){var l=o;o=[],l.forEach(i),a=o}var s=function(){var d=a;a=[],d.forEach(i)},c=function(){return Promise.resolve().then(s)};c(),o={push:function(d){a.push(d),c()},filter:function(d){return a=a.filter(d),o}}}};return n}function Mf(t){t===void 0&&(t={});var e=J4(null);return e.options=Sa({async:!0,ssr:!1},t),e}h();var cy=v(H()),dy=function(t){var e=t.sideCar,o=sy(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return cy.createElement(r,Sa({},o))};dy.isSideCarExport=!0;function _f(t,e){return t.useMedium(e),dy}var Nd=Mf();var Af=function(){},Jl=Vt.forwardRef(function(t,e){var o=Vt.useRef(null),r=Vt.useState({onScrollCapture:Af,onWheelCapture:Af,onTouchMoveCapture:Af}),n=r[0],i=r[1],a=t.forwardProps,l=t.children,s=t.className,c=t.removeScrollBar,d=t.enabled,m=t.shards,p=t.sideCar,f=t.noIsolation,b=t.inert,x=t.allowPinchZoom,y=t.as,S=y===void 0?"div":y,C=ry(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=p,M=If([o,e]),B=yr(yr({},C),n);return Vt.createElement(Vt.Fragment,null,d&&Vt.createElement(w,{sideCar:Nd,removeScrollBar:c,shards:m,noIsolation:f,inert:b,setCallbacks:i,allowPinchZoom:!!x,lockRef:o}),a?Vt.cloneElement(Vt.Children.only(l),yr(yr({},B),{ref:M})):Vt.createElement(S,yr({},B,{className:s,ref:M}),l))});Jl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Jl.classNames={fullWidth:li,zeroRight:ai};h();h();var je=v(H());h();h();var Od=v(H());h();h();h();var py=v(H());h();h();var my;var uy=function(){if(my)return my;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Q4(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=uy();return e&&t.setAttribute("nonce",e),t}function eC(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function tC(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var Lf=function(){var t=0,e=null;return{add:function(o){t==0&&(e=Q4())&&(eC(e,o),tC(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}};var Pf=function(){var t=Lf();return function(e,o){py.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&o])}};var Ql=function(){var t=Pf(),e=function(o){var r=o.styles,n=o.dynamic;return t(r,n),null};return e};h();var oC={left:0,top:0,right:0,gap:0},Rf=function(t){return parseInt(t||"",10)||0},rC=function(t){var e=window.getComputedStyle(document.body),o=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],n=e[t==="padding"?"paddingRight":"marginRight"];return[Rf(o),Rf(r),Rf(n)]},Df=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return oC;var e=rC(t),o=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-o+e[2]-e[0])}};var nC=Ql(),iC=function(t,e,o,r){var n=t.left,i=t.top,a=t.right,l=t.gap;return o===void 0&&(o="margin"),`
|
|
1
|
+
import{$ as f1,$a as ac,$b as Z1,$c as cb,$d as qn,$e as Pl,$f as y0,A as nn,Aa as T1,Ab as cn,Ac as J1,Ad as yb,Ae as Al,Af as d0,Ag as Be,B as Wn,Ba as S1,Bb as Ht,Bc as Cl,Bd as Eb,Be as rp,Bf as hn,Bg as L0,C as al,Ca as k1,Cb as Zn,Cc as Tl,Cd as Xn,Ce as Nb,Cf as m0,Cg as ei,D as Au,Da as Ou,Db as Oi,Dc as Yu,Dd as Br,De as Ob,Df as Ji,Dg as Hr,E as js,Ea as ln,Eb as le,Ec as Q1,Ed as wc,Ee as Fb,Ef as u0,Eg as $r,F as ll,Fa as I1,Fb as Uu,Fc as hc,Fd as wb,Fe as np,Ff as Bc,G as he,Ga as M1,Gb as gl,Gc as Wi,Gd as Cb,Ge as Pc,Gf as p0,H as Ko,Ha as _1,Hb as Ee,Hc as Zu,Hd as $,He as ip,Hf as zc,I as _r,Ia as Co,Ib as Ne,Ic as ue,Id as Io,Ie as ap,If as Hc,J as Ri,Ja as Fu,Jb as mr,Jc as eb,Jd as Oe,Je as Bb,Jf as f0,K as n1,Ka as Zo,Kb as $1,Kc as Sl,Kd as Tb,Ke as zb,Kf as $c,L as Lu,La as dl,Lb as Lr,Lc as tb,Ld as jo,Le as Hb,Lf as pr,M as Pu,Ma as nc,Mb as U1,Mc as ob,Md as pn,Me as $b,Mf as mp,N as sl,Na as Vn,Nb as Pr,Nc as kl,Nd as Xu,Ne as Ub,Nf as h0,O as i1,Oa as A1,Ob as W1,Oc as $t,Od as Sb,Oe as Wb,Of as Uc,P as a1,Pa as L1,Pb as ur,Pc as gc,Pd as Cc,Pe as Gb,Pf as g0,Q as Ar,Qa as Kn,Qb as bt,Qc as bc,Qd as Il,Qe as Vb,Qf as b0,R as l1,Ra as nt,Rb as Fi,Rc as xc,Rd as fn,Re as Kb,Rf as C6,S as Pt,Sa as N,Sb as G1,Sc as rb,Sd as kb,Se as Yb,Sf as Mo,T as Xs,Ta as Ke,Tb as V1,Tc as nb,Td as Ib,Te as lp,Tf as oe,U as s1,Ua as Jt,Ub as K1,Uc as ib,Ud as Mb,Ue as Ll,Uf as me,V as c1,Va as ml,Vb as dn,Vc as ab,Vd as Ml,Ve as Rc,Vf as up,W as d1,Wa as ul,Wb as Bi,Wc as lb,Wd as Tc,We as Zb,Wf as Qn,X as m1,Xa as ic,Xb as Y1,Xc as sb,Xd as Yi,Xe as jb,Xf as Dl,Y as u1,Ya as Bu,Yb as po,Yc as st,Yd as Sc,Ye as Xb,Yf as pp,Z as p1,Za as zu,Zb as zi,Zc as Dr,Zd as kc,Ze as qb,Zf as x0,_ as Gn,_a as Yn,_b as To,_c as vc,_d as qu,_e as Dc,_f as v0,a as It,aa as h1,ab as P1,ac as Rr,ad as db,ae as _b,af as Jb,ag as E0,b as Zg,ba as g1,bb as R1,bc as mn,bd as mb,be as Zi,bf as Qb,bg as w0,c as $n,ca as qs,cb as D1,cc as bl,cd as ub,ce as ji,cf as e0,cg as Wc,d as jg,da as Js,db as xe,dc as Qt,dd as Gi,de as Ic,df as t0,dg as fp,e as Xg,ea as Ru,eb as N1,ec as j1,ed as ju,ee as Ju,ef as o0,eg as hp,f as Ir,fa as b1,fb as lc,fc as xl,fd as pb,fe as Qu,ff as Nc,fg as gp,g as Gs,ga as x1,gb as O1,gc as vl,gd as fb,ge as x6,gf as r0,gg as C0,h as Vs,ha as v1,hb as sc,hc as un,hd as Nr,he as ep,hf as n0,hg as T0,i as Ks,ia as y1,ib as Di,ic as yl,id as Ut,ie as _l,if as sp,ig as S0,j as qg,ja as E1,jb as F1,jc as Wu,jd as Ye,jf as Xi,jg as k0,k as Jg,ka as Qs,kb as Ni,kc as Gu,kd as yc,kf as i0,kg as I0,l as Qg,la as an,lb as pl,lc as Vu,ld as So,lf as a0,lg as M0,m as Vo,ma as w1,mb as Rt,mc as Hi,md as b6,mf as l0,mg as bp,n as Ys,na as Du,nb as sn,nc as X1,nd as Vi,nf as Oc,ng as Qi,o as Mr,oa as C1,ob as cc,oc as pe,od as ko,oe as Ab,of as s0,og as T6,p as e1,pa as ec,pb as B1,pc as T,pd as Or,pe as Lb,pf as qi,pg as xp,q as t1,qa as Nu,qb as Hu,qc as $i,qd as hb,qe as Mc,qf as Jn,qg as vp,r as nl,ra as yo,rb as dr,rc as uc,rd as Dt,re as _c,rf as cp,rg as ve,s as il,sa as cl,sb as $u,sc as Ui,sd as Ec,se as tp,sf as Rl,sg as yp,t as Un,ta as Eo,tb as dc,tc as pc,td as gb,te as Ac,tf as v6,tg as ea,u as Zs,ua as tc,ub as it,uc as q1,ud as Fr,ue as Pb,uf as y6,ug as _0,v as o1,va as oc,vb as z1,vc as jn,vd as bb,ve as op,vf as E6,vg as Ep,w as Mu,wa as Yo,wb as H1,wc as fc,wd as xb,we as zr,wf as w6,wg as Fe,x as r1,xa as rc,xb as mc,xc as El,xd as Ki,xe as Rb,xf as Fc,xg as A0,y as _u,ya as ut,yb as fl,yc as wl,yd as pt,ye as Lc,yf as c0,yg as ye,z as De,za as wo,zb as hl,zc as Ku,zd as vb,ze as Db,zf as dp,zg as ta}from"./excalidraw-assets/chunk-UVJNWDMS.js";import{a as h,b as E}from"./excalidraw-assets/chunk-M2JW2GFW.js";import{E as Iu}from"./excalidraw-assets/chunk-SK23VHAR.js";import{aa as Yg}from"./excalidraw-assets/chunk-V55EI3XA.js";import{b as Vg,d as cr,e as Kg,f as v}from"./excalidraw-assets/chunk-SXMPUQ6M.js";var H=cr((MI,P0)=>{h();P0.exports=React});var $0=cr(Qc=>{"use strict";h();var N6=H(),O6=Symbol.for("react.element"),F6=Symbol.for("react.fragment"),B6=Object.prototype.hasOwnProperty,z6=N6.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,H6={key:!0,ref:!0,__self:!0,__source:!0};function H0(t,e,o){var r,n={},i=null,a=null;o!==void 0&&(i=""+o),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(a=e.ref);for(r in e)B6.call(e,r)&&!H6.hasOwnProperty(r)&&(n[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)n[r]===void 0&&(n[r]=e[r]);return{$$typeof:O6,type:t,key:i,ref:a,props:n,_owner:z6.current}}Qc.Fragment=F6;Qc.jsx=H0;Qc.jsxs=H0});var k=cr((JI,U0)=>{"use strict";h();U0.exports=$0()});var hr=cr((b8,Y0)=>{h();Y0.exports=ReactDOM});var kh=cr((kW,nw)=>{h();var rw="Expected a function",tw=NaN,RT="[object Symbol]",DT=/^\s+|\s+$/g,NT=/^[-+]0x[0-9a-f]+$/i,OT=/^0b[01]+$/i,FT=/^0o[0-7]+$/i,BT=parseInt,zT=typeof global=="object"&&global&&global.Object===Object&&global,HT=typeof self=="object"&&self&&self.Object===Object&&self,$T=zT||HT||Function("return this")(),UT=Object.prototype,WT=UT.toString,GT=Math.max,VT=Math.min,Sh=function(){return $T.Date.now()};function KT(t,e,o){var r,n,i,a,l,s,c=0,d=!1,m=!1,p=!0;if(typeof t!="function")throw new TypeError(rw);e=ow(e)||0,Cm(o)&&(d=!!o.leading,m="maxWait"in o,i=m?GT(ow(o.maxWait)||0,e):i,p="trailing"in o?!!o.trailing:p);function f(I){var _=r,A=n;return r=n=void 0,c=I,a=t.apply(A,_),a}function b(I){return c=I,l=setTimeout(S,e),d?f(I):a}function x(I){var _=I-s,A=I-c,U=e-_;return m?VT(U,i-A):U}function y(I){var _=I-s,A=I-c;return s===void 0||_>=e||_<0||m&&A>=i}function S(){var I=Sh();if(y(I))return C(I);l=setTimeout(S,x(I))}function C(I){return l=void 0,p&&r?f(I):(r=n=void 0,a)}function w(){l!==void 0&&clearTimeout(l),c=0,r=s=n=l=void 0}function M(){return l===void 0?a:C(Sh())}function B(){var I=Sh(),_=y(I);if(r=arguments,n=this,s=I,_){if(l===void 0)return b(s);if(m)return l=setTimeout(S,e),f(s)}return l===void 0&&(l=setTimeout(S,e)),a}return B.cancel=w,B.flush=M,B}function YT(t,e,o){var r=!0,n=!0;if(typeof t!="function")throw new TypeError(rw);return Cm(o)&&(r="leading"in o?!!o.leading:r,n="trailing"in o?!!o.trailing:n),KT(t,e,{leading:r,maxWait:e,trailing:n})}function Cm(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function ZT(t){return!!t&&typeof t=="object"}function jT(t){return typeof t=="symbol"||ZT(t)&&WT.call(t)==RT}function ow(t){if(typeof t=="number")return t;if(jT(t))return tw;if(Cm(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Cm(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(DT,"");var o=OT.test(t);return o||FT.test(t)?BT(t.slice(2),o?2:8):NT.test(t)?tw:+t}nw.exports=YT});var pw=cr((mw,uw)=>{h();(function(){var t=this,e={};typeof mw<"u"?uw.exports=e:t.fuzzy=e,e.simpleFilter=function(o,r){return r.filter(function(n){return e.test(o,n)})},e.test=function(o,r){return e.match(o,r)!==null},e.match=function(o,r,n){n=n||{};var i=0,a=[],l=r.length,s=0,c=0,d=n.pre||"",m=n.post||"",p=n.caseSensitive&&r||r.toLowerCase(),f;o=n.caseSensitive&&o||o.toLowerCase();for(var b=0;b<l;b++)f=r[b],p[b]===o[i]?(f=d+f+m,i+=1,c+=1+c):c=0,s+=c,a[a.length]=f;return i===o.length?(s=p===o?1/0:s,{rendered:a.join(""),score:s}):null},e.filter=function(o,r,n){return!r||r.length===0?[]:typeof o!="string"?r:(n=n||{},r.reduce(function(i,a,l,s){var c=a;n.extract&&(c=n.extract(a));var d=e.match(o,c,n);return d!=null&&(i[i.length]={string:d.rendered,score:d.score,index:l,original:a}),i},[]).sort(function(i,a){var l=a.score-i.score;return l||i.index-a.index}))}})()});var vw=cr(xw=>{"use strict";h();var Va=H();function mS(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var uS=typeof Object.is=="function"?Object.is:mS,pS=Va.useState,fS=Va.useEffect,hS=Va.useLayoutEffect,gS=Va.useDebugValue;function bS(t,e){var o=e(),r=pS({inst:{value:o,getSnapshot:e}}),n=r[0].inst,i=r[1];return hS(function(){n.value=o,n.getSnapshot=e,_h(n)&&i({inst:n})},[t,o,e]),fS(function(){return _h(n)&&i({inst:n}),t(function(){_h(n)&&i({inst:n})})},[t]),gS(o),o}function _h(t){var e=t.getSnapshot;t=t.value;try{var o=e();return!uS(t,o)}catch{return!0}}function xS(t,e){return e()}var vS=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?xS:bS;xw.useSyncExternalStore=Va.useSyncExternalStore!==void 0?Va.useSyncExternalStore:vS});var Ew=cr((fV,yw)=>{"use strict";h();yw.exports=vw()});var Cw=cr(ww=>{"use strict";h();var km=H(),yS=Ew();function ES(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var wS=typeof Object.is=="function"?Object.is:ES,CS=yS.useSyncExternalStore,TS=km.useRef,SS=km.useEffect,kS=km.useMemo,IS=km.useDebugValue;ww.useSyncExternalStoreWithSelector=function(t,e,o,r,n){var i=TS(null);if(i.current===null){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=kS(function(){function s(f){if(!c){if(c=!0,d=f,f=r(f),n!==void 0&&a.hasValue){var b=a.value;if(n(b,f))return m=b}return m=f}if(b=m,wS(d,f))return b;var x=r(f);return n!==void 0&&n(b,x)?b:(d=f,m=x)}var c=!1,d,m,p=o===void 0?null:o;return[function(){return s(e())},p===null?void 0:function(){return s(p())}]},[e,o,r,n]);var l=CS(t,i[0],i[1]);return SS(function(){a.hasValue=!0,a.value=l},[l]),IS(l),l}});var Sw=cr((xV,Tw)=>{"use strict";h();Tw.exports=Cw()});h();var ku=v(H(),1);h();var rd=v(H(),1);h();h();h();h();var ft=v(H(),1);h();var S6=0;function R0(t,e){let o=`atom${++S6}`,r={toString:()=>o};return typeof t=="function"?r.read=t:(r.init=t,r.read=n=>n(r),r.write=(n,i,a)=>i(r,typeof a=="function"?a(n(r)):a)),e&&(r.write=e),r}var gn=Symbol(),Cp=t=>!!t[gn],Gc=t=>!t[gn].c,Nl=t=>{var e;let{b:o,c:r}=t[gn];r&&(r(),(e=I6.get(o))==null||e())},Kc=(t,e)=>{let o=t[gn].o,r=e[gn].o;return o===r||t===r||Cp(o)&&Kc(o,e)},Tp=(t,e)=>{let o={b:t,o:e,c:null},r=new Promise(n=>{o.c=()=>{o.c=null,n()},e.finally(o.c)});return r[gn]=o,r},k6=t=>Tp(t[gn].b,t[gn].o),I6=new WeakMap;var Vc=t=>"init"in t,Ol="r",Yc="w",Fl="c",Zc="s",D0="h",M6="n",_6="l",A6="a",L6="m",N0=t=>{let e=new WeakMap,o=new WeakMap,r=new Map,n,i;if((E&&E.MODE)!=="production"&&(n=new Set,i=new Set),t)for(let[P,D]of t){let V={v:D,r:0,y:!0,d:new Map};(E&&E.MODE)!=="production"&&(Object.freeze(V),Vc(P)||console.warn("Found initial value for derived atom which can cause unexpected behavior",P)),e.set(P,V)}let a=new WeakMap,l=(P,D,V)=>{let K=a.get(D);K||(K=new Map,a.set(D,K)),V.then(()=>{K.get(P)===V&&(K.delete(P),K.size||a.delete(D))}),K.set(P,V)},s=P=>{let D=new Set,V=a.get(P);return V&&(a.delete(P),V.forEach((K,Y)=>{Nl(K),D.add(Y)})),D},c=new WeakMap,d=P=>{let D=c.get(P);return D||(D=new Map,c.set(P,D)),D},m=(P,D)=>{if(P){let V=d(P),K=V.get(D);return K||(K=m(P.p,D),K&&"p"in K&&Gc(K.p)&&(K=void 0),K&&V.set(D,K)),K}return e.get(D)},p=(P,D,V)=>{if((E&&E.MODE)!=="production"&&Object.freeze(V),P)d(P).set(D,V);else{let K=e.get(D);e.set(D,V),r.has(D)||r.set(D,K)}},f=(P,D=new Map,V)=>{if(!V)return D;let K=new Map,Y=!1;return V.forEach(j=>{var J;let re=((J=m(P,j))==null?void 0:J.r)||0;K.set(j,re),D.get(j)!==re&&(Y=!0)}),D.size===K.size&&!Y?D:K},b=(P,D,V,K,Y)=>{let j=m(P,D);if(j){if(Y&&(!("p"in j)||!Kc(j.p,Y)))return j;"p"in j&&Nl(j.p)}let J={v:V,r:j?.r||0,y:!0,d:f(P,j?.d,K)},re=!j?.y;return!j||!("v"in j)||!Object.is(j.v,V)?(re=!0,++J.r,J.d.has(D)&&(J.d=new Map(J.d).set(D,J.r))):J.d!==j.d&&(J.d.size!==j.d.size||!Array.from(J.d.keys()).every(ot=>j.d.has(ot)))&&(re=!0,Promise.resolve().then(()=>{te(P)})),j&&!re?j:(p(P,D,J),J)},x=(P,D,V,K,Y)=>{let j=m(P,D);if(j){if(Y&&(!("p"in j)||!Kc(j.p,Y)))return j;"p"in j&&Nl(j.p)}let J={e:V,r:(j?.r||0)+1,y:!0,d:f(P,j?.d,K)};return p(P,D,J),J},y=(P,D,V,K)=>{let Y=m(P,D);if(Y&&"p"in Y){if(Kc(Y.p,V)&&!Gc(Y.p))return Y.y?Y:{...Y,y:!0};Nl(Y.p)}l(P,D,V);let j={p:V,r:(Y?.r||0)+1,y:!0,d:f(P,Y?.d,K)};return p(P,D,j),j},S=(P,D,V,K)=>{if(V instanceof Promise){let Y=Tp(V,V.then(j=>{b(P,D,j,K,Y)}).catch(j=>{if(j instanceof Promise)return Cp(j)?j.then(()=>{w(P,D,!0)}):j;x(P,D,j,K,Y)}));return y(P,D,Y,K)}return b(P,D,V,K)},C=(P,D)=>{let V=m(P,D);if(V){let K={...V,y:!1};p(P,D,K)}else(E&&E.MODE)!=="production"&&console.warn("[Bug] could not invalidate non existing atom",D)},w=(P,D,V)=>{if(!V){let Y=m(P,D);if(Y){if(Y.y&&"p"in Y&&!Gc(Y.p))return Y;if(Y.d.forEach((j,J)=>{if(J!==D)if(!o.has(J))w(P,J);else{let re=m(P,J);re&&!re.y&&w(P,J)}}),Array.from(Y.d).every(([j,J])=>{let re=m(P,j);return re&&!("p"in re)&&re.r===J}))return Y.y?Y:{...Y,y:!0}}}let K=new Set;try{let Y=D.read(j=>{K.add(j);let J=j===D?m(P,j):w(P,j);if(J){if("e"in J)throw J.e;if("p"in J)throw J.p;return J.v}if(Vc(j))return j.init;throw new Error("no atom init")});return S(P,D,Y,K)}catch(Y){if(Y instanceof Promise){let j=Cp(Y)&&Gc(Y)?k6(Y):Tp(Y,Y);return y(P,D,j,K)}return x(P,D,Y,K)}},M=(P,D)=>w(D,P),B=(P,D)=>{let V=o.get(D);return V||(V=O(P,D)),V},I=(P,D)=>!D.l.size&&(!D.t.size||D.t.size===1&&D.t.has(P)),_=(P,D)=>{let V=o.get(D);V&&I(D,V)&&F(P,D)},A=(P,D)=>{let V=o.get(D);V?.t.forEach(K=>{K!==D&&(C(P,K),A(P,K))})},U=(P,D,V)=>{let K=!0,Y=(re,ot)=>{let rt=w(P,re);if("e"in rt)throw rt.e;if("p"in rt){if(ot?.unstable_promise)return rt.p.then(()=>{let lt=m(P,re);return lt&&"p"in lt&<.p===rt.p?new Promise($e=>setTimeout($e)).then(()=>Y(re,ot)):Y(re,ot)});throw(E&&E.MODE)!=="production"&&console.info("Reading pending atom state in write operation. We throw a promise for now.",re),rt.p}if("v"in rt)return rt.v;throw(E&&E.MODE)!=="production"&&console.warn("[Bug] no value found while reading atom in write operation. This is probably a bug.",re),new Error("no value found")},j=(re,ot)=>{let rt;if(re===D){if(!Vc(re))throw new Error("atom not writable");s(re).forEach(Ws=>{Ws!==P&&S(Ws,re,ot)});let $e=m(P,re),qt=S(P,re,ot);$e!==qt&&A(P,re)}else rt=U(P,re,ot);return K||te(P),rt},J=D.write(Y,j,V);return K=!1,J},R=(P,D,V)=>{let K=U(V,P,D);return te(V),K},W=P=>!!P.write,O=(P,D,V)=>{let K={t:new Set(V&&[V]),l:new Set};if(o.set(D,K),(E&&E.MODE)!=="production"&&i.add(D),w(void 0,D).d.forEach((j,J)=>{let re=o.get(J);re?re.t.add(D):J!==D&&O(P,J,D)}),W(D)&&D.onMount){let j=re=>R(D,re,P),J=D.onMount(j);P=void 0,J&&(K.u=J)}return K},F=(P,D)=>{var V;let K=(V=o.get(D))==null?void 0:V.u;K&&K(),o.delete(D),(E&&E.MODE)!=="production"&&i.delete(D);let Y=m(P,D);Y?("p"in Y&&Nl(Y.p),Y.d.forEach((j,J)=>{if(J!==D){let re=o.get(J);re&&(re.t.delete(D),I(J,re)&&F(P,J))}})):(E&&E.MODE)!=="production"&&console.warn("[Bug] could not find atom state to unmount",D)},ee=(P,D,V,K)=>{let Y=new Set(V.d.keys());K?.forEach((j,J)=>{if(Y.has(J)){Y.delete(J);return}let re=o.get(J);re&&(re.t.delete(D),I(J,re)&&F(P,J))}),Y.forEach(j=>{let J=o.get(j);J?J.t.add(D):o.has(D)&&O(P,j,D)})},te=P=>{if(P){d(P).forEach((V,K)=>{let Y=e.get(K);if(V!==Y){let j=o.get(K);j?.l.forEach(J=>J(P))}});return}for(;r.size;){let D=Array.from(r);r.clear(),D.forEach(([V,K])=>{let Y=m(void 0,V);if(Y&&Y.d!==K?.d&&ee(void 0,V,Y,K?.d),K&&!K.y&&Y?.y)return;let j=o.get(V);j?.l.forEach(J=>J())})}(E&&E.MODE)!=="production"&&n.forEach(D=>D())},be=P=>{d(P).forEach((V,K)=>{let Y=e.get(K);(!Y||V.r>Y.r||V.y!==Y.y||V.r===Y.r&&V.d!==Y.d)&&(e.set(K,V),V.d!==Y?.d&&ee(P,K,V,Y?.d))})},ke=(P,D)=>{D&&be(D),te(void 0)},de=(P,D,V)=>{let Y=B(V,P).l;return Y.add(D),()=>{Y.delete(D),_(V,P)}},Z=(P,D)=>{for(let[V,K]of P)Vc(V)&&(S(D,V,K),A(D,V));te(D)};return(E&&E.MODE)!=="production"?{[Ol]:M,[Yc]:R,[Fl]:ke,[Zc]:de,[D0]:Z,[M6]:P=>(n.add(P),()=>{n.delete(P)}),[_6]:()=>i.values(),[A6]:P=>e.get(P),[L6]:P=>o.get(P)}:{[Ol]:M,[Yc]:R,[Fl]:ke,[Zc]:de,[D0]:Z}},O0=t=>{let e=N0(t),o=a=>{let l=e[Ol](a);if("e"in l)throw l.e;if(!("p"in l))return l.v},r=a=>new Promise((l,s)=>{let c=e[Ol](a);"e"in c?s(c.e):"p"in c?l(c.p.then(()=>r(a))):l(c.v)});return{get:o,asyncGet:r,set:(a,l)=>e[Yc](a,l),sub:(a,l)=>e[Zc](a,l),SECRET_INTERNAL_store:e}},F0=(t,e)=>({s:e?e(t).SECRET_INTERNAL_store:N0(t)}),wp=new Map,Sp=t=>(wp.has(t)||wp.set(t,(0,ft.createContext)(F0())),wp.get(t)),jc=({children:t,initialValues:e,scope:o,unstable_createStore:r,unstable_enableVersionedWrite:n})=>{let[i,a]=(0,ft.useState)({});(0,ft.useEffect)(()=>{let c=l.current;c.w&&(c.s[Fl](null,i),delete i.p,c.v=i)},[i]);let l=(0,ft.useRef)();if(!l.current){let c=F0(e,r);if(n){let d=0;c.w=m=>{a(p=>{let f=d?p:{p};return m(f),f})},c.v=i,c.r=m=>{++d,m(),--d}}l.current=c}let s=Sp(o);return(0,ft.createElement)(s.Provider,{value:l.current},t)};function Ue(t,e){return R0(t,e)}function Bl(t,e){let o=Sp(e),r=(0,ft.useContext)(o),{s:n,v:i}=r,a=p=>{let f=n[Ol](t,p);if((E&&E.MODE)!=="production"&&!f.y)throw new Error("should not be invalidated");if("e"in f)throw f.e;if("p"in f)throw f.p;if("v"in f)return f.v;throw new Error("no atom value")},[[l,s,c],d]=(0,ft.useReducer)((p,f)=>{let b=a(f);return Object.is(p[1],b)&&p[2]===t?p:[f,b,t]},i,p=>{let f=a(p);return[p,f,t]}),m=s;return c!==t&&(d(l),m=a(l)),(0,ft.useEffect)(()=>{let{v:p}=r;p&&n[Fl](t,p);let f=n[Zc](t,d,p);return d(p),f},[n,t,r]),(0,ft.useEffect)(()=>{n[Fl](t,l)}),(0,ft.useDebugValue)(m),m}function Ur(t,e){let o=Sp(e),{s:r,w:n}=(0,ft.useContext)(o);return(0,ft.useCallback)(a=>{if((E&&E.MODE)!=="production"&&!("write"in t))throw new Error("not writable atom");let l=s=>r[Yc](t,a,s);return n?n(l):l()},[r,n,t])}function Ce(t,e){return"scope"in t&&(console.warn("atom.scope is deprecated. Please do useAtom(atom, scope) instead."),e=t.scope),[Bl(t,e),Ur(t,e)]}var P6=v(H(),1),Re=Symbol(),Wt=O0();var R6=Vg({"./locales/ar-SA.json":()=>import("./excalidraw-assets/ar-SA-MV5ZQ2W5.js"),"./locales/az-AZ.json":()=>import("./excalidraw-assets/az-AZ-BK6PNAXT.js"),"./locales/bg-BG.json":()=>import("./excalidraw-assets/bg-BG-GCTBXIHZ.js"),"./locales/bn-BD.json":()=>import("./excalidraw-assets/bn-BD-QTMQMM2A.js"),"./locales/ca-ES.json":()=>import("./excalidraw-assets/ca-ES-CJKR7U4D.js"),"./locales/cs-CZ.json":()=>import("./excalidraw-assets/cs-CZ-E6RD7VRF.js"),"./locales/da-DK.json":()=>import("./excalidraw-assets/da-DK-GA7WAOB4.js"),"./locales/de-DE.json":()=>import("./excalidraw-assets/de-DE-WQGVYODE.js"),"./locales/el-GR.json":()=>import("./excalidraw-assets/el-GR-JRKZ7DCA.js"),"./locales/en.json":()=>import("./excalidraw-assets/en-SMMH575S.js"),"./locales/es-ES.json":()=>import("./excalidraw-assets/es-ES-NNAEPTPN.js"),"./locales/eu-ES.json":()=>import("./excalidraw-assets/eu-ES-UXVZRSMJ.js"),"./locales/fa-IR.json":()=>import("./excalidraw-assets/fa-IR-FFXQODN6.js"),"./locales/fi-FI.json":()=>import("./excalidraw-assets/fi-FI-FVRWY4PK.js"),"./locales/fr-FR.json":()=>import("./excalidraw-assets/fr-FR-YRAHLNH4.js"),"./locales/gl-ES.json":()=>import("./excalidraw-assets/gl-ES-O3MFXO2J.js"),"./locales/he-IL.json":()=>import("./excalidraw-assets/he-IL-UQHONTOV.js"),"./locales/hi-IN.json":()=>import("./excalidraw-assets/hi-IN-QGM3FMHS.js"),"./locales/hu-HU.json":()=>import("./excalidraw-assets/hu-HU-FW4UHMDU.js"),"./locales/id-ID.json":()=>import("./excalidraw-assets/id-ID-QOMISFYK.js"),"./locales/it-IT.json":()=>import("./excalidraw-assets/it-IT-NXPSTWVC.js"),"./locales/ja-JP.json":()=>import("./excalidraw-assets/ja-JP-Z7I24KT4.js"),"./locales/kaa.json":()=>import("./excalidraw-assets/kaa-TXMSCJDQ.js"),"./locales/kab-KAB.json":()=>import("./excalidraw-assets/kab-KAB-RJXRUTDO.js"),"./locales/kk-KZ.json":()=>import("./excalidraw-assets/kk-KZ-JXPULSST.js"),"./locales/km-KH.json":()=>import("./excalidraw-assets/km-KH-WRGO6AYW.js"),"./locales/ko-KR.json":()=>import("./excalidraw-assets/ko-KR-GAYOVASS.js"),"./locales/ku-TR.json":()=>import("./excalidraw-assets/ku-TR-DJF4NWRZ.js"),"./locales/lt-LT.json":()=>import("./excalidraw-assets/lt-LT-QQGY3S4X.js"),"./locales/lv-LV.json":()=>import("./excalidraw-assets/lv-LV-H55DY45V.js"),"./locales/mr-IN.json":()=>import("./excalidraw-assets/mr-IN-QYT2ELER.js"),"./locales/my-MM.json":()=>import("./excalidraw-assets/my-MM-RRPBSH5R.js"),"./locales/nb-NO.json":()=>import("./excalidraw-assets/nb-NO-AMX3MAHH.js"),"./locales/nl-NL.json":()=>import("./excalidraw-assets/nl-NL-LZSLKN37.js"),"./locales/nn-NO.json":()=>import("./excalidraw-assets/nn-NO-WWXPMJY7.js"),"./locales/oc-FR.json":()=>import("./excalidraw-assets/oc-FR-GPZCMCGX.js"),"./locales/pa-IN.json":()=>import("./excalidraw-assets/pa-IN-L5H3H4OA.js"),"./locales/percentages.json":()=>import("./excalidraw-assets/percentages-L6Y3A3ZS.js"),"./locales/pl-PL.json":()=>import("./excalidraw-assets/pl-PL-SYTLCLU7.js"),"./locales/pt-BR.json":()=>import("./excalidraw-assets/pt-BR-BJOSVXBP.js"),"./locales/pt-PT.json":()=>import("./excalidraw-assets/pt-PT-QHWDKICL.js"),"./locales/ro-RO.json":()=>import("./excalidraw-assets/ro-RO-AVSXCJHH.js"),"./locales/ru-RU.json":()=>import("./excalidraw-assets/ru-RU-5Z6AY4FG.js"),"./locales/si-LK.json":()=>import("./excalidraw-assets/si-LK-OMROCHR3.js"),"./locales/sk-SK.json":()=>import("./excalidraw-assets/sk-SK-TLXIBWPH.js"),"./locales/sl-SI.json":()=>import("./excalidraw-assets/sl-SI-JELDMWCI.js"),"./locales/sv-SE.json":()=>import("./excalidraw-assets/sv-SE-2FAONS47.js"),"./locales/ta-IN.json":()=>import("./excalidraw-assets/ta-IN-XN7DVSDK.js"),"./locales/th-TH.json":()=>import("./excalidraw-assets/th-TH-VCIYWJPR.js"),"./locales/tr-TR.json":()=>import("./excalidraw-assets/tr-TR-6QL6T7SM.js"),"./locales/uk-UA.json":()=>import("./excalidraw-assets/uk-UA-Y6YRBHAO.js"),"./locales/vi-VN.json":()=>import("./excalidraw-assets/vi-VN-34I6LTAE.js"),"./locales/zh-CN.json":()=>import("./excalidraw-assets/zh-CN-IGKEMUHO.js"),"./locales/zh-HK.json":()=>import("./excalidraw-assets/zh-HK-MDAU5TWB.js"),"./locales/zh-TW.json":()=>import("./excalidraw-assets/zh-TW-DOGEFI3C.js")});var D6=85,fr={code:"en",label:"English"},ra=[fr,...[{code:"ar-SA",label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",rtl:!0},{code:"bg-BG",label:"\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438"},{code:"ca-ES",label:"Catal\xE0"},{code:"cs-CZ",label:"\u010Cesky"},{code:"de-DE",label:"Deutsch"},{code:"el-GR",label:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC"},{code:"es-ES",label:"Espa\xF1ol"},{code:"eu-ES",label:"Euskara"},{code:"fa-IR",label:"\u0641\u0627\u0631\u0633\u06CC",rtl:!0},{code:"fi-FI",label:"Suomi"},{code:"fr-FR",label:"Fran\xE7ais"},{code:"gl-ES",label:"Galego"},{code:"he-IL",label:"\u05E2\u05D1\u05E8\u05D9\u05EA",rtl:!0},{code:"hi-IN",label:"\u0939\u093F\u0928\u094D\u0926\u0940"},{code:"hu-HU",label:"Magyar"},{code:"id-ID",label:"Bahasa Indonesia"},{code:"it-IT",label:"Italiano"},{code:"ja-JP",label:"\u65E5\u672C\u8A9E"},{code:"kab-KAB",label:"Taqbaylit"},{code:"kk-KZ",label:"\u049A\u0430\u0437\u0430\u049B \u0442\u0456\u043B\u0456"},{code:"ko-KR",label:"\uD55C\uAD6D\uC5B4"},{code:"ku-TR",label:"Kurd\xEE"},{code:"lt-LT",label:"Lietuvi\u0173"},{code:"lv-LV",label:"Latvie\u0161u"},{code:"my-MM",label:"Burmese"},{code:"nb-NO",label:"Norsk bokm\xE5l"},{code:"nl-NL",label:"Nederlands"},{code:"nn-NO",label:"Norsk nynorsk"},{code:"oc-FR",label:"Occitan"},{code:"pa-IN",label:"\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40"},{code:"pl-PL",label:"Polski"},{code:"pt-BR",label:"Portugu\xEAs Brasileiro"},{code:"pt-PT",label:"Portugu\xEAs"},{code:"ro-RO",label:"Rom\xE2n\u0103"},{code:"ru-RU",label:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"},{code:"sk-SK",label:"Sloven\u010Dina"},{code:"sv-SE",label:"Svenska"},{code:"sl-SI",label:"Sloven\u0161\u010Dina"},{code:"tr-TR",label:"T\xFCrk\xE7e"},{code:"uk-UA",label:"\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430"},{code:"zh-CN",label:"\u7B80\u4F53\u4E2D\u6587"},{code:"zh-TW",label:"\u7E41\u9AD4\u4E2D\u6587"},{code:"vi-VN",label:"Ti\u1EBFng Vi\u1EC7t"},{code:"mr-IN",label:"\u092E\u0930\u093E\u0920\u0940"}].filter(t=>Yg[t.code]>=D6).sort((t,e)=>t.label>e.label?1:-1)],qc="__test__";E.DEV&&ra.unshift({code:qc,label:"test language"},{code:`${qc}.rtl`,label:"\u202Atest language (rtl)\u202C",rtl:!0});var oa=fr,Xc={},Jc=async t=>{if(oa=t,document.documentElement.dir=oa.rtl?"rtl":"ltr",document.documentElement.lang=oa.code,t.code.startsWith(qc))Xc={};else try{Xc=await R6(`./locales/${oa.code}.json`)}catch(e){console.error(`Failed to load language ${t.code}:`,e.message),Xc=Iu}Wt.set(z0,t.code)},Wr=()=>oa,B0=(t,e)=>{for(let o=0;o<e.length;++o){let r=e[o];if(t[r]===void 0)return;t=t[r]}if(typeof t=="string")return t},g=(t,e,o)=>{if(oa.code.startsWith(qc))return`\u202A[[${e?`${t}(${JSON.stringify(e).slice(1,-1)})`:t}]]\u202C`;let r=t.split("."),n=B0(Xc,r)||B0(Iu,r)||o;if(n===void 0){let i=`Can't find translation for ${t}`;if(E.PROD)return console.warn(i),"";throw new Error(i)}if(e)for(let i in e)n=n.replace(`{{${i}}}`,String(e[i]));return n},z0=Ue(fr.code),xt=()=>{let t=Bl(z0,Re);return{t:g,langCode:t}};var td=v(H(),1);h();var W0=v(H(),1);var ed=v(k(),1),$6=({size:t="1em",circleWidth:e=8,synchronized:o=!1})=>{let n=-(W0.default.useRef(Date.now()).current%1600);return(0,ed.jsx)("div",{className:"Spinner",children:(0,ed.jsx)("svg",{viewBox:"0 0 100 100",style:{width:t,height:t,"--spinner-delay":o?`${n}ms`:0},children:(0,ed.jsx)("circle",{cx:"50",cy:"50",r:50-e/2,strokeWidth:e,fill:"none",strokeMiterlimit:"10"})})})},Nt=$6;h();function G0(t){var e,o,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(o=G0(t[e]))&&(r&&(r+=" "),r+=o);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function z(){for(var t=0,e,o,r="";t<arguments.length;)(e=arguments[t++])&&(o=G0(e))&&(r&&(r+=" "),r+=o);return r}var na=v(k(),1),od=({delay:t,theme:e})=>{let[o,r]=(0,td.useState)(!!t);return(0,td.useEffect)(()=>{if(!t)return;let n=setTimeout(()=>{r(!1)},t);return()=>clearTimeout(n)},[t]),o?null:(0,na.jsxs)("div",{className:z("LoadingMessage",{"LoadingMessage--dark":e===he.DARK}),children:[(0,na.jsx)("div",{children:(0,na.jsx)(Nt,{})}),(0,na.jsx)("div",{className:"LoadingMessage-text",children:g("labels.loadingScene")})]})};var K0=v(k(),1),V0=t=>{let[e,o]=(0,rd.useState)(!0);return(0,rd.useEffect)(()=>{let r=async()=>{await Jc(n),o(!1)},n=ra.find(i=>i.code===t.langCode)||fr;r()},[t.langCode]),e?(0,K0.jsx)(od,{theme:t.theme}):t.children};h();var Tt=v(H(),1),vu=v(hr(),1);h();h();h();var Xo=v(H(),1);var _o=v(k(),1),se=Xo.default.forwardRef((t,e)=>{let{id:o}=Mt(),r=Xo.default.useRef(null);Xo.default.useImperativeHandle(e,()=>r.current);let n=`ToolIcon_size_${t.size}`,[i,a]=(0,Xo.useState)(!1),l=(0,Xo.useRef)(!0),s=async d=>{let m="onClick"in t&&t.onClick?.(d);if(Ni(m))try{a(!0),await m}catch(p){if(p instanceof Bi)console.warn(p);else throw p}finally{l.current&&a(!1)}};(0,Xo.useEffect)(()=>(l.current=!0,()=>{l.current=!1}),[]);let c=(0,Xo.useRef)(null);if(t.type==="button"||t.type==="icon"||t.type==="submit"){let d=t.type==="icon"?"button":t.type;return(0,_o.jsxs)("button",{className:z("ToolIcon_type_button",n,t.className,t.visible&&!t.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!t.hidden,"ToolIcon--selected":t.selected,"ToolIcon--plain":t.type==="icon"}),style:t.style,"data-testid":t["data-testid"],hidden:t.hidden,title:t.title,"aria-label":t["aria-label"],type:d,onClick:s,ref:r,disabled:i||t.isLoading,children:[(t.icon||t.label)&&(0,_o.jsxs)("div",{className:"ToolIcon__icon","aria-hidden":"true",children:[t.icon||t.label,t.keyBindingLabel&&(0,_o.jsx)("span",{className:"ToolIcon__keybinding",children:t.keyBindingLabel}),t.isLoading&&(0,_o.jsx)(Nt,{})]}),t.showAriaLabel&&(0,_o.jsxs)("div",{className:"ToolIcon__label",children:[t["aria-label"]," ",i&&(0,_o.jsx)(Nt,{})]}),t.children]})}return(0,_o.jsxs)("label",{className:z("ToolIcon",t.className),title:t.title,onPointerDown:d=>{c.current=d.pointerType||null,t.onPointerDown?.({pointerType:d.pointerType||null})},onPointerUp:()=>{requestAnimationFrame(()=>{c.current=null})},children:[(0,_o.jsx)("input",{className:`ToolIcon_type_radio ${n}`,type:"radio",name:t.name,"aria-label":t["aria-label"],"aria-keyshortcuts":t["aria-keyshortcuts"],"data-testid":t["data-testid"],id:`${o}-${t.id}`,onChange:()=>{t.onChange?.({pointerType:c.current})},checked:t.checked,ref:r}),(0,_o.jsxs)("div",{className:"ToolIcon__icon",children:[t.icon,t.keyBindingLabel&&(0,_o.jsx)("span",{className:"ToolIcon__keybinding",children:t.keyBindingLabel})]})]})});se.defaultProps={visible:!0,className:"",size:"medium"};se.displayName="ToolButton";h();var eo=v(H(),1);var u=v(k(),1),qo=t=>"var(--icon-fill-color)",Z0=t=>t===he.LIGHT?It.white:"#1e1e1e",L=(t,e=512)=>{let{width:o=512,height:r=o,mirror:n,style:i,...a}=typeof e=="number"?{width:e}:e;return(0,u.jsx)("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${o} ${r}`,className:z({"rtl-mirror":n}),style:i,...a,children:typeof t=="string"?(0,u.jsx)("path",{fill:"currentColor",d:t}):t})},Q={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},ce={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},R8=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("rect",{x:3,y:8,width:18,height:4,rx:1}),(0,u.jsx)("line",{x1:12,y1:8,x2:12,y2:21}),(0,u.jsx)("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),(0,u.jsx)("path",{d:"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5"})]}),Q),nd=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),(0,u.jsx)("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),(0,u.jsx)("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),(0,u.jsx)("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),(0,u.jsx)("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),Q),j0=L((0,u.jsxs)("svg",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,u.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),Q),X0=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"1"}),(0,u.jsx)("circle",{cx:"12",cy:"19",r:"1"}),(0,u.jsx)("circle",{cx:"12",cy:"5",r:"1"})]}),Q),q0=L((0,u.jsxs)("svg",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),(0,u.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),(0,u.jsx)("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),Q),ti=L((0,u.jsxs)("g",{children:[(0,u.jsx)("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:(0,u.jsx)("path",{stroke:"none",d:"M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481",fill:"#fff"})}),(0,u.jsx)("g",{mask:"url(#UnlockedIcon)",children:(0,u.jsx)("path",{stroke:"none",d:"M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z",fill:"currentColor"})})]}),ce),ia=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z"}),(0,u.jsx)("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),(0,u.jsx)("path",{d:"M6.667 8.333V5.417C6.667 3.806 8.159 2.5 10 2.5c1.841 0 3.333 1.306 3.333 2.917v2.916"})]}),ce),J0=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M38.5 83.5c-14-2-17.833-10.473-21-22.5C14.333 48.984 12 22 12 12.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M12.005 10.478c1.92 3.495 3.838 7 7.905 14.423m-7.905-14.423c3.11 5.683 6.23 11.368 7.905 14.423m0 0c-3.68.226-7.35.455-13.91.85m13.91-.85c-5.279.33-10.566.647-13.91.85m0 0c1.936-4.931 3.882-9.86 6.005-15.273M6 25.75c2.069-5.257 4.135-10.505 6.005-15.272",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:41,height:94,fill:"none"}),Q0=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M18.026 1.232c-5.268 13.125-5.548 33.555 3.285 42.311 8.823 8.75 33.31 12.304 42.422 13.523",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M72.181 59.247c-3.163-2.429-6.337-4.856-13.058-10m13.058 10c-5.145-3.936-10.292-7.882-13.058-10m0 0c-.78 3.603-1.563 7.196-2.948 13.62m2.948-13.62c-1.126 5.168-2.24 10.346-2.948 13.62m0 0c5.168-1.166 10.334-2.343 16.006-3.62m-16.006 3.62c5.51-1.248 11.01-2.495 16.006-3.62",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:85,height:71,fill:"none"}),ex=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M1 77c14-2 31.833-11.973 35-24 3.167-12.016-6-35-9.5-43.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M24.165 1.093c-.522 3.953-1.037 7.916-2.132 16.309m2.131-16.309c-.835 6.424-1.68 12.854-2.13 16.308m0 0c3.51-1.125 7.013-2.243 13.27-4.257m-13.27 4.257c5.038-1.608 10.08-3.232 13.27-4.257m0 0c-3.595-3.892-7.197-7.777-11.14-12.05m11.14 12.05c-3.837-4.148-7.667-8.287-11.14-12.05",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:38,height:78,fill:"none"}),D8=L((0,u.jsx)("g",{fill:"currentColor",children:(0,u.jsx)("path",{d:"M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z",fill:"currentColor"})}),{width:40,height:40,fill:"none"}),tx=L((0,u.jsxs)("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M6 6l4.153 11.793a0.365 .365 0 0 0 .331 .207a0.366 .366 0 0 0 .332 -.207l2.184 -4.793l4.787 -1.994a0.355 .355 0 0 0 .213 -.323a0.355 .355 0 0 0 -.213 -.323l-11.787 -4.36z"}),(0,u.jsx)("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),ox=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),Q),rx=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M10.5 20.4l-6.9 -6.9c-.781 -.781 -.781 -2.219 0 -3l6.9 -6.9c.781 -.781 2.219 -.781 3 0l6.9 6.9c.781 .781 .781 2.219 0 3l-6.9 6.9c-.781 .781 -2.219 .781 -3 0z"})]}),Q),nx=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"9"})]}),Q),ix=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,u.jsx)("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),(0,u.jsx)("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),Q),ax=L((0,u.jsx)("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),ce),lx=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),(0,u.jsx)("path",{d:"M16 7h4"}),(0,u.jsx)("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),Q),aa=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{clipRule:"evenodd",d:"m7.643 15.69 7.774-7.773a2.357 2.357 0 1 0-3.334-3.334L4.31 12.357a3.333 3.333 0 0 0-.977 2.357v1.953h1.953c.884 0 1.732-.352 2.357-.977Z"}),(0,u.jsx)("path",{d:"m11.25 5.417 3.333 3.333"})]}),ce),sx=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),(0,u.jsx)("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),(0,u.jsx)("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),(0,u.jsx)("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),(0,u.jsx)("polyline",{points:"5 20 11 4 13 4 20 20"})]}),Q),cx=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M12.5 6.667h.01"}),(0,u.jsx)("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z"}),(0,u.jsx)("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),(0,u.jsx)("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),ce),dx=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3"}),(0,u.jsx)("path",{d:"M18 13.3l-6.3 -6.3"})]}),Q),kp=L((0,u.jsx)("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),ce),Ip=L((0,u.jsx)("path",{d:"M5 10h10",strokeWidth:"1.25"}),ce),mx=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M21 21l-6 -6"}),(0,u.jsx)("path",{d:"M3.268 12.043a7.017 7.017 0 0 0 6.634 4.957a7.012 7.012 0 0 0 7.043 -6.131a7 7 0 0 0 -5.314 -7.672a7.021 7.021 0 0 0 -8.241 4.403"}),(0,u.jsx)("path",{d:"M3 4v4h4"})]}),Q),Jo=L((0,u.jsx)("path",{strokeWidth:"1.25",d:"M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"}),ce),ux=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("polyline",{points:"12 16 18 10 12 4"}),(0,u.jsx)("polyline",{points:"8 4 2 10 8 16"})]}),ce),zl=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"}),(0,u.jsx)("path",{clipRule:"evenodd",d:"M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"})]}),ce),Hl=L((0,u.jsx)("path",{clipRule:"evenodd",d:"M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z",stroke:"currentColor"}),ce),$l=L((0,u.jsx)("g",{stroke:"currentColor",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667"})}),{...ce,strokeWidth:1.5}),id=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),(0,u.jsx)("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),(0,u.jsx)("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),Q),oi=L((0,u.jsx)("path",{strokeWidth:"1.25",d:"M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10"}),ce),la=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,u.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),(0,u.jsx)("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),Q),px=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,u.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),(0,u.jsx)("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),Q),Mp=L((0,u.jsx)("path",{strokeWidth:"1.25",d:"M9.167 5.833H5.833c-1.254 0-2.5 1.282-2.5 2.5v5.834c0 1.283 1.252 2.5 2.5 2.5h5.834c1.251 0 2.5-1.25 2.5-2.5v-3.334M8.333 11.667l8.334-8.334M12.5 3.333h4.167V7.5"}),ce),ad=L((0,u.jsx)("path",{d:"M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5",strokeWidth:"1.25"}),ce),fx=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0"}),(0,u.jsx)("path",{d:"M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084"})]}),ce),hx=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 4l11.733 16h4.267l-11.733 -16z"}),(0,u.jsx)("path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"})]}),Q),gx=L((0,u.jsx)("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),Ul=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"}),(0,u.jsx)("path",{d:"M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"})]}),ce),bx=L("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}),xx=L("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}),sa=L((0,u.jsx)("path",{d:"m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z",strokeWidth:"1.25"}),ce),N8=L("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}),vx=L("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"),ld=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z"}),(0,u.jsx)("path",{d:"M13.737 9.737c2.299 -2.3 3.23 -5.095 2.081 -6.245c-1.15 -1.15 -3.945 -.217 -6.244 2.082c-2.3 2.299 -3.231 5.095 -2.082 6.244c1.15 1.15 3.946 .218 6.245 -2.081z"}),(0,u.jsx)("path",{d:"M7.492 11.818c.362 .362 .768 .676 1.208 .934l6.895 4.047c1.078 .557 2.255 -.075 3.692 -1.512c1.437 -1.437 2.07 -2.614 1.512 -3.692c-.372 -.718 -1.72 -3.017 -4.047 -6.895a6.015 6.015 0 0 0 -.934 -1.208"})]}),Q),sd=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M15 8h.01"}),(0,u.jsx)("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),(0,u.jsx)("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),(0,u.jsx)("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),(0,u.jsx)("path",{d:"M19 16v6"}),(0,u.jsx)("path",{d:"M22 19l-3 3l-3 -3"})]}),Q),yx=L("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}),O8=L("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}),F8=L("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}),Ex=L("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"),B8=L("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"),_p=L((0,u.jsx)("path",{d:"M7.5 10.833 4.167 7.5 7.5 4.167M4.167 7.5h9.166a3.333 3.333 0 0 1 0 6.667H12.5",strokeWidth:"1.25"}),ce),Ap=L((0,u.jsx)("path",{d:"M12.5 10.833 15.833 7.5 12.5 4.167M15.833 7.5H6.667a3.333 3.333 0 1 0 0 6.667H7.5",strokeWidth:"1.25"}),ce),wx=L("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}),Cx=L((0,u.jsx)("path",{d:"M5 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 17.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7.25 8.917l5.5-2.834M7.25 11.083l5.5 2.834",strokeWidth:"1.5"}),ce),z8=L("M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"),H8=L("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}),$8=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M8 9h-1a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-8a2 2 0 0 0 -2 -2h-1"}),(0,u.jsx)("path",{d:"M12 14v-11"}),(0,u.jsx)("path",{d:"M9 6l3 -3l3 3"})]}),Q),U8=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{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,u.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}),W8=L((0,u.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}),Lp=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{d:"M13.889 4.167H8.333c-.767 0-1.389.622-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.767-.622-1.39-1.39-1.39Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M12.5 12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Pp=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.944 12.5H12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388",fill:"currentColor"}),(0,u.jsx)("path",{d:"M13.889 4.167H8.333c-.767 0-1.389.621-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.768-.622-1.39-1.39-1.39Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Rp=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M8.775 6.458h2.45a2.316 2.316 0 0 1 2.317 2.316v2.452a2.316 2.316 0 0 1-2.316 2.316H8.774a2.316 2.316 0 0 1-2.317-2.316V8.774a2.316 2.316 0 0 1 2.317-2.316Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316ZM12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Dp=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",children:[(0,u.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("mask",{id:"SendToBackIcon",fill:"#fff",children:(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z"})}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M9.167 5.833h1.25v-1.25h-1.25v1.25Zm5 5h1.25v-1.25h-1.25v1.25Zm-3.334 3.334h-1.25v1.25h1.25v-1.25Zm-5-5h-1.25v1.25h1.25v-1.25Zm2.084-3.334v2.06h2.5v-2.06h-2.5Zm0 2.06a4.191 4.191 0 0 0 4.19 4.19v-2.5a1.691 1.691 0 0 1-1.69-1.69h-2.5Zm4.19 4.19h2.06v-2.5h-2.06v2.5Zm.81-1.25v.393h2.5v-.393h-2.5Zm0 .393c0 .933-.758 1.69-1.691 1.69v2.5a4.191 4.191 0 0 0 4.19-4.19h-2.5Zm-1.691 1.69h-.393v2.5h.393v-2.5Zm.857 1.25v-2.058h-2.5v2.059h2.5Zm0-2.058a4.191 4.191 0 0 0-4.19-4.191v2.5c.933 0 1.69.757 1.69 1.69h2.5Zm-4.19-4.191h-2.06v2.5h2.06v-2.5Zm-.81 1.25v-.393h-2.5v.393h2.5Zm0-.393c0-.934.758-1.69 1.692-1.69v-2.5a4.191 4.191 0 0 0-4.192 4.19h2.5Zm1.692-1.69h.392v-2.5h-.392v2.5Z",fill:"currentColor",mask:"url(#SendToBackIcon)"}),(0,u.jsx)("path",{d:"M12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z",stroke:"currentColor",strokeWidth:"1.25"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Np=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v7.083c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V8.125c0-.92-.746-1.667-1.666-1.667ZM6.875 6.458h-.417c-.92 0-1.666.747-1.666 1.667v3.75c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667v-3.75c0-.92-.747-1.667-1.667-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Op=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M6.875 3.125h-.417c-.92 0-1.666.746-1.666 1.667v7.083c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667V4.792c0-.92-.747-1.667-1.667-1.667ZM13.542 5.817h-.417c-.92 0-1.667.747-1.667 1.667v4.391c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V7.484c0-.92-.746-1.667-1.666-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Fp=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M15.208 4.792H8.125c-.92 0-1.667.746-1.667 1.666v.417c0 .92.747 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM12.516 11.458H8.125c-.92 0-1.667.746-1.667 1.667v.417c0 .92.747 1.666 1.667 1.666h4.391c.92 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.667-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Bp=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M11.875 4.792H4.792c-.92 0-1.667.746-1.667 1.666v.417c0 .92.746 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM11.683 11.458H7.292c-.92 0-1.667.746-1.667 1.667v.417c0 .92.746 1.666 1.667 1.666h4.39c.921 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.666-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Tx=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M14.375 10.208v-.416c0-.92-.746-1.667-1.667-1.667H7.292c-.92 0-1.667.746-1.667 1.667v.416c0 .92.746 1.667 1.667 1.667h5.416c.92 0 1.667-.746 1.667-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Sx=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M10.208 5.625h-.416c-.92 0-1.667.746-1.667 1.667v5.416c0 .92.746 1.667 1.667 1.667h.416c.92 0 1.667-.746 1.667-1.667V7.292c0-.92-.746-1.667-1.667-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),zp=L((0,u.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M6.875 4.792h-.417c-.92 0-1.666.746-1.666 1.666v7.084c0 .92.746 1.666 1.666 1.666h.417c.92 0 1.667-.746 1.667-1.666V6.458c0-.92-.747-1.666-1.667-1.666ZM13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v3.75c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667v-3.75c0-.92-.746-1.667-1.666-1.667Z"})]}),ce),Hp=L((0,u.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M4.792 13.125v.417c0 .92.746 1.666 1.666 1.666h7.084c.92 0 1.666-.746 1.666-1.666v-.417c0-.92-.746-1.667-1.666-1.667H6.458c-.92 0-1.666.746-1.666 1.667ZM6.458 6.458v.417c0 .92.747 1.667 1.667 1.667h3.75c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666h-3.75c-.92 0-1.667.746-1.667 1.666Z"})]}),ce),cd=L((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"9",cy:"7",r:"4"}),(0,u.jsx)("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),(0,u.jsx)("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),(0,u.jsx)("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),Q),G8=L("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"),V8=L("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"),Ao=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M15 5 5 15M5 5l10 10"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),K8=L("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}),Y8=L("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}),Z8=L("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}),$p=eo.default.memo(({theme:t})=>L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M25 26H111V111H25",fill:qo(t)}),(0,u.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:qo(t),strokeWidth:"2"}),(0,u.jsx)("path",{d:"M100 100H160V160H100",fill:qo(t)}),(0,u.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:qo(t),strokeWidth:"2"}),(0,u.jsxs)("g",{fill:Z0(t),stroke:qo(t),strokeWidth:"6",children:[(0,u.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),Up=eo.default.memo(({theme:t})=>L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M25 26H111V111H25",fill:qo(t)}),(0,u.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:qo(t),strokeWidth:"2"}),(0,u.jsx)("path",{d:"M100 100H160V160H100",fill:qo(t)}),(0,u.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:qo(t),strokeWidth:"2"}),(0,u.jsxs)("g",{fill:Z0(t),stroke:qo(t),strokeWidth:"6",children:[(0,u.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),kx=L((0,u.jsx)("g",{strokeWidth:1.25,children:(0,u.jsx)("path",{d:"M5.879 2.625h8.242a3.27 3.27 0 0 1 3.254 3.254v8.242a3.27 3.27 0 0 1-3.254 3.254H5.88a3.27 3.27 0 0 1-3.254-3.254V5.88A3.27 3.27 0 0 1 5.88 2.626l-.001-.001ZM4.518 16.118l7.608-12.83m.198 13.934 5.051-9.897M2.778 9.675l9.348-6.387m-7.608 12.83 12.857-8.793"})}),ce),Ix=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:(0,u.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.25"})}),(0,u.jsx)("g",{mask:"url(#FillHachureIcon)",children:(0,u.jsx)("path",{d:"M2.258 15.156 15.156 2.258M7.324 20.222 20.222 7.325m-20.444 5.35L12.675-.222m-8.157 18.34L17.416 5.22",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})]}),ce),Mx=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",children:[(0,u.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:(0,u.jsx)("path",{d:"M2.426 15.044 15.044 2.426M7.383 20 20 7.383M0 12.617 12.617 0m-7.98 17.941L17.256 5.324m-2.211 12.25L2.426 4.956M20 12.617 7.383 0m5.234 20L0 7.383m17.941 7.98L5.324 2.745",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("g",{mask:"url(#FillCrossHatchIcon)",children:(0,u.jsx)("path",{d:"M14.121 2H5.88A3.879 3.879 0 0 0 2 5.879v8.242A3.879 3.879 0 0 0 5.879 18h8.242A3.879 3.879 0 0 0 18 14.121V5.88A3.879 3.879 0 0 0 14.121 2Z",fill:"currentColor"})})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),_x=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z",stroke:"currentColor",strokeWidth:"1.25"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),{...ce,fill:"currentColor"}),Wp=L((0,u.jsx)(u.Fragment,{children:(0,u.jsx)("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),ce),Ax=L((0,u.jsx)("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),ce),Lx=L((0,u.jsx)("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),ce),j8=eo.default.memo(({theme:t})=>L((0,u.jsx)("path",{d:"M6 10H34",stroke:qo(t),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})),Px=L((0,u.jsxs)("g",{strokeWidth:"2",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M5 12h2"}),(0,u.jsx)("path",{d:"M17 12h2"}),(0,u.jsx)("path",{d:"M11 12h2"})]}),Q),Rx=L((0,u.jsxs)("g",{strokeWidth:"2",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 12v.01"}),(0,u.jsx)("path",{d:"M8 12v.01"}),(0,u.jsx)("path",{d:"M12 12v.01"}),(0,u.jsx)("path",{d:"M16 12v.01"}),(0,u.jsx)("path",{d:"M20 12v.01"})]}),Q),Dx=L((0,u.jsx)("path",{d:"M2.5 12.038c1.655-.885 5.9-3.292 8.568-4.354 2.668-1.063.101 2.821 1.32 3.104 1.218.283 5.112-1.814 5.112-1.814",strokeWidth:"1.25"}),ce),Nx=L((0,u.jsx)("path",{d:"M2.5 12.563c1.655-.886 5.9-3.293 8.568-4.355 2.668-1.062.101 2.822 1.32 3.105 1.218.283 5.112-1.814 5.112-1.814m-13.469 2.23c2.963-1.586 6.13-5.62 7.468-4.998 1.338.623-1.153 4.11-.132 5.595 1.02 1.487 6.133-1.43 6.133-1.43",strokeWidth:"1.25"}),ce),Ox=L((0,u.jsx)("path",{d:"M2.5 11.936c1.737-.879 8.627-5.346 10.42-5.268 1.795.078-.418 5.138.345 5.736.763.598 3.53-1.789 4.235-2.147M2.929 9.788c1.164-.519 5.47-3.28 6.987-3.114 1.519.165 1 3.827 2.121 4.109 1.122.281 3.839-2.016 4.606-2.42",strokeWidth:"1.25"}),ce),Fx=L((0,u.jsxs)("svg",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{d:"M3.33334 9.99998V6.66665C3.33334 6.04326 3.33403 4.9332 3.33539 3.33646C4.95233 3.33436 6.06276 3.33331 6.66668 3.33331H10"}),(0,u.jsx)("path",{d:"M13.3333 3.33331V3.34331"}),(0,u.jsx)("path",{d:"M16.6667 3.33331V3.34331"}),(0,u.jsx)("path",{d:"M16.6667 6.66669V6.67669"}),(0,u.jsx)("path",{d:"M16.6667 10V10.01"}),(0,u.jsx)("path",{d:"M3.33334 13.3333V13.3433"}),(0,u.jsx)("path",{d:"M16.6667 13.3333V13.3433"}),(0,u.jsx)("path",{d:"M3.33334 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M6.66666 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M10 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M13.3333 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M16.6667 16.6667V16.6767"})]}),ce),Bx=L((0,u.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),(0,u.jsx)("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),(0,u.jsx)("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),(0,u.jsx)("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),(0,u.jsx)("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),(0,u.jsx)("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),(0,u.jsx)("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),(0,u.jsx)("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),(0,u.jsx)("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),(0,u.jsx)("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),(0,u.jsx)("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),(0,u.jsx)("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),Q),zx=L((0,u.jsx)("path",{d:"M6 10H34",stroke:"currentColor",strokeWidth:2,fill:"none"}),{width:40,height:20}),Hx=eo.default.memo(({flip:t=!1})=>L((0,u.jsxs)("g",{transform:t?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[(0,u.jsx)("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),(0,u.jsx)("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})),Gp=eo.default.memo(({flip:t=!1})=>L((0,u.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:t?"translate(40, 0) scale(-1, 1)":"",children:[(0,u.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,u.jsx)("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),$x=eo.default.memo(({flip:t=!1})=>L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",transform:t?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[(0,u.jsx)("path",{d:"M26 10L6 10"}),(0,u.jsx)("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),Ux=eo.default.memo(({flip:t=!1})=>L((0,u.jsx)("g",{transform:t?"translate(40, 0) scale(-1, 1)":"",children:(0,u.jsx)("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})),Wx=eo.default.memo(({flip:t=!1})=>L((0,u.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:t?"translate(40, 0) scale(-1, 1)":"",children:[(0,u.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,u.jsx)("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})),Gx=eo.default.memo(({flip:t=!1})=>L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",transform:t?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",children:[(0,u.jsx)("path",{d:"M6,9.5H27"}),(0,u.jsx)("path",{d:"M27,5L34,10L27,14Z",fill:"none"})]}),{width:40,height:20})),Vx=eo.default.memo(({flip:t=!1})=>L((0,u.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:t?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[(0,u.jsx)("path",{d:"M6,9.5H20"}),(0,u.jsx)("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),Kx=eo.default.memo(({flip:t=!1})=>L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",transform:t?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[(0,u.jsx)("path",{d:"M6,9.5H20"}),(0,u.jsx)("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),Yx=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M14.167 6.667a3.333 3.333 0 0 0-3.334-3.334H9.167a3.333 3.333 0 0 0 0 6.667h1.666a3.333 3.333 0 0 1 0 6.667H9.167a3.333 3.333 0 0 1-3.334-3.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Zx=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),jx=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Xx=L((0,u.jsx)(u.Fragment,{children:(0,u.jsx)("path",{d:"m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),ce),Vp=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 7v-2h13v2"}),(0,u.jsx)("path",{d:"M10 5v14"}),(0,u.jsx)("path",{d:"M12 19h-4"}),(0,u.jsx)("path",{d:"M15 13v-1h6v1"}),(0,u.jsx)("path",{d:"M18 12v7"}),(0,u.jsx)("path",{d:"M17 19h2"})]}),Q),qx=L((0,u.jsx)(u.Fragment,{children:(0,u.jsx)("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334"})})}),ce),Jx=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M5.833 6.667 2.5 10l3.333 3.333M14.167 6.667 17.5 10l-3.333 3.333M11.667 3.333 8.333 16.667"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ce),Qx=L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,u.jsx)("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),(0,u.jsx)("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),Q),ev=L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,u.jsx)("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),(0,u.jsx)("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),Q),tv=L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,u.jsx)("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),(0,u.jsx)("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),Q),ov=eo.default.memo(({theme:t})=>L((0,u.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),(0,u.jsx)("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),Q)),rv=eo.default.memo(({theme:t})=>L((0,u.jsxs)("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),(0,u.jsx)("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),Q)),nv=eo.default.memo(({theme:t})=>L((0,u.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),(0,u.jsx)("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),(0,u.jsx)("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),Q)),iv=L((0,u.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}),X8=L((0,u.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"})),dd=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),(0,u.jsx)("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),(0,u.jsx)("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),(0,u.jsx)("path",{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"})]}),Q),Kp=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),(0,u.jsx)("path",{d:"M7 11l5 5l5 -5"}),(0,u.jsx)("path",{d:"M12 4l0 12"})]}),Q),md=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"}),(0,u.jsx)("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]}),Q),av=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),(0,u.jsx)("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),(0,u.jsx)("path",{d:"M9.15 14.85l8.85 -10.85"}),(0,u.jsx)("path",{d:"M6 4l8.85 10.85"})]}),Q),lv=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),(0,u.jsx)("path",{d:"M12 17l0 .01"}),(0,u.jsx)("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),Q),q8=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M7 4v16l13 -8z"})]}),Q),J8=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z",strokeWidth:"0",fill:"currentColor"})]}),Q),Q8=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M5 12l5 5l10 -10"})]}),Q),sv=L((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z"}),(0,u.jsx)("path",{d:"M12 9v4"}),(0,u.jsx)("path",{d:"M12 17h.01"})]}),Q),cv=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M11 7l6 6"}),(0,u.jsx)("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"})]}),Q),dv=L((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M12 3l-4 7h8z"}),(0,u.jsx)("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),(0,u.jsx)("path",{d:"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"})]}),Q),ud=L((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 7l16 0"}),(0,u.jsx)("path",{d:"M4 17l16 0"}),(0,u.jsx)("path",{d:"M7 4l0 16"}),(0,u.jsx)("path",{d:"M17 4l0 16"})]}),Q),pd=L((0,u.jsx)("path",{fill:"currentColor",d:"M407.48,111.18C335.587,108.103 269.573,152.338 245.08,220C220.587,152.338 154.573,108.103 82.68,111.18C80.285,168.229 107.577,222.632 154.74,254.82C178.908,271.419 193.35,298.951 193.27,328.27L193.27,379.13L296.9,379.13L296.9,328.27C296.816,298.953 311.255,271.42 335.42,254.82C382.596,222.644 409.892,168.233 407.48,111.18Z"})),ca=L((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M4.16602 10H15.8327"}),(0,u.jsx)("path",{d:"M12.5 13.3333L15.8333 10"}),(0,u.jsx)("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),ce),fd=L((0,u.jsxs)("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[(0,u.jsx)("path",{clipRule:"evenodd",d:"m9.644 13.69 7.774-7.773a2.357 2.357 0 0 0-3.334-3.334l-7.773 7.774L8 12l1.643 1.69Z"}),(0,u.jsx)("path",{d:"m13.25 3.417 3.333 3.333M10 10l2-2M5 15l3-3M2.156 17.894l1-1M5.453 19.029l-.144-1.407M2.377 11.887l.866 1.118M8.354 17.273l-1.194-.758M.953 14.652l1.408.13"})]}),20),da=L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z"}),(0,u.jsx)("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),(0,u.jsx)("path",{d:"M15 6l3 3"}),(0,u.jsx)("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),(0,u.jsx)("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),Q),e7=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z"}),(0,u.jsx)("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),(0,u.jsx)("path",{d:"M15 6l3 3"}),(0,u.jsx)("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),(0,u.jsx)("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),Q),Wl=L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35"}),(0,u.jsx)("path",{d:"M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946"}),(0,u.jsx)("path",{d:"M6 7.63c-1.391 -.236 -2.787 .395 -3.534 1.689a3.474 3.474 0 0 0 1.271 4.745l4.263 2.514l6 -3.348"}),(0,u.jsx)("path",{d:"M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45"}),(0,u.jsx)("path",{d:"M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946"}),(0,u.jsx)("path",{d:"M18 16.302c1.391 .236 2.787 -.395 3.534 -1.689a3.474 3.474 0 0 0 -1.271 -4.745l-4.308 -2.514l-5.955 3.42"})]}),Q),mv=L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),(0,u.jsx)("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),(0,u.jsx)("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),(0,u.jsx)("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"})]}),Q),ma=L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"}),(0,u.jsx)("path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"})]}),Q),uv=L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"}),(0,u.jsx)("path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"}),(0,u.jsx)("path",{d:"M3 3l18 18"})]}),Q),pv=L((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),(0,u.jsx)("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),(0,u.jsx)("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),(0,u.jsx)("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),(0,u.jsx)("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),(0,u.jsx)("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),Q),fv=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),(0,u.jsx)("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),(0,u.jsx)("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),(0,u.jsx)("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),(0,u.jsx)("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),(0,u.jsx)("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),Q),hd=L((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),(0,u.jsx)("path",{d:"M21 21l-6 -6"})]}),Q),hv=L((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M20.984 12.53a9 9 0 1 0 -7.552 8.355"}),(0,u.jsx)("path",{d:"M12 7v5l3 3"}),(0,u.jsx)("path",{d:"M19 16l-2 3h4l-2 3"})]}),Q),gv=L((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M9 2m0 3a3 3 0 0 1 3 -3h0a3 3 0 0 1 3 3v5a3 3 0 0 1 -3 3h0a3 3 0 0 1 -3 -3z"}),(0,u.jsx)("path",{d:"M5 10a7 7 0 0 0 14 0"}),(0,u.jsx)("path",{d:"M8 21l8 0"}),(0,u.jsx)("path",{d:"M12 17l0 4"})]}),Q),bv=L((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 3l18 18"}),(0,u.jsx)("path",{d:"M9 5a3 3 0 0 1 6 0v5a3 3 0 0 1 -.13 .874m-2 2a3 3 0 0 1 -3.87 -2.872v-1"}),(0,u.jsx)("path",{d:"M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85"}),(0,u.jsx)("path",{d:"M8 21l8 0"}),(0,u.jsx)("path",{d:"M12 17l0 4"})]}),Q),gd=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"})]}),Q),xv=L((0,u.jsxs)("g",{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M8 8m0 1a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1z"}),(0,u.jsx)("path",{d:"M12 20v.01"}),(0,u.jsx)("path",{d:"M16 20v.01"}),(0,u.jsx)("path",{d:"M8 20v.01"}),(0,u.jsx)("path",{d:"M4 20v.01"}),(0,u.jsx)("path",{d:"M4 16v.01"}),(0,u.jsx)("path",{d:"M4 12v.01"}),(0,u.jsx)("path",{d:"M4 8v.01"}),(0,u.jsx)("path",{d:"M4 4v.01"}),(0,u.jsx)("path",{d:"M8 4v.01"}),(0,u.jsx)("path",{d:"M12 4v.01"}),(0,u.jsx)("path",{d:"M16 4v.01"}),(0,u.jsx)("path",{d:"M20 4v.01"}),(0,u.jsx)("path",{d:"M20 8v.01"}),(0,u.jsx)("path",{d:"M20 12v.01"}),(0,u.jsx)("path",{d:"M20 16v.01"}),(0,u.jsx)("path",{d:"M20 20v.01"})]}),Q),vv=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M5 3v18"}),(0,u.jsx)("path",{d:"M19 21v-18"}),(0,u.jsx)("path",{d:"M5 7h14"}),(0,u.jsx)("path",{d:"M5 15h14"}),(0,u.jsx)("path",{d:"M8 13v4"}),(0,u.jsx)("path",{d:"M11 13v4"}),(0,u.jsx)("path",{d:"M16 13v4"}),(0,u.jsx)("path",{d:"M14 5v4"}),(0,u.jsx)("path",{d:"M11 5v4"}),(0,u.jsx)("path",{d:"M8 5v4"}),(0,u.jsx)("path",{d:"M3 21h18"})]}),Q),yv=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 12l18 0"}),(0,u.jsx)("path",{d:"M7 16l10 0l-10 5l0 -5"}),(0,u.jsx)("path",{d:"M7 8l10 0l-10 -5l0 5"})]}),Q),Ev=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M12 3l0 18"}),(0,u.jsx)("path",{d:"M16 7l0 10l5 0l-5 -10"}),(0,u.jsx)("path",{d:"M8 7l0 10l-5 0l5 -10"})]}),Q),Yp=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"}),(0,u.jsx)("path",{d:"M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"}),(0,u.jsx)("path",{d:"M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"})]}),Q),bd=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"}),(0,u.jsx)("path",{d:"M22 22l-3 -3"}),(0,u.jsx)("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),(0,u.jsx)("path",{d:"M3 11v-1"}),(0,u.jsx)("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),(0,u.jsx)("path",{d:"M10 3h1"}),(0,u.jsx)("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"})]}),Q),wv=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),(0,u.jsx)("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),(0,u.jsx)("path",{d:"M4 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"}),(0,u.jsx)("path",{d:"M10 15l2 6l2 -6"}),(0,u.jsx)("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"})]}),Q),Cv=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),(0,u.jsx)("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),(0,u.jsx)("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"}),(0,u.jsx)("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"}),(0,u.jsx)("path",{d:"M11 21v-6l3 6v-6"})]}),Q),Tv=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 13v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a2 2 0 0 0 6 0v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a8 8 0 0 1 -16 0"}),(0,u.jsx)("path",{d:"M4 8l5 0"}),(0,u.jsx)("path",{d:"M15 8l4 0"})]}),Q),Sv=L((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 14c.83 .642 2.077 1.017 3.5 1c1.423 .017 2.67 -.358 3.5 -1c.83 -.642 2.077 -1.017 3.5 -1c1.423 -.017 2.67 .358 3.5 1"}),(0,u.jsx)("path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),(0,u.jsx)("path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),(0,u.jsx)("path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z"}),(0,u.jsx)("path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555"})]}),Q),kv=L((0,u.jsxs)("g",{stroke:"currentColor",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 5a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-16a1 1 0 0 1-1-1v-10zM7 20h10M9 16v4M15 16v4"})]}),{...Q,strokeWidth:1.5}),t7=L((0,u.jsxs)("g",{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M10 12l10 0"}),(0,u.jsx)("path",{d:"M10 12l4 4"}),(0,u.jsx)("path",{d:"M10 12l4 -4"}),(0,u.jsx)("path",{d:"M4 4l0 16"})]}),Q),Iv=L((0,u.jsxs)("g",{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8z"}),(0,u.jsx)("path",{d:"M10 9l5 3l-5 3z"})]}),Q);var _v=v(k(),1),U6=(t,e)=>{let o=new Set(ye(t.filter(r=>Ee(r)),e).map(r=>r.id));return{elements:t.map(r=>e.selectedElementIds[r.id]?me(r,{isDeleted:!0}):r.frameId&&o.has(r.frameId)?me(r,{isDeleted:!0}):bt(r)&&e.selectedElementIds[r.containerId]?me(r,{isDeleted:!0}):r),appState:{...e,selectedElementIds:{},selectedGroupIds:{}}}},Mv=(t,e)=>{if(t.editingGroupId){let o=pt(ve(e),t.editingGroupId);if(o.length)return{...t,selectedElementIds:{[o[0].id]:!0}}}return t},Gl=$({name:"deleteSelectedElements",label:"labels.delete",icon:Jo,trackEvent:{category:"element",action:"delete"},perform:(t,e,o,r)=>{if(e.editingLinearElement){let{elementId:a,selectedPointsIndices:l,startBindingElement:s,endBindingElement:c}=e.editingLinearElement,d=r.scene.getNonDeletedElementsMap(),m=ue.getElement(a,d);if(!m||l==null)return!1;if(m.points.length<2){let f=t.map(x=>x.id===m.id?me(x,{isDeleted:!0}):x),b=Mv(e,f);return{elements:f,appState:{...b,editingLinearElement:null},commitToHistory:!1}}let p={startBindingElement:l?.includes(0)?null:s,endBindingElement:l?.includes(m.points.length-1)?null:c};return ue.deletePoints(m,l),{elements:t,appState:{...e,editingLinearElement:{...e.editingLinearElement,...p,selectedPointsIndices:l?.[0]>0?[l[0]-1]:[0]}},commitToHistory:!0}}let{elements:n,appState:i}=U6(t,e);return Wi(n,t.filter(({id:a})=>e.selectedElementIds[a])),i=Mv(i,n),{elements:n,appState:{...i,activeTool:nt(e,{type:"selection"}),multiElement:null,activeEmbeddable:null},commitToHistory:Fe(ve(t),e)}},keyTest:(t,e,o)=>(t.key===T.BACKSPACE||t.key===T.DELETE)&&!t[T.CTRL_OR_CMD],PanelComponent:({elements:t,appState:e,updateData:o})=>(0,_v.jsx)(se,{type:"button",icon:Jo,title:g("labels.delete"),"aria-label":g("labels.delete"),onClick:()=>o(null),visible:Fe(ve(t),e)})});h();h();var Zp=(t,e)=>t.frameId===e||t.id===e,Lv=(t,e,o)=>{let r=[],n=[],i=null,a=-1,l=xe(o||ye(t,e,{includeBoundTextElement:!0,includeElementsInFrames:!0}));for(;++a<t.length;){let s=t[a];l.get(s.id)?(n.length&&(r=r.concat(n),n=[]),r.push(a),i=a+1):s.isDeleted&&i===a?(i=a+1,n.push(a)):n=[]}return r},W6=t=>{let e=0;return t.reduce((o,r,n)=>(n>0&&t[n-1]!==r-1&&(e=++e),(o[e]||(o[e]=[])).push(r),o),[])},Av=(t,e,o)=>{if("containerId"in t&&t.containerId)if(o==="left"){let r=To.getScene(t).getElement(t.containerId);if(r)return e.indexOf(r)}else return e.indexOf(t);else{let r=t.boundElements?.find(n=>n.type!=="arrow")?.id;if(r){if(o==="left")return e.indexOf(t);let n=To.getScene(t).getElement(r);if(n)return e.indexOf(n)}}},G6=(t,e)=>{let o=-1,r=-1;return t.forEach((n,i)=>{Zp(n,e)&&(o===-1&&(o=i),r=i)}),o===-1?[]:t.slice(o,r+1)},V6=(t,e,o,r,n)=>{let i=e[o],a=m=>m.isDeleted?!1:n?m.frameId===n:t.editingGroupId?m.groupIds.includes(t.editingGroupId):!0,l=r==="left"?zu(e,m=>a(m),Math.max(0,o-1)):Bu(e,m=>a(m),o+1),s=e[l];if(!s)return-1;if(t.editingGroupId){if(i?.groupIds.join("")===s?.groupIds.join(""))return Av(s,e,r)??l;if(!s?.groupIds.includes(t.editingGroupId))return-1}if(!n&&(s.frameId||Ee(s))){let m=G6(e,s.frameId||s.id);return r==="left"?e.indexOf(m[0]):e.indexOf(m[m.length-1])}if(!s.groupIds.length)return Av(s,e,r)??l;let c=t.editingGroupId?s.groupIds[s.groupIds.indexOf(t.editingGroupId)-1]:s.groupIds[s.groupIds.length-1],d=pt(e,c);return d.length?r==="left"?e.indexOf(d[0]):e.indexOf(d[d.length-1]):l},Pv=(t,e)=>e.reduce((o,r)=>{let n=t[r];return o.set(n.id,n),o},new Map),Rv=(t,e,o)=>{let r=Lv(t,e),n=Pv(t,r),i=W6(r);o==="right"&&(i=i.reverse());let a=new Set(r.filter(l=>Ee(t[l])).map(l=>t[l].id));return i.forEach((l,s)=>{let c=l[0],d=l[l.length-1],m=o==="left"?c:d,p=l.some(C=>{let w=t[C];return w.frameId&&a.has(w.frameId)})?null:t[m]?.frameId,f=V6(e,t,m,o,p);if(f===-1||m===f)return;let b=o==="left"?t.slice(0,f):t.slice(0,c),x=t.slice(c,d+1),y=o==="left"?t.slice(f,c):t.slice(d+1,f+1),S=o==="left"?t.slice(d+1):t.slice(f+1);t=o==="left"?[...b,...x,...y,...S]:[...b,...y,...x,...S]}),po(t,n),t},Dv=(t,e,o,r,n)=>{let i=Lv(t,e,n),a=Pv(t,i),l=[],s,c;if(o==="left"){if(r)s=Bu(t,b=>Zp(b,r));else if(e.editingGroupId){let b=pt(t,e.editingGroupId);if(!b.length)return t;s=t.indexOf(b[0])}else s=0;c=i[i.length-1]}else{if(r)c=zu(t,b=>Zp(b,r));else if(e.editingGroupId){let b=pt(t,e.editingGroupId);if(!b.length)return t;c=t.indexOf(b[b.length-1])}else c=t.length-1;s=i[0]}s===-1&&(s=0);for(let b=s;b<c+1;b++)i.includes(b)||l.push(t[b]);let d=Array.from(a.values()),m=t.slice(0,s),p=t.slice(c+1),f=o==="left"?[...m,...d,...l,...p]:[...m,...l,...d,...p];return po(f,a),f};function Nv(t,e,o,r){let n=xe(ye(t,e,{includeBoundTextElement:!0,includeElementsInFrames:!0})),i={regularElements:[],frameChildren:new Map},a=new Set;for(let c of t)n.has(c.id)&&Ee(c)&&a.add(c.id);for(let c of t)if(n.has(c.id))if(Ee(c)||c.frameId&&a.has(c.frameId))i.regularElements.push(c);else if(!c.frameId)i.regularElements.push(c);else{let d=i.frameChildren.get(c.frameId)||[];d.push(c),i.frameChildren.set(c.frameId,d)}let l=t,s=Array.from(i.frameChildren.entries());for(let[c,d]of s)l=r(t,e,o,c,d);return r(l,e,o,null,i.regularElements)}var Ov=(t,e)=>Rv(t,e,"left"),Fv=(t,e)=>Rv(t,e,"right"),Bv=(t,e)=>Nv(t,e,"left",Dv),zv=(t,e)=>Nv(t,e,"right",Dv);var Vl=v(k(),1),jp=$({name:"sendBackward",label:"labels.sendBackward",icon:Pp,trackEvent:{category:"element"},perform:(t,e)=>({elements:Ov(t,e),appState:e,commitToHistory:!0}),keyPriority:40,keyTest:t=>t[T.CTRL_OR_CMD]&&!t.shiftKey&&t.code===pe.BRACKET_LEFT,PanelComponent:({updateData:t,appState:e})=>(0,Vl.jsx)("button",{type:"button",className:"zIndexButton",onClick:()=>t(null),title:`${g("labels.sendBackward")} \u2014 ${N("CtrlOrCmd+[")}`,children:Pp})}),Xp=$({name:"bringForward",label:"labels.bringForward",icon:Lp,trackEvent:{category:"element"},perform:(t,e)=>({elements:Fv(t,e),appState:e,commitToHistory:!0}),keyPriority:40,keyTest:t=>t[T.CTRL_OR_CMD]&&!t.shiftKey&&t.code===pe.BRACKET_RIGHT,PanelComponent:({updateData:t,appState:e})=>(0,Vl.jsx)("button",{type:"button",className:"zIndexButton",onClick:()=>t(null),title:`${g("labels.bringForward")} \u2014 ${N("CtrlOrCmd+]")}`,children:Lp})}),qp=$({name:"sendToBack",label:"labels.sendToBack",icon:Dp,trackEvent:{category:"element"},perform:(t,e)=>({elements:Bv(t,e),appState:e,commitToHistory:!0}),keyTest:t=>Vo?t[T.CTRL_OR_CMD]&&t.altKey&&t.code===pe.BRACKET_LEFT:t[T.CTRL_OR_CMD]&&t.shiftKey&&t.code===pe.BRACKET_LEFT,PanelComponent:({updateData:t,appState:e})=>(0,Vl.jsx)("button",{type:"button",className:"zIndexButton",onClick:()=>t(null),title:`${g("labels.sendToBack")} \u2014 ${Vo?N("CtrlOrCmd+Alt+["):N("CtrlOrCmd+Shift+[")}`,children:Dp})}),Jp=$({name:"bringToFront",label:"labels.bringToFront",icon:Rp,trackEvent:{category:"element"},perform:(t,e)=>({elements:zv(t,e),appState:e,commitToHistory:!0}),keyTest:t=>Vo?t[T.CTRL_OR_CMD]&&t.altKey&&t.code===pe.BRACKET_RIGHT:t[T.CTRL_OR_CMD]&&t.shiftKey&&t.code===pe.BRACKET_RIGHT,PanelComponent:({updateData:t,appState:e})=>(0,Vl.jsx)("button",{type:"button",className:"zIndexButton",onClick:o=>t(null),title:`${g("labels.bringToFront")} \u2014 ${Vo?N("CtrlOrCmd+Alt+]"):N("CtrlOrCmd+Shift+]")}`,children:Rp})});h();var Qp=$({name:"selectAll",label:"labels.selectAll",icon:xv,trackEvent:{category:"canvas"},viewMode:!1,perform:(t,e,o,r)=>{if(e.editingLinearElement)return!1;let n=ea(t.filter(i=>!i.isDeleted&&!(le(i)&&i.containerId)&&!i.locked)).reduce((i,a)=>(i[a.id]=!0,i),{});return{appState:{...e,...Dt({editingGroupId:null,selectedElementIds:n},ve(t),e,r),selectedLinearElement:Object.keys(n).length===1&&Ne(t[0])?new ue(t[0]):null},commitToHistory:!0}},keyTest:t=>t[T.CTRL_OR_CMD]&&t.key===T.A});h();h();var K6=t=>{let e=t.slice(),o=new Set,r=i=>{let a=i[0]?.groupIds?.join(""),l=[i[0]],s=[];for(let c of i.slice(1))c.groupIds?.join("")===a?l.push(c):s.push(c);return s.length?[...l,...r(s)]:l},n=new Map;return e.forEach((i,a)=>{if(!n.has(i.id))if(i.groupIds?.length){let l=i.groupIds[i.groupIds.length-1],s=e.slice(a).filter(c=>{let d=c?.groupIds?.some(m=>m===l);return d&&n.set(c.id,!0),d});for(let c of r(s))o.add(c)}else o.add(i)}),o.size!==t.length?(console.error("normalizeGroupElementOrder: lost some elements... bailing!"),t):[...o]},Y6=t=>{let e=N1(t),o=t.slice(),r=new Set;return o.forEach((n,i)=>{n&&(n.boundElements?.length?(r.add(n),o[i]=null,n.boundElements.forEach(a=>{let l=e.get(a.id);l&&a.type==="text"&&(r.add(l[0]),o[l[1]]=null)})):n.type==="text"&&n.containerId&&e.get(n.containerId)?.[0].boundElements?.find(l=>l.id===n.id)||(r.add(n),o[i]=null))}),r.size!==t.length?(console.error("normalizeBoundElementsOrder: lost some elements... bailing!"),t):[...r]},Hv=t=>Y6(K6(t));var $v=v(k(),1),ef=$({name:"duplicateSelection",label:"labels.duplicateSelection",icon:zl,trackEvent:{category:"element"},perform:(t,e,o,r)=>{let n=r.scene.getNonDeletedElementsMap();if(e.editingLinearElement){let i=ue.duplicateSelectedPoints(e,n);return i?{elements:t,appState:i.appState,commitToHistory:!0}:!1}return{...Z6(t,e),commitToHistory:!0}},keyTest:t=>t[T.CTRL_OR_CMD]&&t.key===T.D,PanelComponent:({elements:t,appState:e,updateData:o})=>(0,$v.jsx)(se,{type:"button",icon:zl,title:`${g("labels.duplicateSelection")} \u2014 ${N("CtrlOrCmd+D")}`,"aria-label":g("labels.duplicateSelection"),onClick:()=>o(null),visible:Fe(ve(t),e)})}),Z6=(t,e)=>{let o=Hv(t),r=new Map,n=[],i=[],a=new Map,l=new Map,s=C=>{let w=Sc(e.editingGroupId,r,C,{x:C.x+Ar/2,y:C.y+Ar/2});return l.set(w.id,w),a.set(C.id,w.id),i.push(C),n.push(w),w},c=xe(ye(o,e,{includeBoundTextElement:!0,includeElementsInFrames:!0})),d=new Map,m=C=>{for(let w of C)d.set(w.id,!0);return C},p=[],f=-1;for(;++f<o.length;){let C=o[f];if(d.get(C.id))continue;let w=st(C,xe(t)),M=Ee(C);if(c.get(C.id)){if(C.groupIds.length||w||M){let B=gb(e,C);if(B){let I=pt(o,B).flatMap(_=>Ee(_)?[...hn(t,_.id),_]:[_]);p.push(...m([...I,...I.map(_=>s(_))]));continue}if(w){p.push(...m([C,w,s(C),s(w)]));continue}if(M){let I=hn(o,C.id);p.push(...m([...I,C,...I.map(_=>s(_)),s(C)]));continue}}(!C.frameId||!c.has(C.frameId))&&p.push(...m([C,s(C)]))}else p.push(...m([C]))}let b=[],x=new Map;for(f=p.length;--f>=0;){let C=p[f];x.get(C.id)||(x.set(C.id,!0),b.push(C))}let y=b.reverse();po(y,xe([...i,...n])),gc(p,i,a),hc(p,i,a),Fc(y,i,a);let S=ea(n);return{elements:y,appState:{...e,...Dt({editingGroupId:e.editingGroupId,selectedElementIds:S.reduce((C,w)=>(bt(w)||(C[w.id]=!0),C),{})},ve(y),e,null)}}};h();h();var j6=["ai","command_palette"],ge=(t,e,o,r)=>{try{if(typeof window>"u"||E.VITE_WORKER_ID||E.PROD||!j6.includes(t))return;E.PROD||console.info("trackEvent",{category:t,action:e,label:o,value:r}),window.sa_event&&window.sa_event(e,{category:t,label:o,value:r})}catch(n){console.error("error during analytics",n)}};h();var ua=v(k(),1),gr=t=>(0,ua.jsx)("div",{className:"buttonList buttonListIcon",children:t.options.map(e=>t.type==="button"?(0,ua.jsx)("button",{onClick:o=>t.onClick(e.value,o),className:z({active:e.active??t.value===e.value}),"data-testid":e.testId,title:e.text,children:e.icon},e.text):(0,ua.jsxs)("label",{className:z({active:t.value===e.value}),title:e.text,children:[(0,ua.jsx)("input",{type:"radio",name:t.group,onChange:()=>t.onChange(e.value),checked:t.value===e.value,"data-testid":e.testId}),e.icon]},e.text))});h();h();var xd=v(k(),1),Uv=({onChange:t,type:e,activeColor:o,topPicks:r})=>{let n;return e==="elementStroke"&&(n=Gs),e==="elementBackground"&&(n=Vs),e==="canvasBackground"&&(n=Ks),r&&(n=r),n?(0,xd.jsx)("div",{className:"color-picker__top-picks",children:n.map(i=>(0,xd.jsx)("button",{className:z("color-picker__button",{active:i===o,"is-transparent":i==="transparent"||!i}),style:{"--swatch-color":i},type:"button",title:i,onClick:()=>t(i),"data-testid":`color-top-pick-${i}`,children:(0,xd.jsx)("div",{className:"color-picker__button-outline"})},i))}):(console.error("Invalid type for TopPicks"),null)};h();var xn=v(H(),1);h();var vd=v(H(),1);h();var bn=({palette:t,color:e})=>{for(let[o,r]of Object.entries(t))if(Array.isArray(r)){let n=r.indexOf(e);if(n>-1)return{colorName:o,shade:n}}else if(r===e)return{colorName:o,shade:null};return null},Kl=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),tf=({color:t,palette:e})=>!Object.values(e).flat().includes(t),Gv=(t,e,o)=>{let r={elementBackground:"backgroundColor",elementStroke:"strokeColor"},n=t.filter(a=>{if(a.isDeleted)return!1;let l=a[r[e]];return tf({color:l,palette:o})}),i=new Map;return n.forEach(a=>{let l=a[r[e]];i.has(l)?i.set(l,i.get(l)+1):i.set(l,1)}),[...i.entries()].sort((a,l)=>l[1]-a[1]).map(a=>a[0]).slice(0,Zg)},Lo=Ue(null),Wv=(t,e,o)=>(t*299+e*587+o*114)/1e3>=160?"black":"white",Vv=(t,e)=>{if(e){let i=new Option().style;if(i.color=t,i.color){let a=i.color.replace(/^(rgb|rgba)\(/,"").replace(/\)$/,"").replace(/\s/g,"").split(","),l=parseInt(a[0]),s=parseInt(a[1]),c=parseInt(a[2]);return Wv(l,s,c)}}if(t==="transparent")return"black";let o=parseInt(t.substring(1,3),16),r=parseInt(t.substring(3,5),16),n=parseInt(t.substring(5,7),16);return Wv(o,r,n)};h();var Kv=v(k(),1),X6=({color:t,keyLabel:e,isCustomColor:o=!1,isShade:r=!1})=>(0,Kv.jsxs)("div",{className:"color-picker__button__hotkey-label",style:{color:Vv(t,o)},children:[r&&"\u21E7",e]}),pa=X6;var Gr=v(k(),1),Yv=({hex:t,onChange:e,palette:o})=>{let r=bn({color:t||"transparent",palette:o}),[n,i]=Ce(Lo),a=(0,vd.useRef)(null);if((0,vd.useEffect)(()=>{a.current&&n==="shades"&&a.current.focus()},[r,n]),r){let{colorName:l,shade:s}=r,c=o[l];if(Array.isArray(c))return(0,Gr.jsx)("div",{className:"color-picker-content--default shades",children:c.map((d,m)=>(0,Gr.jsxs)("button",{ref:m===s&&n==="shades"?a:void 0,tabIndex:-1,type:"button",className:z("color-picker__button color-picker__button--large",{active:m===s}),"aria-label":"Shade",title:`${l} - ${m+1}`,style:d?{"--swatch-color":d}:void 0,onClick:()=>{e(d),i("shades")},children:[(0,Gr.jsx)("div",{className:"color-picker__button-outline"}),(0,Gr.jsx)(pa,{color:d,keyLabel:m+1,isShade:!0})]},m))})}return(0,Gr.jsxs)("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[(0,Gr.jsx)("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),(0,Gr.jsx)("div",{tabIndex:-1,style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:"0.75rem"},children:g("colorPicker.noShades")})]})};h();var yd=v(H(),1);var fa=v(k(),1),q6=({palette:t,color:e,onChange:o,label:r,activeShade:n})=>{let i=bn({color:e||"transparent",palette:t}),[a,l]=Ce(Lo),s=(0,yd.useRef)(null);return(0,yd.useEffect)(()=>{s.current&&a==="baseColors"&&s.current.focus()},[i?.colorName,a]),(0,fa.jsx)("div",{className:"color-picker-content--default",children:Object.entries(t).map(([c,d],m)=>{let p=(Array.isArray(d)?d[n]:d)||"transparent",f=Kl[m],b=g(`colors.${c.replace(/\d+/,"")}`,null,"");return(0,fa.jsxs)("button",{ref:i?.colorName===c?s:void 0,tabIndex:-1,type:"button",className:z("color-picker__button color-picker__button--large",{active:i?.colorName===c,"is-transparent":p==="transparent"||!p}),onClick:()=>{o(p),l("baseColors")},title:`${b}${p.startsWith("#")?` ${p}`:""} \u2014 ${f}`,"aria-label":`${b} \u2014 ${f}`,style:p?{"--swatch-color":p}:void 0,"data-testid":`color-${c}`,children:[(0,fa.jsx)("div",{className:"color-picker__button-outline"}),(0,fa.jsx)(pa,{color:p,keyLabel:f})]},c)})})},Zv=q6;h();var Ed=v(H(),1);var ha=v(k(),1),jv=({colors:t,color:e,onChange:o,label:r})=>{let[n,i]=Ce(Lo),a=(0,Ed.useRef)(null);return(0,Ed.useEffect)(()=>{a.current&&a.current.focus()},[e,n]),(0,ha.jsx)("div",{className:"color-picker-content--default",children:t.map((l,s)=>(0,ha.jsxs)("button",{ref:e===l?a:void 0,tabIndex:-1,type:"button",className:z("color-picker__button color-picker__button--large",{active:e===l,"is-transparent":l==="transparent"||!l}),onClick:()=>{o(l),i("custom")},title:l,"aria-label":r,style:{"--swatch-color":l},children:[(0,ha.jsx)("div",{className:"color-picker__button-outline"}),(0,ha.jsx)(pa,{color:l,keyLabel:s+1,isCustomColor:!0})]},s))})};h();var of=(t,e,o)=>{let r=Math.ceil(o/$n);switch(e=e??-1,t){case"ArrowLeft":{let n=e-1;return n<0?o-1:n}case"ArrowRight":return(e+1)%o;case"ArrowDown":{let n=e+$n;return n>=o?e%$n:n}case"ArrowUp":{let n=e-$n,i=n<0?$n*r+n:n;return i>=o?void 0:i}}},J6=({e:t,colorObj:e,onChange:o,palette:r,customColors:n,setActiveColorPickerSection:i,activeShade:a})=>{if(e?.shade!=null&&["Digit1","Digit2","Digit3","Digit4","Digit5"].includes(t.code)&&t.shiftKey){let l=Number(t.code.slice(-1))-1;return o(r[e.colorName][l]),i("shades"),!0}if(["1","2","3","4","5"].includes(t.key)&&n[Number(t.key)-1])return o(n[Number(t.key)-1]),i("custom"),!0;if(Kl.includes(t.key)){let l=Kl.indexOf(t.key),s=Object.keys(r)[l],c=r[s],d=Array.isArray(c)?c[a]:c;return o(d),i("baseColors"),!0}return!1},Xv=({event:t,activeColorPickerSection:e,palette:o,color:r,onChange:n,customColors:i,setActiveColorPickerSection:a,updateData:l,activeShade:s,onEyeDropperToggle:c,onEscape:d})=>{if(t[T.CTRL_OR_CMD])return!1;if(t.key===T.ESCAPE)return d(t),!0;if(t.key===T.ALT)return c(!0),!0;if(t.key===T.I)return c(),!0;let m=bn({color:r,palette:o});if(t.key===T.TAB){let p={custom:!!i.length,baseColors:!0,shades:m?.shade!=null,hex:!0},f=Object.entries(p).reduce((C,[w,M])=>(M&&C.push(w),C),[]),b=f.indexOf(e),x=t.shiftKey?-1:1,y=b+x>f.length-1?0:b+x<0?f.length-1:b+x,S=f[y];return S&&a(S),S==="custom"?n(i[0]):S==="baseColors"&&(Object.entries(o).find(([w,M])=>Array.isArray(M)?M.includes(r):M===r?w:null)||n(Ir.black)),t.preventDefault(),t.stopPropagation(),!0}if(J6({e:t,colorObj:m,onChange:n,palette:o,customColors:i,setActiveColorPickerSection:a,activeShade:s}))return!0;if(e==="shades"&&m){let{shade:p}=m,f=of(t.key,p,$n);if(f!==void 0)return n(o[m.colorName][f]),!0}if(e==="baseColors"&&m){let{colorName:p}=m,f=Object.keys(o),b=f.indexOf(p),x=of(t.key,b,f.length);if(x!==void 0){let y=f[x],S=o[y];return n(Array.isArray(S)?S[s]:S),!0}}if(e==="custom"){let p=i.indexOf(r),f=of(t.key,p,i.length);if(f!==void 0){let b=i[f];return n(b),!0}}return!1};h();var qv=v(k(),1),Q6=({children:t})=>(0,qv.jsx)("div",{className:"color-picker__heading",children:t}),ga=Q6;var fo=v(k(),1),Jv=({color:t,onChange:e,label:o,type:r,elements:n,palette:i,updateData:a,children:l,onEyeDropperToggle:s,onEscape:c})=>{let[d]=xn.default.useState(()=>r==="canvasBackground"?[]:Gv(n,r,i)),[m,p]=Ce(Lo),f=bn({color:t,palette:i});(0,xn.useEffect)(()=>{if(!m){let S=tf({color:t,palette:i}),C=S&&!d.includes(t);p(C?"hex":S?"custom":f?.shade!=null?"shades":"baseColors")}},[m,t,i,p,f,d]);let[b,x]=(0,xn.useState)(f?.shade??(r==="elementBackground"?Xg:jg));(0,xn.useEffect)(()=>{f?.shade!=null&&x(f.shade);let S=C=>{C.key===T.ALT&&s(!1)};return document.addEventListener("keyup",S,{capture:!0}),()=>{document.removeEventListener("keyup",S,{capture:!0})}},[f,s]);let y=xn.default.useRef(null);return(0,fo.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":g("labels.colorPicker"),children:(0,fo.jsxs)("div",{ref:y,onKeyDown:S=>{Xv({event:S,activeColorPickerSection:m,palette:i,color:t,onChange:e,onEyeDropperToggle:s,customColors:d,setActiveColorPickerSection:p,updateData:a,activeShade:b,onEscape:c})&&(S.preventDefault(),S.stopPropagation())},className:"color-picker-content",tabIndex:-1,children:[!!d.length&&(0,fo.jsxs)("div",{children:[(0,fo.jsx)(ga,{children:g("colorPicker.mostUsedCustomColors")}),(0,fo.jsx)(jv,{colors:d,color:t,label:g("colorPicker.mostUsedCustomColors"),onChange:e})]}),(0,fo.jsxs)("div",{children:[(0,fo.jsx)(ga,{children:g("colorPicker.colors")}),(0,fo.jsx)(Zv,{color:t,label:o,palette:i,onChange:e,activeShade:b})]}),(0,fo.jsxs)("div",{children:[(0,fo.jsx)(ga,{children:g("colorPicker.shades")}),(0,fo.jsx)(Yv,{hex:t,onChange:e,palette:i})]}),l]})})};h();h();function we(){return we=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t},we.apply(this,arguments)}var Te=v(H());h();function vt(t,e,{checkForDefaultPrevented:o=!0}={}){return function(n){if(t?.(n),o===!1||!n.defaultPrevented)return e?.(n)}}h();var Qv=v(H());function e4(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function rf(...t){return e=>t.forEach(o=>e4(o,e))}function Ot(...t){return(0,Qv.useCallback)(rf(...t),t)}h();var Qo=v(H());function xr(t,e=[]){let o=[];function r(i,a){let l=(0,Qo.createContext)(a),s=o.length;o=[...o,a];function c(m){let{scope:p,children:f,...b}=m,x=p?.[t][s]||l,y=(0,Qo.useMemo)(()=>b,Object.values(b));return(0,Qo.createElement)(x.Provider,{value:y},f)}function d(m,p){let f=p?.[t][s]||l,b=(0,Qo.useContext)(f);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${m}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,d]}let n=()=>{let i=o.map(a=>(0,Qo.createContext)(a));return function(l){let s=l?.[t]||i;return(0,Qo.useMemo)(()=>({[`__scope${t}`]:{...l,[t]:s}}),[l,s])}};return n.scopeName=t,[r,t4(n,...e)]}function t4(...t){let e=t[0];if(t.length===1)return e;let o=()=>{let r=t.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(i){let a=r.reduce((l,{useScope:s,scopeName:c})=>{let m=s(i)[`__scope${c}`];return{...l,...m}},{});return(0,Qo.useMemo)(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return o.scopeName=e.scopeName,o}h();var ht=v(H());h();var ba=v(H()),e2=v(hr());h();var at=v(H());var vn=(0,at.forwardRef)((t,e)=>{let{children:o,...r}=t,n=at.Children.toArray(o),i=n.find(r4);if(i){let a=i.props.children,l=n.map(s=>s===i?at.Children.count(a)>1?at.Children.only(null):(0,at.isValidElement)(a)?a.props.children:null:s);return(0,at.createElement)(nf,we({},r,{ref:e}),(0,at.isValidElement)(a)?(0,at.cloneElement)(a,void 0,l):null)}return(0,at.createElement)(nf,we({},r,{ref:e}),o)});vn.displayName="Slot";var nf=(0,at.forwardRef)((t,e)=>{let{children:o,...r}=t;return(0,at.isValidElement)(o)?(0,at.cloneElement)(o,{...n4(r,o.props),ref:rf(e,o.ref)}):at.Children.count(o)>1?at.Children.only(null):null});nf.displayName="SlotClone";var o4=({children:t})=>(0,at.createElement)(at.Fragment,null,t);function r4(t){return(0,at.isValidElement)(t)&&t.type===o4}function n4(t,e){let o={...e};for(let r in e){let n=t[r],i=e[r];/^on[A-Z]/.test(r)?n&&i?o[r]=(...l)=>{i(...l),n(...l)}:n&&(o[r]=n):r==="style"?o[r]={...n,...i}:r==="className"&&(o[r]=[n,i].filter(Boolean).join(" "))}return{...t,...o}}var i4=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],ct=i4.reduce((t,e)=>{let o=(0,ba.forwardRef)((r,n)=>{let{asChild:i,...a}=r,l=i?vn:e;return(0,ba.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,ba.createElement)(l,we({},a,{ref:n}))});return o.displayName=`Primitive.${e}`,{...t,[e]:o}},{});function t2(t,e){t&&(0,e2.flushSync)(()=>t.dispatchEvent(e))}h();var xa=v(H());function to(t){let e=(0,xa.useRef)(t);return(0,xa.useEffect)(()=>{e.current=t}),(0,xa.useMemo)(()=>(...o)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...o)},[])}h();var o2=v(H());function r2(t,e=globalThis?.document){let o=to(t);(0,o2.useEffect)(()=>{let r=n=>{n.key==="Escape"&&o(n)};return e.addEventListener("keydown",r),()=>e.removeEventListener("keydown",r)},[o,e])}var af="dismissableLayer.update",a4="dismissableLayer.pointerDownOutside",l4="dismissableLayer.focusOutside",n2,s4=(0,ht.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),a2=(0,ht.forwardRef)((t,e)=>{var o;let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:s,...c}=t,d=(0,ht.useContext)(s4),[m,p]=(0,ht.useState)(null),f=(o=m?.ownerDocument)!==null&&o!==void 0?o:globalThis?.document,[,b]=(0,ht.useState)({}),x=Ot(e,A=>p(A)),y=Array.from(d.layers),[S]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),C=y.indexOf(S),w=m?y.indexOf(m):-1,M=d.layersWithOutsidePointerEventsDisabled.size>0,B=w>=C,I=c4(A=>{let U=A.target,R=[...d.branches].some(W=>W.contains(U));!B||R||(i?.(A),l?.(A),A.defaultPrevented||s?.())},f),_=d4(A=>{let U=A.target;[...d.branches].some(W=>W.contains(U))||(a?.(A),l?.(A),A.defaultPrevented||s?.())},f);return r2(A=>{w===d.layers.size-1&&(n?.(A),!A.defaultPrevented&&s&&(A.preventDefault(),s()))},f),(0,ht.useEffect)(()=>{if(m)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(n2=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),i2(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=n2)}},[m,f,r,d]),(0,ht.useEffect)(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),i2())},[m,d]),(0,ht.useEffect)(()=>{let A=()=>b({});return document.addEventListener(af,A),()=>document.removeEventListener(af,A)},[]),(0,ht.createElement)(ct.div,we({},c,{ref:x,style:{pointerEvents:M?B?"auto":"none":void 0,...t.style},onFocusCapture:vt(t.onFocusCapture,_.onFocusCapture),onBlurCapture:vt(t.onBlurCapture,_.onBlurCapture),onPointerDownCapture:vt(t.onPointerDownCapture,I.onPointerDownCapture)}))});function c4(t,e=globalThis?.document){let o=to(t),r=(0,ht.useRef)(!1),n=(0,ht.useRef)(()=>{});return(0,ht.useEffect)(()=>{let i=l=>{if(l.target&&!r.current){let c=function(){l2(a4,o,s,{discrete:!0})},s={originalEvent:l};l.pointerType==="touch"?(e.removeEventListener("click",n.current),n.current=c,e.addEventListener("click",n.current,{once:!0})):c()}r.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",i),e.removeEventListener("click",n.current)}},[e,o]),{onPointerDownCapture:()=>r.current=!0}}function d4(t,e=globalThis?.document){let o=to(t),r=(0,ht.useRef)(!1);return(0,ht.useEffect)(()=>{let n=i=>{i.target&&!r.current&&l2(l4,o,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",n),()=>e.removeEventListener("focusin",n)},[e,o]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function i2(){let t=new CustomEvent(af);document.dispatchEvent(t)}function l2(t,e,o,{discrete:r}){let n=o.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:o});e&&n.addEventListener(t,e,{once:!0}),r?t2(n,i):n.dispatchEvent(i)}h();var c2=v(H()),lf=0;function d2(){(0,c2.useEffect)(()=>{var t,e;let o=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=o[0])!==null&&t!==void 0?t:s2()),document.body.insertAdjacentElement("beforeend",(e=o[1])!==null&&e!==void 0?e:s2()),lf++,()=>{lf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),lf--}},[])}function s2(){let t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}h();var lo=v(H());var sf="focusScope.autoFocusOnMount",cf="focusScope.autoFocusOnUnmount",m2={bubbles:!1,cancelable:!0};var h2=(0,lo.forwardRef)((t,e)=>{let{loop:o=!1,trapped:r=!1,onMountAutoFocus:n,onUnmountAutoFocus:i,...a}=t,[l,s]=(0,lo.useState)(null),c=to(n),d=to(i),m=(0,lo.useRef)(null),p=Ot(e,x=>s(x)),f=(0,lo.useRef)({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;(0,lo.useEffect)(()=>{if(r){let x=function(S){if(f.paused||!l)return;let C=S.target;l.contains(C)?m.current=C:ri(m.current,{select:!0})},y=function(S){f.paused||!l||l.contains(S.relatedTarget)||ri(m.current,{select:!0})};return document.addEventListener("focusin",x),document.addEventListener("focusout",y),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",y)}}},[r,l,f.paused]),(0,lo.useEffect)(()=>{if(l){p2.add(f);let x=document.activeElement;if(!l.contains(x)){let S=new CustomEvent(sf,m2);l.addEventListener(sf,c),l.dispatchEvent(S),S.defaultPrevented||(m4(g4(g2(l)),{select:!0}),document.activeElement===x&&ri(l))}return()=>{l.removeEventListener(sf,c),setTimeout(()=>{let S=new CustomEvent(cf,m2);l.addEventListener(cf,d),l.dispatchEvent(S),S.defaultPrevented||ri(x??document.body,{select:!0}),l.removeEventListener(cf,d),p2.remove(f)},0)}}},[l,c,d,f]);let b=(0,lo.useCallback)(x=>{if(!o&&!r||f.paused)return;let y=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,S=document.activeElement;if(y&&S){let C=x.currentTarget,[w,M]=u4(C);w&&M?!x.shiftKey&&S===M?(x.preventDefault(),o&&ri(w,{select:!0})):x.shiftKey&&S===w&&(x.preventDefault(),o&&ri(M,{select:!0})):S===C&&x.preventDefault()}},[o,r,f.paused]);return(0,lo.createElement)(ct.div,we({tabIndex:-1},a,{ref:p,onKeyDown:b}))});function m4(t,{select:e=!1}={}){let o=document.activeElement;for(let r of t)if(ri(r,{select:e}),document.activeElement!==o)return}function u4(t){let e=g2(t),o=u2(e,t),r=u2(e.reverse(),t);return[o,r]}function g2(t){let e=[],o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{let n=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||n?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)e.push(o.currentNode);return e}function u2(t,e){for(let o of t)if(!p4(o,{upTo:e}))return o}function p4(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function f4(t){return t instanceof HTMLInputElement&&"select"in t}function ri(t,{select:e=!1}={}){if(t&&t.focus){let o=document.activeElement;t.focus({preventScroll:!0}),t!==o&&f4(t)&&e&&t.select()}}var p2=h4();function h4(){let t=[];return{add(e){let o=t[0];e!==o&&o?.pause(),t=f2(t,e),t.unshift(e)},remove(e){var o;t=f2(t,e),(o=t[0])===null||o===void 0||o.resume()}}}function f2(t,e){let o=[...t],r=o.indexOf(e);return r!==-1&&o.splice(r,1),o}function g4(t){return t.filter(e=>e.tagName!=="A")}h();var wd=v(H());h();var b2=v(H()),Po=globalThis?.document?b2.useLayoutEffect:()=>{};var b4=wd.useId||(()=>{}),x4=0;function va(t){let[e,o]=wd.useState(b4());return Po(()=>{t||o(r=>r??String(x4++))},[t]),t||(e?`radix-${e}`:"")}h();var Ze=v(H());h();h();h();function ii(t){return t.split("-")[0]}function Zl(t){return t.split("-")[1]}function Ea(t){return["top","bottom"].includes(ii(t))?"x":"y"}function mf(t){return t==="y"?"height":"width"}function x2(t,e,o){let{reference:r,floating:n}=t,i=r.x+r.width/2-n.width/2,a=r.y+r.height/2-n.height/2,l=Ea(e),s=mf(l),c=r[s]/2-n[s]/2,d=l==="x",m;switch(ii(e)){case"top":m={x:i,y:r.y-n.height};break;case"bottom":m={x:i,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-n.width,y:a};break;default:m={x:r.x,y:r.y}}switch(Zl(e)){case"start":m[l]-=c*(o&&d?-1:1);break;case"end":m[l]+=c*(o&&d?-1:1)}return m}var w2=async(t,e,o)=>{let{placement:r="bottom",strategy:n="absolute",middleware:i=[],platform:a}=o,l=await(a.isRTL==null?void 0:a.isRTL(e)),s=await a.getElementRects({reference:t,floating:e,strategy:n}),{x:c,y:d}=x2(s,r,l),m=r,p={},f=0;for(let b=0;b<i.length;b++){let{name:x,fn:y}=i[b],{x:S,y:C,data:w,reset:M}=await y({x:c,y:d,initialPlacement:r,placement:m,strategy:n,middlewareData:p,rects:s,platform:a,elements:{reference:t,floating:e}});c=S??c,d=C??d,p={...p,[x]:{...p[x],...w}},M&&f<=50&&(f++,typeof M=="object"&&(M.placement&&(m=M.placement),M.rects&&(s=M.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:n}):M.rects),{x:c,y:d}=x2(s,m,l)),b=-1)}return{x:c,y:d,placement:m,strategy:n,middlewareData:p}};function C2(t){return typeof t!="number"?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(t):{top:t,right:t,bottom:t,left:t}}function Yl(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function ya(t,e){var o;e===void 0&&(e={});let{x:r,y:n,platform:i,rects:a,elements:l,strategy:s}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:p=!1,padding:f=0}=e,b=C2(f),x=l[p?m==="floating"?"reference":"floating":m],y=Yl(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(x)))==null||o?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:s})),S=Yl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:m==="floating"?{...a.floating,x:r,y:n}:a.reference,offsetParent:await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),strategy:s}):a[m]);return{top:y.top-S.top+b.top,bottom:S.bottom-y.bottom+b.bottom,left:y.left-S.left+b.left,right:S.right-y.right+b.right}}var v4=Math.min,ni=Math.max;function df(t,e,o){return ni(t,v4(e,o))}var Td=t=>({name:"arrow",options:t,async fn(e){let{element:o,padding:r=0}=t??{},{x:n,y:i,placement:a,rects:l,platform:s}=e;if(o==null)return{};let c=C2(r),d={x:n,y:i},m=Ea(a),p=Zl(a),f=mf(m),b=await s.getDimensions(o),x=m==="y"?"top":"left",y=m==="y"?"bottom":"right",S=l.reference[f]+l.reference[m]-d[m]-l.floating[f],C=d[m]-l.reference[m],w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o)),M=w?m==="y"?w.clientHeight||0:w.clientWidth||0:0;M===0&&(M=l.floating[f]);let B=S/2-C/2,I=c[x],_=M-b[f]-c[y],A=M/2-b[f]/2+B,U=df(I,A,_),R=(p==="start"?c[x]:c[y])>0&&A!==U&&l.reference[f]<=l.floating[f];return{[m]:d[m]-(R?A<I?I-A:_-A:0),data:{[m]:U,centerOffset:A-U}}}}),y4={left:"right",right:"left",bottom:"top",top:"bottom"};function Cd(t){return t.replace(/left|right|bottom|top/g,e=>y4[e])}function E4(t,e,o){o===void 0&&(o=!1);let r=Zl(t),n=Ea(t),i=mf(n),a=n==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(a=Cd(a)),{main:a,cross:Cd(a)}}var w4={start:"end",end:"start"};function v2(t){return t.replace(/start|end/g,e=>w4[e])}var T2=["top","right","bottom","left"],f9=T2.reduce((t,e)=>t.concat(e,e+"-start",e+"-end"),[]);var uf=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o;let{placement:r,middlewareData:n,rects:i,initialPlacement:a,platform:l,elements:s}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",flipAlignment:f=!0,...b}=t,x=ii(r),y=m||(x===a||!f?[Cd(a)]:function(A){let U=Cd(A);return[v2(A),U,v2(U)]}(a)),S=[a,...y],C=await ya(e,b),w=[],M=((o=n.flip)==null?void 0:o.overflows)||[];if(c&&w.push(C[x]),d){let{main:A,cross:U}=E4(r,i,await(l.isRTL==null?void 0:l.isRTL(s.floating)));w.push(C[A],C[U])}if(M=[...M,{placement:r,overflows:w}],!w.every(A=>A<=0)){var B,I;let A=((B=(I=n.flip)==null?void 0:I.index)!=null?B:0)+1,U=S[A];if(U)return{data:{index:A,overflows:M},reset:{placement:U}};let R="bottom";switch(p){case"bestFit":{var _;let W=(_=M.map(O=>[O,O.overflows.filter(F=>F>0).reduce((F,ee)=>F+ee,0)]).sort((O,F)=>O[1]-F[1])[0])==null?void 0:_[0].placement;W&&(R=W);break}case"initialPlacement":R=a}if(r!==R)return{reset:{placement:R}}}return{}}}};function y2(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function E2(t){return T2.some(e=>t[e]>=0)}var pf=function(t){let{strategy:e="referenceHidden",...o}=t===void 0?{}:t;return{name:"hide",async fn(r){let{rects:n}=r;switch(e){case"referenceHidden":{let i=y2(await ya(r,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:E2(i)}}}case"escaped":{let i=y2(await ya(r,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:i,escaped:E2(i)}}}default:return{}}}}},ff=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){let{x:o,y:r}=e,n=await async function(i,a){let{placement:l,platform:s,elements:c}=i,d=await(s.isRTL==null?void 0:s.isRTL(c.floating)),m=ii(l),p=Zl(l),f=Ea(l)==="x",b=["left","top"].includes(m)?-1:1,x=d&&f?-1:1,y=typeof a=="function"?a(i):a,{mainAxis:S,crossAxis:C,alignmentAxis:w}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return p&&typeof w=="number"&&(C=p==="end"?-1*w:w),f?{x:C*x,y:S*b}:{x:S*b,y:C*x}}(e,t);return{x:o+n.x,y:r+n.y,data:n}}}};function S2(t){return t==="x"?"y":"x"}var hf=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:o,y:r,placement:n}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x:S,y:C}=y;return{x:S,y:C}}},...s}=t,c={x:o,y:r},d=await ya(e,s),m=Ea(ii(n)),p=S2(m),f=c[m],b=c[p];if(i){let y=m==="y"?"bottom":"right";f=df(f+d[m==="y"?"top":"left"],f,f-d[y])}if(a){let y=p==="y"?"bottom":"right";b=df(b+d[p==="y"?"top":"left"],b,b-d[y])}let x=l.fn({...e,[m]:f,[p]:b});return{...x,data:{x:x.x-o,y:x.y-r}}}}},gf=function(t){return t===void 0&&(t={}),{options:t,fn(e){let{x:o,y:r,placement:n,rects:i,middlewareData:a}=e,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=t,d={x:o,y:r},m=Ea(n),p=S2(m),f=d[m],b=d[p],x=typeof l=="function"?l({...i,placement:n}):l,y=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(s){let B=m==="y"?"height":"width",I=i.reference[m]-i.floating[B]+y.mainAxis,_=i.reference[m]+i.reference[B]-y.mainAxis;f<I?f=I:f>_&&(f=_)}if(c){var S,C,w,M;let B=m==="y"?"width":"height",I=["top","left"].includes(ii(n)),_=i.reference[p]-i.floating[B]+(I&&(S=(C=a.offset)==null?void 0:C[p])!=null?S:0)+(I?0:y.crossAxis),A=i.reference[p]+i.reference[B]+(I?0:(w=(M=a.offset)==null?void 0:M[p])!=null?w:0)-(I?y.crossAxis:0);b<_?b=_:b>A&&(b=A)}return{[m]:f,[p]:b}}}},bf=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){let{placement:o,rects:r,platform:n,elements:i}=e,{apply:a,...l}=t,s=await ya(e,l),c=ii(o),d=Zl(o),m,p;c==="top"||c==="bottom"?(m=c,p=d===(await(n.isRTL==null?void 0:n.isRTL(i.floating))?"start":"end")?"left":"right"):(p=c,m=d==="end"?"top":"bottom");let f=ni(s.left,0),b=ni(s.right,0),x=ni(s.top,0),y=ni(s.bottom,0),S={availableHeight:r.floating.height-(["left","right"].includes(o)?2*(x!==0||y!==0?x+y:ni(s.top,s.bottom)):s[m]),availableWidth:r.floating.width-(["top","bottom"].includes(o)?2*(f!==0||b!==0?f+b:ni(s.left,s.right)):s[p])},C=await n.getDimensions(i.floating);a?.({...e,...S});let w=await n.getDimensions(i.floating);return C.width!==w.width||C.height!==w.height?{reset:{rects:!0}}:{}}}};function L2(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function Yr(t){if(t==null)return window;if(!L2(t)){let e=t.ownerDocument;return e&&e.defaultView||window}return t}function Xl(t){return Yr(t).getComputedStyle(t)}function Vr(t){return L2(t)?"":t?(t.nodeName||"").toLowerCase():""}function P2(){let t=navigator.userAgentData;return t!=null&&t.brands?t.brands.map(e=>e.brand+"/"+e.version).join(" "):navigator.userAgent}function vr(t){return t instanceof Yr(t).HTMLElement}function En(t){return t instanceof Yr(t).Element}function vf(t){return typeof ShadowRoot>"u"?!1:t instanceof Yr(t).ShadowRoot||t instanceof ShadowRoot}function Id(t){let{overflow:e,overflowX:o,overflowY:r}=Xl(t);return/auto|scroll|overlay|hidden/.test(e+r+o)}function C4(t){return["table","td","th"].includes(Vr(t))}function k2(t){let e=/firefox/i.test(P2()),o=Xl(t);return o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].includes(o.willChange)||e&&o.willChange==="filter"||e&&!!o.filter&&o.filter!=="none"}function R2(){return!/^((?!chrome|android).)*safari/i.test(P2())}var I2=Math.min,jl=Math.max,Sd=Math.round;function Kr(t,e,o){var r,n,i,a;e===void 0&&(e=!1),o===void 0&&(o=!1);let l=t.getBoundingClientRect(),s=1,c=1;e&&vr(t)&&(s=t.offsetWidth>0&&Sd(l.width)/t.offsetWidth||1,c=t.offsetHeight>0&&Sd(l.height)/t.offsetHeight||1);let d=En(t)?Yr(t):window,m=!R2()&&o,p=(l.left+(m&&(r=(n=d.visualViewport)==null?void 0:n.offsetLeft)!=null?r:0))/s,f=(l.top+(m&&(i=(a=d.visualViewport)==null?void 0:a.offsetTop)!=null?i:0))/c,b=l.width/s,x=l.height/c;return{width:b,height:x,top:f,right:p+b,bottom:f+x,left:p,x:p,y:f}}function yn(t){return(e=t,(e instanceof Yr(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}function Md(t){return En(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function D2(t){return Kr(yn(t)).left+Md(t).scrollLeft}function T4(t,e,o){let r=vr(e),n=yn(e),i=Kr(t,r&&function(s){let c=Kr(s);return Sd(c.width)!==s.offsetWidth||Sd(c.height)!==s.offsetHeight}(e),o==="fixed"),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};if(r||!r&&o!=="fixed")if((Vr(e)!=="body"||Id(n))&&(a=Md(e)),vr(e)){let s=Kr(e,!0);l.x=s.x+e.clientLeft,l.y=s.y+e.clientTop}else n&&(l.x=D2(n));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function N2(t){return Vr(t)==="html"?t:t.assignedSlot||t.parentNode||(vf(t)?t.host:null)||yn(t)}function M2(t){return vr(t)&&getComputedStyle(t).position!=="fixed"?t.offsetParent:null}function xf(t){let e=Yr(t),o=M2(t);for(;o&&C4(o)&&getComputedStyle(o).position==="static";)o=M2(o);return o&&(Vr(o)==="html"||Vr(o)==="body"&&getComputedStyle(o).position==="static"&&!k2(o))?e:o||function(r){let n=N2(r);for(vf(n)&&(n=n.host);vr(n)&&!["html","body"].includes(Vr(n));){if(k2(n))return n;n=n.parentNode}return null}(t)||e}function _2(t){if(vr(t))return{width:t.offsetWidth,height:t.offsetHeight};let e=Kr(t);return{width:e.width,height:e.height}}function O2(t){let e=N2(t);return["html","body","#document"].includes(Vr(e))?t.ownerDocument.body:vr(e)&&Id(e)?e:O2(e)}function kd(t,e){var o;e===void 0&&(e=[]);let r=O2(t),n=r===((o=t.ownerDocument)==null?void 0:o.body),i=Yr(r),a=n?[i].concat(i.visualViewport||[],Id(r)?r:[]):r,l=e.concat(a);return n?l:l.concat(kd(a))}function A2(t,e,o){return e==="viewport"?Yl(function(r,n){let i=Yr(r),a=yn(r),l=i.visualViewport,s=a.clientWidth,c=a.clientHeight,d=0,m=0;if(l){s=l.width,c=l.height;let p=R2();(p||!p&&n==="fixed")&&(d=l.offsetLeft,m=l.offsetTop)}return{width:s,height:c,x:d,y:m}}(t,o)):En(e)?function(r,n){let i=Kr(r,!1,n==="fixed"),a=i.top+r.clientTop,l=i.left+r.clientLeft;return{top:a,left:l,x:l,y:a,right:l+r.clientWidth,bottom:a+r.clientHeight,width:r.clientWidth,height:r.clientHeight}}(e,o):Yl(function(r){var n;let i=yn(r),a=Md(r),l=(n=r.ownerDocument)==null?void 0:n.body,s=jl(i.scrollWidth,i.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),c=jl(i.scrollHeight,i.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),d=-a.scrollLeft+D2(r),m=-a.scrollTop;return Xl(l||i).direction==="rtl"&&(d+=jl(i.clientWidth,l?l.clientWidth:0)-s),{width:s,height:c,x:d,y:m}}(yn(t)))}function S4(t){let e=kd(t),o=["absolute","fixed"].includes(Xl(t).position)&&vr(t)?xf(t):t;return En(o)?e.filter(r=>En(r)&&function(n,i){let a=i.getRootNode==null?void 0:i.getRootNode();if(n.contains(i))return!0;if(a&&vf(a)){let l=i;do{if(l&&n===l)return!0;l=l.parentNode||l.host}while(l)}return!1}(r,o)&&Vr(r)!=="body"):[]}var k4={getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:r,strategy:n}=t,i=[...o==="clippingAncestors"?S4(e):[].concat(o),r],a=i[0],l=i.reduce((s,c)=>{let d=A2(e,c,n);return s.top=jl(d.top,s.top),s.right=I2(d.right,s.right),s.bottom=I2(d.bottom,s.bottom),s.left=jl(d.left,s.left),s},A2(e,a,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:o,strategy:r}=t,n=vr(o),i=yn(o);if(o===i)return e;let a={scrollLeft:0,scrollTop:0},l={x:0,y:0};if((n||!n&&r!=="fixed")&&((Vr(o)!=="body"||Id(i))&&(a=Md(o)),vr(o))){let s=Kr(o,!0);l.x=s.x+o.clientLeft,l.y=s.y+o.clientTop}return{...e,x:e.x-a.scrollLeft+l.x,y:e.y-a.scrollTop+l.y}},isElement:En,getDimensions:_2,getOffsetParent:xf,getDocumentElement:yn,getElementRects:t=>{let{reference:e,floating:o,strategy:r}=t;return{reference:T4(e,xf(o),r),floating:{..._2(o),x:0,y:0}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>Xl(t).direction==="rtl"};function F2(t,e,o,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:l=!1}=r,s=n&&!l,c=i&&!l,d=s||c?[...En(t)?kd(t):[],...kd(e)]:[];d.forEach(b=>{s&&b.addEventListener("scroll",o,{passive:!0}),c&&b.addEventListener("resize",o)});let m,p=null;if(a){let b=!0;p=new ResizeObserver(()=>{b||o(),b=!1}),En(t)&&!l&&p.observe(t),p.observe(e)}let f=l?Kr(t):null;return l&&function b(){let x=Kr(t);!f||x.x===f.x&&x.y===f.y&&x.width===f.width&&x.height===f.height||o(),f=x,m=requestAnimationFrame(b)}(),o(),()=>{var b;d.forEach(x=>{s&&x.removeEventListener("scroll",o),c&&x.removeEventListener("resize",o)}),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(m)}}var B2=(t,e,o)=>w2(t,e,{platform:k4,...o});var Ft=v(H()),_d=v(H()),z2=v(hr()),yf=typeof document<"u"?_d.useLayoutEffect:_d.useEffect;function Ef(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let o,r,n;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(r=o;r--!==0;)if(!Ef(t[r],e[r]))return!1;return!0}if(n=Object.keys(t),o=n.length,o!==Object.keys(e).length)return!1;for(r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,n[r]))return!1;for(r=o;r--!==0;){let i=n[r];if(!(i==="_owner"&&t.$$typeof)&&!Ef(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function I4(t){let e=Ft.useRef(t);return yf(()=>{e.current=t}),e}function H2(t){let{middleware:e,placement:o="bottom",strategy:r="absolute",whileElementsMounted:n}=t===void 0?{}:t,i=Ft.useRef(null),a=Ft.useRef(null),l=I4(n),s=Ft.useRef(null),[c,d]=Ft.useState({x:null,y:null,strategy:r,placement:o,middlewareData:{}}),[m,p]=Ft.useState(e);Ef(m?.map(w=>{let{options:M}=w;return M}),e?.map(w=>{let{options:M}=w;return M}))||p(e);let f=Ft.useCallback(()=>{!i.current||!a.current||B2(i.current,a.current,{middleware:m,placement:o,strategy:r}).then(w=>{b.current&&z2.flushSync(()=>{d(w)})})},[m,o,r]);yf(()=>{b.current&&f()},[f]);let b=Ft.useRef(!1);yf(()=>(b.current=!0,()=>{b.current=!1}),[]);let x=Ft.useCallback(()=>{if(typeof s.current=="function"&&(s.current(),s.current=null),i.current&&a.current)if(l.current){let w=l.current(i.current,a.current,f);s.current=w}else f()},[f,l]),y=Ft.useCallback(w=>{i.current=w,x()},[x]),S=Ft.useCallback(w=>{a.current=w,x()},[x]),C=Ft.useMemo(()=>({reference:i,floating:a}),[]);return Ft.useMemo(()=>({...c,update:f,refs:C,reference:y,floating:S}),[c,f,C,y,S])}var $2=t=>{let{element:e,padding:o}=t;function r(n){return Object.prototype.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){return r(e)?e.current!=null?Td({element:e.current,padding:o}).fn(n):{}:e?Td({element:e,padding:o}).fn(n):{}}}};h();var ql=v(H());var M4=(0,ql.forwardRef)((t,e)=>{let{children:o,width:r=10,height:n=5,...i}=t;return(0,ql.createElement)(ct.svg,we({},i,{ref:e,width:r,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),t.asChild?o:(0,ql.createElement)("polygon",{points:"0,0 30,0 15,10"}))}),U2=M4;h();var W2=v(H());function G2(t){let[e,o]=(0,W2.useState)(void 0);return Po(()=>{if(t){o({width:t.offsetWidth,height:t.offsetHeight});let r=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;let i=n[0],a,l;if("borderBoxSize"in i){let s=i.borderBoxSize,c=Array.isArray(s)?s[0]:s;a=c.inlineSize,l=c.blockSize}else a=t.offsetWidth,l=t.offsetHeight;o({width:a,height:l})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else o(void 0)},[t]),e}var V2="Popper",[wf,Cf]=xr(V2),[_4,K2]=wf(V2),A4=t=>{let{__scopePopper:e,children:o}=t,[r,n]=(0,Ze.useState)(null);return(0,Ze.createElement)(_4,{scope:e,anchor:r,onAnchorChange:n},o)},L4="PopperAnchor",P4=(0,Ze.forwardRef)((t,e)=>{let{__scopePopper:o,virtualRef:r,...n}=t,i=K2(L4,o),a=(0,Ze.useRef)(null),l=Ot(e,a);return(0,Ze.useEffect)(()=>{i.onAnchorChange(r?.current||a.current)}),r?null:(0,Ze.createElement)(ct.div,we({},n,{ref:l}))}),Ad="PopperContent",[R4,D4]=wf(Ad),[N4,O4]=wf(Ad,{hasParent:!1,positionUpdateFns:new Set}),F4=(0,Ze.forwardRef)((t,e)=>{var o,r,n,i,a,l,s,c;let{__scopePopper:d,side:m="bottom",sideOffset:p=0,align:f="center",alignOffset:b=0,arrowPadding:x=0,collisionBoundary:y=[],collisionPadding:S=0,sticky:C="partial",hideWhenDetached:w=!1,avoidCollisions:M=!0,onPlaced:B,...I}=t,_=K2(Ad,d),[A,U]=(0,Ze.useState)(null),R=Ot(e,Pi=>U(Pi)),[W,O]=(0,Ze.useState)(null),F=G2(W),ee=(o=F?.width)!==null&&o!==void 0?o:0,te=(r=F?.height)!==null&&r!==void 0?r:0,be=m+(f!=="center"?"-"+f:""),ke=typeof S=="number"?S:{top:0,right:0,bottom:0,left:0,...S},de=Array.isArray(y)?y:[y],Z=de.length>0,P={padding:ke,boundary:de.filter(U4),altBoundary:Z},{reference:D,floating:V,strategy:K,x:Y,y:j,placement:J,middlewareData:re,update:ot}=H2({strategy:"fixed",placement:be,whileElementsMounted:F2,middleware:[W4(),ff({mainAxis:p+te,alignmentAxis:b}),M?hf({mainAxis:!0,crossAxis:!1,limiter:C==="partial"?gf():void 0,...P}):void 0,W?$2({element:W,padding:x}):void 0,M?uf({...P}):void 0,bf({...P,apply:({elements:Pi,availableWidth:h6,availableHeight:g6})=>{Pi.floating.style.setProperty("--radix-popper-available-width",`${h6}px`),Pi.floating.style.setProperty("--radix-popper-available-height",`${g6}px`)}}),G4({arrowWidth:ee,arrowHeight:te}),w?pf({strategy:"referenceHidden"}):void 0].filter($4)});Po(()=>{D(_.anchor)},[D,_.anchor]);let rt=Y!==null&&j!==null,[lt,$e]=Y2(J),qt=to(B);Po(()=>{rt&&qt?.()},[rt,qt]);let Ws=(n=re.arrow)===null||n===void 0?void 0:n.x,d6=(i=re.arrow)===null||i===void 0?void 0:i.y,m6=((a=re.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[u6,p6]=(0,Ze.useState)();Po(()=>{A&&p6(window.getComputedStyle(A).zIndex)},[A]);let{hasParent:f6,positionUpdateFns:Li}=O4(Ad,d),rl=!f6;(0,Ze.useLayoutEffect)(()=>{if(!rl)return Li.add(ot),()=>{Li.delete(ot)}},[rl,Li,ot]),Po(()=>{rl&&rt&&Array.from(Li).reverse().forEach(Pi=>requestAnimationFrame(Pi))},[rl,rt,Li]);let Gg={"data-side":lt,"data-align":$e,...I,ref:R,style:{...I.style,animation:rt?void 0:"none",opacity:(l=re.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}};return(0,Ze.createElement)("div",{ref:V,"data-radix-popper-content-wrapper":"",style:{position:K,left:0,top:0,transform:rt?`translate3d(${Math.round(Y)}px, ${Math.round(j)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:u6,"--radix-popper-transform-origin":[(s=re.transformOrigin)===null||s===void 0?void 0:s.x,(c=re.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:t.dir},(0,Ze.createElement)(R4,{scope:d,placedSide:lt,onArrowChange:O,arrowX:Ws,arrowY:d6,shouldHideArrow:m6},rl?(0,Ze.createElement)(N4,{scope:d,hasParent:!0,positionUpdateFns:Li},(0,Ze.createElement)(ct.div,Gg)):(0,Ze.createElement)(ct.div,Gg)))}),B4="PopperArrow",z4={top:"bottom",right:"left",bottom:"top",left:"right"},H4=(0,Ze.forwardRef)(function(e,o){let{__scopePopper:r,...n}=e,i=D4(B4,r),a=z4[i.placedSide];return(0,Ze.createElement)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},(0,Ze.createElement)(U2,we({},n,{ref:o,style:{...n.style,display:"block"}})))});function $4(t){return t!==void 0}function U4(t){return t!==null}var W4=()=>({name:"anchorCssProperties",fn(t){let{rects:e,elements:o}=t,{width:r,height:n}=e.reference;return o.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),o.floating.style.setProperty("--radix-popper-anchor-height",`${n}px`),{}}}),G4=t=>({name:"transformOrigin",options:t,fn(e){var o,r,n,i,a;let{placement:l,rects:s,middlewareData:c}=e,m=((o=c.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,p=m?0:t.arrowWidth,f=m?0:t.arrowHeight,[b,x]=Y2(l),y={start:"0%",center:"50%",end:"100%"}[x],S=((r=(n=c.arrow)===null||n===void 0?void 0:n.x)!==null&&r!==void 0?r:0)+p/2,C=((i=(a=c.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+f/2,w="",M="";return b==="bottom"?(w=m?y:`${S}px`,M=`${-f}px`):b==="top"?(w=m?y:`${S}px`,M=`${s.floating.height+f}px`):b==="right"?(w=`${-f}px`,M=m?y:`${C}px`):b==="left"&&(w=`${s.floating.width+f}px`,M=m?y:`${C}px`),{data:{x:w,y:M}}}});function Y2(t){let[e,o="center"]=t.split("-");return[e,o]}var Z2=A4,j2=P4,X2=F4,q2=H4;h();var Ld=v(H()),J2=v(hr());var Q2=(0,Ld.forwardRef)((t,e)=>{var o;let{container:r=globalThis==null||(o=globalThis.document)===null||o===void 0?void 0:o.body,...n}=t;return r?J2.default.createPortal((0,Ld.createElement)(ct.div,we({},n,{ref:e})),r):null});h();var Gt=v(H()),ey=v(hr());function V4(t,e){return(0,Gt.useReducer)((o,r)=>{let n=e[o][r];return n??o},t)}var wa=t=>{let{present:e,children:o}=t,r=K4(e),n=typeof o=="function"?o({present:r.isPresent}):Gt.Children.only(o),i=Ot(r.ref,n.ref);return typeof o=="function"||r.isPresent?(0,Gt.cloneElement)(n,{ref:i}):null};wa.displayName="Presence";function K4(t){let[e,o]=(0,Gt.useState)(),r=(0,Gt.useRef)({}),n=(0,Gt.useRef)(t),i=(0,Gt.useRef)("none"),a=t?"mounted":"unmounted",[l,s]=V4(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return(0,Gt.useEffect)(()=>{let c=Pd(r.current);i.current=l==="mounted"?c:"none"},[l]),Po(()=>{let c=r.current,d=n.current;if(d!==t){let p=i.current,f=Pd(c);t?s("MOUNT"):f==="none"||c?.display==="none"?s("UNMOUNT"):s(d&&p!==f?"ANIMATION_OUT":"UNMOUNT"),n.current=t}},[t,s]),Po(()=>{if(e){let c=m=>{let f=Pd(r.current).includes(m.animationName);m.target===e&&f&&(0,ey.flushSync)(()=>s("ANIMATION_END"))},d=m=>{m.target===e&&(i.current=Pd(r.current))};return e.addEventListener("animationstart",d),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",d),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else s("ANIMATION_END")},[e,s]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:(0,Gt.useCallback)(c=>{c&&(r.current=getComputedStyle(c)),o(c)},[])}}function Pd(t){return t?.animationName||"none"}h();var wn=v(H());function Ca({prop:t,defaultProp:e,onChange:o=()=>{}}){let[r,n]=Y4({defaultProp:e,onChange:o}),i=t!==void 0,a=i?t:r,l=to(o),s=(0,wn.useCallback)(c=>{if(i){let m=typeof c=="function"?c(t):c;m!==t&&l(m)}else n(c)},[i,t,n,l]);return[a,s]}function Y4({defaultProp:t,onChange:e}){let o=(0,wn.useState)(t),[r]=o,n=(0,wn.useRef)(r),i=to(e);return(0,wn.useEffect)(()=>{n.current!==r&&(i(r),n.current=r)},[r,n,i]),o}h();var Z4=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Ta=new WeakMap,Rd=new WeakMap,Dd={},Tf=0,ty=function(t){return t&&(t.host||ty(t.parentNode))},j4=function(t,e){return e.map(function(o){if(t.contains(o))return o;var r=ty(o);return r&&t.contains(r)?r:(console.error("aria-hidden",o,"in not contained inside",t,". Doing nothing"),null)}).filter(function(o){return!!o})},X4=function(t,e,o,r){var n=j4(e,Array.isArray(t)?t:[t]);Dd[o]||(Dd[o]=new WeakMap);var i=Dd[o],a=[],l=new Set,s=new Set(n),c=function(m){!m||l.has(m)||(l.add(m),c(m.parentNode))};n.forEach(c);var d=function(m){!m||s.has(m)||Array.prototype.forEach.call(m.children,function(p){if(l.has(p))d(p);else{var f=p.getAttribute(r),b=f!==null&&f!=="false",x=(Ta.get(p)||0)+1,y=(i.get(p)||0)+1;Ta.set(p,x),i.set(p,y),a.push(p),x===1&&b&&Rd.set(p,!0),y===1&&p.setAttribute(o,"true"),b||p.setAttribute(r,"true")}})};return d(e),l.clear(),Tf++,function(){a.forEach(function(m){var p=Ta.get(m)-1,f=i.get(m)-1;Ta.set(m,p),i.set(m,f),p||(Rd.has(m)||m.removeAttribute(r),Rd.delete(m)),f||m.removeAttribute(o)}),Tf--,Tf||(Ta=new WeakMap,Ta=new WeakMap,Rd=new WeakMap,Dd={})}},oy=function(t,e,o){o===void 0&&(o="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),n=e||Z4(t);return n?(r.push.apply(r,Array.from(n.querySelectorAll("[aria-live]"))),X4(r,n,o,"aria-hidden")):function(){return null}};h();h();h();var yr=function(){return yr=Object.assign||function(e){for(var o,r=1,n=arguments.length;r<n;r++){o=arguments[r];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},yr.apply(this,arguments)};function ry(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(o[r[n]]=t[r[n]]);return o}function ny(t,e,o){if(o||arguments.length===2)for(var r=0,n=e.length,i;r<n;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}var Bd=v(H());h();var Vt=v(H());h();var ai="right-scroll-bar-position",li="width-before-scroll-bar",Sf="with-scroll-bars-hidden",kf="--removed-body-scroll-bar-size";h();h();function iy(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}h();var ay=v(H());function ly(t,e){var o=(0,ay.useState)(function(){return{value:t,callback:e,facade:{get current(){return o.value},set current(r){var n=o.value;n!==r&&(o.value=r,o.callback(r,n))}}}})[0];return o.callback=e,o.facade}h();function If(t,e){return ly(e||null,function(o){return t.forEach(function(r){return iy(r,o)})})}h();h();h();var Sa=function(){return Sa=Object.assign||function(e){for(var o,r=1,n=arguments.length;r<n;r++){o=arguments[r];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},Sa.apply(this,arguments)};function sy(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(o[r[n]]=t[r[n]]);return o}h();function q4(t){return t}function J4(t,e){e===void 0&&(e=q4);var o=[],r=!1,n={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:t},useMedium:function(i){var a=e(i,r);return o.push(a),function(){o=o.filter(function(l){return l!==a})}},assignSyncMedium:function(i){for(r=!0;o.length;){var a=o;o=[],a.forEach(i)}o={push:function(l){return i(l)},filter:function(){return o}}},assignMedium:function(i){r=!0;var a=[];if(o.length){var l=o;o=[],l.forEach(i),a=o}var s=function(){var d=a;a=[],d.forEach(i)},c=function(){return Promise.resolve().then(s)};c(),o={push:function(d){a.push(d),c()},filter:function(d){return a=a.filter(d),o}}}};return n}function Mf(t){t===void 0&&(t={});var e=J4(null);return e.options=Sa({async:!0,ssr:!1},t),e}h();var cy=v(H()),dy=function(t){var e=t.sideCar,o=sy(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return cy.createElement(r,Sa({},o))};dy.isSideCarExport=!0;function _f(t,e){return t.useMedium(e),dy}var Nd=Mf();var Af=function(){},Jl=Vt.forwardRef(function(t,e){var o=Vt.useRef(null),r=Vt.useState({onScrollCapture:Af,onWheelCapture:Af,onTouchMoveCapture:Af}),n=r[0],i=r[1],a=t.forwardProps,l=t.children,s=t.className,c=t.removeScrollBar,d=t.enabled,m=t.shards,p=t.sideCar,f=t.noIsolation,b=t.inert,x=t.allowPinchZoom,y=t.as,S=y===void 0?"div":y,C=ry(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=p,M=If([o,e]),B=yr(yr({},C),n);return Vt.createElement(Vt.Fragment,null,d&&Vt.createElement(w,{sideCar:Nd,removeScrollBar:c,shards:m,noIsolation:f,inert:b,setCallbacks:i,allowPinchZoom:!!x,lockRef:o}),a?Vt.cloneElement(Vt.Children.only(l),yr(yr({},B),{ref:M})):Vt.createElement(S,yr({},B,{className:s,ref:M}),l))});Jl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Jl.classNames={fullWidth:li,zeroRight:ai};h();h();var je=v(H());h();h();var Od=v(H());h();h();h();var py=v(H());h();h();var my;var uy=function(){if(my)return my;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Q4(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=uy();return e&&t.setAttribute("nonce",e),t}function eC(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function tC(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var Lf=function(){var t=0,e=null;return{add:function(o){t==0&&(e=Q4())&&(eC(e,o),tC(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}};var Pf=function(){var t=Lf();return function(e,o){py.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&o])}};var Ql=function(){var t=Pf(),e=function(o){var r=o.styles,n=o.dynamic;return t(r,n),null};return e};h();var oC={left:0,top:0,right:0,gap:0},Rf=function(t){return parseInt(t||"",10)||0},rC=function(t){var e=window.getComputedStyle(document.body),o=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],n=e[t==="padding"?"paddingRight":"marginRight"];return[Rf(o),Rf(r),Rf(n)]},Df=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return oC;var e=rC(t),o=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-o+e[2]-e[0])}};var nC=Ql(),iC=function(t,e,o,r){var n=t.left,i=t.top,a=t.right,l=t.gap;return o===void 0&&(o="margin"),`
|
|
2
2
|
.`.concat(Sf,` {
|
|
3
3
|
overflow: hidden `).concat(r,`;
|
|
4
4
|
padding-right: `).concat(l,"px ").concat(r,`;
|
|
@@ -38,7 +38,7 @@ import{$ as f1,$a as ac,$b as Z1,$c as cb,$d as qn,$e as Pl,$f as y0,A as nn,Aa
|
|
|
38
38
|
`)},Nf=function(t){var e=t.noRelative,o=t.noImportant,r=t.gapMode,n=r===void 0?"margin":r,i=Od.useMemo(function(){return Df(n)},[n]);return Od.createElement(nC,{styles:iC(i,!e,n,o?"":"!important")})};h();var Of=!1;if(typeof window<"u")try{es=Object.defineProperty({},"passive",{get:function(){return Of=!0,!0}}),window.addEventListener("test",es,es),window.removeEventListener("test",es,es)}catch{Of=!1}var es,si=Of?{passive:!1}:!1;h();var aC=function(t){return t.tagName==="TEXTAREA"},fy=function(t,e){var o=window.getComputedStyle(t);return o[e]!=="hidden"&&!(o.overflowY===o.overflowX&&!aC(t)&&o[e]==="visible")},lC=function(t){return fy(t,"overflowY")},sC=function(t){return fy(t,"overflowX")},Ff=function(t,e){var o=e;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=hy(t,o);if(r){var n=gy(t,o),i=n[1],a=n[2];if(i>a)return!0}o=o.parentNode}while(o&&o!==document.body);return!1},cC=function(t){var e=t.scrollTop,o=t.scrollHeight,r=t.clientHeight;return[e,o,r]},dC=function(t){var e=t.scrollLeft,o=t.scrollWidth,r=t.clientWidth;return[e,o,r]},hy=function(t,e){return t==="v"?lC(e):sC(e)},gy=function(t,e){return t==="v"?cC(e):dC(e)},mC=function(t,e){return t==="h"&&e==="rtl"?-1:1},by=function(t,e,o,r,n){var i=mC(t,window.getComputedStyle(e).direction),a=i*r,l=o.target,s=e.contains(l),c=!1,d=a>0,m=0,p=0;do{var f=gy(t,l),b=f[0],x=f[1],y=f[2],S=x-y-i*b;(b||S)&&hy(t,l)&&(m+=S,p+=b),l=l.parentNode}while(!s&&l!==document.body||s&&(e.contains(l)||e===l));return(d&&(n&&m===0||!n&&a>m)||!d&&(n&&p===0||!n&&-a>p))&&(c=!0),c};var Fd=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},xy=function(t){return[t.deltaX,t.deltaY]},vy=function(t){return t&&"current"in t?t.current:t},uC=function(t,e){return t[0]===e[0]&&t[1]===e[1]},pC=function(t){return`
|
|
39
39
|
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
41
|
-
`)},fC=0,ka=[];function yy(t){var e=je.useRef([]),o=je.useRef([0,0]),r=je.useRef(),n=je.useState(fC++)[0],i=je.useState(function(){return Ql()})[0],a=je.useRef(t);je.useEffect(function(){a.current=t},[t]),je.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(n));var x=ny([t.lockRef.current],(t.shards||[]).map(vy),!0).filter(Boolean);return x.forEach(function(y){return y.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),x.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(n))})}}},[t.inert,t.lockRef.current,t.shards]);var l=je.useCallback(function(x,y){if("touches"in x&&x.touches.length===2)return!a.current.allowPinchZoom;var S=Fd(x),C=o.current,w="deltaX"in x?x.deltaX:C[0]-S[0],M="deltaY"in x?x.deltaY:C[1]-S[1],B,I=x.target,_=Math.abs(w)>Math.abs(M)?"h":"v";if("touches"in x&&_==="h"&&I.type==="range")return!1;var A=Ff(_,I);if(!A)return!0;if(A?B=_:(B=_==="v"?"h":"v",A=Ff(_,I)),!A)return!1;if(!r.current&&"changedTouches"in x&&(w||M)&&(r.current=B),!B)return!0;var U=r.current||B;return by(U,y,x,U==="h"?w:M,!0)},[]),s=je.useCallback(function(x){var y=x;if(!(!ka.length||ka[ka.length-1]!==i)){var S="deltaY"in y?xy(y):Fd(y),C=e.current.filter(function(B){return B.name===y.type&&B.target===y.target&&uC(B.delta,S)})[0];if(C&&C.should){y.cancelable&&y.preventDefault();return}if(!C){var w=(a.current.shards||[]).map(vy).filter(Boolean).filter(function(B){return B.contains(y.target)}),M=w.length>0?l(y,w[0]):!a.current.noIsolation;M&&y.cancelable&&y.preventDefault()}}},[]),c=je.useCallback(function(x,y,S,C){var w={name:x,delta:y,target:S,should:C};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(M){return M!==w})},1)},[]),d=je.useCallback(function(x){o.current=Fd(x),r.current=void 0},[]),m=je.useCallback(function(x){c(x.type,xy(x),x.target,l(x,t.lockRef.current))},[]),p=je.useCallback(function(x){c(x.type,Fd(x),x.target,l(x,t.lockRef.current))},[]);je.useEffect(function(){return ka.push(i),t.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:p}),document.addEventListener("wheel",s,si),document.addEventListener("touchmove",s,si),document.addEventListener("touchstart",d,si),function(){ka=ka.filter(function(x){return x!==i}),document.removeEventListener("wheel",s,si),document.removeEventListener("touchmove",s,si),document.removeEventListener("touchstart",d,si)}},[]);var f=t.removeScrollBar,b=t.inert;return je.createElement(je.Fragment,null,b?je.createElement(i,{styles:pC(n)}):null,f?je.createElement(Nf,{gapMode:"margin"}):null)}var Ey=_f(Nd,yy);var wy=Bd.forwardRef(function(t,e){return Bd.createElement(Jl,yr({},t,{ref:e,sideCar:Ey}))});wy.classNames=Jl.classNames;var Bf=wy;var Cy="Popover",[Ty,tP]=xr(Cy,[Cf]),zd=Cf(),[hC,Ia]=Ty(Cy),gC=t=>{let{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:i,modal:a=!1}=t,l=zd(e),s=(0,Te.useRef)(null),[c,d]=(0,Te.useState)(!1),[m=!1,p]=Ca({prop:r,defaultProp:n,onChange:i});return(0,Te.createElement)(Z2,l,(0,Te.createElement)(hC,{scope:e,contentId:va(),triggerRef:s,open:m,onOpenChange:p,onOpenToggle:(0,Te.useCallback)(()=>p(f=>!f),[p]),hasCustomAnchor:c,onCustomAnchorAdd:(0,Te.useCallback)(()=>d(!0),[]),onCustomAnchorRemove:(0,Te.useCallback)(()=>d(!1),[]),modal:a},o))};var bC="PopoverTrigger",xC=(0,Te.forwardRef)((t,e)=>{let{__scopePopover:o,...r}=t,n=Ia(bC,o),i=zd(o),a=Ot(e,n.triggerRef),l=(0,Te.createElement)(ct.button,we({type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":Iy(n.open)},r,{ref:a,onClick:vt(t.onClick,n.onOpenToggle)}));return n.hasCustomAnchor?l:(0,Te.createElement)(j2,we({asChild:!0},i),l)}),Sy="PopoverPortal",[vC,yC]=Ty(Sy,{forceMount:void 0}),EC=t=>{let{__scopePopover:e,forceMount:o,children:r,container:n}=t,i=Ia(Sy,e);return(0,Te.createElement)(vC,{scope:e,forceMount:o},(0,Te.createElement)(wa,{present:o||i.open},(0,Te.createElement)(Q2,{asChild:!0,container:n},r)))},ts="PopoverContent",wC=(0,Te.forwardRef)((t,e)=>{let o=yC(ts,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,i=Ia(ts,t.__scopePopover);return(0,Te.createElement)(wa,{present:r||i.open},i.modal?(0,Te.createElement)(CC,we({},n,{ref:e})):(0,Te.createElement)(TC,we({},n,{ref:e})))}),CC=(0,Te.forwardRef)((t,e)=>{let o=Ia(ts,t.__scopePopover),r=(0,Te.useRef)(null),n=Ot(e,r),i=(0,Te.useRef)(!1);return(0,Te.useEffect)(()=>{let a=r.current;if(a)return oy(a)},[]),(0,Te.createElement)(Bf,{as:vn,allowPinchZoom:!0},(0,Te.createElement)(ky,we({},t,{ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:vt(t.onCloseAutoFocus,a=>{var l;a.preventDefault(),i.current||(l=o.triggerRef.current)===null||l===void 0||l.focus()}),onPointerDownOutside:vt(t.onPointerDownOutside,a=>{let l=a.detail.originalEvent,s=l.button===0&&l.ctrlKey===!0,c=l.button===2||s;i.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:vt(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})))}),TC=(0,Te.forwardRef)((t,e)=>{let o=Ia(ts,t.__scopePopover),r=(0,Te.useRef)(!1);return(0,Te.createElement)(ky,we({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{var i;if((i=t.onCloseAutoFocus)===null||i===void 0||i.call(t,n),!n.defaultPrevented){var a;r.current||(a=o.triggerRef.current)===null||a===void 0||a.focus(),n.preventDefault()}r.current=!1},onInteractOutside:n=>{var i,a;(i=t.onInteractOutside)===null||i===void 0||i.call(t,n),n.defaultPrevented||(r.current=!0);let l=n.target;((a=o.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&n.preventDefault()}}))}),ky=(0,Te.forwardRef)((t,e)=>{let{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:d,...m}=t,p=Ia(ts,o),f=zd(o);return d2(),(0,Te.createElement)(h2,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:i},(0,Te.createElement)(a2,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1)},(0,Te.createElement)(X2,we({"data-state":Iy(p.open),role:"dialog",id:p.contentId},f,m,{ref:e,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)"}}))))});var SC=(0,Te.forwardRef)((t,e)=>{let{__scopePopover:o,...r}=t,n=zd(o);return(0,Te.createElement)(q2,we({},n,r,{ref:e}))});function Iy(t){return t?"open":"closed"}var Hd=gC;var $d=xC,My=EC,Ud=wC;var _y=SC;h();var er=v(H(),1);h();var Gd=v(H(),1),Ry=v(hr(),1);h();var zf=v(H(),1),Hf=zf.default.createContext(null),_e=()=>zf.default.useContext(Hf);h();var os=v(H(),1);var Wd=t=>{let[e,o]=(0,os.useState)(null),r=Me(),{theme:n}=_e(),{container:i}=Mt();return(0,os.useLayoutEffect)(()=>{e&&(e.className="",e.classList.add("excalidraw",...t?.className?.split(/\s+/)||[]),e.classList.toggle("excalidraw--mobile",r.editor.isMobile),e.classList.toggle("theme--dark",n===he.DARK))},[e,n,r.editor.isMobile,t?.className]),(0,os.useLayoutEffect)(()=>{let a=t?.parentSelector?i?.querySelector(t.parentSelector):document.body;if(!a)return;let l=document.createElement("div");return a.appendChild(l),o(l),()=>{a.removeChild(l)}},[i,t?.parentSelector]),e};h();var Ly=v(H(),1);function Ma(t,e,o){(0,Ly.useEffect)(()=>{function r(n){let i=n;if(!t.current)return;let a=o?.(i,t.current);if(a===!0)return;if(a===!1)return e(i);t.current.contains(i.target)||!document.documentElement.contains(i.target)||i.target.closest("[data-radix-portal]")||i.target===document.documentElement&&document.body.style.pointerEvents==="none"||i.target.closest("[data-prevent-outside-click]")||e(i)}return document.addEventListener("pointerdown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("pointerdown",r),document.removeEventListener("touchstart",r)}},[t,e,o])}h();var Py=v(H(),1),_a=t=>{let e=(0,Py.useRef)(t);return Object.assign(e.current,t),e.current};var Ny=v(k(),1),Cn=Ue(null),Dy=({onCancel:t,onChange:e,onSelect:o,colorPickerType:r})=>{let n=Wd({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),i=_e(),a=Tn(),l=so(),s=ye(a,i),c=_a({app:l,onCancel:t,onChange:e,onSelect:o,selectedElements:s}),{container:d}=Mt();(0,Gd.useEffect)(()=>{let p=m.current;if(!p||!l.canvas||!n)return;let f=!1,b=l.canvas.getContext("2d"),x=({clientX:I,clientY:_})=>{let A=b.getImageData((I-i.offsetLeft)*window.devicePixelRatio,(_-i.offsetTop)*window.devicePixelRatio,1,1).data;return Qg(A[0],A[1],A[2])},y=({clientX:I,clientY:_,altKey:A})=>{p.style.top=`${_+20}px`,p.style.left=`${I+20}px`;let U=x({clientX:I,clientY:_});f&&c.onChange(r,U,c.selectedElements,{altKey:A}),p.style.background=U},S=()=>{c.onCancel()},C=(I,_)=>{c.onSelect(I,_)},w=I=>{f=!0,I.stopImmediatePropagation()},M=I=>{f=!1,d?.focus(),I.stopImmediatePropagation(),I.preventDefault(),C(x(I),I)},B=I=>{I.key===T.ESCAPE&&(I.preventDefault(),I.stopImmediatePropagation(),S())};return n.tabIndex=-1,n.focus(),y({clientX:c.app.lastViewportPosition.x,clientY:c.app.lastViewportPosition.y,altKey:!1}),n.addEventListener("keydown",B),n.addEventListener("pointerdown",w),n.addEventListener("pointerup",M),window.addEventListener("pointermove",y,{passive:!0}),window.addEventListener("blur",S),()=>{f=!1,n.removeEventListener("keydown",B),n.removeEventListener("pointerdown",w),n.removeEventListener("pointerup",M),window.removeEventListener("pointermove",y),window.removeEventListener("blur",S)}},[c,l.canvas,n,r,d,i.offsetLeft,i.offsetTop]);let m=(0,Gd.useRef)(null);return Ma(m,()=>{t()},p=>!!p.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")),n?(0,Ry.createPortal)((0,Ny.jsx)("div",{ref:m,className:"excalidraw-eye-dropper-preview"}),n):null};var Er=v(k(),1),Oy=({color:t,onChange:e,label:o,colorPickerType:r})=>{let n=Me(),[i,a]=(0,er.useState)(t),[l,s]=Ce(Lo);(0,er.useEffect)(()=>{a(t)},[t]);let c=(0,er.useCallback)(b=>{let x=b.toLowerCase(),y=Fy(x);y&&e(y),a(x)},[e]),d=(0,er.useRef)(null),m=(0,er.useRef)(null);(0,er.useEffect)(()=>{d.current&&d.current.focus()},[l]);let[p,f]=Ce(Cn,Re);return(0,er.useEffect)(()=>()=>{f(null)},[f]),(0,Er.jsxs)("div",{className:"color-picker__input-label",children:[(0,Er.jsx)("div",{className:"color-picker__input-hash",children:"#"}),(0,Er.jsx)("input",{ref:l==="hex"?d:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":o,onChange:b=>{c(b.target.value)},value:(i||"").replace(/^#/,""),onBlur:()=>{a(t)},tabIndex:-1,onFocus:()=>s("hex"),onKeyDown:b=>{b.key!==T.TAB&&(b.key===T.ESCAPE&&m.current?.focus(),b.stopPropagation())}}),!n.editor.isMobile&&(0,Er.jsxs)(Er.Fragment,{children:[(0,Er.jsx)("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),(0,Er.jsx)("div",{ref:m,className:z("excalidraw-eye-dropper-trigger",{selected:p}),onClick:()=>f(b=>b?null:{keepOpenOnAlt:!1,onSelect:x=>e(x),colorPickerType:r}),title:`${g("labels.eyeDropper")} \u2014 ${T.I.toLocaleUpperCase()} or ${N("Alt")} `,children:cv})]})]})};var zy=v(H(),1);var _t=v(k(),1),By=t=>{let e=new Option().style;return e.color=t,!!e.color},Fy=t=>Yn(t)?t:By(`#${t}`)?`#${t}`:By(t)?t:null,kC=({type:t,color:e,onChange:o,label:r,elements:n,palette:i=Ir,updateData:a})=>{let[,l]=Ce(Lo),[s,c]=Ce(Cn,Re),{container:d}=Mt(),m=Me(),p=(0,_t.jsxs)("div",{children:[(0,_t.jsx)(ga,{children:g("colorPicker.hexCode")}),(0,_t.jsx)(Oy,{color:e,label:r,onChange:x=>{o(x)},colorPickerType:t})]}),f=(0,zy.useRef)(null),b=()=>{f.current?.querySelector(".color-picker-content")?.focus()};return(0,_t.jsx)(My,{container:d,children:(0,_t.jsxs)(Ud,{ref:f,className:"focus-visible-none","data-prevent-outside-click":!0,onFocusOutside:x=>{b(),x.preventDefault()},onPointerDownOutside:x=>{s&&x.preventDefault()},onCloseAutoFocus:x=>{x.stopPropagation(),x.preventDefault(),d&&!_1(document.activeElement)&&d.focus(),a({openPopup:null}),l(null)},side:m.editor.isMobile&&!m.viewport.isLandscape?"bottom":"right",align:m.editor.isMobile&&!m.viewport.isLandscape?"center":"start",alignOffset:-16,sideOffset:20,style:{zIndex:"var(--zIndex-layerUI)",backgroundColor:"var(--popup-bg-color)",maxWidth:"208px",maxHeight:window.innerHeight,padding:"12px",borderRadius:"8px",boxSizing:"border-box",overflowY:"auto",boxShadow:"0px 7px 14px rgba(0, 0, 0, 0.05), 0px 0px 3.12708px rgba(0, 0, 0, 0.0798), 0px 0px 0.931014px rgba(0, 0, 0, 0.1702)"},children:[i?(0,_t.jsx)(Jv,{palette:i,color:e,onChange:x=>{o(x)},onEyeDropperToggle:x=>{c(y=>x?(y=y||{keepOpenOnAlt:!0,onSelect:o,colorPickerType:t},y.keepOpenOnAlt=!0,y):x===!1||y?null:{keepOpenOnAlt:!1,onSelect:o,colorPickerType:t})},onEscape:x=>{s?c(null):Co(x.target)?b():a({openPopup:null})},label:r,type:t,elements:n,updateData:a,children:p}):p,(0,_t.jsx)(_y,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})},IC=({label:t,color:e,type:o})=>(0,_t.jsx)($d,{type:"button",className:z("color-picker__button active-color",{"is-transparent":e==="transparent"||!e}),"aria-label":t,style:e?{"--swatch-color":e}:void 0,title:o==="elementStroke"?g("labels.showStroke"):g("labels.showBackground"),children:(0,_t.jsx)("div",{className:"color-picker__button-outline"})}),rs=({type:t,color:e,onChange:o,label:r,elements:n,palette:i=Ir,topPicks:a,updateData:l,appState:s})=>(0,_t.jsx)("div",{children:(0,_t.jsxs)("div",{role:"dialog","aria-modal":"true",className:"color-picker-container",children:[(0,_t.jsx)(Uv,{activeColor:e,onChange:o,type:t,topPicks:a}),(0,_t.jsx)("div",{style:{width:1,height:"100%",backgroundColor:"var(--default-border-color)",margin:"0 auto"}}),(0,_t.jsxs)(Hd,{open:s.openPopup===t,onOpenChange:c=>{l({openPopup:c?t:null})},children:[(0,_t.jsx)(IC,{color:e,label:r,type:t}),s.openPopup===t&&(0,_t.jsx)(kC,{type:t,color:e,onChange:o,label:r,elements:n,palette:i,updateData:l})]})]})});h();var kn=v(H(),1);h();var Sn=v(H(),1);var Hy=v(hr(),1);var $y=v(k(),1),Vd=({children:t,left:e,top:o,onCloseRequest:r,fitInViewport:n=!1,offsetLeft:i=0,offsetTop:a=0,viewportWidth:l=window.innerWidth,viewportHeight:s=window.innerHeight})=>{let c=(0,Sn.useRef)(null);(0,Sn.useEffect)(()=>{let m=c.current;if(!m)return;m.contains(document.activeElement)||m.focus();let p=f=>{if(f.key===T.TAB){let b=pl(m),{activeElement:x}=document,y=b.findIndex(S=>S===x);x===m?(f.shiftKey?b[b.length-1]?.focus():b[0].focus(),f.preventDefault(),f.stopImmediatePropagation()):y===0&&f.shiftKey?(b[b.length-1]?.focus(),f.preventDefault(),f.stopImmediatePropagation()):y===b.length-1&&!f.shiftKey&&(b[0]?.focus(),f.preventDefault(),f.stopImmediatePropagation())}};return m.addEventListener("keydown",p),()=>m.removeEventListener("keydown",p)},[]);let d=(0,Sn.useRef)(null);return(0,Sn.useLayoutEffect)(()=>{if(n&&c.current&&o!=null&&e!=null){let m=c.current,{width:p,height:f}=m.getBoundingClientRect();if(d.current?.top===o&&d.current?.left===e)return;d.current={top:o,left:e},p>=l?(m.style.width=`${l}px`,m.style.left="0px",m.style.overflowX="scroll"):e+p-i>l?m.style.left=`${l-p-10}px`:m.style.left=`${e}px`,f>=s?(m.style.height=`${s-20}px`,m.style.top="10px",m.style.overflowY="scroll"):o+f-a>s?m.style.top=`${s-f}px`:m.style.top=`${o}px`}},[o,e,n,l,s,i,a]),(0,Sn.useEffect)(()=>{if(r){let m=p=>{c.current?.contains(p.target)||(0,Hy.unstable_batchedUpdates)(()=>r(p))};return document.addEventListener("pointerdown",m,!1),()=>document.removeEventListener("pointerdown",m,!1)}},[r]),(0,$y.jsx)("div",{className:"popover",ref:c,tabIndex:-1,children:t})};var oo=v(k(),1);function MC({options:t,value:e,label:o,onChange:r,onClose:n}){let i=kn.default.useRef(),a=kn.default.useRef(),l=kn.default.useRef(null);return kn.default.useEffect(()=>{a.current?a.current.focus():l.current&&l.current.focus()},[]),(0,oo.jsx)("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":o,onKeyDown:c=>{let d=t.find(m=>m.keyBinding===c.key.toLowerCase());if(!(c.metaKey||c.altKey||c.ctrlKey)&&d){let m=t.indexOf(d);l.current.children[m].focus(),c.preventDefault()}else if(c.key===T.TAB)setTimeout(()=>{let m=a.current,p=document.activeElement;m!==p&&n()},0);else if($i(c.key)){let{activeElement:m}=document,p=Wr().rtl,f=Array.prototype.indexOf.call(l.current.children,m);if(f!==-1){let b=t.length,x=f;switch(c.key){case(p?T.ARROW_LEFT:T.ARROW_RIGHT):case T.ARROW_DOWN:{x=(f+1)%b;break}case(p?T.ARROW_RIGHT:T.ARROW_LEFT):case T.ARROW_UP:{x=(b+f-1)%b;break}}l.current.children[x].focus()}c.preventDefault()}else(c.key===T.ESCAPE||c.key===T.ENTER)&&(c.preventDefault(),n());c.nativeEvent.stopImmediatePropagation(),c.stopPropagation()},children:(0,oo.jsx)("div",{className:"picker-content",ref:l,children:t.map((c,d)=>(0,oo.jsxs)("button",{className:z("picker-option",{active:e===c.value}),onClick:m=>{m.currentTarget.focus(),r(c.value)},title:`${c.text} ${c.keyBinding&&`\u2014 ${c.keyBinding.toUpperCase()}`}`,"aria-label":c.text||"none","aria-keyshortcuts":c.keyBinding||void 0,ref:m=>{m&&d===0&&(i.current=m),m&&c.value===e&&(a.current=m)},onFocus:()=>{r(c.value)},children:[c.icon,c.keyBinding&&(0,oo.jsx)("span",{className:"picker-keybinding",children:c.keyBinding})]},c.text))})})}function $f({value:t,label:e,options:o,onChange:r,group:n=""}){let[i,a]=kn.default.useState(!1),l=kn.default.useRef(null),s=Wr().rtl;return(0,oo.jsxs)("div",{children:[(0,oo.jsx)("button",{name:n,className:i?"active":"","aria-label":e,onClick:()=>a(!i),ref:l,children:o.find(c=>c.value===t)?.icon}),(0,oo.jsx)(kn.default.Suspense,{fallback:"",children:i?(0,oo.jsxs)(oo.Fragment,{children:[(0,oo.jsx)(Vd,{onCloseRequest:c=>c.target!==l.current&&a(!1),...s?{right:5.5}:{left:-5.5},children:(0,oo.jsx)(MC,{options:o.filter(c=>c.showInPicker!==!1),value:t,label:e,onChange:r,onClose:()=>{a(!1),l.current?.focus()}})}),(0,oo.jsx)("div",{className:"picker-triangle"})]}):null})]})}var ae=v(k(),1),Wy=.1,ho=(t,e,o,r=!1)=>{let n=xe(ye(t,e,{includeBoundTextElement:r}));return t.map(i=>n.get(i.id)||i.id===e.editingElement?.id?o(i):i)},co=function(t,e,o,r,n){let i=e.editingElement,a=ve(t),l=null;return i&&(l=o(i)),l||(Fe(a,e)?l=A0(r===!0?a:a.filter(c=>r(c)),e,o)??(typeof n=="function"?n(!0):n):l=typeof n=="function"?n(!1):n),l},_C=(t,e)=>bt(e)?e:oe(e,{x:t.textAlign==="left"?t.x:t.x+(t.width-e.width)/(t.textAlign==="center"?2:1),y:t.y+(t.height-e.height)/2},!1),Uf=(t,e,o,r,n)=>{let i=new Set;return{elements:ho(t,e,a=>{if(le(a)){let l=r(a);i.add(l);let s=me(a,{fontSize:l});return $t(s,o.scene.getContainerElement(a),o.scene.getNonDeletedElementsMap()),s=_C(a,s),s}return a},!0),appState:{...e,currentItemFontSize:i.size===1?[...i][0]:n??e.currentItemFontSize},commitToHistory:!0}},AC=$({name:"changeStrokeColor",label:"labels.stroke",trackEvent:!1,perform:(t,e,o)=>({...o.currentItemStrokeColor&&{elements:ho(t,e,r=>yl(r.type)?me(r,{strokeColor:o.currentItemStrokeColor}):r,!0)},appState:{...e,...o},commitToHistory:!!o.currentItemStrokeColor}),PanelComponent:({elements:t,appState:e,updateData:o,appProps:r})=>(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)("h3",{"aria-hidden":"true",children:g("labels.stroke")}),(0,ae.jsx)(rs,{topPicks:Gs,palette:qg,type:"elementStroke",label:g("labels.stroke"),color:co(t,e,n=>n.strokeColor,!0,e.currentItemStrokeColor),onChange:n=>o({currentItemStrokeColor:n}),elements:t,appState:e,updateData:o})]})}),LC=$({name:"changeBackgroundColor",label:"labels.changeBackground",trackEvent:!1,perform:(t,e,o)=>({...o.currentItemBackgroundColor&&{elements:ho(t,e,r=>me(r,{backgroundColor:o.currentItemBackgroundColor}))},appState:{...e,...o},commitToHistory:!!o.currentItemBackgroundColor}),PanelComponent:({elements:t,appState:e,updateData:o,appProps:r})=>(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)("h3",{"aria-hidden":"true",children:g("labels.background")}),(0,ae.jsx)(rs,{topPicks:Vs,palette:Jg,type:"elementBackground",label:g("labels.background"),color:co(t,e,n=>n.backgroundColor,!0,e.currentItemBackgroundColor),onChange:n=>o({currentItemBackgroundColor:n}),elements:t,appState:e,updateData:o})]})}),PC=$({name:"changeFillStyle",label:"labels.fill",trackEvent:!1,perform:(t,e,o,r)=>(ge("element","changeFillStyle",`${o} (${r.device.editor.isMobile?"mobile":"desktop"})`),{elements:ho(t,e,n=>me(n,{fillStyle:o})),appState:{...e,currentItemFillStyle:o},commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o})=>{let r=ye(t,e),n=r.length>0&&r.every(i=>i.fillStyle==="zigzag");return(0,ae.jsxs)("fieldset",{children:[(0,ae.jsx)("legend",{children:g("labels.fill")}),(0,ae.jsx)(gr,{type:"button",options:[{value:"hachure",text:`${n?g("labels.zigzag"):g("labels.hachure")} (${N("Alt-Click")})`,icon:n?kx:Ix,active:n?!0:void 0,testId:"fill-hachure"},{value:"cross-hatch",text:g("labels.crossHatch"),icon:Mx,testId:"fill-cross-hatch"},{value:"solid",text:g("labels.solid"),icon:_x,testId:"fill-solid"}],value:co(t,e,i=>i.fillStyle,i=>i.hasOwnProperty("fillStyle"),i=>i?null:e.currentItemFillStyle),onClick:(i,a)=>{let l=a.altKey&&i==="hachure"&&r.every(s=>s.fillStyle==="hachure")?"zigzag":i;o(l)}})]})}}),RC=$({name:"changeStrokeWidth",label:"labels.strokeWidth",trackEvent:!1,perform:(t,e,o)=>({elements:ho(t,e,r=>me(r,{strokeWidth:o})),appState:{...e,currentItemStrokeWidth:o},commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o})=>(0,ae.jsxs)("fieldset",{children:[(0,ae.jsx)("legend",{children:g("labels.strokeWidth")}),(0,ae.jsx)(gr,{group:"stroke-width",options:[{value:tc.thin,text:g("labels.thin"),icon:Wp,testId:"strokeWidth-thin"},{value:tc.bold,text:g("labels.bold"),icon:Ax,testId:"strokeWidth-bold"},{value:tc.extraBold,text:g("labels.extraBold"),icon:Lx,testId:"strokeWidth-extraBold"}],value:co(t,e,r=>r.strokeWidth,r=>r.hasOwnProperty("strokeWidth"),r=>r?null:e.currentItemStrokeWidth),onChange:r=>o(r)})]})}),DC=$({name:"changeSloppiness",label:"labels.sloppiness",trackEvent:!1,perform:(t,e,o)=>({elements:ho(t,e,r=>me(r,{seed:K1(),roughness:o})),appState:{...e,currentItemRoughness:o},commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o})=>(0,ae.jsxs)("fieldset",{children:[(0,ae.jsx)("legend",{children:g("labels.sloppiness")}),(0,ae.jsx)(gr,{group:"sloppiness",options:[{value:0,text:g("labels.architect"),icon:Dx},{value:1,text:g("labels.artist"),icon:Nx},{value:2,text:g("labels.cartoonist"),icon:Ox}],value:co(t,e,r=>r.roughness,r=>r.hasOwnProperty("roughness"),r=>r?null:e.currentItemRoughness),onChange:r=>o(r)})]})}),KR=$({name:"changeStrokeStyle",label:"labels.strokeStyle",trackEvent:!1,perform:(t,e,o)=>({elements:ho(t,e,r=>me(r,{strokeStyle:o})),appState:{...e,currentItemStrokeStyle:o},commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o})=>(0,ae.jsxs)("fieldset",{children:[(0,ae.jsx)("legend",{children:g("labels.strokeStyle")}),(0,ae.jsx)(gr,{group:"strokeStyle",options:[{value:"solid",text:g("labels.strokeStyle_solid"),icon:Wp},{value:"dashed",text:g("labels.strokeStyle_dashed"),icon:Px},{value:"dotted",text:g("labels.strokeStyle_dotted"),icon:Rx}],value:co(t,e,r=>r.strokeStyle,r=>r.hasOwnProperty("strokeStyle"),r=>r?null:e.currentItemStrokeStyle),onChange:r=>o(r)})]})}),NC=$({name:"changeOpacity",label:"labels.opacity",trackEvent:!1,perform:(t,e,o)=>({elements:ho(t,e,r=>me(r,{opacity:o}),!0),appState:{...e,currentItemOpacity:o},commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o})=>(0,ae.jsxs)("label",{className:"control-label",children:[g("labels.opacity"),(0,ae.jsx)("input",{type:"range",min:"0",max:"100",step:"10",onChange:r=>o(+r.target.value),value:co(t,e,r=>r.opacity,!0,e.currentItemOpacity)??void 0})]})}),OC=$({name:"changeFontSize",label:"labels.fontSize",trackEvent:!1,perform:(t,e,o,r)=>Uf(t,e,r,()=>o,o),PanelComponent:({elements:t,appState:e,updateData:o,app:r})=>(0,ae.jsxs)("fieldset",{children:[(0,ae.jsx)("legend",{children:g("labels.fontSize")}),(0,ae.jsx)(gr,{group:"font-size",options:[{value:16,text:g("labels.small"),icon:Yx,testId:"fontSize-small"},{value:20,text:g("labels.medium"),icon:Zx,testId:"fontSize-medium"},{value:28,text:g("labels.large"),icon:jx,testId:"fontSize-large"},{value:36,text:g("labels.veryLarge"),icon:Xx,testId:"fontSize-veryLarge"}],value:co(t,e,n=>{if(le(n))return n.fontSize;let i=st(n,r.scene.getNonDeletedElementsMap());return i?i.fontSize:null},n=>le(n)||st(n,r.scene.getNonDeletedElementsMap())!==null,n=>n?null:e.currentItemFontSize||_r),onChange:n=>o(n)})]})}),Wf=$({name:"decreaseFontSize",label:"labels.decreaseFontSize",icon:Vp,trackEvent:!1,perform:(t,e,o,r)=>Uf(t,e,r,n=>Math.round(1/(1+Wy)*n.fontSize)),keyTest:t=>t[T.CTRL_OR_CMD]&&t.shiftKey&&(t.key===T.CHEVRON_LEFT||t.key===T.COMMA)}),Gf=$({name:"increaseFontSize",label:"labels.increaseFontSize",icon:Vp,trackEvent:!1,perform:(t,e,o,r)=>Uf(t,e,r,n=>Math.round(n.fontSize*(1+Wy))),keyTest:t=>t[T.CTRL_OR_CMD]&&t.shiftKey&&(t.key===T.CHEVRON_RIGHT||t.key===T.PERIOD)}),FC=$({name:"changeFontFamily",label:"labels.fontFamily",trackEvent:!1,perform:(t,e,o,r)=>({elements:ho(t,e,n=>{if(le(n)){let i=me(n,{fontFamily:o,lineHeight:Nr(o)});return $t(i,r.scene.getContainerElement(n),r.scene.getNonDeletedElementsMap()),i}return n},!0),appState:{...e,currentItemFontFamily:o},commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o,app:r})=>{let n=[{value:ll.Virgil,text:g("labels.handDrawn"),icon:aa,testId:"font-family-virgil"},{value:ll.Helvetica,text:g("labels.normal"),icon:qx,testId:"font-family-normal"},{value:ll.Cascadia,text:g("labels.code"),icon:Jx,testId:"font-family-code"}];return(0,ae.jsxs)("fieldset",{children:[(0,ae.jsx)("legend",{children:g("labels.fontFamily")}),(0,ae.jsx)(gr,{group:"font-family",options:n,value:co(t,e,i=>{if(le(i))return i.fontFamily;let a=st(i,r.scene.getNonDeletedElementsMap());return a?a.fontFamily:null},i=>le(i)||st(i,r.scene.getNonDeletedElementsMap())!==null,i=>i?null:e.currentItemFontFamily||Ri),onChange:i=>o(i)})]})}}),BC=$({name:"changeTextAlign",label:"Change text alignment",trackEvent:!1,perform:(t,e,o,r)=>({elements:ho(t,e,n=>{if(le(n)){let i=me(n,{textAlign:o});return $t(i,r.scene.getContainerElement(n),r.scene.getNonDeletedElementsMap()),i}return n},!0),appState:{...e,currentItemTextAlign:o},commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o,app:r})=>{let n=r.scene.getNonDeletedElementsMap();return(0,ae.jsxs)("fieldset",{children:[(0,ae.jsx)("legend",{children:g("labels.textAlign")}),(0,ae.jsx)(gr,{group:"text-align",options:[{value:"left",text:g("labels.left"),icon:Qx,testId:"align-left"},{value:"center",text:g("labels.center"),icon:ev,testId:"align-horizontal-center"},{value:"right",text:g("labels.right"),icon:tv,testId:"align-right"}],value:co(t,e,i=>{if(le(i))return i.textAlign;let a=st(i,n);return a?a.textAlign:null},i=>le(i)||st(i,n)!==null,i=>i?null:e.currentItemTextAlign),onChange:i=>o(i)})]})}}),zC=$({name:"changeVerticalAlign",label:"Change vertical alignment",trackEvent:{category:"element"},perform:(t,e,o,r)=>({elements:ho(t,e,n=>{if(le(n)){let i=me(n,{verticalAlign:o});return $t(i,r.scene.getContainerElement(n),r.scene.getNonDeletedElementsMap()),i}return n},!0),appState:{...e},commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o,app:r})=>(0,ae.jsx)("fieldset",{children:(0,ae.jsx)(gr,{group:"text-align",options:[{value:yo.TOP,text:g("labels.alignTop"),icon:(0,ae.jsx)(ov,{theme:e.theme}),testId:"align-top"},{value:yo.MIDDLE,text:g("labels.centerVertically"),icon:(0,ae.jsx)(nv,{theme:e.theme}),testId:"align-middle"},{value:yo.BOTTOM,text:g("labels.alignBottom"),icon:(0,ae.jsx)(rv,{theme:e.theme}),testId:"align-bottom"}],value:co(t,e,n=>{if(le(n)&&n.containerId)return n.verticalAlign;let i=st(n,r.scene.getNonDeletedElementsMap());return i?i.verticalAlign:null},n=>le(n)||st(n,r.scene.getNonDeletedElementsMap())!==null,n=>n?null:yo.MIDDLE),onChange:n=>o(n)})})}),YR=$({name:"changeRoundness",label:"Change edge roundness",trackEvent:!1,perform:(t,e,o)=>({elements:ho(t,e,r=>me(r,{roundness:o==="round"?{type:Fi(r.type)?Eo.ADAPTIVE_RADIUS:Eo.PROPORTIONAL_RADIUS}:null})),appState:{...e,currentItemRoundness:o},commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o})=>{let n=ta(ve(t),e).some(i=>i.roundness?.type===Eo.LEGACY);return(0,ae.jsxs)("fieldset",{children:[(0,ae.jsx)("legend",{children:g("labels.edges")}),(0,ae.jsx)(gr,{group:"edges",options:[{value:"sharp",text:g("labels.sharp"),icon:Fx},{value:"round",text:g("labels.round"),icon:Bx}],value:co(t,e,i=>n?null:i.roundness?"round":"sharp",i=>i.hasOwnProperty("roundness"),i=>i?null:e.currentItemRoundness),onChange:i=>o(i)})]})}}),Uy=t=>[{value:null,text:g("labels.arrowhead_none"),keyBinding:"q",icon:zx},{value:"arrow",text:g("labels.arrowhead_arrow"),keyBinding:"w",icon:(0,ae.jsx)(Hx,{flip:t})},{value:"bar",text:g("labels.arrowhead_bar"),keyBinding:"e",icon:(0,ae.jsx)(Ux,{flip:t})},{value:"dot",text:g("labels.arrowhead_circle"),keyBinding:null,icon:(0,ae.jsx)(Gp,{flip:t}),showInPicker:!1},{value:"circle",text:g("labels.arrowhead_circle"),keyBinding:"r",icon:(0,ae.jsx)(Gp,{flip:t}),showInPicker:!1},{value:"circle_outline",text:g("labels.arrowhead_circle_outline"),keyBinding:null,icon:(0,ae.jsx)($x,{flip:t}),showInPicker:!1},{value:"triangle",text:g("labels.arrowhead_triangle"),icon:(0,ae.jsx)(Wx,{flip:t}),keyBinding:"t"},{value:"triangle_outline",text:g("labels.arrowhead_triangle_outline"),icon:(0,ae.jsx)(Gx,{flip:t}),keyBinding:null,showInPicker:!1},{value:"diamond",text:g("labels.arrowhead_diamond"),icon:(0,ae.jsx)(Vx,{flip:t}),keyBinding:null,showInPicker:!1},{value:"diamond_outline",text:g("labels.arrowhead_diamond_outline"),icon:(0,ae.jsx)(Kx,{flip:t}),keyBinding:null,showInPicker:!1}],ZR=$({name:"changeArrowhead",label:"Change arrowheads",trackEvent:!1,perform:(t,e,o)=>({elements:ho(t,e,r=>{if(Ne(r)){let{position:n,type:i}=o;if(n==="start")return me(r,{startArrowhead:i});if(n==="end")return me(r,{endArrowhead:i})}return r}),appState:{...e,[o.position==="start"?"currentItemStartArrowhead":"currentItemEndArrowhead"]:o.type},commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o})=>{let r=Wr().rtl;return(0,ae.jsxs)("fieldset",{children:[(0,ae.jsx)("legend",{children:g("labels.arrowheads")}),(0,ae.jsxs)("div",{className:"iconSelectList buttonList",children:[(0,ae.jsx)($f,{label:"arrowhead_start",options:Uy(!r),value:co(t,e,n=>Ne(n)&&Hi(n.type)?n.startArrowhead:e.currentItemStartArrowhead,!0,e.currentItemStartArrowhead),onChange:n=>o({position:"start",type:n})}),(0,ae.jsx)($f,{label:"arrowhead_end",group:"arrowheads",options:Uy(!!r),value:co(t,e,n=>Ne(n)&&Hi(n.type)?n.endArrowhead:e.currentItemEndArrowhead,!0,e.currentItemEndArrowhead),onChange:n=>o({position:"end",type:n})})]})]})}});h();h();var Gy=v(H(),1),Vy=v(k(),1),Aa=()=>{let t=document.querySelector(".excalidraw-tooltip");if(t)return t;let e=document.createElement("div");return document.body.appendChild(e),e.classList.add("excalidraw-tooltip"),e},Vf=(t,e,o="bottom")=>{let r=t.getBoundingClientRect(),n=window.innerWidth,i=window.innerHeight,a=5,l=e.left+e.width/2-r.width/2;l<0?l=a:l+r.width>=n&&(l=n-r.width-a);let s;o==="bottom"?(s=e.top+e.height+a,s+r.height>=i&&(s=e.top-r.height-a)):(s=e.top-r.height-a,s<0&&(s=e.top+e.height+a)),Object.assign(t.style,{top:`${s}px`,left:`${l}px`})},HC=(t,e,o,r)=>{e.classList.add("excalidraw-tooltip--visible"),e.style.minWidth=r?"50ch":"10ch",e.style.maxWidth=r?"50ch":"15ch",e.textContent=o;let n=t.getBoundingClientRect();Vf(e,n)},go=({children:t,label:e,long:o=!1,style:r,disabled:n})=>((0,Gy.useEffect)(()=>()=>Aa().classList.remove("excalidraw-tooltip--visible"),[]),n?null:(0,Vy.jsx)("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:i=>HC(i.currentTarget,Aa(),e,o),onPointerLeave:()=>Aa().classList.remove("excalidraw-tooltip--visible"),style:r,children:t}));var di=v(k(),1),$C=$({name:"changeViewBackgroundColor",label:"labels.canvasBackground",paletteName:"Change canvas background color",trackEvent:!1,predicate:(t,e,o,r)=>!!r.props.UIOptions.canvasActions.changeViewBackgroundColor&&!e.viewModeEnabled,perform:(t,e,o)=>({appState:{...e,...o},commitToHistory:!!o.viewBackgroundColor}),PanelComponent:({elements:t,appState:e,updateData:o,appProps:r})=>(0,di.jsx)(rs,{palette:null,topPicks:Ks,label:g("labels.canvasBackground"),type:"canvasBackground",color:e.viewBackgroundColor,onChange:n=>o({viewBackgroundColor:n}),"data-testid":"canvas-background-picker",elements:t,appState:e,updateData:o})}),Zr=$({name:"clearCanvas",label:"labels.clearCanvas",paletteName:"Clear canvas",icon:Jo,trackEvent:{category:"canvas"},predicate:(t,e,o,r)=>!!r.props.UIOptions.canvasActions.clearCanvas&&!e.viewModeEnabled,perform:(t,e,o,r)=>(r.imageCache.clear(),{elements:t.map(n=>me(n,{isDeleted:!0})),appState:{...Vi(),files:{},theme:e.theme,penMode:e.penMode,penDetected:e.penDetected,exportBackground:e.exportBackground,exportEmbedScene:e.exportEmbedScene,gridSize:e.gridSize,showStats:e.showStats,pasteDialog:e.pasteDialog,activeTool:e.activeTool.type==="image"?{...e.activeTool,type:"selection"}:e.activeTool},commitToHistory:!0})}),Kd=$({name:"zoomIn",label:"buttons.zoomIn",viewMode:!0,icon:kp,trackEvent:{category:"canvas"},perform:(t,e,o,r)=>({appState:{...e,...$r({viewportX:e.width/2+e.offsetLeft,viewportY:e.height/2+e.offsetTop,nextZoom:Hr(e.zoom.value+Gn)},e),userToFollow:null},commitToHistory:!1}),PanelComponent:({updateData:t})=>(0,di.jsx)(se,{type:"button",className:"zoom-in-button zoom-button",icon:kp,title:`${g("buttons.zoomIn")} \u2014 ${N("CtrlOrCmd++")}`,"aria-label":g("buttons.zoomIn"),onClick:()=>{t(null)}}),keyTest:t=>(t.code===pe.EQUAL||t.code===pe.NUM_ADD)&&(t[T.CTRL_OR_CMD]||t.shiftKey)}),Yd=$({name:"zoomOut",label:"buttons.zoomOut",icon:Ip,viewMode:!0,trackEvent:{category:"canvas"},perform:(t,e,o,r)=>({appState:{...e,...$r({viewportX:e.width/2+e.offsetLeft,viewportY:e.height/2+e.offsetTop,nextZoom:Hr(e.zoom.value-Gn)},e),userToFollow:null},commitToHistory:!1}),PanelComponent:({updateData:t})=>(0,di.jsx)(se,{type:"button",className:"zoom-out-button zoom-button",icon:Ip,title:`${g("buttons.zoomOut")} \u2014 ${N("CtrlOrCmd+-")}`,"aria-label":g("buttons.zoomOut"),onClick:()=>{t(null)}}),keyTest:t=>(t.code===pe.MINUS||t.code===pe.NUM_SUBTRACT)&&(t[T.CTRL_OR_CMD]||t.shiftKey)}),UC=$({name:"resetZoom",label:"buttons.resetZoom",icon:mx,viewMode:!0,trackEvent:{category:"canvas"},perform:(t,e,o,r)=>({appState:{...e,...$r({viewportX:e.width/2+e.offsetLeft,viewportY:e.height/2+e.offsetTop,nextZoom:Hr(1)},e),userToFollow:null},commitToHistory:!1}),PanelComponent:({updateData:t,appState:e})=>(0,di.jsx)(go,{label:g("buttons.resetZoom"),style:{height:"100%"},children:(0,di.jsxs)(se,{type:"button",className:"reset-zoom-button zoom-button",title:g("buttons.resetZoom"),"aria-label":g("buttons.resetZoom"),onClick:()=>{t(null)},children:[(e.zoom.value*100).toFixed(0),"%"]})}),keyTest:t=>(t.code===pe.ZERO||t.code===pe.NUM_ZERO)&&(t[T.CTRL_OR_CMD]||t.shiftKey)}),WC=(t,e)=>{let[o,r,n,i]=t,a=n-o,l=e.width/a,s=i-r,c=e.height/s,d=Math.min(l,c),m=Math.floor(d/Gn)*Gn;return Math.min(Math.max(m,f1),1)},Ky=({bounds:t,appState:e,fitToViewport:o=!1,viewportZoomFactor:r=.7})=>{let[n,i,a,l]=t,s=(n+a)/2,c=(i+l)/2,d,m,p;if(o){let f=a-n,b=l-i;d=Math.min(e.width/f,e.height/b)*Math.min(1,Math.max(r,.1)),d=Math.min(Math.max(d,.1),30);let x=e.width;if(e.openSidebar){let S=document.querySelector(".sidebar")?.offsetWidth??0;x=document.documentElement.getAttribute("dir")==="rtl"?e.width+S:e.width-S}m=x/2*(1/d)-s,p=e.height/2*(1/d)-c}else{d=WC(t,{width:e.width,height:e.height});let f=L0({scenePoint:{x:s,y:c},viewportDimensions:{width:e.width,height:e.height},zoom:{value:d}});m=f.scrollX,p=f.scrollY}return{appState:{...e,scrollX:m,scrollY:p,zoom:{value:d}},commitToHistory:!1}},ns=({targetElements:t,appState:e,fitToViewport:o,viewportZoomFactor:r})=>{let n=Ye(ve(t));return Ky({bounds:n,appState:e,fitToViewport:o,viewportZoomFactor:r})},yD=$({name:"zoomToFitSelectionInViewport",label:"labels.zoomToFitViewport",icon:bd,trackEvent:{category:"canvas"},perform:(t,e,o,r)=>{let n=r.scene.getSelectedElements(e);return ns({targetElements:n.length?n:t,appState:{...e,userToFollow:null},fitToViewport:!1})},keyTest:t=>t.code===pe.TWO&&t.shiftKey&&!t.altKey&&!t[T.CTRL_OR_CMD]}),ED=$({name:"zoomToFitSelection",label:"helpDialog.zoomToSelection",icon:bd,trackEvent:{category:"canvas"},perform:(t,e,o,r)=>{let n=r.scene.getSelectedElements(e);return ns({targetElements:n.length?n:t,appState:{...e,userToFollow:null},fitToViewport:!0})},keyTest:t=>t.code===pe.THREE&&t.shiftKey&&!t.altKey&&!t[T.CTRL_OR_CMD]}),GC=$({name:"zoomToFit",label:"helpDialog.zoomToFit",icon:bd,viewMode:!0,trackEvent:{category:"canvas"},perform:(t,e)=>ns({targetElements:t,appState:{...e,userToFollow:null},fitToViewport:!1}),keyTest:t=>t.code===pe.ONE&&t.shiftKey&&!t.altKey&&!t[T.CTRL_OR_CMD]}),ci=$({name:"toggleTheme",label:(t,e)=>e.theme===he.DARK?"buttons.lightMode":"buttons.darkMode",keywords:["toggle","dark","light","mode","theme"],icon:t=>t.theme===he.LIGHT?Hl:$l,viewMode:!0,trackEvent:{category:"canvas"},perform:(t,e,o)=>({appState:{...e,theme:o||(e.theme===he.LIGHT?he.DARK:he.LIGHT)},commitToHistory:!1}),keyTest:t=>t.altKey&&t.shiftKey&&t.code===pe.D,predicate:(t,e,o,r)=>!!r.props.UIOptions.canvasActions.toggleTheme}),wD=$({name:"toggleEraserTool",label:"toolBar.eraser",trackEvent:{category:"toolbar"},perform:(t,e)=>{let o;return ko(e)?o=nt(e,{...e.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):o=nt(e,{type:"eraser",lastActiveToolBeforeEraser:e.activeTool}),{appState:{...e,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:o},commitToHistory:!0}},keyTest:t=>t.key===T.E}),Yy=$({name:"toggleHandTool",label:"toolBar.hand",paletteName:"Toggle hand tool",trackEvent:{category:"toolbar"},icon:dd,viewMode:!1,perform:(t,e,o,r)=>{let n;return Or(e)?n=nt(e,{...e.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):(n=nt(e,{type:"hand",lastActiveToolBeforeEraser:e.activeTool}),Oe(r.interactiveCanvas,De.GRAB)),{appState:{...e,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n},commitToHistory:!0}},keyTest:t=>!t.altKey&&!t[T.CTRL_OR_CMD]&&t.key===T.H});h();var Zy=v(k(),1),Ro=$({name:"finalize",label:"",trackEvent:!1,perform:(t,e,o,r)=>{let{interactiveCanvas:n,focusContainer:i,scene:a}=r,l=a.getNonDeletedElementsMap();if(e.editingLinearElement){let{elementId:p,startBindingElement:f,endBindingElement:b}=e.editingLinearElement,x=ue.getElement(p,l);if(x)return Lr(x)&&fc(x,f,b,l),{elements:x.points.length<2||Qn(x)?t.filter(y=>y.id!==x.id):void 0,appState:{...e,cursorButton:"up",editingLinearElement:null},commitToHistory:!0}}let s=t,c=e.pendingImageElementId&&a.getElement(e.pendingImageElementId);c&&oe(c,{isDeleted:!0},!1),window.document.activeElement instanceof HTMLElement&&i();let d=e.multiElement?e.multiElement:e.editingElement?.type==="freedraw"?e.editingElement:null;if(d){if(d.type!=="freedraw"&&e.lastPointerDownWith!=="touch"){let{points:f,lastCommittedPoint:b}=d;(!b||f[f.length-1]!==b)&&oe(d,{points:d.points.slice(0,-1)})}Qn(d)&&(s=s.filter(f=>f.id!==d.id));let p=bl(d.points,e.zoom.value);if((d.type==="line"||d.type==="freedraw")&&p){let f=d.points,b=f[0];oe(d,{points:f.map((x,y)=>y===f.length-1?[b[0],b[1]]:x)})}if(Lr(d)&&!p&&d.points.length>1){let[f,b]=ue.getPointAtIndexGlobalCoordinates(d,-1,xe(t));wl(d,e,{x:f,y:b},r)}}(!e.activeTool.locked&&e.activeTool.type!=="freedraw"||!d)&&Io(n);let m;return e.activeTool.type==="eraser"?m=nt(e,{...e.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):m=nt(e,{type:"selection"}),{elements:s,appState:{...e,cursorButton:"up",activeTool:(e.activeTool.locked||e.activeTool.type==="freedraw")&&d?e.activeTool:m,activeEmbeddable:null,draggingElement:null,multiElement:null,editingElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:d&&!e.activeTool.locked&&e.activeTool.type!=="freedraw"?{...e.selectedElementIds,[d.id]:!0}:e.selectedElementIds,selectedLinearElement:d&&Ne(d)?new ue(d):e.selectedLinearElement,pendingImageElementId:null},commitToHistory:e.activeTool.type==="freedraw"}},keyTest:(t,e)=>t.key===T.ESCAPE&&(e.editingLinearElement!==null||!e.draggingElement&&e.multiElement===null)||(t.key===T.ESCAPE||t.key===T.ENTER)&&e.multiElement!==null,PanelComponent:({appState:t,updateData:e,data:o})=>(0,Zy.jsx)(se,{type:"button",icon:Ex,title:g("buttons.done"),"aria-label":g("buttons.done"),onClick:e,visible:t.multiElement!=null,size:o?.size||"medium"})});h();h();var jy=v(H(),1);var is=v(k(),1),Xy=t=>{let{id:e}=Mt(),[o,r]=(0,jy.useState)(t.value),n=a=>{t.ignoreFocus||R1(a.target);let l=a.target.value;l!==t.value&&t.onChange(l)},i=a=>{if(a.key===T.ENTER){if(a.preventDefault(),a.nativeEvent.isComposing||a.keyCode===229)return;a.currentTarget.blur()}};return(0,is.jsxs)("div",{className:"ProjectName",children:[(0,is.jsx)("label",{className:"ProjectName-label",htmlFor:"filename",children:`${t.label}:`}),(0,is.jsx)("input",{type:"text",className:"TextInput",onBlur:n,onKeyDown:i,id:`${e}-filename`,value:o,onChange:a=>r(a.target.value)})]})};h();var La=v(k(),1),Jy=t=>{let e=t.title||(t.value===he.DARK?g("buttons.lightMode"):g("buttons.darkMode"));return(0,La.jsx)(se,{type:"icon",icon:t.value===he.LIGHT?qy.MOON:qy.SUN,title:e,"aria-label":e,onClick:()=>t.onChange(t.value===he.DARK?he.LIGHT:he.DARK),"data-testid":"toggle-dark-mode"})},qy={SUN:(0,La.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,La.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,La.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,La.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"})})};h();var mi=(t,{selectedElementIds:e},o)=>{t=ve(t);let r=o&&Fe(t,{selectedElementIds:e}),n=null,i=r?ye(t,{selectedElementIds:e},{includeBoundTextElement:!0}):t;return r&&(i.length===1&&Ee(i[0])?(n=i[0],i=Uc(t,n)):i.length>1&&(i=ye(t,{selectedElementIds:e},{includeBoundTextElement:!0,includeElementsInFrames:!0}))),{exportingFrame:n,exportedElements:dr(i)}},ui=async(t,e,o,r,{exportBackground:n,exportPadding:i=an,viewBackgroundColor:a,name:l=o.name||T1,fileHandle:s=null,exportingFrame:c=null})=>{if(e.length===0)throw new Error(g("alerts.cannotExportEmptyCanvas"));if(t==="svg"||t==="clipboard-svg"){let m=Nc(e,{exportBackground:n,exportWithDarkMode:o.exportWithDarkMode,viewBackgroundColor:a,exportPadding:i,exportScale:o.exportScale,exportEmbedScene:o.exportEmbedScene&&t==="svg"},r,{exportingFrame:c});if(t==="svg")return Ju(m.then(p=>new Blob([p.outerHTML],{type:Pt.svg})),{description:"Export to SVG",name:l,extension:o.exportEmbedScene?"excalidraw.svg":"svg",fileHandle:s});if(t==="clipboard-svg"){let p=await m.then(f=>f.outerHTML);try{await qi(p)}catch{throw new Error(g("errors.copyToSystemClipboardFailed"))}return}}let d=o0(e,o,r,{exportBackground:n,viewBackgroundColor:a,exportPadding:i,exportingFrame:c});if(t==="png"){let m=zr(d);return o.exportEmbedScene&&(m=m.then(p=>import("./excalidraw-assets/image-2PF7RELG.js").then(({encodePngMetadata:f})=>f({blob:p,metadata:np(e,o,r,"local")})))),Ju(m,{description:"Export to PNG",name:l,extension:"png",fileHandle:s})}else if(t==="clipboard")try{let m=zr(d);await s0(m)}catch(m){throw console.warn(m),m.name==="CANVAS_POSSIBLY_TOO_BIG"?new Error(g("canvasError.canvasTooBig")):Mr&&m.name==="TypeError"?new Error(`${g("alerts.couldNotCopyToClipboard")}
|
|
41
|
+
`)},fC=0,ka=[];function yy(t){var e=je.useRef([]),o=je.useRef([0,0]),r=je.useRef(),n=je.useState(fC++)[0],i=je.useState(function(){return Ql()})[0],a=je.useRef(t);je.useEffect(function(){a.current=t},[t]),je.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(n));var x=ny([t.lockRef.current],(t.shards||[]).map(vy),!0).filter(Boolean);return x.forEach(function(y){return y.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),x.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(n))})}}},[t.inert,t.lockRef.current,t.shards]);var l=je.useCallback(function(x,y){if("touches"in x&&x.touches.length===2)return!a.current.allowPinchZoom;var S=Fd(x),C=o.current,w="deltaX"in x?x.deltaX:C[0]-S[0],M="deltaY"in x?x.deltaY:C[1]-S[1],B,I=x.target,_=Math.abs(w)>Math.abs(M)?"h":"v";if("touches"in x&&_==="h"&&I.type==="range")return!1;var A=Ff(_,I);if(!A)return!0;if(A?B=_:(B=_==="v"?"h":"v",A=Ff(_,I)),!A)return!1;if(!r.current&&"changedTouches"in x&&(w||M)&&(r.current=B),!B)return!0;var U=r.current||B;return by(U,y,x,U==="h"?w:M,!0)},[]),s=je.useCallback(function(x){var y=x;if(!(!ka.length||ka[ka.length-1]!==i)){var S="deltaY"in y?xy(y):Fd(y),C=e.current.filter(function(B){return B.name===y.type&&B.target===y.target&&uC(B.delta,S)})[0];if(C&&C.should){y.cancelable&&y.preventDefault();return}if(!C){var w=(a.current.shards||[]).map(vy).filter(Boolean).filter(function(B){return B.contains(y.target)}),M=w.length>0?l(y,w[0]):!a.current.noIsolation;M&&y.cancelable&&y.preventDefault()}}},[]),c=je.useCallback(function(x,y,S,C){var w={name:x,delta:y,target:S,should:C};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(M){return M!==w})},1)},[]),d=je.useCallback(function(x){o.current=Fd(x),r.current=void 0},[]),m=je.useCallback(function(x){c(x.type,xy(x),x.target,l(x,t.lockRef.current))},[]),p=je.useCallback(function(x){c(x.type,Fd(x),x.target,l(x,t.lockRef.current))},[]);je.useEffect(function(){return ka.push(i),t.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:p}),document.addEventListener("wheel",s,si),document.addEventListener("touchmove",s,si),document.addEventListener("touchstart",d,si),function(){ka=ka.filter(function(x){return x!==i}),document.removeEventListener("wheel",s,si),document.removeEventListener("touchmove",s,si),document.removeEventListener("touchstart",d,si)}},[]);var f=t.removeScrollBar,b=t.inert;return je.createElement(je.Fragment,null,b?je.createElement(i,{styles:pC(n)}):null,f?je.createElement(Nf,{gapMode:"margin"}):null)}var Ey=_f(Nd,yy);var wy=Bd.forwardRef(function(t,e){return Bd.createElement(Jl,yr({},t,{ref:e,sideCar:Ey}))});wy.classNames=Jl.classNames;var Bf=wy;var Cy="Popover",[Ty,tP]=xr(Cy,[Cf]),zd=Cf(),[hC,Ia]=Ty(Cy),gC=t=>{let{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:i,modal:a=!1}=t,l=zd(e),s=(0,Te.useRef)(null),[c,d]=(0,Te.useState)(!1),[m=!1,p]=Ca({prop:r,defaultProp:n,onChange:i});return(0,Te.createElement)(Z2,l,(0,Te.createElement)(hC,{scope:e,contentId:va(),triggerRef:s,open:m,onOpenChange:p,onOpenToggle:(0,Te.useCallback)(()=>p(f=>!f),[p]),hasCustomAnchor:c,onCustomAnchorAdd:(0,Te.useCallback)(()=>d(!0),[]),onCustomAnchorRemove:(0,Te.useCallback)(()=>d(!1),[]),modal:a},o))};var bC="PopoverTrigger",xC=(0,Te.forwardRef)((t,e)=>{let{__scopePopover:o,...r}=t,n=Ia(bC,o),i=zd(o),a=Ot(e,n.triggerRef),l=(0,Te.createElement)(ct.button,we({type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":Iy(n.open)},r,{ref:a,onClick:vt(t.onClick,n.onOpenToggle)}));return n.hasCustomAnchor?l:(0,Te.createElement)(j2,we({asChild:!0},i),l)}),Sy="PopoverPortal",[vC,yC]=Ty(Sy,{forceMount:void 0}),EC=t=>{let{__scopePopover:e,forceMount:o,children:r,container:n}=t,i=Ia(Sy,e);return(0,Te.createElement)(vC,{scope:e,forceMount:o},(0,Te.createElement)(wa,{present:o||i.open},(0,Te.createElement)(Q2,{asChild:!0,container:n},r)))},ts="PopoverContent",wC=(0,Te.forwardRef)((t,e)=>{let o=yC(ts,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,i=Ia(ts,t.__scopePopover);return(0,Te.createElement)(wa,{present:r||i.open},i.modal?(0,Te.createElement)(CC,we({},n,{ref:e})):(0,Te.createElement)(TC,we({},n,{ref:e})))}),CC=(0,Te.forwardRef)((t,e)=>{let o=Ia(ts,t.__scopePopover),r=(0,Te.useRef)(null),n=Ot(e,r),i=(0,Te.useRef)(!1);return(0,Te.useEffect)(()=>{let a=r.current;if(a)return oy(a)},[]),(0,Te.createElement)(Bf,{as:vn,allowPinchZoom:!0},(0,Te.createElement)(ky,we({},t,{ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:vt(t.onCloseAutoFocus,a=>{var l;a.preventDefault(),i.current||(l=o.triggerRef.current)===null||l===void 0||l.focus()}),onPointerDownOutside:vt(t.onPointerDownOutside,a=>{let l=a.detail.originalEvent,s=l.button===0&&l.ctrlKey===!0,c=l.button===2||s;i.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:vt(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})))}),TC=(0,Te.forwardRef)((t,e)=>{let o=Ia(ts,t.__scopePopover),r=(0,Te.useRef)(!1);return(0,Te.createElement)(ky,we({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{var i;if((i=t.onCloseAutoFocus)===null||i===void 0||i.call(t,n),!n.defaultPrevented){var a;r.current||(a=o.triggerRef.current)===null||a===void 0||a.focus(),n.preventDefault()}r.current=!1},onInteractOutside:n=>{var i,a;(i=t.onInteractOutside)===null||i===void 0||i.call(t,n),n.defaultPrevented||(r.current=!0);let l=n.target;((a=o.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&n.preventDefault()}}))}),ky=(0,Te.forwardRef)((t,e)=>{let{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:d,...m}=t,p=Ia(ts,o),f=zd(o);return d2(),(0,Te.createElement)(h2,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:i},(0,Te.createElement)(a2,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1)},(0,Te.createElement)(X2,we({"data-state":Iy(p.open),role:"dialog",id:p.contentId},f,m,{ref:e,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)"}}))))});var SC=(0,Te.forwardRef)((t,e)=>{let{__scopePopover:o,...r}=t,n=zd(o);return(0,Te.createElement)(q2,we({},n,r,{ref:e}))});function Iy(t){return t?"open":"closed"}var Hd=gC;var $d=xC,My=EC,Ud=wC;var _y=SC;h();var er=v(H(),1);h();var Gd=v(H(),1),Ry=v(hr(),1);h();var zf=v(H(),1),Hf=zf.default.createContext(null),_e=()=>zf.default.useContext(Hf);h();var os=v(H(),1);var Wd=t=>{let[e,o]=(0,os.useState)(null),r=Me(),{theme:n}=_e(),{container:i}=Mt();return(0,os.useLayoutEffect)(()=>{e&&(e.className="",e.classList.add("excalidraw",...t?.className?.split(/\s+/)||[]),e.classList.toggle("excalidraw--mobile",r.editor.isMobile),e.classList.toggle("theme--dark",n===he.DARK))},[e,n,r.editor.isMobile,t?.className]),(0,os.useLayoutEffect)(()=>{let a=t?.parentSelector?i?.querySelector(t.parentSelector):document.body;if(!a)return;let l=document.createElement("div");return a.appendChild(l),o(l),()=>{a.removeChild(l)}},[i,t?.parentSelector]),e};h();var Ly=v(H(),1);function Ma(t,e,o){(0,Ly.useEffect)(()=>{function r(n){let i=n;if(!t.current)return;let a=o?.(i,t.current);if(a===!0)return;if(a===!1)return e(i);t.current.contains(i.target)||!document.documentElement.contains(i.target)||i.target.closest("[data-radix-portal]")||i.target===document.documentElement&&document.body.style.pointerEvents==="none"||i.target.closest("[data-prevent-outside-click]")||e(i)}return document.addEventListener("pointerdown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("pointerdown",r),document.removeEventListener("touchstart",r)}},[t,e,o])}h();var Py=v(H(),1),_a=t=>{let e=(0,Py.useRef)(t);return Object.assign(e.current,t),e.current};var Ny=v(k(),1),Cn=Ue(null),Dy=({onCancel:t,onChange:e,onSelect:o,colorPickerType:r})=>{let n=Wd({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),i=_e(),a=Tn(),l=so(),s=ye(a,i),c=_a({app:l,onCancel:t,onChange:e,onSelect:o,selectedElements:s}),{container:d}=Mt();(0,Gd.useEffect)(()=>{let p=m.current;if(!p||!l.canvas||!n)return;let f=!1,b=l.canvas.getContext("2d"),x=({clientX:I,clientY:_})=>{let A=b.getImageData((I-i.offsetLeft)*window.devicePixelRatio,(_-i.offsetTop)*window.devicePixelRatio,1,1).data;return Qg(A[0],A[1],A[2])},y=({clientX:I,clientY:_,altKey:A})=>{p.style.top=`${_+20}px`,p.style.left=`${I+20}px`;let U=x({clientX:I,clientY:_});f&&c.onChange(r,U,c.selectedElements,{altKey:A}),p.style.background=U},S=()=>{c.onCancel()},C=(I,_)=>{c.onSelect(I,_)},w=I=>{f=!0,I.stopImmediatePropagation()},M=I=>{f=!1,d?.focus(),I.stopImmediatePropagation(),I.preventDefault(),C(x(I),I)},B=I=>{I.key===T.ESCAPE&&(I.preventDefault(),I.stopImmediatePropagation(),S())};return n.tabIndex=-1,n.focus(),y({clientX:c.app.lastViewportPosition.x,clientY:c.app.lastViewportPosition.y,altKey:!1}),n.addEventListener("keydown",B),n.addEventListener("pointerdown",w),n.addEventListener("pointerup",M),window.addEventListener("pointermove",y,{passive:!0}),window.addEventListener("blur",S),()=>{f=!1,n.removeEventListener("keydown",B),n.removeEventListener("pointerdown",w),n.removeEventListener("pointerup",M),window.removeEventListener("pointermove",y),window.removeEventListener("blur",S)}},[c,l.canvas,n,r,d,i.offsetLeft,i.offsetTop]);let m=(0,Gd.useRef)(null);return Ma(m,()=>{t()},p=>!!p.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")),n?(0,Ry.createPortal)((0,Ny.jsx)("div",{ref:m,className:"excalidraw-eye-dropper-preview"}),n):null};var Er=v(k(),1),Oy=({color:t,onChange:e,label:o,colorPickerType:r})=>{let n=Me(),[i,a]=(0,er.useState)(t),[l,s]=Ce(Lo);(0,er.useEffect)(()=>{a(t)},[t]);let c=(0,er.useCallback)(b=>{let x=b.toLowerCase(),y=Fy(x);y&&e(y),a(x)},[e]),d=(0,er.useRef)(null),m=(0,er.useRef)(null);(0,er.useEffect)(()=>{d.current&&d.current.focus()},[l]);let[p,f]=Ce(Cn,Re);return(0,er.useEffect)(()=>()=>{f(null)},[f]),(0,Er.jsxs)("div",{className:"color-picker__input-label",children:[(0,Er.jsx)("div",{className:"color-picker__input-hash",children:"#"}),(0,Er.jsx)("input",{ref:l==="hex"?d:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":o,onChange:b=>{c(b.target.value)},value:(i||"").replace(/^#/,""),onBlur:()=>{a(t)},tabIndex:-1,onFocus:()=>s("hex"),onKeyDown:b=>{b.key!==T.TAB&&(b.key===T.ESCAPE&&m.current?.focus(),b.stopPropagation())}}),!n.editor.isMobile&&(0,Er.jsxs)(Er.Fragment,{children:[(0,Er.jsx)("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),(0,Er.jsx)("div",{ref:m,className:z("excalidraw-eye-dropper-trigger",{selected:p}),onClick:()=>f(b=>b?null:{keepOpenOnAlt:!1,onSelect:x=>e(x),colorPickerType:r}),title:`${g("labels.eyeDropper")} \u2014 ${T.I.toLocaleUpperCase()} or ${N("Alt")} `,children:cv})]})]})};var zy=v(H(),1);var _t=v(k(),1),By=t=>{let e=new Option().style;return e.color=t,!!e.color},Fy=t=>Yn(t)?t:By(`#${t}`)?`#${t}`:By(t)?t:null,kC=({type:t,color:e,onChange:o,label:r,elements:n,palette:i=Ir,updateData:a})=>{let[,l]=Ce(Lo),[s,c]=Ce(Cn,Re),{container:d}=Mt(),m=Me(),p=(0,_t.jsxs)("div",{children:[(0,_t.jsx)(ga,{children:g("colorPicker.hexCode")}),(0,_t.jsx)(Oy,{color:e,label:r,onChange:x=>{o(x)},colorPickerType:t})]}),f=(0,zy.useRef)(null),b=()=>{f.current?.querySelector(".color-picker-content")?.focus()};return(0,_t.jsx)(My,{container:d,children:(0,_t.jsxs)(Ud,{ref:f,className:"focus-visible-none","data-prevent-outside-click":!0,onFocusOutside:x=>{b(),x.preventDefault()},onPointerDownOutside:x=>{s&&x.preventDefault()},onCloseAutoFocus:x=>{x.stopPropagation(),x.preventDefault(),d&&!_1(document.activeElement)&&d.focus(),a({openPopup:null}),l(null)},side:m.editor.isMobile&&!m.viewport.isLandscape?"bottom":"right",align:m.editor.isMobile&&!m.viewport.isLandscape?"center":"start",alignOffset:-16,sideOffset:20,style:{zIndex:"var(--zIndex-layerUI)",backgroundColor:"var(--popup-bg-color)",maxWidth:"208px",maxHeight:window.innerHeight,padding:"12px",borderRadius:"8px",boxSizing:"border-box",overflowY:"auto",boxShadow:"0px 7px 14px rgba(0, 0, 0, 0.05), 0px 0px 3.12708px rgba(0, 0, 0, 0.0798), 0px 0px 0.931014px rgba(0, 0, 0, 0.1702)"},children:[i?(0,_t.jsx)(Jv,{palette:i,color:e,onChange:x=>{o(x)},onEyeDropperToggle:x=>{c(y=>x?(y=y||{keepOpenOnAlt:!0,onSelect:o,colorPickerType:t},y.keepOpenOnAlt=!0,y):x===!1||y?null:{keepOpenOnAlt:!1,onSelect:o,colorPickerType:t})},onEscape:x=>{s?c(null):Co(x.target)?b():a({openPopup:null})},label:r,type:t,elements:n,updateData:a,children:p}):p,(0,_t.jsx)(_y,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})},IC=({label:t,color:e,type:o})=>(0,_t.jsx)($d,{type:"button",className:z("color-picker__button active-color",{"is-transparent":e==="transparent"||!e}),"aria-label":t,style:e?{"--swatch-color":e}:void 0,title:o==="elementStroke"?g("labels.showStroke"):g("labels.showBackground"),children:(0,_t.jsx)("div",{className:"color-picker__button-outline"})}),rs=({type:t,color:e,onChange:o,label:r,elements:n,palette:i=Ir,topPicks:a,updateData:l,appState:s})=>(0,_t.jsx)("div",{children:(0,_t.jsxs)("div",{role:"dialog","aria-modal":"true",className:"color-picker-container",children:[(0,_t.jsx)(Uv,{activeColor:e,onChange:o,type:t,topPicks:a}),(0,_t.jsx)("div",{style:{width:1,height:"100%",backgroundColor:"var(--default-border-color)",margin:"0 auto"}}),(0,_t.jsxs)(Hd,{open:s.openPopup===t,onOpenChange:c=>{l({openPopup:c?t:null})},children:[(0,_t.jsx)(IC,{color:e,label:r,type:t}),s.openPopup===t&&(0,_t.jsx)(kC,{type:t,color:e,onChange:o,label:r,elements:n,palette:i,updateData:l})]})]})});h();var kn=v(H(),1);h();var Sn=v(H(),1);var Hy=v(hr(),1);var $y=v(k(),1),Vd=({children:t,left:e,top:o,onCloseRequest:r,fitInViewport:n=!1,offsetLeft:i=0,offsetTop:a=0,viewportWidth:l=window.innerWidth,viewportHeight:s=window.innerHeight})=>{let c=(0,Sn.useRef)(null);(0,Sn.useEffect)(()=>{let m=c.current;if(!m)return;m.contains(document.activeElement)||m.focus();let p=f=>{if(f.key===T.TAB){let b=pl(m),{activeElement:x}=document,y=b.findIndex(S=>S===x);x===m?(f.shiftKey?b[b.length-1]?.focus():b[0].focus(),f.preventDefault(),f.stopImmediatePropagation()):y===0&&f.shiftKey?(b[b.length-1]?.focus(),f.preventDefault(),f.stopImmediatePropagation()):y===b.length-1&&!f.shiftKey&&(b[0]?.focus(),f.preventDefault(),f.stopImmediatePropagation())}};return m.addEventListener("keydown",p),()=>m.removeEventListener("keydown",p)},[]);let d=(0,Sn.useRef)(null);return(0,Sn.useLayoutEffect)(()=>{if(n&&c.current&&o!=null&&e!=null){let m=c.current,{width:p,height:f}=m.getBoundingClientRect();if(d.current?.top===o&&d.current?.left===e)return;d.current={top:o,left:e},p>=l?(m.style.width=`${l}px`,m.style.left="0px",m.style.overflowX="scroll"):e+p-i>l?m.style.left=`${l-p-10}px`:m.style.left=`${e}px`,f>=s?(m.style.height=`${s-20}px`,m.style.top="10px",m.style.overflowY="scroll"):o+f-a>s?m.style.top=`${s-f}px`:m.style.top=`${o}px`}},[o,e,n,l,s,i,a]),(0,Sn.useEffect)(()=>{if(r){let m=p=>{c.current?.contains(p.target)||(0,Hy.unstable_batchedUpdates)(()=>r(p))};return document.addEventListener("pointerdown",m,!1),()=>document.removeEventListener("pointerdown",m,!1)}},[r]),(0,$y.jsx)("div",{className:"popover",ref:c,tabIndex:-1,children:t})};var oo=v(k(),1);function MC({options:t,value:e,label:o,onChange:r,onClose:n}){let i=kn.default.useRef(),a=kn.default.useRef(),l=kn.default.useRef(null);return kn.default.useEffect(()=>{a.current?a.current.focus():l.current&&l.current.focus()},[]),(0,oo.jsx)("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":o,onKeyDown:c=>{let d=t.find(m=>m.keyBinding===c.key.toLowerCase());if(!(c.metaKey||c.altKey||c.ctrlKey)&&d){let m=t.indexOf(d);l.current.children[m].focus(),c.preventDefault()}else if(c.key===T.TAB)setTimeout(()=>{let m=a.current,p=document.activeElement;m!==p&&n()},0);else if($i(c.key)){let{activeElement:m}=document,p=Wr().rtl,f=Array.prototype.indexOf.call(l.current.children,m);if(f!==-1){let b=t.length,x=f;switch(c.key){case(p?T.ARROW_LEFT:T.ARROW_RIGHT):case T.ARROW_DOWN:{x=(f+1)%b;break}case(p?T.ARROW_RIGHT:T.ARROW_LEFT):case T.ARROW_UP:{x=(b+f-1)%b;break}}l.current.children[x].focus()}c.preventDefault()}else(c.key===T.ESCAPE||c.key===T.ENTER)&&(c.preventDefault(),n());c.nativeEvent.stopImmediatePropagation(),c.stopPropagation()},children:(0,oo.jsx)("div",{className:"picker-content",ref:l,children:t.map((c,d)=>(0,oo.jsxs)("button",{className:z("picker-option",{active:e===c.value}),onClick:m=>{m.currentTarget.focus(),r(c.value)},title:`${c.text} ${c.keyBinding&&`\u2014 ${c.keyBinding.toUpperCase()}`}`,"aria-label":c.text||"none","aria-keyshortcuts":c.keyBinding||void 0,ref:m=>{m&&d===0&&(i.current=m),m&&c.value===e&&(a.current=m)},onFocus:()=>{r(c.value)},children:[c.icon,c.keyBinding&&(0,oo.jsx)("span",{className:"picker-keybinding",children:c.keyBinding})]},c.text))})})}function $f({value:t,label:e,options:o,onChange:r,group:n=""}){let[i,a]=kn.default.useState(!1),l=kn.default.useRef(null),s=Wr().rtl;return(0,oo.jsxs)("div",{children:[(0,oo.jsx)("button",{name:n,className:i?"active":"","aria-label":e,onClick:()=>a(!i),ref:l,children:o.find(c=>c.value===t)?.icon}),(0,oo.jsx)(kn.default.Suspense,{fallback:"",children:i?(0,oo.jsxs)(oo.Fragment,{children:[(0,oo.jsx)(Vd,{onCloseRequest:c=>c.target!==l.current&&a(!1),...s?{right:5.5}:{left:-5.5},children:(0,oo.jsx)(MC,{options:o.filter(c=>c.showInPicker!==!1),value:t,label:e,onChange:r,onClose:()=>{a(!1),l.current?.focus()}})}),(0,oo.jsx)("div",{className:"picker-triangle"})]}):null})]})}var ae=v(k(),1),Wy=.1,ho=(t,e,o,r=!1)=>{let n=xe(ye(t,e,{includeBoundTextElement:r}));return t.map(i=>n.get(i.id)||i.id===e.editingElement?.id?o(i):i)},co=function(t,e,o,r,n){let i=e.editingElement,a=ve(t),l=null;return i&&(l=o(i)),l||(Fe(a,e)?l=A0(r===!0?a:a.filter(c=>r(c)),e,o)??(typeof n=="function"?n(!0):n):l=typeof n=="function"?n(!1):n),l},_C=(t,e)=>bt(e)?e:oe(e,{x:t.textAlign==="left"?t.x:t.x+(t.width-e.width)/(t.textAlign==="center"?2:1),y:t.y+(t.height-e.height)/2},!1),Uf=(t,e,o,r,n)=>{let i=new Set;return{elements:ho(t,e,a=>{if(le(a)){let l=r(a);i.add(l);let s=me(a,{fontSize:l});return $t(s,o.scene.getContainerElement(a),o.scene.getNonDeletedElementsMap()),s=_C(a,s),s}return a},!0),appState:{...e,currentItemFontSize:i.size===1?[...i][0]:n??e.currentItemFontSize},commitToHistory:!0}},AC=$({name:"changeStrokeColor",label:"labels.stroke",trackEvent:!1,perform:(t,e,o)=>({...o.currentItemStrokeColor&&{elements:ho(t,e,r=>yl(r.type)?me(r,{strokeColor:o.currentItemStrokeColor}):r,!0)},appState:{...e,...o},commitToHistory:!!o.currentItemStrokeColor}),PanelComponent:({elements:t,appState:e,updateData:o,appProps:r})=>(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)("h3",{"aria-hidden":"true",children:g("labels.stroke")}),(0,ae.jsx)(rs,{topPicks:Gs,palette:qg,type:"elementStroke",label:g("labels.stroke"),color:co(t,e,n=>n.strokeColor,!0,e.currentItemStrokeColor),onChange:n=>o({currentItemStrokeColor:n}),elements:t,appState:e,updateData:o})]})}),LC=$({name:"changeBackgroundColor",label:"labels.changeBackground",trackEvent:!1,perform:(t,e,o)=>({...o.currentItemBackgroundColor&&{elements:ho(t,e,r=>me(r,{backgroundColor:o.currentItemBackgroundColor}))},appState:{...e,...o},commitToHistory:!!o.currentItemBackgroundColor}),PanelComponent:({elements:t,appState:e,updateData:o,appProps:r})=>(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)("h3",{"aria-hidden":"true",children:g("labels.background")}),(0,ae.jsx)(rs,{topPicks:Vs,palette:Jg,type:"elementBackground",label:g("labels.background"),color:co(t,e,n=>n.backgroundColor,!0,e.currentItemBackgroundColor),onChange:n=>o({currentItemBackgroundColor:n}),elements:t,appState:e,updateData:o})]})}),PC=$({name:"changeFillStyle",label:"labels.fill",trackEvent:!1,perform:(t,e,o,r)=>(ge("element","changeFillStyle",`${o} (${r.device.editor.isMobile?"mobile":"desktop"})`),{elements:ho(t,e,n=>me(n,{fillStyle:o})),appState:{...e,currentItemFillStyle:o},commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o})=>{let r=ye(t,e),n=r.length>0&&r.every(i=>i.fillStyle==="zigzag");return(0,ae.jsxs)("fieldset",{children:[(0,ae.jsx)("legend",{children:g("labels.fill")}),(0,ae.jsx)(gr,{type:"button",options:[{value:"hachure",text:`${n?g("labels.zigzag"):g("labels.hachure")} (${N("Alt-Click")})`,icon:n?kx:Ix,active:n?!0:void 0,testId:"fill-hachure"},{value:"cross-hatch",text:g("labels.crossHatch"),icon:Mx,testId:"fill-cross-hatch"},{value:"solid",text:g("labels.solid"),icon:_x,testId:"fill-solid"}],value:co(t,e,i=>i.fillStyle,i=>i.hasOwnProperty("fillStyle"),i=>i?null:e.currentItemFillStyle),onClick:(i,a)=>{let l=a.altKey&&i==="hachure"&&r.every(s=>s.fillStyle==="hachure")?"zigzag":i;o(l)}})]})}}),RC=$({name:"changeStrokeWidth",label:"labels.strokeWidth",trackEvent:!1,perform:(t,e,o)=>({elements:ho(t,e,r=>me(r,{strokeWidth:o})),appState:{...e,currentItemStrokeWidth:o},commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o})=>(0,ae.jsxs)("fieldset",{children:[(0,ae.jsx)("legend",{children:g("labels.strokeWidth")}),(0,ae.jsx)(gr,{group:"stroke-width",options:[{value:tc.thin,text:g("labels.thin"),icon:Wp,testId:"strokeWidth-thin"},{value:tc.bold,text:g("labels.bold"),icon:Ax,testId:"strokeWidth-bold"},{value:tc.extraBold,text:g("labels.extraBold"),icon:Lx,testId:"strokeWidth-extraBold"}],value:co(t,e,r=>r.strokeWidth,r=>r.hasOwnProperty("strokeWidth"),r=>r?null:e.currentItemStrokeWidth),onChange:r=>o(r)})]})}),DC=$({name:"changeSloppiness",label:"labels.sloppiness",trackEvent:!1,perform:(t,e,o)=>({elements:ho(t,e,r=>me(r,{seed:K1(),roughness:o})),appState:{...e,currentItemRoughness:o},commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o})=>(0,ae.jsxs)("fieldset",{children:[(0,ae.jsx)("legend",{children:g("labels.sloppiness")}),(0,ae.jsx)(gr,{group:"sloppiness",options:[{value:0,text:g("labels.architect"),icon:Dx},{value:1,text:g("labels.artist"),icon:Nx},{value:2,text:g("labels.cartoonist"),icon:Ox}],value:co(t,e,r=>r.roughness,r=>r.hasOwnProperty("roughness"),r=>r?null:e.currentItemRoughness),onChange:r=>o(r)})]})}),KR=$({name:"changeStrokeStyle",label:"labels.strokeStyle",trackEvent:!1,perform:(t,e,o)=>({elements:ho(t,e,r=>me(r,{strokeStyle:o})),appState:{...e,currentItemStrokeStyle:o},commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o})=>(0,ae.jsxs)("fieldset",{children:[(0,ae.jsx)("legend",{children:g("labels.strokeStyle")}),(0,ae.jsx)(gr,{group:"strokeStyle",options:[{value:"solid",text:g("labels.strokeStyle_solid"),icon:Wp},{value:"dashed",text:g("labels.strokeStyle_dashed"),icon:Px},{value:"dotted",text:g("labels.strokeStyle_dotted"),icon:Rx}],value:co(t,e,r=>r.strokeStyle,r=>r.hasOwnProperty("strokeStyle"),r=>r?null:e.currentItemStrokeStyle),onChange:r=>o(r)})]})}),NC=$({name:"changeOpacity",label:"labels.opacity",trackEvent:!1,perform:(t,e,o)=>({elements:ho(t,e,r=>me(r,{opacity:o}),!0),appState:{...e,currentItemOpacity:o},commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o})=>(0,ae.jsxs)("label",{className:"control-label",children:[g("labels.opacity"),(0,ae.jsx)("input",{type:"range",min:"0",max:"100",step:"10",onChange:r=>o(+r.target.value),value:co(t,e,r=>r.opacity,!0,e.currentItemOpacity)??void 0})]})}),OC=$({name:"changeFontSize",label:"labels.fontSize",trackEvent:!1,perform:(t,e,o,r)=>Uf(t,e,r,()=>o,o),PanelComponent:({elements:t,appState:e,updateData:o,app:r})=>(0,ae.jsxs)("fieldset",{children:[(0,ae.jsx)("legend",{children:g("labels.fontSize")}),(0,ae.jsx)(gr,{group:"font-size",options:[{value:16,text:g("labels.small"),icon:Yx,testId:"fontSize-small"},{value:20,text:g("labels.medium"),icon:Zx,testId:"fontSize-medium"},{value:28,text:g("labels.large"),icon:jx,testId:"fontSize-large"},{value:36,text:g("labels.veryLarge"),icon:Xx,testId:"fontSize-veryLarge"}],value:co(t,e,n=>{if(le(n))return n.fontSize;let i=st(n,r.scene.getNonDeletedElementsMap());return i?i.fontSize:null},n=>le(n)||st(n,r.scene.getNonDeletedElementsMap())!==null,n=>n?null:e.currentItemFontSize||_r),onChange:n=>o(n)})]})}),Wf=$({name:"decreaseFontSize",label:"labels.decreaseFontSize",icon:Vp,trackEvent:!1,perform:(t,e,o,r)=>Uf(t,e,r,n=>Math.round(1/(1+Wy)*n.fontSize)),keyTest:t=>t[T.CTRL_OR_CMD]&&t.shiftKey&&(t.key===T.CHEVRON_LEFT||t.key===T.COMMA)}),Gf=$({name:"increaseFontSize",label:"labels.increaseFontSize",icon:Vp,trackEvent:!1,perform:(t,e,o,r)=>Uf(t,e,r,n=>Math.round(n.fontSize*(1+Wy))),keyTest:t=>t[T.CTRL_OR_CMD]&&t.shiftKey&&(t.key===T.CHEVRON_RIGHT||t.key===T.PERIOD)}),FC=$({name:"changeFontFamily",label:"labels.fontFamily",trackEvent:!1,perform:(t,e,o,r)=>({elements:ho(t,e,n=>{if(le(n)){let i=me(n,{fontFamily:o,lineHeight:Nr(o)});return $t(i,r.scene.getContainerElement(n),r.scene.getNonDeletedElementsMap()),i}return n},!0),appState:{...e,currentItemFontFamily:o},commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o,app:r})=>{let n=[{value:ll.Virgil,text:g("labels.handDrawn"),icon:aa,testId:"font-family-virgil"},{value:ll.Helvetica,text:g("labels.normal"),icon:qx,testId:"font-family-normal"},{value:ll.Cascadia,text:g("labels.code"),icon:Jx,testId:"font-family-code"}];return(0,ae.jsxs)("fieldset",{children:[(0,ae.jsx)("legend",{children:g("labels.fontFamily")}),(0,ae.jsx)(gr,{group:"font-family",options:n,value:co(t,e,i=>{if(le(i))return i.fontFamily;let a=st(i,r.scene.getNonDeletedElementsMap());return a?a.fontFamily:null},i=>le(i)||st(i,r.scene.getNonDeletedElementsMap())!==null,i=>i?null:e.currentItemFontFamily||Ri),onChange:i=>o(i)})]})}}),BC=$({name:"changeTextAlign",label:"Change text alignment",trackEvent:!1,perform:(t,e,o,r)=>({elements:ho(t,e,n=>{if(le(n)){let i=me(n,{textAlign:o});return $t(i,r.scene.getContainerElement(n),r.scene.getNonDeletedElementsMap()),i}return n},!0),appState:{...e,currentItemTextAlign:o},commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o,app:r})=>{let n=r.scene.getNonDeletedElementsMap();return(0,ae.jsxs)("fieldset",{children:[(0,ae.jsx)("legend",{children:g("labels.textAlign")}),(0,ae.jsx)(gr,{group:"text-align",options:[{value:"left",text:g("labels.left"),icon:Qx,testId:"align-left"},{value:"center",text:g("labels.center"),icon:ev,testId:"align-horizontal-center"},{value:"right",text:g("labels.right"),icon:tv,testId:"align-right"}],value:co(t,e,i=>{if(le(i))return i.textAlign;let a=st(i,n);return a?a.textAlign:null},i=>le(i)||st(i,n)!==null,i=>i?null:e.currentItemTextAlign),onChange:i=>o(i)})]})}}),zC=$({name:"changeVerticalAlign",label:"Change vertical alignment",trackEvent:{category:"element"},perform:(t,e,o,r)=>({elements:ho(t,e,n=>{if(le(n)){let i=me(n,{verticalAlign:o});return $t(i,r.scene.getContainerElement(n),r.scene.getNonDeletedElementsMap()),i}return n},!0),appState:{...e},commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o,app:r})=>(0,ae.jsx)("fieldset",{children:(0,ae.jsx)(gr,{group:"text-align",options:[{value:yo.TOP,text:g("labels.alignTop"),icon:(0,ae.jsx)(ov,{theme:e.theme}),testId:"align-top"},{value:yo.MIDDLE,text:g("labels.centerVertically"),icon:(0,ae.jsx)(nv,{theme:e.theme}),testId:"align-middle"},{value:yo.BOTTOM,text:g("labels.alignBottom"),icon:(0,ae.jsx)(rv,{theme:e.theme}),testId:"align-bottom"}],value:co(t,e,n=>{if(le(n)&&n.containerId)return n.verticalAlign;let i=st(n,r.scene.getNonDeletedElementsMap());return i?i.verticalAlign:null},n=>le(n)||st(n,r.scene.getNonDeletedElementsMap())!==null,n=>n?null:yo.MIDDLE),onChange:n=>o(n)})})}),YR=$({name:"changeRoundness",label:"Change edge roundness",trackEvent:!1,perform:(t,e,o)=>({elements:ho(t,e,r=>me(r,{roundness:o==="round"?{type:Fi(r.type)?Eo.ADAPTIVE_RADIUS:Eo.PROPORTIONAL_RADIUS}:null})),appState:{...e,currentItemRoundness:o},commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o})=>{let n=ta(ve(t),e).some(i=>i.roundness?.type===Eo.LEGACY);return(0,ae.jsxs)("fieldset",{children:[(0,ae.jsx)("legend",{children:g("labels.edges")}),(0,ae.jsx)(gr,{group:"edges",options:[{value:"sharp",text:g("labels.sharp"),icon:Fx},{value:"round",text:g("labels.round"),icon:Bx}],value:co(t,e,i=>n?null:i.roundness?"round":"sharp",i=>i.hasOwnProperty("roundness"),i=>i?null:e.currentItemRoundness),onChange:i=>o(i)})]})}}),Uy=t=>[{value:null,text:g("labels.arrowhead_none"),keyBinding:"q",icon:zx},{value:"arrow",text:g("labels.arrowhead_arrow"),keyBinding:"w",icon:(0,ae.jsx)(Hx,{flip:t})},{value:"bar",text:g("labels.arrowhead_bar"),keyBinding:"e",icon:(0,ae.jsx)(Ux,{flip:t})},{value:"dot",text:g("labels.arrowhead_circle"),keyBinding:null,icon:(0,ae.jsx)(Gp,{flip:t}),showInPicker:!1},{value:"circle",text:g("labels.arrowhead_circle"),keyBinding:"r",icon:(0,ae.jsx)(Gp,{flip:t}),showInPicker:!1},{value:"circle_outline",text:g("labels.arrowhead_circle_outline"),keyBinding:null,icon:(0,ae.jsx)($x,{flip:t}),showInPicker:!1},{value:"triangle",text:g("labels.arrowhead_triangle"),icon:(0,ae.jsx)(Wx,{flip:t}),keyBinding:"t"},{value:"triangle_outline",text:g("labels.arrowhead_triangle_outline"),icon:(0,ae.jsx)(Gx,{flip:t}),keyBinding:null,showInPicker:!1},{value:"diamond",text:g("labels.arrowhead_diamond"),icon:(0,ae.jsx)(Vx,{flip:t}),keyBinding:null,showInPicker:!1},{value:"diamond_outline",text:g("labels.arrowhead_diamond_outline"),icon:(0,ae.jsx)(Kx,{flip:t}),keyBinding:null,showInPicker:!1}],ZR=$({name:"changeArrowhead",label:"Change arrowheads",trackEvent:!1,perform:(t,e,o)=>({elements:ho(t,e,r=>{if(Ne(r)){let{position:n,type:i}=o;if(n==="start")return me(r,{startArrowhead:i});if(n==="end")return me(r,{endArrowhead:i})}return r}),appState:{...e,[o.position==="start"?"currentItemStartArrowhead":"currentItemEndArrowhead"]:o.type},commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o})=>{let r=Wr().rtl;return(0,ae.jsxs)("fieldset",{children:[(0,ae.jsx)("legend",{children:g("labels.arrowheads")}),(0,ae.jsxs)("div",{className:"iconSelectList buttonList",children:[(0,ae.jsx)($f,{label:"arrowhead_start",options:Uy(!r),value:co(t,e,n=>Ne(n)&&Hi(n.type)?n.startArrowhead:e.currentItemStartArrowhead,!0,e.currentItemStartArrowhead),onChange:n=>o({position:"start",type:n})}),(0,ae.jsx)($f,{label:"arrowhead_end",group:"arrowheads",options:Uy(!!r),value:co(t,e,n=>Ne(n)&&Hi(n.type)?n.endArrowhead:e.currentItemEndArrowhead,!0,e.currentItemEndArrowhead),onChange:n=>o({position:"end",type:n})})]})]})}});h();h();var Gy=v(H(),1),Vy=v(k(),1),Aa=()=>{let t=document.querySelector(".excalidraw-tooltip");if(t)return t;let e=document.createElement("div");return document.body.appendChild(e),e.classList.add("excalidraw-tooltip"),e},Vf=(t,e,o="bottom")=>{let r=t.getBoundingClientRect(),n=window.innerWidth,i=window.innerHeight,a=5,l=e.left+e.width/2-r.width/2;l<0?l=a:l+r.width>=n&&(l=n-r.width-a);let s;o==="bottom"?(s=e.top+e.height+a,s+r.height>=i&&(s=e.top-r.height-a)):(s=e.top-r.height-a,s<0&&(s=e.top+e.height+a)),Object.assign(t.style,{top:`${s}px`,left:`${l}px`})},HC=(t,e,o,r)=>{e.classList.add("excalidraw-tooltip--visible"),e.style.minWidth=r?"50ch":"10ch",e.style.maxWidth=r?"50ch":"15ch",e.textContent=o;let n=t.getBoundingClientRect();Vf(e,n)},go=({children:t,label:e,long:o=!1,style:r,disabled:n})=>((0,Gy.useEffect)(()=>()=>Aa().classList.remove("excalidraw-tooltip--visible"),[]),n?null:(0,Vy.jsx)("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:i=>HC(i.currentTarget,Aa(),e,o),onPointerLeave:()=>Aa().classList.remove("excalidraw-tooltip--visible"),style:r,children:t}));var di=v(k(),1),$C=$({name:"changeViewBackgroundColor",label:"labels.canvasBackground",paletteName:"Change canvas background color",trackEvent:!1,predicate:(t,e,o,r)=>!!r.props.UIOptions.canvasActions.changeViewBackgroundColor&&!e.viewModeEnabled,perform:(t,e,o)=>({appState:{...e,...o},commitToHistory:!!o.viewBackgroundColor}),PanelComponent:({elements:t,appState:e,updateData:o,appProps:r})=>(0,di.jsx)(rs,{palette:null,topPicks:Ks,label:g("labels.canvasBackground"),type:"canvasBackground",color:e.viewBackgroundColor,onChange:n=>o({viewBackgroundColor:n}),"data-testid":"canvas-background-picker",elements:t,appState:e,updateData:o})}),Zr=$({name:"clearCanvas",label:"labels.clearCanvas",paletteName:"Clear canvas",icon:Jo,trackEvent:{category:"canvas"},predicate:(t,e,o,r)=>!!r.props.UIOptions.canvasActions.clearCanvas&&!e.viewModeEnabled,perform:(t,e,o,r)=>(r.imageCache.clear(),{elements:t.map(n=>me(n,{isDeleted:!0})),appState:{...Vi(),files:{},theme:e.theme,penMode:e.penMode,penDetected:e.penDetected,exportBackground:e.exportBackground,exportEmbedScene:e.exportEmbedScene,gridSize:e.gridSize,showStats:e.showStats,pasteDialog:e.pasteDialog,activeTool:e.activeTool.type==="image"?{...e.activeTool,type:"selection"}:e.activeTool},commitToHistory:!0})}),Kd=$({name:"zoomIn",label:"buttons.zoomIn",viewMode:!0,icon:kp,trackEvent:{category:"canvas"},perform:(t,e,o,r)=>({appState:{...e,...$r({viewportX:e.width/2+e.offsetLeft,viewportY:e.height/2+e.offsetTop,nextZoom:Hr(e.zoom.value+Gn)},e),userToFollow:null},commitToHistory:!1}),PanelComponent:({updateData:t})=>(0,di.jsx)(se,{type:"button",className:"zoom-in-button zoom-button",icon:kp,title:`${g("buttons.zoomIn")} \u2014 ${N("CtrlOrCmd++")}`,"aria-label":g("buttons.zoomIn"),onClick:()=>{t(null)}}),keyTest:t=>(t.code===pe.EQUAL||t.code===pe.NUM_ADD)&&(t[T.CTRL_OR_CMD]||t.shiftKey)}),Yd=$({name:"zoomOut",label:"buttons.zoomOut",icon:Ip,viewMode:!0,trackEvent:{category:"canvas"},perform:(t,e,o,r)=>({appState:{...e,...$r({viewportX:e.width/2+e.offsetLeft,viewportY:e.height/2+e.offsetTop,nextZoom:Hr(e.zoom.value-Gn)},e),userToFollow:null},commitToHistory:!1}),PanelComponent:({updateData:t})=>(0,di.jsx)(se,{type:"button",className:"zoom-out-button zoom-button",icon:Ip,title:`${g("buttons.zoomOut")} \u2014 ${N("CtrlOrCmd+-")}`,"aria-label":g("buttons.zoomOut"),onClick:()=>{t(null)}}),keyTest:t=>(t.code===pe.MINUS||t.code===pe.NUM_SUBTRACT)&&(t[T.CTRL_OR_CMD]||t.shiftKey)}),UC=$({name:"resetZoom",label:"buttons.resetZoom",icon:mx,viewMode:!0,trackEvent:{category:"canvas"},perform:(t,e,o,r)=>({appState:{...e,...$r({viewportX:e.width/2+e.offsetLeft,viewportY:e.height/2+e.offsetTop,nextZoom:Hr(1)},e),userToFollow:null},commitToHistory:!1}),PanelComponent:({updateData:t,appState:e})=>(0,di.jsx)(go,{label:g("buttons.resetZoom"),style:{height:"100%"},children:(0,di.jsxs)(se,{type:"button",className:"reset-zoom-button zoom-button",title:g("buttons.resetZoom"),"aria-label":g("buttons.resetZoom"),onClick:()=>{t(null)},children:[(e.zoom.value*100).toFixed(0),"%"]})}),keyTest:t=>(t.code===pe.ZERO||t.code===pe.NUM_ZERO)&&(t[T.CTRL_OR_CMD]||t.shiftKey)}),WC=(t,e)=>{let[o,r,n,i]=t,a=n-o,l=e.width/a,s=i-r,c=e.height/s,d=Math.min(l,c),m=Math.floor(d/Gn)*Gn;return Math.min(Math.max(m,f1),1)},Ky=({bounds:t,appState:e,fitToViewport:o=!1,viewportZoomFactor:r=.7})=>{let[n,i,a,l]=t,s=(n+a)/2,c=(i+l)/2,d,m,p;if(o){let f=a-n,b=l-i;d=Math.min(e.width/f,e.height/b)*Math.min(1,Math.max(r,.1)),d=Math.min(Math.max(d,.1),30);let x=e.width;if(e.openSidebar){let S=document.querySelector(".sidebar")?.offsetWidth??0;x=document.documentElement.getAttribute("dir")==="rtl"?e.width+S:e.width-S}m=x/2*(1/d)-s,p=e.height/2*(1/d)-c}else{d=WC(t,{width:e.width,height:e.height});let f=L0({scenePoint:{x:s,y:c},viewportDimensions:{width:e.width,height:e.height},zoom:{value:d}});m=f.scrollX,p=f.scrollY}return{appState:{...e,scrollX:m,scrollY:p,zoom:{value:d}},commitToHistory:!1}},ns=({targetElements:t,appState:e,fitToViewport:o,viewportZoomFactor:r})=>{let n=Ye(ve(t));return Ky({bounds:n,appState:e,fitToViewport:o,viewportZoomFactor:r})},yD=$({name:"zoomToFitSelectionInViewport",label:"labels.zoomToFitViewport",icon:bd,trackEvent:{category:"canvas"},perform:(t,e,o,r)=>{let n=r.scene.getSelectedElements(e);return ns({targetElements:n.length?n:t,appState:{...e,userToFollow:null},fitToViewport:!1})},keyTest:t=>t.code===pe.TWO&&t.shiftKey&&!t.altKey&&!t[T.CTRL_OR_CMD]}),ED=$({name:"zoomToFitSelection",label:"helpDialog.zoomToSelection",icon:bd,trackEvent:{category:"canvas"},perform:(t,e,o,r)=>{let n=r.scene.getSelectedElements(e);return ns({targetElements:n.length?n:t,appState:{...e,userToFollow:null},fitToViewport:!0})},keyTest:t=>t.code===pe.THREE&&t.shiftKey&&!t.altKey&&!t[T.CTRL_OR_CMD]}),GC=$({name:"zoomToFit",label:"helpDialog.zoomToFit",icon:bd,viewMode:!0,trackEvent:{category:"canvas"},perform:(t,e)=>ns({targetElements:t,appState:{...e,userToFollow:null},fitToViewport:!1}),keyTest:t=>t.code===pe.ONE&&t.shiftKey&&!t.altKey&&!t[T.CTRL_OR_CMD]}),ci=$({name:"toggleTheme",label:(t,e)=>e.theme===he.DARK?"buttons.lightMode":"buttons.darkMode",keywords:["toggle","dark","light","mode","theme"],icon:t=>t.theme===he.LIGHT?Hl:$l,viewMode:!0,trackEvent:{category:"canvas"},perform:(t,e,o)=>({appState:{...e,theme:o||(e.theme===he.LIGHT?he.DARK:he.LIGHT)},commitToHistory:!1}),keyTest:t=>t.altKey&&t.shiftKey&&t.code===pe.D,predicate:(t,e,o,r)=>!!r.props.UIOptions.canvasActions.toggleTheme}),wD=$({name:"toggleEraserTool",label:"toolBar.eraser",trackEvent:{category:"toolbar"},perform:(t,e)=>{let o;return ko(e)?o=nt(e,{...e.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):o=nt(e,{type:"eraser",lastActiveToolBeforeEraser:e.activeTool}),{appState:{...e,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:o},commitToHistory:!0}},keyTest:t=>t.key===T.E}),Yy=$({name:"toggleHandTool",label:"toolBar.hand",paletteName:"Toggle hand tool",trackEvent:{category:"toolbar"},icon:dd,viewMode:!1,perform:(t,e,o,r)=>{let n;return Or(e)?n=nt(e,{...e.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):(n=nt(e,{type:"hand",lastActiveToolBeforeEraser:e.activeTool}),Oe(r.interactiveCanvas,De.GRAB)),{appState:{...e,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n},commitToHistory:!0}},keyTest:t=>!t.altKey&&!t[T.CTRL_OR_CMD]&&t.key===T.H});h();var Zy=v(k(),1),Ro=$({name:"finalize",label:"",trackEvent:!1,perform:(t,e,o,r)=>{let{interactiveCanvas:n,focusContainer:i,scene:a}=r,l=a.getNonDeletedElementsMap();if(e.editingLinearElement){let{elementId:p,startBindingElement:f,endBindingElement:b}=e.editingLinearElement,x=ue.getElement(p,l);if(x)return Lr(x)&&fc(x,f,b,l),{elements:x.points.length<2||Qn(x)?t.filter(y=>y.id!==x.id):void 0,appState:{...e,cursorButton:"up",editingLinearElement:null},commitToHistory:!0}}let s=t,c=e.pendingImageElementId&&a.getElement(e.pendingImageElementId);c&&oe(c,{isDeleted:!0},!1),window.document.activeElement instanceof HTMLElement&&i();let d=e.multiElement?e.multiElement:e.editingElement?.type==="freedraw"?e.editingElement:null;if(d){if(d.type!=="freedraw"&&e.lastPointerDownWith!=="touch"){let{points:f,lastCommittedPoint:b}=d;(!b||f[f.length-1]!==b)&&oe(d,{points:d.points.slice(0,-1)})}Qn(d)&&(s=s.filter(f=>f.id!==d.id));let p=bl(d.points,e.zoom.value);if((d.type==="line"||d.type==="freedraw")&&p){let f=d.points,b=f[0];oe(d,{points:f.map((x,y)=>y===f.length-1?[b[0],b[1]]:x)})}if(Lr(d)&&!p&&d.points.length>1){let[f,b]=ue.getPointAtIndexGlobalCoordinates(d,-1,xe(t));wl(d,e,{x:f,y:b},r)}}(!e.activeTool.locked&&e.activeTool.type!=="freedraw"||!d)&&Io(n);let m;return e.activeTool.type==="eraser"?m=nt(e,{...e.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):m=nt(e,{type:"selection"}),{elements:s,appState:{...e,cursorButton:"up",activeTool:(e.activeTool.locked||e.activeTool.type==="freedraw")&&d?e.activeTool:m,activeEmbeddable:null,draggingElement:null,multiElement:null,editingElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:d&&!e.activeTool.locked&&e.activeTool.type!=="freedraw"?{...e.selectedElementIds,[d.id]:!0}:e.selectedElementIds,selectedLinearElement:d&&Ne(d)?new ue(d):e.selectedLinearElement,pendingImageElementId:null},commitToHistory:e.activeTool.type==="freedraw"}},keyTest:(t,e)=>t.key===T.ESCAPE&&(e.editingLinearElement!==null||!e.draggingElement&&e.multiElement===null)||(t.key===T.ESCAPE||t.key===T.ENTER)&&e.multiElement!==null,PanelComponent:({appState:t,updateData:e,data:o})=>(0,Zy.jsx)(se,{type:"button",icon:Ex,title:g("buttons.done"),"aria-label":g("buttons.done"),onClick:e,visible:t.multiElement!=null,size:o?.size||"medium"})});h();h();var jy=v(H(),1);var is=v(k(),1),Xy=t=>{let{id:e}=Mt(),[o,r]=(0,jy.useState)(t.value),n=a=>{t.ignoreFocus||R1(a.target);let l=a.target.value;l!==t.value&&t.onChange(l)},i=a=>{if(a.key===T.ENTER){if(a.preventDefault(),a.nativeEvent.isComposing||a.keyCode===229)return;a.currentTarget.blur()}};return(0,is.jsxs)("div",{className:"ProjectName",children:[(0,is.jsx)("label",{className:"ProjectName-label",htmlFor:"filename",children:`${t.label}:`}),(0,is.jsx)("input",{type:"text",className:"TextInput",onBlur:n,onKeyDown:i,id:`${e}-filename`,value:o,onChange:a=>r(a.target.value)})]})};h();var La=v(k(),1),Jy=t=>{let e=t.title||(t.value===he.DARK?g("buttons.lightMode"):g("buttons.darkMode"));return(0,La.jsx)(se,{type:"icon",icon:t.value===he.LIGHT?qy.MOON:qy.SUN,title:e,"aria-label":e,onClick:()=>t.onChange(t.value===he.DARK?he.LIGHT:he.DARK),"data-testid":"toggle-dark-mode"})},qy={SUN:(0,La.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,La.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,La.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,La.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"})})};h();var mi=(t,{selectedElementIds:e},o)=>{t=ve(t);let r=o&&Fe(t,{selectedElementIds:e}),n=null,i=r?ye(t,{selectedElementIds:e},{includeBoundTextElement:!0}):t;return r&&(i.length===1&&Ee(i[0])?(n=i[0],i=Uc(t,n)):i.length>1&&(i=ye(t,{selectedElementIds:e},{includeBoundTextElement:!0,includeElementsInFrames:!0}))),{exportingFrame:n,exportedElements:dr(i)}},ui=async(t,e,o,r,{exportBackground:n,exportPadding:i=an,viewBackgroundColor:a,name:l=o.name||T1,fileHandle:s=null,exportingFrame:c=null})=>{if(e.length===0)throw new Error(g("alerts.cannotExportEmptyCanvas"));if(t==="svg"||t==="clipboard-svg"){let m=Nc(e,{exportBackground:n,exportWithDarkMode:o.exportWithDarkMode,viewBackgroundColor:a,exportPadding:i,exportScale:o.exportScale,exportEmbedScene:o.exportEmbedScene&&t==="svg"},r,{exportingFrame:c});if(t==="svg")return Ju(m.then(p=>new Blob([p.outerHTML],{type:Pt.svg})),{description:"Export to SVG",name:l,extension:o.exportEmbedScene?"excalidraw.svg":"svg",fileHandle:s});if(t==="clipboard-svg"){let p=await m.then(f=>f.outerHTML);try{await qi(p)}catch{throw new Error(g("errors.copyToSystemClipboardFailed"))}return}}let d=o0(e,o,r,{exportBackground:n,viewBackgroundColor:a,exportPadding:i,exportingFrame:c});if(t==="png"){let m=zr(d);return o.exportEmbedScene&&(m=m.then(p=>import("./excalidraw-assets/image-BSC5ABC2.js").then(({encodePngMetadata:f})=>f({blob:p,metadata:np(e,o,r,"local")})))),Ju(m,{description:"Export to PNG",name:l,extension:"png",fileHandle:s})}else if(t==="clipboard")try{let m=zr(d);await s0(m)}catch(m){throw console.warn(m),m.name==="CANVAS_POSSIBLY_TOO_BIG"?new Error(g("canvasError.canvasTooBig")):Mr&&m.name==="TypeError"?new Error(`${g("alerts.couldNotCopyToClipboard")}
|
|
42
42
|
|
|
43
43
|
${g("hints.firefox_clipboard_write")}`):new Error(g("alerts.couldNotCopyToClipboard"))}else throw new Error("Unsupported export type")};h();var Qy=async(t,e,o,r)=>{let{exportBackground:n,viewBackgroundColor:i,fileHandle:a}=e,l=Ab(a);if(!a||!Lb(l))throw new Error("fileHandle should exist and should be of type svg or png when resaving");e={...e,exportEmbedScene:!0};let{exportedElements:s,exportingFrame:c}=mi(t,e,!1);return await ui(l,s,e,o,{exportBackground:n,viewBackgroundColor:i,name:r,fileHandle:a,exportingFrame:c}),{fileHandle:a}};h();var as=v(k(),1),pi=({children:t,checked:e,onChange:o,className:r})=>(0,as.jsxs)("div",{className:z("Checkbox",r,{"is-checked":e}),onClick:n=>{o(!e,n),n.currentTarget.querySelector(".Checkbox-box").focus()},children:[(0,as.jsx)("button",{className:"Checkbox-box",role:"checkbox","aria-checked":e,children:gx}),(0,as.jsx)("div",{className:"Checkbox-label",children:t})]});var mo=v(k(),1),Kf=$({name:"changeProjectName",label:"labels.fileTitle",trackEvent:!1,perform:(t,e,o)=>({appState:{...e,name:o},commitToHistory:!1}),PanelComponent:({appState:t,updateData:e,appProps:o,data:r,app:n})=>(0,mo.jsx)(Xy,{label:g("labels.fileTitle"),value:n.getName(),onChange:i=>e(i),ignoreFocus:r?.ignoreFocus??!1})}),eE=$({name:"changeExportScale",label:"imageExportDialog.scale",trackEvent:{category:"export",action:"scale"},perform:(t,e,o)=>({appState:{...e,exportScale:o},commitToHistory:!1}),PanelComponent:({elements:t,appState:e,updateData:o})=>{let r=ve(t),i=Fe(r,e)?ye(r,e):r;return(0,mo.jsx)(mo.Fragment,{children:Qs.map(a=>{let[l,s]=r0(i,an,a),c=`${g("imageExportDialog.label.scale")} ${a}x (${l}x${s})`;return(0,mo.jsx)(se,{size:"small",type:"radio",icon:`${a}x`,name:"export-canvas-scale",title:c,"aria-label":c,id:"export-canvas-scale",checked:a===e.exportScale,onChange:()=>o(a)},a)})})}}),Yf=$({name:"changeExportBackground",label:"imageExportDialog.label.withBackground",trackEvent:{category:"export",action:"toggleBackground"},perform:(t,e,o)=>({appState:{...e,exportBackground:o},commitToHistory:!1}),PanelComponent:({appState:t,updateData:e})=>(0,mo.jsx)(pi,{checked:t.exportBackground,onChange:o=>e(o),children:g("imageExportDialog.label.withBackground")})}),Zd=$({name:"changeExportEmbedScene",label:"imageExportDialog.tooltip.embedScene",trackEvent:{category:"export",action:"embedScene"},perform:(t,e,o)=>({appState:{...e,exportEmbedScene:o},commitToHistory:!1}),PanelComponent:({appState:t,updateData:e})=>(0,mo.jsxs)(pi,{checked:t.exportEmbedScene,onChange:o=>e(o),children:[g("imageExportDialog.label.embedScene"),(0,mo.jsx)(go,{label:g("imageExportDialog.tooltip.embedScene"),long:!0,children:(0,mo.jsx)("div",{className:"excalidraw-tooltip-icon",children:wx})})]})}),jd=$({name:"saveToActiveFile",label:"buttons.save",icon:oi,trackEvent:{category:"export"},predicate:(t,e,o,r)=>!!r.props.UIOptions.canvasActions.saveToActiveFile&&!!e.fileHandle&&!e.viewModeEnabled,perform:async(t,e,o,r)=>{let n=!!e.fileHandle;try{let{fileHandle:i}=Mc(e.fileHandle)?await Qy(t,e,r.files,r.getName()):await Pc(t,e,r.files,r.getName());return{commitToHistory:!1,appState:{...e,fileHandle:i,toast:n?{message:i?.name?g("toast.fileSavedToFilename").replace("{filename}",`"${i.name}"`):g("toast.fileSaved")}:null}}}catch(i){return i?.name!=="AbortError"?console.error(i):console.warn(i),{commitToHistory:!1}}},keyTest:t=>t.key===T.S&&t[T.CTRL_OR_CMD]&&!t.shiftKey}),ls=$({name:"saveFileToDisk",label:"exportDialog.disk_title",icon:oi,viewMode:!0,trackEvent:{category:"export"},perform:async(t,e,o,r)=>{try{let{fileHandle:n}=await Pc(t,{...e,fileHandle:null},r.files,r.getName());return{commitToHistory:!1,appState:{...e,openDialog:null,fileHandle:n,toast:{message:g("toast.fileSaved")}}}}catch(n){return n?.name!=="AbortError"?console.error(n):console.warn(n),{commitToHistory:!1}}},keyTest:t=>t.key===T.S&&t.shiftKey&&t[T.CTRL_OR_CMD],PanelComponent:({updateData:t})=>(0,mo.jsx)(se,{type:"button",icon:xx,title:g("buttons.saveAs"),"aria-label":g("buttons.saveAs"),showAriaLabel:Me().editor.isMobile,hidden:!ji,onClick:()=>t(null),"data-testid":"save-as-button"})}),Pa=$({name:"loadScene",label:"buttons.load",trackEvent:{category:"export"},predicate:(t,e,o,r)=>!!r.props.UIOptions.canvasActions.loadScene&&!e.viewModeEnabled,perform:async(t,e,o,r)=>{try{let{elements:n,appState:i,files:a}=await ip(e,t);return{elements:n,appState:i,files:a,commitToHistory:!0}}catch(n){return n?.name==="AbortError"?(console.warn(n),!1):{elements:t,appState:{...e,errorMessage:n.message},files:r.files,commitToHistory:!1}}},keyTest:t=>t[T.CTRL_OR_CMD]&&t.key===T.O}),tE=$({name:"exportWithDarkMode",label:"imageExportDialog.label.darkMode",trackEvent:{category:"export",action:"toggleTheme"},perform:(t,e,o)=>({appState:{...e,exportWithDarkMode:o},commitToHistory:!1}),PanelComponent:({appState:t,updateData:e})=>(0,mo.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"-45px",marginBottom:"10px"},children:(0,mo.jsx)(Jy,{value:t.exportWithDarkMode?he.DARK:he.LIGHT,onChange:o=>{e(o===he.DARK)},title:g("imageExportDialog.label.darkMode")})})});h();var oE="{}",Zf=$({name:"copyStyles",label:"labels.copyStyles",icon:Yp,trackEvent:{category:"element"},perform:(t,e,o,r)=>{let n=[],i=t.find(a=>e.selectedElementIds[a.id]);if(n.push(i),i&&ur(i)){let a=st(i,r.scene.getNonDeletedElementsMap());n.push(a)}return i&&(oE=JSON.stringify(n)),{appState:{...e,toast:{message:g("toast.copyStyles")}},commitToHistory:!1}},keyTest:t=>t[T.CTRL_OR_CMD]&&t.altKey&&t.code===pe.C}),jf=$({name:"pasteStyles",label:"labels.pasteStyles",icon:Yp,trackEvent:{category:"element"},perform:(t,e,o,r)=>{let n=JSON.parse(oE),i=n[0],a=n[1];if(!W1(i))return{elements:t,commitToHistory:!1};let l=ye(t,e,{includeBoundTextElement:!0}),s=l.map(c=>c.id);return{elements:t.map(c=>{if(s.includes(c.id)){let d=i;if(le(c)&&c.containerId&&(d=a),!d)return c;let m=me(c,{backgroundColor:d?.backgroundColor,strokeWidth:d?.strokeWidth,strokeColor:d?.strokeColor,strokeStyle:d?.strokeStyle,fillStyle:d?.fillStyle,opacity:d?.opacity,roughness:d?.roughness,roundness:d.roundness?G1(d.roundness.type,c)?d.roundness:V1(c):null});if(le(m)){let p=d.fontSize||_r,f=d.fontFamily||Ri;m=me(m,{fontSize:p,fontFamily:f,textAlign:d.textAlign||n1,lineHeight:d.lineHeight||Nr(f)});let b=null;m.containerId&&(b=l.find(x=>le(m)&&x.id===m.containerId)||null),$t(m,b,r.scene.getNonDeletedElementsMap())}return m.type==="arrow"&&mr(d)&&(m=me(m,{startArrowhead:d.startArrowhead,endArrowhead:d.endArrowhead})),Ee(c)&&(m=me(m,{roundness:null,backgroundColor:"transparent"})),m}return c}),commitToHistory:!0}},keyTest:t=>t[T.CTRL_OR_CMD]&&t.altKey&&t.code===pe.V});h();var Xf=v(k(),1),VC=$({name:"toggleCanvasMenu",label:"buttons.menu",trackEvent:{category:"menu"},perform:(t,e)=>({appState:{...e,openMenu:e.openMenu==="canvas"?null:"canvas"},commitToHistory:!1}),PanelComponent:({appState:t,updateData:e})=>(0,Xf.jsx)(se,{type:"button",icon:id,"aria-label":g("buttons.menu"),onClick:e,selected:t.openMenu==="canvas"})}),KC=$({name:"toggleEditMenu",label:"buttons.edit",trackEvent:{category:"menu"},perform:(t,e)=>({appState:{...e,openMenu:e.openMenu==="shape"?null:"shape"},commitToHistory:!1}),PanelComponent:({elements:t,appState:e,updateData:o})=>(0,Xf.jsx)(se,{visible:Qi(e,ve(t)),type:"button",icon:vx,"aria-label":g("buttons.edit"),onClick:o,selected:e.openMenu==="shape"})}),fi=$({name:"toggleShortcuts",label:"welcomeScreen.defaults.helpHint",icon:px,viewMode:!0,trackEvent:{category:"menu",action:"toggleHelpDialog"},perform:(t,e,o,{focusContainer:r})=>(e.openDialog?.name==="help"&&r(),{appState:{...e,openDialog:e.openDialog?.name==="help"?null:{name:"help"}},commitToHistory:!1}),keyTest:t=>t.key===T.QUESTION_MARK});h();var hi=v(k(),1),YC=t=>{if(t.length>=2){let e=t[0].groupIds;for(let o of e)if(t.reduce((r,n)=>r&&Ki(n,o),!0))return!0}return!1},rE=(t,e,o)=>{let r=o.scene.getSelectedElements({selectedElementIds:e.selectedElementIds,includeBoundTextElement:!0});return r.length>=2&&!YC(r)},qf=$({name:"group",label:"labels.group",icon:t=>(0,hi.jsx)($p,{theme:t.theme}),trackEvent:{category:"element"},perform:(t,e,o,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:e.selectedElementIds,includeBoundTextElement:!0});if(n.length<2)return{appState:e,elements:t,commitToHistory:!1};let i=Fr(e);if(i.length===1){let y=i[0],S=new Set(pt(t,y).map(M=>M.id)),C=new Set(n.map(M=>M.id));if(new Set([...Array.from(S),...Array.from(C)]).size===S.size)return{appState:e,elements:t,commitToHistory:!1}}let a=[...t];new Set(n.map(y=>y.frameId)).size>1&&d0(n).forEach((S,C)=>{Hc(S,r.scene.getNonDeletedElementsMap())});let s=dn(),c=xe(n);a=a.map(y=>c.get(y.id)?me(y,{groupIds:yb(y.groupIds,s,e.editingGroupId)}):y);let d=pt(a,s),m=d[d.length-1],p=a.lastIndexOf(m),f=a.slice(p+1),x=[...a.slice(0,p).filter(y=>!Ki(y,s)),...d,...f];return po(x,xe(d)),{appState:{...e,...hb(s,{...e,selectedGroupIds:{}},ve(a))},elements:x,commitToHistory:!0}},predicate:(t,e,o,r)=>rE(t,e,r),keyTest:t=>!t.shiftKey&&t[T.CTRL_OR_CMD]&&t.key===T.G,PanelComponent:({elements:t,appState:e,updateData:o,app:r})=>(0,hi.jsx)(se,{hidden:!rE(t,e,r),type:"button",icon:(0,hi.jsx)($p,{theme:e.theme}),onClick:()=>o(null),title:`${g("labels.group")} \u2014 ${N("CtrlOrCmd+G")}`,"aria-label":g("labels.group"),visible:Fe(ve(t),e)})}),Jf=$({name:"ungroup",label:"labels.ungroup",icon:t=>(0,hi.jsx)(Up,{theme:t.theme}),trackEvent:{category:"element"},perform:(t,e,o,r)=>{let n=Fr(e),i=xe(t);if(n.length===0)return{appState:e,elements:t,commitToHistory:!1};let a=[...t],l=[];a=a.map(p=>{bt(p)&&l.push(p.id);let f=Eb(p.groupIds,e.selectedGroupIds);return f.length===p.groupIds.length?p:me(p,{groupIds:f})});let s=Dt(e,ve(a),e,null),c=r.scene.getSelectedElements(e),d=new Set(c.filter(p=>p.frameId).map(p=>p.frameId));return m0(t).filter(p=>d.has(p.id)).forEach(p=>{p&&(a=$c(a,Ji(a,p,e,i),p,r))}),s.selectedElementIds=Object.entries(s.selectedElementIds).reduce((p,[f,b])=>(b&&!l.includes(f)&&(p[f]=!0),p),{}),{appState:{...e,...s},elements:a,commitToHistory:!0}},keyTest:t=>t.shiftKey&&t[T.CTRL_OR_CMD]&&t.key===T.G.toUpperCase(),predicate:(t,e)=>Fr(e).length>0,PanelComponent:({elements:t,appState:e,updateData:o})=>(0,hi.jsx)(se,{type:"button",hidden:Fr(e).length===0,icon:(0,hi.jsx)(Up,{theme:e.theme}),onClick:()=>o(null),title:`${g("labels.ungroup")} \u2014 ${N("CtrlOrCmd+Shift+G")}`,"aria-label":g("labels.ungroup"),visible:Fe(ve(t),e)})});h();h();h();var Xd=(t,e,o,r,n,i,a)=>{t.beginPath(),t.moveTo(e+i,o),t.lineTo(e+r-i,o),t.quadraticCurveTo(e+r,o,e+r,o+i),t.lineTo(e+r,o+n-i),t.quadraticCurveTo(e+r,o+n,e+r-i,o+n),t.lineTo(e+i,o+n),t.quadraticCurveTo(e,o+n,e,o+n-i),t.lineTo(e,o+i),t.quadraticCurveTo(e,o,e+i,o),t.closePath(),t.fill(),a&&(t.strokeStyle=a),t.stroke()};h();function ZC(t){let e=0;if(t.length===0)return e;for(let o=0;o<t.length;o++){let r=t.charCodeAt(o);e=(e<<5)-e+r}return e}var gi=(t,e)=>`hsl(${Math.abs(ZC(e?.id||t))%37*10}, 100%, 83%)`,nE=t=>{let e=t?.trim()?.codePointAt(0);return(e?String.fromCodePoint(e):"?").toUpperCase()},iE=({context:t,renderConfig:e,appState:o,normalizedWidth:r,normalizedHeight:n})=>{for(let[i,a]of e.remotePointerViewportCoords){let{x:l,y:s}=a,c=o.collaborators.get(i);l-=o.offsetLeft,s-=o.offsetTop;let d=11,m=14,p=l<0||l>r-d||s<0||s>n-m;l=Math.max(l,0),l=Math.min(l,r-d),s=Math.max(s,0),s=Math.min(s,n-m);let f=gi(i,c);t.save(),t.strokeStyle=f,t.fillStyle=f;let b=e.remotePointerUserStates.get(i),x=p||b==="idle"||b==="away";x&&(t.globalAlpha=.3),e.remotePointerButton.get(i)==="down"&&(t.beginPath(),t.arc(l,s,15,0,2*Math.PI,!1),t.lineWidth=3,t.strokeStyle="#ffffff88",t.stroke(),t.closePath(),t.beginPath(),t.arc(l,s,15,0,2*Math.PI,!1),t.lineWidth=1,t.strokeStyle=f,t.stroke(),t.closePath());let y=o.theme===he.DARK?"#2f6330":a1,S=c?.isSpeaking;S&&(t.fillStyle=y,t.strokeStyle=y,t.lineWidth=10,t.lineJoin="round",t.beginPath(),t.moveTo(l,s),t.lineTo(l+0,s+14),t.lineTo(l+4,s+9),t.lineTo(l+11,s+8),t.closePath(),t.stroke(),t.fill()),t.fillStyle=sl,t.strokeStyle=sl,t.lineWidth=6,t.lineJoin="round",t.beginPath(),t.moveTo(l,s),t.lineTo(l+0,s+14),t.lineTo(l+4,s+9),t.lineTo(l+11,s+8),t.closePath(),t.stroke(),t.fill(),t.fillStyle=f,t.strokeStyle=f,t.lineWidth=2,t.lineJoin="round",t.beginPath(),x?(t.moveTo(l-1,s-1),t.lineTo(l-1,s+15),t.lineTo(l+5,s+10),t.lineTo(l+12,s+9),t.closePath(),t.fill()):(t.moveTo(l,s),t.lineTo(l+0,s+14),t.lineTo(l+4,s+9),t.lineTo(l+11,s+8),t.closePath(),t.fill(),t.stroke());let C=e.remotePointerUsernames.get(i)||"";if(!p&&C){t.font="600 12px sans-serif";let w=(S?l+0:l)+d/2,M=(S?s+0:s)+m+2,B=5,I=3,_=t.measureText(C),A=_.actualBoundingBoxDescent+_.actualBoundingBoxAscent,U=Math.max(A,12),R=w-1,W=M-1,O=_.width+2+B*2+2,F=U+2+I*2+2;if(t.roundRect?(t.beginPath(),t.roundRect(R,W,O,F,8),t.fillStyle=f,t.fill(),t.strokeStyle=sl,t.stroke(),S&&(t.beginPath(),t.roundRect(R-2,W-2,O+4,F+4,8),t.strokeStyle=y,t.stroke())):Xd(t,R,W,O,F,8,sl),t.fillStyle=i1,t.fillText(C,w+B+1,M+I+_.actualBoundingBoxAscent+Math.floor((U-A)/2)+2),S){t.fillStyle=y;let ee=8,te=8,be=5;t.fillRect(R+O+te,W+(F/2-ee/2),2,ee),t.fillRect(R+O+te+be,W+(F/2-ee*2/2),2,ee*2),t.fillRect(R+O+te+be*2,W+(F/2-ee/2),2,ee)}}t.restore(),t.closePath()}};h();var aE=v(H(),1);var Qf=v(k(),1),eh=({color:t,onClick:e,name:o,src:r,className:n})=>{let i=nE(o),[a,l]=(0,aE.useState)(!1),s=!a&&r,c=s?void 0:{background:t};return(0,Qf.jsx)("div",{className:z("Avatar",n),style:c,onClick:e,children:s?(0,Qf.jsx)("img",{className:"Avatar-img",src:r,alt:i,referrerPolicy:"no-referrer",onError:()=>l(!0)}):i})};var Kt=v(k(),1),jC=$({name:"goToCollaborator",label:"Go to a collaborator",viewMode:!0,trackEvent:{category:"collab"},perform:(t,e,o)=>!o.socketId||e.userToFollow?.socketId===o.socketId||o.isCurrentUser?{appState:{...e,userToFollow:null},commitToHistory:!1}:{appState:{...e,userToFollow:{socketId:o.socketId,username:o.username||""},openMenu:e.openMenu==="canvas"?null:e.openMenu},commitToHistory:!1},PanelComponent:({updateData:t,data:e,appState:o})=>{let{socketId:r,collaborator:n,withName:i,isBeingFollowed:a}=e,l=gi(r,n),s=z({"is-followed":a,"is-current-user":n.isCurrentUser===!0,"is-speaking":n.isSpeaking,"is-in-call":n.isInCall,"is-muted":n.isMuted}),c=n.isInCall?n.isSpeaking?(0,Kt.jsxs)("div",{className:"UserList__collaborator-status-icon-speaking-indicator",title:g("userList.hint.isSpeaking"),children:[(0,Kt.jsx)("div",{}),(0,Kt.jsx)("div",{}),(0,Kt.jsx)("div",{})]}):n.isMuted?(0,Kt.jsx)("div",{className:"UserList__collaborator-status-icon-microphone-muted",title:g("userList.hint.micMuted"),children:bv}):(0,Kt.jsx)("div",{title:g("userList.hint.inCall"),children:gv}):null;return i?(0,Kt.jsxs)("div",{className:`dropdown-menu-item dropdown-menu-item-base UserList__collaborator ${s}`,style:{"--avatar-size":"1.5rem"},onClick:()=>t(n),children:[(0,Kt.jsx)(eh,{color:l,onClick:()=>{},name:n.username||"",src:n.avatarUrl,className:s}),(0,Kt.jsx)("div",{className:"UserList__collaborator-name",children:n.username}),(0,Kt.jsxs)("div",{className:"UserList__collaborator-status-icons","aria-hidden":!0,children:[a&&(0,Kt.jsx)("div",{className:"UserList__collaborator-status-icon-is-followed",title:g("userList.hint.followStatus"),children:ma}),c]})]}):(0,Kt.jsxs)("div",{className:`UserList__collaborator UserList__collaborator--avatar-only ${s}`,children:[(0,Kt.jsx)(eh,{color:l,onClick:()=>{t(n)},name:n.username||"",src:n.avatarUrl,className:s}),c&&(0,Kt.jsx)("div",{className:"UserList__collaborator-status-icon",children:c})]})}});h();var th=$({name:"addToLibrary",trackEvent:{category:"element"},perform:(t,e,o,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:e.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});for(let i of rc)if(n.some(a=>a.type===i))return{commitToHistory:!1,appState:{...e,errorMessage:g(`errors.libraryElementTypeError.${i}`)}};return r.library.getLatestLibrary().then(i=>r.library.setLibrary([{id:dn(),status:"unpublished",elements:n.map(Yi),created:Date.now()},...i])).then(()=>({commitToHistory:!1,appState:{...e,toast:{message:g("toast.addedToLibrary")}}})).catch(i=>({commitToHistory:!1,appState:{...e,errorMessage:i.message}}))},label:"labels.addToLibrary"});h();h();var lE=(t,e,o)=>{let r=Xn(t,e),n=So(t);return r.flatMap(i=>{let a=XC(i,n,o);return i.map(l=>me(l,{x:l.x+a.x,y:l.y+a.y}))})},XC=(t,e,{axis:o,position:r})=>{let n=So(t),[i,a]=o==="x"?["minX","maxX"]:["minY","maxY"],l={x:0,y:0};return r==="start"?{...l,[o]:e[i]-n[i]}:r==="end"?{...l,[o]:e[a]-n[a]}:{...l,[o]:(e[i]+e[a])/2-(n[i]+n[a])/2}};var bi=v(k(),1),Do=(t,e,o,r)=>{let n=r.scene.getSelectedElements(e);return n.length>1&&!n.some(i=>Ee(i))},Ra=(t,e,o,r)=>{let n=o.scene.getSelectedElements(e),i=xe(t),a=lE(n,i,r),l=xe(a);return pr(t.map(s=>l.get(s.id)||s),e,o)},qC=$({name:"alignTop",label:"labels.alignTop",icon:Np,trackEvent:{category:"element"},predicate:Do,perform:(t,e,o,r)=>({appState:e,elements:Ra(t,e,r,{position:"start",axis:"y"}),commitToHistory:!0}),keyTest:t=>t[T.CTRL_OR_CMD]&&t.shiftKey&&t.key===T.ARROW_UP,PanelComponent:({elements:t,appState:e,updateData:o,app:r})=>(0,bi.jsx)(se,{hidden:!Do(t,e,null,r),type:"button",icon:Np,onClick:()=>o(null),title:`${g("labels.alignTop")} \u2014 ${N("CtrlOrCmd+Shift+Up")}`,"aria-label":g("labels.alignTop"),visible:Fe(ve(t),e)})}),JC=$({name:"alignBottom",label:"labels.alignBottom",icon:Op,trackEvent:{category:"element"},predicate:Do,perform:(t,e,o,r)=>({appState:e,elements:Ra(t,e,r,{position:"end",axis:"y"}),commitToHistory:!0}),keyTest:t=>t[T.CTRL_OR_CMD]&&t.shiftKey&&t.key===T.ARROW_DOWN,PanelComponent:({elements:t,appState:e,updateData:o,app:r})=>(0,bi.jsx)(se,{hidden:!Do(t,e,null,r),type:"button",icon:Op,onClick:()=>o(null),title:`${g("labels.alignBottom")} \u2014 ${N("CtrlOrCmd+Shift+Down")}`,"aria-label":g("labels.alignBottom"),visible:Fe(ve(t),e)})}),QC=$({name:"alignLeft",label:"labels.alignLeft",icon:Fp,trackEvent:{category:"element"},predicate:Do,perform:(t,e,o,r)=>({appState:e,elements:Ra(t,e,r,{position:"start",axis:"x"}),commitToHistory:!0}),keyTest:t=>t[T.CTRL_OR_CMD]&&t.shiftKey&&t.key===T.ARROW_LEFT,PanelComponent:({elements:t,appState:e,updateData:o,app:r})=>(0,bi.jsx)(se,{hidden:!Do(t,e,null,r),type:"button",icon:Fp,onClick:()=>o(null),title:`${g("labels.alignLeft")} \u2014 ${N("CtrlOrCmd+Shift+Left")}`,"aria-label":g("labels.alignLeft"),visible:Fe(ve(t),e)})}),eT=$({name:"alignRight",label:"labels.alignRight",icon:Bp,trackEvent:{category:"element"},predicate:Do,perform:(t,e,o,r)=>({appState:e,elements:Ra(t,e,r,{position:"end",axis:"x"}),commitToHistory:!0}),keyTest:t=>t[T.CTRL_OR_CMD]&&t.shiftKey&&t.key===T.ARROW_RIGHT,PanelComponent:({elements:t,appState:e,updateData:o,app:r})=>(0,bi.jsx)(se,{hidden:!Do(t,e,null,r),type:"button",icon:Bp,onClick:()=>o(null),title:`${g("labels.alignRight")} \u2014 ${N("CtrlOrCmd+Shift+Right")}`,"aria-label":g("labels.alignRight"),visible:Fe(ve(t),e)})}),tT=$({name:"alignVerticallyCentered",label:"labels.centerVertically",icon:zp,trackEvent:{category:"element"},predicate:Do,perform:(t,e,o,r)=>({appState:e,elements:Ra(t,e,r,{position:"center",axis:"y"}),commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o,app:r})=>(0,bi.jsx)(se,{hidden:!Do(t,e,null,r),type:"button",icon:zp,onClick:()=>o(null),title:g("labels.centerVertically"),"aria-label":g("labels.centerVertically"),visible:Fe(ve(t),e)})}),oT=$({name:"alignHorizontallyCentered",label:"labels.centerHorizontally",icon:Hp,trackEvent:{category:"element"},predicate:Do,perform:(t,e,o,r)=>({appState:e,elements:Ra(t,e,r,{position:"center",axis:"x"}),commitToHistory:!0}),PanelComponent:({elements:t,appState:e,updateData:o,app:r})=>(0,bi.jsx)(se,{hidden:!Do(t,e,null,r),type:"button",icon:Hp,onClick:()=>o(null),title:g("labels.centerHorizontally"),"aria-label":g("labels.centerHorizontally"),visible:Fe(ve(t),e)})});h();h();var sE=(t,e,o)=>{let[r,n,i,a]=o.axis==="x"?["minX","midX","maxX","width"]:["minY","midY","maxY","height"],l=So(t),s=Xn(t,e).map(p=>[p,So(p)]).sort((p,f)=>p[1][n]-f[1][n]),c=0;for(let p of s)c+=p[1][a];let d=(l[a]-c)/(s.length-1);if(d<0){let p=s.findIndex(y=>y[1][r]===l[r]),f=s.findIndex(y=>y[1][i]===l[i]),b=(s[f][1][n]-s[p][1][n])/(s.length-1),x=s[p][1][n];return s.flatMap(([y,S],C)=>{let w={x:0,y:0};return C!==p&&C!==f&&(x+=b,w[o.axis]=x-S[n]),y.map(M=>me(M,{x:M.x+w.x,y:M.y+w.y}))})}let m=l[r];return s.flatMap(([p,f])=>{let b={x:0,y:0};return b[o.axis]=m-f[r],m+=d,m+=f[a],p.map(x=>me(x,{x:x.x+b.x,y:x.y+b.y}))})};var oh=v(k(),1),cE=(t,e)=>{let o=e.scene.getSelectedElements(t);return o.length>1&&!o.some(r=>Ee(r))},dE=(t,e,o,r)=>{let n=o.scene.getSelectedElements(e),i=sE(n,o.scene.getNonDeletedElementsMap(),r),a=xe(i);return pr(t.map(l=>a.get(l.id)||l),e,o)},rT=$({name:"distributeHorizontally",label:"labels.distributeHorizontally",trackEvent:{category:"element"},perform:(t,e,o,r)=>({appState:e,elements:dE(t,e,r,{space:"between",axis:"x"}),commitToHistory:!0}),keyTest:t=>!t[T.CTRL_OR_CMD]&&t.altKey&&t.code===pe.H,PanelComponent:({elements:t,appState:e,updateData:o,app:r})=>(0,oh.jsx)(se,{hidden:!cE(e,r),type:"button",icon:Tx,onClick:()=>o(null),title:`${g("labels.distributeHorizontally")} \u2014 ${N("Alt+H")}`,"aria-label":g("labels.distributeHorizontally"),visible:Fe(ve(t),e)})}),nT=$({name:"distributeVertically",label:"labels.distributeVertically",trackEvent:{category:"element"},perform:(t,e,o,r)=>({appState:e,elements:dE(t,e,r,{space:"between",axis:"y"}),commitToHistory:!0}),keyTest:t=>!t[T.CTRL_OR_CMD]&&t.altKey&&t.code===pe.V,PanelComponent:({elements:t,appState:e,updateData:o,app:r})=>(0,oh.jsx)(se,{hidden:!cE(e,r),type:"button",icon:Sx,onClick:()=>o(null),title:`${g("labels.distributeVertically")} \u2014 ${N("Alt+V")}`,"aria-label":g("labels.distributeVertically"),visible:Fe(ve(t),e)})});h();var rh=$({name:"flipHorizontal",label:"labels.flipHorizontal",icon:Ev,trackEvent:{category:"element"},perform:(t,e,o,r)=>({elements:pr(mE(t,r.scene.getNonDeletedElementsMap(),e,"horizontal",r),e,r),appState:e,commitToHistory:!0}),keyTest:t=>t.shiftKey&&t.code===pe.H}),nh=$({name:"flipVertical",label:"labels.flipVertical",icon:yv,trackEvent:{category:"element"},perform:(t,e,o,r)=>({elements:pr(mE(t,r.scene.getNonDeletedElementsMap(),e,"vertical",r),e,r),appState:e,commitToHistory:!0}),keyTest:t=>t.shiftKey&&t.code===pe.V&&!t[T.CTRL_OR_CMD]}),mE=(t,e,o,r,n)=>{let i=ye(ve(t),o,{includeBoundTextElement:!0,includeElementsInFrames:!0}),a=iT(i,t,e,o,r,n),l=xe(a);return t.map(s=>l.get(s.id)||s)},iT=(t,e,o,r,n,i)=>{let{minX:a,minY:l,maxX:s,maxY:c}=So(t);return T0(o,t,o,"nw",!0,n==="horizontal"?s:a,n==="horizontal"?l:c),jn(r)?El(t,i):Cl(t,o),t};h();var Da=$({name:"copy",label:"labels.copy",icon:zl,trackEvent:{category:"element"},perform:async(t,e,o,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:e.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});try{await a0(n,r.files,o)}catch(i){return{commitToHistory:!1,appState:{...e,errorMessage:i.message}}}return{commitToHistory:!1}},keyTest:void 0}),ih=$({name:"paste",label:"labels.paste",trackEvent:{category:"element"},perform:async(t,e,o,r)=>{let n;try{n=await l0()}catch(i){return i.name==="AbortError"||i.name==="NotAllowedError"?!1:(console.error(`actionPaste ${i.name}: ${i.message}`),Mr?{commitToHistory:!1,appState:{...e,errorMessage:g("hints.firefox_clipboard_write")}}:{commitToHistory:!1,appState:{...e,errorMessage:g("errors.asyncPasteFailedOnRead")}})}try{r.pasteFromClipboard(i0({types:n}))}catch(i){return console.error(i),{commitToHistory:!1,appState:{...e,errorMessage:g("errors.asyncPasteFailedOnParse")}}}return{commitToHistory:!1}},keyTest:void 0}),qd=$({name:"cut",label:"labels.cut",icon:av,trackEvent:{category:"element"},perform:(t,e,o,r)=>(Da.perform(t,e,o,r),Gl.perform(t,e,null,r)),keyTest:t=>t[T.CTRL_OR_CMD]&&t.key===T.X}),Jd=$({name:"copyAsSvg",label:"labels.copyAsSvg",icon:wv,trackEvent:{category:"element"},perform:async(t,e,o,r)=>{if(!r.canvas)return{commitToHistory:!1};let{exportedElements:n,exportingFrame:i}=mi(t,e,!0);try{return await ui("clipboard-svg",n,e,r.files,{...e,exportingFrame:i,name:r.getName()}),{commitToHistory:!1}}catch(a){return console.error(a),{appState:{...e,errorMessage:a.message},commitToHistory:!1}}},predicate:t=>sp&&t.length>0,keywords:["svg","clipboard","copy"]}),Qd=$({name:"copyAsPng",label:"labels.copyAsPng",icon:Cv,trackEvent:{category:"element"},perform:async(t,e,o,r)=>{if(!r.canvas)return{commitToHistory:!1};let n=r.scene.getSelectedElements({selectedElementIds:e.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),{exportedElements:i,exportingFrame:a}=mi(t,e,!0);try{return await ui("clipboard",i,e,r.files,{...e,exportingFrame:a,name:r.getName()}),{appState:{...e,toast:{message:g("toast.copyToClipboardAsPng",{exportSelection:n.length?g("toast.selection"):g("toast.canvas"),exportColorScheme:e.exportWithDarkMode?g("buttons.darkMode"):g("buttons.lightMode")})}},commitToHistory:!1}}catch(l){return console.error(l),{appState:{...e,errorMessage:l.message},commitToHistory:!1}}},predicate:t=>Xi&&t.length>0,keyTest:t=>t.code===pe.C&&t.altKey&&t.shiftKey,keywords:["png","clipboard","copy"]}),em=$({name:"copyText",label:"labels.copyText",trackEvent:{category:"element"},perform:(t,e,o,r)=>{let i=r.scene.getSelectedElements({selectedElementIds:e.selectedElementIds,includeBoundTextElement:!0}).reduce((a,l)=>(le(l)&&a.push(l.text),a),[]).join(`
|
|
44
44
|
|
|
@@ -160,12 +160,12 @@ Please output JUST THE HTML file containing your best attempt at implementing th
|
|
|
160
160
|
</style>
|
|
161
161
|
<h1>Error!</h1>
|
|
162
162
|
<h3>${x}</h3>
|
|
163
|
-
`)}}}else m=qn(wb(i.link||""));let p=this.state.activeEmbeddable?.element===i&&this.state.activeEmbeddable?.state==="active",f=this.state.activeEmbeddable?.element===i&&this.state.activeEmbeddable?.state==="hover";return(0,Se.jsx)("div",{className:z("excalidraw__embeddable-container",{"is-hovered":f}),style:{transform:s?`translate(${a-this.state.offsetLeft}px, ${l-this.state.offsetTop}px) scale(${e})`:"none",display:s?"block":"none",opacity:g0(i,Bc(i,this.scene.getNonDeletedElementsMap()),this.elementsPendingErasure),"--embeddable-radius":`${j1(Math.min(i.width,i.height),i)}px`},children:(0,Se.jsxs)("div",{className:"excalidraw__embeddable-container__inner",style:{width:s?`${i.width}px`:0,height:s?`${i.height}px`:0,transform:s?`rotate(${i.angle}rad)`:"none",pointerEvents:p?Wn.enabled:Wn.disabled},children:[f&&(0,Se.jsx)("div",{className:"excalidraw__embeddable-hint",children:g("buttons.embeddableInteractionButton")}),(0,Se.jsx)("div",{className:"excalidraw__embeddable__outer",style:{padding:`${i.strokeWidth}px`},children:(Ht(i)?this.props.renderEmbeddable?.(i,this.state):null)??(0,Se.jsx)("iframe",{ref:b=>this.cacheEmbeddableRef(i,b),className:"excalidraw__embeddable",srcDoc:m?.type==="document"?m.srcdoc(this.state.theme):void 0,src:m?.type!=="document"?m?.link??"":void 0,scrolling:"no",referrerPolicy:"no-referrer-when-downgrade",title:"Excalidraw Embedded Content",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,sandbox:"allow-same-origin allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation allow-downloads"})})]})},i.id)})})}getFrameNameDOMId=e=>`${this.id}-frame-name-${e.id}`;frameNameBoundsCache={get:e=>{let o=this.frameNameBoundsCache._cache.get(e.id);if(!o||o.zoom!==this.state.zoom.value||o.versionNonce!==e.versionNonce){let r=document.getElementById(this.getFrameNameDOMId(e));if(r){let n=r.getBoundingClientRect(),i=Ke({clientX:n.x,clientY:n.y},this.state),a=Ke({clientX:n.right,clientY:n.bottom},this.state);return o={x:i.x,y:i.y,width:a.x-i.x,height:a.y-i.y,angle:0,zoom:this.state.zoom.value,versionNonce:e.versionNonce},this.frameNameBoundsCache._cache.set(e.id,o),o}return null}return o},_cache:new Map};renderFrameNames=()=>{if(!this.state.frameRendering.enabled||!this.state.frameRendering.name)return null;let e=this.state.theme===he.DARK,o=0,r=0;return this.scene.getNonDeletedFramesLikes().map(n=>{if(Uu(n)?o++:r++,!Dl(n,this.canvas.width/window.devicePixelRatio,this.canvas.height/window.devicePixelRatio,{offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,zoom:this.state.zoom},this.scene.getNonDeletedElementsMap()))return null;let{x:i,y:a}=Jt({sceneX:n.x,sceneY:n.y},this.state),l=6,s=()=>{oe(n,{name:n.name?.trim()||null}),this.setState({editingFrame:null})},c,d=h0(n,Uu(n)?o:r);if(n.id===this.state.editingFrame){let m=d;c=(0,Se.jsx)("input",{autoFocus:!0,value:m,onChange:p=>{oe(n,{name:p.target.value})},onFocus:p=>p.target.select(),onBlur:()=>s(),onKeyDown:p=>{(p.key===T.ESCAPE||p.key===T.ENTER)&&s()},style:{background:this.state.viewBackgroundColor,filter:e?g1:"none",zIndex:2,border:"none",display:"block",padding:`${l}px`,borderRadius:4,boxShadow:"inset 0 0 0 1px var(--color-primary)",fontFamily:"Assistant",fontSize:"14px",transform:`translate(-${l}px, ${l}px)`,color:"var(--color-gray-80)",overflow:"hidden",maxWidth:`${document.body.clientWidth-i-l}px`},size:m.length+1||1,dir:"auto",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off"})}else c=d;return(0,Se.jsx)("div",{id:this.getFrameNameDOMId(n),style:{position:"absolute",bottom:`${this.state.height+Ko.nameOffsetY-a+this.state.offsetTop}px`,left:`${i-this.state.offsetLeft}px`,zIndex:2,fontSize:Ko.nameFontSize,color:e?Ko.nameColorDarkTheme:Ko.nameColorLightTheme,lineHeight:Ko.nameLineHeight,width:"max-content",maxWidth:`${n.width}px`,overflow:n.id===this.state.editingFrame?"visible":"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",cursor:De.MOVE,pointerEvents:this.state.viewModeEnabled?Wn.disabled:Wn.enabled},onPointerDown:m=>this.handleCanvasPointerDown(m),onWheel:m=>this.handleWheel(m),onContextMenu:this.handleCanvasContextMenu,onDoubleClick:()=>{this.setState({editingFrame:n.id})},children:c},n.id)})};toggleOverscrollBehavior(e){document.documentElement.style.overscrollBehaviorX=e.type==="pointerenter"?"none":"auto"}render(){let e=this.scene.getSelectedElements(this.state),{renderTopRightUI:o,renderCustomStats:r}=this.props,n=this.scene.getVersionNonce(),{elementsMap:i,visibleElements:a}=this.renderer.getRenderableElements({versionNonce:n,zoom:this.state.zoom,offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,height:this.state.height,width:this.state.width,editingElement:this.state.editingElement,pendingImageElementId:this.state.pendingImageElementId}),l=this.scene.getNonDeletedElementsMap(),s=!(this.state.editingElement&&Ne(this.state.editingElement))&&(this.state.selectionElement||this.state.draggingElement||this.state.resizingElement||this.state.activeTool.type==="laser"&&this.state.cursorButton==="down"||this.state.editingElement&&!le(this.state.editingElement)),c=e[0];return(0,Se.jsx)("div",{className:z("excalidraw excalidraw-container",{"excalidraw--view-mode":this.state.viewModeEnabled,"excalidraw--mobile":this.device.editor.isMobile}),style:{"--ui-pointerEvents":s?Wn.disabled:Wn.enabled},ref:this.excalidrawContainerRef,onDrop:this.handleAppOnDrop,tabIndex:0,onKeyDown:this.props.handleKeyboardGlobally?void 0:this.onKeyDown,onPointerEnter:this.toggleOverscrollBehavior,onPointerLeave:this.toggleOverscrollBehavior,children:(0,Se.jsx)(Q5.Provider,{value:this,children:(0,Se.jsx)(e6.Provider,{value:this.props,children:(0,Se.jsx)(Pg.Provider,{value:this.excalidrawContainerValue,children:(0,Se.jsx)(Lg.Provider,{value:this.device,children:(0,Se.jsx)(Ng.Provider,{value:this.setAppState,children:(0,Se.jsx)(Dg.Provider,{value:this.state,children:(0,Se.jsxs)(Rg.Provider,{value:this.scene.getNonDeletedElements(),children:[(0,Se.jsxs)(Og.Provider,{value:this.actionManager,children:[(0,Se.jsx)(m5,{canvas:this.canvas,appState:this.state,files:this.files,setAppState:this.setAppState,actionManager:this.actionManager,elements:this.scene.getNonDeletedElements(),onLockToggle:this.toggleLock,onPenModeToggle:this.togglePenMode,onHandToolToggle:this.onHandToolToggle,langCode:Wr().code,renderTopRightUI:o,renderCustomStats:r,showExitZenModeBtn:typeof this.props?.zenModeEnabled>"u"&&this.state.zenModeEnabled,UIOptions:this.props.UIOptions,onExportImage:this.onExportImage,renderWelcomeScreen:!this.state.isLoading&&this.state.showWelcomeScreen&&this.state.activeTool.type==="selection"&&!this.state.zenModeEnabled&&!this.scene.getElementsIncludingDeleted().length,app:this,isCollaborating:this.props.isCollaborating,openAIKey:this.OPENAI_KEY,isOpenAIKeyPersisted:this.OPENAI_KEY_IS_PERSISTED,onOpenAIAPIKeyChange:this.onOpenAIKeyChange,onMagicSettingsConfirm:this.onMagicSettingsConfirm,children:this.props.children}),(0,Se.jsx)("div",{className:"excalidraw-textEditorContainer"}),(0,Se.jsx)("div",{className:"excalidraw-contextMenuContainer"}),(0,Se.jsx)("div",{className:"excalidraw-eye-dropper-container"}),(0,Se.jsx)(U5,{trails:[this.laserTrails,this.eraserTrail]}),e.length===1&&this.state.showHyperlinkPopup&&(0,Se.jsx)(fE,{element:c,elementsMap:l,setAppState:this.setAppState,onLinkOpen:this.props.onLinkOpen,setToast:this.setToast,updateEmbedValidationStatus:this.updateEmbedValidationStatus},c.id),this.props.aiEnabled!==!1&&e.length===1&&gl(c)&&(0,Se.jsx)(Sg,{element:c,elementsMap:i,children:(0,Se.jsx)(fu,{title:g("labels.convertToCode"),icon:da,checked:!1,onChange:()=>this.onMagicFrameGenerate(c,"button")})}),e.length===1&&Zn(c)&&c.customData?.generationData?.status==="done"&&(0,Se.jsxs)(Sg,{element:c,elementsMap:i,children:[(0,Se.jsx)(fu,{title:g("labels.copySource"),icon:md,checked:!1,onChange:()=>this.onIframeSrcCopy(c)}),(0,Se.jsx)(fu,{title:"Enter fullscreen",icon:mv,checked:!1,onChange:()=>{let d=this.getHTMLIFrameElement(c);if(d)try{d.requestFullscreen(),this.setState({activeEmbeddable:{element:c,state:"active"},selectedElementIds:{[c.id]:!0},draggingElement:null,selectionElement:null})}catch(m){console.warn(m),this.setState({errorMessage:"Couldn't enter fullscreen"})}}})]}),this.state.toast!==null&&(0,Se.jsx)(u5,{message:this.state.toast.message,onClose:()=>this.setToast(null),duration:this.state.toast.duration,closable:this.state.toast.closable}),this.state.contextMenu&&(0,Se.jsx)(Jw,{items:this.state.contextMenu.items,top:this.state.contextMenu.top,left:this.state.contextMenu.left,actionManager:this.actionManager,onClose:d=>{this.setState({contextMenu:null},()=>{this.focusContainer(),d?.()})}}),(0,Se.jsx)(Cg,{canvas:this.canvas,rc:this.rc,elementsMap:i,allElementsMap:l,visibleElements:a,versionNonce:n,selectionNonce:this.state.selectionElement?.versionNonce,scale:window.devicePixelRatio,appState:this.state,renderConfig:{imageCache:this.imageCache,isExporting:!1,renderGrid:!0,canvasBackgroundColor:this.state.viewBackgroundColor,embedsValidationStatus:this.embedsValidationStatus,elementsPendingErasure:this.elementsPendingErasure}}),(0,Se.jsx)(wg,{containerRef:this.excalidrawContainerRef,canvas:this.interactiveCanvas,elementsMap:i,visibleElements:a,selectedElements:e,versionNonce:n,selectionNonce:this.state.selectionElement?.versionNonce,scale:window.devicePixelRatio,appState:this.state,renderInteractiveSceneCallback:this.renderInteractiveSceneCallback,handleCanvasRef:this.handleInteractiveCanvasRef,onContextMenu:this.handleCanvasContextMenu,onPointerMove:this.handleCanvasPointerMove,onPointerUp:this.handleCanvasPointerUp,onPointerCancel:this.removePointer,onTouchMove:this.handleTouchMove,onPointerDown:this.handleCanvasPointerDown,onDoubleClick:this.handleCanvasDoubleClick}),this.state.userToFollow&&(0,Se.jsx)(V5,{width:this.state.width,height:this.state.height,userToFollow:this.state.userToFollow,onDisconnect:this.maybeUnfollowRemoteUser}),this.renderFrameNames()]}),this.renderEmbeddables()]})})})})})})})})}focusContainer=()=>{this.excalidrawContainerRef.current?.focus()};getSceneElementsIncludingDeleted=()=>this.scene.getElementsIncludingDeleted();getSceneElements=()=>this.scene.getNonDeletedElements();onInsertElements=e=>{this.addElementsFromPasteOrLibrary({elements:e,position:"center",files:null})};onExportImage=async(e,o,r)=>{ge("export",e,"ui");let n=await ui(e,o,this.state,this.files,{exportBackground:this.state.exportBackground,name:this.getName(),viewBackgroundColor:this.state.viewBackgroundColor,exportingFrame:r.exportingFrame}).catch(ic).catch(i=>{console.error(i),this.setState({errorMessage:i.message})});this.state.exportEmbedScene&&n&&Mc(n)&&this.setState({fileHandle:n})};magicGenerations=new Map;updateMagicGeneration=({frameElement:e,data:o})=>{o.status==="pending"?oe(e,{customData:{generationData:void 0}},!1):oe(e,{customData:{generationData:o}},!1),this.magicGenerations.set(e.id,o),this.onSceneUpdated()};getTextFromElements(e){return e.reduce((r,n)=>(le(n)&&r.push(n.text),r),[]).join(`
|
|
163
|
+
`)}}}else m=qn(wb(i.link||""));let p=this.state.activeEmbeddable?.element===i&&this.state.activeEmbeddable?.state==="active",f=this.state.activeEmbeddable?.element===i&&this.state.activeEmbeddable?.state==="hover";return(0,Se.jsx)("div",{className:z("excalidraw__embeddable-container",{"is-hovered":f}),style:{transform:s?`translate(${a-this.state.offsetLeft}px, ${l-this.state.offsetTop}px) scale(${e})`:"none",display:s?"block":"none",opacity:g0(i,Bc(i,this.scene.getNonDeletedElementsMap()),this.elementsPendingErasure),"--embeddable-radius":`${j1(Math.min(i.width,i.height),i)}px`},children:(0,Se.jsxs)("div",{className:"excalidraw__embeddable-container__inner",style:{width:s?`${i.width}px`:0,height:s?`${i.height}px`:0,transform:s?`rotate(${i.angle}rad)`:"none",pointerEvents:p?Wn.enabled:Wn.disabled},children:[f&&(0,Se.jsx)("div",{className:"excalidraw__embeddable-hint",children:g("buttons.embeddableInteractionButton")}),(0,Se.jsx)("div",{className:"excalidraw__embeddable__outer",style:{padding:`${i.strokeWidth}px`},children:(Ht(i)?this.props.renderEmbeddable?.(i,this.state):null)??(0,Se.jsx)("iframe",{ref:b=>this.cacheEmbeddableRef(i,b),className:"excalidraw__embeddable",srcDoc:m?.type==="document"?m.srcdoc(this.state.theme):void 0,src:m?.type!=="document"?m?.link??"":void 0,scrolling:"no",referrerPolicy:"no-referrer-when-downgrade",title:"Excalidraw Embedded Content",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,sandbox:`${m?.sandbox?.allowSameOrigin?"allow-same-origin":""} allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation allow-downloads`})})]})},i.id)})})}getFrameNameDOMId=e=>`${this.id}-frame-name-${e.id}`;frameNameBoundsCache={get:e=>{let o=this.frameNameBoundsCache._cache.get(e.id);if(!o||o.zoom!==this.state.zoom.value||o.versionNonce!==e.versionNonce){let r=document.getElementById(this.getFrameNameDOMId(e));if(r){let n=r.getBoundingClientRect(),i=Ke({clientX:n.x,clientY:n.y},this.state),a=Ke({clientX:n.right,clientY:n.bottom},this.state);return o={x:i.x,y:i.y,width:a.x-i.x,height:a.y-i.y,angle:0,zoom:this.state.zoom.value,versionNonce:e.versionNonce},this.frameNameBoundsCache._cache.set(e.id,o),o}return null}return o},_cache:new Map};renderFrameNames=()=>{if(!this.state.frameRendering.enabled||!this.state.frameRendering.name)return null;let e=this.state.theme===he.DARK,o=0,r=0;return this.scene.getNonDeletedFramesLikes().map(n=>{if(Uu(n)?o++:r++,!Dl(n,this.canvas.width/window.devicePixelRatio,this.canvas.height/window.devicePixelRatio,{offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,zoom:this.state.zoom},this.scene.getNonDeletedElementsMap()))return null;let{x:i,y:a}=Jt({sceneX:n.x,sceneY:n.y},this.state),l=6,s=()=>{oe(n,{name:n.name?.trim()||null}),this.setState({editingFrame:null})},c,d=h0(n,Uu(n)?o:r);if(n.id===this.state.editingFrame){let m=d;c=(0,Se.jsx)("input",{autoFocus:!0,value:m,onChange:p=>{oe(n,{name:p.target.value})},onFocus:p=>p.target.select(),onBlur:()=>s(),onKeyDown:p=>{(p.key===T.ESCAPE||p.key===T.ENTER)&&s()},style:{background:this.state.viewBackgroundColor,filter:e?g1:"none",zIndex:2,border:"none",display:"block",padding:`${l}px`,borderRadius:4,boxShadow:"inset 0 0 0 1px var(--color-primary)",fontFamily:"Assistant",fontSize:"14px",transform:`translate(-${l}px, ${l}px)`,color:"var(--color-gray-80)",overflow:"hidden",maxWidth:`${document.body.clientWidth-i-l}px`},size:m.length+1||1,dir:"auto",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off"})}else c=d;return(0,Se.jsx)("div",{id:this.getFrameNameDOMId(n),style:{position:"absolute",bottom:`${this.state.height+Ko.nameOffsetY-a+this.state.offsetTop}px`,left:`${i-this.state.offsetLeft}px`,zIndex:2,fontSize:Ko.nameFontSize,color:e?Ko.nameColorDarkTheme:Ko.nameColorLightTheme,lineHeight:Ko.nameLineHeight,width:"max-content",maxWidth:`${n.width}px`,overflow:n.id===this.state.editingFrame?"visible":"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",cursor:De.MOVE,pointerEvents:this.state.viewModeEnabled?Wn.disabled:Wn.enabled},onPointerDown:m=>this.handleCanvasPointerDown(m),onWheel:m=>this.handleWheel(m),onContextMenu:this.handleCanvasContextMenu,onDoubleClick:()=>{this.setState({editingFrame:n.id})},children:c},n.id)})};toggleOverscrollBehavior(e){document.documentElement.style.overscrollBehaviorX=e.type==="pointerenter"?"none":"auto"}render(){let e=this.scene.getSelectedElements(this.state),{renderTopRightUI:o,renderCustomStats:r}=this.props,n=this.scene.getVersionNonce(),{elementsMap:i,visibleElements:a}=this.renderer.getRenderableElements({versionNonce:n,zoom:this.state.zoom,offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,height:this.state.height,width:this.state.width,editingElement:this.state.editingElement,pendingImageElementId:this.state.pendingImageElementId}),l=this.scene.getNonDeletedElementsMap(),s=!(this.state.editingElement&&Ne(this.state.editingElement))&&(this.state.selectionElement||this.state.draggingElement||this.state.resizingElement||this.state.activeTool.type==="laser"&&this.state.cursorButton==="down"||this.state.editingElement&&!le(this.state.editingElement)),c=e[0];return(0,Se.jsx)("div",{className:z("excalidraw excalidraw-container",{"excalidraw--view-mode":this.state.viewModeEnabled,"excalidraw--mobile":this.device.editor.isMobile}),style:{"--ui-pointerEvents":s?Wn.disabled:Wn.enabled},ref:this.excalidrawContainerRef,onDrop:this.handleAppOnDrop,tabIndex:0,onKeyDown:this.props.handleKeyboardGlobally?void 0:this.onKeyDown,onPointerEnter:this.toggleOverscrollBehavior,onPointerLeave:this.toggleOverscrollBehavior,children:(0,Se.jsx)(Q5.Provider,{value:this,children:(0,Se.jsx)(e6.Provider,{value:this.props,children:(0,Se.jsx)(Pg.Provider,{value:this.excalidrawContainerValue,children:(0,Se.jsx)(Lg.Provider,{value:this.device,children:(0,Se.jsx)(Ng.Provider,{value:this.setAppState,children:(0,Se.jsx)(Dg.Provider,{value:this.state,children:(0,Se.jsxs)(Rg.Provider,{value:this.scene.getNonDeletedElements(),children:[(0,Se.jsxs)(Og.Provider,{value:this.actionManager,children:[(0,Se.jsx)(m5,{canvas:this.canvas,appState:this.state,files:this.files,setAppState:this.setAppState,actionManager:this.actionManager,elements:this.scene.getNonDeletedElements(),onLockToggle:this.toggleLock,onPenModeToggle:this.togglePenMode,onHandToolToggle:this.onHandToolToggle,langCode:Wr().code,renderTopRightUI:o,renderCustomStats:r,showExitZenModeBtn:typeof this.props?.zenModeEnabled>"u"&&this.state.zenModeEnabled,UIOptions:this.props.UIOptions,onExportImage:this.onExportImage,renderWelcomeScreen:!this.state.isLoading&&this.state.showWelcomeScreen&&this.state.activeTool.type==="selection"&&!this.state.zenModeEnabled&&!this.scene.getElementsIncludingDeleted().length,app:this,isCollaborating:this.props.isCollaborating,openAIKey:this.OPENAI_KEY,isOpenAIKeyPersisted:this.OPENAI_KEY_IS_PERSISTED,onOpenAIAPIKeyChange:this.onOpenAIKeyChange,onMagicSettingsConfirm:this.onMagicSettingsConfirm,children:this.props.children}),(0,Se.jsx)("div",{className:"excalidraw-textEditorContainer"}),(0,Se.jsx)("div",{className:"excalidraw-contextMenuContainer"}),(0,Se.jsx)("div",{className:"excalidraw-eye-dropper-container"}),(0,Se.jsx)(U5,{trails:[this.laserTrails,this.eraserTrail]}),e.length===1&&this.state.showHyperlinkPopup&&(0,Se.jsx)(fE,{element:c,elementsMap:l,setAppState:this.setAppState,onLinkOpen:this.props.onLinkOpen,setToast:this.setToast,updateEmbedValidationStatus:this.updateEmbedValidationStatus},c.id),this.props.aiEnabled!==!1&&e.length===1&&gl(c)&&(0,Se.jsx)(Sg,{element:c,elementsMap:i,children:(0,Se.jsx)(fu,{title:g("labels.convertToCode"),icon:da,checked:!1,onChange:()=>this.onMagicFrameGenerate(c,"button")})}),e.length===1&&Zn(c)&&c.customData?.generationData?.status==="done"&&(0,Se.jsxs)(Sg,{element:c,elementsMap:i,children:[(0,Se.jsx)(fu,{title:g("labels.copySource"),icon:md,checked:!1,onChange:()=>this.onIframeSrcCopy(c)}),(0,Se.jsx)(fu,{title:"Enter fullscreen",icon:mv,checked:!1,onChange:()=>{let d=this.getHTMLIFrameElement(c);if(d)try{d.requestFullscreen(),this.setState({activeEmbeddable:{element:c,state:"active"},selectedElementIds:{[c.id]:!0},draggingElement:null,selectionElement:null})}catch(m){console.warn(m),this.setState({errorMessage:"Couldn't enter fullscreen"})}}})]}),this.state.toast!==null&&(0,Se.jsx)(u5,{message:this.state.toast.message,onClose:()=>this.setToast(null),duration:this.state.toast.duration,closable:this.state.toast.closable}),this.state.contextMenu&&(0,Se.jsx)(Jw,{items:this.state.contextMenu.items,top:this.state.contextMenu.top,left:this.state.contextMenu.left,actionManager:this.actionManager,onClose:d=>{this.setState({contextMenu:null},()=>{this.focusContainer(),d?.()})}}),(0,Se.jsx)(Cg,{canvas:this.canvas,rc:this.rc,elementsMap:i,allElementsMap:l,visibleElements:a,versionNonce:n,selectionNonce:this.state.selectionElement?.versionNonce,scale:window.devicePixelRatio,appState:this.state,renderConfig:{imageCache:this.imageCache,isExporting:!1,renderGrid:!0,canvasBackgroundColor:this.state.viewBackgroundColor,embedsValidationStatus:this.embedsValidationStatus,elementsPendingErasure:this.elementsPendingErasure}}),(0,Se.jsx)(wg,{containerRef:this.excalidrawContainerRef,canvas:this.interactiveCanvas,elementsMap:i,visibleElements:a,selectedElements:e,versionNonce:n,selectionNonce:this.state.selectionElement?.versionNonce,scale:window.devicePixelRatio,appState:this.state,renderInteractiveSceneCallback:this.renderInteractiveSceneCallback,handleCanvasRef:this.handleInteractiveCanvasRef,onContextMenu:this.handleCanvasContextMenu,onPointerMove:this.handleCanvasPointerMove,onPointerUp:this.handleCanvasPointerUp,onPointerCancel:this.removePointer,onTouchMove:this.handleTouchMove,onPointerDown:this.handleCanvasPointerDown,onDoubleClick:this.handleCanvasDoubleClick}),this.state.userToFollow&&(0,Se.jsx)(V5,{width:this.state.width,height:this.state.height,userToFollow:this.state.userToFollow,onDisconnect:this.maybeUnfollowRemoteUser}),this.renderFrameNames()]}),this.renderEmbeddables()]})})})})})})})})}focusContainer=()=>{this.excalidrawContainerRef.current?.focus()};getSceneElementsIncludingDeleted=()=>this.scene.getElementsIncludingDeleted();getSceneElements=()=>this.scene.getNonDeletedElements();onInsertElements=e=>{this.addElementsFromPasteOrLibrary({elements:e,position:"center",files:null})};onExportImage=async(e,o,r)=>{ge("export",e,"ui");let n=await ui(e,o,this.state,this.files,{exportBackground:this.state.exportBackground,name:this.getName(),viewBackgroundColor:this.state.viewBackgroundColor,exportingFrame:r.exportingFrame}).catch(ic).catch(i=>{console.error(i),this.setState({errorMessage:i.message})});this.state.exportEmbedScene&&n&&Mc(n)&&this.setState({fileHandle:n})};magicGenerations=new Map;updateMagicGeneration=({frameElement:e,data:o})=>{o.status==="pending"?oe(e,{customData:{generationData:void 0}},!1):oe(e,{customData:{generationData:o}},!1),this.magicGenerations.set(e.id,o),this.onSceneUpdated()};getTextFromElements(e){return e.reduce((r,n)=>(le(n)&&r.push(n.text),r),[]).join(`
|
|
164
164
|
|
|
165
165
|
`)}async onMagicFrameGenerate(e,o){if(!this.OPENAI_KEY){this.setState({openDialog:{name:"settings",tab:"diagram-to-code",source:"generation"}}),ge("ai","generate (missing key)","d2c");return}let r=Uc(this.scene.getNonDeletedElements(),e).filter(m=>!gl(m));if(!r.length){o==="button"?(this.setState({errorMessage:"Cannot generate from an empty frame"}),ge("ai","generate (no-children)","d2c")):this.setActiveTool({type:"magicframe"});return}let n=this.insertIframeElement({sceneX:e.x+e.width+30,sceneY:e.y,width:e.width,height:e.height});if(!n)return;this.updateMagicGeneration({frameElement:n,data:{status:"pending"}}),this.setState({selectedElementIds:{[n.id]:!0}});let i=await cp({elements:this.scene.getNonDeletedElements(),appState:{...this.state,exportBackground:!0,viewBackgroundColor:this.state.viewBackgroundColor},exportingFrame:e,files:this.files}),a=await Lc(i),l=this.getTextFromElements(r);ge("ai","generate (start)","d2c");let s=await G5({image:a,apiKey:this.OPENAI_KEY,text:l,theme:this.state.theme});if(!s.ok){ge("ai","generate (failed)","d2c"),console.error(s.error),this.updateMagicGeneration({frameElement:n,data:{status:"error",code:"ERR_OAI",message:s.error?.message||"Unknown error during generation"}});return}if(ge("ai","generate (success)","d2c"),s.choices[0].message.content==null){this.updateMagicGeneration({frameElement:n,data:{status:"error",code:"ERR_OAI",message:"Nothing genereated :("}});return}let c=s.choices[0].message.content,d=c.slice(c.indexOf("<!DOCTYPE html>"),c.indexOf("</html>")+7);this.updateMagicGeneration({frameElement:n,data:{status:"done",html:d}})}onIframeSrcCopy(e){e.customData?.generationData?.status==="done"&&(qi(e.customData.generationData.html),this.setToast({message:"copied to clipboard",closable:!1,duration:1500}))}OPENAI_KEY=uo.get(wo.OAI_API_KEY);OPENAI_KEY_IS_PERSISTED=uo.has(wo.OAI_API_KEY)||!1;onOpenAIKeyChange=(e,o)=>{if(this.OPENAI_KEY=e||null,o){let r=uo.set(wo.OAI_API_KEY,e);this.OPENAI_KEY_IS_PERSISTED=r}else this.OPENAI_KEY_IS_PERSISTED=!1};onMagicSettingsConfirm=(e,o,r)=>{if(this.OPENAI_KEY=e||null,this.onOpenAIKeyChange(this.OPENAI_KEY,o),r==="settings")return;let n=this.scene.getSelectedElements({selectedElementIds:this.state.selectedElementIds});e?n.length?this.onMagicframeToolSelect():this.setActiveTool({type:"magicframe"}):gl(n[0])||this.setActiveTool({type:"magicframe"})};onMagicframeToolSelect=()=>{if(!this.OPENAI_KEY){this.setState({openDialog:{name:"settings",tab:"diagram-to-code",source:"tool"}}),ge("ai","tool-select (missing key)","d2c");return}let e=this.scene.getSelectedElements({selectedElementIds:this.state.selectedElementIds});if(e.length===0)this.setActiveTool({type:ut.magicframe}),ge("ai","tool-select (empty-selection)","d2c");else{let o=e.length===1&&gl(e[0])&&e[0];if(!o&&e.some(n=>Ee(n)||n.frameId)){this.setActiveTool({type:ut.magicframe});return}ge("ai","tool-select (existing selection)","d2c");let r;if(o)r=o;else{let[n,i,a,l]=Ye(e),s=50;r=Il({...Ko,x:n-s,y:i-s,width:a-n+s*2,height:l-i+s*2,opacity:100,locked:!1}),this.scene.insertElement(r);for(let c of e)oe(c,{frameId:r.id});this.setState({selectedElementIds:{[r.id]:!0}})}this.onMagicFrameGenerate(r,"upstream")}};openEyeDropper=({type:e})=>{Wt.set(Cn,{swapPreviewOnAlt:!0,colorPickerType:e==="stroke"?"elementStroke":"elementBackground",onSelect:(o,r)=>{let n=e==="background"&&r.altKey||e==="stroke"&&!r.altKey;!this.scene.getSelectedElements(this.state).length||this.state.activeTool.type!=="selection"?n?this.syncActionResult({appState:{...this.state,currentItemStrokeColor:o},commitToHistory:!0}):this.syncActionResult({appState:{...this.state,currentItemBackgroundColor:o},commitToHistory:!0}):this.updateScene({elements:this.scene.getElementsIncludingDeleted().map(a=>this.state.selectedElementIds[a.id]?me(a,{[n?"strokeColor":"backgroundColor"]:o}):a)})},keepOpenOnAlt:!1})};syncActionResult=Je(e=>{if(this.unmounted||e===!1)return;let o=null;if(e.elements&&(e.elements.forEach(r=>{this.state.editingElement?.id===r.id&&this.state.editingElement!==r&&yp(r)&&(o=r)}),this.scene.replaceAllElements(e.elements),e.commitToHistory&&this.history.resumeRecording()),e.files&&(this.files=e.replaceFiles?e.files:{...this.files,...e.files},this.addNewImagesToImageCache()),e.appState||o||this.state.contextMenu){e.commitToHistory&&this.history.resumeRecording();let r=e?.appState?.viewModeEnabled||!1,n=e?.appState?.zenModeEnabled||!1,i=e?.appState?.gridSize||null,a=e?.appState?.theme||this.props.theme||he.LIGHT,l=e?.appState?.name??this.state.name,s=e?.appState?.errorMessage??this.state.errorMessage;typeof this.props.viewModeEnabled<"u"&&(r=this.props.viewModeEnabled),typeof this.props.zenModeEnabled<"u"&&(n=this.props.zenModeEnabled),typeof this.props.gridModeEnabled<"u"&&(i=this.props.gridModeEnabled?Ar:null),o=o||e.appState?.editingElement||null,o?.isDeleted&&(o=null),this.setState(c=>Object.assign(e.appState||{},{contextMenu:null,editingElement:o,viewModeEnabled:r,zenModeEnabled:n,gridSize:i,theme:a,name:l,errorMessage:s}),()=>{e.syncHistory&&this.history.setCurrentState(this.state,this.scene.getElementsIncludingDeleted())})}});onBlur=Je(()=>{Ai=!1,this.setState({isBindingEnabled:!0})});onUnload=()=>{this.onBlur()};disableEvent=e=>{e.preventDefault()};resetHistory=()=>{this.history.clear()};resetScene=Je(e=>{this.scene.replaceAllElements([]),this.setState(o=>({...Vi(),isLoading:e?.resetLoadingState?!1:o.isLoading,theme:this.state.theme})),this.resetHistory()});initializeScene=async()=>{"launchQueue"in window&&"LaunchParams"in window&&window.launchQueue.setConsumer(async r=>{if(!r.files.length)return;let n=r.files[0],i=await n.getFile();this.loadFileToCanvas(new File([i],i.name||"",{type:i.type}),n)}),this.props.theme&&this.setState({theme:this.props.theme}),this.state.isLoading||this.setState({isLoading:!0});let e=null;try{e=await this.props.initialData||null,e?.libraryItems&&this.library.updateLibrary({libraryItems:e.libraryItems,merge:!0}).catch(r=>{console.error(r)})}catch(r){console.error(r),e={appState:{errorMessage:r.message||"Encountered an error during importing or restoring scene data"}}}let o=ep(e,null,null,{repairBindings:!0});o.appState={...o.appState,theme:this.props.theme||o.appState.theme,openSidebar:o.appState?.openSidebar||this.state.openSidebar,activeTool:o.appState.activeTool.type==="image"?{...o.appState.activeTool,type:"selection"}:o.appState.activeTool,isLoading:!1,toast:this.state.toast},e?.scrollToContent&&(o.appState={...o.appState,...ei(o.elements,{...o.appState,width:this.state.width,height:this.state.height,offsetTop:this.state.offsetTop,offsetLeft:this.state.offsetLeft})}),this.fonts.loadFontsForElements(o.elements),this.resetHistory(),this.syncActionResult({...o,commitToHistory:!0})};isMobileBreakpoint=(e,o)=>e<b1||o<v1&&e<x1;refreshViewportBreakpoints=()=>{if(!this.excalidrawContainerRef.current)return;let{clientWidth:o,clientHeight:r}=document.body,n=this.device.viewport,i=Di(n,{isLandscape:o>r,isMobile:this.isMobileBreakpoint(o,r)});return n!==i?(this.device={...this.device,viewport:i},!0):!1};refreshEditorBreakpoints=()=>{let e=this.excalidrawContainerRef.current;if(!e)return;let{width:o,height:r}=e.getBoundingClientRect(),n=this.props.UIOptions.dockedSidebarBreakpoint!=null?this.props.UIOptions.dockedSidebarBreakpoint:y1,i=this.device.editor,a=Di(i,{isMobile:this.isMobileBreakpoint(o,r),canFitSidebar:o>n});return i!==a?(this.device={...this.device,editor:a},!0):!1};async componentDidMount(){if(this.unmounted=!1,this.excalidrawContainerValue.container=this.excalidrawContainerRef.current,E.MODE===Au.TEST||E.DEV){let o=this.setState.bind(this);Object.defineProperties(window.h,{state:{configurable:!0,get:()=>this.state},setState:{configurable:!0,value:(...r)=>this.setState(...r)},app:{configurable:!0,value:this},history:{configurable:!0,value:this.history}})}this.scene.addCallback(this.onSceneUpdated),this.addEventListeners(),this.props.autoFocus&&this.excalidrawContainerRef.current&&this.focusContainer(),lc()||(this.refreshViewportBreakpoints(),this.refreshEditorBreakpoints()),nl&&this.excalidrawContainerRef.current&&(this.resizeObserver=new ResizeObserver(()=>{this.refreshEditorBreakpoints(),this.updateDOMRect()}),this.resizeObserver?.observe(this.excalidrawContainerRef.current)),new URLSearchParams(window.location.search.slice(1)).has("web-share-target")?this.restoreFileFromShare():this.updateDOMRect(this.initializeScene),t1()&&!fb()&&this.setState({errorMessage:(0,Se.jsx)(I5,{})})}componentWillUnmount(){this.renderer.destroy(),this.scene=new To,this.renderer=new Rs(this.scene),this.files={},this.imageCache.clear(),this.resizeObserver?.disconnect(),this.unmounted=!0,this.removeEventListeners(),this.scene.destroy(),this.library.destroy(),this.laserTrails.stop(),this.eraserTrail.stop(),this.onChangeEmitter.clear(),Mo.destroy(),$o.destroy(),clearTimeout(Hn),Fe.clearCache(),Dt.clearCache(),Hn=0,document.documentElement.style.overscrollBehaviorX=""}onResize=Je(()=>{this.scene.getElementsIncludingDeleted().forEach(e=>Mo.delete(e)),this.refreshViewportBreakpoints(),this.updateDOMRect(),nl||this.refreshEditorBreakpoints(),this.setState({})});onFullscreenChange=()=>{!document.fullscreenElement&&this.state.activeEmbeddable?.state==="active"&&this.setState({activeEmbeddable:null})};removeEventListeners(){this.onRemoveEventListenersEmitter.trigger()}addEventListeners(){this.removeEventListeners(),this.props.handleKeyboardGlobally&&this.onRemoveEventListenersEmitter.once(it(document,"keydown",this.onKeyDown,!1)),this.onRemoveEventListenersEmitter.once(it(this.excalidrawContainerRef.current,"wheel",this.onWheel,{passive:!1}),it(window,"message",this.onWindowMessage,!1),it(document,"pointerup",this.removePointer),it(document,"copy",this.onCopy),it(document,"keyup",this.onKeyUp,{passive:!0}),it(document,"mousemove",this.updateCurrentCursorPosition),it(document.fonts,"loadingdone",e=>{let o=e.fontfaces;this.fonts.onFontsLoaded(o)}),it(document,"gesturestart",this.onGestureStart,!1),it(document,"gesturechange",this.onGestureChange,!1),it(document,"gestureend",this.onGestureEnd,!1),it(window,"focus",()=>{this.maybeCleanupAfterMissingPointerUp(null)})),!this.state.viewModeEnabled&&(this.onRemoveEventListenersEmitter.once(it(document,"fullscreenchange",this.onFullscreenChange),it(document,"paste",this.pasteFromClipboard),it(document,"cut",this.onCut),it(window,"resize",this.onResize,!1),it(window,"unload",this.onUnload,!1),it(window,"blur",this.onBlur,!1),it(this.excalidrawContainerRef.current,"dragover",this.disableEvent,!1),it(this.excalidrawContainerRef.current,"drop",this.disableEvent,!1)),this.props.detectScroll&&this.onRemoveEventListenersEmitter.once(it(P1(this.excalidrawContainerRef.current),"scroll",this.onScroll)))}componentDidUpdate(e,o){this.updateEmbeddables();let r=this.scene.getElementsIncludingDeleted(),n=this.scene.getNonDeletedElementsMap();!this.state.showWelcomeScreen&&!r.length&&this.setState({showWelcomeScreen:!0}),e.UIOptions.dockedSidebarBreakpoint!==this.props.UIOptions.dockedSidebarBreakpoint&&this.refreshEditorBreakpoints(),o.userToFollow&&!this.state.collaborators.has(o.userToFollow.socketId)&&this.maybeUnfollowRemoteUser(),(o.zoom.value!==this.state.zoom.value||o.scrollX!==this.state.scrollX||o.scrollY!==this.state.scrollY)&&(this.props?.onScrollChange?.(this.state.scrollX,this.state.scrollY,this.state.zoom),this.onScrollChangeEmitter.trigger(this.state.scrollX,this.state.scrollY,this.state.zoom)),o.userToFollow!==this.state.userToFollow&&(o.userToFollow&&this.onUserFollowEmitter.trigger({userToFollow:o.userToFollow,action:"UNFOLLOW"}),this.state.userToFollow&&this.onUserFollowEmitter.trigger({userToFollow:this.state.userToFollow,action:"FOLLOW"})),Object.keys(this.state.selectedElementIds).length&&ko(this.state)&&this.setState({activeTool:nt(this.state,{type:"selection"})}),this.state.activeTool.type==="eraser"&&o.theme!==this.state.theme&&Tb(this.interactiveCanvas,this.state.theme),o.activeTool.type==="selection"&&this.state.activeTool.type!=="selection"&&this.state.showHyperlinkPopup&&this.setState({showHyperlinkPopup:!1}),e.langCode!==this.props.langCode&&this.updateLanguage(),ko(o)&&!ko(this.state)&&this.eraserTrail.endPath(),e.viewModeEnabled!==this.props.viewModeEnabled&&this.setState({viewModeEnabled:!!this.props.viewModeEnabled}),o.viewModeEnabled!==this.state.viewModeEnabled&&(this.addEventListeners(),this.deselectElements()),e.zenModeEnabled!==this.props.zenModeEnabled&&this.setState({zenModeEnabled:!!this.props.zenModeEnabled}),e.theme!==this.props.theme&&this.props.theme&&this.setState({theme:this.props.theme}),e.gridModeEnabled!==this.props.gridModeEnabled&&this.setState({gridSize:this.props.gridModeEnabled?Ar:null}),this.excalidrawContainerRef.current?.classList.toggle("theme--dark",this.state.theme===he.DARK),this.state.editingLinearElement&&!this.state.selectedElementIds[this.state.editingLinearElement.elementId]&&setTimeout(()=>{this.state.editingLinearElement&&this.actionManager.executeAction(Ro)}),this.state.editingElement?.isDeleted&&this.setState({editingElement:null}),this.state.selectedLinearElement&&!this.state.selectedElementIds[this.state.selectedLinearElement.elementId]&&this.setState({selectedLinearElement:null});let{multiElement:a}=o;o.activeTool!==this.state.activeTool&&a!=null&&jn(this.state)&&Lr(a,!1)&&wl(a,this.state,ul(ue.getPointAtIndexGlobalCoordinates(a,-1,n)),this),this.history.record(this.state,r),this.state.isLoading||(this.props.onChange?.(r,this.state,this.files),this.onChangeEmitter.trigger(r,this.state,this.files))}renderInteractiveSceneCallback=({atLeastOneVisibleElement:e,scrollBars:o,elementsMap:r})=>{o&&(Mg=o);let n=le(this.state.editingElement)?!1:!e&&r.size>0;this.state.scrolledOutside!==n&&this.setState({scrolledOutside:n}),this.scheduleImageRefresh()};onScroll=dl(()=>{let{offsetTop:e,offsetLeft:o}=this.getCanvasOffsets();this.setState(r=>r.offsetLeft===o&&r.offsetTop===e?null:{offsetTop:e,offsetLeft:o})},p1);onCut=Je(e=>{!this.excalidrawContainerRef.current?.contains(document.activeElement)||Co(e.target)||(this.actionManager.executeAction(qd,"keyboard",e),e.preventDefault(),e.stopPropagation())});onCopy=Je(e=>{!this.excalidrawContainerRef.current?.contains(document.activeElement)||Co(e.target)||(this.actionManager.executeAction(Da,"keyboard",e),e.preventDefault(),e.stopPropagation())});static resetTapTwice(){Fs=!1}onTouchStart=e=>{if(e1&&e.preventDefault(),!Fs){Fs=!0,clearTimeout(kg),kg=window.setTimeout(t.resetTapTwice,m1);return}if(Fs&&e.touches.length===1){let o=e.touches[0];this.handleCanvasDoubleClick({clientX:o.clientX,clientY:o.clientY}),Fs=!1,clearTimeout(kg)}e.touches.length===2&&this.setState({selectedElementIds:Be({},this.state),activeEmbeddable:null})};onTouchEnd=e=>{this.resetContextMenuTimer(),e.touches.length>0?this.setState({previousSelectedElementIds:{},selectedElementIds:Be(this.state.previousSelectedElementIds,this.state)}):Le.pointers.clear()};pasteFromClipboard=Je(async e=>{let o=!!xu,r=document.activeElement,n=this.excalidrawContainerRef.current?.contains(r);if(e&&!n)return;let i=document.elementFromPoint(this.lastViewportPosition.x,this.lastViewportPosition.y);if(e&&(!(i instanceof HTMLCanvasElement)||Co(r)))return;let{x:a,y:l}=Ke({clientX:this.lastViewportPosition.x,clientY:this.lastViewportPosition.y},this.state),s=e?.clipboardData?.files[0],c=await Oc(e,o);if(!s&&!o){if(c.mixedContent)return this.addElementsFromMixedContentPaste(c.mixedContent,{isPlainPaste:o,sceneX:a,sceneY:l});if(c.text){let d=c.text.trim();d.startsWith("<svg")&&d.endsWith("</svg>")&&(s=rp(d))}}if(_c(s)&&!c.spreadsheet){if(!this.isToolSupported("image")){this.setState({errorMessage:g("errors.imageToolNotSupported")});return}let d=this.createImageElement({sceneX:a,sceneY:l});this.insertImageElement(d,s),this.initializeImageDimensions(d),this.setState({selectedElementIds:Be({[d.id]:!0},this.state)});return}if(this.props.onPaste)try{if(await this.props.onPaste(c,e)===!1)return}catch(d){console.error(d)}if(c.errorMessage)this.setState({errorMessage:c.errorMessage});else if(c.spreadsheet&&!o)this.setState({pasteDialog:{data:c.spreadsheet,shown:!0}});else if(c.elements){let d=c.programmaticAPI?Is(c.elements):c.elements;this.addElementsFromPasteOrLibrary({elements:d,files:c.files||null,position:"cursor",retainSeed:o})}else if(c.text){let d=H1(c.text).split(/\n+/).map(p=>p.trim()).filter(Boolean),m=d.map(p=>_b(p)).filter(p=>Zi(p,this.props.validateEmbeddable)&&(/^(http|https):\/\/[^\s/$.?#].[^\s]*$/.test(p)||qn(p)?.type==="video"));if(!xu&&m.length>0&&m.length===d.length){let p=[];for(let f of m){let b=p[p.length-1],x=this.insertEmbeddableElement({sceneX:b?b.x+b.width+20:a,sceneY:l,link:Br(f)});x&&p.push(x)}p.length&&this.setState({selectedElementIds:Object.fromEntries(p.map(f=>[f.id,!0]))});return}this.addTextFromPaste(c.text,o)}this.setActiveTool({type:"selection"}),e?.preventDefault()});addElementsFromPasteOrLibrary=e=>{let o=Qu(e.elements,null,void 0),[r,n,i,a]=Ye(o),l=Kn(r,i)/2,s=Kn(n,a)/2,c=typeof e.position=="object"?e.position.clientX:e.position==="cursor"?this.lastViewportPosition.x:this.state.width/2+this.state.offsetLeft,d=typeof e.position=="object"?e.position.clientY:e.position==="cursor"?this.lastViewportPosition.y:this.state.height/2+this.state.offsetTop,{x:m,y:p}=Ke({clientX:c,clientY:d},this.state),f=m-l,b=p-s,[x,y]=Qt(f,b,this.state.gridSize),S=kc(o.map(I=>me(I,{x:I.x+x-r,y:I.y+y-n})),{randomizeSeed:!e.retainSeed}),w=[...this.scene.getElementsIncludingDeleted(),...S];po(w,xe(S));let M=this.getTopLayerFrameAtSceneCoords({x:m,y:p});if(M){let I=p0(S,M);zc(w,I,M)}this.scene.replaceAllElements(w),S.forEach(I=>{if(le(I)&&bt(I)){let _=Dr(I,this.scene.getElementsMapIncludingDeleted());$t(I,_,this.scene.getElementsMapIncludingDeleted())}}),e.files&&(this.files={...this.files,...e.files}),this.history.resumeRecording();let B=ea(S);this.setState({...this.state,openSidebar:this.state.openSidebar&&this.device.editor.canFitSidebar&&Wt.get(Ts)?this.state.openSidebar:null,...Dt({editingGroupId:null,selectedElementIds:B.reduce((I,_)=>(bt(_)||(I[_.id]=!0),I),{})},this.scene.getNonDeletedElements(),this.state,this)},()=>{e.files&&this.addNewImagesToImageCache()}),this.setActiveTool({type:"selection"}),e.fitToContent&&this.scrollToContent(S,{fitToContent:!0})};async addElementsFromMixedContentPaste(e,{isPlainPaste:o,sceneX:r,sceneY:n}){if(!o&&e.some(i=>i.type==="imageUrl")&&this.isToolSupported("image")){let i=e.filter(m=>m.type==="imageUrl").map(m=>m.value),a=await Promise.all(i.map(async m=>{try{return{file:await Nb(m)}}catch(p){let f=p.message;return p.cause==="FETCH_ERROR"?f=g("errors.failedToFetchImage"):p.cause==="UNSUPPORTED"&&(f=g("errors.unsupportedFileType")),{errorMessage:f}}})),l=n,s=!1,c={};for(let m of a)if(m.file){let p=this.createImageElement({sceneX:r,sceneY:l}),f=await this.insertImageElement(p,m.file);f&&(s||(s=!0,l-=f.height/2),oe(f,{y:l},!1),l=p.y+p.height+25,c[p.id]=!0)}this.setState({selectedElementIds:Be(c,this.state)});let d=a.find(m=>!!m.errorMessage);d&&d.errorMessage&&this.setState({errorMessage:d.errorMessage})}else{let i=e.filter(a=>a.type==="text");i.length&&this.addTextFromPaste(i.map(a=>a.value).join(`
|
|
166
166
|
|
|
167
167
|
`),o)}}addTextFromPaste(e,o=!1){let{x:r,y:n}=Ke({clientX:this.lastViewportPosition.x,clientY:this.lastViewportPosition.y},this.state),i={x:r,y:n,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roundness:null,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,text:e,fontSize:this.state.currentItemFontSize,fontFamily:this.state.currentItemFontFamily,textAlign:this.state.currentItemTextAlign,verticalAlign:Lu,locked:!1},a=10,l=n,s=o?[e]:e.split(`
|
|
168
|
-
`),c=s.reduce((d,m,p)=>{let f=m.trim(),b=Nr(i.fontFamily);if(f.length){let x=this.getTopLayerFrameAtSceneCoords({x:r,y:l}),y=fn({...i,x:r,y:l,text:f,lineHeight:b,frameId:x?x.id:null});d.push(y),l+=y.height+a}else s[p-1]?.trim()&&(l+=rb(i.fontSize,b)+a);return d},[]);c.length!==0&&(this.scene.insertElements(c),this.setState({selectedElementIds:Be(Object.fromEntries(c.map(d=>[d.id,!0])),this.state)}),!o&&c.length>1&&q5===!1&&!this.device.editor.isMobile&&(this.setToast({message:g("toast.pasteAsSingleElement",{shortcut:N("CtrlOrCmd+Shift+V")}),duration:5e3}),q5=!0),this.history.resumeRecording())}setAppState=(e,o)=>{this.setState(e,o)};removePointer=e=>{Hn&&this.resetContextMenuTimer(),Le.pointers.delete(e.pointerId)};toggleLock=(e="ui")=>{this.state.activeTool.locked||ge("toolbar","toggleLock",`${e} (${this.device.editor.isMobile?"mobile":"desktop"})`),this.setState(o=>({activeTool:{...o.activeTool,...nt(this.state,o.activeTool.locked?{type:"selection"}:o.activeTool),locked:!o.activeTool.locked}}))};updateFrameRendering=e=>{this.setState(o=>{let r=typeof e=="function"?e(o.frameRendering):e;return{frameRendering:{enabled:r?.enabled??o.frameRendering.enabled,clip:r?.clip??o.frameRendering.clip,name:r?.name??o.frameRendering.name,outline:r?.outline??o.frameRendering.outline}}})};togglePenMode=e=>{this.setState(o=>({penMode:e??!o.penMode,penDetected:!0}))};onHandToolToggle=()=>{this.actionManager.executeAction(Yy)};zoomCanvas=e=>{this.setState({...$r({viewportX:this.state.width/2+this.state.offsetLeft,viewportY:this.state.height/2+this.state.offsetTop,nextZoom:Hr(e)},this.state)})};cancelInProgressAnimation=null;scrollToContent=(e=this.scene.getNonDeletedElements(),o)=>{this.cancelInProgressAnimation?.();let r=Array.isArray(e)?e:[e],n=this.state.zoom,i=this.state.scrollX,a=this.state.scrollY;if(o?.fitToContent||o?.fitToViewport){let{appState:l}=ns({targetElements:r,appState:this.state,fitToViewport:!!o?.fitToViewport,viewportZoomFactor:o?.viewportZoomFactor});n=l.zoom,i=l.scrollX,a=l.scrollY}else{let l=ei(r,this.state);i=l.scrollX,a=l.scrollY}if(o?.animate){let l=this.state.scrollX,s=this.state.scrollY,c=this.state.zoom.value,d=A1({fromValues:{scrollX:l,scrollY:s,zoom:c},toValues:{scrollX:i,scrollY:a,zoom:n.value},interpolateValue:(m,p,f,b)=>{if(b==="zoom")return m*Math.pow(p/m,Vn(f))},onStep:({scrollX:m,scrollY:p,zoom:f})=>{this.setState({scrollX:m,scrollY:p,zoom:{value:f}})},onStart:()=>{this.setState({shouldCacheIgnoreZoom:!0})},onEnd:()=>{this.setState({shouldCacheIgnoreZoom:!1})},onCancel:()=>{this.setState({shouldCacheIgnoreZoom:!1})},duration:o?.duration??500});this.cancelInProgressAnimation=()=>{d(),this.cancelInProgressAnimation=null}}else this.setState({scrollX:i,scrollY:a,zoom:n})};maybeUnfollowRemoteUser=()=>{this.state.userToFollow&&this.setState({userToFollow:null})};translateCanvas=e=>{this.cancelInProgressAnimation?.(),this.maybeUnfollowRemoteUser(),this.setState(e)};setToast=e=>{this.setState({toast:e})};restoreFileFromShare=async()=>{try{let e=await caches.open("web-share-target"),o=await e.match("shared-file");if(o){let r=await o.blob(),n=new File([r],r.name||"",{type:r.type});this.loadFileToCanvas(n,null),await e.delete("shared-file"),window.history.replaceState(null,il,window.location.pathname)}}catch(e){this.setState({errorMessage:e.message})}};addFiles=Je(e=>{let o=e.reduce((r,n)=>(r.set(n.id,n),r),new Map);this.files={...this.files,...Object.fromEntries(o)},this.scene.getNonDeletedElements().forEach(r=>{hl(r)&&o.has(r.fileId)&&(this.imageCache.delete(r.fileId),Mo.delete(r))}),this.scene.informMutation(),this.addNewImagesToImageCache()});updateScene=Je(e=>{e.commitToHistory&&this.history.resumeRecording(),e.appState&&this.setState(e.appState),e.elements&&this.scene.replaceAllElements(e.elements),e.collaborators&&this.setState({collaborators:e.collaborators})});onSceneUpdated=()=>{this.setState({})};toggleSidebar=({name:e,tab:o,force:r})=>{let n;r===void 0?n=this.state.openSidebar?.name===e&&this.state.openSidebar?.tab===o?null:e:n=r?e:null;let i=n?{name:n}:null;return i&&o&&(i.tab=o),this.setState({openSidebar:i}),!!n};updateCurrentCursorPosition=Je(e=>{this.lastViewportPosition.x=e.clientX,this.lastViewportPosition.y=e.clientY});onKeyDown=Je(e=>{if("Proxy"in window&&(!e.shiftKey&&/^[A-Z]$/.test(e.key)||e.shiftKey&&/^[a-z]$/.test(e.key))&&(e=new Proxy(e,{get(i,a){let l=i[a];return typeof l=="function"?l.bind(i):a==="key"?e.shiftKey?i.key.toUpperCase():i.key.toLowerCase():l}})),e[T.CTRL_OR_CMD]&&e.key===T.P&&!e.shiftKey&&!e.altKey){this.setToast({message:g("commandPalette.shortcutHint",{shortcut:Et("commandPalette")})}),e.preventDefault();return}if(e[T.CTRL_OR_CMD]&&e.key.toLowerCase()===T.V&&(xu=e.shiftKey,clearTimeout(X5),X5=window.setTimeout(()=>{xu=!1},100)),e[T.CTRL_OR_CMD]&&Co(e.target)&&(e.code===pe.MINUS||e.code===pe.EQUAL)){e.preventDefault();return}if(Co(e.target)&&e.key!==T.ESCAPE||$i(e.key)&&M1(e.target))return;if(e.key===T.QUESTION_MARK){this.setState({openDialog:{name:"help"}});return}else if(e.key.toLowerCase()===T.E&&e.shiftKey&&e[T.CTRL_OR_CMD]){e.preventDefault(),this.setState({openDialog:{name:"imageExport"}});return}if(e.key===T.PAGE_UP||e.key===T.PAGE_DOWN){let i=(e.shiftKey?this.state.width:this.state.height)/this.state.zoom.value;e.key===T.PAGE_DOWN&&(i=-i),e.shiftKey?this.translateCanvas(a=>({scrollX:a.scrollX+i})):this.translateCanvas(a=>({scrollY:a.scrollY+i}))}if(this.actionManager.handleKeyDown(e)||this.state.viewModeEnabled)return;if(e[T.CTRL_OR_CMD]&&this.state.isBindingEnabled&&this.setState({isBindingEnabled:!1}),$i(e.key)){let i=this.state.gridSize&&(e.shiftKey?Mu:this.state.gridSize)||(e.shiftKey?o1:Mu),a=0,l=0;e.key===T.ARROW_LEFT?a=-i:e.key===T.ARROW_RIGHT?a=i:e.key===T.ARROW_UP?l=-i:e.key===T.ARROW_DOWN&&(l=i);let s=this.scene.getSelectedElements({selectedElementIds:this.state.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});s.forEach(c=>{oe(c,{x:c.x+a,y:c.y+l}),Yu(c,this.scene.getNonDeletedElementsMap(),{simultaneouslyUpdated:s})}),this.maybeSuggestBindingForAll(s),e.preventDefault()}else if(e.key===T.ENTER){let i=this.scene.getSelectedElements(this.state);if(i.length===1){let a=i[0];if(e[T.CTRL_OR_CMD])Ne(a)&&(!this.state.editingLinearElement||this.state.editingLinearElement.elementId!==i[0].id)&&(this.history.resumeRecording(),this.setState({editingLinearElement:new ue(a)}));else if(le(a)||ub(a)){let l;le(a)||(l=a);let s=vc(a,this.state,this.scene.getNonDeletedElementsMap()),c=s.x,d=s.y;this.startTextEditing({sceneX:c,sceneY:d,container:l}),e.preventDefault();return}else Ee(a)&&this.setState({editingFrame:a.id})}}else if(!e.ctrlKey&&!e.altKey&&!e.metaKey&&this.state.draggingElement===null){let i=hw(e.key);i?(this.state.activeTool.type!==i&&ge("toolbar",i,`keyboard (${this.device.editor.isMobile?"mobile":"desktop"})`),this.setActiveTool({type:i}),e.stopPropagation()):e.key===T.Q&&(this.toggleLock("keyboard"),e.stopPropagation())}if(e.key===T.SPACE&&Le.pointers.size===0&&(Ai=!0,Oe(this.interactiveCanvas,De.GRAB),e.preventDefault()),(e.key===T.G||e.key===T.S)&&!e.altKey&&!e[T.CTRL_OR_CMD]){let i=this.scene.getSelectedElements(this.state);if(this.state.activeTool.type==="selection"&&!i.length)return;e.key===T.G&&(un(this.state.activeTool.type)||i.some(a=>un(a.type)))&&(this.setState({openPopup:"elementBackground"}),e.stopPropagation()),e.key===T.S&&(this.setState({openPopup:"elementStroke"}),e.stopPropagation())}if(e.key===T.K&&!e.altKey&&!e[T.CTRL_OR_CMD]){this.state.activeTool.type==="laser"?this.setActiveTool({type:"selection"}):this.setActiveTool({type:"laser"});return}e[T.CTRL_OR_CMD]&&(e.key===T.BACKSPACE||e.key===T.DELETE)&&Wt.set(Ci,"clearCanvas");let o=e.key.toLocaleLowerCase(),r=o===T.S&&e.shiftKey,n=e.key===T.I||o===T.G&&e.shiftKey;(r||n)&&this.openEyeDropper({type:r?"stroke":"background"})});onWheel=Je(e=>{!(e.target instanceof HTMLCanvasElement)&&e.ctrlKey&&e.preventDefault()});onKeyUp=Je(e=>{if(e.key===T.SPACE&&(this.state.viewModeEnabled?Oe(this.interactiveCanvas,De.GRAB):this.state.activeTool.type==="selection"?Io(this.interactiveCanvas):(jo(this.interactiveCanvas,this.state),this.setState({selectedElementIds:Be({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})),Ai=!1),!e[T.CTRL_OR_CMD]&&!this.state.isBindingEnabled&&this.setState({isBindingEnabled:!0}),$i(e.key)){let o=this.scene.getSelectedElements(this.state),r=this.scene.getNonDeletedElementsMap();jn(this.state)?El(o,this):Cl(o,r),this.setState({suggestedBindings:[]})}});isToolSupported=e=>this.props.UIOptions.tools?.[e]!==!1;setActiveTool=e=>{if(!this.isToolSupported(e.type)){console.warn(`"${e.type}" tool is disabled via "UIOptions.canvasActions.tools.${e.type}"`);return}let o=nt(this.state,e);o.type==="hand"?Oe(this.interactiveCanvas,De.GRAB):Ai||jo(this.interactiveCanvas,this.state),I1(document.activeElement)&&this.focusContainer(),$1(o.type)||this.setState({suggestedBindings:[]}),o.type==="image"&&this.onImageAction({insertOnCanvasDirectly:(e.type==="image"&&e.insertOnCanvasDirectly)??!1}),this.setState(r=>{let n={snapLines:r.snapLines.length?[]:r.snapLines,originSnapOffset:null,activeEmbeddable:null};return o.type!=="selection"?{...r,activeTool:o,selectedElementIds:Be({},r),selectedGroupIds:Be({},r),editingGroupId:null,multiElement:null,...n}:{...r,activeTool:o,...n}})};setOpenDialog=e=>{this.setState({openDialog:e})};setCursor=e=>{Oe(this.interactiveCanvas,e)};resetCursor=()=>{Io(this.interactiveCanvas)};isTouchScreenMultiTouchGesture=()=>Le.pointers.size>=2;getName=()=>this.state.name||this.props.name||`${g("labels.untitled")}-${Ou()}`;onGestureStart=Je(e=>{e.preventDefault(),this.isTouchScreenMultiTouchGesture()&&this.setState({selectedElementIds:Be({},this.state),activeEmbeddable:null}),Le.initialScale=this.state.zoom.value});onGestureChange=Je(e=>{if(e.preventDefault(),this.isTouchScreenMultiTouchGesture())return;let o=Le.initialScale;o&&this.setState(r=>({...$r({viewportX:this.lastViewportPosition.x,viewportY:this.lastViewportPosition.y,nextZoom:Hr(o*e.scale)},r)}))});onGestureEnd=Je(e=>{e.preventDefault(),this.isTouchScreenMultiTouchGesture()&&this.setState({previousSelectedElementIds:{},selectedElementIds:Be(this.state.previousSelectedElementIds,this.state)}),Le.initialScale=null});handleTextWysiwyg(e,{isExistingElement:o=!1}){let r=this.scene.getElementsMapIncludingDeleted(),n=(i,a,l)=>{this.scene.replaceAllElements([...this.scene.getElementsIncludingDeleted().map(s=>s.id===e.id&&le(s)?Ib(s,Dr(s,r),r,{text:i,isDeleted:l,originalText:a}):s)])};j5({id:e.id,canvas:this.canvas,getViewportCoords:(i,a)=>{let{x:l,y:s}=Jt({sceneX:i,sceneY:a},this.state);return[l-this.state.offsetLeft,s-this.state.offsetTop]},onChange:Je(i=>{n(i,i,!1),yp(e)&&Yu(e,r)}),onSubmit:Je(({text:i,viaKeyboard:a,originalText:l})=>{let s=!i.trim();if(n(i,l,s),!s&&a){let c=e.containerId?e.containerId:e.id;this.setState(d=>({selectedElementIds:Be({...d.selectedElementIds,[c]:!0},d)}))}s&&Wi(this.scene.getNonDeletedElements(),[e]),(!s||o)&&this.history.resumeRecording(),this.setState({draggingElement:null,editingElement:null}),this.state.activeTool.locked&&jo(this.interactiveCanvas,this.state),this.focusContainer()}),element:e,excalidrawContainer:this.excalidrawContainerRef.current,app:this}),this.deselectElements(),n(e.text,e.originalText,!1)}deselectElements(){this.setState({selectedElementIds:Be({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})}getTextElementAtPosition(e,o){let r=this.getElementAtPosition(e,o,{includeBoundTextElement:!0});return r&&le(r)&&!r.isDeleted?r:null}getElementShape(e){switch(e.type){case"rectangle":case"diamond":case"frame":case"magicframe":case"embeddable":case"image":case"iframe":case"text":case"selection":return Wb(e);case"arrow":case"line":{let o=Mo.get(e)?.[0]??Mo.generateElementShape(e,null)[0],[,,,,r,n]=Ut(e,this.scene.getNonDeletedElementsMap());return lp(e)?Yb(o,[e.x,e.y],e.angle,[r,n]):Vb(o,[e.x,e.y],e.angle,[r,n])}case"ellipse":return Gb(e);case"freedraw":{let[,,,,o,r]=Ut(e,this.scene.getNonDeletedElementsMap());return Kb(e,[o,r],lp(e))}}}getBoundTextShape(e){let o=st(e,this.scene.getNonDeletedElementsMap());return o?e.type==="arrow"?this.getElementShape({...o,...ue.getBoundTextElementPosition(e,o,this.scene.getNonDeletedElementsMap())}):this.getElementShape(o):null}getElementAtPosition(e,o,r){let n=this.getElementsAtPosition(e,o,r?.includeBoundTextElement,r?.includeLockedElements);if(n.length>1){if(r?.preferSelected){for(let a=n.length-1;a>-1;a--)if(this.state.selectedElementIds[n[a].id])return n[a]}let i=n[n.length-1];return X1([e,o],this.getElementShape(i))?i:n[n.length-2]}return n.length===1?n[0]:null}getElementsAtPosition(e,o,r=!1,n=!1){let i=[],a=this.scene.getNonDeletedElementsMap();return(r&&n?this.scene.getNonDeletedElements():this.scene.getNonDeletedElements().filter(s=>(n||!s.locked)&&(r||!(le(s)&&s.containerId)))).filter(s=>this.hitElement(e,o,s)).filter(s=>{let c=Bc(s,a);return c&&this.state.frameRendering.enabled&&this.state.frameRendering.clip?dp({x:e,y:o},c,a):!0}).filter(s=>Zn(s)?(i.push(s),!1):!0).concat(i)}getHitThreshold(){return 10/this.state.zoom.value}hitElement(e,o,r,n=!0){return n&&this.state.selectedElementIds[r.id]&&Wc([r],this.state)?Rc(e,o,r,this.scene.getNonDeletedElementsMap(),this.getHitThreshold()):jb(e,o,this.getBoundTextShape(r))?!0:Ll({x:e,y:o,element:r,shape:this.getElementShape(r),threshold:this.getHitThreshold(),frameNameBound:Ee(r)?this.frameNameBoundsCache.get(r):null})}getTextBindableContainerAtPosition(e,o){let r=this.scene.getNonDeletedElements(),n=this.scene.getSelectedElements(this.state);if(n.length===1)return Pr(n[0],!1)?n[0]:null;let i=null;for(let a=r.length-1;a>=0;--a){if(r[a].isDeleted)continue;let[l,s,c,d]=Ut(r[a],this.scene.getNonDeletedElementsMap());if(mr(r[a])&&Ll({x:e,y:o,element:r[a],shape:this.getElementShape(r[a]),threshold:this.getHitThreshold()})){i=r[a];break}else if(l<e&&e<c&&s<o&&o<d){i=r[a];break}}return Pr(i,!1)?i:null}startTextEditing=({sceneX:e,sceneY:o,insertAtParentCenter:r=!0,container:n})=>{let i=!1,a=r&&this.getTextWysiwygSnappedToCenterPosition(e,o,this.state,n);n&&a&&(st(n,this.scene.getNonDeletedElementsMap())||(i=!0));let l=null,s=this.scene.getSelectedElements(this.state);s.length===1?le(s[0])?l=s[0]:n?l=st(s[0],this.scene.getNonDeletedElementsMap()):l=this.getTextElementAtPosition(e,o):l=this.getTextElementAtPosition(e,o);let c=l?.fontFamily||this.state.currentItemFontFamily,d=l?.lineHeight||Nr(c),m=this.state.currentItemFontSize;if(!l&&i&&n&&!mr(n)){let x=lb(Zo({fontSize:m,fontFamily:c}),d),y=nb(m,d),S=Math.max(n.height,y),C=Math.max(n.width,x);oe(n,{height:S,width:C}),e=n.x+C/2,o=n.y+S/2,a&&(a=this.getTextWysiwygSnappedToCenterPosition(e,o,this.state,n))}let p=this.getTopLayerFrameAtSceneCoords({x:e,y:o}),f=l||fn({x:a?a.elementCenterX:e,y:a?a.elementCenterY:o,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,text:"",fontSize:m,fontFamily:c,textAlign:a?"center":this.state.currentItemTextAlign,verticalAlign:a?yo.MIDDLE:Lu,containerId:i?n?.id:void 0,groupIds:n?.groupIds??[],lineHeight:d,angle:n?.angle??0,frameId:p?p.id:null});if(!l&&i&&n&&oe(n,{boundElements:(n.boundElements||[]).concat({type:"text",id:f.id})}),this.setState({editingElement:f}),!l)if(n&&i){let b=this.scene.getElementIndex(n.id);this.scene.insertElementAtIndex(f,b+1)}else this.scene.insertElement(f);this.setState({editingElement:f}),this.handleTextWysiwyg(f,{isExistingElement:!!l})};handleCanvasDoubleClick=e=>{if(this.state.multiElement||this.state.activeTool.type!=="selection")return;let o=this.scene.getSelectedElements(this.state);if(o.length===1&&Ne(o[0])&&e[T.CTRL_OR_CMD]&&(!this.state.editingLinearElement||this.state.editingLinearElement.elementId!==o[0].id)){this.history.resumeRecording(),this.setState({editingLinearElement:new ue(o[0])});return}Io(this.interactiveCanvas);let{x:r,y:n}=Ke(e,this.state);if(Fr(this.state).length>0){let a=this.getElementAtPosition(r,n),l=a&&vb(a,this.state.selectedGroupIds);if(l){this.setState(s=>({...s,...Dt({editingGroupId:l,selectedElementIds:{[a.id]:!0}},this.scene.getNonDeletedElements(),s,this)}));return}}if(Io(this.interactiveCanvas),!e[T.CTRL_OR_CMD]&&!this.state.viewModeEnabled){let a=this.getElementAtPosition(r,n);if(Oi(a)){this.setState({activeEmbeddable:{element:a,state:"active"}});return}let l=this.getTextBindableContainerAtPosition(r,n);if(l&&(ur(l)||!Yn(l.backgroundColor)||Ll({x:r,y:n,element:l,shape:this.getElementShape(l),threshold:this.getHitThreshold()}))){let s=vc(l,this.state,this.scene.getNonDeletedElementsMap());r=s.x,n=s.y}this.startTextEditing({sceneX:r,sceneY:n,insertAtParentCenter:!e.altKey,container:l})}};getElementLinkAtPosition=(e,o)=>{let r=this.scene.getNonDeletedElements().slice().reverse(),n=1/0;return r.find((i,a)=>(o&&i.id===o.id&&(n=a),i.link&&a<=n&&Dc(i,this.scene.getNonDeletedElementsMap(),this.state,[e.x,e.y],this.device.editor.isMobile)))};redirectToLink=(e,o)=>{let r=mn(this.lastPointerDownEvent.clientX,this.lastPointerDownEvent.clientY,this.lastPointerUpEvent.clientX,this.lastPointerUpEvent.clientY);if(!this.hitLinkElement||o&&r>Un||!o&&r!==0)return;let n=Ke(this.lastPointerDownEvent,this.state),i=this.scene.getNonDeletedElementsMap(),a=Dc(this.hitLinkElement,i,this.state,[n.x,n.y],this.device.editor.isMobile),l=Ke(this.lastPointerUpEvent,this.state),s=Dc(this.hitLinkElement,i,this.state,[l.x,l.y],this.device.editor.isMobile);if(a&&s){let c=this.hitLinkElement.link;if(c){c=Br(c);let d;if(this.props.onLinkOpen&&(d=sc("excalidraw-link",e.nativeEvent),this.props.onLinkOpen({...this.hitLinkElement,link:c},d)),!d?.defaultPrevented){let m=wc(c)?"_self":"_blank",p=window.open(void 0,m);p&&(p.opener=null,p.location=c)}}}};getTopLayerFrameAtSceneCoords=e=>{let o=this.scene.getNonDeletedElementsMap(),r=this.scene.getNonDeletedFramesLikes().filter(n=>dp(e,n,o));return r.length?r[r.length-1]:null};handleCanvasPointerMove=e=>{this.savePointer(e.clientX,e.clientY,this.state.cursorButton),this.lastPointerMoveEvent=e.nativeEvent,Le.pointers.has(e.pointerId)&&Le.pointers.set(e.pointerId,{x:e.clientX,y:e.clientY});let o=Le.initialScale;if(Le.pointers.size===2&&Le.lastCenter&&o&&Le.initialDistance){let p=Bh(Le.pointers),f=p.x-Le.lastCenter.x,b=p.y-Le.lastCenter.y;Le.lastCenter=p;let x=zh(Array.from(Le.pointers.values())),y=this.state.activeTool.type==="freedraw"&&this.state.penMode?1:x/Le.initialDistance,S=y?Hr(o*y):this.state.zoom.value;this.setState(C=>{let w=$r({viewportX:p.x,viewportY:p.y,nextZoom:S},C);this.translateCanvas({zoom:w.zoom,scrollX:w.scrollX+f/S,scrollY:w.scrollY+b/S,shouldCacheIgnoreZoom:!0})}),this.resetShouldCacheIgnoreZoomDebounced()}else Le.lastCenter=Le.initialDistance=Le.initialScale=null;if(Ai||Bs||Ig||Or(this.state))return;let n=Wh(Mg,e.clientX-this.state.offsetLeft,e.clientY-this.state.offsetTop).isOverEither;!this.state.draggingElement&&!this.state.multiElement&&(n?Io(this.interactiveCanvas):jo(this.interactiveCanvas,this.state));let i=Ke(e,this.state),{x:a,y:l}=i;if(!this.state.draggingElement&&k5(this.state.activeTool.type)){let{originOffset:p,snapLines:f}=S5(this.scene.getNonDeletedElements(),this.state,{x:a,y:l},e,this.scene.getNonDeletedElementsMap());this.setState(b=>{let x=dc(b.snapLines,f),y=b.originSnapOffset?dc(b.originSnapOffset,p):p;return b.snapLines===x&&b.originSnapOffset===y?null:{snapLines:x,originSnapOffset:y}})}else this.state.draggingElement||this.setState(p=>p.snapLines.length?{snapLines:[]}:null);if(this.state.editingLinearElement&&!this.state.editingLinearElement.isDragging){let p=ue.handlePointerMove(e,a,l,this.state,this.scene.getNonDeletedElementsMap());p&&p!==this.state.editingLinearElement&&(0,vu.flushSync)(()=>{this.setState({editingLinearElement:p})}),p?.lastUncommittedPoint!=null?this.maybeSuggestBindingAtCursor(i):(0,vu.flushSync)(()=>{this.setState({suggestedBindings:[]})})}if(U1(this.state.activeTool.type)){let{draggingElement:p}=this.state;Lr(p,!1)?this.maybeSuggestBindingsForLinearElementAtCoords(p,[i],this.state.startBoundElement):this.maybeSuggestBindingAtCursor(i)}if(this.state.multiElement){let{multiElement:p}=this.state,{x:f,y:b}=p,{points:x,lastCommittedPoint:y}=p,S=x[x.length-1];if(jo(this.interactiveCanvas,this.state),S===y)mn(a-f,l-b,S[0],S[1])>=Zs?oe(p,{points:[...x,[a-f,l-b]]}):Oe(this.interactiveCanvas,De.POINTER);else if(x.length>2&&y&&mn(a-f,l-b,y[0],y[1])<Zs)Oe(this.interactiveCanvas,De.POINTER),oe(p,{points:x.slice(0,-1)});else{let[C,w]=Qt(a,l,e[T.CTRL_OR_CMD]?null:this.state.gridSize),[M,B]=p?.lastCommittedPoint??[0,0],I=C-f-M,_=w-b-B;pc(e)&&({width:I,height:_}=pp(M+f,B+b,C,w)),bl(x,this.state.zoom.value)&&Oe(this.interactiveCanvas,De.POINTER),oe(p,{points:[...x.slice(0,-1),[M+I,B+_]]})}return}if(!!e.buttons||this.state.activeTool.type!=="selection"&&this.state.activeTool.type!=="text"&&this.state.activeTool.type!=="eraser")return;let c=this.scene.getNonDeletedElements(),d=this.scene.getSelectedElements(this.state);if(d.length===1&&!n&&!this.state.editingLinearElement){let p=fp(c,this.state,a,l,this.state.zoom,e.pointerType,this.scene.getNonDeletedElementsMap());if(p&&p.transformHandleType){Oe(this.interactiveCanvas,gp(p));return}}else if(d.length>1&&!n){let p=hp(Ye(d),a,l,this.state.zoom,e.pointerType);if(p){Oe(this.interactiveCanvas,gp({transformHandleType:p}));return}}let m=this.getElementAtPosition(i.x,i.y);this.hitLinkElement=this.getElementLinkAtPosition(i,m),!ko(this.state)&&(this.hitLinkElement&&!this.state.selectedElementIds[this.hitLinkElement.id]?(Oe(this.interactiveCanvas,De.POINTER),gE(this.hitLinkElement,this.state,this.scene.getNonDeletedElementsMap())):(bE(),m&&(m.link||Ht(m))&&this.state.selectedElementIds[m.id]&&!this.state.contextMenu&&!this.state.showHyperlinkPopup?this.setState({showHyperlinkPopup:"info"}):this.state.activeTool.type==="text"?Oe(this.interactiveCanvas,le(m)?De.TEXT:De.CROSSHAIR):this.state.viewModeEnabled?Oe(this.interactiveCanvas,De.GRAB):n?Oe(this.interactiveCanvas,De.AUTO):this.state.selectedLinearElement?this.handleHoverSelectedLinearElement(this.state.selectedLinearElement,a,l):e[T.CTRL_OR_CMD]?Oe(this.interactiveCanvas,De.AUTO):(m||this.isHittingCommonBoundingBoxOfSelectedElements(i,d))&&!m?.locked&&(m&&Oi(m)&&this.isIframeLikeElementCenter(m,e,a,l)?(Oe(this.interactiveCanvas,De.POINTER),this.setState({activeEmbeddable:{element:m,state:"hover"}})):(Oe(this.interactiveCanvas,De.MOVE),this.state.activeEmbeddable?.state==="hover"&&this.setState({activeEmbeddable:null})))))};handleEraser=(e,o,r)=>{this.eraserTrail.addPointToPath(r.x,r.y);let n=!1,i=new Set,a=this.scene.getNonDeletedElements(),l=p=>{for(let f of p){if(f.locked)return;if(e.altKey?this.elementsPendingErasure.delete(f.id)&&(n=!0):this.elementsPendingErasure.has(f.id)||(n=!0,this.elementsPendingErasure.add(f.id)),n&&f.groupIds?.length){let b=f.groupIds.at(-1);if(!i.has(b)){i.add(b);let x=pt(a,b);for(let y of x)e.altKey?this.elementsPendingErasure.delete(y.id):this.elementsPendingErasure.add(y.id)}}}},s=mn(o.lastCoords.x,o.lastCoords.y,r.x,r.y),c=this.getHitThreshold(),d={...o.lastCoords},m=0;for(;m<=s;){let p=this.getElementsAtPosition(d.x,d.y);if(l(p),m===s)break;m=Math.min(m+c,s);let f=m/s,b=(1-f)*d.x+f*r.x,x=(1-f)*d.y+f*r.y;d.x=b,d.y=x}if(o.lastCoords.x=r.x,o.lastCoords.y=r.y,n){for(let p of this.scene.getNonDeletedElements())bt(p)&&(this.elementsPendingErasure.has(p.id)||this.elementsPendingErasure.has(p.containerId))&&(e.altKey?(this.elementsPendingErasure.delete(p.id),this.elementsPendingErasure.delete(p.containerId)):(this.elementsPendingErasure.add(p.id),this.elementsPendingErasure.add(p.containerId)));this.elementsPendingErasure=new Set(this.elementsPendingErasure),this.onSceneUpdated()}};handleTouchMove=e=>{zs=!0};handleHoverSelectedLinearElement(e,o,r){let n=this.scene.getNonDeletedElementsMap(),i=ue.getElement(e.elementId,n);if(i)if(this.state.selectedLinearElement){let a=-1,l=null;Ll({x:o,y:r,element:i,shape:this.getElementShape(i)})?(a=ue.getPointIndexUnderCursor(i,n,this.state.zoom,o,r),l=ue.getSegmentMidpointHitCoords(e,{x:o,y:r},this.state,this.scene.getNonDeletedElementsMap()),a>=0||l?Oe(this.interactiveCanvas,De.POINTER):Oe(this.interactiveCanvas,De.MOVE)):this.hitElement(o,r,i)&&Oe(this.interactiveCanvas,De.MOVE),this.state.selectedLinearElement.hoverPointIndex!==a&&this.setState({selectedLinearElement:{...this.state.selectedLinearElement,hoverPointIndex:a}}),ue.arePointsEqual(this.state.selectedLinearElement.segmentMidPointHoveredCoords,l)||this.setState({selectedLinearElement:{...this.state.selectedLinearElement,segmentMidPointHoveredCoords:l}})}else Oe(this.interactiveCanvas,De.AUTO)}handleCanvasPointerDown=e=>{if(this.maybeCleanupAfterMissingPointerUp(e.nativeEvent),this.maybeUnfollowRemoteUser(),this.state.contextMenu&&this.setState({contextMenu:null}),this.state.snapLines&&this.setAppState({snapLines:[]}),this.updateGestureOnPointerDown(e),e.pointerType==="touch"&&this.state.draggingElement&&this.state.draggingElement.type==="freedraw"){let c=this.state.draggingElement;this.updateScene({...c.points.length<10?{elements:this.scene.getElementsIncludingDeleted().filter(d=>d.id!==c.id)}:{},appState:{draggingElement:null,editingElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:Be(Object.keys(this.state.selectedElementIds).filter(d=>d!==c.id).reduce((d,m)=>(d[m]=this.state.selectedElementIds[m],d),{}),this.state)}});return}let o=document.getSelection();if(o?.anchorNode&&o.removeAllRanges(),this.maybeOpenContextMenuAfterPointerDownOnTouchDevices(e),!this.state.penDetected&&e.pointerType==="pen"&&this.setState(c=>({penMode:!0,penDetected:!0})),!this.device.isTouchScreen&&["pen","touch"].includes(e.pointerType)&&(this.device=Di(this.device,{isTouchScreen:!0})),Bs||(this.lastPointerDownEvent=e,this.handleCanvasPanUsingWheelOrSpaceDrag(e)))return;if(this.setState({lastPointerDownWith:e.pointerType,cursorButton:"down"}),this.savePointer(e.clientX,e.clientY,"down"),e.button===nn.ERASER&&this.state.activeTool.type!==ut.eraser){this.setState({activeTool:nt(this.state,{type:ut.eraser,lastActiveToolBeforeEraser:this.state.activeTool})},()=>{this.handleCanvasPointerDown(e);let c=()=>{d(),m?.(),ko(this.state)&&this.setState({activeTool:nt(this.state,{...this.state.activeTool.lastActiveTool||{type:ut.selection},lastActiveToolBeforeEraser:null})})},d=it(window,"pointerup",c,{once:!0}),m;requestAnimationFrame(()=>{m=this.missingPointerEventCleanupEmitter.once(c)})});return}if(e.button!==nn.MAIN&&e.button!==nn.TOUCH&&e.button!==nn.ERASER||Le.pointers.size>1)return;let r=this.initialPointerDownState(e);if(this.setState({selectedElementsAreBeingDragged:!1}),this.handleDraggingScrollBar(e,r)||(this.clearSelectionIfNotUsingSelection(),this.updateBindingEnabledOnPointerMove(e),this.handleSelectionOnPointerDown(e,r))||!(!this.state.penMode||e.pointerType!=="touch"||this.state.activeTool.type==="selection"||this.state.activeTool.type==="text"||this.state.activeTool.type==="image"))return;if(this.state.activeTool.type==="text"){this.handleTextOnPointerDown(e,r);return}else if(this.state.activeTool.type==="arrow"||this.state.activeTool.type==="line")this.handleLinearElementOnPointerDown(e,this.state.activeTool.type,r);else if(this.state.activeTool.type==="image"){Oe(this.interactiveCanvas,De.CROSSHAIR);let c=this.state.pendingImageElementId&&this.scene.getElement(this.state.pendingImageElementId);if(!c)return;this.setState({draggingElement:c,editingElement:c,pendingImageElementId:null,multiElement:null});let{x:d,y:m}=Ke(e,this.state),p=this.getTopLayerFrameAtSceneCoords({x:d,y:m});oe(c,{x:d,y:m,frameId:p?p.id:null})}else this.state.activeTool.type==="freedraw"?this.handleFreeDrawElementOnPointerDown(e,this.state.activeTool.type,r):this.state.activeTool.type==="custom"?jo(this.interactiveCanvas,this.state):this.state.activeTool.type===ut.frame||this.state.activeTool.type===ut.magicframe?this.createFrameElementOnPointerDown(r,this.state.activeTool.type):this.state.activeTool.type==="laser"?this.laserTrails.startPath(r.lastCoords.x,r.lastCoords.y):this.state.activeTool.type!=="eraser"&&this.state.activeTool.type!=="hand"&&this.createGenericElementOnPointerDown(this.state.activeTool.type,r);this.props?.onPointerDown?.(this.state.activeTool,r),this.onPointerDownEmitter.trigger(this.state.activeTool,r,e),this.state.activeTool.type==="eraser"&&this.eraserTrail.startPath(r.lastCoords.x,r.lastCoords.y);let i=this.onPointerMoveFromPointerDownHandler(r),a=this.onPointerUpFromPointerDownHandler(r),l=this.onKeyDownFromPointerDownHandler(r),s=this.onKeyUpFromPointerDownHandler(r);this.missingPointerEventCleanupEmitter.once(c=>a(c||e.nativeEvent)),(!this.state.viewModeEnabled||this.state.activeTool.type==="laser")&&(window.addEventListener("pointermove",i),window.addEventListener("pointerup",a),window.addEventListener("keydown",l),window.addEventListener("keyup",s),r.eventListeners.onMove=i,r.eventListeners.onUp=a,r.eventListeners.onKeyUp=s,r.eventListeners.onKeyDown=l)};handleCanvasPointerUp=e=>{this.removePointer(e),this.lastPointerUpEvent=e;let o=Ke({clientX:e.clientX,clientY:e.clientY},this.state),r=e.timeStamp-(this.lastPointerDownEvent?.timeStamp??0);if(this.device.editor.isMobile&&r<300){let n=this.getElementAtPosition(o.x,o.y);if(Oi(n)&&this.isIframeLikeElementCenter(n,e,o.x,o.y)){this.handleEmbeddableCenterClick(n);return}}if(this.device.isTouchScreen){let n=this.getElementAtPosition(o.x,o.y);this.hitLinkElement=this.getElementLinkAtPosition(o,n)}this.hitLinkElement&&!this.state.selectedElementIds[this.hitLinkElement.id]?r<300&&Oi(this.hitLinkElement)&&!qb(this.hitLinkElement,this.scene.getNonDeletedElementsMap(),this.state,[o.x,o.y])?this.handleEmbeddableCenterClick(this.hitLinkElement):this.redirectToLink(e,this.device.isTouchScreen):this.state.viewModeEnabled&&this.setState({activeEmbeddable:null,selectedElementIds:{}})};maybeOpenContextMenuAfterPointerDownOnTouchDevices=e=>{e.pointerType==="touch"&&(zs=!1,Hn?zs=!0:Hn=window.setTimeout(()=>{Hn=0,zs||this.handleCanvasContextMenu(e)},u1))};resetContextMenuTimer=()=>{clearTimeout(Hn),Hn=0,zs=!1};maybeCleanupAfterMissingPointerUp=e=>{Hs?.(),this.missingPointerEventCleanupEmitter.trigger(e).clear()};handleCanvasPanUsingWheelOrSpaceDrag=e=>{if(!(Le.pointers.size<=1&&(e.button===nn.WHEEL||e.button===nn.MAIN&&Ai||Or(this.state)||this.state.viewModeEnabled))||le(this.state.editingElement))return!1;Bs=!0,e.preventDefault();let o=!1,r=typeof window===void 0?!1:/Linux/.test(window.navigator.platform);Oe(this.interactiveCanvas,De.GRABBING);let{clientX:n,clientY:i}=e,a=du(s=>{let c=n-s.clientX,d=i-s.clientY;if(n=s.clientX,i=s.clientY,r&&!o&&(Math.abs(c)>1||Math.abs(d)>1)){o=!0;let m=f=>{document.body.removeEventListener("paste",m),f.stopPropagation()},p=()=>{setTimeout(()=>{document.body.removeEventListener("paste",m),window.removeEventListener("pointerup",p)},100)};document.body.addEventListener("paste",m),window.addEventListener("pointerup",p)}this.translateCanvas({scrollX:this.state.scrollX-c/this.state.zoom.value,scrollY:this.state.scrollY-d/this.state.zoom.value})}),l=Je(Hs=()=>{Hs=null,Bs=!1,Ai||(this.state.viewModeEnabled?Oe(this.interactiveCanvas,De.GRAB):jo(this.interactiveCanvas,this.state)),this.setState({cursorButton:"up"}),this.savePointer(e.clientX,e.clientY,"up"),window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",l),window.removeEventListener("blur",l),a.flush()});return window.addEventListener("blur",l),window.addEventListener("pointermove",a,{passive:!0}),window.addEventListener("pointerup",l),!0};updateGestureOnPointerDown(e){Le.pointers.set(e.pointerId,{x:e.clientX,y:e.clientY}),Le.pointers.size===2&&(Le.lastCenter=Bh(Le.pointers),Le.initialScale=this.state.zoom.value,Le.initialDistance=zh(Array.from(Le.pointers.values())))}initialPointerDownState(e){let o=Ke(e,this.state),r=this.scene.getSelectedElements(this.state),[n,i,a,l]=Ye(r);return{origin:o,withCmdOrCtrl:e[T.CTRL_OR_CMD],originInGrid:ul(Qt(o.x,o.y,e[T.CTRL_OR_CMD]?null:this.state.gridSize)),scrollbars:Wh(Mg,e.clientX-this.state.offsetLeft,e.clientY-this.state.offsetTop),lastCoords:{...o},originalElements:this.scene.getNonDeletedElements().reduce((s,c)=>(s.set(c.id,Yi(c)),s),new Map),resize:{handleType:!1,isResizing:!1,offset:{x:0,y:0},arrowDirection:"origin",center:{x:(a+n)/2,y:(l+i)/2}},hit:{element:null,allHitElements:[],wasAddedToSelection:!1,hasBeenDuplicated:!1,hasHitCommonBoundingBoxOfSelectedElements:this.isHittingCommonBoundingBoxOfSelectedElements(o,r)},drag:{hasOccurred:!1,offset:null},eventListeners:{onMove:null,onUp:null,onKeyUp:null,onKeyDown:null},boxSelection:{hasOccurred:!1}}}handleDraggingScrollBar(e,o){if(!(o.scrollbars.isOverEither&&!this.state.multiElement))return!1;Ig=!0,o.lastCoords.x=e.clientX,o.lastCoords.y=e.clientY;let r=du(i=>{i.target instanceof HTMLElement&&this.handlePointerMoveOverScrollbars(i,o)}),n=Je(()=>{Hs=null,Ig=!1,jo(this.interactiveCanvas,this.state),this.setState({cursorButton:"up"}),this.savePointer(e.clientX,e.clientY,"up"),window.removeEventListener("pointermove",r),window.removeEventListener("pointerup",n),r.flush()});return Hs=n,window.addEventListener("pointermove",r),window.addEventListener("pointerup",n),!0}clearSelectionIfNotUsingSelection=()=>{this.state.activeTool.type!=="selection"&&this.setState({selectedElementIds:Be({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})};handleSelectionOnPointerDown=(e,o)=>{if(this.state.activeTool.type==="selection"){let r=this.scene.getNonDeletedElements(),n=this.scene.getNonDeletedElementsMap(),i=this.scene.getSelectedElements(this.state);if(i.length===1&&!this.state.editingLinearElement){let a=fp(r,this.state,o.origin.x,o.origin.y,this.state.zoom,e.pointerType,this.scene.getNonDeletedElementsMap());a!=null&&(this.setState({resizingElement:a.element}),o.resize.handleType=a.transformHandleType)}else i.length>1&&(o.resize.handleType=hp(Ye(i),o.origin.x,o.origin.y,this.state.zoom,e.pointerType));if(o.resize.handleType)o.resize.isResizing=!0,o.resize.offset=ul(S0(o.resize.handleType,i,n,o.origin.x,o.origin.y)),i.length===1&&Ne(i[0])&&i[0].points.length===2&&(o.resize.arrowDirection=k0(o.resize.handleType,i[0]));else{if(this.state.selectedLinearElement){let s=this.state.editingLinearElement||this.state.selectedLinearElement,c=ue.handlePointerDown(e,this.state,this.history,o.origin,s,this);if(c.hitElement&&(o.hit.element=c.hitElement),c.linearElementEditor&&(this.setState({selectedLinearElement:c.linearElementEditor}),this.state.editingLinearElement&&this.setState({editingLinearElement:c.linearElementEditor})),c.didAddPoint)return!0}if(o.hit.element=o.hit.element??this.getElementAtPosition(o.origin.x,o.origin.y),o.hit.element&&this.getElementLinkAtPosition({x:o.origin.x,y:o.origin.y},o.hit.element))return!1;o.hit.allHitElements=this.getElementsAtPosition(o.origin.x,o.origin.y);let a=o.hit.element,l=o.hit.allHitElements.some(s=>this.isASelectedElement(s));if((a===null||!l)&&!e.shiftKey&&!o.hit.hasHitCommonBoundingBoxOfSelectedElements&&this.clearSelection(a),this.state.editingLinearElement)this.setState({selectedElementIds:Be({[this.state.editingLinearElement.elementId]:!0},this.state)});else if(a!=null){if(e[T.CTRL_OR_CMD])return this.state.selectedElementIds[a.id]||(o.hit.wasAddedToSelection=!0),this.setState(s=>({...xb(s,a),previousSelectedElementIds:this.state.selectedElementIds})),!1;this.state.selectedElementIds[a.id]||(this.state.editingGroupId&&!Ki(a,this.state.editingGroupId)&&this.setState({selectedElementIds:Be({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null}),!l&&!o.hit.hasHitCommonBoundingBoxOfSelectedElements&&(this.setState(s=>{let c={...s.selectedElementIds,[a.id]:!0},d=[];if(Object.keys(s.selectedElementIds).forEach(m=>{let p=this.scene.getElement(m);p&&d.push(p)}),Ee(a))hn(d,a.id).forEach(m=>{delete c[m.id]});else if(a.frameId)c[a.frameId]&&delete c[a.id];else{let m=a.groupIds,p=new Set(m.flatMap(f=>pt(this.scene.getNonDeletedElements(),f)).filter(f=>Ee(f)).map(f=>f.id));p.size>0&&d.forEach(f=>{f.frameId&&p.has(f.frameId)&&(delete c[f.id],f.groupIds.flatMap(b=>pt(this.scene.getNonDeletedElements(),b)).forEach(b=>{delete c[b.id]}))})}return{...Dt({editingGroupId:s.editingGroupId,selectedElementIds:c},this.scene.getNonDeletedElements(),s,this),showHyperlinkPopup:a.link||Ht(a)?"info":!1}}),o.hit.wasAddedToSelection=!0))}this.setState({previousSelectedElementIds:this.state.selectedElementIds})}}return!1};isASelectedElement(e){return e!=null&&this.state.selectedElementIds[e.id]}isHittingCommonBoundingBoxOfSelectedElements(e,o){if(o.length<2)return!1;let r=this.getHitThreshold(),[n,i,a,l]=Ye(o);return e.x>n-r&&e.x<a+r&&e.y>i-r&&e.y<l+r}handleTextOnPointerDown=(e,o)=>{if(le(this.state.editingElement))return;let r=o.origin.x,n=o.origin.y,i=this.getElementAtPosition(r,n,{includeBoundTextElement:!0}),a=this.getTextBindableContainerAtPosition(r,n);ur(i)&&(a=i,r=i.x+i.width/2,n=i.y+i.height/2),this.startTextEditing({sceneX:r,sceneY:n,insertAtParentCenter:!e.altKey,container:a}),Io(this.interactiveCanvas),this.state.activeTool.locked||this.setState({activeTool:nt(this.state,{type:"selection"})})};handleFreeDrawElementOnPointerDown=(e,o,r)=>{let[n,i]=Qt(r.origin.x,r.origin.y,null),a=this.getTopLayerFrameAtSceneCoords({x:n,y:i}),l=Mb({type:o,x:n,y:i,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,roundness:null,simulatePressure:e.pressure===.5,locked:!1,frameId:a?a.id:null});this.setState(d=>{let m={...d.selectedElementIds};return delete m[l.id],{selectedElementIds:Be(m,d)}});let s=l.simulatePressure?l.pressures:[...l.pressures,e.pressure];oe(l,{points:[[0,0]],pressures:s});let c=Tl(r.origin,this);this.scene.insertElement(l),this.setState({draggingElement:l,editingElement:l,startBoundElement:c,suggestedBindings:[]})};insertIframeElement=({sceneX:e,sceneY:o,width:r,height:n})=>{let[i,a]=Qt(e,o,this.lastPointerDownEvent?.[T.CTRL_OR_CMD]?null:this.state.gridSize),l=Sb({type:"iframe",x:i,y:a,strokeColor:"transparent",backgroundColor:"transparent",fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,roundness:this.getCurrentItemRoundness("iframe"),opacity:this.state.currentItemOpacity,locked:!1,width:r,height:n});return this.scene.insertElement(l),l};insertEmbeddableElement=({sceneX:e,sceneY:o,link:r})=>{let[n,i]=Qt(e,o,this.lastPointerDownEvent?.[T.CTRL_OR_CMD]?null:this.state.gridSize),a=qn(r);if(!a)return;a.error instanceof URIError&&this.setToast({message:g("toast.unrecognizedLinkFormat"),closable:!0});let l=Xu({type:"embeddable",x:n,y:i,strokeColor:"transparent",backgroundColor:"transparent",fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,roundness:this.getCurrentItemRoundness("embeddable"),opacity:this.state.currentItemOpacity,locked:!1,width:a.intrinsicSize.w,height:a.intrinsicSize.h,link:r});return this.scene.insertElement(l),l};createImageElement=({sceneX:e,sceneY:o,addToFrameUnderCursor:r=!0})=>{let[n,i]=Qt(e,o,this.lastPointerDownEvent?.[T.CTRL_OR_CMD]?null:this.state.gridSize),a=r?this.getTopLayerFrameAtSceneCoords({x:n,y:i}):null;return Tc({type:"image",x:n,y:i,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,roundness:null,opacity:this.state.currentItemOpacity,locked:!1,frameId:a?a.id:null})};handleLinearElementOnPointerDown=(e,o,r)=>{if(this.state.multiElement){let{multiElement:n}=this.state;if(n.type==="line"&&bl(n.points,this.state.zoom.value)){oe(n,{lastCommittedPoint:n.points[n.points.length-1]}),this.actionManager.executeAction(Ro);return}let{x:i,y:a,lastCommittedPoint:l}=n;if(n.points.length>1&&l&&mn(r.origin.x-i,r.origin.y-a,l[0],l[1])<Zs){this.actionManager.executeAction(Ro);return}this.setState(s=>({selectedElementIds:Be({...s.selectedElementIds,[n.id]:!0},s)})),oe(n,{lastCommittedPoint:n.points[n.points.length-1]}),Oe(this.interactiveCanvas,De.POINTER)}else{let[n,i]=Qt(r.origin.x,r.origin.y,e[T.CTRL_OR_CMD]?null:this.state.gridSize),a=this.getTopLayerFrameAtSceneCoords({x:n,y:i}),{currentItemStartArrowhead:l,currentItemEndArrowhead:s}=this.state,[c,d]=o==="arrow"?[l,s]:[null,null],m=Ml({type:o,x:n,y:i,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,roundness:this.state.currentItemRoundness==="round"?{type:Eo.PROPORTIONAL_RADIUS}:null,startArrowhead:c,endArrowhead:d,locked:!1,frameId:a?a.id:null});this.setState(f=>{let b={...f.selectedElementIds};return delete b[m.id],{selectedElementIds:Be(b,f)}}),oe(m,{points:[...m.points,[0,0]]});let p=Tl(r.origin,this);this.scene.insertElement(m),this.setState({draggingElement:m,editingElement:m,startBoundElement:p,suggestedBindings:[]})}};getCurrentItemRoundness(e){return this.state.currentItemRoundness==="round"?{type:Fi(e)?Eo.ADAPTIVE_RADIUS:Eo.PROPORTIONAL_RADIUS}:null}createGenericElementOnPointerDown=(e,o)=>{let[r,n]=Qt(o.origin.x,o.origin.y,this.lastPointerDownEvent?.[T.CTRL_OR_CMD]?null:this.state.gridSize),i=this.getTopLayerFrameAtSceneCoords({x:r,y:n}),a={x:r,y:n,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,roundness:this.getCurrentItemRoundness(e),locked:!1,frameId:i?i.id:null},l;e==="embeddable"?l=Xu({type:"embeddable",...a}):l=pn({type:e,...a}),l.type==="selection"?this.setState({selectionElement:l,draggingElement:l}):(this.scene.insertElement(l),this.setState({multiElement:null,draggingElement:l,editingElement:l}))};createFrameElementOnPointerDown=(e,o)=>{let[r,n]=Qt(e.origin.x,e.origin.y,this.lastPointerDownEvent?.[T.CTRL_OR_CMD]?null:this.state.gridSize),i={x:r,y:n,opacity:this.state.currentItemOpacity,locked:!1,...Ko},a=o===ut.magicframe?Il(i):Cc(i);this.scene.insertElement(a),this.setState({multiElement:null,draggingElement:a,editingElement:a})};maybeCacheReferenceSnapPoints(e,o,r=!1){rn({event:e,appState:this.state,selectedElements:o})&&(r||!$o.getReferenceSnapPoints())&&$o.setReferenceSnapPoints(E5(this.scene.getNonDeletedElements(),o,this.state,this.scene.getNonDeletedElementsMap()))}maybeCacheVisibleGaps(e,o,r=!1){rn({event:e,appState:this.state,selectedElements:o})&&(r||!$o.getVisibleGaps())&&$o.setVisibleGaps(y5(this.scene.getNonDeletedElements(),o,this.state,this.scene.getNonDeletedElementsMap()))}onKeyDownFromPointerDownHandler(e){return Je(o=>{this.maybeHandleResize(e,o)||this.maybeDragNewGenericElement(e,o)})}onKeyUpFromPointerDownHandler(e){return Je(o=>{o.key===T.ALT&&o.preventDefault(),!this.maybeHandleResize(e,o)&&this.maybeDragNewGenericElement(e,o)})}onPointerMoveFromPointerDownHandler(e){return du(o=>{if(e.drag.offset===null&&(e.drag.offset=ul(M0(this.scene.getSelectedElements(this.state),e.origin.x,e.origin.y))),!(o.target instanceof HTMLElement)||this.handlePointerMoveOverScrollbars(o,e))return;let n=Ke(o,this.state);if(ko(this.state)){this.handleEraser(o,e,n);return}this.state.activeTool.type==="laser"&&this.laserTrails.addPointToPath(n.x,n.y);let[i,a]=Qt(n.x,n.y,o[T.CTRL_OR_CMD]?null:this.state.gridSize);if(!e.drag.hasOccurred&&(this.state.activeTool.type==="arrow"||this.state.activeTool.type==="line")&&mn(n.x,n.y,e.origin.x,e.origin.y)<Un)return;if(e.resize.isResizing&&(e.lastCoords.x=n.x,e.lastCoords.y=n.y,this.maybeHandleResize(e,o)))return!0;let l=this.scene.getNonDeletedElementsMap();if(this.state.selectedLinearElement){let m=this.state.editingLinearElement||this.state.selectedLinearElement;if(ue.shouldAddMidpoint(this.state.selectedLinearElement,n,this.state,l)){let f=ue.addMidpoint(this.state.selectedLinearElement,n,this.state,!o[T.CTRL_OR_CMD],l);if(!f)return;(0,vu.flushSync)(()=>{this.state.selectedLinearElement&&this.setState({selectedLinearElement:{...this.state.selectedLinearElement,pointerDownState:f.pointerDownState,selectedPointsIndices:f.selectedPointsIndices}}),this.state.editingLinearElement&&this.setState({editingLinearElement:{...this.state.editingLinearElement,pointerDownState:f.pointerDownState,selectedPointsIndices:f.selectedPointsIndices}})});return}else if(m.pointerDownState.segmentMidpoint.value!==null&&!m.pointerDownState.segmentMidpoint.added)return;if(ue.handlePointDragging(o,this.state,n.x,n.y,(f,b)=>{this.maybeSuggestBindingsForLinearElementAtCoords(f,b)},m,this.scene.getNonDeletedElementsMap())){e.lastCoords.x=n.x,e.lastCoords.y=n.y,e.drag.hasOccurred=!0,this.state.editingLinearElement&&!this.state.editingLinearElement.isDragging&&this.setState({editingLinearElement:{...this.state.editingLinearElement,isDragging:!0}}),this.state.selectedLinearElement.isDragging||this.setState({selectedLinearElement:{...this.state.selectedLinearElement,isDragging:!0}});return}}let s=e.hit.allHitElements.some(m=>this.isASelectedElement(m)),c=this.state.editingLinearElement&&o.shiftKey&&this.state.editingLinearElement.elementId===e.hit.element?.id;if((s||e.hit.hasHitCommonBoundingBoxOfSelectedElements)&&!c){let m=this.scene.getSelectedElements(this.state);if(m.every(b=>b.locked))return;let p=m.find(b=>Ee(b)),f=this.getTopLayerFrameAtSceneCoords(n);if(this.setState({frameToHighlight:f&&!p?f:null}),e.drag.hasOccurred=!0,this.setState({selectedElementsAreBeingDragged:!0}),m.length>0&&!e.withCmdOrCtrl&&!this.state.editingElement&&this.state.activeEmbeddable?.state!=="active"){let b={x:n.x-e.origin.x,y:n.y-e.origin.y},x=[...e.originalElements.values()],y=o.shiftKey;if(y){let w=Math.abs(b.x),M=Math.abs(b.y),B=y&&w<M,I=y&&w>M;B&&(b.x=0),I&&(b.y=0)}this.maybeCacheVisibleGaps(o,m),this.maybeCacheReferenceSnapPoints(o,m);let{snapOffset:S,snapLines:C}=w5(x,b,this.state,o,this.scene.getNonDeletedElementsMap());if(this.setState({snapLines:C}),!this.state.editingFrame&&I0(e,m,b,this.state,this.scene,S,o[T.CTRL_OR_CMD]?null:this.state.gridSize),this.maybeSuggestBindingForAll(m),o.altKey&&!e.hit.hasBeenDuplicated){e.hit.hasBeenDuplicated=!0;let w=[],M=[],B=new Map,I=new Map,_=e.hit.element,A=new Set(this.scene.getSelectedElements({selectedElementIds:this.state.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}).map(W=>W.id)),U=this.scene.getElementsIncludingDeleted();for(let W of U)if(A.has(W.id)||W.id===_?.id&&e.hit.wasAddedToSelection){let O=Sc(this.state.editingGroupId,B,W),F=e.originalElements.get(W.id);oe(O,{x:F.x,y:F.y}),e.originalElements.set(O.id,O),w.push(O),M.push(W),I.set(W.id,O.id)}else w.push(W);let R=[...w,...M];po(R,xe(M)),gc(w,M,I),hc(R,M,I,"duplicatesServeAsOld"),Fc(R,M,I),this.scene.replaceAllElements(R),this.maybeCacheVisibleGaps(o,m,!0),this.maybeCacheReferenceSnapPoints(o,m,!0)}return}}let d=this.state.draggingElement;if(d){if(d.type==="freedraw"){let m=d.points,p=n.x-d.x,f=n.y-d.y,b=m.length>0&&m[m.length-1];if(!(b&&b[0]===p&&b[1]===f)){let y=d.simulatePressure?d.pressures:[...d.pressures,o.pressure];oe(d,{points:[...m,[p,f]],pressures:y})}}else if(Ne(d)){e.drag.hasOccurred=!0,this.setState({selectedElementsAreBeingDragged:!0});let m=d.points,p=i-d.x,f=a-d.y;pc(o)&&m.length===2&&({width:p,height:f}=pp(d.x,d.y,n.x,n.y)),m.length===1?oe(d,{points:[...m,[p,f]]}):m.length===2&&oe(d,{points:[...m.slice(0,-1),[p,f]]}),Lr(d,!1)&&this.maybeSuggestBindingsForLinearElementAtCoords(d,[n],this.state.startBoundElement)}else e.lastCoords.x=n.x,e.lastCoords.y=n.y,this.maybeDragNewGenericElement(e,o);if(this.state.activeTool.type==="selection"){e.boxSelection.hasOccurred=!0;let m=this.scene.getNonDeletedElements();if(this.state.editingLinearElement)ue.handleBoxSelection(o,this.state,this.setState.bind(this),this.scene.getNonDeletedElementsMap());else{let p=!0;!o.shiftKey&&Fe(m,this.state)&&(e.withCmdOrCtrl&&e.hit.element?this.setState(b=>Dt({...b,selectedElementIds:{[e.hit.element.id]:!0}},this.scene.getNonDeletedElements(),b,this)):p=!1);let f=_0(m,d,this.scene.getNonDeletedElementsMap());this.setState(b=>{let x={...p&&b.selectedElementIds,...f.reduce((y,S)=>(y[S.id]=!0,y),{})};return e.hit.element&&(f.length?delete x[e.hit.element.id]:x[e.hit.element.id]=!0),b=p?b:{...b,selectedGroupIds:{},editingGroupId:null},{...Dt({editingGroupId:b.editingGroupId,selectedElementIds:x},this.scene.getNonDeletedElements(),b,this),selectedLinearElement:f.length===1&&Ne(f[0])?new ue(f[0]):null,showHyperlinkPopup:f.length===1&&(f[0].link||Ht(f[0]))?"info":!1}})}}}})}handlePointerMoveOverScrollbars(e,o){if(o.scrollbars.isOverHorizontal){let r=e.clientX,n=r-o.lastCoords.x;return this.translateCanvas({scrollX:this.state.scrollX-n/this.state.zoom.value}),o.lastCoords.x=r,!0}if(o.scrollbars.isOverVertical){let r=e.clientY,n=r-o.lastCoords.y;return this.translateCanvas({scrollY:this.state.scrollY-n/this.state.zoom.value}),o.lastCoords.y=r,!0}return!1}onPointerUpFromPointerDownHandler(e){return Je(o=>{this.removePointer(o),e.eventListeners.onMove&&e.eventListeners.onMove.flush();let{draggingElement:r,resizingElement:n,multiElement:i,activeTool:a,isResizing:l,isRotating:s}=this.state;this.setState(f=>({isResizing:!1,isRotating:!1,resizingElement:null,selectionElement:null,frameToHighlight:null,elementsToHighlight:null,cursorButton:"up",editingElement:i||le(this.state.editingElement)?this.state.editingElement:null,snapLines:dc(f.snapLines,[]),originSnapOffset:null})),$o.setReferenceSnapPoints(null),$o.setVisibleGaps(null),this.savePointer(o.clientX,o.clientY,"up"),this.setState({selectedElementsAreBeingDragged:!1});let c=this.scene.getNonDeletedElementsMap();if(this.state.editingLinearElement)if(!e.boxSelection.hasOccurred&&e.hit?.element?.id!==this.state.editingLinearElement.elementId)this.actionManager.executeAction(Ro);else{let f=ue.handlePointerUp(o,this.state.editingLinearElement,this.state,this);f!==this.state.editingLinearElement&&this.setState({editingLinearElement:f,suggestedBindings:[]})}else if(this.state.selectedLinearElement)if(e.hit?.element?.id!==this.state.selectedLinearElement.elementId)this.scene.getSelectedElements(this.state).length>1&&this.setState({selectedLinearElement:null});else{let f=ue.handlePointerUp(o,this.state.selectedLinearElement,this.state,this),{startBindingElement:b,endBindingElement:x}=f,y=this.scene.getElement(f.elementId);Lr(y)&&fc(y,b,x,c),f!==this.state.selectedLinearElement&&this.setState({selectedLinearElement:{...f,selectedPointsIndices:null},suggestedBindings:[]})}if(this.missingPointerEventCleanupEmitter.clear(),window.removeEventListener("pointermove",e.eventListeners.onMove),window.removeEventListener("pointerup",e.eventListeners.onUp),window.removeEventListener("keydown",e.eventListeners.onKeyDown),window.removeEventListener("keyup",e.eventListeners.onKeyUp),this.state.pendingImageElementId&&this.setState({pendingImageElementId:null}),this.props?.onPointerUp?.(a,e),this.onPointerUpEmitter.trigger(this.state.activeTool,e,o),r?.type==="freedraw"){let f=Ke(o,this.state),b=r.points,x=f.x-r.x,y=f.y-r.y;x===b[0][0]&&y===b[0][1]&&(y+=1e-4,x+=1e-4);let S=r.simulatePressure?[]:[...r.pressures,o.pressure];oe(r,{points:[...b,[x,y]],pressures:S,lastCommittedPoint:[x,y]}),this.actionManager.executeAction(Ro);return}if(cn(r)){let f=r;try{this.initializeImageDimensions(f),this.setState({selectedElementIds:Be({[f.id]:!0},this.state)},()=>{this.actionManager.executeAction(Ro)})}catch(b){console.error(b),this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().filter(x=>x.id!==f.id)),this.actionManager.executeAction(Ro)}return}if(Ne(r)){r.points.length>1&&this.history.resumeRecording();let f=Ke(o,this.state);!e.drag.hasOccurred&&r&&!i?(oe(r,{points:[...r.points,[f.x-r.x,f.y-r.y]]}),this.setState({multiElement:r,editingElement:this.state.draggingElement})):e.drag.hasOccurred&&!i&&(jn(this.state)&&Lr(r,!1)&&wl(r,this.state,f,this),this.setState({suggestedBindings:[],startBoundElement:null}),a.locked?this.setState(b=>({draggingElement:null})):(Io(this.interactiveCanvas),this.setState(b=>({draggingElement:null,activeTool:nt(this.state,{type:"selection"}),selectedElementIds:Be({...b.selectedElementIds,[r.id]:!0},b),selectedLinearElement:new ue(r)}))));return}if(a.type!=="selection"&&r&&Qn(r)){this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().filter(f=>f.id!==r.id)),this.setState({draggingElement:null});return}if(r){if(e.drag.hasOccurred){let f=Ke(o,this.state);if(this.state.selectedLinearElement&&this.state.selectedLinearElement.isDragging){let b=this.scene.getElement(this.state.selectedLinearElement.elementId);if(b?.frameId){let x=Bc(b,c);x&&b&&(c0(b,x,this.scene.getNonDeletedElementsMap())||(oe(b,{groupIds:[]}),Hc([b],this.scene.getNonDeletedElementsMap()),this.scene.informMutation()))}}else{let b=this.getTopLayerFrameAtSceneCoords(f),x=this.scene.getSelectedElements(this.state),y=this.scene.getElementsMapIncludingDeleted(),S=C=>{if(C.length>0){for(let w of C){let M=w.groupIds.indexOf(this.state.editingGroupId);oe(w,{groupIds:w.groupIds.slice(0,M)},!1)}y.forEach(w=>{w.groupIds.length&&pt(y,w.groupIds[w.groupIds.length-1]).length<2&&oe(w,{groupIds:[]},!1)}),this.setState({editingGroupId:null})}};if(b&&!this.state.selectedElementIds[b.id]){let C=x.filter(w=>w.frameId!==b.id&&mp(w,y,this.state));this.state.editingGroupId&&S(C),y=zc(y,C,b)}else if(!b&&this.state.editingGroupId){let C=x.filter(w=>w.frameId&&!mp(w,y,this.state));S(C)}y=pr(y,this.state,this),this.scene.replaceAllElements(y)}}if(Ee(r)){let f=u0(this.scene.getElementsIncludingDeleted(),r,this.scene.getNonDeletedElementsMap());this.scene.replaceAllElements(zc(this.scene.getElementsMapIncludingDeleted(),f,r))}oe(r,x0(r))}if(n&&this.history.resumeRecording(),n&&Qn(n)&&this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().filter(f=>f.id!==n.id)),e.resize.isResizing){let f=pr(this.scene.getElementsIncludingDeleted(),this.state,this),b=this.scene.getSelectedElements(this.state).filter(x=>Ee(x));for(let x of b)f=$c(f,Ji(this.scene.getElementsIncludingDeleted(),x,this.state,c),x,this);this.scene.replaceAllElements(f)}let d=e.hit.element;this.state.selectedLinearElement?.elementId!==d?.id&&Ne(d)&&this.scene.getSelectedElements(this.state).length===1&&this.setState({selectedLinearElement:new ue(d)});let m=this.lastPointerDownEvent,p=this.lastPointerUpEvent||this.lastPointerMoveEvent;if(ko(this.state)&&m&&p){if(this.eraserTrail.endPath(),mn(m.clientX,m.clientY,p.clientX,p.clientY)===0){let b=Ke({clientX:p.clientX,clientY:p.clientY},this.state);this.getElementsAtPosition(b.x,b.y).forEach(y=>this.elementsPendingErasure.add(y.id))}this.eraseElements();return}else this.elementsPendingErasure.size&&this.restoreReadyToEraseElements();if(d&&!e.drag.hasOccurred&&!e.hit.wasAddedToSelection&&(!this.state.editingLinearElement||!e.boxSelection.hasOccurred)&&(o.shiftKey&&!this.state.editingLinearElement?this.state.selectedElementIds[d.id]?Ec(this.state,d)?this.setState(f=>{let b={...f.selectedElementIds};for(let x of d.groupIds.flatMap(y=>pt(this.scene.getNonDeletedElements(),y)))delete b[x.id];return{selectedGroupIds:{...f.selectedElementIds,...d.groupIds.map(x=>({[x]:!1})).reduce((x,y)=>({...x,...y}),{})},selectedElementIds:Be(b,f)}}):this.state.selectedLinearElement?.isDragging||this.setState(f=>{let b={...f.selectedElementIds};delete b[d.id];let x=ye(this.scene.getNonDeletedElements(),{selectedElementIds:b});return{...Dt({editingGroupId:f.editingGroupId,selectedElementIds:b},this.scene.getNonDeletedElements(),f,this),selectedLinearElement:x.length===1&&Ne(x[0])?new ue(x[0]):f.selectedLinearElement}}):d.frameId&&this.state.selectedElementIds[d.frameId]?this.setState(f=>{let b={...f.selectedElementIds,[d.id]:!0};return delete b[d.frameId],(this.scene.getElement(d.frameId)?.groupIds??[]).flatMap(x=>pt(this.scene.getNonDeletedElements(),x)).forEach(x=>{delete b[x.id]}),{...Dt({editingGroupId:f.editingGroupId,selectedElementIds:b},this.scene.getNonDeletedElements(),f,this),showHyperlinkPopup:d.link||Ht(d)?"info":!1}}):this.setState(f=>({selectedElementIds:Be({...f.selectedElementIds,[d.id]:!0},f)})):this.setState(f=>({...Dt({editingGroupId:f.editingGroupId,selectedElementIds:{[d.id]:!0}},this.scene.getNonDeletedElements(),f,this),selectedLinearElement:Ne(d)&&f.selectedLinearElement?.elementId!==d.id?new ue(d):f.selectedLinearElement}))),!e.drag.hasOccurred&&!this.state.isResizing&&(d&&Zb({x:e.origin.x,y:e.origin.y,element:d,shape:this.getElementShape(d),threshold:this.getHitThreshold(),frameNameBound:Ee(d)?this.frameNameBoundsCache.get(d):null},c)||!d&&e.hit.hasHitCommonBoundingBoxOfSelectedElements)){this.state.editingLinearElement?this.setState({editingLinearElement:null}):this.setState({selectedElementIds:Be({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null}),Oe(this.interactiveCanvas,De.AUTO);return}if(!a.locked&&a.type!=="freedraw"&&r&&r.type!=="selection"&&this.setState(f=>({selectedElementIds:Be({...f.selectedElementIds,[r.id]:!0},f),showHyperlinkPopup:Ht(r)&&!r.link?"editor":f.showHyperlinkPopup})),(a.type!=="selection"||Fe(this.scene.getNonDeletedElements(),this.state))&&this.history.resumeRecording(),(e.drag.hasOccurred||l||s)&&(jn(this.state)?El(this.scene.getSelectedElements(this.state),this):Cl(this.scene.getNonDeletedElements(),c)),a.type==="laser"){this.laserTrails.endPath();return}!a.locked&&a.type!=="freedraw"?(Io(this.interactiveCanvas),this.setState({draggingElement:null,suggestedBindings:[],activeTool:nt(this.state,{type:"selection"})})):this.setState({draggingElement:null,suggestedBindings:[]}),d&&this.lastPointerUpEvent&&this.lastPointerDownEvent&&this.lastPointerUpEvent.timeStamp-this.lastPointerDownEvent.timeStamp<300&&Le.pointers.size<=1&&Oi(d)&&this.isIframeLikeElementCenter(d,this.lastPointerUpEvent,e.origin.x,e.origin.y)&&this.handleEmbeddableCenterClick(d)})}restoreReadyToEraseElements=()=>{this.elementsPendingErasure=new Set,this.onSceneUpdated()};eraseElements=()=>{let e=!1,o=this.scene.getElementsIncludingDeleted().map(r=>this.elementsPendingErasure.has(r.id)||r.frameId&&this.elementsPendingErasure.has(r.frameId)||bt(r)&&this.elementsPendingErasure.has(r.containerId)?(e=!0,me(r,{isDeleted:!0})):r);this.elementsPendingErasure=new Set,e&&(this.history.resumeRecording(),this.scene.replaceAllElements(o))};initializeImage=async({imageFile:e,imageElement:o,showCursorImagePreview:r=!1})=>{if(!_c(e))throw new Error(g("errors.unsupportedFileType"));let n=e.type;if(Oe(this.interactiveCanvas,"wait"),n===Pt.svg)try{e=rp(await Ub(await e.text()),e.name)}catch(c){throw console.warn(c),new Error(g("errors.svgImageInsertError"))}let i=await(this.props.generateIdForFile?.(e)||Rb(e));if(!i)throw console.warn("Couldn't generate file id or the supplied `generateIdForFile` didn't resolve to one."),new Error(g("errors.imageInsertError"));if(!this.files[i]?.dataURL){try{e=await Al(e,{maxWidthOrHeight:w1})}catch(c){console.error("Error trying to resizing image file on insertion",c)}if(e.size>Du)throw new Error(g("errors.fileTooBig",{maxSize:`${Math.trunc(Du/1024/1024)}MB`}))}if(r){let c=this.files[i]?.dataURL,d=c&&Db(c);this.setImagePreviewCursor(d||e)}let l=this.files[i]?.dataURL||await Lc(e),s=oe(o,{fileId:i},!1);return new Promise(async(c,d)=>{try{this.files={...this.files,[i]:{mimeType:n,id:i,dataURL:l,created:Date.now(),lastRetrieved:Date.now()}};let m=this.imageCache.get(i);m||(this.addNewImagesToImageCache(),await this.updateImageCache([s])),m?.image instanceof Promise&&await m.image,this.state.pendingImageElementId!==s.id&&this.state.draggingElement?.id!==s.id&&this.initializeImageDimensions(s,!0),c(s)}catch(m){console.error(m),d(new Error(g("errors.imageInsertError")))}finally{r||Io(this.interactiveCanvas)}})};insertImageElement=async(e,o,r)=>{if(!this.isToolSupported("image")){this.setState({errorMessage:g("errors.imageToolNotSupported")});return}this.scene.insertElement(e);try{return await this.initializeImage({imageFile:o,imageElement:e,showCursorImagePreview:r})}catch(n){return oe(e,{isDeleted:!0}),this.actionManager.executeAction(Ro),this.setState({errorMessage:n.message||g("errors.imageInsertError")}),null}};setImagePreviewCursor=async e=>{let r;try{r=await Al(e,{maxWidthOrHeight:96})}catch(i){throw i.cause==="UNSUPPORTED"?new Error(g("errors.unsupportedFileType")):i}let n=await Lc(r);if(e.type===Pt.svg){let i=await zb(n),a=Math.min(i.height,96),l=a*(i.width/i.height);l>96&&(l=96,a=l*(i.height/i.width));let s=document.createElement("canvas");s.height=a,s.width=l,s.getContext("2d").drawImage(i,0,0,l,a),n=s.toDataURL(Pt.svg)}this.state.pendingImageElementId&&Oe(this.interactiveCanvas,`url(${n}) 4 4, auto`)};onImageAction=async({insertOnCanvasDirectly:e})=>{try{let o=this.state.width/2+this.state.offsetLeft,r=this.state.height/2+this.state.offsetTop,{x:n,y:i}=Ke({clientX:o,clientY:r},this.state),a=await Ic({description:"Image",extensions:Object.keys(l1)}),l=this.createImageElement({sceneX:n,sceneY:i,addToFrameUnderCursor:!1});e?(this.insertImageElement(l,a),this.initializeImageDimensions(l),this.setState({selectedElementIds:Be({[l.id]:!0},this.state)},()=>{this.actionManager.executeAction(Ro)})):this.setState({pendingImageElementId:l.id},()=>{this.insertImageElement(l,a,!0)})}catch(o){o.name!=="AbortError"?console.error(o):console.warn(o),this.setState({pendingImageElementId:null,editingElement:null,activeTool:nt(this.state,{type:"selection"})},()=>{this.actionManager.executeAction(Ro)})}};initializeImageDimensions=(e,o=!1)=>{let r=hl(e)&&this.imageCache.get(e.fileId)?.image;if(!r||r instanceof Promise){if(e.width<Un/this.state.zoom.value&&e.height<Un/this.state.zoom.value){let n=100/this.state.zoom.value;oe(e,{x:e.x-n/2,y:e.y-n/2,width:n,height:n})}return}if(o||e.width<Un/this.state.zoom.value&&e.height<Un/this.state.zoom.value){let n=Math.max(this.state.height-120,160),i=Math.min(n,Math.floor(this.state.height*.5)/this.state.zoom.value),a=Math.min(r.naturalHeight,i),l=a*(r.naturalWidth/r.naturalHeight),s=e.x+e.width/2-l/2,c=e.y+e.height/2-a/2;oe(e,{x:s,y:c,width:l,height:a})}};updateImageCache=async(e,o=this.files)=>{let{updatedFiles:r,erroredFiles:n}=await Hb({imageCache:this.imageCache,fileIds:e.map(i=>i.fileId),files:o});if(r.size||n.size)for(let i of e)r.has(i.fileId)&&Mo.delete(i);return n.size&&this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().map(i=>hl(i)&&n.has(i.fileId)?me(i,{status:"error"}):i)),{updatedFiles:r,erroredFiles:n}};addNewImagesToImageCache=async(e=$b(this.scene.getNonDeletedElements()),o=this.files)=>{let r=e.filter(n=>!n.isDeleted&&!this.imageCache.has(n.fileId));if(r.length){let{updatedFiles:n}=await this.updateImageCache(r,o);n.size&&this.scene.informMutation()}};scheduleImageRefresh=(0,J5.default)(()=>{this.addNewImagesToImageCache()},d1);updateBindingEnabledOnPointerMove=e=>{let o=q1(e);this.state.isBindingEnabled!==o&&this.setState({isBindingEnabled:o})};maybeSuggestBindingAtCursor=e=>{let o=Tl(e,this);this.setState({suggestedBindings:o!=null?[o]:[]})};maybeSuggestBindingsForLinearElementAtCoords=(e,o,r)=>{if(!o.length)return;let n=o.reduce((i,a)=>{let l=Tl(a,this);return l!=null&&!J1(e,r?.id,l)&&i.push(l),i},[]);this.setState({suggestedBindings:n})};maybeSuggestBindingForAll(e){if(e.length>50)return;let o=Q1(e,this);this.setState({suggestedBindings:o})}clearSelection(e){this.setState(o=>({selectedElementIds:Be({},o),activeEmbeddable:null,selectedGroupIds:{},editingGroupId:o.editingGroupId&&e!=null&&Ki(e,o.editingGroupId)?o.editingGroupId:null})),this.setState({selectedElementIds:Be({},this.state),activeEmbeddable:null,previousSelectedElementIds:this.state.selectedElementIds})}handleInteractiveCanvasRef=e=>{e!==null?(this.interactiveCanvas=e,this.interactiveCanvas.addEventListener("wheel",this.handleWheel),this.interactiveCanvas.addEventListener("touchstart",this.onTouchStart),this.interactiveCanvas.addEventListener("touchend",this.onTouchEnd)):(this.interactiveCanvas?.removeEventListener("wheel",this.handleWheel),this.interactiveCanvas?.removeEventListener("touchstart",this.onTouchStart),this.interactiveCanvas?.removeEventListener("touchend",this.onTouchEnd))};handleAppOnDrop=async e=>{let{file:o,fileHandle:r}=await Ob(e),{x:n,y:i}=Ke(e,this.state);try{if(_c(o)&&this.isToolSupported("image")){if(o?.type===Pt.png||o?.type===Pt.svg)try{let s=await Ac(o,this.state,this.scene.getElementsIncludingDeleted(),r);this.syncActionResult({...s,appState:{...s.appState||this.state,isLoading:!1},replaceFiles:!0,commitToHistory:!0});return}catch(s){if(s.name!=="EncodingError")throw new Error(g("alerts.couldNotLoadInvalidFile"))}let l=this.createImageElement({sceneX:n,sceneY:i});this.insertImageElement(l,o),this.initializeImageDimensions(l),this.setState({selectedElementIds:Be({[l.id]:!0},this.state)});return}}catch(l){return this.setState({isLoading:!1,errorMessage:l.message})}let a=e.dataTransfer.getData(Pt.excalidrawlib);if(a&&typeof a=="string"){try{let l=Pb(a);this.addElementsFromPasteOrLibrary({elements:cm(l),position:e,files:null})}catch(l){this.setState({errorMessage:l.message})}return}if(o&&await this.loadFileToCanvas(o,r),e.dataTransfer?.types?.includes("text/plain")){let l=e.dataTransfer?.getData("text");if(l&&Zi(l,this.props.validateEmbeddable)&&(/^(http|https):\/\/[^\s/$.?#].[^\s]*$/.test(l)||qn(l)?.type==="video")){let s=this.insertEmbeddableElement({sceneX:n,sceneY:i,link:Br(l)});s&&this.setState({selectedElementIds:{[s.id]:!0}})}}};loadFileToCanvas=async(e,o)=>{e=await Fb(e);try{let r;try{r=await tp(e,this.state,this.scene.getElementsIncludingDeleted(),o)}catch(n){let i=n instanceof Y1;if(i&&n.code==="IMAGE_NOT_CONTAINS_SCENE_DATA"&&!this.isToolSupported("image")){this.setState({isLoading:!1,errorMessage:g("errors.imageToolNotSupported")});return}let a=i?g("alerts.cannotRestoreFromImage"):g("alerts.couldNotLoadInvalidFile");this.setState({isLoading:!1,errorMessage:a})}if(!r)return;r.type===Pt.excalidraw?(this.setState({isLoading:!0}),this.syncActionResult({...r.data,appState:{...r.data.appState||this.state,isLoading:!1},replaceFiles:!0,commitToHistory:!0})):r.type===Pt.excalidrawlib&&await this.library.updateLibrary({libraryItems:e,merge:!0,openLibraryMenu:!0}).catch(n=>{console.error(n),this.setState({errorMessage:g("errors.importLibraryError")})})}catch(r){this.setState({isLoading:!1,errorMessage:r.message})}};handleCanvasContextMenu=e=>{if(e.preventDefault(),("pointerType"in e.nativeEvent&&e.nativeEvent.pointerType==="touch"||"pointerType"in e.nativeEvent&&e.nativeEvent.pointerType==="pen"&&e.button!==nn.SECONDARY)&&this.state.activeTool.type!=="selection")return;let{x:o,y:r}=Ke(e,this.state),n=this.getElementAtPosition(o,r,{preferSelected:!0,includeLockedElements:!0}),i=this.scene.getSelectedElements(this.state),a=this.isHittingCommonBoundingBoxOfSelectedElements({x:o,y:r},i),l=n||a?"element":"canvas",s=this.excalidrawContainerRef.current,{top:c,left:d}=s.getBoundingClientRect(),m=e.clientX-d,p=e.clientY-c;ge("contextMenu","openContextMenu",l),this.setState({...n&&!this.state.selectedElementIds[n.id]?{...this.state,...Dt({editingGroupId:this.state.editingGroupId,selectedElementIds:{[n.id]:!0}},this.scene.getNonDeletedElements(),this.state,this),selectedLinearElement:Ne(n)?new ue(n):null}:this.state,showHyperlinkPopup:!1},()=>{this.setState({contextMenu:{top:p,left:m,items:this.getContextMenuItems(l)}})})};maybeDragNewGenericElement=(e,o)=>{let r=this.state.draggingElement,n=e.lastCoords;if(r)if(r.type==="selection"&&this.state.activeTool.type!=="eraser")bp(r,this.state.activeTool.type,e.origin.x,e.origin.y,n.x,n.y,Kn(e.origin.x,n.x),Kn(e.origin.y,n.y),Ui(o),uc(o));else{let[i,a]=Qt(n.x,n.y,o[T.CTRL_OR_CMD]?null:this.state.gridSize),l=hl(r)&&this.imageCache.get(r.fileId)?.image,s=l&&!(l instanceof Promise)?l.width/l.height:null;this.maybeCacheReferenceSnapPoints(o,[r]);let{snapOffset:c,snapLines:d}=T5(r,this.state,o,{x:e.originInGrid.x+(this.state.originSnapOffset?.x??0),y:e.originInGrid.y+(this.state.originSnapOffset?.y??0)},{x:i-e.originInGrid.x,y:a-e.originInGrid.y},this.scene.getNonDeletedElementsMap());i+=c.x,a+=c.y,this.setState({snapLines:d}),bp(r,this.state.activeTool.type,e.originInGrid.x,e.originInGrid.y,i,a,Kn(e.originInGrid.x,i),Kn(e.originInGrid.y,a),cn(r)?!Ui(o):Ui(o),uc(o),s,this.state.originSnapOffset),this.maybeSuggestBindingForAll([r]),(this.state.activeTool.type===ut.frame||this.state.activeTool.type===ut.magicframe)&&this.setState({elementsToHighlight:Ji(this.scene.getNonDeletedElements(),r,this.state,this.scene.getNonDeletedElementsMap())})}};maybeHandleResize=(e,o)=>{let r=this.scene.getSelectedElements(this.state),n=r.filter(d=>Ee(d)),i=e.resize.handleType;if(n.length>0&&i==="rotation")return!1;this.setState({isResizing:i&&i!=="rotation",isRotating:i==="rotation",activeEmbeddable:null});let a=e.lastCoords,[l,s]=Qt(a.x-e.resize.offset.x,a.y-e.resize.offset.y,o[T.CTRL_OR_CMD]?null:this.state.gridSize),c=new Map;if(n.forEach(d=>{hn(this.scene.getNonDeletedElements(),d.id).forEach(p=>{c.set(d.id+p.id,{x:p.x-d.x,y:p.y-d.y})})}),!this.state.selectedElementsAreBeingDragged){let[d,m]=Qt(a.x,a.y,o[T.CTRL_OR_CMD]?null:this.state.gridSize),p={x:d-e.originInGrid.x,y:m-e.originInGrid.y},f=[...e.originalElements.values()];this.maybeCacheReferenceSnapPoints(o,r);let{snapOffset:b,snapLines:x}=C5(r,ye(f,this.state),this.state,o,p,i);l+=b.x,s+=b.y,this.setState({snapLines:x})}if(C0(e.originalElements,i,r,this.scene.getElementsMapIncludingDeleted(),pc(o),uc(o),r.length===1&&cn(r[0])?!Ui(o):Ui(o),l,s,e.resize.center.x,e.resize.center.y)){this.maybeSuggestBindingForAll(r);let d=new Set;return n.forEach(m=>{Ji(this.scene.getNonDeletedElements(),m,this.state,this.scene.getNonDeletedElementsMap()).forEach(p=>d.add(p))}),this.setState({elementsToHighlight:[...d]}),!0}return!1};getContextMenuItems=e=>{let o=[];return o.push(Qd,Jd),e==="canvas"?this.state.viewModeEnabled?[...o,tm,Na,hg,In]:[ih,no,Qd,Jd,em,no,Qp,vE,no,tm,ah,Na,hg,In]:(o.push(em),this.state.viewModeEnabled?[Da,...o]:[qd,Da,ih,f5,h5,no,...o,no,Zf,jf,no,qf,lh,sh,uE,Jf,no,th,no,jp,Xp,qp,Jp,no,rh,nh,no,Nh,cs,ef,fh,no,Gl])};handleWheel=Je(e=>{if(e.preventDefault(),Bs)return;let{deltaX:o,deltaY:r}=e;if(e.metaKey||e.ctrlKey){let n=Math.sign(r),i=Gn*100,a=Math.abs(r),l=r;a>i&&(l=i*n);let s=this.state.zoom.value-l/100;s+=Math.log10(Math.max(1,this.state.zoom.value))*-n*Math.min(1,a/20),this.translateCanvas(c=>({...$r({viewportX:this.lastViewportPosition.x,viewportY:this.lastViewportPosition.y,nextZoom:Hr(s)},c),shouldCacheIgnoreZoom:!0})),this.resetShouldCacheIgnoreZoomDebounced();return}if(e.shiftKey){this.translateCanvas(({zoom:n,scrollX:i})=>({scrollX:i-(r||o)/n.value}));return}this.translateCanvas(({zoom:n,scrollX:i,scrollY:a})=>({scrollX:i-o/n.value,scrollY:a-r/n.value}))});getTextWysiwygSnappedToCenterPosition(e,o,r,n){if(n){let i=n.x+n.width/2,a=n.y+n.height/2,l=vc(n,r,this.scene.getNonDeletedElementsMap());if(l&&(i=l.x,a=l.y),Math.hypot(e-i,o-a)<r1){let{x:d,y:m}=Jt({sceneX:i,sceneY:a},r);return{viewportX:d,viewportY:m,elementCenterX:i,elementCenterY:a}}}}savePointer=(e,o,r)=>{if(!e||!o)return;let{x:n,y:i}=Ke({clientX:e,clientY:o},this.state);isNaN(n)||isNaN(i);let a={x:n,y:i,tool:this.state.activeTool.type==="laser"?"laser":"pointer"};this.props.onPointerUpdate?.({pointer:a,button:r,pointersMap:Le.pointers})};resetShouldCacheIgnoreZoomDebounced=dl(()=>{this.unmounted||this.setState({shouldCacheIgnoreZoom:!1})},300);updateDOMRect=e=>{if(this.excalidrawContainerRef?.current){let o=this.excalidrawContainerRef.current,{width:r,height:n,left:i,top:a}=o.getBoundingClientRect(),{width:l,height:s,offsetTop:c,offsetLeft:d}=this.state;if(r===l&&n===s&&i===d&&a===c){e&&e();return}this.setState({width:r,height:n,offsetLeft:i,offsetTop:a},()=>{e&&e()})}};refresh=()=>{this.setState({...this.getCanvasOffsets()})};getCanvasOffsets(){if(this.excalidrawContainerRef?.current){let e=this.excalidrawContainerRef.current,{left:o,top:r}=e.getBoundingClientRect();return{offsetLeft:o,offsetTop:r}}return{offsetLeft:0,offsetTop:0}}async updateLanguage(){let e=ra.find(o=>o.code===this.props.langCode)||fr;await Jc(e),this.setAppState({})}},xI=()=>{(E.MODE===Au.TEST||E.DEV)&&(window.h=window.h||{},Object.defineProperties(window.h,{elements:{configurable:!0,get(){return this.app?.scene.getElementsIncludingDeleted()},set(t){return this.app?.scene.replaceAllElements(zi(t))}}}))};xI();var o6=Ag;h();var vI=()=>{Array.prototype.at||Object.defineProperty(Array.prototype,"at",{value:function(t){if(t=Math.trunc(t)||0,t<0&&(t+=this.length),!(t<0||t>=this.length))return this[t]},writable:!0,enumerable:!1,configurable:!0}),Element.prototype.replaceChildren||(Element.prototype.replaceChildren=function(...t){this.innerHTML="",this.append(...t)})},r6=vI;h();var Fg=v(k(),1),n6=({children:t})=>{let{FooterCenterTunnel:e}=Ge(),o=_e();return(0,Fg.jsx)(e.In,{children:(0,Fg.jsx)("div",{className:z("footer-center zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":o.zenModeEnabled}),children:t})})},yI=n6;n6.displayName="FooterCenter";h();h();h();var Wo=v(k(),1),EI=()=>(0,Wo.jsx)("svg",{viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"ExcalidrawLogo-icon",children:(0,Wo.jsx)("path",{d:"M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z",fill:"currentColor"})}),wI=()=>(0,Wo.jsxs)("svg",{viewBox:"0 0 450 55",xmlns:"http://www.w3.org/2000/svg",fill:"none",className:"ExcalidrawLogo-text",children:[(0,Wo.jsx)("path",{d:"M429.27 96.74c2.47-1.39 4.78-3.02 6.83-4.95 1.43-1.35 2.73-2.86 3.81-4.51-.66.9-1.4 1.77-2.23 2.59-2.91 2.84-5.72 5.09-8.42 6.87h.01ZM343.6 69.36c.33 3.13.58 6.27.79 9.4.09 1.37.18 2.75.25 4.12-.12-4.46-.27-8.93-.5-13.39-.11-2.08-.24-4.16-.4-6.24-.06 1.79-.11 3.85-.13 6.11h-.01ZM378.47 98.34c.01-.37.07-1.13.01-6.51-.11 1.9-.22 3.81-.31 5.71-.07 1.42-.22 2.91-.16 4.35.39.03.78.07 1.17.1-.92-.85-.76-2.01-.72-3.66l.01.01ZM344.09 86.12c-.09-2.41-.22-4.83-.39-7.24v12.21c.15-.05.32-.09.47-.14.05-1.61-.03-3.23-.09-4.83h.01ZM440.69 66.79c-.22-.34-.45-.67-.69-.99-3.71-4.87-9.91-7.14-15.65-8.55-1.05-.26-2.12-.49-3.18-.71 2.29.59 4.48 1.26 6.64 2.02 7.19 2.54 10.57 5.41 12.88 8.23ZM305.09 72.46l1.2 3.6c.84 2.53 1.67 5.06 2.46 7.61.24.78.5 1.57.73 2.36.22-.04.44-.08.67-.12a776.9 776.9 0 0 1-5.01-13.57c-.02.04-.03.09-.05.13v-.01ZM345.49 90.25v.31c1.48-.42 3.05-.83 4.66-1.2-1.56.25-3.12.52-4.66.89ZM371.02 90.22c0-.57-.04-1.14-.11-1.71-.06-.02-.12-.04-.19-.05-.21-.05-.43-.08-.65-.11.42.16.74.88.95 1.87ZM398.93 54.23c-.13 0-.27-.01-.4-.02l.03.4c.11-.15.23-.27.37-.38ZM401.57 62.28v-.15c-1.22-.24-2.86-.61-3.23-1.25-.09-.15-.18-.51-.27-.98-.09.37-.2.73-.33 1.09 1.24.56 2.52.98 3.83 1.29ZM421.73 88.68c-2.97 1.65-6.28 3.12-9.69 3.68v.18c4.72-.14 11.63-3.85 16.33-8.38-2.04 1.75-4.33 3.24-6.63 4.53l-.01-.01ZM411.28 80.92c-.05-1.2-.09-2.4-.15-3.6-.21 5.66-.46 11.38-.47 14.51.24-.02.48-.04.71-.07.15-3.61.05-7.23-.09-10.83v-.01Z",transform:"translate(-144.023 -51.76)"}),(0,Wo.jsx)("path",{d:"M425.38 67.41c-3.5-1.45-7.19-2.57-14.06-3.62.09 1.97.06 4.88-.03 8.12.03.04.06.09.06.15.19 1.36.28 2.73.37 4.1.25 3.77.39 7.55.41 11.33 0 1.38-.01 2.76-.07 4.13 1.4-.25 2.78-.65 4.12-1.15 4.07-1.5 7.94-3.78 11.28-6.54 2.33-1.92 5.13-4.49 5.88-7.58.63-3.53-2.45-6.68-7.97-8.96l.01.02ZM411.35 92.53v-.06l-.34.03c.11.01.22.03.34.03ZM314.26 64.06c-.23-.59-.47-1.17-.7-1.75.57 1.62 1.11 3.25 1.6 4.9l.15.54 2.35 6.05c.32.82.66 1.64.98 2.46-1.38-4.1-2.83-8.17-4.39-12.2h.01ZM156.82 103.07c-.18.13-.38.23-.58.33 1.32-.03 2.66-.2 3.93-.34.86-.09 1.72-.22 2.58-.33-2.12.1-4.12.17-5.94.34h.01ZM210.14 68.88s.03.04.05.07c.18-.31.39-.64.58-.96-.21.3-.42.6-.64.89h.01ZM201.65 82.8c-.5.77-1.02 1.56-1.49 2.37 1.11-1.55 2.21-3.1 3.2-4.59-.23.23-.49.51-.75.79-.32.47-.65.95-.96 1.43ZM194.03 98.66c-.33-.4-.65-.84-1.05-1.17-.24-.2-.07-.49.17-.56-.23-.26-.42-.5-.63-.75 1.51-2.55 3.93-5.87 6.4-9.28-.17-.08-.29-.28-.2-.49.04-.09.09-.17.13-.26-1.21 1.78-2.42 3.55-3.61 5.33-.87 1.31-1.74 2.64-2.54 4-.29.5-.63 1.04-.87 1.61.81.65 1.63 1.27 2.47 1.88-.09-.11-.18-.21-.27-.32v.01ZM307.79 82.93c-1-3.17-2.05-6.32-3.1-9.48-1.62 4.08-3.69 9.17-6.16 15.19 3.32-1.04 6.77-1.87 10.27-2.5-.32-1.08-.67-2.15-1.01-3.21ZM149.5 80.7c.05-1.71.04-3.43 0-5.14-.1 2.26-.16 4.51-.22 6.77-.02.73-.03 1.46-.04 2.19.14-1.27.2-2.55.24-3.82h.02ZM228.98 98.3c.39 1.25.91 3.03.94 3.91.06-.03.12-.07.17-.1.08-1.29-.55-2.65-1.11-3.81ZM307.72 53.36c.81.5 1.53 1.04 2.07 1.49-.38-.8-.78-1.58-1.21-2.35-.17.03-.34.06-.51.11-.43.12-.86.26-1.29.41.35-.01.53.1.94.34ZM283.69 96.14c3.91-7.25 6.89-13.35 8.88-18.15l1.1-2.66c-1.27 2.64-2.56 5.27-3.83 7.9-1.53 3.15-3.06 6.31-4.58 9.47-.87 1.81-1.76 3.62-2.54 5.47.04.02.07.04.11.07.05.05.1.09.15.14.05-.73.27-1.48.71-2.24ZM289.92 103.23s-.04.01-.05.03c0-.02.04-.03.05-.04.05-.05.11-.1.16-.15l.21-.21c-.55 0-1.5-.27-2.55-.72.4.26.8.51 1.22.74.24.13.48.26.73.37.05.02.1.03.14.05a.27.27 0 0 1 .08-.07h.01ZM269.23 68.49c-.39-.19-.82-.48-1.33-.87-3.06-1.56-6.31-2.78-9.36-2.35-3.5.49-5.7 1.11-7.74 2.44 5.71-2.6 12.82-2.07 18.44.79l-.01-.01ZM177.87 53.69l1.06.03c-.96-.22-2-.25-2.89-.3-4.95-.26-9.99.33-14.86 1.19-2.44.43-4.88.95-7.28 1.59 9.09-1.76 15.69-2.77 23.97-2.51ZM219.85 55.51c-.18.12-.36.27-.56.45-.45.53-.86 1.11-1.26 1.66-1.91 2.61-3.71 5.31-5.57 7.95l-.12.18 8.05-10.11c-.18-.05-.36-.1-.55-.13h.01ZM510.71 54.1c.12-.15.29-.3.53-.45.69-.4 3.72-.63 5.87-.74-.36-.02-.73-.04-1.09-.05-1.84-.03-3.67.09-5.49.35.05.3.12.59.18.88v.01ZM510.76 86.02c1.37-3.07 2.49-6.27 3.57-9.46.55-1.64 1.12-3.3 1.6-4.97-1.59 4.01-3.67 9.14-6.2 15.3.24-.08.5-.14.74-.22.1-.22.19-.44.29-.65ZM566.95 75.76c.11-.02.23.03.31.11-.05-.13-.09-.26-.14-.39-.05.09-.11.18-.17.28ZM511.33 86.41c3.08-.89 6.24-1.62 9.46-2.14-1.51-3.98-2.98-7.96-4.39-11.87-.05.15-.09.31-.14.46-1.02 3.32-2.15 6.61-3.39 9.85-.48 1.25-.98 2.49-1.53 3.7h-.01ZM578.24 74.45c.11-.44.23-.87.35-1.31-.31.7-.64 1.39-.97 2.08.09.21.19.4.28.61.12-.46.23-.92.35-1.38h-.01ZM520.62 53.11c-.09 0-.18-.01-.28-.02.38.34.29 1.08.93 2.53l6.65 17.15c2.2 5.68 4.69 11.36 7.41 16.87l1.06 2.17c-2.95-7.05-5.92-14.08-8.87-21.13-1.58-3.79-3.16-7.59-4.7-11.4-.78-1.92-1.73-3.89-2.25-5.91-.03-.1 0-.19.04-.26h.01ZM578.78 77.87c1.45-5.77 3.07-10.43 3.58-13.36.05-.34.16-.88.31-1.55-.67 1.79-1.37 3.56-2.08 5.33-.12.43-.23.86-.35 1.29-.65 2.43-1.29 4.86-1.9 7.3.14.33.29.65.43 1l.01-.01ZM545.3 94.66c.02-.44.03-.83.05-1.12.02-1.01.05-2.02.11-3.02.03-6.66-.46-14.33-1.46-22.8-.13-.42-.27-1.24-.56-2.89 0-.02 0-.04-.01-.06.62 6.61.95 13.25 1.32 19.87.17 3.08.33 6.16.52 9.23.02.25.03.52.04.78l-.01.01ZM580.77 102.81c.13.2.27.38.37.49.27-.11.53-.22.8-.32-.43.09-.82.05-1.17-.16v-.01ZM530.48 104.07h.33c-.36-.13-.71-.32-1.04-.56.14.24.3.47.45.7.06-.08.14-.13.26-.13v-.01ZM542.63 58.82c.06.23.11.47.15.71.14-.33.36-.62.7-.86-.28.05-.57.11-.85.15ZM583.81 57.87c.15-.7.29-1.41.42-2.11-.14.45-.28.9-.42 1.34-.46 1.44-.89 2.89-1.31 4.34.44-1.19.88-2.37 1.31-3.57ZM523.62 91.48c-4.66 1.17-9.05 2.89-14.02 5.27 4.65-1.84 9.48-3.29 14.28-4.63-.09-.22-.17-.41-.26-.64ZM460.64 78.3c-.04-2.9-.11-5.81-.28-8.71-.1-1.68-.17-3.43-.5-5.09-.07.02-.14.03-.2.05.3 6.54.45 12.17.51 17.12.17-.07.34-.14.51-.2 0-1.06-.01-2.11-.03-3.17h-.01ZM470.63 63.24c-3.38-.26-6.81.32-10.1 1.1.41 2.01.47 4.14.57 6.18.18 3.55.25 7.11.27 10.67 3.31-1.38 6.5-3.12 9.3-5.35 1.96-1.56 3.86-3.41 5.02-5.66.73-1.41 1.19-3.22.26-4.65-1.09-1.7-3.46-2.14-5.32-2.29ZM460.29 63.68c1-.24 2.01-.46 3.04-.65-1.15.16-2.37.38-3.71.69v.13c.07-.02.15-.04.22-.05.11-.13.3-.18.45-.11v-.01ZM457.24 100.96c.43-.03.86-.07 1.29-.11.14-.49.27-.99.38-1.49-.44.7-1 1.23-1.67 1.6ZM482.88 104.98c-.18.23-.36.38-.55.47.14.09.27.19.4.28a70.76 70.76 0 0 0 4.37-4.63c.76-.89 1.52-1.81 2.19-2.77-.3-.27-.61-.53-.92-.79-.07 1.94-4.62 6.32-5.49 7.45v-.01Z",transform:"translate(-144.023 -51.76)"}),(0,Wo.jsx)("path",{d:"M474.36 63.31c-.4-.16-.84-.27-1.29-.37 1.56.42 3.08 1.22 3.76 2.74.62 1.4.32 2.95-.28 4.32.7-1.22.94-2.34.74-3.47-.24-1.33-1.19-2.54-2.93-3.21v-.01ZM477.34 89.18c-1.2-.81-2.4-1.62-3.6-2.42-.14.1-.26.19-.4.29 1.4.67 2.73 1.39 4 2.13ZM465.88 93.85c.37.25.74.5 1.1.75.46.32.92.65 1.38.97-1.57-1.2-2.01-1.61-2.49-1.72h.01ZM574.92 90.06c-2.28-5.21-4.93-11.13-5.67-12.26-.1-.15-1.57-3.01-1.63-3.08 0 0-.01.02-.02.02.4 1.37 1.09 2.69 1.65 3.99 2.14 4.95 4.36 9.86 6.67 14.73.6 1.26 1.21 2.52 1.83 3.78-.75-2.01-1.64-4.45-2.83-7.18ZM448.73 65.29c.1.2.22.38.34.57.22-.02.43-.06.65-.08v-.08c-.14-.05-.25 0-.99-.41ZM460.16 94.81c-.02.31-.06.59-.1.89-.03 1.71-.33 3.43-.79 5.07.15-.02.3-.03.45-.05.01-.04.02-.08.03-.11.09-.34.15-.69.2-1.03.17-1.07.25-2.16.33-3.24.05-.69.08-1.39.12-2.08-.27.1-.27.26-.24.57v-.02Z",transform:"translate(-144.023 -51.76)"}),(0,Wo.jsx)("path",{d:"m328.67 98.12-3.22-6.58c-1.29-2.63-2.53-5.29-3.72-7.97-.25-.85-.52-1.69-.79-2.53-.81-2.57-1.67-5.12-2.55-7.67-1.92-5.53-3.9-11.08-6.32-16.41-.72-1.58-1.46-3.44-2.63-4.79-.03-.17-.16-.29-.34-.36a.282.282 0 0 0-.23-.04c-.06-.01-.12 0-.18.01-.74.06-1.5.38-2.19.61-2.22.77-4.4 1.64-6.63 2.38-.03-.08-.06-.16-.09-.25-.15-.42-.82-.24-.67.19.03.09.07.19.1.28l-.18.06c-.36.11-.28.6 0 .68.18 1.18.63 2.36.98 3.49.03.09.06.17.08.26-.08.23-.17.46-.24.64-.37.98-.79 1.94-1.21 2.9-1.27 2.89-2.62 5.75-3.98 8.6-3.18 6.67-6.44 13.31-9.64 19.97-1.08 2.25-2.2 4.5-3.15 6.81-.13.32.24.5.5.37 1.34 1.33 2.84 2.5 4.4 3.57.65.44 1.31.87 2.01 1.24.4.22.86.48 1.33.5.24.01.35-.19.33-.37.11-.1.21-.21.28-.28.41-.41.81-.84 1.2-1.26.85-.92 1.69-1.87 2.5-2.84 6.31-2.34 12.6-4.31 18.71-5.84 2.14 5.3 3.43 8.43 3.97 9.58.55 1.05 1.15 1.88 1.82 2.52 1.32.56 6.96-.03 9.23-1.96.87-1.28 1.19-2.67.93-4.15-.09-.5-.22-.95-.4-1.33l-.01-.03Zm-20.09-45.61c.43.77.83 1.56 1.21 2.35-.54-.45-1.27-.99-2.07-1.49-.42-.24-.6-.35-.94-.34.43-.15.85-.29 1.29-.41.17-.05.34-.08.51-.11Zm-25.86 45.66c.78-1.85 1.67-3.66 2.54-5.47 1.51-3.16 3.05-6.31 4.58-9.47 1.28-2.63 2.56-5.26 3.83-7.9l-1.1 2.66c-1.99 4.79-4.97 10.9-8.88 18.15-.43.76-.66 1.51-.71 2.24-.05-.05-.1-.09-.15-.14a.259.259 0 0 0-.11-.07Zm6.24 4.71c-.42-.23-.82-.48-1.22-.74 1.05.45 2 .72 2.55.72l-.21.21c-.05.05-.11.1-.16.15-.01.01-.04.03-.05.04 0-.02.03-.02.05-.03a.27.27 0 0 0-.08.07c-.05-.02-.1-.03-.14-.05-.25-.1-.49-.24-.73-.37h-.01Zm15.73-29.43c1.05 3.15 2.1 6.31 3.1 9.48.34 1.06.69 2.13 1.01 3.21-3.5.63-6.95 1.46-10.27 2.5 2.48-6.03 4.54-11.11 6.16-15.19Zm4.79 12.57c-.23-.79-.49-1.58-.73-2.36-.79-2.54-1.63-5.08-2.46-7.61l-1.2-3.6c.02-.04.04-.09.05-.13 1.6 4.45 3.28 9 5.01 13.57l-.67.12v.01Zm5.83-18.27-.15-.54c-.49-1.64-1.03-3.28-1.6-4.9.23.58.47 1.17.7 1.75 1.56 4.03 3.01 8.1 4.39 12.2-.33-.82-.67-1.64-.98-2.46l-2.35-6.05h-.01ZM390.43 79.37c-.13-10.43-.22-17.5-.24-19.97-.24-1.6.21-2.88-.65-3.65-.14-.13-.32-.23-.52-.32h.03c.45 0 .45-.69 0-.7-1.75-.03-3.5-.04-5.25-.14-1.38-.08-2.76-.21-4.15-.31-.07 0-.12.01-.17.04-.21-.07-.47.03-.45.31l.03.45c-.11.14-.19.3-.22.5-.21 1.26-.32 13.67-.36 23.59-.32 5.79-.67 11.57-.97 17.36-.09 1.73-.29 3.54-.21 5.3-.39.02-.38.64.04.69v.12c.05.44.74.45.7 0v-.06c1.1.09 2.2.21 3.3.3 1.14.19 2.44.2 3.29.17 1.73-.05 2.92-.05 3.8-.37.45-.05.9-.11 1.35-.17.44-.06.25-.73-.19-.67h-.01c.24-.32.45-.72.62-1.25.66-1.84.41-6.36.34-11.33l-.13-9.9.02.01Zm-12.26 18.17c.09-1.91.2-3.81.31-5.71.06 5.38 0 6.14-.01 6.51-.05 1.65-.21 2.81.72 3.66-.39-.04-.78-.07-1.17-.1-.06-1.44.09-2.93.16-4.35l-.01-.01ZM588.97 53.85c-2.06-.25-3.17-.51-3.76-.6a.3.3 0 0 1 .04-.08c.22-.39-.39-.75-.6-.35-.56 1.02-.9 2.19-1.26 3.29-.61 1.88-1.17 3.78-1.72 5.68-.63 2.19-1.24 4.39-1.83 6.59-.81 2.03-1.67 4.05-2.61 6.03-1.7-3.64-3.11-6.04-4.03-7.57-2.26-3.74-2.85-5.48-3.57-6.08l.31-.09c.43-.12.25-.8-.19-.67-1.06.3-2.12.6-3.17.95-.93.32-1.85.69-2.76 1.07-.13.05-.19.16-.22.27-.04.02-.08.05-.11.07-.04-.06-.07-.12-.11-.18a.354.354 0 0 0-.48-.12c-.16.09-.22.32-.13.48l.33.54c0 .09.02.18.06.28.51 1.16.78 1.38.72 1.47-2.42 3.44-5.41 7.86-6.2 9.1-1.27 1.97-2.01 3.14-2.45 3.84l-.91-6.56-.43-4.1c-.19-1.85-.37-3.23-.53-4.13-.19-1.1-.3-2.15-.45-3.16-.2-1.36-.29-2.06-.47-2.42h.04c.45.02.45-.68 0-.7-3.43-.16-6.81.94-10.17 1.48-.24-.22-.73-.04-.58.32.24.59.33 1.25.43 1.87.17 1.06.29 2.13.4 3.2.32 3.09.53 6.2.74 9.3.44 6.75.77 13.51 1.17 20.26.11 1.95.13 3.96.46 5.89.05.3.37.31.55.14.74 1.71 2.87 1.27 6.13 1.27 1.34 0 2.39.04 2.99-.11.02.32.48.53.63.18 3.61-8.26 7.41-16.46 12.05-24.2.03-.05.04-.1.05-.15.3.73.64 1.45.94 2.16.97 2.26 1.97 4.52 2.98 6.76 2.26 5.03 4.54 10.07 7.09 14.96.47.9.94 1.79 1.47 2.65.2.32.4.67.66.96-.18.25 0 .68.34.54.91-.38 1.82-.75 2.76-1.07 1.04-.35 2.11-.65 3.17-.95.39-.11.28-.66-.07-.68.62-.4.95-.96.87-1.91-.3-3.34.72-7.47.86-8.52l2.14-11.43c1.75-10.74 3.13-17.51 3.23-20.86.02-.49.08-2.84.13-3.24.17-1.25.48-1-4.96-1.65l.03-.02Zm-46.19 5.67c-.04-.24-.09-.48-.15-.71l.85-.15c-.34.24-.56.53-.7.86Zm1.95 25.12c-.36-6.63-.7-13.26-1.32-19.87 0 .02 0 .04.01.06.29 1.65.44 2.47.56 2.89 1 8.46 1.5 16.14 1.46 22.8-.06.99-.1 2-.11 3.02-.01.29-.03.68-.05 1.12-.01-.26-.03-.53-.04-.78-.19-3.08-.35-6.16-.52-9.23l.01-.01Zm36.4 18.66c-.11-.11-.24-.29-.37-.49.35.21.74.26 1.17.16-.27.11-.53.22-.8.32v.01Zm-.89-33.72c.12-.43.23-.86.35-1.29.71-1.77 1.41-3.55 2.08-5.33-.15.68-.26 1.22-.31 1.55-.5 2.94-2.13 7.59-3.58 13.36-.15-.35-.29-.66-.43-1 .61-2.44 1.25-4.87 1.9-7.3l-.01.01Zm3.56-12.48c.14-.44.28-.89.42-1.34-.13.7-.27 1.41-.42 2.11-.43 1.19-.86 2.38-1.31 3.57.42-1.45.85-2.9 1.31-4.34Zm-5.22 16.05c-.11.44-.23.87-.35 1.31-.12.46-.23.92-.35 1.38-.1-.22-.19-.4-.28-.61.34-.69.66-1.38.97-2.08h.01Zm-11.64 2.62c.06-.1.12-.19.17-.28.05.13.09.26.14.39a.398.398 0 0 0-.31-.11Zm2.3 2.98c-.56-1.3-1.25-2.63-1.65-3.99 0 0 .01-.02.02-.02.06.08 1.52 2.93 1.63 3.08.73 1.13 3.38 7.04 5.67 12.26 1.2 2.73 2.08 5.17 2.83 7.18-.62-1.25-1.23-2.51-1.83-3.78-2.31-4.87-4.53-9.78-6.67-14.73ZM275.92 87.03c-1.06-2.18-1.13-3.45-2.44-2.93-1.52.57-2.94 1.3-4.5 2.1-1.4.72-2.68 1.44-3.92 2.12.01-.25-.24-.5-.51-.34-4.8 2.93-12.41 4.7-17.28 1.31-1.98-1.77-3.32-4.15-3.97-5.78-.29-.95-.49-1.94-.63-2.93-.14-3.34 1.58-6.53 3.9-9.12.8-.79 1.68-1.51 2.66-2.12 3.7-2.3 8.22-3.07 12.51-2.51 2.71.35 5.32 1.24 7.71 2.55.39.22.75-.39.35-.6-.18-.1-.37-.18-.55-.27.56.27 1.03.33 1.51.19l-.48.39c-.15.11-.23.3-.13.48.09.15.33.24.48.13 1.3-.97 2.46-2.09 3.45-3.37.37-.29.64-.6.65-.97v-.02c.08-.33-.03-.7-.21-1.08-.31-.87-.98-2.01-2.19-3.26-2.43-2.52-3.79-3.45-5.68-4.26-1.14-.49-3.12-1.06-4.42-1.23-3.28-.42-10.64-1.21-18.18 4.11-7.74 5.46-11.94 12.3-12.23 20.61-.08 2.06.04 3.98.34 5.71.74 4.18 2.57 8 5.44 11.34 4.26 4.99 9.76 7.52 16.34 7.52 4.85 0 9.69-1.77 14.89-4.62.23-.12.45-.23.68-.35 2.19-1.1 4.37-2.23 6.46-3.5.49-.3 1.03-.61 1.5-.98 1.47-.87 1.11-1.12.49-2.95-.39-1.14-.76-2.7-2.06-5.36l.02-.01Zm-17.38-21.76c3.05-.42 6.31.79 9.36 2.35.51.39.94.68 1.33.87-5.61-2.86-12.72-3.39-18.44-.79 2.05-1.33 4.24-1.95 7.74-2.44l.01.01ZM443.67 72.67c-.4-2.2-1.15-4.33-2.37-6.22-1.49-2.32-3.58-4.19-5.91-5.64-6.17-3.81-13.75-5.11-20.83-6.01-3.23-.41-6.47-.69-9.72-.92l-1.39-.12c-.85-.07-1.52-.1-2.05-.1-1.08-.06-2.17-.12-3.25-.17-.08 0-.14.02-.19.05-.1.05-.18.14-.16.3.27 2.55-.01 5.12-.92 7.52-.15.38.4.56.62.28 1.32.59 2.68 1.05 4.08 1.37 0 2.78-.14 7.58-.33 12.91 0 0 0 .02-.01.03-.61 3.66-.79 7.42-1 11.12-.23 4.01-.43 8.03-.44 12.05 0 .64 0 1.28.03 1.93.02.31 0 .68.15.96.06.11.14.16.24.17-.2.17-.21.54.11.59 3.83.67 7.78.71 11.68.25 2.3-.19 4.87-.65 7.65-1.56 1.85-.54 3.67-1.18 5.43-1.91 7.2-3.02 14.31-8.07 17.35-15.53.76-1.86 1.17-3.8 1.31-5.75.3-1.93.28-3.82-.09-5.58l.01-.02Zm-19.32-15.42c5.74 1.41 11.94 3.68 15.65 8.55.25.32.47.65.69.99-2.3-2.82-5.68-5.69-12.88-8.23-2.16-.76-4.35-1.43-6.64-2.02 1.06.21 2.13.45 3.18.71Zm-25.82-3.04c.13 0 .27.01.4.02-.14.1-.26.23-.37.38 0-.13-.02-.26-.03-.4Zm34.82 22.17c-.75 3.09-3.55 5.66-5.88 7.58-3.35 2.76-7.21 5.03-11.28 6.54-1.33.49-2.71.9-4.12 1.15.06-1.38.08-2.76.07-4.13-.02-3.78-.16-7.56-.41-11.33-.09-1.37-.18-2.74-.37-4.1 0-.06-.03-.11-.06-.15.09-3.25.12-6.16.03-8.12 6.86 1.05 10.56 2.17 14.06 3.62 5.52 2.28 8.59 5.44 7.97 8.96l-.01-.02Zm-22 16.15c-.12 0-.23-.02-.34-.03l.34-.03v.06Zm-.69-.7c0-3.13.26-8.84.47-14.51.06 1.2.11 2.41.15 3.6.15 3.6.25 7.23.09 10.83-.24.03-.48.05-.71.07v.01Zm-12.33-30.94c.37.63 2.01 1.01 3.23 1.25v.15c-1.31-.31-2.59-.73-3.83-1.29.12-.36.23-.72.33-1.09.08.48.18.84.27.98Zm13.7 31.65v-.18c3.41-.56 6.71-2.02 9.69-3.68 2.31-1.28 4.59-2.78 6.63-4.53-4.69 4.53-11.61 8.24-16.33 8.38l.01.01Zm24.07-.75c-2.05 1.93-4.37 3.56-6.83 4.95 2.7-1.78 5.52-4.03 8.42-6.87.82-.82 1.56-1.69 2.23-2.59-1.08 1.65-2.38 3.16-3.81 4.51h-.01ZM187.16 92.14c-.79-2.47-2.1-7.12-3.1-6.87-.19-.01-2.09.77-4.08 1.54-3.06 1.18-5.91 2.13-10.09 2.82-2.74.42-5.87 1.01-10.61 1.06.04-3.34.05-6.01.05-7.99 7.97-.65 12.33-2.11 16.37-3.55 1.11-.39 2.69-1.01 2.63-1.8-.08-.35-.55-1.39-1.17-2.61-.47-1.16-.98-2.31-1.61-3.38-.42-.71-1.04-1.69-1.86-2.06-.11-.08-.22-.13-.29-.12-.02 0-.04 0-.07.01-.19-.04-.39-.05-.6-.01-.17.03-.24.15-.25.28-.04.02-.09.04-.14.05-4.33 1.48-8.85 2.33-13.24 3.61a499.1 499.1 0 0 0-.31-8.19c4.51-.99 8.88-1.38 13.11-1.82 3.68-.38 6.28.12 7.47.34.59.11.9.16 1.16.18h.1c-.1.37.44.66.62.28.02-.04.03-.08.05-.13.15.2.53.22.62-.1.17-.58.19-1.21.21-1.81v-.36c.03-.15.05-.3.07-.45.52-2.47.33-5.09-.64-7.44-.11-.27-.44-.28-.6-.14-.08-.21-.15-.42-.24-.62-.19-.41-.79-.05-.6.35.03.07.05.15.09.22-.98-.42-2.15-.54-3.17-.63-2.17-.19-4.37-.14-6.54 0-5.7.35-11.4 1.3-16.91 2.79-2.08.56-4.13 1.22-6.14 2-4.54 1.05-3.79 1.51-2.17 6.07.18.51.46 1.68.54 1.94.82 2.47 1.08 2.13 3.1 2.13s0 .05 0 .08h.52c-.48 2.66-.51 5.45-.62 8.13-.15 3.48-.22 6.96-.28 10.45 0 .41-.01.82-.02 1.23-.16.29-.33.57-.51.85-.05.38-.09.77-.14 1.18-.42 3.52-.59 6.48-.52 8.8v.34c.02.47.05.76.06.87.16 1.57-.26 3.47 1.35 3.79 1.61.32 3.5.55 4.85.55.11 0 .22-.02.33-.02 1.79.24 3.67.05 5.45-.12 2.85-.28 5.69-.7 8.51-1.19 3.03-.53 6.05-1.14 9.04-1.86 2.4-.58 4.82-1.19 7.13-2.06.51-.19 1.73-.57 2.46-1.14 1.81-.68 2.18-1 1.57-2.67-.23-.62-.48-1.49-.91-2.78l-.03-.02Zm-11.12-38.71c.89.05 1.93.08 2.89.3-.33 0-.68-.02-1.06-.03-8.28-.26-14.88.75-23.97 2.51 2.41-.64 4.85-1.16 7.28-1.59 4.87-.86 9.91-1.45 14.86-1.19Zm-26.53 22.13c.03 1.71.04 3.43 0 5.14-.04 1.27-.11 2.55-.24 3.82 0-.73.02-1.46.04-2.19.05-2.26.12-4.51.22-6.77h-.02Zm6.73 27.85c.2-.1.4-.21.58-.33 1.82-.17 3.82-.24 5.94-.34-.86.11-1.72.24-2.58.33-1.27.14-2.61.31-3.93.34h-.01ZM534.48 85.44c-3.52-8.38-7.07-16.75-10.5-25.17-.63-1.54-1.25-3.09-1.86-4.65-.31-.8-.65-1.6-.87-2.43-.04-.17-.17-.24-.31-.25.1-.2 0-.51-.29-.53-1.59-.08-3.18-.22-4.78-.25-1.96-.03-3.91.13-5.84.42-.31.05-.31.38-.13.56-.03.06-.05.14-.04.22.23 1.54.63 3.06 1.16 4.53.13.35.27.7.41 1.06l-2.68 6.18c-.11.03-.2.09-.25.22-.67 1.9-1.52 3.73-2.34 5.56a536.85 536.85 0 0 1-3.9 8.45c-2.64 5.64-5.34 11.25-7.91 16.93-.44.97-.88 1.94-1.29 2.93-.2.48-.47 1-.55 1.52v.05c-.02.12.02.26.16.34 1.19.73 2.41 1.41 3.66 2.05 1.2.62 2.45 1.25 3.76 1.61.43.12.62-.55.19-.67-1.13-.31-2.2-.83-3.24-1.36 1.09.36 2.1.69 2.75.93 2.82 1.01 2.38 1.1 4.3-3.75 2.1-1.09 4.34-1.96 6.53-2.79 4.35-1.64 8.8-3.03 13.27-4.29.82 2.01 1.77 3.97 2.72 5.92.35.83.62 1.45.79 1.82.22.42.45.8.69 1.15.17.33.33.67.5 1 .42.8.84 1.63 1.4 2.35.23.29.6 0 .55-.31 1.53-.02 3.06-.07 4.58-.27.92-.12 1.82-.32 2.71-.54 1.39-.27 3.85-1.11 3.74-1.42-.67-1.96-1.55-3.87-2.34-5.78-1.57-3.78-3.16-7.56-4.75-11.33v-.01Zm-11.65-26.16c1.54 3.81 3.12 7.6 4.7 11.4 2.94 7.05 5.91 14.09 8.87 21.13l-1.06-2.17c-2.71-5.51-5.2-11.19-7.41-16.87l-6.65-17.15c-.65-1.45-.55-2.19-.93-2.53.09 0 .18.01.28.02a.29.29 0 0 0-.04.26c.52 2.02 1.47 3.98 2.25 5.91h-.01Zm-6.58 13.58c.05-.15.09-.31.14-.46 1.41 3.92 2.88 7.9 4.39 11.87-3.22.52-6.38 1.25-9.46 2.14.55-1.22 1.05-2.46 1.53-3.7 1.24-3.24 2.37-6.53 3.39-9.85h.01Zm-.23-20c.36 0 .73.03 1.09.05-2.15.1-5.18.33-5.87.74-.24.15-.41.3-.53.45-.06-.29-.13-.58-.18-.88 1.82-.26 3.65-.39 5.49-.35v-.01Zm-.09 18.72c-.49 1.67-1.05 3.33-1.6 4.97-1.07 3.19-2.19 6.38-3.57 9.46-.09.21-.19.43-.29.65-.25.07-.5.14-.74.22 2.53-6.16 4.61-11.29 6.2-15.3Zm-6.34 25.16c4.97-2.38 9.37-4.1 14.02-5.27l.26.64c-4.8 1.35-9.63 2.8-14.28 4.63Zm20.17 6.76c.33.23.68.42 1.04.56h-.33c-.12 0-.21.06-.26.13-.15-.23-.31-.45-.45-.7v.01ZM226.57 91.75c-3.55-4.74-6.68-9.11-9.31-12.99 9.2-15.25 10.05-17.81 10.35-18.38.17-.34 1.09-2.27.64-2.53-1.13-.65-1.03-.65-2.97-1.71-1.19-.65-3.04-1.61-4.53-2.12-1.71-.59-1.24-.36-3 2.77-.06.1-.11.2-.17.3-.75 1.02-1.48 2.05-2.2 3.09-1.88 2.71-3.73 5.45-5.69 8.1-3.68-4.91-6.88-8.76-9.51-11.43-.15-.15-.3-.29-.46-.42-1.27-1.28-7.24 3.53-7.93 5.58-.09.09-.19.16-.28.25-.27.26.03.64.33.58.19.65.5 1.29.94 1.91 3.85 5.06 7.19 9.76 9.94 14-1.23 2.61-3.06 5-4.67 7.38l-2.28 3.33c-.5.66-.93 1.23-1.29 1.69-.67.93-2.09 2.61-2.3 3.87-.51.85-1.16 1.84-1.29 2.83-.06.44.61.63.67.19.01-.08.04-.15.06-.22 1.36 1.08 2.76 2.11 4.19 3.11 1.3.91 2.62 1.85 4.04 2.56.21.1.4 0 .48-.17.24.07.48.14.72.2.44.1.62-.57.19-.67-2.02-.48-3.77-1.57-5.23-3.02-.47-.46-.9-.96-1.32-1.46 1.74 1.35 4.2 2.89 5.89 4.14 1.39 1.03 2.85-2.27 4.22-4.2 1.86-2.64 3.96-5.86 5.52-8.29l10.39 14.51c.67.81 1.14 1.21 1.57 1.36-.05.24.12.51.41.4 1.53-.58 3.05-1.19 4.54-1.87 1.52-.69 3.06-1.45 4.36-2.5a.28.28 0 0 0 .12-.23c1.66-1.1.81-1.74-1.41-4.91-1.13-1.58-1.71-2.36-3.7-5.01l-.03-.02Zm2.41 6.54c.56 1.15 1.19 2.52 1.11 3.81-.06.04-.12.07-.17.1-.03-.88-.55-2.66-.94-3.91Zm-16.51-32.73c1.86-2.65 3.65-5.35 5.57-7.95.4-.55.81-1.13 1.26-1.66.19-.18.38-.33.56-.45.18.03.36.08.55.13l-8.05 10.11.12-.18h-.01ZM192.7 95.48c.79-1.37 1.66-2.69 2.54-4 1.19-1.79 2.4-3.56 3.61-5.33-.04.09-.09.17-.13.26-.1.22.03.41.2.49-2.47 3.42-4.89 6.73-6.4 9.28.21.24.4.48.63.75-.24.07-.4.36-.17.56.4.33.72.77 1.05 1.17.09.11.18.21.27.32-.84-.61-1.66-1.24-2.47-1.88.24-.57.58-1.11.87-1.61v-.01Zm7.46-10.32c.47-.81.98-1.59 1.49-2.37.31-.48.64-.95.96-1.43.26-.29.52-.56.75-.79-.99 1.48-2.09 3.03-3.2 4.59Zm10.03-16.22s-.03-.05-.05-.07c.22-.29.43-.59.64-.89-.2.32-.4.65-.58.96h-.01ZM371.54 87.96c-.01-.08-.01-.16-.03-.23-.06-.38-.58-.29-.66.03-.3-.05-.6-.08-.81-.11-1.14-.15-2.29-.19-3.44-.2 1.04-.09 2.09-.18 3.14-.23.45-.02.45-.72 0-.7-6.57.35-13.14 1.23-19.65 2.11-1.53.21-3.05.42-4.57.68-.01 0-.02.01-.04.01-.04-3.33-.13-6.66-.24-9.99-.19-5.7-.4-11.41-.88-17.1-.13-1.51-.23-3.07-.49-4.58 0-.25 0-.48-.02-.68-.06-1.19-.04-2.61-.68-2.78-.16-.07-.72-.16-1.5-.24.22-.17.16-.62-.2-.63-1.19-.04-2.39.09-3.57.23-1.2.14-2.41.32-3.59.6-.16-.1-.41-.06-.5.12-.06.02-.13.03-.19.05-.35.1-.29.55-.03.66-.26.6-.19 2.27-.21 3-.02.66-.66 33.73-.9 40.3-.03.65.06 1.12.04 1.45-.16 3.05.87 4.96 6.34 3.93 1.09-.08 2.75-.77 5.36-1.43 4.13-1.04 5.78-1.52 6.2-1.65 6.43-1.69 6.78-1.97 11.72-2.43.55-.05 4.8-.38 6.03-.3.64.04 1.19.07 1.65.1.09 0 .16-.03.24-.05.1.27.56.33.66-.02.39-1.32.61-2.71.78-4.08.2-1.61.29-3.24.15-4.86.24.03.52-.23.38-.53-.09-.2-.27-.33-.49-.43v-.02Zm-.63.56c.07.57.11 1.14.11 1.71-.21-.99-.53-1.71-.95-1.87.22.03.44.06.65.11.06.01.12.04.19.05Zm-25.41 1.73c1.54-.36 3.1-.64 4.66-.89-1.61.37-3.18.77-4.66 1.2v-.31Zm-.86-7.37c-.07-1.37-.16-2.75-.25-4.12-.21-3.13-.45-6.27-.79-9.4.02-2.25.08-4.31.13-6.11.16 2.08.29 4.16.4 6.24.23 4.46.38 8.93.5 13.39h.01Zm-.94-4c.16 2.41.29 4.83.39 7.24.06 1.6.14 3.22.09 4.83-.15.05-.32.09-.47.14V78.88h-.01ZM483.72 92.83c-3.05-2.28-6.22-4.4-9.38-6.51 8.86-6.49 13.49-12.95 13.73-19.23.04-.76 0-1.5-.13-2.2-.67-3.82-3.5-6.68-8.39-8.48.13.04.27.08.4.13 3.92 1.39 7.74 4.23 8.5 8.56.34 1.95-.05 3.96-.98 5.69-.21.4.39.75.6.35 1.86-3.46 1.46-7.55-.97-10.63-3.53-4.47-9.76-5.88-15.16-6.16-2.32-.12-4.64-.04-6.95.19-6 .32-12.71 1.68-17.63 3.21-.37.11-.67.23-.92.35-.2-.17-.62.02-.57.37v.03c-.64.68-.18 1.64.48 3.21.38.91.67 1.89 1.15 2.58.32.76.68 1.51 1.13 2.19.14.21.38.19.53.07.19-.02.38-.05.57-.08v1.57c-.06.06-.1.13-.11.23-.27 4.18-.34 8.38-.48 12.57l-.3 9.03c-.24 3.91-.44 6.77-.46 7.26-.05.88-.11 1.95.07 2.81-.01.22-.02.43-.04.65 0 .11-.02.23-.03.35 0 .05-.03.27-.01.16-.05.4.5.59.64.28.05.04.12.08.2.08 1.75.13 3.5.28 5.25.3 1.69.02 3.38-.12 5.06-.32.08.23.36.39.55.15.06-.08.11-.17.16-.26.18-.09.24-.32.18-.48.05-.2.1-.4.13-.6.16-.86.25-1.74.33-2.62.11-1.17.17-2.34.23-3.51.15-.01.32-.03.52-.04.36-.03 1.73-.15 2.06-.15.39 0 .7-.02.95-.04 1.76 1.11 3.45 2.35 5.14 3.55 2.83 2.01 5.64 4.04 8.47 6.04 1.42 1 2.85 2 4.29 2.97.1.06.19.07.27.04.08 0 .17-.02.25-.1 1.61-1.56 3.15-3.18 4.6-4.88.75-.88 1.49-1.78 2.15-2.73.01.01.03.02.04.03.34.3.83-.2.49-.49-2.16-1.9-4.34-3.76-6.64-5.48l.03-.01Zm-6.38-3.65a55.72 55.72 0 0 0-4-2.13c.14-.1.26-.19.4-.29 1.2.81 2.4 1.61 3.6 2.42Zm-20.1 11.78c.67-.37 1.23-.91 1.67-1.6-.11.5-.24 1-.38 1.49-.43.04-.86.08-1.29.11Zm2.38-37.24c1.34-.31 2.56-.52 3.71-.69-1.03.19-2.04.41-3.04.65-.14-.07-.34-.02-.45.11-.07.02-.15.04-.22.05v-.13.01Zm.04.84c.07-.02.14-.03.2-.05.34 1.66.41 3.41.5 5.09.17 2.9.24 5.81.28 8.71l.03 3.17c-.17.07-.34.14-.51.2-.06-4.96-.21-10.58-.51-17.12h.01Zm16.04 5.62c-1.16 2.25-3.06 4.1-5.02 5.66-2.8 2.23-5.99 3.97-9.3 5.35-.01-3.56-.09-7.12-.27-10.67-.1-2.04-.16-4.16-.57-6.18 3.3-.78 6.72-1.36 10.1-1.1 1.85.14 4.23.59 5.32 2.29.92 1.43.46 3.24-.26 4.65Zm.85-.18c.6-1.37.9-2.92.28-4.32-.67-1.52-2.2-2.32-3.76-2.74.46.1.89.21 1.29.37 1.74.67 2.69 1.88 2.93 3.21.2 1.13-.05 2.25-.74 3.47V70Zm-27.47-4.14c-.12-.19-.23-.38-.34-.57.74.42.85.36.99.41v.08c-.22.03-.43.06-.65.08Zm11.21 30.46c-.08 1.08-.16 2.17-.33 3.24-.05.35-.11.69-.2 1.03 0 .04-.02.07-.03.11-.15.02-.3.04-.45.05.45-1.64.76-3.36.79-5.07.03-.29.08-.57.1-.89-.03-.31-.03-.47.24-.57-.04.69-.07 1.39-.12 2.08v.02Zm5.6-2.47c.48.11.92.52 2.49 1.72-.46-.32-.92-.65-1.38-.97-.37-.25-.73-.5-1.1-.75h-.01Zm21.23 7.24a70.76 70.76 0 0 1-4.37 4.63c-.14-.09-.27-.19-.4-.28.19-.09.37-.24.55-.47.87-1.14 5.43-5.51 5.49-7.45.31.26.62.53.92.79-.67.97-1.42 1.88-2.19 2.77v.01Z",fill:"currentColor",transform:"translate(-144.023 -51.76)"})]}),i6=({style:t,size:e="small",withText:o})=>(0,Wo.jsxs)("div",{className:`ExcalidrawLogo is-${e}`,style:t,children:[(0,Wo.jsx)(EI,{}),o&&(0,Wo.jsx)(wI,{})]});var He=v(k(),1),Bg=({icon:t,shortcut:e,children:o})=>{let r=Me();return(0,He.jsxs)(He.Fragment,{children:[(0,He.jsx)("div",{className:"welcome-screen-menu-item__icon",children:t}),(0,He.jsx)("div",{className:"welcome-screen-menu-item__text",children:o}),e&&!r.editor.isMobile&&(0,He.jsx)("div",{className:"welcome-screen-menu-item__shortcut",children:e})]})};Bg.displayName="WelcomeScreenMenuItemContent";var $s=({onSelect:t,children:e,icon:o,shortcut:r,className:n="",...i})=>(0,He.jsx)("button",{...i,type:"button",className:`welcome-screen-menu-item ${n}`,onClick:t,children:(0,He.jsx)(Bg,{icon:o,shortcut:r,children:e})});$s.displayName="WelcomeScreenMenuItem";var a6=({children:t,href:e,icon:o,shortcut:r,className:n="",...i})=>(0,He.jsx)("a",{...i,className:`welcome-screen-menu-item ${n}`,href:e,target:"_blank",rel:"noreferrer",children:(0,He.jsx)(Bg,{icon:o,shortcut:r,children:t})});a6.displayName="WelcomeScreenMenuItemLink";var Go=({children:t})=>{let{WelcomeScreenCenterTunnel:e}=Ge();return(0,He.jsx)(e.In,{children:(0,He.jsx)("div",{className:"welcome-screen-center",children:t||(0,He.jsxs)(He.Fragment,{children:[(0,He.jsx)(zg,{}),(0,He.jsx)(Hg,{children:g("welcomeScreen.defaults.center_heading")}),(0,He.jsxs)($g,{children:[(0,He.jsx)(Wg,{}),(0,He.jsx)(Ug,{})]})]})})})};Go.displayName="Center";var zg=({children:t})=>(0,He.jsx)("div",{className:"welcome-screen-center__logo virgil welcome-screen-decor",children:t||(0,He.jsx)(i6,{withText:!0})});zg.displayName="Logo";var Hg=({children:t})=>(0,He.jsx)("div",{className:"welcome-screen-center__heading welcome-screen-decor virgil",children:t});Hg.displayName="Heading";var $g=({children:t})=>(0,He.jsx)("div",{className:"welcome-screen-menu",children:t});$g.displayName="Menu";var Ug=()=>{let t=St();return(0,He.jsx)($s,{onSelect:()=>t.executeAction(fi),shortcut:"?",icon:la,children:g("helpDialog.title")})};Ug.displayName="MenuItemHelp";var Wg=()=>{let t=_e(),e=St();return t.viewModeEnabled?null:(0,He.jsx)($s,{onSelect:()=>e.executeAction(Pa),shortcut:Et("loadScene"),icon:sa,children:g("buttons.load")})};Wg.displayName="MenuItemLoadScene";var l6=({onSelect:t})=>{let{t:e}=xt();return(0,He.jsx)($s,{shortcut:null,onSelect:t,icon:cd,children:e("labels.liveCollaboration")})};l6.displayName="MenuItemLiveCollaborationTrigger";Go.Logo=zg;Go.Heading=Hg;Go.Menu=$g;Go.MenuItem=$s;Go.MenuItemLink=a6;Go.MenuItemHelp=Ug;Go.MenuItemLoadScene=Wg;Go.MenuItemLiveCollaborationTrigger=l6;h();var lr=v(k(),1),yu=({children:t})=>{let{WelcomeScreenMenuHintTunnel:e}=Ge();return(0,lr.jsx)(e.In,{children:(0,lr.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--menu",children:[J0,(0,lr.jsx)("div",{className:"welcome-screen-decor-hint__label",children:t||g("welcomeScreen.defaults.menuHint")})]})})};yu.displayName="MenuHint";var Eu=({children:t})=>{let{WelcomeScreenToolbarHintTunnel:e}=Ge();return(0,lr.jsx)(e.In,{children:(0,lr.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--toolbar",children:[(0,lr.jsx)("div",{className:"welcome-screen-decor-hint__label",children:t||g("welcomeScreen.defaults.toolbarHint")}),ex]})})};Eu.displayName="ToolbarHint";var wu=({children:t})=>{let{WelcomeScreenHelpHintTunnel:e}=Ge();return(0,lr.jsx)(e.In,{children:(0,lr.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--help",children:[(0,lr.jsx)("div",{children:t||g("welcomeScreen.defaults.helpHint")}),Q0]})})};wu.displayName="HelpHint";var sr=v(k(),1),Cu=t=>(0,sr.jsx)(sr.Fragment,{children:t.children||(0,sr.jsxs)(sr.Fragment,{children:[(0,sr.jsx)(Go,{}),(0,sr.jsx)(yu,{}),(0,sr.jsx)(Eu,{}),(0,sr.jsx)(wu,{})]})});Cu.displayName="WelcomeScreen";Cu.Center=Go;Cu.Hints={MenuHint:yu,ToolbarHint:Eu,HelpHint:wu};var CI=Cu;h();var Tu=v(k(),1),s6=({isCollaborating:t,onSelect:e,...o})=>{let r=_e(),n=r.width<830;return(0,Tu.jsxs)(wr,{...o,className:z("collab-button",{active:t}),type:"button",onSelect:e,style:{position:"relative",width:n?void 0:"auto"},title:g("labels.liveCollaboration"),children:[n?Cx:g("labels.share"),r.collaborators.size>0&&(0,Tu.jsx)("div",{className:"CollabButton-collaborators",children:r.collaborators.size})]})},TI=s6;s6.displayName="LiveCollaborationTrigger";h();var Us=v(k(),1),c6=({children:t,icon:e})=>{let{TTDDialogTriggerTunnel:o}=Ge(),r=Ae();return(0,Us.jsx)(o.In,{children:(0,Us.jsxs)(Pe.Item,{onSelect:()=>{ge("ai","dialog open","ttd"),r({openDialog:{name:"ttd",tab:"text-to-diagram"}})},icon:e??pv,children:[t??g("labels.textToDiagram"),(0,Us.jsx)(Pe.Item.Badge,{children:"AI"})]})})};c6.displayName="TTDDialogTrigger";var Su=v(k(),1);r6();var SI=t=>{let{onChange:e,initialData:o,excalidrawAPI:r,isCollaborating:n=!1,onPointerUpdate:i,renderTopRightUI:a,langCode:l=fr.code,viewModeEnabled:s,zenModeEnabled:c,gridModeEnabled:d,libraryReturnUrl:m,theme:p,name:f,renderCustomStats:b,onPaste:x,detectScroll:y=!0,handleKeyboardGlobally:S=!1,onLibraryChange:C,autoFocus:w=!1,generateIdForFile:M,onLinkOpen:B,onPointerDown:I,onPointerUp:_,onScrollChange:A,children:U,validateEmbeddable:R,renderEmbeddable:W,aiEnabled:O}=t,F=t.UIOptions?.canvasActions,ee={...t.UIOptions,canvasActions:{...Ru.canvasActions,...F},tools:{image:t.UIOptions?.tools?.image??!0}};return F?.export&&(ee.canvasActions.export.saveFileToDisk=F.export?.saveFileToDisk??Ru.canvasActions.export.saveFileToDisk),ee.canvasActions.toggleTheme===null&&typeof p>"u"&&(ee.canvasActions.toggleTheme=!0),(0,ku.useEffect)(()=>{(async()=>{await import("./excalidraw-assets/roundRect-2ACQK4DA.js")})();let be=ke=>{typeof ke.scale=="number"&&ke.scale!==1&&ke.preventDefault()};return document.addEventListener("touchmove",be,{passive:!1}),()=>{document.removeEventListener("touchmove",be)}},[]),(0,Su.jsx)(jc,{unstable_createStore:()=>Wt,scope:Re,children:(0,Su.jsx)(V0,{langCode:l,theme:p,children:(0,Su.jsx)(o6,{onChange:e,initialData:o,excalidrawAPI:r,isCollaborating:n,onPointerUpdate:i,renderTopRightUI:a,langCode:l,viewModeEnabled:s,zenModeEnabled:c,gridModeEnabled:d,libraryReturnUrl:m,theme:p,name:f,renderCustomStats:b,UIOptions:ee,onPaste:x,detectScroll:y,handleKeyboardGlobally:S,onLibraryChange:C,autoFocus:w,generateIdForFile:M,onLinkOpen:B,onPointerDown:I,onPointerUp:_,onScrollChange:A,validateEmbeddable:R,renderEmbeddable:W,aiEnabled:O!==!1,children:U})})})},kI=(t,e)=>{if(t.children!==e.children)return!1;let{initialData:o,UIOptions:r={},...n}=t,{initialData:i,UIOptions:a={},...l}=e,s=Object.keys(r),c=Object.keys(a);return s.length!==c.length?!1:s.every(m=>m==="canvasActions"?Object.keys(r.canvasActions).every(f=>f==="export"&&r?.canvasActions?.export&&a?.canvasActions?.export?r.canvasActions.export.saveFileToDisk===a.canvasActions.export.saveFileToDisk:r?.canvasActions?.[f]===a?.canvasActions?.[f]):r[m]===a[m])&&Rt(n,l)},II=ku.default.memo(SI,kI);II.displayName="Excalidraw";export{wr as Button,_u as DEFAULT_LASER_COLOR,Jm as DefaultSidebar,II as Excalidraw,ll as FONT_FAMILY,yI as Footer,TI as LiveCollaborationTrigger,Pt as MIME_TYPES,ao as MainMenu,Eo as ROUNDNESS,Jr as Sidebar,he as THEME,fg as TTDDialog,c6 as TTDDialogTrigger,CI as WelcomeScreen,up as bumpVersion,Is as convertToExcalidrawElements,fr as defaultLang,E6 as elementPartiallyOverlapsWithOrContainsBBox,w6 as elementsOverlappingBBox,cp as exportToBlob,Jn as exportToCanvas,v6 as exportToClipboard,Rl as exportToSvg,Ye as getCommonBounds,C6 as getFreeDrawSvgPath,sm as getLibraryItemsHash,ve as getNonDeletedElements,T6 as getSceneVersion,b6 as getVisibleSceneBounds,xp as hashElementsVersion,vp as hashString,y6 as isElementInsideBBox,Qn as isInvisiblySmallElement,Ne as isLinearElement,ra as languages,Ac as loadFromBlob,op as loadLibraryFromBlob,tp as loadSceneOrLibraryFromBlob,AE as mergeLibraryItems,oe as mutateElement,me as newElementWith,Br as normalizeLink,bh as parseLibraryTokensFromUrl,ep as restore,x6 as restoreAppState,Qu as restoreElements,_l as restoreLibraryItems,Jt as sceneCoordsToViewportCoords,np as serializeAsJSON,ap as serializeLibraryAsJSON,Me as useDevice,pT as useHandleLibrary,xt as useI18n,Ke as viewportCoordsToSceneCoords,Ky as zoomToFitBounds};
|
|
168
|
+
`),c=s.reduce((d,m,p)=>{let f=m.trim(),b=Nr(i.fontFamily);if(f.length){let x=this.getTopLayerFrameAtSceneCoords({x:r,y:l}),y=fn({...i,x:r,y:l,text:f,lineHeight:b,frameId:x?x.id:null});d.push(y),l+=y.height+a}else s[p-1]?.trim()&&(l+=rb(i.fontSize,b)+a);return d},[]);c.length!==0&&(this.scene.insertElements(c),this.setState({selectedElementIds:Be(Object.fromEntries(c.map(d=>[d.id,!0])),this.state)}),!o&&c.length>1&&q5===!1&&!this.device.editor.isMobile&&(this.setToast({message:g("toast.pasteAsSingleElement",{shortcut:N("CtrlOrCmd+Shift+V")}),duration:5e3}),q5=!0),this.history.resumeRecording())}setAppState=(e,o)=>{this.setState(e,o)};removePointer=e=>{Hn&&this.resetContextMenuTimer(),Le.pointers.delete(e.pointerId)};toggleLock=(e="ui")=>{this.state.activeTool.locked||ge("toolbar","toggleLock",`${e} (${this.device.editor.isMobile?"mobile":"desktop"})`),this.setState(o=>({activeTool:{...o.activeTool,...nt(this.state,o.activeTool.locked?{type:"selection"}:o.activeTool),locked:!o.activeTool.locked}}))};updateFrameRendering=e=>{this.setState(o=>{let r=typeof e=="function"?e(o.frameRendering):e;return{frameRendering:{enabled:r?.enabled??o.frameRendering.enabled,clip:r?.clip??o.frameRendering.clip,name:r?.name??o.frameRendering.name,outline:r?.outline??o.frameRendering.outline}}})};togglePenMode=e=>{this.setState(o=>({penMode:e??!o.penMode,penDetected:!0}))};onHandToolToggle=()=>{this.actionManager.executeAction(Yy)};zoomCanvas=e=>{this.setState({...$r({viewportX:this.state.width/2+this.state.offsetLeft,viewportY:this.state.height/2+this.state.offsetTop,nextZoom:Hr(e)},this.state)})};cancelInProgressAnimation=null;scrollToContent=(e=this.scene.getNonDeletedElements(),o)=>{this.cancelInProgressAnimation?.();let r=Array.isArray(e)?e:[e],n=this.state.zoom,i=this.state.scrollX,a=this.state.scrollY;if(o?.fitToContent||o?.fitToViewport){let{appState:l}=ns({targetElements:r,appState:this.state,fitToViewport:!!o?.fitToViewport,viewportZoomFactor:o?.viewportZoomFactor});n=l.zoom,i=l.scrollX,a=l.scrollY}else{let l=ei(r,this.state);i=l.scrollX,a=l.scrollY}if(o?.animate){let l=this.state.scrollX,s=this.state.scrollY,c=this.state.zoom.value,d=A1({fromValues:{scrollX:l,scrollY:s,zoom:c},toValues:{scrollX:i,scrollY:a,zoom:n.value},interpolateValue:(m,p,f,b)=>{if(b==="zoom")return m*Math.pow(p/m,Vn(f))},onStep:({scrollX:m,scrollY:p,zoom:f})=>{this.setState({scrollX:m,scrollY:p,zoom:{value:f}})},onStart:()=>{this.setState({shouldCacheIgnoreZoom:!0})},onEnd:()=>{this.setState({shouldCacheIgnoreZoom:!1})},onCancel:()=>{this.setState({shouldCacheIgnoreZoom:!1})},duration:o?.duration??500});this.cancelInProgressAnimation=()=>{d(),this.cancelInProgressAnimation=null}}else this.setState({scrollX:i,scrollY:a,zoom:n})};maybeUnfollowRemoteUser=()=>{this.state.userToFollow&&this.setState({userToFollow:null})};translateCanvas=e=>{this.cancelInProgressAnimation?.(),this.maybeUnfollowRemoteUser(),this.setState(e)};setToast=e=>{this.setState({toast:e})};restoreFileFromShare=async()=>{try{let e=await caches.open("web-share-target"),o=await e.match("shared-file");if(o){let r=await o.blob(),n=new File([r],r.name||"",{type:r.type});this.loadFileToCanvas(n,null),await e.delete("shared-file"),window.history.replaceState(null,il,window.location.pathname)}}catch(e){this.setState({errorMessage:e.message})}};addFiles=Je(e=>{let o=e.reduce((r,n)=>(r.set(n.id,n),r),new Map);this.files={...this.files,...Object.fromEntries(o)},this.scene.getNonDeletedElements().forEach(r=>{hl(r)&&o.has(r.fileId)&&(this.imageCache.delete(r.fileId),Mo.delete(r))}),this.scene.informMutation(),this.addNewImagesToImageCache()});updateScene=Je(e=>{e.commitToHistory&&this.history.resumeRecording(),e.appState&&this.setState(e.appState),e.elements&&this.scene.replaceAllElements(e.elements),e.collaborators&&this.setState({collaborators:e.collaborators})});onSceneUpdated=()=>{this.setState({})};toggleSidebar=({name:e,tab:o,force:r})=>{let n;r===void 0?n=this.state.openSidebar?.name===e&&this.state.openSidebar?.tab===o?null:e:n=r?e:null;let i=n?{name:n}:null;return i&&o&&(i.tab=o),this.setState({openSidebar:i}),!!n};updateCurrentCursorPosition=Je(e=>{this.lastViewportPosition.x=e.clientX,this.lastViewportPosition.y=e.clientY});onKeyDown=Je(e=>{if("Proxy"in window&&(!e.shiftKey&&/^[A-Z]$/.test(e.key)||e.shiftKey&&/^[a-z]$/.test(e.key))&&(e=new Proxy(e,{get(i,a){let l=i[a];return typeof l=="function"?l.bind(i):a==="key"?e.shiftKey?i.key.toUpperCase():i.key.toLowerCase():l}})),e[T.CTRL_OR_CMD]&&e.key===T.P&&!e.shiftKey&&!e.altKey){this.setToast({message:g("commandPalette.shortcutHint",{shortcut:Et("commandPalette")})}),e.preventDefault();return}if(e[T.CTRL_OR_CMD]&&e.key.toLowerCase()===T.V&&(xu=e.shiftKey,clearTimeout(X5),X5=window.setTimeout(()=>{xu=!1},100)),e[T.CTRL_OR_CMD]&&Co(e.target)&&(e.code===pe.MINUS||e.code===pe.EQUAL)){e.preventDefault();return}if(Co(e.target)&&e.key!==T.ESCAPE||$i(e.key)&&M1(e.target))return;if(e.key===T.QUESTION_MARK){this.setState({openDialog:{name:"help"}});return}else if(e.key.toLowerCase()===T.E&&e.shiftKey&&e[T.CTRL_OR_CMD]){e.preventDefault(),this.setState({openDialog:{name:"imageExport"}});return}if(e.key===T.PAGE_UP||e.key===T.PAGE_DOWN){let i=(e.shiftKey?this.state.width:this.state.height)/this.state.zoom.value;e.key===T.PAGE_DOWN&&(i=-i),e.shiftKey?this.translateCanvas(a=>({scrollX:a.scrollX+i})):this.translateCanvas(a=>({scrollY:a.scrollY+i}))}if(this.actionManager.handleKeyDown(e)||this.state.viewModeEnabled)return;if(e[T.CTRL_OR_CMD]&&this.state.isBindingEnabled&&this.setState({isBindingEnabled:!1}),$i(e.key)){let i=this.state.gridSize&&(e.shiftKey?Mu:this.state.gridSize)||(e.shiftKey?o1:Mu),a=0,l=0;e.key===T.ARROW_LEFT?a=-i:e.key===T.ARROW_RIGHT?a=i:e.key===T.ARROW_UP?l=-i:e.key===T.ARROW_DOWN&&(l=i);let s=this.scene.getSelectedElements({selectedElementIds:this.state.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});s.forEach(c=>{oe(c,{x:c.x+a,y:c.y+l}),Yu(c,this.scene.getNonDeletedElementsMap(),{simultaneouslyUpdated:s})}),this.maybeSuggestBindingForAll(s),e.preventDefault()}else if(e.key===T.ENTER){let i=this.scene.getSelectedElements(this.state);if(i.length===1){let a=i[0];if(e[T.CTRL_OR_CMD])Ne(a)&&(!this.state.editingLinearElement||this.state.editingLinearElement.elementId!==i[0].id)&&(this.history.resumeRecording(),this.setState({editingLinearElement:new ue(a)}));else if(le(a)||ub(a)){let l;le(a)||(l=a);let s=vc(a,this.state,this.scene.getNonDeletedElementsMap()),c=s.x,d=s.y;this.startTextEditing({sceneX:c,sceneY:d,container:l}),e.preventDefault();return}else Ee(a)&&this.setState({editingFrame:a.id})}}else if(!e.ctrlKey&&!e.altKey&&!e.metaKey&&this.state.draggingElement===null){let i=hw(e.key);i?(this.state.activeTool.type!==i&&ge("toolbar",i,`keyboard (${this.device.editor.isMobile?"mobile":"desktop"})`),this.setActiveTool({type:i}),e.stopPropagation()):e.key===T.Q&&(this.toggleLock("keyboard"),e.stopPropagation())}if(e.key===T.SPACE&&Le.pointers.size===0&&(Ai=!0,Oe(this.interactiveCanvas,De.GRAB),e.preventDefault()),(e.key===T.G||e.key===T.S)&&!e.altKey&&!e[T.CTRL_OR_CMD]){let i=this.scene.getSelectedElements(this.state);if(this.state.activeTool.type==="selection"&&!i.length)return;e.key===T.G&&(un(this.state.activeTool.type)||i.some(a=>un(a.type)))&&(this.setState({openPopup:"elementBackground"}),e.stopPropagation()),e.key===T.S&&(this.setState({openPopup:"elementStroke"}),e.stopPropagation())}if(e.key===T.K&&!e.altKey&&!e[T.CTRL_OR_CMD]){this.state.activeTool.type==="laser"?this.setActiveTool({type:"selection"}):this.setActiveTool({type:"laser"});return}e[T.CTRL_OR_CMD]&&(e.key===T.BACKSPACE||e.key===T.DELETE)&&Wt.set(Ci,"clearCanvas");let o=e.key.toLocaleLowerCase(),r=o===T.S&&e.shiftKey,n=e.key===T.I||o===T.G&&e.shiftKey;(r||n)&&this.openEyeDropper({type:r?"stroke":"background"})});onWheel=Je(e=>{!(e.target instanceof HTMLCanvasElement)&&e.ctrlKey&&e.preventDefault()});onKeyUp=Je(e=>{if(e.key===T.SPACE&&(this.state.viewModeEnabled?Oe(this.interactiveCanvas,De.GRAB):this.state.activeTool.type==="selection"?Io(this.interactiveCanvas):(jo(this.interactiveCanvas,this.state),this.setState({selectedElementIds:Be({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})),Ai=!1),!e[T.CTRL_OR_CMD]&&!this.state.isBindingEnabled&&this.setState({isBindingEnabled:!0}),$i(e.key)){let o=this.scene.getSelectedElements(this.state),r=this.scene.getNonDeletedElementsMap();jn(this.state)?El(o,this):Cl(o,r),this.setState({suggestedBindings:[]})}});isToolSupported=e=>this.props.UIOptions.tools?.[e]!==!1;setActiveTool=e=>{if(!this.isToolSupported(e.type)){console.warn(`"${e.type}" tool is disabled via "UIOptions.canvasActions.tools.${e.type}"`);return}let o=nt(this.state,e);o.type==="hand"?Oe(this.interactiveCanvas,De.GRAB):Ai||jo(this.interactiveCanvas,this.state),I1(document.activeElement)&&this.focusContainer(),$1(o.type)||this.setState({suggestedBindings:[]}),o.type==="image"&&this.onImageAction({insertOnCanvasDirectly:(e.type==="image"&&e.insertOnCanvasDirectly)??!1}),this.setState(r=>{let n={snapLines:r.snapLines.length?[]:r.snapLines,originSnapOffset:null,activeEmbeddable:null};return o.type!=="selection"?{...r,activeTool:o,selectedElementIds:Be({},r),selectedGroupIds:Be({},r),editingGroupId:null,multiElement:null,...n}:{...r,activeTool:o,...n}})};setOpenDialog=e=>{this.setState({openDialog:e})};setCursor=e=>{Oe(this.interactiveCanvas,e)};resetCursor=()=>{Io(this.interactiveCanvas)};isTouchScreenMultiTouchGesture=()=>Le.pointers.size>=2;getName=()=>this.state.name||this.props.name||`${g("labels.untitled")}-${Ou()}`;onGestureStart=Je(e=>{e.preventDefault(),this.isTouchScreenMultiTouchGesture()&&this.setState({selectedElementIds:Be({},this.state),activeEmbeddable:null}),Le.initialScale=this.state.zoom.value});onGestureChange=Je(e=>{if(e.preventDefault(),this.isTouchScreenMultiTouchGesture())return;let o=Le.initialScale;o&&this.setState(r=>({...$r({viewportX:this.lastViewportPosition.x,viewportY:this.lastViewportPosition.y,nextZoom:Hr(o*e.scale)},r)}))});onGestureEnd=Je(e=>{e.preventDefault(),this.isTouchScreenMultiTouchGesture()&&this.setState({previousSelectedElementIds:{},selectedElementIds:Be(this.state.previousSelectedElementIds,this.state)}),Le.initialScale=null});handleTextWysiwyg(e,{isExistingElement:o=!1}){let r=this.scene.getElementsMapIncludingDeleted(),n=(i,a,l)=>{this.scene.replaceAllElements([...this.scene.getElementsIncludingDeleted().map(s=>s.id===e.id&&le(s)?Ib(s,Dr(s,r),r,{text:i,isDeleted:l,originalText:a}):s)])};j5({id:e.id,canvas:this.canvas,getViewportCoords:(i,a)=>{let{x:l,y:s}=Jt({sceneX:i,sceneY:a},this.state);return[l-this.state.offsetLeft,s-this.state.offsetTop]},onChange:Je(i=>{n(i,i,!1),yp(e)&&Yu(e,r)}),onSubmit:Je(({text:i,viaKeyboard:a,originalText:l})=>{let s=!i.trim();if(n(i,l,s),!s&&a){let c=e.containerId?e.containerId:e.id;this.setState(d=>({selectedElementIds:Be({...d.selectedElementIds,[c]:!0},d)}))}s&&Wi(this.scene.getNonDeletedElements(),[e]),(!s||o)&&this.history.resumeRecording(),this.setState({draggingElement:null,editingElement:null}),this.state.activeTool.locked&&jo(this.interactiveCanvas,this.state),this.focusContainer()}),element:e,excalidrawContainer:this.excalidrawContainerRef.current,app:this}),this.deselectElements(),n(e.text,e.originalText,!1)}deselectElements(){this.setState({selectedElementIds:Be({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})}getTextElementAtPosition(e,o){let r=this.getElementAtPosition(e,o,{includeBoundTextElement:!0});return r&&le(r)&&!r.isDeleted?r:null}getElementShape(e){switch(e.type){case"rectangle":case"diamond":case"frame":case"magicframe":case"embeddable":case"image":case"iframe":case"text":case"selection":return Wb(e);case"arrow":case"line":{let o=Mo.get(e)?.[0]??Mo.generateElementShape(e,null)[0],[,,,,r,n]=Ut(e,this.scene.getNonDeletedElementsMap());return lp(e)?Yb(e,o,[e.x,e.y],e.angle,[r,n]):Vb(o,[e.x,e.y],e.angle,[r,n])}case"ellipse":return Gb(e);case"freedraw":{let[,,,,o,r]=Ut(e,this.scene.getNonDeletedElementsMap());return Kb(e,[o,r],lp(e))}}}getBoundTextShape(e){let o=st(e,this.scene.getNonDeletedElementsMap());return o?e.type==="arrow"?this.getElementShape({...o,...ue.getBoundTextElementPosition(e,o,this.scene.getNonDeletedElementsMap())}):this.getElementShape(o):null}getElementAtPosition(e,o,r){let n=this.getElementsAtPosition(e,o,r?.includeBoundTextElement,r?.includeLockedElements);if(n.length>1){if(r?.preferSelected){for(let a=n.length-1;a>-1;a--)if(this.state.selectedElementIds[n[a].id])return n[a]}let i=n[n.length-1];return X1([e,o],this.getElementShape(i))?i:n[n.length-2]}return n.length===1?n[0]:null}getElementsAtPosition(e,o,r=!1,n=!1){let i=[],a=this.scene.getNonDeletedElementsMap();return(r&&n?this.scene.getNonDeletedElements():this.scene.getNonDeletedElements().filter(s=>(n||!s.locked)&&(r||!(le(s)&&s.containerId)))).filter(s=>this.hitElement(e,o,s)).filter(s=>{let c=Bc(s,a);return c&&this.state.frameRendering.enabled&&this.state.frameRendering.clip?dp({x:e,y:o},c,a):!0}).filter(s=>Zn(s)?(i.push(s),!1):!0).concat(i)}getHitThreshold(){return 10/this.state.zoom.value}hitElement(e,o,r,n=!0){return n&&this.state.selectedElementIds[r.id]&&Wc([r],this.state)?Rc(e,o,r,this.scene.getNonDeletedElementsMap(),this.getHitThreshold()):jb(e,o,this.getBoundTextShape(r))?!0:Ll({x:e,y:o,element:r,shape:this.getElementShape(r),threshold:this.getHitThreshold(),frameNameBound:Ee(r)?this.frameNameBoundsCache.get(r):null})}getTextBindableContainerAtPosition(e,o){let r=this.scene.getNonDeletedElements(),n=this.scene.getSelectedElements(this.state);if(n.length===1)return Pr(n[0],!1)?n[0]:null;let i=null;for(let a=r.length-1;a>=0;--a){if(r[a].isDeleted)continue;let[l,s,c,d]=Ut(r[a],this.scene.getNonDeletedElementsMap());if(mr(r[a])&&Ll({x:e,y:o,element:r[a],shape:this.getElementShape(r[a]),threshold:this.getHitThreshold()})){i=r[a];break}else if(l<e&&e<c&&s<o&&o<d){i=r[a];break}}return Pr(i,!1)?i:null}startTextEditing=({sceneX:e,sceneY:o,insertAtParentCenter:r=!0,container:n})=>{let i=!1,a=r&&this.getTextWysiwygSnappedToCenterPosition(e,o,this.state,n);n&&a&&(st(n,this.scene.getNonDeletedElementsMap())||(i=!0));let l=null,s=this.scene.getSelectedElements(this.state);s.length===1?le(s[0])?l=s[0]:n?l=st(s[0],this.scene.getNonDeletedElementsMap()):l=this.getTextElementAtPosition(e,o):l=this.getTextElementAtPosition(e,o);let c=l?.fontFamily||this.state.currentItemFontFamily,d=l?.lineHeight||Nr(c),m=this.state.currentItemFontSize;if(!l&&i&&n&&!mr(n)){let x=lb(Zo({fontSize:m,fontFamily:c}),d),y=nb(m,d),S=Math.max(n.height,y),C=Math.max(n.width,x);oe(n,{height:S,width:C}),e=n.x+C/2,o=n.y+S/2,a&&(a=this.getTextWysiwygSnappedToCenterPosition(e,o,this.state,n))}let p=this.getTopLayerFrameAtSceneCoords({x:e,y:o}),f=l||fn({x:a?a.elementCenterX:e,y:a?a.elementCenterY:o,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,text:"",fontSize:m,fontFamily:c,textAlign:a?"center":this.state.currentItemTextAlign,verticalAlign:a?yo.MIDDLE:Lu,containerId:i?n?.id:void 0,groupIds:n?.groupIds??[],lineHeight:d,angle:n?.angle??0,frameId:p?p.id:null});if(!l&&i&&n&&oe(n,{boundElements:(n.boundElements||[]).concat({type:"text",id:f.id})}),this.setState({editingElement:f}),!l)if(n&&i){let b=this.scene.getElementIndex(n.id);this.scene.insertElementAtIndex(f,b+1)}else this.scene.insertElement(f);this.setState({editingElement:f}),this.handleTextWysiwyg(f,{isExistingElement:!!l})};handleCanvasDoubleClick=e=>{if(this.state.multiElement||this.state.activeTool.type!=="selection")return;let o=this.scene.getSelectedElements(this.state);if(o.length===1&&Ne(o[0])&&e[T.CTRL_OR_CMD]&&(!this.state.editingLinearElement||this.state.editingLinearElement.elementId!==o[0].id)){this.history.resumeRecording(),this.setState({editingLinearElement:new ue(o[0])});return}Io(this.interactiveCanvas);let{x:r,y:n}=Ke(e,this.state);if(Fr(this.state).length>0){let a=this.getElementAtPosition(r,n),l=a&&vb(a,this.state.selectedGroupIds);if(l){this.setState(s=>({...s,...Dt({editingGroupId:l,selectedElementIds:{[a.id]:!0}},this.scene.getNonDeletedElements(),s,this)}));return}}if(Io(this.interactiveCanvas),!e[T.CTRL_OR_CMD]&&!this.state.viewModeEnabled){let a=this.getElementAtPosition(r,n);if(Oi(a)){this.setState({activeEmbeddable:{element:a,state:"active"}});return}let l=this.getTextBindableContainerAtPosition(r,n);if(l&&(ur(l)||!Yn(l.backgroundColor)||Ll({x:r,y:n,element:l,shape:this.getElementShape(l),threshold:this.getHitThreshold()}))){let s=vc(l,this.state,this.scene.getNonDeletedElementsMap());r=s.x,n=s.y}this.startTextEditing({sceneX:r,sceneY:n,insertAtParentCenter:!e.altKey,container:l})}};getElementLinkAtPosition=(e,o)=>{let r=this.scene.getNonDeletedElements().slice().reverse(),n=1/0;return r.find((i,a)=>(o&&i.id===o.id&&(n=a),i.link&&a<=n&&Dc(i,this.scene.getNonDeletedElementsMap(),this.state,[e.x,e.y],this.device.editor.isMobile)))};redirectToLink=(e,o)=>{let r=mn(this.lastPointerDownEvent.clientX,this.lastPointerDownEvent.clientY,this.lastPointerUpEvent.clientX,this.lastPointerUpEvent.clientY);if(!this.hitLinkElement||o&&r>Un||!o&&r!==0)return;let n=Ke(this.lastPointerDownEvent,this.state),i=this.scene.getNonDeletedElementsMap(),a=Dc(this.hitLinkElement,i,this.state,[n.x,n.y],this.device.editor.isMobile),l=Ke(this.lastPointerUpEvent,this.state),s=Dc(this.hitLinkElement,i,this.state,[l.x,l.y],this.device.editor.isMobile);if(a&&s){let c=this.hitLinkElement.link;if(c){c=Br(c);let d;if(this.props.onLinkOpen&&(d=sc("excalidraw-link",e.nativeEvent),this.props.onLinkOpen({...this.hitLinkElement,link:c},d)),!d?.defaultPrevented){let m=wc(c)?"_self":"_blank",p=window.open(void 0,m);p&&(p.opener=null,p.location=c)}}}};getTopLayerFrameAtSceneCoords=e=>{let o=this.scene.getNonDeletedElementsMap(),r=this.scene.getNonDeletedFramesLikes().filter(n=>dp(e,n,o));return r.length?r[r.length-1]:null};handleCanvasPointerMove=e=>{this.savePointer(e.clientX,e.clientY,this.state.cursorButton),this.lastPointerMoveEvent=e.nativeEvent,Le.pointers.has(e.pointerId)&&Le.pointers.set(e.pointerId,{x:e.clientX,y:e.clientY});let o=Le.initialScale;if(Le.pointers.size===2&&Le.lastCenter&&o&&Le.initialDistance){let p=Bh(Le.pointers),f=p.x-Le.lastCenter.x,b=p.y-Le.lastCenter.y;Le.lastCenter=p;let x=zh(Array.from(Le.pointers.values())),y=this.state.activeTool.type==="freedraw"&&this.state.penMode?1:x/Le.initialDistance,S=y?Hr(o*y):this.state.zoom.value;this.setState(C=>{let w=$r({viewportX:p.x,viewportY:p.y,nextZoom:S},C);this.translateCanvas({zoom:w.zoom,scrollX:w.scrollX+f/S,scrollY:w.scrollY+b/S,shouldCacheIgnoreZoom:!0})}),this.resetShouldCacheIgnoreZoomDebounced()}else Le.lastCenter=Le.initialDistance=Le.initialScale=null;if(Ai||Bs||Ig||Or(this.state))return;let n=Wh(Mg,e.clientX-this.state.offsetLeft,e.clientY-this.state.offsetTop).isOverEither;!this.state.draggingElement&&!this.state.multiElement&&(n?Io(this.interactiveCanvas):jo(this.interactiveCanvas,this.state));let i=Ke(e,this.state),{x:a,y:l}=i;if(!this.state.draggingElement&&k5(this.state.activeTool.type)){let{originOffset:p,snapLines:f}=S5(this.scene.getNonDeletedElements(),this.state,{x:a,y:l},e,this.scene.getNonDeletedElementsMap());this.setState(b=>{let x=dc(b.snapLines,f),y=b.originSnapOffset?dc(b.originSnapOffset,p):p;return b.snapLines===x&&b.originSnapOffset===y?null:{snapLines:x,originSnapOffset:y}})}else this.state.draggingElement||this.setState(p=>p.snapLines.length?{snapLines:[]}:null);if(this.state.editingLinearElement&&!this.state.editingLinearElement.isDragging){let p=ue.handlePointerMove(e,a,l,this.state,this.scene.getNonDeletedElementsMap());p&&p!==this.state.editingLinearElement&&(0,vu.flushSync)(()=>{this.setState({editingLinearElement:p})}),p?.lastUncommittedPoint!=null?this.maybeSuggestBindingAtCursor(i):(0,vu.flushSync)(()=>{this.setState({suggestedBindings:[]})})}if(U1(this.state.activeTool.type)){let{draggingElement:p}=this.state;Lr(p,!1)?this.maybeSuggestBindingsForLinearElementAtCoords(p,[i],this.state.startBoundElement):this.maybeSuggestBindingAtCursor(i)}if(this.state.multiElement){let{multiElement:p}=this.state,{x:f,y:b}=p,{points:x,lastCommittedPoint:y}=p,S=x[x.length-1];if(jo(this.interactiveCanvas,this.state),S===y)mn(a-f,l-b,S[0],S[1])>=Zs?oe(p,{points:[...x,[a-f,l-b]]}):Oe(this.interactiveCanvas,De.POINTER);else if(x.length>2&&y&&mn(a-f,l-b,y[0],y[1])<Zs)Oe(this.interactiveCanvas,De.POINTER),oe(p,{points:x.slice(0,-1)});else{let[C,w]=Qt(a,l,e[T.CTRL_OR_CMD]?null:this.state.gridSize),[M,B]=p?.lastCommittedPoint??[0,0],I=C-f-M,_=w-b-B;pc(e)&&({width:I,height:_}=pp(M+f,B+b,C,w)),bl(x,this.state.zoom.value)&&Oe(this.interactiveCanvas,De.POINTER),oe(p,{points:[...x.slice(0,-1),[M+I,B+_]]})}return}if(!!e.buttons||this.state.activeTool.type!=="selection"&&this.state.activeTool.type!=="text"&&this.state.activeTool.type!=="eraser")return;let c=this.scene.getNonDeletedElements(),d=this.scene.getSelectedElements(this.state);if(d.length===1&&!n&&!this.state.editingLinearElement){let p=fp(c,this.state,a,l,this.state.zoom,e.pointerType,this.scene.getNonDeletedElementsMap());if(p&&p.transformHandleType){Oe(this.interactiveCanvas,gp(p));return}}else if(d.length>1&&!n){let p=hp(Ye(d),a,l,this.state.zoom,e.pointerType);if(p){Oe(this.interactiveCanvas,gp({transformHandleType:p}));return}}let m=this.getElementAtPosition(i.x,i.y);this.hitLinkElement=this.getElementLinkAtPosition(i,m),!ko(this.state)&&(this.hitLinkElement&&!this.state.selectedElementIds[this.hitLinkElement.id]?(Oe(this.interactiveCanvas,De.POINTER),gE(this.hitLinkElement,this.state,this.scene.getNonDeletedElementsMap())):(bE(),m&&(m.link||Ht(m))&&this.state.selectedElementIds[m.id]&&!this.state.contextMenu&&!this.state.showHyperlinkPopup?this.setState({showHyperlinkPopup:"info"}):this.state.activeTool.type==="text"?Oe(this.interactiveCanvas,le(m)?De.TEXT:De.CROSSHAIR):this.state.viewModeEnabled?Oe(this.interactiveCanvas,De.GRAB):n?Oe(this.interactiveCanvas,De.AUTO):this.state.selectedLinearElement?this.handleHoverSelectedLinearElement(this.state.selectedLinearElement,a,l):e[T.CTRL_OR_CMD]?Oe(this.interactiveCanvas,De.AUTO):(m||this.isHittingCommonBoundingBoxOfSelectedElements(i,d))&&!m?.locked&&(m&&Oi(m)&&this.isIframeLikeElementCenter(m,e,a,l)?(Oe(this.interactiveCanvas,De.POINTER),this.setState({activeEmbeddable:{element:m,state:"hover"}})):(Oe(this.interactiveCanvas,De.MOVE),this.state.activeEmbeddable?.state==="hover"&&this.setState({activeEmbeddable:null})))))};handleEraser=(e,o,r)=>{this.eraserTrail.addPointToPath(r.x,r.y);let n=!1,i=new Set,a=this.scene.getNonDeletedElements(),l=p=>{for(let f of p){if(f.locked)return;if(e.altKey?this.elementsPendingErasure.delete(f.id)&&(n=!0):this.elementsPendingErasure.has(f.id)||(n=!0,this.elementsPendingErasure.add(f.id)),n&&f.groupIds?.length){let b=f.groupIds.at(-1);if(!i.has(b)){i.add(b);let x=pt(a,b);for(let y of x)e.altKey?this.elementsPendingErasure.delete(y.id):this.elementsPendingErasure.add(y.id)}}}},s=mn(o.lastCoords.x,o.lastCoords.y,r.x,r.y),c=this.getHitThreshold(),d={...o.lastCoords},m=0;for(;m<=s;){let p=this.getElementsAtPosition(d.x,d.y);if(l(p),m===s)break;m=Math.min(m+c,s);let f=m/s,b=(1-f)*d.x+f*r.x,x=(1-f)*d.y+f*r.y;d.x=b,d.y=x}if(o.lastCoords.x=r.x,o.lastCoords.y=r.y,n){for(let p of this.scene.getNonDeletedElements())bt(p)&&(this.elementsPendingErasure.has(p.id)||this.elementsPendingErasure.has(p.containerId))&&(e.altKey?(this.elementsPendingErasure.delete(p.id),this.elementsPendingErasure.delete(p.containerId)):(this.elementsPendingErasure.add(p.id),this.elementsPendingErasure.add(p.containerId)));this.elementsPendingErasure=new Set(this.elementsPendingErasure),this.onSceneUpdated()}};handleTouchMove=e=>{zs=!0};handleHoverSelectedLinearElement(e,o,r){let n=this.scene.getNonDeletedElementsMap(),i=ue.getElement(e.elementId,n);if(i)if(this.state.selectedLinearElement){let a=-1,l=null;Ll({x:o,y:r,element:i,shape:this.getElementShape(i)})?(a=ue.getPointIndexUnderCursor(i,n,this.state.zoom,o,r),l=ue.getSegmentMidpointHitCoords(e,{x:o,y:r},this.state,this.scene.getNonDeletedElementsMap()),a>=0||l?Oe(this.interactiveCanvas,De.POINTER):Oe(this.interactiveCanvas,De.MOVE)):this.hitElement(o,r,i)&&Oe(this.interactiveCanvas,De.MOVE),this.state.selectedLinearElement.hoverPointIndex!==a&&this.setState({selectedLinearElement:{...this.state.selectedLinearElement,hoverPointIndex:a}}),ue.arePointsEqual(this.state.selectedLinearElement.segmentMidPointHoveredCoords,l)||this.setState({selectedLinearElement:{...this.state.selectedLinearElement,segmentMidPointHoveredCoords:l}})}else Oe(this.interactiveCanvas,De.AUTO)}handleCanvasPointerDown=e=>{if(this.maybeCleanupAfterMissingPointerUp(e.nativeEvent),this.maybeUnfollowRemoteUser(),this.state.contextMenu&&this.setState({contextMenu:null}),this.state.snapLines&&this.setAppState({snapLines:[]}),this.updateGestureOnPointerDown(e),e.pointerType==="touch"&&this.state.draggingElement&&this.state.draggingElement.type==="freedraw"){let c=this.state.draggingElement;this.updateScene({...c.points.length<10?{elements:this.scene.getElementsIncludingDeleted().filter(d=>d.id!==c.id)}:{},appState:{draggingElement:null,editingElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:Be(Object.keys(this.state.selectedElementIds).filter(d=>d!==c.id).reduce((d,m)=>(d[m]=this.state.selectedElementIds[m],d),{}),this.state)}});return}let o=document.getSelection();if(o?.anchorNode&&o.removeAllRanges(),this.maybeOpenContextMenuAfterPointerDownOnTouchDevices(e),!this.state.penDetected&&e.pointerType==="pen"&&this.setState(c=>({penMode:!0,penDetected:!0})),!this.device.isTouchScreen&&["pen","touch"].includes(e.pointerType)&&(this.device=Di(this.device,{isTouchScreen:!0})),Bs||(this.lastPointerDownEvent=e,this.handleCanvasPanUsingWheelOrSpaceDrag(e)))return;if(this.setState({lastPointerDownWith:e.pointerType,cursorButton:"down"}),this.savePointer(e.clientX,e.clientY,"down"),e.button===nn.ERASER&&this.state.activeTool.type!==ut.eraser){this.setState({activeTool:nt(this.state,{type:ut.eraser,lastActiveToolBeforeEraser:this.state.activeTool})},()=>{this.handleCanvasPointerDown(e);let c=()=>{d(),m?.(),ko(this.state)&&this.setState({activeTool:nt(this.state,{...this.state.activeTool.lastActiveTool||{type:ut.selection},lastActiveToolBeforeEraser:null})})},d=it(window,"pointerup",c,{once:!0}),m;requestAnimationFrame(()=>{m=this.missingPointerEventCleanupEmitter.once(c)})});return}if(e.button!==nn.MAIN&&e.button!==nn.TOUCH&&e.button!==nn.ERASER||Le.pointers.size>1)return;let r=this.initialPointerDownState(e);if(this.setState({selectedElementsAreBeingDragged:!1}),this.handleDraggingScrollBar(e,r)||(this.clearSelectionIfNotUsingSelection(),this.updateBindingEnabledOnPointerMove(e),this.handleSelectionOnPointerDown(e,r))||!(!this.state.penMode||e.pointerType!=="touch"||this.state.activeTool.type==="selection"||this.state.activeTool.type==="text"||this.state.activeTool.type==="image"))return;if(this.state.activeTool.type==="text"){this.handleTextOnPointerDown(e,r);return}else if(this.state.activeTool.type==="arrow"||this.state.activeTool.type==="line")this.handleLinearElementOnPointerDown(e,this.state.activeTool.type,r);else if(this.state.activeTool.type==="image"){Oe(this.interactiveCanvas,De.CROSSHAIR);let c=this.state.pendingImageElementId&&this.scene.getElement(this.state.pendingImageElementId);if(!c)return;this.setState({draggingElement:c,editingElement:c,pendingImageElementId:null,multiElement:null});let{x:d,y:m}=Ke(e,this.state),p=this.getTopLayerFrameAtSceneCoords({x:d,y:m});oe(c,{x:d,y:m,frameId:p?p.id:null})}else this.state.activeTool.type==="freedraw"?this.handleFreeDrawElementOnPointerDown(e,this.state.activeTool.type,r):this.state.activeTool.type==="custom"?jo(this.interactiveCanvas,this.state):this.state.activeTool.type===ut.frame||this.state.activeTool.type===ut.magicframe?this.createFrameElementOnPointerDown(r,this.state.activeTool.type):this.state.activeTool.type==="laser"?this.laserTrails.startPath(r.lastCoords.x,r.lastCoords.y):this.state.activeTool.type!=="eraser"&&this.state.activeTool.type!=="hand"&&this.createGenericElementOnPointerDown(this.state.activeTool.type,r);this.props?.onPointerDown?.(this.state.activeTool,r),this.onPointerDownEmitter.trigger(this.state.activeTool,r,e),this.state.activeTool.type==="eraser"&&this.eraserTrail.startPath(r.lastCoords.x,r.lastCoords.y);let i=this.onPointerMoveFromPointerDownHandler(r),a=this.onPointerUpFromPointerDownHandler(r),l=this.onKeyDownFromPointerDownHandler(r),s=this.onKeyUpFromPointerDownHandler(r);this.missingPointerEventCleanupEmitter.once(c=>a(c||e.nativeEvent)),(!this.state.viewModeEnabled||this.state.activeTool.type==="laser")&&(window.addEventListener("pointermove",i),window.addEventListener("pointerup",a),window.addEventListener("keydown",l),window.addEventListener("keyup",s),r.eventListeners.onMove=i,r.eventListeners.onUp=a,r.eventListeners.onKeyUp=s,r.eventListeners.onKeyDown=l)};handleCanvasPointerUp=e=>{this.removePointer(e),this.lastPointerUpEvent=e;let o=Ke({clientX:e.clientX,clientY:e.clientY},this.state),r=e.timeStamp-(this.lastPointerDownEvent?.timeStamp??0);if(this.device.editor.isMobile&&r<300){let n=this.getElementAtPosition(o.x,o.y);if(Oi(n)&&this.isIframeLikeElementCenter(n,e,o.x,o.y)){this.handleEmbeddableCenterClick(n);return}}if(this.device.isTouchScreen){let n=this.getElementAtPosition(o.x,o.y);this.hitLinkElement=this.getElementLinkAtPosition(o,n)}this.hitLinkElement&&!this.state.selectedElementIds[this.hitLinkElement.id]?r<300&&Oi(this.hitLinkElement)&&!qb(this.hitLinkElement,this.scene.getNonDeletedElementsMap(),this.state,[o.x,o.y])?this.handleEmbeddableCenterClick(this.hitLinkElement):this.redirectToLink(e,this.device.isTouchScreen):this.state.viewModeEnabled&&this.setState({activeEmbeddable:null,selectedElementIds:{}})};maybeOpenContextMenuAfterPointerDownOnTouchDevices=e=>{e.pointerType==="touch"&&(zs=!1,Hn?zs=!0:Hn=window.setTimeout(()=>{Hn=0,zs||this.handleCanvasContextMenu(e)},u1))};resetContextMenuTimer=()=>{clearTimeout(Hn),Hn=0,zs=!1};maybeCleanupAfterMissingPointerUp=e=>{Hs?.(),this.missingPointerEventCleanupEmitter.trigger(e).clear()};handleCanvasPanUsingWheelOrSpaceDrag=e=>{if(!(Le.pointers.size<=1&&(e.button===nn.WHEEL||e.button===nn.MAIN&&Ai||Or(this.state)||this.state.viewModeEnabled))||le(this.state.editingElement))return!1;Bs=!0,e.preventDefault();let o=!1,r=typeof window===void 0?!1:/Linux/.test(window.navigator.platform);Oe(this.interactiveCanvas,De.GRABBING);let{clientX:n,clientY:i}=e,a=du(s=>{let c=n-s.clientX,d=i-s.clientY;if(n=s.clientX,i=s.clientY,r&&!o&&(Math.abs(c)>1||Math.abs(d)>1)){o=!0;let m=f=>{document.body.removeEventListener("paste",m),f.stopPropagation()},p=()=>{setTimeout(()=>{document.body.removeEventListener("paste",m),window.removeEventListener("pointerup",p)},100)};document.body.addEventListener("paste",m),window.addEventListener("pointerup",p)}this.translateCanvas({scrollX:this.state.scrollX-c/this.state.zoom.value,scrollY:this.state.scrollY-d/this.state.zoom.value})}),l=Je(Hs=()=>{Hs=null,Bs=!1,Ai||(this.state.viewModeEnabled?Oe(this.interactiveCanvas,De.GRAB):jo(this.interactiveCanvas,this.state)),this.setState({cursorButton:"up"}),this.savePointer(e.clientX,e.clientY,"up"),window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",l),window.removeEventListener("blur",l),a.flush()});return window.addEventListener("blur",l),window.addEventListener("pointermove",a,{passive:!0}),window.addEventListener("pointerup",l),!0};updateGestureOnPointerDown(e){Le.pointers.set(e.pointerId,{x:e.clientX,y:e.clientY}),Le.pointers.size===2&&(Le.lastCenter=Bh(Le.pointers),Le.initialScale=this.state.zoom.value,Le.initialDistance=zh(Array.from(Le.pointers.values())))}initialPointerDownState(e){let o=Ke(e,this.state),r=this.scene.getSelectedElements(this.state),[n,i,a,l]=Ye(r);return{origin:o,withCmdOrCtrl:e[T.CTRL_OR_CMD],originInGrid:ul(Qt(o.x,o.y,e[T.CTRL_OR_CMD]?null:this.state.gridSize)),scrollbars:Wh(Mg,e.clientX-this.state.offsetLeft,e.clientY-this.state.offsetTop),lastCoords:{...o},originalElements:this.scene.getNonDeletedElements().reduce((s,c)=>(s.set(c.id,Yi(c)),s),new Map),resize:{handleType:!1,isResizing:!1,offset:{x:0,y:0},arrowDirection:"origin",center:{x:(a+n)/2,y:(l+i)/2}},hit:{element:null,allHitElements:[],wasAddedToSelection:!1,hasBeenDuplicated:!1,hasHitCommonBoundingBoxOfSelectedElements:this.isHittingCommonBoundingBoxOfSelectedElements(o,r)},drag:{hasOccurred:!1,offset:null},eventListeners:{onMove:null,onUp:null,onKeyUp:null,onKeyDown:null},boxSelection:{hasOccurred:!1}}}handleDraggingScrollBar(e,o){if(!(o.scrollbars.isOverEither&&!this.state.multiElement))return!1;Ig=!0,o.lastCoords.x=e.clientX,o.lastCoords.y=e.clientY;let r=du(i=>{i.target instanceof HTMLElement&&this.handlePointerMoveOverScrollbars(i,o)}),n=Je(()=>{Hs=null,Ig=!1,jo(this.interactiveCanvas,this.state),this.setState({cursorButton:"up"}),this.savePointer(e.clientX,e.clientY,"up"),window.removeEventListener("pointermove",r),window.removeEventListener("pointerup",n),r.flush()});return Hs=n,window.addEventListener("pointermove",r),window.addEventListener("pointerup",n),!0}clearSelectionIfNotUsingSelection=()=>{this.state.activeTool.type!=="selection"&&this.setState({selectedElementIds:Be({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})};handleSelectionOnPointerDown=(e,o)=>{if(this.state.activeTool.type==="selection"){let r=this.scene.getNonDeletedElements(),n=this.scene.getNonDeletedElementsMap(),i=this.scene.getSelectedElements(this.state);if(i.length===1&&!this.state.editingLinearElement){let a=fp(r,this.state,o.origin.x,o.origin.y,this.state.zoom,e.pointerType,this.scene.getNonDeletedElementsMap());a!=null&&(this.setState({resizingElement:a.element}),o.resize.handleType=a.transformHandleType)}else i.length>1&&(o.resize.handleType=hp(Ye(i),o.origin.x,o.origin.y,this.state.zoom,e.pointerType));if(o.resize.handleType)o.resize.isResizing=!0,o.resize.offset=ul(S0(o.resize.handleType,i,n,o.origin.x,o.origin.y)),i.length===1&&Ne(i[0])&&i[0].points.length===2&&(o.resize.arrowDirection=k0(o.resize.handleType,i[0]));else{if(this.state.selectedLinearElement){let s=this.state.editingLinearElement||this.state.selectedLinearElement,c=ue.handlePointerDown(e,this.state,this.history,o.origin,s,this);if(c.hitElement&&(o.hit.element=c.hitElement),c.linearElementEditor&&(this.setState({selectedLinearElement:c.linearElementEditor}),this.state.editingLinearElement&&this.setState({editingLinearElement:c.linearElementEditor})),c.didAddPoint)return!0}if(o.hit.element=o.hit.element??this.getElementAtPosition(o.origin.x,o.origin.y),o.hit.element&&this.getElementLinkAtPosition({x:o.origin.x,y:o.origin.y},o.hit.element))return!1;o.hit.allHitElements=this.getElementsAtPosition(o.origin.x,o.origin.y);let a=o.hit.element,l=o.hit.allHitElements.some(s=>this.isASelectedElement(s));if((a===null||!l)&&!e.shiftKey&&!o.hit.hasHitCommonBoundingBoxOfSelectedElements&&this.clearSelection(a),this.state.editingLinearElement)this.setState({selectedElementIds:Be({[this.state.editingLinearElement.elementId]:!0},this.state)});else if(a!=null){if(e[T.CTRL_OR_CMD])return this.state.selectedElementIds[a.id]||(o.hit.wasAddedToSelection=!0),this.setState(s=>({...xb(s,a),previousSelectedElementIds:this.state.selectedElementIds})),!1;this.state.selectedElementIds[a.id]||(this.state.editingGroupId&&!Ki(a,this.state.editingGroupId)&&this.setState({selectedElementIds:Be({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null}),!l&&!o.hit.hasHitCommonBoundingBoxOfSelectedElements&&(this.setState(s=>{let c={...s.selectedElementIds,[a.id]:!0},d=[];if(Object.keys(s.selectedElementIds).forEach(m=>{let p=this.scene.getElement(m);p&&d.push(p)}),Ee(a))hn(d,a.id).forEach(m=>{delete c[m.id]});else if(a.frameId)c[a.frameId]&&delete c[a.id];else{let m=a.groupIds,p=new Set(m.flatMap(f=>pt(this.scene.getNonDeletedElements(),f)).filter(f=>Ee(f)).map(f=>f.id));p.size>0&&d.forEach(f=>{f.frameId&&p.has(f.frameId)&&(delete c[f.id],f.groupIds.flatMap(b=>pt(this.scene.getNonDeletedElements(),b)).forEach(b=>{delete c[b.id]}))})}return{...Dt({editingGroupId:s.editingGroupId,selectedElementIds:c},this.scene.getNonDeletedElements(),s,this),showHyperlinkPopup:a.link||Ht(a)?"info":!1}}),o.hit.wasAddedToSelection=!0))}this.setState({previousSelectedElementIds:this.state.selectedElementIds})}}return!1};isASelectedElement(e){return e!=null&&this.state.selectedElementIds[e.id]}isHittingCommonBoundingBoxOfSelectedElements(e,o){if(o.length<2)return!1;let r=this.getHitThreshold(),[n,i,a,l]=Ye(o);return e.x>n-r&&e.x<a+r&&e.y>i-r&&e.y<l+r}handleTextOnPointerDown=(e,o)=>{if(le(this.state.editingElement))return;let r=o.origin.x,n=o.origin.y,i=this.getElementAtPosition(r,n,{includeBoundTextElement:!0}),a=this.getTextBindableContainerAtPosition(r,n);ur(i)&&(a=i,r=i.x+i.width/2,n=i.y+i.height/2),this.startTextEditing({sceneX:r,sceneY:n,insertAtParentCenter:!e.altKey,container:a}),Io(this.interactiveCanvas),this.state.activeTool.locked||this.setState({activeTool:nt(this.state,{type:"selection"})})};handleFreeDrawElementOnPointerDown=(e,o,r)=>{let[n,i]=Qt(r.origin.x,r.origin.y,null),a=this.getTopLayerFrameAtSceneCoords({x:n,y:i}),l=Mb({type:o,x:n,y:i,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,roundness:null,simulatePressure:e.pressure===.5,locked:!1,frameId:a?a.id:null});this.setState(d=>{let m={...d.selectedElementIds};return delete m[l.id],{selectedElementIds:Be(m,d)}});let s=l.simulatePressure?l.pressures:[...l.pressures,e.pressure];oe(l,{points:[[0,0]],pressures:s});let c=Tl(r.origin,this);this.scene.insertElement(l),this.setState({draggingElement:l,editingElement:l,startBoundElement:c,suggestedBindings:[]})};insertIframeElement=({sceneX:e,sceneY:o,width:r,height:n})=>{let[i,a]=Qt(e,o,this.lastPointerDownEvent?.[T.CTRL_OR_CMD]?null:this.state.gridSize),l=Sb({type:"iframe",x:i,y:a,strokeColor:"transparent",backgroundColor:"transparent",fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,roundness:this.getCurrentItemRoundness("iframe"),opacity:this.state.currentItemOpacity,locked:!1,width:r,height:n});return this.scene.insertElement(l),l};insertEmbeddableElement=({sceneX:e,sceneY:o,link:r})=>{let[n,i]=Qt(e,o,this.lastPointerDownEvent?.[T.CTRL_OR_CMD]?null:this.state.gridSize),a=qn(r);if(!a)return;a.error instanceof URIError&&this.setToast({message:g("toast.unrecognizedLinkFormat"),closable:!0});let l=Xu({type:"embeddable",x:n,y:i,strokeColor:"transparent",backgroundColor:"transparent",fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,roundness:this.getCurrentItemRoundness("embeddable"),opacity:this.state.currentItemOpacity,locked:!1,width:a.intrinsicSize.w,height:a.intrinsicSize.h,link:r});return this.scene.insertElement(l),l};createImageElement=({sceneX:e,sceneY:o,addToFrameUnderCursor:r=!0})=>{let[n,i]=Qt(e,o,this.lastPointerDownEvent?.[T.CTRL_OR_CMD]?null:this.state.gridSize),a=r?this.getTopLayerFrameAtSceneCoords({x:n,y:i}):null;return Tc({type:"image",x:n,y:i,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,roundness:null,opacity:this.state.currentItemOpacity,locked:!1,frameId:a?a.id:null})};handleLinearElementOnPointerDown=(e,o,r)=>{if(this.state.multiElement){let{multiElement:n}=this.state;if(n.type==="line"&&bl(n.points,this.state.zoom.value)){oe(n,{lastCommittedPoint:n.points[n.points.length-1]}),this.actionManager.executeAction(Ro);return}let{x:i,y:a,lastCommittedPoint:l}=n;if(n.points.length>1&&l&&mn(r.origin.x-i,r.origin.y-a,l[0],l[1])<Zs){this.actionManager.executeAction(Ro);return}this.setState(s=>({selectedElementIds:Be({...s.selectedElementIds,[n.id]:!0},s)})),oe(n,{lastCommittedPoint:n.points[n.points.length-1]}),Oe(this.interactiveCanvas,De.POINTER)}else{let[n,i]=Qt(r.origin.x,r.origin.y,e[T.CTRL_OR_CMD]?null:this.state.gridSize),a=this.getTopLayerFrameAtSceneCoords({x:n,y:i}),{currentItemStartArrowhead:l,currentItemEndArrowhead:s}=this.state,[c,d]=o==="arrow"?[l,s]:[null,null],m=Ml({type:o,x:n,y:i,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,roundness:this.state.currentItemRoundness==="round"?{type:Eo.PROPORTIONAL_RADIUS}:null,startArrowhead:c,endArrowhead:d,locked:!1,frameId:a?a.id:null});this.setState(f=>{let b={...f.selectedElementIds};return delete b[m.id],{selectedElementIds:Be(b,f)}}),oe(m,{points:[...m.points,[0,0]]});let p=Tl(r.origin,this);this.scene.insertElement(m),this.setState({draggingElement:m,editingElement:m,startBoundElement:p,suggestedBindings:[]})}};getCurrentItemRoundness(e){return this.state.currentItemRoundness==="round"?{type:Fi(e)?Eo.ADAPTIVE_RADIUS:Eo.PROPORTIONAL_RADIUS}:null}createGenericElementOnPointerDown=(e,o)=>{let[r,n]=Qt(o.origin.x,o.origin.y,this.lastPointerDownEvent?.[T.CTRL_OR_CMD]?null:this.state.gridSize),i=this.getTopLayerFrameAtSceneCoords({x:r,y:n}),a={x:r,y:n,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,roundness:this.getCurrentItemRoundness(e),locked:!1,frameId:i?i.id:null},l;e==="embeddable"?l=Xu({type:"embeddable",...a}):l=pn({type:e,...a}),l.type==="selection"?this.setState({selectionElement:l,draggingElement:l}):(this.scene.insertElement(l),this.setState({multiElement:null,draggingElement:l,editingElement:l}))};createFrameElementOnPointerDown=(e,o)=>{let[r,n]=Qt(e.origin.x,e.origin.y,this.lastPointerDownEvent?.[T.CTRL_OR_CMD]?null:this.state.gridSize),i={x:r,y:n,opacity:this.state.currentItemOpacity,locked:!1,...Ko},a=o===ut.magicframe?Il(i):Cc(i);this.scene.insertElement(a),this.setState({multiElement:null,draggingElement:a,editingElement:a})};maybeCacheReferenceSnapPoints(e,o,r=!1){rn({event:e,appState:this.state,selectedElements:o})&&(r||!$o.getReferenceSnapPoints())&&$o.setReferenceSnapPoints(E5(this.scene.getNonDeletedElements(),o,this.state,this.scene.getNonDeletedElementsMap()))}maybeCacheVisibleGaps(e,o,r=!1){rn({event:e,appState:this.state,selectedElements:o})&&(r||!$o.getVisibleGaps())&&$o.setVisibleGaps(y5(this.scene.getNonDeletedElements(),o,this.state,this.scene.getNonDeletedElementsMap()))}onKeyDownFromPointerDownHandler(e){return Je(o=>{this.maybeHandleResize(e,o)||this.maybeDragNewGenericElement(e,o)})}onKeyUpFromPointerDownHandler(e){return Je(o=>{o.key===T.ALT&&o.preventDefault(),!this.maybeHandleResize(e,o)&&this.maybeDragNewGenericElement(e,o)})}onPointerMoveFromPointerDownHandler(e){return du(o=>{if(e.drag.offset===null&&(e.drag.offset=ul(M0(this.scene.getSelectedElements(this.state),e.origin.x,e.origin.y))),!(o.target instanceof HTMLElement)||this.handlePointerMoveOverScrollbars(o,e))return;let n=Ke(o,this.state);if(ko(this.state)){this.handleEraser(o,e,n);return}this.state.activeTool.type==="laser"&&this.laserTrails.addPointToPath(n.x,n.y);let[i,a]=Qt(n.x,n.y,o[T.CTRL_OR_CMD]?null:this.state.gridSize);if(!e.drag.hasOccurred&&(this.state.activeTool.type==="arrow"||this.state.activeTool.type==="line")&&mn(n.x,n.y,e.origin.x,e.origin.y)<Un)return;if(e.resize.isResizing&&(e.lastCoords.x=n.x,e.lastCoords.y=n.y,this.maybeHandleResize(e,o)))return!0;let l=this.scene.getNonDeletedElementsMap();if(this.state.selectedLinearElement){let m=this.state.editingLinearElement||this.state.selectedLinearElement;if(ue.shouldAddMidpoint(this.state.selectedLinearElement,n,this.state,l)){let f=ue.addMidpoint(this.state.selectedLinearElement,n,this.state,!o[T.CTRL_OR_CMD],l);if(!f)return;(0,vu.flushSync)(()=>{this.state.selectedLinearElement&&this.setState({selectedLinearElement:{...this.state.selectedLinearElement,pointerDownState:f.pointerDownState,selectedPointsIndices:f.selectedPointsIndices}}),this.state.editingLinearElement&&this.setState({editingLinearElement:{...this.state.editingLinearElement,pointerDownState:f.pointerDownState,selectedPointsIndices:f.selectedPointsIndices}})});return}else if(m.pointerDownState.segmentMidpoint.value!==null&&!m.pointerDownState.segmentMidpoint.added)return;if(ue.handlePointDragging(o,this.state,n.x,n.y,(f,b)=>{this.maybeSuggestBindingsForLinearElementAtCoords(f,b)},m,this.scene.getNonDeletedElementsMap())){e.lastCoords.x=n.x,e.lastCoords.y=n.y,e.drag.hasOccurred=!0,this.state.editingLinearElement&&!this.state.editingLinearElement.isDragging&&this.setState({editingLinearElement:{...this.state.editingLinearElement,isDragging:!0}}),this.state.selectedLinearElement.isDragging||this.setState({selectedLinearElement:{...this.state.selectedLinearElement,isDragging:!0}});return}}let s=e.hit.allHitElements.some(m=>this.isASelectedElement(m)),c=this.state.editingLinearElement&&o.shiftKey&&this.state.editingLinearElement.elementId===e.hit.element?.id;if((s||e.hit.hasHitCommonBoundingBoxOfSelectedElements)&&!c){let m=this.scene.getSelectedElements(this.state);if(m.every(b=>b.locked))return;let p=m.find(b=>Ee(b)),f=this.getTopLayerFrameAtSceneCoords(n);if(this.setState({frameToHighlight:f&&!p?f:null}),e.drag.hasOccurred=!0,this.setState({selectedElementsAreBeingDragged:!0}),m.length>0&&!e.withCmdOrCtrl&&!this.state.editingElement&&this.state.activeEmbeddable?.state!=="active"){let b={x:n.x-e.origin.x,y:n.y-e.origin.y},x=[...e.originalElements.values()],y=o.shiftKey;if(y){let w=Math.abs(b.x),M=Math.abs(b.y),B=y&&w<M,I=y&&w>M;B&&(b.x=0),I&&(b.y=0)}this.maybeCacheVisibleGaps(o,m),this.maybeCacheReferenceSnapPoints(o,m);let{snapOffset:S,snapLines:C}=w5(x,b,this.state,o,this.scene.getNonDeletedElementsMap());if(this.setState({snapLines:C}),!this.state.editingFrame&&I0(e,m,b,this.state,this.scene,S,o[T.CTRL_OR_CMD]?null:this.state.gridSize),this.maybeSuggestBindingForAll(m),o.altKey&&!e.hit.hasBeenDuplicated){e.hit.hasBeenDuplicated=!0;let w=[],M=[],B=new Map,I=new Map,_=e.hit.element,A=new Set(this.scene.getSelectedElements({selectedElementIds:this.state.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}).map(W=>W.id)),U=this.scene.getElementsIncludingDeleted();for(let W of U)if(A.has(W.id)||W.id===_?.id&&e.hit.wasAddedToSelection){let O=Sc(this.state.editingGroupId,B,W),F=e.originalElements.get(W.id);oe(O,{x:F.x,y:F.y}),e.originalElements.set(O.id,O),w.push(O),M.push(W),I.set(W.id,O.id)}else w.push(W);let R=[...w,...M];po(R,xe(M)),gc(w,M,I),hc(R,M,I,"duplicatesServeAsOld"),Fc(R,M,I),this.scene.replaceAllElements(R),this.maybeCacheVisibleGaps(o,m,!0),this.maybeCacheReferenceSnapPoints(o,m,!0)}return}}let d=this.state.draggingElement;if(d){if(d.type==="freedraw"){let m=d.points,p=n.x-d.x,f=n.y-d.y,b=m.length>0&&m[m.length-1];if(!(b&&b[0]===p&&b[1]===f)){let y=d.simulatePressure?d.pressures:[...d.pressures,o.pressure];oe(d,{points:[...m,[p,f]],pressures:y})}}else if(Ne(d)){e.drag.hasOccurred=!0,this.setState({selectedElementsAreBeingDragged:!0});let m=d.points,p=i-d.x,f=a-d.y;pc(o)&&m.length===2&&({width:p,height:f}=pp(d.x,d.y,n.x,n.y)),m.length===1?oe(d,{points:[...m,[p,f]]}):m.length===2&&oe(d,{points:[...m.slice(0,-1),[p,f]]}),Lr(d,!1)&&this.maybeSuggestBindingsForLinearElementAtCoords(d,[n],this.state.startBoundElement)}else e.lastCoords.x=n.x,e.lastCoords.y=n.y,this.maybeDragNewGenericElement(e,o);if(this.state.activeTool.type==="selection"){e.boxSelection.hasOccurred=!0;let m=this.scene.getNonDeletedElements();if(this.state.editingLinearElement)ue.handleBoxSelection(o,this.state,this.setState.bind(this),this.scene.getNonDeletedElementsMap());else{let p=!0;!o.shiftKey&&Fe(m,this.state)&&(e.withCmdOrCtrl&&e.hit.element?this.setState(b=>Dt({...b,selectedElementIds:{[e.hit.element.id]:!0}},this.scene.getNonDeletedElements(),b,this)):p=!1);let f=_0(m,d,this.scene.getNonDeletedElementsMap());this.setState(b=>{let x={...p&&b.selectedElementIds,...f.reduce((y,S)=>(y[S.id]=!0,y),{})};return e.hit.element&&(f.length?delete x[e.hit.element.id]:x[e.hit.element.id]=!0),b=p?b:{...b,selectedGroupIds:{},editingGroupId:null},{...Dt({editingGroupId:b.editingGroupId,selectedElementIds:x},this.scene.getNonDeletedElements(),b,this),selectedLinearElement:f.length===1&&Ne(f[0])?new ue(f[0]):null,showHyperlinkPopup:f.length===1&&(f[0].link||Ht(f[0]))?"info":!1}})}}}})}handlePointerMoveOverScrollbars(e,o){if(o.scrollbars.isOverHorizontal){let r=e.clientX,n=r-o.lastCoords.x;return this.translateCanvas({scrollX:this.state.scrollX-n/this.state.zoom.value}),o.lastCoords.x=r,!0}if(o.scrollbars.isOverVertical){let r=e.clientY,n=r-o.lastCoords.y;return this.translateCanvas({scrollY:this.state.scrollY-n/this.state.zoom.value}),o.lastCoords.y=r,!0}return!1}onPointerUpFromPointerDownHandler(e){return Je(o=>{this.removePointer(o),e.eventListeners.onMove&&e.eventListeners.onMove.flush();let{draggingElement:r,resizingElement:n,multiElement:i,activeTool:a,isResizing:l,isRotating:s}=this.state;this.setState(f=>({isResizing:!1,isRotating:!1,resizingElement:null,selectionElement:null,frameToHighlight:null,elementsToHighlight:null,cursorButton:"up",editingElement:i||le(this.state.editingElement)?this.state.editingElement:null,snapLines:dc(f.snapLines,[]),originSnapOffset:null})),$o.setReferenceSnapPoints(null),$o.setVisibleGaps(null),this.savePointer(o.clientX,o.clientY,"up"),this.setState({selectedElementsAreBeingDragged:!1});let c=this.scene.getNonDeletedElementsMap();if(this.state.editingLinearElement)if(!e.boxSelection.hasOccurred&&e.hit?.element?.id!==this.state.editingLinearElement.elementId)this.actionManager.executeAction(Ro);else{let f=ue.handlePointerUp(o,this.state.editingLinearElement,this.state,this);f!==this.state.editingLinearElement&&this.setState({editingLinearElement:f,suggestedBindings:[]})}else if(this.state.selectedLinearElement)if(e.hit?.element?.id!==this.state.selectedLinearElement.elementId)this.scene.getSelectedElements(this.state).length>1&&this.setState({selectedLinearElement:null});else{let f=ue.handlePointerUp(o,this.state.selectedLinearElement,this.state,this),{startBindingElement:b,endBindingElement:x}=f,y=this.scene.getElement(f.elementId);Lr(y)&&fc(y,b,x,c),f!==this.state.selectedLinearElement&&this.setState({selectedLinearElement:{...f,selectedPointsIndices:null},suggestedBindings:[]})}if(this.missingPointerEventCleanupEmitter.clear(),window.removeEventListener("pointermove",e.eventListeners.onMove),window.removeEventListener("pointerup",e.eventListeners.onUp),window.removeEventListener("keydown",e.eventListeners.onKeyDown),window.removeEventListener("keyup",e.eventListeners.onKeyUp),this.state.pendingImageElementId&&this.setState({pendingImageElementId:null}),this.props?.onPointerUp?.(a,e),this.onPointerUpEmitter.trigger(this.state.activeTool,e,o),r?.type==="freedraw"){let f=Ke(o,this.state),b=r.points,x=f.x-r.x,y=f.y-r.y;x===b[0][0]&&y===b[0][1]&&(y+=1e-4,x+=1e-4);let S=r.simulatePressure?[]:[...r.pressures,o.pressure];oe(r,{points:[...b,[x,y]],pressures:S,lastCommittedPoint:[x,y]}),this.actionManager.executeAction(Ro);return}if(cn(r)){let f=r;try{this.initializeImageDimensions(f),this.setState({selectedElementIds:Be({[f.id]:!0},this.state)},()=>{this.actionManager.executeAction(Ro)})}catch(b){console.error(b),this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().filter(x=>x.id!==f.id)),this.actionManager.executeAction(Ro)}return}if(Ne(r)){r.points.length>1&&this.history.resumeRecording();let f=Ke(o,this.state);!e.drag.hasOccurred&&r&&!i?(oe(r,{points:[...r.points,[f.x-r.x,f.y-r.y]]}),this.setState({multiElement:r,editingElement:this.state.draggingElement})):e.drag.hasOccurred&&!i&&(jn(this.state)&&Lr(r,!1)&&wl(r,this.state,f,this),this.setState({suggestedBindings:[],startBoundElement:null}),a.locked?this.setState(b=>({draggingElement:null})):(Io(this.interactiveCanvas),this.setState(b=>({draggingElement:null,activeTool:nt(this.state,{type:"selection"}),selectedElementIds:Be({...b.selectedElementIds,[r.id]:!0},b),selectedLinearElement:new ue(r)}))));return}if(a.type!=="selection"&&r&&Qn(r)){this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().filter(f=>f.id!==r.id)),this.setState({draggingElement:null});return}if(r){if(e.drag.hasOccurred){let f=Ke(o,this.state);if(this.state.selectedLinearElement&&this.state.selectedLinearElement.isDragging){let b=this.scene.getElement(this.state.selectedLinearElement.elementId);if(b?.frameId){let x=Bc(b,c);x&&b&&(c0(b,x,this.scene.getNonDeletedElementsMap())||(oe(b,{groupIds:[]}),Hc([b],this.scene.getNonDeletedElementsMap()),this.scene.informMutation()))}}else{let b=this.getTopLayerFrameAtSceneCoords(f),x=this.scene.getSelectedElements(this.state),y=this.scene.getElementsMapIncludingDeleted(),S=C=>{if(C.length>0){for(let w of C){let M=w.groupIds.indexOf(this.state.editingGroupId);oe(w,{groupIds:w.groupIds.slice(0,M)},!1)}y.forEach(w=>{w.groupIds.length&&pt(y,w.groupIds[w.groupIds.length-1]).length<2&&oe(w,{groupIds:[]},!1)}),this.setState({editingGroupId:null})}};if(b&&!this.state.selectedElementIds[b.id]){let C=x.filter(w=>w.frameId!==b.id&&mp(w,y,this.state));this.state.editingGroupId&&S(C),y=zc(y,C,b)}else if(!b&&this.state.editingGroupId){let C=x.filter(w=>w.frameId&&!mp(w,y,this.state));S(C)}y=pr(y,this.state,this),this.scene.replaceAllElements(y)}}if(Ee(r)){let f=u0(this.scene.getElementsIncludingDeleted(),r,this.scene.getNonDeletedElementsMap());this.scene.replaceAllElements(zc(this.scene.getElementsMapIncludingDeleted(),f,r))}oe(r,x0(r))}if(n&&this.history.resumeRecording(),n&&Qn(n)&&this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().filter(f=>f.id!==n.id)),e.resize.isResizing){let f=pr(this.scene.getElementsIncludingDeleted(),this.state,this),b=this.scene.getSelectedElements(this.state).filter(x=>Ee(x));for(let x of b)f=$c(f,Ji(this.scene.getElementsIncludingDeleted(),x,this.state,c),x,this);this.scene.replaceAllElements(f)}let d=e.hit.element;this.state.selectedLinearElement?.elementId!==d?.id&&Ne(d)&&this.scene.getSelectedElements(this.state).length===1&&this.setState({selectedLinearElement:new ue(d)});let m=this.lastPointerDownEvent,p=this.lastPointerUpEvent||this.lastPointerMoveEvent;if(ko(this.state)&&m&&p){if(this.eraserTrail.endPath(),mn(m.clientX,m.clientY,p.clientX,p.clientY)===0){let b=Ke({clientX:p.clientX,clientY:p.clientY},this.state);this.getElementsAtPosition(b.x,b.y).forEach(y=>this.elementsPendingErasure.add(y.id))}this.eraseElements();return}else this.elementsPendingErasure.size&&this.restoreReadyToEraseElements();if(d&&!e.drag.hasOccurred&&!e.hit.wasAddedToSelection&&(!this.state.editingLinearElement||!e.boxSelection.hasOccurred)&&(o.shiftKey&&!this.state.editingLinearElement?this.state.selectedElementIds[d.id]?Ec(this.state,d)?this.setState(f=>{let b={...f.selectedElementIds};for(let x of d.groupIds.flatMap(y=>pt(this.scene.getNonDeletedElements(),y)))delete b[x.id];return{selectedGroupIds:{...f.selectedElementIds,...d.groupIds.map(x=>({[x]:!1})).reduce((x,y)=>({...x,...y}),{})},selectedElementIds:Be(b,f)}}):this.state.selectedLinearElement?.isDragging||this.setState(f=>{let b={...f.selectedElementIds};delete b[d.id];let x=ye(this.scene.getNonDeletedElements(),{selectedElementIds:b});return{...Dt({editingGroupId:f.editingGroupId,selectedElementIds:b},this.scene.getNonDeletedElements(),f,this),selectedLinearElement:x.length===1&&Ne(x[0])?new ue(x[0]):f.selectedLinearElement}}):d.frameId&&this.state.selectedElementIds[d.frameId]?this.setState(f=>{let b={...f.selectedElementIds,[d.id]:!0};return delete b[d.frameId],(this.scene.getElement(d.frameId)?.groupIds??[]).flatMap(x=>pt(this.scene.getNonDeletedElements(),x)).forEach(x=>{delete b[x.id]}),{...Dt({editingGroupId:f.editingGroupId,selectedElementIds:b},this.scene.getNonDeletedElements(),f,this),showHyperlinkPopup:d.link||Ht(d)?"info":!1}}):this.setState(f=>({selectedElementIds:Be({...f.selectedElementIds,[d.id]:!0},f)})):this.setState(f=>({...Dt({editingGroupId:f.editingGroupId,selectedElementIds:{[d.id]:!0}},this.scene.getNonDeletedElements(),f,this),selectedLinearElement:Ne(d)&&f.selectedLinearElement?.elementId!==d.id?new ue(d):f.selectedLinearElement}))),!e.drag.hasOccurred&&!this.state.isResizing&&(d&&Zb({x:e.origin.x,y:e.origin.y,element:d,shape:this.getElementShape(d),threshold:this.getHitThreshold(),frameNameBound:Ee(d)?this.frameNameBoundsCache.get(d):null},c)||!d&&e.hit.hasHitCommonBoundingBoxOfSelectedElements)){this.state.editingLinearElement?this.setState({editingLinearElement:null}):this.setState({selectedElementIds:Be({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null}),Oe(this.interactiveCanvas,De.AUTO);return}if(!a.locked&&a.type!=="freedraw"&&r&&r.type!=="selection"&&this.setState(f=>({selectedElementIds:Be({...f.selectedElementIds,[r.id]:!0},f),showHyperlinkPopup:Ht(r)&&!r.link?"editor":f.showHyperlinkPopup})),(a.type!=="selection"||Fe(this.scene.getNonDeletedElements(),this.state))&&this.history.resumeRecording(),(e.drag.hasOccurred||l||s)&&(jn(this.state)?El(this.scene.getSelectedElements(this.state),this):Cl(this.scene.getNonDeletedElements(),c)),a.type==="laser"){this.laserTrails.endPath();return}!a.locked&&a.type!=="freedraw"?(Io(this.interactiveCanvas),this.setState({draggingElement:null,suggestedBindings:[],activeTool:nt(this.state,{type:"selection"})})):this.setState({draggingElement:null,suggestedBindings:[]}),d&&this.lastPointerUpEvent&&this.lastPointerDownEvent&&this.lastPointerUpEvent.timeStamp-this.lastPointerDownEvent.timeStamp<300&&Le.pointers.size<=1&&Oi(d)&&this.isIframeLikeElementCenter(d,this.lastPointerUpEvent,e.origin.x,e.origin.y)&&this.handleEmbeddableCenterClick(d)})}restoreReadyToEraseElements=()=>{this.elementsPendingErasure=new Set,this.onSceneUpdated()};eraseElements=()=>{let e=!1,o=this.scene.getElementsIncludingDeleted().map(r=>this.elementsPendingErasure.has(r.id)||r.frameId&&this.elementsPendingErasure.has(r.frameId)||bt(r)&&this.elementsPendingErasure.has(r.containerId)?(e=!0,me(r,{isDeleted:!0})):r);this.elementsPendingErasure=new Set,e&&(this.history.resumeRecording(),this.scene.replaceAllElements(o))};initializeImage=async({imageFile:e,imageElement:o,showCursorImagePreview:r=!1})=>{if(!_c(e))throw new Error(g("errors.unsupportedFileType"));let n=e.type;if(Oe(this.interactiveCanvas,"wait"),n===Pt.svg)try{e=rp(await Ub(await e.text()),e.name)}catch(c){throw console.warn(c),new Error(g("errors.svgImageInsertError"))}let i=await(this.props.generateIdForFile?.(e)||Rb(e));if(!i)throw console.warn("Couldn't generate file id or the supplied `generateIdForFile` didn't resolve to one."),new Error(g("errors.imageInsertError"));if(!this.files[i]?.dataURL){try{e=await Al(e,{maxWidthOrHeight:w1})}catch(c){console.error("Error trying to resizing image file on insertion",c)}if(e.size>Du)throw new Error(g("errors.fileTooBig",{maxSize:`${Math.trunc(Du/1024/1024)}MB`}))}if(r){let c=this.files[i]?.dataURL,d=c&&Db(c);this.setImagePreviewCursor(d||e)}let l=this.files[i]?.dataURL||await Lc(e),s=oe(o,{fileId:i},!1);return new Promise(async(c,d)=>{try{this.files={...this.files,[i]:{mimeType:n,id:i,dataURL:l,created:Date.now(),lastRetrieved:Date.now()}};let m=this.imageCache.get(i);m||(this.addNewImagesToImageCache(),await this.updateImageCache([s])),m?.image instanceof Promise&&await m.image,this.state.pendingImageElementId!==s.id&&this.state.draggingElement?.id!==s.id&&this.initializeImageDimensions(s,!0),c(s)}catch(m){console.error(m),d(new Error(g("errors.imageInsertError")))}finally{r||Io(this.interactiveCanvas)}})};insertImageElement=async(e,o,r)=>{if(!this.isToolSupported("image")){this.setState({errorMessage:g("errors.imageToolNotSupported")});return}this.scene.insertElement(e);try{return await this.initializeImage({imageFile:o,imageElement:e,showCursorImagePreview:r})}catch(n){return oe(e,{isDeleted:!0}),this.actionManager.executeAction(Ro),this.setState({errorMessage:n.message||g("errors.imageInsertError")}),null}};setImagePreviewCursor=async e=>{let r;try{r=await Al(e,{maxWidthOrHeight:96})}catch(i){throw i.cause==="UNSUPPORTED"?new Error(g("errors.unsupportedFileType")):i}let n=await Lc(r);if(e.type===Pt.svg){let i=await zb(n),a=Math.min(i.height,96),l=a*(i.width/i.height);l>96&&(l=96,a=l*(i.height/i.width));let s=document.createElement("canvas");s.height=a,s.width=l,s.getContext("2d").drawImage(i,0,0,l,a),n=s.toDataURL(Pt.svg)}this.state.pendingImageElementId&&Oe(this.interactiveCanvas,`url(${n}) 4 4, auto`)};onImageAction=async({insertOnCanvasDirectly:e})=>{try{let o=this.state.width/2+this.state.offsetLeft,r=this.state.height/2+this.state.offsetTop,{x:n,y:i}=Ke({clientX:o,clientY:r},this.state),a=await Ic({description:"Image",extensions:Object.keys(l1)}),l=this.createImageElement({sceneX:n,sceneY:i,addToFrameUnderCursor:!1});e?(this.insertImageElement(l,a),this.initializeImageDimensions(l),this.setState({selectedElementIds:Be({[l.id]:!0},this.state)},()=>{this.actionManager.executeAction(Ro)})):this.setState({pendingImageElementId:l.id},()=>{this.insertImageElement(l,a,!0)})}catch(o){o.name!=="AbortError"?console.error(o):console.warn(o),this.setState({pendingImageElementId:null,editingElement:null,activeTool:nt(this.state,{type:"selection"})},()=>{this.actionManager.executeAction(Ro)})}};initializeImageDimensions=(e,o=!1)=>{let r=hl(e)&&this.imageCache.get(e.fileId)?.image;if(!r||r instanceof Promise){if(e.width<Un/this.state.zoom.value&&e.height<Un/this.state.zoom.value){let n=100/this.state.zoom.value;oe(e,{x:e.x-n/2,y:e.y-n/2,width:n,height:n})}return}if(o||e.width<Un/this.state.zoom.value&&e.height<Un/this.state.zoom.value){let n=Math.max(this.state.height-120,160),i=Math.min(n,Math.floor(this.state.height*.5)/this.state.zoom.value),a=Math.min(r.naturalHeight,i),l=a*(r.naturalWidth/r.naturalHeight),s=e.x+e.width/2-l/2,c=e.y+e.height/2-a/2;oe(e,{x:s,y:c,width:l,height:a})}};updateImageCache=async(e,o=this.files)=>{let{updatedFiles:r,erroredFiles:n}=await Hb({imageCache:this.imageCache,fileIds:e.map(i=>i.fileId),files:o});if(r.size||n.size)for(let i of e)r.has(i.fileId)&&Mo.delete(i);return n.size&&this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().map(i=>hl(i)&&n.has(i.fileId)?me(i,{status:"error"}):i)),{updatedFiles:r,erroredFiles:n}};addNewImagesToImageCache=async(e=$b(this.scene.getNonDeletedElements()),o=this.files)=>{let r=e.filter(n=>!n.isDeleted&&!this.imageCache.has(n.fileId));if(r.length){let{updatedFiles:n}=await this.updateImageCache(r,o);n.size&&this.scene.informMutation()}};scheduleImageRefresh=(0,J5.default)(()=>{this.addNewImagesToImageCache()},d1);updateBindingEnabledOnPointerMove=e=>{let o=q1(e);this.state.isBindingEnabled!==o&&this.setState({isBindingEnabled:o})};maybeSuggestBindingAtCursor=e=>{let o=Tl(e,this);this.setState({suggestedBindings:o!=null?[o]:[]})};maybeSuggestBindingsForLinearElementAtCoords=(e,o,r)=>{if(!o.length)return;let n=o.reduce((i,a)=>{let l=Tl(a,this);return l!=null&&!J1(e,r?.id,l)&&i.push(l),i},[]);this.setState({suggestedBindings:n})};maybeSuggestBindingForAll(e){if(e.length>50)return;let o=Q1(e,this);this.setState({suggestedBindings:o})}clearSelection(e){this.setState(o=>({selectedElementIds:Be({},o),activeEmbeddable:null,selectedGroupIds:{},editingGroupId:o.editingGroupId&&e!=null&&Ki(e,o.editingGroupId)?o.editingGroupId:null})),this.setState({selectedElementIds:Be({},this.state),activeEmbeddable:null,previousSelectedElementIds:this.state.selectedElementIds})}handleInteractiveCanvasRef=e=>{e!==null?(this.interactiveCanvas=e,this.interactiveCanvas.addEventListener("wheel",this.handleWheel),this.interactiveCanvas.addEventListener("touchstart",this.onTouchStart),this.interactiveCanvas.addEventListener("touchend",this.onTouchEnd)):(this.interactiveCanvas?.removeEventListener("wheel",this.handleWheel),this.interactiveCanvas?.removeEventListener("touchstart",this.onTouchStart),this.interactiveCanvas?.removeEventListener("touchend",this.onTouchEnd))};handleAppOnDrop=async e=>{let{file:o,fileHandle:r}=await Ob(e),{x:n,y:i}=Ke(e,this.state);try{if(_c(o)&&this.isToolSupported("image")){if(o?.type===Pt.png||o?.type===Pt.svg)try{let s=await Ac(o,this.state,this.scene.getElementsIncludingDeleted(),r);this.syncActionResult({...s,appState:{...s.appState||this.state,isLoading:!1},replaceFiles:!0,commitToHistory:!0});return}catch(s){if(s.name!=="EncodingError")throw new Error(g("alerts.couldNotLoadInvalidFile"))}let l=this.createImageElement({sceneX:n,sceneY:i});this.insertImageElement(l,o),this.initializeImageDimensions(l),this.setState({selectedElementIds:Be({[l.id]:!0},this.state)});return}}catch(l){return this.setState({isLoading:!1,errorMessage:l.message})}let a=e.dataTransfer.getData(Pt.excalidrawlib);if(a&&typeof a=="string"){try{let l=Pb(a);this.addElementsFromPasteOrLibrary({elements:cm(l),position:e,files:null})}catch(l){this.setState({errorMessage:l.message})}return}if(o&&await this.loadFileToCanvas(o,r),e.dataTransfer?.types?.includes("text/plain")){let l=e.dataTransfer?.getData("text");if(l&&Zi(l,this.props.validateEmbeddable)&&(/^(http|https):\/\/[^\s/$.?#].[^\s]*$/.test(l)||qn(l)?.type==="video")){let s=this.insertEmbeddableElement({sceneX:n,sceneY:i,link:Br(l)});s&&this.setState({selectedElementIds:{[s.id]:!0}})}}};loadFileToCanvas=async(e,o)=>{e=await Fb(e);try{let r;try{r=await tp(e,this.state,this.scene.getElementsIncludingDeleted(),o)}catch(n){let i=n instanceof Y1;if(i&&n.code==="IMAGE_NOT_CONTAINS_SCENE_DATA"&&!this.isToolSupported("image")){this.setState({isLoading:!1,errorMessage:g("errors.imageToolNotSupported")});return}let a=i?g("alerts.cannotRestoreFromImage"):g("alerts.couldNotLoadInvalidFile");this.setState({isLoading:!1,errorMessage:a})}if(!r)return;r.type===Pt.excalidraw?(this.setState({isLoading:!0}),this.syncActionResult({...r.data,appState:{...r.data.appState||this.state,isLoading:!1},replaceFiles:!0,commitToHistory:!0})):r.type===Pt.excalidrawlib&&await this.library.updateLibrary({libraryItems:e,merge:!0,openLibraryMenu:!0}).catch(n=>{console.error(n),this.setState({errorMessage:g("errors.importLibraryError")})})}catch(r){this.setState({isLoading:!1,errorMessage:r.message})}};handleCanvasContextMenu=e=>{if(e.preventDefault(),("pointerType"in e.nativeEvent&&e.nativeEvent.pointerType==="touch"||"pointerType"in e.nativeEvent&&e.nativeEvent.pointerType==="pen"&&e.button!==nn.SECONDARY)&&this.state.activeTool.type!=="selection")return;let{x:o,y:r}=Ke(e,this.state),n=this.getElementAtPosition(o,r,{preferSelected:!0,includeLockedElements:!0}),i=this.scene.getSelectedElements(this.state),a=this.isHittingCommonBoundingBoxOfSelectedElements({x:o,y:r},i),l=n||a?"element":"canvas",s=this.excalidrawContainerRef.current,{top:c,left:d}=s.getBoundingClientRect(),m=e.clientX-d,p=e.clientY-c;ge("contextMenu","openContextMenu",l),this.setState({...n&&!this.state.selectedElementIds[n.id]?{...this.state,...Dt({editingGroupId:this.state.editingGroupId,selectedElementIds:{[n.id]:!0}},this.scene.getNonDeletedElements(),this.state,this),selectedLinearElement:Ne(n)?new ue(n):null}:this.state,showHyperlinkPopup:!1},()=>{this.setState({contextMenu:{top:p,left:m,items:this.getContextMenuItems(l)}})})};maybeDragNewGenericElement=(e,o)=>{let r=this.state.draggingElement,n=e.lastCoords;if(r)if(r.type==="selection"&&this.state.activeTool.type!=="eraser")bp(r,this.state.activeTool.type,e.origin.x,e.origin.y,n.x,n.y,Kn(e.origin.x,n.x),Kn(e.origin.y,n.y),Ui(o),uc(o));else{let[i,a]=Qt(n.x,n.y,o[T.CTRL_OR_CMD]?null:this.state.gridSize),l=hl(r)&&this.imageCache.get(r.fileId)?.image,s=l&&!(l instanceof Promise)?l.width/l.height:null;this.maybeCacheReferenceSnapPoints(o,[r]);let{snapOffset:c,snapLines:d}=T5(r,this.state,o,{x:e.originInGrid.x+(this.state.originSnapOffset?.x??0),y:e.originInGrid.y+(this.state.originSnapOffset?.y??0)},{x:i-e.originInGrid.x,y:a-e.originInGrid.y},this.scene.getNonDeletedElementsMap());i+=c.x,a+=c.y,this.setState({snapLines:d}),bp(r,this.state.activeTool.type,e.originInGrid.x,e.originInGrid.y,i,a,Kn(e.originInGrid.x,i),Kn(e.originInGrid.y,a),cn(r)?!Ui(o):Ui(o),uc(o),s,this.state.originSnapOffset),this.maybeSuggestBindingForAll([r]),(this.state.activeTool.type===ut.frame||this.state.activeTool.type===ut.magicframe)&&this.setState({elementsToHighlight:Ji(this.scene.getNonDeletedElements(),r,this.state,this.scene.getNonDeletedElementsMap())})}};maybeHandleResize=(e,o)=>{let r=this.scene.getSelectedElements(this.state),n=r.filter(d=>Ee(d)),i=e.resize.handleType;if(n.length>0&&i==="rotation")return!1;this.setState({isResizing:i&&i!=="rotation",isRotating:i==="rotation",activeEmbeddable:null});let a=e.lastCoords,[l,s]=Qt(a.x-e.resize.offset.x,a.y-e.resize.offset.y,o[T.CTRL_OR_CMD]?null:this.state.gridSize),c=new Map;if(n.forEach(d=>{hn(this.scene.getNonDeletedElements(),d.id).forEach(p=>{c.set(d.id+p.id,{x:p.x-d.x,y:p.y-d.y})})}),!this.state.selectedElementsAreBeingDragged){let[d,m]=Qt(a.x,a.y,o[T.CTRL_OR_CMD]?null:this.state.gridSize),p={x:d-e.originInGrid.x,y:m-e.originInGrid.y},f=[...e.originalElements.values()];this.maybeCacheReferenceSnapPoints(o,r);let{snapOffset:b,snapLines:x}=C5(r,ye(f,this.state),this.state,o,p,i);l+=b.x,s+=b.y,this.setState({snapLines:x})}if(C0(e.originalElements,i,r,this.scene.getElementsMapIncludingDeleted(),pc(o),uc(o),r.length===1&&cn(r[0])?!Ui(o):Ui(o),l,s,e.resize.center.x,e.resize.center.y)){this.maybeSuggestBindingForAll(r);let d=new Set;return n.forEach(m=>{Ji(this.scene.getNonDeletedElements(),m,this.state,this.scene.getNonDeletedElementsMap()).forEach(p=>d.add(p))}),this.setState({elementsToHighlight:[...d]}),!0}return!1};getContextMenuItems=e=>{let o=[];return o.push(Qd,Jd),e==="canvas"?this.state.viewModeEnabled?[...o,tm,Na,hg,In]:[ih,no,Qd,Jd,em,no,Qp,vE,no,tm,ah,Na,hg,In]:(o.push(em),this.state.viewModeEnabled?[Da,...o]:[qd,Da,ih,f5,h5,no,...o,no,Zf,jf,no,qf,lh,sh,uE,Jf,no,th,no,jp,Xp,qp,Jp,no,rh,nh,no,Nh,cs,ef,fh,no,Gl])};handleWheel=Je(e=>{if(e.preventDefault(),Bs)return;let{deltaX:o,deltaY:r}=e;if(e.metaKey||e.ctrlKey){let n=Math.sign(r),i=Gn*100,a=Math.abs(r),l=r;a>i&&(l=i*n);let s=this.state.zoom.value-l/100;s+=Math.log10(Math.max(1,this.state.zoom.value))*-n*Math.min(1,a/20),this.translateCanvas(c=>({...$r({viewportX:this.lastViewportPosition.x,viewportY:this.lastViewportPosition.y,nextZoom:Hr(s)},c),shouldCacheIgnoreZoom:!0})),this.resetShouldCacheIgnoreZoomDebounced();return}if(e.shiftKey){this.translateCanvas(({zoom:n,scrollX:i})=>({scrollX:i-(r||o)/n.value}));return}this.translateCanvas(({zoom:n,scrollX:i,scrollY:a})=>({scrollX:i-o/n.value,scrollY:a-r/n.value}))});getTextWysiwygSnappedToCenterPosition(e,o,r,n){if(n){let i=n.x+n.width/2,a=n.y+n.height/2,l=vc(n,r,this.scene.getNonDeletedElementsMap());if(l&&(i=l.x,a=l.y),Math.hypot(e-i,o-a)<r1){let{x:d,y:m}=Jt({sceneX:i,sceneY:a},r);return{viewportX:d,viewportY:m,elementCenterX:i,elementCenterY:a}}}}savePointer=(e,o,r)=>{if(!e||!o)return;let{x:n,y:i}=Ke({clientX:e,clientY:o},this.state);isNaN(n)||isNaN(i);let a={x:n,y:i,tool:this.state.activeTool.type==="laser"?"laser":"pointer"};this.props.onPointerUpdate?.({pointer:a,button:r,pointersMap:Le.pointers})};resetShouldCacheIgnoreZoomDebounced=dl(()=>{this.unmounted||this.setState({shouldCacheIgnoreZoom:!1})},300);updateDOMRect=e=>{if(this.excalidrawContainerRef?.current){let o=this.excalidrawContainerRef.current,{width:r,height:n,left:i,top:a}=o.getBoundingClientRect(),{width:l,height:s,offsetTop:c,offsetLeft:d}=this.state;if(r===l&&n===s&&i===d&&a===c){e&&e();return}this.setState({width:r,height:n,offsetLeft:i,offsetTop:a},()=>{e&&e()})}};refresh=()=>{this.setState({...this.getCanvasOffsets()})};getCanvasOffsets(){if(this.excalidrawContainerRef?.current){let e=this.excalidrawContainerRef.current,{left:o,top:r}=e.getBoundingClientRect();return{offsetLeft:o,offsetTop:r}}return{offsetLeft:0,offsetTop:0}}async updateLanguage(){let e=ra.find(o=>o.code===this.props.langCode)||fr;await Jc(e),this.setAppState({})}},xI=()=>{(E.MODE===Au.TEST||E.DEV)&&(window.h=window.h||{},Object.defineProperties(window.h,{elements:{configurable:!0,get(){return this.app?.scene.getElementsIncludingDeleted()},set(t){return this.app?.scene.replaceAllElements(zi(t))}}}))};xI();var o6=Ag;h();var vI=()=>{Array.prototype.at||Object.defineProperty(Array.prototype,"at",{value:function(t){if(t=Math.trunc(t)||0,t<0&&(t+=this.length),!(t<0||t>=this.length))return this[t]},writable:!0,enumerable:!1,configurable:!0}),Element.prototype.replaceChildren||(Element.prototype.replaceChildren=function(...t){this.innerHTML="",this.append(...t)})},r6=vI;h();var Fg=v(k(),1),n6=({children:t})=>{let{FooterCenterTunnel:e}=Ge(),o=_e();return(0,Fg.jsx)(e.In,{children:(0,Fg.jsx)("div",{className:z("footer-center zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":o.zenModeEnabled}),children:t})})},yI=n6;n6.displayName="FooterCenter";h();h();h();var Wo=v(k(),1),EI=()=>(0,Wo.jsx)("svg",{viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"ExcalidrawLogo-icon",children:(0,Wo.jsx)("path",{d:"M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z",fill:"currentColor"})}),wI=()=>(0,Wo.jsxs)("svg",{viewBox:"0 0 450 55",xmlns:"http://www.w3.org/2000/svg",fill:"none",className:"ExcalidrawLogo-text",children:[(0,Wo.jsx)("path",{d:"M429.27 96.74c2.47-1.39 4.78-3.02 6.83-4.95 1.43-1.35 2.73-2.86 3.81-4.51-.66.9-1.4 1.77-2.23 2.59-2.91 2.84-5.72 5.09-8.42 6.87h.01ZM343.6 69.36c.33 3.13.58 6.27.79 9.4.09 1.37.18 2.75.25 4.12-.12-4.46-.27-8.93-.5-13.39-.11-2.08-.24-4.16-.4-6.24-.06 1.79-.11 3.85-.13 6.11h-.01ZM378.47 98.34c.01-.37.07-1.13.01-6.51-.11 1.9-.22 3.81-.31 5.71-.07 1.42-.22 2.91-.16 4.35.39.03.78.07 1.17.1-.92-.85-.76-2.01-.72-3.66l.01.01ZM344.09 86.12c-.09-2.41-.22-4.83-.39-7.24v12.21c.15-.05.32-.09.47-.14.05-1.61-.03-3.23-.09-4.83h.01ZM440.69 66.79c-.22-.34-.45-.67-.69-.99-3.71-4.87-9.91-7.14-15.65-8.55-1.05-.26-2.12-.49-3.18-.71 2.29.59 4.48 1.26 6.64 2.02 7.19 2.54 10.57 5.41 12.88 8.23ZM305.09 72.46l1.2 3.6c.84 2.53 1.67 5.06 2.46 7.61.24.78.5 1.57.73 2.36.22-.04.44-.08.67-.12a776.9 776.9 0 0 1-5.01-13.57c-.02.04-.03.09-.05.13v-.01ZM345.49 90.25v.31c1.48-.42 3.05-.83 4.66-1.2-1.56.25-3.12.52-4.66.89ZM371.02 90.22c0-.57-.04-1.14-.11-1.71-.06-.02-.12-.04-.19-.05-.21-.05-.43-.08-.65-.11.42.16.74.88.95 1.87ZM398.93 54.23c-.13 0-.27-.01-.4-.02l.03.4c.11-.15.23-.27.37-.38ZM401.57 62.28v-.15c-1.22-.24-2.86-.61-3.23-1.25-.09-.15-.18-.51-.27-.98-.09.37-.2.73-.33 1.09 1.24.56 2.52.98 3.83 1.29ZM421.73 88.68c-2.97 1.65-6.28 3.12-9.69 3.68v.18c4.72-.14 11.63-3.85 16.33-8.38-2.04 1.75-4.33 3.24-6.63 4.53l-.01-.01ZM411.28 80.92c-.05-1.2-.09-2.4-.15-3.6-.21 5.66-.46 11.38-.47 14.51.24-.02.48-.04.71-.07.15-3.61.05-7.23-.09-10.83v-.01Z",transform:"translate(-144.023 -51.76)"}),(0,Wo.jsx)("path",{d:"M425.38 67.41c-3.5-1.45-7.19-2.57-14.06-3.62.09 1.97.06 4.88-.03 8.12.03.04.06.09.06.15.19 1.36.28 2.73.37 4.1.25 3.77.39 7.55.41 11.33 0 1.38-.01 2.76-.07 4.13 1.4-.25 2.78-.65 4.12-1.15 4.07-1.5 7.94-3.78 11.28-6.54 2.33-1.92 5.13-4.49 5.88-7.58.63-3.53-2.45-6.68-7.97-8.96l.01.02ZM411.35 92.53v-.06l-.34.03c.11.01.22.03.34.03ZM314.26 64.06c-.23-.59-.47-1.17-.7-1.75.57 1.62 1.11 3.25 1.6 4.9l.15.54 2.35 6.05c.32.82.66 1.64.98 2.46-1.38-4.1-2.83-8.17-4.39-12.2h.01ZM156.82 103.07c-.18.13-.38.23-.58.33 1.32-.03 2.66-.2 3.93-.34.86-.09 1.72-.22 2.58-.33-2.12.1-4.12.17-5.94.34h.01ZM210.14 68.88s.03.04.05.07c.18-.31.39-.64.58-.96-.21.3-.42.6-.64.89h.01ZM201.65 82.8c-.5.77-1.02 1.56-1.49 2.37 1.11-1.55 2.21-3.1 3.2-4.59-.23.23-.49.51-.75.79-.32.47-.65.95-.96 1.43ZM194.03 98.66c-.33-.4-.65-.84-1.05-1.17-.24-.2-.07-.49.17-.56-.23-.26-.42-.5-.63-.75 1.51-2.55 3.93-5.87 6.4-9.28-.17-.08-.29-.28-.2-.49.04-.09.09-.17.13-.26-1.21 1.78-2.42 3.55-3.61 5.33-.87 1.31-1.74 2.64-2.54 4-.29.5-.63 1.04-.87 1.61.81.65 1.63 1.27 2.47 1.88-.09-.11-.18-.21-.27-.32v.01ZM307.79 82.93c-1-3.17-2.05-6.32-3.1-9.48-1.62 4.08-3.69 9.17-6.16 15.19 3.32-1.04 6.77-1.87 10.27-2.5-.32-1.08-.67-2.15-1.01-3.21ZM149.5 80.7c.05-1.71.04-3.43 0-5.14-.1 2.26-.16 4.51-.22 6.77-.02.73-.03 1.46-.04 2.19.14-1.27.2-2.55.24-3.82h.02ZM228.98 98.3c.39 1.25.91 3.03.94 3.91.06-.03.12-.07.17-.1.08-1.29-.55-2.65-1.11-3.81ZM307.72 53.36c.81.5 1.53 1.04 2.07 1.49-.38-.8-.78-1.58-1.21-2.35-.17.03-.34.06-.51.11-.43.12-.86.26-1.29.41.35-.01.53.1.94.34ZM283.69 96.14c3.91-7.25 6.89-13.35 8.88-18.15l1.1-2.66c-1.27 2.64-2.56 5.27-3.83 7.9-1.53 3.15-3.06 6.31-4.58 9.47-.87 1.81-1.76 3.62-2.54 5.47.04.02.07.04.11.07.05.05.1.09.15.14.05-.73.27-1.48.71-2.24ZM289.92 103.23s-.04.01-.05.03c0-.02.04-.03.05-.04.05-.05.11-.1.16-.15l.21-.21c-.55 0-1.5-.27-2.55-.72.4.26.8.51 1.22.74.24.13.48.26.73.37.05.02.1.03.14.05a.27.27 0 0 1 .08-.07h.01ZM269.23 68.49c-.39-.19-.82-.48-1.33-.87-3.06-1.56-6.31-2.78-9.36-2.35-3.5.49-5.7 1.11-7.74 2.44 5.71-2.6 12.82-2.07 18.44.79l-.01-.01ZM177.87 53.69l1.06.03c-.96-.22-2-.25-2.89-.3-4.95-.26-9.99.33-14.86 1.19-2.44.43-4.88.95-7.28 1.59 9.09-1.76 15.69-2.77 23.97-2.51ZM219.85 55.51c-.18.12-.36.27-.56.45-.45.53-.86 1.11-1.26 1.66-1.91 2.61-3.71 5.31-5.57 7.95l-.12.18 8.05-10.11c-.18-.05-.36-.1-.55-.13h.01ZM510.71 54.1c.12-.15.29-.3.53-.45.69-.4 3.72-.63 5.87-.74-.36-.02-.73-.04-1.09-.05-1.84-.03-3.67.09-5.49.35.05.3.12.59.18.88v.01ZM510.76 86.02c1.37-3.07 2.49-6.27 3.57-9.46.55-1.64 1.12-3.3 1.6-4.97-1.59 4.01-3.67 9.14-6.2 15.3.24-.08.5-.14.74-.22.1-.22.19-.44.29-.65ZM566.95 75.76c.11-.02.23.03.31.11-.05-.13-.09-.26-.14-.39-.05.09-.11.18-.17.28ZM511.33 86.41c3.08-.89 6.24-1.62 9.46-2.14-1.51-3.98-2.98-7.96-4.39-11.87-.05.15-.09.31-.14.46-1.02 3.32-2.15 6.61-3.39 9.85-.48 1.25-.98 2.49-1.53 3.7h-.01ZM578.24 74.45c.11-.44.23-.87.35-1.31-.31.7-.64 1.39-.97 2.08.09.21.19.4.28.61.12-.46.23-.92.35-1.38h-.01ZM520.62 53.11c-.09 0-.18-.01-.28-.02.38.34.29 1.08.93 2.53l6.65 17.15c2.2 5.68 4.69 11.36 7.41 16.87l1.06 2.17c-2.95-7.05-5.92-14.08-8.87-21.13-1.58-3.79-3.16-7.59-4.7-11.4-.78-1.92-1.73-3.89-2.25-5.91-.03-.1 0-.19.04-.26h.01ZM578.78 77.87c1.45-5.77 3.07-10.43 3.58-13.36.05-.34.16-.88.31-1.55-.67 1.79-1.37 3.56-2.08 5.33-.12.43-.23.86-.35 1.29-.65 2.43-1.29 4.86-1.9 7.3.14.33.29.65.43 1l.01-.01ZM545.3 94.66c.02-.44.03-.83.05-1.12.02-1.01.05-2.02.11-3.02.03-6.66-.46-14.33-1.46-22.8-.13-.42-.27-1.24-.56-2.89 0-.02 0-.04-.01-.06.62 6.61.95 13.25 1.32 19.87.17 3.08.33 6.16.52 9.23.02.25.03.52.04.78l-.01.01ZM580.77 102.81c.13.2.27.38.37.49.27-.11.53-.22.8-.32-.43.09-.82.05-1.17-.16v-.01ZM530.48 104.07h.33c-.36-.13-.71-.32-1.04-.56.14.24.3.47.45.7.06-.08.14-.13.26-.13v-.01ZM542.63 58.82c.06.23.11.47.15.71.14-.33.36-.62.7-.86-.28.05-.57.11-.85.15ZM583.81 57.87c.15-.7.29-1.41.42-2.11-.14.45-.28.9-.42 1.34-.46 1.44-.89 2.89-1.31 4.34.44-1.19.88-2.37 1.31-3.57ZM523.62 91.48c-4.66 1.17-9.05 2.89-14.02 5.27 4.65-1.84 9.48-3.29 14.28-4.63-.09-.22-.17-.41-.26-.64ZM460.64 78.3c-.04-2.9-.11-5.81-.28-8.71-.1-1.68-.17-3.43-.5-5.09-.07.02-.14.03-.2.05.3 6.54.45 12.17.51 17.12.17-.07.34-.14.51-.2 0-1.06-.01-2.11-.03-3.17h-.01ZM470.63 63.24c-3.38-.26-6.81.32-10.1 1.1.41 2.01.47 4.14.57 6.18.18 3.55.25 7.11.27 10.67 3.31-1.38 6.5-3.12 9.3-5.35 1.96-1.56 3.86-3.41 5.02-5.66.73-1.41 1.19-3.22.26-4.65-1.09-1.7-3.46-2.14-5.32-2.29ZM460.29 63.68c1-.24 2.01-.46 3.04-.65-1.15.16-2.37.38-3.71.69v.13c.07-.02.15-.04.22-.05.11-.13.3-.18.45-.11v-.01ZM457.24 100.96c.43-.03.86-.07 1.29-.11.14-.49.27-.99.38-1.49-.44.7-1 1.23-1.67 1.6ZM482.88 104.98c-.18.23-.36.38-.55.47.14.09.27.19.4.28a70.76 70.76 0 0 0 4.37-4.63c.76-.89 1.52-1.81 2.19-2.77-.3-.27-.61-.53-.92-.79-.07 1.94-4.62 6.32-5.49 7.45v-.01Z",transform:"translate(-144.023 -51.76)"}),(0,Wo.jsx)("path",{d:"M474.36 63.31c-.4-.16-.84-.27-1.29-.37 1.56.42 3.08 1.22 3.76 2.74.62 1.4.32 2.95-.28 4.32.7-1.22.94-2.34.74-3.47-.24-1.33-1.19-2.54-2.93-3.21v-.01ZM477.34 89.18c-1.2-.81-2.4-1.62-3.6-2.42-.14.1-.26.19-.4.29 1.4.67 2.73 1.39 4 2.13ZM465.88 93.85c.37.25.74.5 1.1.75.46.32.92.65 1.38.97-1.57-1.2-2.01-1.61-2.49-1.72h.01ZM574.92 90.06c-2.28-5.21-4.93-11.13-5.67-12.26-.1-.15-1.57-3.01-1.63-3.08 0 0-.01.02-.02.02.4 1.37 1.09 2.69 1.65 3.99 2.14 4.95 4.36 9.86 6.67 14.73.6 1.26 1.21 2.52 1.83 3.78-.75-2.01-1.64-4.45-2.83-7.18ZM448.73 65.29c.1.2.22.38.34.57.22-.02.43-.06.65-.08v-.08c-.14-.05-.25 0-.99-.41ZM460.16 94.81c-.02.31-.06.59-.1.89-.03 1.71-.33 3.43-.79 5.07.15-.02.3-.03.45-.05.01-.04.02-.08.03-.11.09-.34.15-.69.2-1.03.17-1.07.25-2.16.33-3.24.05-.69.08-1.39.12-2.08-.27.1-.27.26-.24.57v-.02Z",transform:"translate(-144.023 -51.76)"}),(0,Wo.jsx)("path",{d:"m328.67 98.12-3.22-6.58c-1.29-2.63-2.53-5.29-3.72-7.97-.25-.85-.52-1.69-.79-2.53-.81-2.57-1.67-5.12-2.55-7.67-1.92-5.53-3.9-11.08-6.32-16.41-.72-1.58-1.46-3.44-2.63-4.79-.03-.17-.16-.29-.34-.36a.282.282 0 0 0-.23-.04c-.06-.01-.12 0-.18.01-.74.06-1.5.38-2.19.61-2.22.77-4.4 1.64-6.63 2.38-.03-.08-.06-.16-.09-.25-.15-.42-.82-.24-.67.19.03.09.07.19.1.28l-.18.06c-.36.11-.28.6 0 .68.18 1.18.63 2.36.98 3.49.03.09.06.17.08.26-.08.23-.17.46-.24.64-.37.98-.79 1.94-1.21 2.9-1.27 2.89-2.62 5.75-3.98 8.6-3.18 6.67-6.44 13.31-9.64 19.97-1.08 2.25-2.2 4.5-3.15 6.81-.13.32.24.5.5.37 1.34 1.33 2.84 2.5 4.4 3.57.65.44 1.31.87 2.01 1.24.4.22.86.48 1.33.5.24.01.35-.19.33-.37.11-.1.21-.21.28-.28.41-.41.81-.84 1.2-1.26.85-.92 1.69-1.87 2.5-2.84 6.31-2.34 12.6-4.31 18.71-5.84 2.14 5.3 3.43 8.43 3.97 9.58.55 1.05 1.15 1.88 1.82 2.52 1.32.56 6.96-.03 9.23-1.96.87-1.28 1.19-2.67.93-4.15-.09-.5-.22-.95-.4-1.33l-.01-.03Zm-20.09-45.61c.43.77.83 1.56 1.21 2.35-.54-.45-1.27-.99-2.07-1.49-.42-.24-.6-.35-.94-.34.43-.15.85-.29 1.29-.41.17-.05.34-.08.51-.11Zm-25.86 45.66c.78-1.85 1.67-3.66 2.54-5.47 1.51-3.16 3.05-6.31 4.58-9.47 1.28-2.63 2.56-5.26 3.83-7.9l-1.1 2.66c-1.99 4.79-4.97 10.9-8.88 18.15-.43.76-.66 1.51-.71 2.24-.05-.05-.1-.09-.15-.14a.259.259 0 0 0-.11-.07Zm6.24 4.71c-.42-.23-.82-.48-1.22-.74 1.05.45 2 .72 2.55.72l-.21.21c-.05.05-.11.1-.16.15-.01.01-.04.03-.05.04 0-.02.03-.02.05-.03a.27.27 0 0 0-.08.07c-.05-.02-.1-.03-.14-.05-.25-.1-.49-.24-.73-.37h-.01Zm15.73-29.43c1.05 3.15 2.1 6.31 3.1 9.48.34 1.06.69 2.13 1.01 3.21-3.5.63-6.95 1.46-10.27 2.5 2.48-6.03 4.54-11.11 6.16-15.19Zm4.79 12.57c-.23-.79-.49-1.58-.73-2.36-.79-2.54-1.63-5.08-2.46-7.61l-1.2-3.6c.02-.04.04-.09.05-.13 1.6 4.45 3.28 9 5.01 13.57l-.67.12v.01Zm5.83-18.27-.15-.54c-.49-1.64-1.03-3.28-1.6-4.9.23.58.47 1.17.7 1.75 1.56 4.03 3.01 8.1 4.39 12.2-.33-.82-.67-1.64-.98-2.46l-2.35-6.05h-.01ZM390.43 79.37c-.13-10.43-.22-17.5-.24-19.97-.24-1.6.21-2.88-.65-3.65-.14-.13-.32-.23-.52-.32h.03c.45 0 .45-.69 0-.7-1.75-.03-3.5-.04-5.25-.14-1.38-.08-2.76-.21-4.15-.31-.07 0-.12.01-.17.04-.21-.07-.47.03-.45.31l.03.45c-.11.14-.19.3-.22.5-.21 1.26-.32 13.67-.36 23.59-.32 5.79-.67 11.57-.97 17.36-.09 1.73-.29 3.54-.21 5.3-.39.02-.38.64.04.69v.12c.05.44.74.45.7 0v-.06c1.1.09 2.2.21 3.3.3 1.14.19 2.44.2 3.29.17 1.73-.05 2.92-.05 3.8-.37.45-.05.9-.11 1.35-.17.44-.06.25-.73-.19-.67h-.01c.24-.32.45-.72.62-1.25.66-1.84.41-6.36.34-11.33l-.13-9.9.02.01Zm-12.26 18.17c.09-1.91.2-3.81.31-5.71.06 5.38 0 6.14-.01 6.51-.05 1.65-.21 2.81.72 3.66-.39-.04-.78-.07-1.17-.1-.06-1.44.09-2.93.16-4.35l-.01-.01ZM588.97 53.85c-2.06-.25-3.17-.51-3.76-.6a.3.3 0 0 1 .04-.08c.22-.39-.39-.75-.6-.35-.56 1.02-.9 2.19-1.26 3.29-.61 1.88-1.17 3.78-1.72 5.68-.63 2.19-1.24 4.39-1.83 6.59-.81 2.03-1.67 4.05-2.61 6.03-1.7-3.64-3.11-6.04-4.03-7.57-2.26-3.74-2.85-5.48-3.57-6.08l.31-.09c.43-.12.25-.8-.19-.67-1.06.3-2.12.6-3.17.95-.93.32-1.85.69-2.76 1.07-.13.05-.19.16-.22.27-.04.02-.08.05-.11.07-.04-.06-.07-.12-.11-.18a.354.354 0 0 0-.48-.12c-.16.09-.22.32-.13.48l.33.54c0 .09.02.18.06.28.51 1.16.78 1.38.72 1.47-2.42 3.44-5.41 7.86-6.2 9.1-1.27 1.97-2.01 3.14-2.45 3.84l-.91-6.56-.43-4.1c-.19-1.85-.37-3.23-.53-4.13-.19-1.1-.3-2.15-.45-3.16-.2-1.36-.29-2.06-.47-2.42h.04c.45.02.45-.68 0-.7-3.43-.16-6.81.94-10.17 1.48-.24-.22-.73-.04-.58.32.24.59.33 1.25.43 1.87.17 1.06.29 2.13.4 3.2.32 3.09.53 6.2.74 9.3.44 6.75.77 13.51 1.17 20.26.11 1.95.13 3.96.46 5.89.05.3.37.31.55.14.74 1.71 2.87 1.27 6.13 1.27 1.34 0 2.39.04 2.99-.11.02.32.48.53.63.18 3.61-8.26 7.41-16.46 12.05-24.2.03-.05.04-.1.05-.15.3.73.64 1.45.94 2.16.97 2.26 1.97 4.52 2.98 6.76 2.26 5.03 4.54 10.07 7.09 14.96.47.9.94 1.79 1.47 2.65.2.32.4.67.66.96-.18.25 0 .68.34.54.91-.38 1.82-.75 2.76-1.07 1.04-.35 2.11-.65 3.17-.95.39-.11.28-.66-.07-.68.62-.4.95-.96.87-1.91-.3-3.34.72-7.47.86-8.52l2.14-11.43c1.75-10.74 3.13-17.51 3.23-20.86.02-.49.08-2.84.13-3.24.17-1.25.48-1-4.96-1.65l.03-.02Zm-46.19 5.67c-.04-.24-.09-.48-.15-.71l.85-.15c-.34.24-.56.53-.7.86Zm1.95 25.12c-.36-6.63-.7-13.26-1.32-19.87 0 .02 0 .04.01.06.29 1.65.44 2.47.56 2.89 1 8.46 1.5 16.14 1.46 22.8-.06.99-.1 2-.11 3.02-.01.29-.03.68-.05 1.12-.01-.26-.03-.53-.04-.78-.19-3.08-.35-6.16-.52-9.23l.01-.01Zm36.4 18.66c-.11-.11-.24-.29-.37-.49.35.21.74.26 1.17.16-.27.11-.53.22-.8.32v.01Zm-.89-33.72c.12-.43.23-.86.35-1.29.71-1.77 1.41-3.55 2.08-5.33-.15.68-.26 1.22-.31 1.55-.5 2.94-2.13 7.59-3.58 13.36-.15-.35-.29-.66-.43-1 .61-2.44 1.25-4.87 1.9-7.3l-.01.01Zm3.56-12.48c.14-.44.28-.89.42-1.34-.13.7-.27 1.41-.42 2.11-.43 1.19-.86 2.38-1.31 3.57.42-1.45.85-2.9 1.31-4.34Zm-5.22 16.05c-.11.44-.23.87-.35 1.31-.12.46-.23.92-.35 1.38-.1-.22-.19-.4-.28-.61.34-.69.66-1.38.97-2.08h.01Zm-11.64 2.62c.06-.1.12-.19.17-.28.05.13.09.26.14.39a.398.398 0 0 0-.31-.11Zm2.3 2.98c-.56-1.3-1.25-2.63-1.65-3.99 0 0 .01-.02.02-.02.06.08 1.52 2.93 1.63 3.08.73 1.13 3.38 7.04 5.67 12.26 1.2 2.73 2.08 5.17 2.83 7.18-.62-1.25-1.23-2.51-1.83-3.78-2.31-4.87-4.53-9.78-6.67-14.73ZM275.92 87.03c-1.06-2.18-1.13-3.45-2.44-2.93-1.52.57-2.94 1.3-4.5 2.1-1.4.72-2.68 1.44-3.92 2.12.01-.25-.24-.5-.51-.34-4.8 2.93-12.41 4.7-17.28 1.31-1.98-1.77-3.32-4.15-3.97-5.78-.29-.95-.49-1.94-.63-2.93-.14-3.34 1.58-6.53 3.9-9.12.8-.79 1.68-1.51 2.66-2.12 3.7-2.3 8.22-3.07 12.51-2.51 2.71.35 5.32 1.24 7.71 2.55.39.22.75-.39.35-.6-.18-.1-.37-.18-.55-.27.56.27 1.03.33 1.51.19l-.48.39c-.15.11-.23.3-.13.48.09.15.33.24.48.13 1.3-.97 2.46-2.09 3.45-3.37.37-.29.64-.6.65-.97v-.02c.08-.33-.03-.7-.21-1.08-.31-.87-.98-2.01-2.19-3.26-2.43-2.52-3.79-3.45-5.68-4.26-1.14-.49-3.12-1.06-4.42-1.23-3.28-.42-10.64-1.21-18.18 4.11-7.74 5.46-11.94 12.3-12.23 20.61-.08 2.06.04 3.98.34 5.71.74 4.18 2.57 8 5.44 11.34 4.26 4.99 9.76 7.52 16.34 7.52 4.85 0 9.69-1.77 14.89-4.62.23-.12.45-.23.68-.35 2.19-1.1 4.37-2.23 6.46-3.5.49-.3 1.03-.61 1.5-.98 1.47-.87 1.11-1.12.49-2.95-.39-1.14-.76-2.7-2.06-5.36l.02-.01Zm-17.38-21.76c3.05-.42 6.31.79 9.36 2.35.51.39.94.68 1.33.87-5.61-2.86-12.72-3.39-18.44-.79 2.05-1.33 4.24-1.95 7.74-2.44l.01.01ZM443.67 72.67c-.4-2.2-1.15-4.33-2.37-6.22-1.49-2.32-3.58-4.19-5.91-5.64-6.17-3.81-13.75-5.11-20.83-6.01-3.23-.41-6.47-.69-9.72-.92l-1.39-.12c-.85-.07-1.52-.1-2.05-.1-1.08-.06-2.17-.12-3.25-.17-.08 0-.14.02-.19.05-.1.05-.18.14-.16.3.27 2.55-.01 5.12-.92 7.52-.15.38.4.56.62.28 1.32.59 2.68 1.05 4.08 1.37 0 2.78-.14 7.58-.33 12.91 0 0 0 .02-.01.03-.61 3.66-.79 7.42-1 11.12-.23 4.01-.43 8.03-.44 12.05 0 .64 0 1.28.03 1.93.02.31 0 .68.15.96.06.11.14.16.24.17-.2.17-.21.54.11.59 3.83.67 7.78.71 11.68.25 2.3-.19 4.87-.65 7.65-1.56 1.85-.54 3.67-1.18 5.43-1.91 7.2-3.02 14.31-8.07 17.35-15.53.76-1.86 1.17-3.8 1.31-5.75.3-1.93.28-3.82-.09-5.58l.01-.02Zm-19.32-15.42c5.74 1.41 11.94 3.68 15.65 8.55.25.32.47.65.69.99-2.3-2.82-5.68-5.69-12.88-8.23-2.16-.76-4.35-1.43-6.64-2.02 1.06.21 2.13.45 3.18.71Zm-25.82-3.04c.13 0 .27.01.4.02-.14.1-.26.23-.37.38 0-.13-.02-.26-.03-.4Zm34.82 22.17c-.75 3.09-3.55 5.66-5.88 7.58-3.35 2.76-7.21 5.03-11.28 6.54-1.33.49-2.71.9-4.12 1.15.06-1.38.08-2.76.07-4.13-.02-3.78-.16-7.56-.41-11.33-.09-1.37-.18-2.74-.37-4.1 0-.06-.03-.11-.06-.15.09-3.25.12-6.16.03-8.12 6.86 1.05 10.56 2.17 14.06 3.62 5.52 2.28 8.59 5.44 7.97 8.96l-.01-.02Zm-22 16.15c-.12 0-.23-.02-.34-.03l.34-.03v.06Zm-.69-.7c0-3.13.26-8.84.47-14.51.06 1.2.11 2.41.15 3.6.15 3.6.25 7.23.09 10.83-.24.03-.48.05-.71.07v.01Zm-12.33-30.94c.37.63 2.01 1.01 3.23 1.25v.15c-1.31-.31-2.59-.73-3.83-1.29.12-.36.23-.72.33-1.09.08.48.18.84.27.98Zm13.7 31.65v-.18c3.41-.56 6.71-2.02 9.69-3.68 2.31-1.28 4.59-2.78 6.63-4.53-4.69 4.53-11.61 8.24-16.33 8.38l.01.01Zm24.07-.75c-2.05 1.93-4.37 3.56-6.83 4.95 2.7-1.78 5.52-4.03 8.42-6.87.82-.82 1.56-1.69 2.23-2.59-1.08 1.65-2.38 3.16-3.81 4.51h-.01ZM187.16 92.14c-.79-2.47-2.1-7.12-3.1-6.87-.19-.01-2.09.77-4.08 1.54-3.06 1.18-5.91 2.13-10.09 2.82-2.74.42-5.87 1.01-10.61 1.06.04-3.34.05-6.01.05-7.99 7.97-.65 12.33-2.11 16.37-3.55 1.11-.39 2.69-1.01 2.63-1.8-.08-.35-.55-1.39-1.17-2.61-.47-1.16-.98-2.31-1.61-3.38-.42-.71-1.04-1.69-1.86-2.06-.11-.08-.22-.13-.29-.12-.02 0-.04 0-.07.01-.19-.04-.39-.05-.6-.01-.17.03-.24.15-.25.28-.04.02-.09.04-.14.05-4.33 1.48-8.85 2.33-13.24 3.61a499.1 499.1 0 0 0-.31-8.19c4.51-.99 8.88-1.38 13.11-1.82 3.68-.38 6.28.12 7.47.34.59.11.9.16 1.16.18h.1c-.1.37.44.66.62.28.02-.04.03-.08.05-.13.15.2.53.22.62-.1.17-.58.19-1.21.21-1.81v-.36c.03-.15.05-.3.07-.45.52-2.47.33-5.09-.64-7.44-.11-.27-.44-.28-.6-.14-.08-.21-.15-.42-.24-.62-.19-.41-.79-.05-.6.35.03.07.05.15.09.22-.98-.42-2.15-.54-3.17-.63-2.17-.19-4.37-.14-6.54 0-5.7.35-11.4 1.3-16.91 2.79-2.08.56-4.13 1.22-6.14 2-4.54 1.05-3.79 1.51-2.17 6.07.18.51.46 1.68.54 1.94.82 2.47 1.08 2.13 3.1 2.13s0 .05 0 .08h.52c-.48 2.66-.51 5.45-.62 8.13-.15 3.48-.22 6.96-.28 10.45 0 .41-.01.82-.02 1.23-.16.29-.33.57-.51.85-.05.38-.09.77-.14 1.18-.42 3.52-.59 6.48-.52 8.8v.34c.02.47.05.76.06.87.16 1.57-.26 3.47 1.35 3.79 1.61.32 3.5.55 4.85.55.11 0 .22-.02.33-.02 1.79.24 3.67.05 5.45-.12 2.85-.28 5.69-.7 8.51-1.19 3.03-.53 6.05-1.14 9.04-1.86 2.4-.58 4.82-1.19 7.13-2.06.51-.19 1.73-.57 2.46-1.14 1.81-.68 2.18-1 1.57-2.67-.23-.62-.48-1.49-.91-2.78l-.03-.02Zm-11.12-38.71c.89.05 1.93.08 2.89.3-.33 0-.68-.02-1.06-.03-8.28-.26-14.88.75-23.97 2.51 2.41-.64 4.85-1.16 7.28-1.59 4.87-.86 9.91-1.45 14.86-1.19Zm-26.53 22.13c.03 1.71.04 3.43 0 5.14-.04 1.27-.11 2.55-.24 3.82 0-.73.02-1.46.04-2.19.05-2.26.12-4.51.22-6.77h-.02Zm6.73 27.85c.2-.1.4-.21.58-.33 1.82-.17 3.82-.24 5.94-.34-.86.11-1.72.24-2.58.33-1.27.14-2.61.31-3.93.34h-.01ZM534.48 85.44c-3.52-8.38-7.07-16.75-10.5-25.17-.63-1.54-1.25-3.09-1.86-4.65-.31-.8-.65-1.6-.87-2.43-.04-.17-.17-.24-.31-.25.1-.2 0-.51-.29-.53-1.59-.08-3.18-.22-4.78-.25-1.96-.03-3.91.13-5.84.42-.31.05-.31.38-.13.56-.03.06-.05.14-.04.22.23 1.54.63 3.06 1.16 4.53.13.35.27.7.41 1.06l-2.68 6.18c-.11.03-.2.09-.25.22-.67 1.9-1.52 3.73-2.34 5.56a536.85 536.85 0 0 1-3.9 8.45c-2.64 5.64-5.34 11.25-7.91 16.93-.44.97-.88 1.94-1.29 2.93-.2.48-.47 1-.55 1.52v.05c-.02.12.02.26.16.34 1.19.73 2.41 1.41 3.66 2.05 1.2.62 2.45 1.25 3.76 1.61.43.12.62-.55.19-.67-1.13-.31-2.2-.83-3.24-1.36 1.09.36 2.1.69 2.75.93 2.82 1.01 2.38 1.1 4.3-3.75 2.1-1.09 4.34-1.96 6.53-2.79 4.35-1.64 8.8-3.03 13.27-4.29.82 2.01 1.77 3.97 2.72 5.92.35.83.62 1.45.79 1.82.22.42.45.8.69 1.15.17.33.33.67.5 1 .42.8.84 1.63 1.4 2.35.23.29.6 0 .55-.31 1.53-.02 3.06-.07 4.58-.27.92-.12 1.82-.32 2.71-.54 1.39-.27 3.85-1.11 3.74-1.42-.67-1.96-1.55-3.87-2.34-5.78-1.57-3.78-3.16-7.56-4.75-11.33v-.01Zm-11.65-26.16c1.54 3.81 3.12 7.6 4.7 11.4 2.94 7.05 5.91 14.09 8.87 21.13l-1.06-2.17c-2.71-5.51-5.2-11.19-7.41-16.87l-6.65-17.15c-.65-1.45-.55-2.19-.93-2.53.09 0 .18.01.28.02a.29.29 0 0 0-.04.26c.52 2.02 1.47 3.98 2.25 5.91h-.01Zm-6.58 13.58c.05-.15.09-.31.14-.46 1.41 3.92 2.88 7.9 4.39 11.87-3.22.52-6.38 1.25-9.46 2.14.55-1.22 1.05-2.46 1.53-3.7 1.24-3.24 2.37-6.53 3.39-9.85h.01Zm-.23-20c.36 0 .73.03 1.09.05-2.15.1-5.18.33-5.87.74-.24.15-.41.3-.53.45-.06-.29-.13-.58-.18-.88 1.82-.26 3.65-.39 5.49-.35v-.01Zm-.09 18.72c-.49 1.67-1.05 3.33-1.6 4.97-1.07 3.19-2.19 6.38-3.57 9.46-.09.21-.19.43-.29.65-.25.07-.5.14-.74.22 2.53-6.16 4.61-11.29 6.2-15.3Zm-6.34 25.16c4.97-2.38 9.37-4.1 14.02-5.27l.26.64c-4.8 1.35-9.63 2.8-14.28 4.63Zm20.17 6.76c.33.23.68.42 1.04.56h-.33c-.12 0-.21.06-.26.13-.15-.23-.31-.45-.45-.7v.01ZM226.57 91.75c-3.55-4.74-6.68-9.11-9.31-12.99 9.2-15.25 10.05-17.81 10.35-18.38.17-.34 1.09-2.27.64-2.53-1.13-.65-1.03-.65-2.97-1.71-1.19-.65-3.04-1.61-4.53-2.12-1.71-.59-1.24-.36-3 2.77-.06.1-.11.2-.17.3-.75 1.02-1.48 2.05-2.2 3.09-1.88 2.71-3.73 5.45-5.69 8.1-3.68-4.91-6.88-8.76-9.51-11.43-.15-.15-.3-.29-.46-.42-1.27-1.28-7.24 3.53-7.93 5.58-.09.09-.19.16-.28.25-.27.26.03.64.33.58.19.65.5 1.29.94 1.91 3.85 5.06 7.19 9.76 9.94 14-1.23 2.61-3.06 5-4.67 7.38l-2.28 3.33c-.5.66-.93 1.23-1.29 1.69-.67.93-2.09 2.61-2.3 3.87-.51.85-1.16 1.84-1.29 2.83-.06.44.61.63.67.19.01-.08.04-.15.06-.22 1.36 1.08 2.76 2.11 4.19 3.11 1.3.91 2.62 1.85 4.04 2.56.21.1.4 0 .48-.17.24.07.48.14.72.2.44.1.62-.57.19-.67-2.02-.48-3.77-1.57-5.23-3.02-.47-.46-.9-.96-1.32-1.46 1.74 1.35 4.2 2.89 5.89 4.14 1.39 1.03 2.85-2.27 4.22-4.2 1.86-2.64 3.96-5.86 5.52-8.29l10.39 14.51c.67.81 1.14 1.21 1.57 1.36-.05.24.12.51.41.4 1.53-.58 3.05-1.19 4.54-1.87 1.52-.69 3.06-1.45 4.36-2.5a.28.28 0 0 0 .12-.23c1.66-1.1.81-1.74-1.41-4.91-1.13-1.58-1.71-2.36-3.7-5.01l-.03-.02Zm2.41 6.54c.56 1.15 1.19 2.52 1.11 3.81-.06.04-.12.07-.17.1-.03-.88-.55-2.66-.94-3.91Zm-16.51-32.73c1.86-2.65 3.65-5.35 5.57-7.95.4-.55.81-1.13 1.26-1.66.19-.18.38-.33.56-.45.18.03.36.08.55.13l-8.05 10.11.12-.18h-.01ZM192.7 95.48c.79-1.37 1.66-2.69 2.54-4 1.19-1.79 2.4-3.56 3.61-5.33-.04.09-.09.17-.13.26-.1.22.03.41.2.49-2.47 3.42-4.89 6.73-6.4 9.28.21.24.4.48.63.75-.24.07-.4.36-.17.56.4.33.72.77 1.05 1.17.09.11.18.21.27.32-.84-.61-1.66-1.24-2.47-1.88.24-.57.58-1.11.87-1.61v-.01Zm7.46-10.32c.47-.81.98-1.59 1.49-2.37.31-.48.64-.95.96-1.43.26-.29.52-.56.75-.79-.99 1.48-2.09 3.03-3.2 4.59Zm10.03-16.22s-.03-.05-.05-.07c.22-.29.43-.59.64-.89-.2.32-.4.65-.58.96h-.01ZM371.54 87.96c-.01-.08-.01-.16-.03-.23-.06-.38-.58-.29-.66.03-.3-.05-.6-.08-.81-.11-1.14-.15-2.29-.19-3.44-.2 1.04-.09 2.09-.18 3.14-.23.45-.02.45-.72 0-.7-6.57.35-13.14 1.23-19.65 2.11-1.53.21-3.05.42-4.57.68-.01 0-.02.01-.04.01-.04-3.33-.13-6.66-.24-9.99-.19-5.7-.4-11.41-.88-17.1-.13-1.51-.23-3.07-.49-4.58 0-.25 0-.48-.02-.68-.06-1.19-.04-2.61-.68-2.78-.16-.07-.72-.16-1.5-.24.22-.17.16-.62-.2-.63-1.19-.04-2.39.09-3.57.23-1.2.14-2.41.32-3.59.6-.16-.1-.41-.06-.5.12-.06.02-.13.03-.19.05-.35.1-.29.55-.03.66-.26.6-.19 2.27-.21 3-.02.66-.66 33.73-.9 40.3-.03.65.06 1.12.04 1.45-.16 3.05.87 4.96 6.34 3.93 1.09-.08 2.75-.77 5.36-1.43 4.13-1.04 5.78-1.52 6.2-1.65 6.43-1.69 6.78-1.97 11.72-2.43.55-.05 4.8-.38 6.03-.3.64.04 1.19.07 1.65.1.09 0 .16-.03.24-.05.1.27.56.33.66-.02.39-1.32.61-2.71.78-4.08.2-1.61.29-3.24.15-4.86.24.03.52-.23.38-.53-.09-.2-.27-.33-.49-.43v-.02Zm-.63.56c.07.57.11 1.14.11 1.71-.21-.99-.53-1.71-.95-1.87.22.03.44.06.65.11.06.01.12.04.19.05Zm-25.41 1.73c1.54-.36 3.1-.64 4.66-.89-1.61.37-3.18.77-4.66 1.2v-.31Zm-.86-7.37c-.07-1.37-.16-2.75-.25-4.12-.21-3.13-.45-6.27-.79-9.4.02-2.25.08-4.31.13-6.11.16 2.08.29 4.16.4 6.24.23 4.46.38 8.93.5 13.39h.01Zm-.94-4c.16 2.41.29 4.83.39 7.24.06 1.6.14 3.22.09 4.83-.15.05-.32.09-.47.14V78.88h-.01ZM483.72 92.83c-3.05-2.28-6.22-4.4-9.38-6.51 8.86-6.49 13.49-12.95 13.73-19.23.04-.76 0-1.5-.13-2.2-.67-3.82-3.5-6.68-8.39-8.48.13.04.27.08.4.13 3.92 1.39 7.74 4.23 8.5 8.56.34 1.95-.05 3.96-.98 5.69-.21.4.39.75.6.35 1.86-3.46 1.46-7.55-.97-10.63-3.53-4.47-9.76-5.88-15.16-6.16-2.32-.12-4.64-.04-6.95.19-6 .32-12.71 1.68-17.63 3.21-.37.11-.67.23-.92.35-.2-.17-.62.02-.57.37v.03c-.64.68-.18 1.64.48 3.21.38.91.67 1.89 1.15 2.58.32.76.68 1.51 1.13 2.19.14.21.38.19.53.07.19-.02.38-.05.57-.08v1.57c-.06.06-.1.13-.11.23-.27 4.18-.34 8.38-.48 12.57l-.3 9.03c-.24 3.91-.44 6.77-.46 7.26-.05.88-.11 1.95.07 2.81-.01.22-.02.43-.04.65 0 .11-.02.23-.03.35 0 .05-.03.27-.01.16-.05.4.5.59.64.28.05.04.12.08.2.08 1.75.13 3.5.28 5.25.3 1.69.02 3.38-.12 5.06-.32.08.23.36.39.55.15.06-.08.11-.17.16-.26.18-.09.24-.32.18-.48.05-.2.1-.4.13-.6.16-.86.25-1.74.33-2.62.11-1.17.17-2.34.23-3.51.15-.01.32-.03.52-.04.36-.03 1.73-.15 2.06-.15.39 0 .7-.02.95-.04 1.76 1.11 3.45 2.35 5.14 3.55 2.83 2.01 5.64 4.04 8.47 6.04 1.42 1 2.85 2 4.29 2.97.1.06.19.07.27.04.08 0 .17-.02.25-.1 1.61-1.56 3.15-3.18 4.6-4.88.75-.88 1.49-1.78 2.15-2.73.01.01.03.02.04.03.34.3.83-.2.49-.49-2.16-1.9-4.34-3.76-6.64-5.48l.03-.01Zm-6.38-3.65a55.72 55.72 0 0 0-4-2.13c.14-.1.26-.19.4-.29 1.2.81 2.4 1.61 3.6 2.42Zm-20.1 11.78c.67-.37 1.23-.91 1.67-1.6-.11.5-.24 1-.38 1.49-.43.04-.86.08-1.29.11Zm2.38-37.24c1.34-.31 2.56-.52 3.71-.69-1.03.19-2.04.41-3.04.65-.14-.07-.34-.02-.45.11-.07.02-.15.04-.22.05v-.13.01Zm.04.84c.07-.02.14-.03.2-.05.34 1.66.41 3.41.5 5.09.17 2.9.24 5.81.28 8.71l.03 3.17c-.17.07-.34.14-.51.2-.06-4.96-.21-10.58-.51-17.12h.01Zm16.04 5.62c-1.16 2.25-3.06 4.1-5.02 5.66-2.8 2.23-5.99 3.97-9.3 5.35-.01-3.56-.09-7.12-.27-10.67-.1-2.04-.16-4.16-.57-6.18 3.3-.78 6.72-1.36 10.1-1.1 1.85.14 4.23.59 5.32 2.29.92 1.43.46 3.24-.26 4.65Zm.85-.18c.6-1.37.9-2.92.28-4.32-.67-1.52-2.2-2.32-3.76-2.74.46.1.89.21 1.29.37 1.74.67 2.69 1.88 2.93 3.21.2 1.13-.05 2.25-.74 3.47V70Zm-27.47-4.14c-.12-.19-.23-.38-.34-.57.74.42.85.36.99.41v.08c-.22.03-.43.06-.65.08Zm11.21 30.46c-.08 1.08-.16 2.17-.33 3.24-.05.35-.11.69-.2 1.03 0 .04-.02.07-.03.11-.15.02-.3.04-.45.05.45-1.64.76-3.36.79-5.07.03-.29.08-.57.1-.89-.03-.31-.03-.47.24-.57-.04.69-.07 1.39-.12 2.08v.02Zm5.6-2.47c.48.11.92.52 2.49 1.72-.46-.32-.92-.65-1.38-.97-.37-.25-.73-.5-1.1-.75h-.01Zm21.23 7.24a70.76 70.76 0 0 1-4.37 4.63c-.14-.09-.27-.19-.4-.28.19-.09.37-.24.55-.47.87-1.14 5.43-5.51 5.49-7.45.31.26.62.53.92.79-.67.97-1.42 1.88-2.19 2.77v.01Z",fill:"currentColor",transform:"translate(-144.023 -51.76)"})]}),i6=({style:t,size:e="small",withText:o})=>(0,Wo.jsxs)("div",{className:`ExcalidrawLogo is-${e}`,style:t,children:[(0,Wo.jsx)(EI,{}),o&&(0,Wo.jsx)(wI,{})]});var He=v(k(),1),Bg=({icon:t,shortcut:e,children:o})=>{let r=Me();return(0,He.jsxs)(He.Fragment,{children:[(0,He.jsx)("div",{className:"welcome-screen-menu-item__icon",children:t}),(0,He.jsx)("div",{className:"welcome-screen-menu-item__text",children:o}),e&&!r.editor.isMobile&&(0,He.jsx)("div",{className:"welcome-screen-menu-item__shortcut",children:e})]})};Bg.displayName="WelcomeScreenMenuItemContent";var $s=({onSelect:t,children:e,icon:o,shortcut:r,className:n="",...i})=>(0,He.jsx)("button",{...i,type:"button",className:`welcome-screen-menu-item ${n}`,onClick:t,children:(0,He.jsx)(Bg,{icon:o,shortcut:r,children:e})});$s.displayName="WelcomeScreenMenuItem";var a6=({children:t,href:e,icon:o,shortcut:r,className:n="",...i})=>(0,He.jsx)("a",{...i,className:`welcome-screen-menu-item ${n}`,href:e,target:"_blank",rel:"noreferrer",children:(0,He.jsx)(Bg,{icon:o,shortcut:r,children:t})});a6.displayName="WelcomeScreenMenuItemLink";var Go=({children:t})=>{let{WelcomeScreenCenterTunnel:e}=Ge();return(0,He.jsx)(e.In,{children:(0,He.jsx)("div",{className:"welcome-screen-center",children:t||(0,He.jsxs)(He.Fragment,{children:[(0,He.jsx)(zg,{}),(0,He.jsx)(Hg,{children:g("welcomeScreen.defaults.center_heading")}),(0,He.jsxs)($g,{children:[(0,He.jsx)(Wg,{}),(0,He.jsx)(Ug,{})]})]})})})};Go.displayName="Center";var zg=({children:t})=>(0,He.jsx)("div",{className:"welcome-screen-center__logo virgil welcome-screen-decor",children:t||(0,He.jsx)(i6,{withText:!0})});zg.displayName="Logo";var Hg=({children:t})=>(0,He.jsx)("div",{className:"welcome-screen-center__heading welcome-screen-decor virgil",children:t});Hg.displayName="Heading";var $g=({children:t})=>(0,He.jsx)("div",{className:"welcome-screen-menu",children:t});$g.displayName="Menu";var Ug=()=>{let t=St();return(0,He.jsx)($s,{onSelect:()=>t.executeAction(fi),shortcut:"?",icon:la,children:g("helpDialog.title")})};Ug.displayName="MenuItemHelp";var Wg=()=>{let t=_e(),e=St();return t.viewModeEnabled?null:(0,He.jsx)($s,{onSelect:()=>e.executeAction(Pa),shortcut:Et("loadScene"),icon:sa,children:g("buttons.load")})};Wg.displayName="MenuItemLoadScene";var l6=({onSelect:t})=>{let{t:e}=xt();return(0,He.jsx)($s,{shortcut:null,onSelect:t,icon:cd,children:e("labels.liveCollaboration")})};l6.displayName="MenuItemLiveCollaborationTrigger";Go.Logo=zg;Go.Heading=Hg;Go.Menu=$g;Go.MenuItem=$s;Go.MenuItemLink=a6;Go.MenuItemHelp=Ug;Go.MenuItemLoadScene=Wg;Go.MenuItemLiveCollaborationTrigger=l6;h();var lr=v(k(),1),yu=({children:t})=>{let{WelcomeScreenMenuHintTunnel:e}=Ge();return(0,lr.jsx)(e.In,{children:(0,lr.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--menu",children:[J0,(0,lr.jsx)("div",{className:"welcome-screen-decor-hint__label",children:t||g("welcomeScreen.defaults.menuHint")})]})})};yu.displayName="MenuHint";var Eu=({children:t})=>{let{WelcomeScreenToolbarHintTunnel:e}=Ge();return(0,lr.jsx)(e.In,{children:(0,lr.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--toolbar",children:[(0,lr.jsx)("div",{className:"welcome-screen-decor-hint__label",children:t||g("welcomeScreen.defaults.toolbarHint")}),ex]})})};Eu.displayName="ToolbarHint";var wu=({children:t})=>{let{WelcomeScreenHelpHintTunnel:e}=Ge();return(0,lr.jsx)(e.In,{children:(0,lr.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--help",children:[(0,lr.jsx)("div",{children:t||g("welcomeScreen.defaults.helpHint")}),Q0]})})};wu.displayName="HelpHint";var sr=v(k(),1),Cu=t=>(0,sr.jsx)(sr.Fragment,{children:t.children||(0,sr.jsxs)(sr.Fragment,{children:[(0,sr.jsx)(Go,{}),(0,sr.jsx)(yu,{}),(0,sr.jsx)(Eu,{}),(0,sr.jsx)(wu,{})]})});Cu.displayName="WelcomeScreen";Cu.Center=Go;Cu.Hints={MenuHint:yu,ToolbarHint:Eu,HelpHint:wu};var CI=Cu;h();var Tu=v(k(),1),s6=({isCollaborating:t,onSelect:e,...o})=>{let r=_e(),n=r.width<830;return(0,Tu.jsxs)(wr,{...o,className:z("collab-button",{active:t}),type:"button",onSelect:e,style:{position:"relative",width:n?void 0:"auto"},title:g("labels.liveCollaboration"),children:[n?Cx:g("labels.share"),r.collaborators.size>0&&(0,Tu.jsx)("div",{className:"CollabButton-collaborators",children:r.collaborators.size})]})},TI=s6;s6.displayName="LiveCollaborationTrigger";h();var Us=v(k(),1),c6=({children:t,icon:e})=>{let{TTDDialogTriggerTunnel:o}=Ge(),r=Ae();return(0,Us.jsx)(o.In,{children:(0,Us.jsxs)(Pe.Item,{onSelect:()=>{ge("ai","dialog open","ttd"),r({openDialog:{name:"ttd",tab:"text-to-diagram"}})},icon:e??pv,children:[t??g("labels.textToDiagram"),(0,Us.jsx)(Pe.Item.Badge,{children:"AI"})]})})};c6.displayName="TTDDialogTrigger";var Su=v(k(),1);r6();var SI=t=>{let{onChange:e,initialData:o,excalidrawAPI:r,isCollaborating:n=!1,onPointerUpdate:i,renderTopRightUI:a,langCode:l=fr.code,viewModeEnabled:s,zenModeEnabled:c,gridModeEnabled:d,libraryReturnUrl:m,theme:p,name:f,renderCustomStats:b,onPaste:x,detectScroll:y=!0,handleKeyboardGlobally:S=!1,onLibraryChange:C,autoFocus:w=!1,generateIdForFile:M,onLinkOpen:B,onPointerDown:I,onPointerUp:_,onScrollChange:A,children:U,validateEmbeddable:R,renderEmbeddable:W,aiEnabled:O}=t,F=t.UIOptions?.canvasActions,ee={...t.UIOptions,canvasActions:{...Ru.canvasActions,...F},tools:{image:t.UIOptions?.tools?.image??!0}};return F?.export&&(ee.canvasActions.export.saveFileToDisk=F.export?.saveFileToDisk??Ru.canvasActions.export.saveFileToDisk),ee.canvasActions.toggleTheme===null&&typeof p>"u"&&(ee.canvasActions.toggleTheme=!0),(0,ku.useEffect)(()=>{(async()=>{await import("./excalidraw-assets/roundRect-2ACQK4DA.js")})();let be=ke=>{typeof ke.scale=="number"&&ke.scale!==1&&ke.preventDefault()};return document.addEventListener("touchmove",be,{passive:!1}),()=>{document.removeEventListener("touchmove",be)}},[]),(0,Su.jsx)(jc,{unstable_createStore:()=>Wt,scope:Re,children:(0,Su.jsx)(V0,{langCode:l,theme:p,children:(0,Su.jsx)(o6,{onChange:e,initialData:o,excalidrawAPI:r,isCollaborating:n,onPointerUpdate:i,renderTopRightUI:a,langCode:l,viewModeEnabled:s,zenModeEnabled:c,gridModeEnabled:d,libraryReturnUrl:m,theme:p,name:f,renderCustomStats:b,UIOptions:ee,onPaste:x,detectScroll:y,handleKeyboardGlobally:S,onLibraryChange:C,autoFocus:w,generateIdForFile:M,onLinkOpen:B,onPointerDown:I,onPointerUp:_,onScrollChange:A,validateEmbeddable:R,renderEmbeddable:W,aiEnabled:O!==!1,children:U})})})},kI=(t,e)=>{if(t.children!==e.children)return!1;let{initialData:o,UIOptions:r={},...n}=t,{initialData:i,UIOptions:a={},...l}=e,s=Object.keys(r),c=Object.keys(a);return s.length!==c.length?!1:s.every(m=>m==="canvasActions"?Object.keys(r.canvasActions).every(f=>f==="export"&&r?.canvasActions?.export&&a?.canvasActions?.export?r.canvasActions.export.saveFileToDisk===a.canvasActions.export.saveFileToDisk:r?.canvasActions?.[f]===a?.canvasActions?.[f]):r[m]===a[m])&&Rt(n,l)},II=ku.default.memo(SI,kI);II.displayName="Excalidraw";export{wr as Button,_u as DEFAULT_LASER_COLOR,Jm as DefaultSidebar,II as Excalidraw,ll as FONT_FAMILY,yI as Footer,TI as LiveCollaborationTrigger,Pt as MIME_TYPES,ao as MainMenu,Eo as ROUNDNESS,Jr as Sidebar,he as THEME,fg as TTDDialog,c6 as TTDDialogTrigger,CI as WelcomeScreen,up as bumpVersion,Is as convertToExcalidrawElements,fr as defaultLang,E6 as elementPartiallyOverlapsWithOrContainsBBox,w6 as elementsOverlappingBBox,cp as exportToBlob,Jn as exportToCanvas,v6 as exportToClipboard,Rl as exportToSvg,Ye as getCommonBounds,C6 as getFreeDrawSvgPath,sm as getLibraryItemsHash,ve as getNonDeletedElements,T6 as getSceneVersion,b6 as getVisibleSceneBounds,xp as hashElementsVersion,vp as hashString,y6 as isElementInsideBBox,Qn as isInvisiblySmallElement,Ne as isLinearElement,ra as languages,Ac as loadFromBlob,op as loadLibraryFromBlob,tp as loadSceneOrLibraryFromBlob,AE as mergeLibraryItems,oe as mutateElement,me as newElementWith,Br as normalizeLink,bh as parseLibraryTokensFromUrl,ep as restore,x6 as restoreAppState,Qu as restoreElements,_l as restoreLibraryItems,Jt as sceneCoordsToViewportCoords,np as serializeAsJSON,ap as serializeLibraryAsJSON,Me as useDevice,pT as useHandleLibrary,xt as useI18n,Ke as viewportCoordsToSceneCoords,Ky as zoomToFitBounds};
|
|
169
169
|
/*! Bundled license information:
|
|
170
170
|
|
|
171
171
|
react/cjs/react-jsx-runtime.production.min.js:
|