@myoc/excalidraw 0.19.0 → 0.19.1

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.
@@ -1,8 +1,8 @@
1
- import{$ as xf,$a as Hm,$b as Qa,$c as On,$d as Wr,$e as Vr,$f as hp,$g as O0,A as pf,Aa as Ka,Ab as xi,Ac as Er,Ad as I1,Ae as qs,Af as r0,Ag as M0,Ah as Ec,B as Lm,Ba as br,Bb as Oo,Bc as Re,Bd as Ti,Be as we,Bf as n0,Bg as L0,Bh as Z0,C as ye,Ca as Pt,Cb as Uf,Cc as Bt,Cd as rl,Ce as Js,Cf as i0,Cg as O3,Ch as Ap,D as Qo,Da as Ms,Db as Gf,Dc as Nn,Dd as Ws,De as H1,Df as ic,Dg as yp,Dh as Vn,E as Ln,Ea as Je,Eb as Pn,Ec as wi,Ed as qm,Ee as rp,Ef as or,Eg as vp,Eh as X0,F as Ga,Fa as Ls,Fb as Ie,Fc as V,Fd as Jm,Fe as U1,Ff as Zr,Fg as ge,Fh as _p,G as Ot,Ga as Lf,Gb as D,Gc as Hs,Gd as ki,Ge as Ho,Gf as sl,Gg as wp,Gh as $0,H as mt,Ha as Za,Hb as Be,Hc as ce,Hd as Ys,He as G1,Hf as a0,Hg as _0,Hh as j0,I as re,Ia as Kt,Ib as ht,Ic as $m,Id as S1,Ie as W1,If as l0,Ig as Yn,Ih as yc,J as _t,Ja as ut,Jb as Ja,Jc as he,Jd as M1,Je as Li,Jf as s0,Jg as rr,Jh as Pp,K as fr,Ka as Af,Kb as Ps,Kc as je,Kd as Ii,Ke as Y1,Kf as pp,Kg as P0,Kh as q0,L as Rr,La as _f,Lb as Ds,Lc as Ae,Ld as L1,Le as Hn,Lf as ac,Lg as Bi,Lh as J0,M as ys,Ma as Ro,Mb as Wf,Mc as se,Md as Vs,Me as V1,Mf as lc,Mg as D0,Mh as Q0,N as Am,Na as Pf,Nb as xr,Nc as n1,Nd as zo,Ne as Ai,Nf as sc,Ng as Tp,Nh as eb,O as vs,Oa as le,Ob as Yf,Oc as i1,Od as ee,Oe as Qs,Of as Gn,Og as $r,P as _m,Pa as w,Pb as Vf,Pc as yr,Pd as wr,Pe as K1,Pf as c0,Pg as zi,Q as Wa,Qa as hi,Qb as Kf,Qc as a1,Qd as A1,Qe as ec,Qf as Xt,Qg as $t,R as uf,Ra as An,Rb as Zf,Rc as l1,Rd as Ur,Re as yo,Rf as up,Rg as Go,S as hf,Sa as Fm,Sb as j,Sc as vr,Sd as Ks,Se as np,Sf as d0,Sg as Fi,T as Pm,Ta as gi,Tb as Xf,Tc as s1,Td as Qm,Te as ip,Tf as Di,Tg as pc,U as Ya,Ua as As,Ub as tr,Uc as Us,Ud as nl,Ue as Z1,Uf as cl,Ug as kp,V as pe,Va as bt,Vb as Mt,Vc as gt,Vd as Zs,Ve as tc,Vf as zt,Vg as dl,W as gf,Wa as bo,Wb as $f,Wc as tt,Wd as _1,We as oc,Wf as m0,Wg as uc,X as ws,Xa as Df,Xb as Rs,Xc as c1,Xd as Si,Xe as X1,Xf as p0,Xg as Ip,Y as Nr,Ya as Rf,Yb as Ei,Yc as Fr,Yd as P1,Ye as $1,Yf as wo,Yg as Sp,Z as ff,Za as fi,Zb as jf,Zc as d1,Zd as il,Ze as j1,Zf as Xr,Zg as R0,_ as bf,_a as bi,_b as Br,_c as m1,_d as Gr,_e as N3,_f as cc,_g as N0,a as gs,aa as Ef,ab as _s,ac as ot,ad as jm,ae as ep,af as al,ag as Wn,ah as hc,b as Qg,ba as yf,bb as Um,bc as zr,bd as p1,be as Xs,bf as ap,bg as u0,bh as ml,c as Sn,ca as pi,cb as Gm,cc as yi,cd as u1,ce as tp,cf as lp,cg as Ri,ch as gc,d as ef,da as Dm,db as Nf,dc as Ns,dd as tl,de as $,df as sp,dg as gp,dh as fc,e as tf,ea as Rm,eb as Wm,ec as qf,ed as h1,ee as P3,ef as cp,eg as h0,eh as B0,f as of,fa as vf,fb as L,fc as Jf,fd as g1,fe as D3,ff as _i,fg as g0,fh as z0,g as go,ga as wf,gb as Ym,gc as Zt,gd as Et,ge as R3,gf as vo,gg as f0,gh as pl,h as fs,ha as Cs,hb as De,hc as vi,hd as f1,he as D1,hf as rc,hg as b0,hh as F0,i as bs,ia as Ts,ib as Or,ic as ze,id as b1,ie as rt,if as nt,ig as x0,ih as H0,j as xs,ja as Nm,jb as Xa,jc as Qf,jd as x1,je as $s,jf as q1,jg as fp,jh as U0,k as rf,ka as Cf,kb as Of,kc as e1,kd as Bn,ke as Fo,kf as J1,kg as E0,kh as bc,l as nf,la as Tf,lb as Bf,lc as Os,ld as E1,le as zn,lf as xe,lg as y0,lh as Hi,m as af,ma as kf,mb as ao,mc as Zm,md as y1,me as R1,mf as nc,mg as v0,mh as G0,n as lf,na as If,nb as $a,nc as Bs,nd as _3,ne as Mi,nf as so,ng as w0,nh as Mp,o as Do,oa as ks,ob as ja,oc as Dn,od as v1,oe as Fe,of as dp,og as Ni,oh as B3,p as Es,pa as ui,pb as zf,pc as lo,pd as Ci,pe as N1,pf as Kr,pg as C0,ph as Ui,q as fo,qa as Sf,qb as xt,qc as Bo,qd as Ke,qe as O1,qf as ll,qg as dc,qh as ul,r as sf,ra as Om,rb as Vm,rc as zs,rd as w1,re as B1,rf as Pi,rg as T0,s as cf,sa as Bm,sb as No,sc as Fs,sd as Hr,se as Fn,sf as mp,sg as k0,sh as W0,t as df,ta as Mf,tb as Ff,tc as xo,td as ol,te as js,tf as Q1,tg as mc,u as Fa,ua as Is,ub as Km,uc as Xm,ud as me,ue as Yr,uf as e0,ug as bp,uh as Y0,v as Ha,va as zm,vb as Hf,vc as t1,vd as Eo,ve as z1,vf as Un,vg as xp,vh as V0,w as Mn,wa as Vt,wb as er,wc as Rn,wd as Gs,we as F1,wf as Uo,wg as Ep,wh as xc,x as Ua,xa as Va,xb as _n,xc as o1,xd as C1,xe as op,xf as A,xg as Oi,xh as K0,y as mf,ya as pt,yb as Qe,yc as el,yd as T1,ye as _e,yf as t0,yg as I0,yh as hl,z as Mm,za as Ss,zb as qa,zc as r1,zd as k1,ze as q,zf as o0,zg as S0,zh as Lp}from"./chunk-2BFGJABV.js";import{a as k}from"./chunk-PPT7KBS3.js";import{J as Cp}from"./chunk-KZXLT4YB.js";import{c as A0}from"./chunk-Z3N5DIM6.js";import{b as qg,c as Jg,d as T}from"./chunk-SRAX5OIU.js";import z7,{useEffect as F7}from"react";import m3 from"clsx";import u7 from"lodash.throttle";import gr,{useContext as Tn}from"react";import{flushSync as Pr}from"react-dom";import h7 from"roughjs/bin/rough";import{nanoid as g7}from"nanoid";var vc=class{constructor(o=0){T(this,"root");T(this,"gap");this.root=null,this.gap=o}fit(o){let t=o.length,r=t>0?o[0].w:0,n=t>0?o[0].h:0;this.root={x:0,y:0,w:r,h:n};for(let i=0;i<t;i++){let a=o[i],l=this.findNode(this.root,a.w,a.h);l?a.fit=this.splitNode(l,a.w,a.h):a.fit=this.growNode(a.w,a.h)}}findNode(o,t,r){return o?o.used?this.findNode(o.right||null,t,r)||this.findNode(o.down||null,t,r):t<=o.w&&r<=o.h?o:null:null}splitNode(o,t,r){return o.used=!0,o.down={x:o.x,y:o.y+r+this.gap,w:o.w,h:o.h-r-this.gap},o.right={x:o.x+t+this.gap,y:o.y,w:o.w-t-this.gap,h:r},o}growNode(o,t){if(!this.root)return null;let r=o<=this.root.w,n=t<=this.root.h,i=n&&this.root.h>=this.root.w+o+this.gap,a=r&&this.root.w>=this.root.h+t+this.gap;return i?this.growRight(o,t):a?this.growDown(o,t):n?this.growRight(o,t):r?this.growDown(o,t):null}growRight(o,t){if(!this.root)return null;this.root={used:!0,x:0,y:0,w:this.root.w+o+this.gap,h:this.root.h,down:this.root,right:{x:this.root.w+this.gap,y:0,w:o,h:this.root.h}};let r=this.findNode(this.root,o,t);return r?this.splitNode(r,o,t):null}growDown(o,t){if(!this.root)return null;this.root={used:!0,x:0,y:0,w:this.root.w,h:this.root.h+t+this.gap,down:{x:0,y:this.root.h+this.gap,w:this.root.w,h:t},right:this.root};let r=this.findNode(this.root,o,t);return r?this.splitNode(r,o,t):null}};var z3=(e,o,t)=>{let r=so(o),n=t.x-r.minX,i=t.y-r.minY;o.forEach(a=>{e.mutateElement(a,{x:a.x+n,y:a.y+i})})},tb=(e,o,t)=>{let r=o.flatMap(c=>c.group),n=so(r),i={x:n.minX,y:n.minY},a=o.sort((c,m)=>Math.max(m.boundingBox.width,m.boundingBox.height)-Math.max(c.boundingBox.width,c.boundingBox.height)).map(c=>({w:c.boundingBox.width,h:c.boundingBox.height,group:c.group}));new vc(t).fit(a);let s=[];for(let c=0;c<a.length;c++){let m=a[c];m.fit&&s.push(m)}return s.forEach(c=>{z3(e,c.group,{x:i.x+(c.fit?.x??0),y:i.y+(c.fit?.y??0)})}),s.flatMap(c=>c.group)},gl=(e,o,t,r,n)=>{let a=Fn(o,t).map(l=>({group:l,boundingBox:so(l)}));switch(r){case"bin-packing":return tb(e,a,n);default:return console.warn(`Unimplemented algorithm [${r}] - using bin-packing`),tb(e,a,n)}};import{atom as Ne,createStore as F3}from"jotai";import{createIsolation as H3}from"jotai-scope";var ob=H3();var{useAtom:ve,useSetAtom:Gi,useAtomValue:wc,useStore:Q7}=ob,rb=ob.Provider,yt=F3();var U3=qg({"./locales/ar-SA.json":()=>import("./locales/ar-SA-G6X2FPQ2.js"),"./locales/az-AZ.json":()=>import("./locales/az-AZ-76LH7QW2.js"),"./locales/bg-BG.json":()=>import("./locales/bg-BG-XCXSNQG7.js"),"./locales/bn-BD.json":()=>import("./locales/bn-BD-2XOGV67Q.js"),"./locales/ca-ES.json":()=>import("./locales/ca-ES-6MX7JW3Y.js"),"./locales/cs-CZ.json":()=>import("./locales/cs-CZ-2BRQDIVT.js"),"./locales/da-DK.json":()=>import("./locales/da-DK-5WZEPLOC.js"),"./locales/de-DE.json":()=>import("./locales/de-DE-XR44H4JA.js"),"./locales/el-GR.json":()=>import("./locales/el-GR-BZB4AONW.js"),"./locales/en.json":()=>import("./locales/en-XFR6MADM.js"),"./locales/es-ES.json":()=>import("./locales/es-ES-U4NZUMDT.js"),"./locales/eu-ES.json":()=>import("./locales/eu-ES-A7QVB2H4.js"),"./locales/fa-IR.json":()=>import("./locales/fa-IR-HGAKTJCU.js"),"./locales/fi-FI.json":()=>import("./locales/fi-FI-Z5N7JZ37.js"),"./locales/fr-FR.json":()=>import("./locales/fr-FR-RHASNOE6.js"),"./locales/gl-ES.json":()=>import("./locales/gl-ES-HMX3MZ6V.js"),"./locales/he-IL.json":()=>import("./locales/he-IL-6SHJWFNN.js"),"./locales/hi-IN.json":()=>import("./locales/hi-IN-IWLTKZ5I.js"),"./locales/hu-HU.json":()=>import("./locales/hu-HU-A5ZG7DT2.js"),"./locales/id-ID.json":()=>import("./locales/id-ID-SAP4L64H.js"),"./locales/it-IT.json":()=>import("./locales/it-IT-JPQ66NNP.js"),"./locales/ja-JP.json":()=>import("./locales/ja-JP-DBVTYXUO.js"),"./locales/kaa.json":()=>import("./locales/kaa-6HZHGXH3.js"),"./locales/kab-KAB.json":()=>import("./locales/kab-KAB-ZGHBKWFO.js"),"./locales/kk-KZ.json":()=>import("./locales/kk-KZ-P5N5QNE5.js"),"./locales/km-KH.json":()=>import("./locales/km-KH-HSX4SM5Z.js"),"./locales/ko-KR.json":()=>import("./locales/ko-KR-MTYHY66A.js"),"./locales/ku-TR.json":()=>import("./locales/ku-TR-6OUDTVRD.js"),"./locales/lt-LT.json":()=>import("./locales/lt-LT-XHIRWOB4.js"),"./locales/lv-LV.json":()=>import("./locales/lv-LV-5QDEKY6T.js"),"./locales/mr-IN.json":()=>import("./locales/mr-IN-CRQNXWMA.js"),"./locales/my-MM.json":()=>import("./locales/my-MM-5M5IBNSE.js"),"./locales/nb-NO.json":()=>import("./locales/nb-NO-T6EIAALU.js"),"./locales/nl-NL.json":()=>import("./locales/nl-NL-IS3SIHDZ.js"),"./locales/nn-NO.json":()=>import("./locales/nn-NO-6E72VCQL.js"),"./locales/oc-FR.json":()=>import("./locales/oc-FR-POXYY2M6.js"),"./locales/pa-IN.json":()=>import("./locales/pa-IN-N4M65BXN.js"),"./locales/percentages.json":()=>import("./locales/percentages-BXMCSKIN.js"),"./locales/pl-PL.json":()=>import("./locales/pl-PL-T2D74RX3.js"),"./locales/pt-BR.json":()=>import("./locales/pt-BR-5N22H2LF.js"),"./locales/pt-PT.json":()=>import("./locales/pt-PT-UZXXM6DQ.js"),"./locales/ro-RO.json":()=>import("./locales/ro-RO-JPDTUUEW.js"),"./locales/ru-RU.json":()=>import("./locales/ru-RU-B4JR7IUQ.js"),"./locales/si-LK.json":()=>import("./locales/si-LK-N5RQ5JYF.js"),"./locales/sk-SK.json":()=>import("./locales/sk-SK-C5VTKIMK.js"),"./locales/sl-SI.json":()=>import("./locales/sl-SI-NN7IZMDC.js"),"./locales/sv-SE.json":()=>import("./locales/sv-SE-XGPEYMSR.js"),"./locales/ta-IN.json":()=>import("./locales/ta-IN-2NMHFXQM.js"),"./locales/th-TH.json":()=>import("./locales/th-TH-HPSO5L25.js"),"./locales/tr-TR.json":()=>import("./locales/tr-TR-DEFEU3FU.js"),"./locales/uk-UA.json":()=>import("./locales/uk-UA-QMV73CPH.js"),"./locales/vi-VN.json":()=>import("./locales/vi-VN-M7AON7JQ.js"),"./locales/zh-CN.json":()=>import("./locales/zh-CN-LNUGB5OW.js"),"./locales/zh-HK.json":()=>import("./locales/zh-HK-E62DVLB3.js"),"./locales/zh-TW.json":()=>import("./locales/zh-TW-RAJ6MFWO.js")});var G3=85,nr={code:"en",label:"English"},Yi=[nr,...[{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(e=>A0[e.code]>=G3).sort((e,o)=>e.label>o.label?1:-1)],Tc="__test__";Mt()&&Yi.unshift({code:Tc,label:"test language"},{code:`${Tc}.rtl`,label:"\u202Atest language (rtl)\u202C",rtl:!0});var Wi=nr,Cc={},kc=async e=>{if(Wi=e,document.documentElement.dir=Wi.rtl?"rtl":"ltr",document.documentElement.lang=Wi.code,e.code.startsWith(Tc))Cc={};else try{Cc=await U3(`./locales/${Wi.code}.json`)}catch(o){console.error(`Failed to load language ${e.code}:`,o.message),Cc=Cp}yt.set(ib,e.code)},Cr=()=>Wi,nb=(e,o)=>{for(let t=0;t<o.length;++t){let r=o[t];if(e[r]===void 0)return;e=e[r]}if(typeof e=="string")return e},g=(e,o,t)=>{if(Wi.code.startsWith(Tc))return`\u202A[[${o?`${e}(${JSON.stringify(o).slice(1,-1)})`:e}]]\u202C`;let r=e.split("."),n=nb(Cc,r)||nb(Cp,r)||t;if(n===void 0){let i=`Can't find translation for ${e}`;if(k.PROD)return console.warn(i),"";throw new Error(i)}if(o)for(let i in o)n=n.replace(`{{${i}}}`,String(o[i]));return n},ib=Ne(nr.code),it=()=>{let e=wc(ib);return{t:g,langCode:e}};import W3 from"clsx";import Y3 from"open-color";import Lt from"react";import{Fragment as Se,jsx as h,jsxs as N}from"react/jsx-runtime";var Wo=e=>"var(--icon-fill-color)",ab=e=>e===re.LIGHT?Y3.white:"#1e1e1e",_=(e,o=512)=>{let{width:t=512,height:r=t,mirror:n,style:i,...a}=typeof o=="number"?{width:o}:o;return h("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${t} ${r}`,className:W3({"rtl-mirror":n}),style:i,...a,children:typeof e=="string"?h("path",{fill:"currentColor",d:e}):e})},U={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},ae={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},g8=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("rect",{x:3,y:8,width:18,height:4,rx:1}),h("line",{x1:12,y1:8,x2:12,y2:21}),h("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),h("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"})]}),U),Vi=_(N("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),h("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),h("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),h("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),h("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),U),lb=_(N("svg",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),h("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),U),sb=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"1"}),h("circle",{cx:"12",cy:"19",r:"1"}),h("circle",{cx:"12",cy:"5",r:"1"})]}),U),cb=_(N("svg",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),h("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),h("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),U),Dp=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M6.5 9.5l3.5 -3"}),h("path",{d:"M14 5.5l3 1.5"}),h("path",{d:"M18.5 10l-2.5 7"}),h("path",{d:"M13.5 17.5l-7 -5"})]}),U),Tr=_(N("g",{children:[h("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"}),h("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"}),h("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:h("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"})}),h("g",{mask:"url(#UnlockedIcon)",children:h("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"})})]}),ae),jr=_(N("g",{strokeWidth:"1.25",children:[h("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"}),h("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),h("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"})]}),ae),db=_(h("g",{fill:"currentColor",children:h("path",{d:"M12 2a5 5 0 0 1 5 5v3a3 3 0 0 1 3 3v6a3 3 0 0 1 -3 3h-10a3 3 0 0 1 -3 -3v-6a3 3 0 0 1 3 -3v-3a5 5 0 0 1 5 -5m0 12a2 2 0 0 0 -1.995 1.85l-.005 .15a2 2 0 1 0 2 -2m0 -10a3 3 0 0 0 -3 3v3h6v-3a3 3 0 0 0 -3 -3"})}),{width:24,height:24}),mb=_(N(Se,{children:[h("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"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),h("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"}),pb=_(N(Se,{children:[h("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"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),h("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"}),ub=_(N(Se,{children:[h("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"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),h("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"}),f8=_(h("g",{fill:"currentColor",children:h("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"}),Ic=_(N("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),fl=_(N("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,children:[h("path",{d:"M4.028 13.252c-.657 -.972 -1.028 -2.078 -1.028 -3.252c0 -3.866 4.03 -7 9 -7s9 3.134 9 7s-4.03 7 -9 7c-1.913 0 -3.686 -.464 -5.144 -1.255"}),h("path",{d:"M5 15m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 17c0 1.42 .316 2.805 1 4"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),qr=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),U),Jr=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"})]}),U),Qr=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"})]}),U),Ki=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),h("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),h("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),U),en=_(h("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),ae),hb=_(N("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),h("path",{d:"M16 7h4"}),h("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),U),ir=_(N("g",{strokeWidth:"1.25",children:[h("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"}),h("path",{d:"m11.25 5.417 3.333 3.333"})]}),ae),tn=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),h("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),h("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),h("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),h("polyline",{points:"5 20 11 4 13 4 20 20"})]}),U),Sc=_(N("g",{strokeWidth:"1.25",children:[h("path",{d:"M12.5 6.667h.01"}),h("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"}),h("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),h("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),ae),Mc=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M18 13.3l-6.3 -6.3"})]}),U),Rp=_(h("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),ae),Np=_(h("path",{d:"M5 10h10",strokeWidth:"1.25"}),ae),gb=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M21 21l-6 -6"}),h("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"}),h("path",{d:"M3 4v4h4"})]}),U),kr=_(h("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"}),ae),fb=_(N("g",{strokeWidth:"1.5",children:[h("polyline",{points:"12 16 18 10 12 4"}),h("polyline",{points:"8 4 2 10 8 16"})]}),ae),bl=_(N("g",{strokeWidth:"1.25",children:[h("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"}),h("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"})]}),ae),xl=_(h("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"}),ae),El=_(h("g",{stroke:"currentColor",strokeLinejoin:"round",children:h("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"})}),{...ae,strokeWidth:1.5}),Lc=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),h("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),h("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),U),Kn=_(h("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"}),ae),Zi=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"}),h("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),U),bb=_(N("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"}),h("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),U),b8=_(h("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"}),ae),xb=_(h("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"}),ae),Eb=_(N("g",{strokeWidth:"1.25",children:[h("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"}),h("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"})]}),ae),yb=_(N("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 4l11.733 16h4.267l-11.733 -16z"}),h("path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"})]}),U),vb=_(h("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),yl=_(N("g",{strokeWidth:"1.25",children:[h("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"}),h("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"})]}),ae),wb=_("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}),Cb=_("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}),Xi=_(h("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"}),ae),x8=_("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}),Tb=_("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"),Ac=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z"}),h("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"}),h("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"})]}),U),kb=_(h("g",{strokeWidth:1.5,children:h("path",{d:"M6 18l12 -12"})}),U),_c=_(N("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 8h.01"}),h("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),h("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),h("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),h("path",{d:"M19 16v6"}),h("path",{d:"M22 19l-3 3l-3 -3"})]}),U),Ib=_("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}),E8=_("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}),y8=_("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}),Sb=_("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"),v8=_("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"),Op=_(h("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"}),ae),Bp=_(h("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"}),ae),Mb=_("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}),Lb=_(h("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"}),ae),w8=_("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"),C8=_("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}),T8=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M12 14v-11"}),h("path",{d:"M9 6l3 -3l3 3"})]}),U),k8=_(N(Se,{children:[h("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"}),h("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}),I8=_(h("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}),Ab=N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 10l0 10"}),h("path",{d:"M12 10l4 4"}),h("path",{d:"M12 10l-4 4"}),h("path",{d:"M4 4l16 0"})]}),_b=N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 5l0 14"}),h("path",{d:"M16 9l-4 -4"}),h("path",{d:"M8 9l4 -4"})]}),zp=_(_b,U),Fp=_(_b,{...U,style:{transform:"rotate(180deg)"}}),Hp=_(Ab,U),Up=_(Ab,{...U,style:{transform:"rotate(180deg)"}}),Gp=_(N(Se,{children:[N("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),Wp=_(N(Se,{children:[N("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),Yp=_(N(Se,{children:[N("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),Vp=_(N(Se,{children:[N("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),Pb=_(N(Se,{children:[N("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),Db=_(N(Se,{children:[N("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),Kp=_(N("g",{stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),h("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),ae),Zp=_(N("g",{stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),h("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),ae),Pc=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"9",cy:"7",r:"4"}),h("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),h("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),h("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),U),S8=_("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"),M8=_("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"),Co=_(N(Se,{children:[h("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("path",{d:"M15 5 5 15M5 5l10 10"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),L8=_("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}),A8=_("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}),_8=_("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}),Xp=Lt.memo(({theme:e})=>_(N(Se,{children:[h("path",{d:"M25 26H111V111H25",fill:Wo(e)}),h("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:Wo(e),strokeWidth:"2"}),h("path",{d:"M100 100H160V160H100",fill:Wo(e)}),h("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:Wo(e),strokeWidth:"2"}),N("g",{fill:ab(e),stroke:Wo(e),strokeWidth:"6",children:[h("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),$p=Lt.memo(({theme:e})=>_(N(Se,{children:[h("path",{d:"M25 26H111V111H25",fill:Wo(e)}),h("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:Wo(e),strokeWidth:"2"}),h("path",{d:"M100 100H160V160H100",fill:Wo(e)}),h("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:Wo(e),strokeWidth:"2"}),N("g",{fill:ab(e),stroke:Wo(e),strokeWidth:"6",children:[h("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),h("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),Rb=_(h("g",{strokeWidth:1.25,children:h("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"})}),ae),Nb=_(N(Se,{children:[h("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"}),h("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:h("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"})}),h("g",{mask:"url(#FillHachureIcon)",children:h("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"})})]}),ae),Ob=_(N(Se,{children:[N("g",{clipPath:"url(#a)",children:[h("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"}),h("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:h("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"})}),h("g",{mask:"url(#FillCrossHatchIcon)",children:h("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"})})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),Bb=_(N(Se,{children:[h("g",{clipPath:"url(#a)",children:h("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"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),{...ae,fill:"currentColor"}),jp=_(h(Se,{children:h("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),ae),zb=_(h("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),ae),Fb=_(h("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),ae),P8=Lt.memo(({theme:e})=>_(h("path",{d:"M6 10H34",stroke:Wo(e),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})),Hb=_(N("g",{strokeWidth:"2",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12h2"}),h("path",{d:"M17 12h2"}),h("path",{d:"M11 12h2"})]}),U),Ub=_(N("g",{strokeWidth:"2",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 12v.01"}),h("path",{d:"M8 12v.01"}),h("path",{d:"M12 12v.01"}),h("path",{d:"M16 12v.01"}),h("path",{d:"M20 12v.01"})]}),U),Gb=_(h("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"}),ae),Wb=_(h("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"}),ae),Yb=_(h("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"}),ae),Vb=_(N("svg",{strokeWidth:"1.5",children:[h("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"}),h("path",{d:"M13.3333 3.33331V3.34331"}),h("path",{d:"M16.6667 3.33331V3.34331"}),h("path",{d:"M16.6667 6.66669V6.67669"}),h("path",{d:"M16.6667 10V10.01"}),h("path",{d:"M3.33334 13.3333V13.3433"}),h("path",{d:"M16.6667 13.3333V13.3433"}),h("path",{d:"M3.33334 16.6667V16.6767"}),h("path",{d:"M6.66666 16.6667V16.6767"}),h("path",{d:"M10 16.6667V16.6767"}),h("path",{d:"M13.3333 16.6667V16.6767"}),h("path",{d:"M16.6667 16.6667V16.6767"})]}),ae),Kb=_(N("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),h("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),h("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),h("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),h("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),h("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),h("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),h("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),h("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),h("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),h("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),h("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),U),Zb=_(N("g",{stroke:"currentColor",opacity:.3,strokeWidth:2,children:[h("path",{d:"M12 12l9 0"}),h("path",{d:"M3 9l6 6"}),h("path",{d:"M3 15l6 -6"})]}),U),Xb=Lt.memo(({flip:e=!1})=>_(N("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[h("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),h("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})),$b=Lt.memo(({flip:e=!1})=>_(N("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[h("path",{d:"M32 10L6 10",strokeWidth:2}),h("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),jb=Lt.memo(({flip:e=!1})=>_(N("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[h("path",{d:"M26 10L6 10"}),h("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),qb=Lt.memo(({flip:e=!1})=>_(h("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",children:h("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})),Jb=Lt.memo(({flip:e=!1})=>_(N("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[h("path",{d:"M32 10L6 10",strokeWidth:2}),h("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})),Qb=Lt.memo(({flip:e=!1})=>_(N("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",children:[h("path",{d:"M6,9.5H27"}),h("path",{d:"M27,5L34,10L27,14Z",fill:"none"})]}),{width:40,height:20})),ex=Lt.memo(({flip:e=!1})=>_(N("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{d:"M6,9.5H20"}),h("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),tx=Lt.memo(({flip:e=!1})=>_(N("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{d:"M6,9.5H20"}),h("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),ox=Lt.memo(({flip:e=!1})=>_(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),rx=Lt.memo(({flip:e=!1})=>_(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L15,15 L15,5"})}),{width:40,height:20})),nx=Lt.memo(({flip:e=!1})=>_(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L15,16 L15,4 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),ix=_(N(Se,{children:[h("g",{clipPath:"url(#a)",children:h("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"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),ax=_(N(Se,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),lx=_(N(Se,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),sx=_(h(Se,{children:h("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"})}),ae),Zn=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 7v-2h13v2"}),h("path",{d:"M10 5v14"}),h("path",{d:"M12 19h-4"}),h("path",{d:"M15 13v-1h6v1"}),h("path",{d:"M18 12v7"}),h("path",{d:"M17 19h2"})]}),U),cx=_(h(Se,{children:N("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 12h10"}),h("path",{d:"M7 5v14"}),h("path",{d:"M17 5v14"}),h("path",{d:"M15 19h4"}),h("path",{d:"M15 5h4"}),h("path",{d:"M5 19h4"}),h("path",{d:"M5 5h4"})]})}),U),vl=_(h(Se,{children:h("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("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"})})}),ae),Dc=_(N(Se,{children:[h("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("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"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),dx=_(N("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),h("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),U),mx=_(N("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),h("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),U),px=_(N("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),h("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),U),ux=Lt.memo(({theme:e})=>_(N("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),h("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),U)),hx=Lt.memo(({theme:e})=>_(N("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),h("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),U)),gx=Lt.memo(({theme:e})=>_(N("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),h("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),h("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),U)),Rc=_(N("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M21 19h-18l9 -15"}),h("path",{d:"M20.615 15.171h.015"}),h("path",{d:"M19.515 11.771h.015"}),h("path",{d:"M17.715 8.671h.015"}),h("path",{d:"M15.415 5.971h.015"})]}),U),fx=_(h("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}),D8=_(h("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"})),Nc=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),h("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),h("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),h("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"})]}),U),qp=_(N(Se,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),h("path",{d:"M7 11l5 5l5 -5"}),h("path",{d:"M12 4l0 12"})]}),U),$i=_(N(Se,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]}),U),bx=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("path",{d:"M9.15 14.85l8.85 -10.85"}),h("path",{d:"M6 4l8.85 10.85"})]}),U),xx=_(N(Se,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),h("path",{d:"M12 17l0 .01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),U),R8=_(N(Se,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 4v16l13 -8z"})]}),U),N8=_(N(Se,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"})]}),U),Ex=_(N(Se,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12l5 5l10 -10"})]}),U),yx=_(N(Se,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M12 9v4"}),h("path",{d:"M12 17h.01"})]}),U),vx=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M11 7l6 6"}),h("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"})]}),U),Jp=_(N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 3l-4 7h8z"}),h("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("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"})]}),U),ji=_(N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 7l16 0"}),h("path",{d:"M4 17l16 0"}),h("path",{d:"M7 4l0 16"}),h("path",{d:"M17 4l0 16"})]}),U),wx=_(h("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"})),O8=_(N("g",{strokeWidth:"1.25",children:[h("path",{d:"M4.16602 10H15.8327"}),h("path",{d:"M12.5 13.3333L15.8333 10"}),h("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),ae),wl=_(N("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[h("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"}),h("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),Cx=_(N("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z"}),h("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),h("path",{d:"M15 6l3 3"}),h("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"}),h("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"})]}),U),B8=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z"}),h("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),h("path",{d:"M15 6l3 3"}),h("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"}),h("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"})]}),U),z8=_(N("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35"}),h("path",{d:"M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946"}),h("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"}),h("path",{d:"M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45"}),h("path",{d:"M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946"}),h("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"})]}),U),Tx=_(N("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),h("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),h("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),h("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"})]}),U),Xn=_(N("g",{stroke:"currentColor",fill:"none",strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"}),h("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"})]}),U),kx=_(N("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"}),h("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"}),h("path",{d:"M3 3l18 18"})]}),U),F8=_(N("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("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"}),h("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),h("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),h("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),h("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),U),Ix=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("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"}),h("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),h("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),h("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),h("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),U),co=_(N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),h("path",{d:"M21 21l-6 -6"})]}),U),Sx=_(N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M20.984 12.53a9 9 0 1 0 -7.552 8.355"}),h("path",{d:"M12 7v5l3 3"}),h("path",{d:"M19 16l-2 3h4l-2 3"})]}),U),Mx=_(N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M5 10a7 7 0 0 0 14 0"}),h("path",{d:"M8 21l8 0"}),h("path",{d:"M12 17l0 4"})]}),U),Lx=_(N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 3l18 18"}),h("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"}),h("path",{d:"M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85"}),h("path",{d:"M8 21l8 0"}),h("path",{d:"M12 17l0 4"})]}),U),Cl=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"})]}),U),Ax=_(N("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M12 20v.01"}),h("path",{d:"M16 20v.01"}),h("path",{d:"M8 20v.01"}),h("path",{d:"M4 20v.01"}),h("path",{d:"M4 16v.01"}),h("path",{d:"M4 12v.01"}),h("path",{d:"M4 8v.01"}),h("path",{d:"M4 4v.01"}),h("path",{d:"M8 4v.01"}),h("path",{d:"M12 4v.01"}),h("path",{d:"M16 4v.01"}),h("path",{d:"M20 4v.01"}),h("path",{d:"M20 8v.01"}),h("path",{d:"M20 12v.01"}),h("path",{d:"M20 16v.01"}),h("path",{d:"M20 20v.01"})]}),U),_x=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 3v18"}),h("path",{d:"M19 21v-18"}),h("path",{d:"M5 7h14"}),h("path",{d:"M5 15h14"}),h("path",{d:"M8 13v4"}),h("path",{d:"M11 13v4"}),h("path",{d:"M16 13v4"}),h("path",{d:"M14 5v4"}),h("path",{d:"M11 5v4"}),h("path",{d:"M8 5v4"}),h("path",{d:"M3 21h18"})]}),U),Px=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 12l18 0"}),h("path",{d:"M7 16l10 0l-10 5l0 -5"}),h("path",{d:"M7 8l10 0l-10 -5l0 5"})]}),U),Dx=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 3l0 18"}),h("path",{d:"M16 7l0 10l5 0l-5 -10"}),h("path",{d:"M8 7l0 10l-5 0l5 -10"})]}),U),Qp=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"}),h("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"})]}),U),Oc=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"}),h("path",{d:"M22 22l-3 -3"}),h("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),h("path",{d:"M3 11v-1"}),h("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),h("path",{d:"M10 3h1"}),h("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"})]}),U),Rx=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),h("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),h("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"}),h("path",{d:"M10 15l2 6l2 -6"}),h("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"})]}),U),Nx=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),h("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),h("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"}),h("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"}),h("path",{d:"M11 21v-6l3 6v-6"})]}),U),Ox=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M4 8l5 0"}),h("path",{d:"M15 8l4 0"})]}),U),Bx=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),h("path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),h("path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z"}),h("path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555"})]}),U),zx=_(N("g",{stroke:"currentColor",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"})]}),{...U,strokeWidth:1.5}),H8=_(N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"}),h("path",{d:"M21 12h-13l3 -3"}),h("path",{d:"M11 15l-3 -3"})]}),U),U8=_(N("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M10 9l5 3l-5 3z"})]}),U),Fx=_(N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 6h18"}),h("path",{d:"M3 12h18"}),h("path",{d:"M3 18h18"}),h("path",{d:"M6 3v18"}),h("path",{d:"M12 3v18"}),h("path",{d:"M18 3v18"})]}),U),Hx=_(N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M17 3m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),h("path",{d:"M3 17m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),h("path",{d:"M17 5c-6.627 0 -12 5.373 -12 12"})]}),U),Bc=_(N("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 18l12 -12"}),h("path",{d:"M18 10v-4h-4"})]}),U),zc=_(N("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4,19L10,19C11.097,19 12,18.097 12,17L12,9C12,7.903 12.903,7 14,7L21,7"}),h("path",{d:"M18 4l3 3l-3 3"})]}),U),Fc=_(N("g",{children:[h("path",{d:"M16,12L20,9L16,6"}),h("path",{d:"M6 20c0 -6.075 4.925 -11 11 -11h3"})]}),U),Hc=_(N("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 9l6 6l6 -6"})]}),U),Ux=_(N("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 15l6 -6l6 6"})]}),U),Gx=_(N("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 15l6 -6l6 6"})]}),U),eu=_(N("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"}),h("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"})]}),U),Uc=_(N("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 7l0 10"}),h("path",{d:"M7 5l10 0"}),h("path",{d:"M7 19l10 0"}),h("path",{d:"M19 7l0 10"})]}),U),tu=_(N("g",{strokeWidth:"1.25",children:[h("rect",{x:"4",y:"4",width:"4",height:"4",rx:"1"}),h("rect",{x:"10",y:"4",width:"4",height:"4",rx:"1"}),h("rect",{x:"16",y:"4",width:"4",height:"4",rx:"1"}),h("rect",{x:"4",y:"10",width:"4",height:"4",rx:"1"}),h("rect",{x:"10",y:"10",width:"4",height:"4",rx:"1"}),h("rect",{x:"16",y:"10",width:"4",height:"4",rx:"1"}),h("rect",{x:"4",y:"16",width:"4",height:"4",rx:"1"}),h("rect",{x:"10",y:"16",width:"4",height:"4",rx:"1"}),h("rect",{x:"16",y:"16",width:"4",height:"4",rx:"1"})]}),U),ou=_(h("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:.5,viewBox:"0 0 640 512",children:h("path",{d:"M15 15C24.4 5.7 39.6 5.7 49 15l63 63L112 40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 96c0 13.3-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l38.1 0L15 49C5.7 39.6 5.7 24.4 15 15zM133.5 243.9C158.6 193.6 222.7 112 320 112s161.4 81.6 186.5 131.9c3.8 7.6 3.8 16.5 0 24.2C481.4 318.4 417.3 400 320 400s-161.4-81.6-186.5-131.9c-3.8-7.6-3.8-16.5 0-24.2zM320 320a64 64 0 1 0 0-128 64 64 0 1 0 0 128zM591 15c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-63 63 38.1 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24s24 10.7 24 24l0 38.1 63-63zM15 497c-9.4-9.4-9.4-24.6 0-33.9l63-63L40 400c-13.3 0-24-10.7-24-24s10.7-24 24-24l96 0c13.3 0 24 10.7 24 24l0 96c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-38.1L49 497c-9.4 9.4-24.6 9.4-33.9 0zm576 0l-63-63 0 38.1c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24l96 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-38.1 0 63 63c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0z"})}),U);import Wx from"clsx";import nu,{useEffect as Z3,useRef as Yx,useState as X3}from"react";import V3 from"react";import{jsx as ru}from"react/jsx-runtime";var K3=({size:e="1em",circleWidth:o=8,synchronized:t=!1,className:r=""})=>{let i=-(V3.useRef(Date.now()).current%1600);return ru("div",{className:`Spinner ${r}`,children:ru("svg",{viewBox:"0 0 100 100",style:{width:e,height:e,"--spinner-delay":t?`${i}ms`:0},children:ru("circle",{cx:"50",cy:"50",r:50-o/2,strokeWidth:o,fill:"none",strokeMiterlimit:"10"})})})},mo=K3;import{jsx as Tl,jsxs as kl}from"react/jsx-runtime";var K=nu.forwardRef(({size:e="medium",visible:o=!0,className:t="",...r},n)=>{let{id:i}=at(),a=nu.useRef(null);nu.useImperativeHandle(n,()=>a.current);let l=`ToolIcon_size_${e}`,[s,c]=X3(!1),m=Yx(!0),d=async u=>{let f="onClick"in r&&r.onClick?.(u);if(Br(f))try{c(!0),await f}catch(b){if(b instanceof Bi)console.warn(b);else throw b}finally{m.current&&c(!1)}};Z3(()=>(m.current=!0,()=>{m.current=!1}),[]);let p=Yx(null);if(r.type==="button"||r.type==="icon"||r.type==="submit"){let u=r.type==="icon"?"button":r.type;return kl("button",{className:Wx("ToolIcon_type_button",l,t,o&&!r.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!r.hidden,"ToolIcon--selected":r.selected,"ToolIcon--plain":r.type==="icon"}),style:r.style,"data-testid":r["data-testid"],hidden:r.hidden,title:r.title,"aria-label":r["aria-label"],type:u,onClick:d,ref:a,disabled:s||r.isLoading||!!r.disabled,children:[(r.icon||r.label)&&kl("div",{className:"ToolIcon__icon","aria-hidden":"true","aria-disabled":!!r.disabled,children:[r.icon||r.label,r.keyBindingLabel&&Tl("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel}),r.isLoading&&Tl(mo,{})]}),r.showAriaLabel&&kl("div",{className:"ToolIcon__label",children:[r["aria-label"]," ",s&&Tl(mo,{})]}),r.children]})}return kl("label",{className:Wx("ToolIcon",t),title:r.title,onPointerDown:u=>{p.current=u.pointerType||null,r.onPointerDown?.({pointerType:u.pointerType||null})},onPointerUp:()=>{requestAnimationFrame(()=>{p.current=null})},children:[Tl("input",{className:`ToolIcon_type_radio ${l}`,type:"radio",name:r.name,"aria-label":r["aria-label"],"aria-keyshortcuts":r["aria-keyshortcuts"],"data-testid":r["data-testid"],id:`${i}-${r.id}`,onChange:()=>{r.onChange?.({pointerType:p.current})},checked:r.checked,ref:a}),kl("div",{className:"ToolIcon__icon",children:[r.icon,r.keyBindingLabel&&Tl("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel})]})]})});K.displayName="ToolButton";var Gc=[],O=e=>(Gc=Gc.concat(e),e);import{jsx as j3}from"react/jsx-runtime";var $3=(e,o,t)=>{let r=new Set(q(e.filter(m=>ce(m)),o).map(m=>m.id)),n={},i=t.scene.getNonDeletedElementsMap(),a=new Set;for(let m of r){let d=Ho(e,m);for(let p of d)if(!a.has(p.id)){if(tt(p)){let u=Eo(p,i);u&&(n[u.id]=!0)}else n[p.id]=!0;a.add(p.id)}}let l=!0,s=e.map(m=>{if(o.selectedElementIds[m.id]){let d=tt(m)?Eo(m,i):null;return m.frameId&&r.has(m.frameId)?(l=!1,n[m.id]=!0,m):d?.frameId&&r.has(d?.frameId)?m:(m.boundElements&&m.boundElements.forEach(p=>{let u=t.scene.getNonDeletedElementsMap().get(p.id);u&&se(u)&&t.scene.mutateElement(u,{startBinding:m.id===u.startBinding?.elementId?null:u.startBinding,endBinding:m.id===u.endBinding?.elementId?null:u.endBinding})}),ee(m,{isDeleted:!0}))}return m.frameId&&r.has(m.frameId)?(l=!1,tt(m)||(n[m.id]=!0),ee(m,{frameId:null})):tt(m)&&o.selectedElementIds[m.containerId]?ee(m,{isDeleted:!0}):m}),c=o.editingGroupId;if(l&&o.editingGroupId){let m=Fe(s,o.editingGroupId).filter(d=>!d.isDeleted);if(m.length>1)m[0]&&(n[m[0].id]=!0);else{c=null,m[0]&&(n[m[0].id]=!0);let d=m[0];if(d){let p=d.groupIds.findIndex(f=>f===o.editingGroupId),u=d.groupIds[p+1];if(u){let f=Fe(s,u).filter(b=>!b.isDeleted);f.length>1&&(c=u,f.forEach(b=>{n[b.id]=!0}))}}}}return{elements:s,appState:{...o,...rt({selectedElementIds:n,editingGroupId:c},s,o,null)}}},Vx=(e,o)=>{if(e.editingGroupId){let t=Fe(ge(o),e.editingGroupId);if(t.length)return{...e,selectedElementIds:{[t[0].id]:!0}}}return e},Il=O({name:"deleteSelectedElements",label:"labels.delete",icon:kr,trackEvent:{category:"element",action:"delete"},perform:(e,o,t,r)=>{if(o.editingLinearElement){let{elementId:a,selectedPointsIndices:l,startBindingElement:s,endBindingElement:c}=o.editingLinearElement,m=r.scene.getNonDeletedElementsMap(),d=$.getElement(a,m);if(!d||l==null)return!1;if(d.points.length<2){let u=e.map(b=>b.id===d.id?ee(b,{isDeleted:!0}):b),f=Vx(o,u);return{elements:u,appState:{...f,editingLinearElement:null},captureUpdate:A.IMMEDIATELY}}let p={startBindingElement:l?.includes(0)?null:s,endBindingElement:l?.includes(d.points.length-1)?null:c};return $.deletePoints(d,r,l),{elements:e,appState:{...o,editingLinearElement:{...o.editingLinearElement,...p,selectedPointsIndices:l?.[0]>0?[l[0]-1]:[0]}},captureUpdate:A.IMMEDIATELY}}let{elements:n,appState:i}=$3(e,o,r);return Xs(n,n.filter(a=>a.isDeleted)),i=Vx(i,n),{elements:n,appState:{...i,activeTool:Ie(o,{type:"selection"}),multiElement:null,activeEmbeddable:null,selectedLinearElement:null},captureUpdate:_e(ge(e),o)?A.IMMEDIATELY:A.EVENTUALLY}},keyTest:(e,o,t)=>(e.key===w.BACKSPACE||e.key===w.DELETE)&&!e[w.CTRL_OR_CMD],PanelComponent:({elements:e,appState:o,updateData:t})=>j3(K,{type:"button",icon:kr,title:g("labels.delete"),"aria-label":g("labels.delete"),onClick:()=>t(null),visible:_e(ge(e),o)})});import{jsx as Wc}from"react/jsx-runtime";var iu=O({name:"sendBackward",label:"labels.sendBackward",keywords:["move down","zindex","layer"],icon:Fp,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:I0(e,o,r.scene),appState:o,captureUpdate:A.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[w.CTRL_OR_CMD]&&!e.shiftKey&&e.code===le.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>Wc("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendBackward")} \u2014 ${D("CtrlOrCmd+[")}`,children:Fp})}),au=O({name:"bringForward",label:"labels.bringForward",keywords:["move up","zindex","layer"],icon:zp,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:S0(e,o,r.scene),appState:o,captureUpdate:A.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[w.CTRL_OR_CMD]&&!e.shiftKey&&e.code===le.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>Wc("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.bringForward")} \u2014 ${D("CtrlOrCmd+]")}`,children:zp})}),lu=O({name:"sendToBack",label:"labels.sendToBack",keywords:["move down","zindex","layer"],icon:Up,trackEvent:{category:"element"},perform:(e,o)=>({elements:M0(e,o),appState:o,captureUpdate:A.IMMEDIATELY}),keyTest:e=>Do?e[w.CTRL_OR_CMD]&&e.altKey&&e.code===le.BRACKET_LEFT:e[w.CTRL_OR_CMD]&&e.shiftKey&&e.code===le.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>Wc("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendToBack")} \u2014 ${Do?D("CtrlOrCmd+Alt+["):D("CtrlOrCmd+Shift+[")}`,children:Up})}),su=O({name:"bringToFront",label:"labels.bringToFront",keywords:["move up","zindex","layer"],icon:Hp,trackEvent:{category:"element"},perform:(e,o)=>({elements:L0(e,o),appState:o,captureUpdate:A.IMMEDIATELY}),keyTest:e=>Do?e[w.CTRL_OR_CMD]&&e.altKey&&e.code===le.BRACKET_RIGHT:e[w.CTRL_OR_CMD]&&e.shiftKey&&e.code===le.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>Wc("button",{type:"button",className:"zIndexButton",onClick:t=>e(null),title:`${g("labels.bringToFront")} \u2014 ${Do?D("CtrlOrCmd+Alt+]"):D("CtrlOrCmd+Shift+]")}`,children:Hp})});var cu=O({name:"selectAll",label:"labels.selectAll",icon:Ax,trackEvent:{category:"canvas"},viewMode:!1,perform:(e,o,t,r)=>{if(o.editingLinearElement)return!1;let n=e.filter(i=>!i.isDeleted&&!(V(i)&&i.containerId)&&!i.locked).reduce((i,a)=>(i[a.id]=!0,i),{});return{appState:{...o,...rt({editingGroupId:null,selectedElementIds:n},ge(e),o,r),selectedLinearElement:Object.keys(n).length===1&&he(e[0])?new $(e[0],j(e)):null},captureUpdate:A.IMMEDIATELY}},keyTest:e=>e[w.CTRL_OR_CMD]&&e.key===w.A});import{jsx as q3}from"react/jsx-runtime";var du=O({name:"duplicateSelection",label:"labels.duplicateSelection",icon:bl,trackEvent:{category:"element"},perform:(e,o,t,r)=>{if(o.selectedElementsAreBeingDragged)return!1;if(o.editingLinearElement)try{let a=$.duplicateSelectedPoints(o,r.scene);return{elements:e,appState:a,captureUpdate:A.IMMEDIATELY}}catch{return!1}let{duplicatedElements:n,elementsWithDuplicates:i}=Un({type:"in-place",elements:e,idsOfElementsToDuplicate:j(q(e,o,{includeBoundTextElement:!0,includeElementsInFrames:!0})),appState:o,randomizeSeed:!0,overrides:({origElement:a,origIdToDuplicateId:l})=>{let s=a.frameId&&l.get(a.frameId);return{x:a.x+Pm/2,y:a.y+Pm/2,frameId:s??a.frameId}}});if(r.props.onDuplicate&&i){let a=r.props.onDuplicate(i,e);a&&(i=a)}return{elements:or(i,j(n)),appState:{...o,...Js(n,ge(i),o)},captureUpdate:A.IMMEDIATELY}},keyTest:e=>e[w.CTRL_OR_CMD]&&e.key===w.D,PanelComponent:({elements:e,appState:o,updateData:t})=>q3(K,{type:"button",icon:bl,title:`${g("labels.duplicateSelection")} \u2014 ${D("CtrlOrCmd+D")}`,"aria-label":g("labels.duplicateSelection"),onClick:()=>t(null),visible:_e(ge(e),o)})});import{useEffect as _u,useMemo as S6,useRef as Pu,useState as M6}from"react";var J3=new Set(["command_palette","export"]),Ee=(e,o,t,r)=>{try{if(typeof window>"u"||k.VITE_WORKER_ID||k.VITE_APP_ENABLE_TRACKING!=="true"||!J3.has(e)||Mt())return;k.PROD||console.info("trackEvent",{category:e,action:o,label:t,value:r}),window.sa_event&&window.sa_event(o,{category:e,label:t,value:r})}catch(n){console.error("error during analytics",n)}};import o5 from"clsx";import Q3 from"clsx";import{forwardRef as e5}from"react";import{jsx as t5}from"react/jsx-runtime";var qi=e5((e,o)=>{let{title:t,className:r,testId:n,active:i,standalone:a,icon:l,onClick:s}=e;return t5("button",{type:"button",ref:o,title:t,"data-testid":n,className:Q3(r,{standalone:a,active:i}),onClick:s,style:e.style,children:l},t)});import{Fragment as n5,jsx as mu,jsxs as r5}from"react/jsx-runtime";var To=e=>mu(n5,{children:e.options.map(o=>e.type==="button"?mu(qi,{icon:o.icon,title:o.text,testId:o.testId,active:o.active??e.value===o.value,onClick:t=>e.onClick(o.value,t)},o.text):r5("label",{className:o5({active:e.value===o.value}),title:o.text,children:[mu("input",{type:"radio",name:e.group,onChange:()=>e.onChange(o.value),checked:e.value===o.value,"data-testid":o.testId}),o.icon]},o.text))});import*as $c from"@radix-ui/react-popover";import W5 from"clsx";import{useRef as Y5}from"react";import{jsx as i5}from"react/jsx-runtime";var Yc=()=>i5("div",{style:{width:1,height:"1rem",backgroundColor:"var(--default-border-color)",margin:"0 auto"}});import{useEffect as c5,useRef as d5}from"react";import{createPortal as m5}from"react-dom";import Kx from"react";var pu=Kx.createContext(null),Pe=()=>Kx.useContext(pu);import{useState as a5,useLayoutEffect as Zx}from"react";var Vc=e=>{let[o,t]=a5(null),r=be(),{theme:n}=Pe(),{container:i}=at();return Zx(()=>{o&&(o.className="",o.classList.add("excalidraw",...e?.className?.split(/\s+/)||[]),o.classList.toggle("excalidraw--mobile",r.editor.isMobile),o.classList.toggle("theme--dark",n===re.DARK))},[o,n,r.editor.isMobile,e?.className]),Zx(()=>{let a=e?.parentSelector?i?.querySelector(e.parentSelector):document.body;if(!a)return;let l=document.createElement("div");return a.appendChild(l),t(l),()=>{a.removeChild(l)}},[i,e?.parentSelector]),o};import{useEffect as l5}from"react";function Ji(e,o,t){l5(()=>{function r(n){let i=n;if(!e.current)return;let a=t?.(i,e.current);if(a===!0)return;if(a===!1)return o(i);e.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]")||o(i)}return document.addEventListener("pointerdown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("pointerdown",r),document.removeEventListener("touchstart",r)}},[e,o,t])}import{useRef as s5}from"react";var on=e=>{let o=s5(e);return Object.assign(o.current,e),o.current};import{jsx as p5}from"react/jsx-runtime";var rn=Ne(null),Xx=({onCancel:e,onChange:o,onSelect:t,colorPickerType:r})=>{let n=Vc({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),i=Pe(),a=nn(),l=vt(),s=q(a,i),c=on({app:l,onCancel:e,onChange:o,onSelect:t,selectedElements:s}),{container:m}=at();c5(()=>{let p=d.current;if(!p||!l.canvas||!n)return;let u=!1,f=l.canvas.getContext("2d"),b=({clientX:I,clientY:P})=>{let M=f.getImageData((I-i.offsetLeft)*window.devicePixelRatio,(P-i.offsetTop)*window.devicePixelRatio,1,1).data;return lf(M[0],M[1],M[2])},x=({clientX:I,clientY:P,altKey:M})=>{p.style.top=`${P+20}px`,p.style.left=`${I+20}px`;let B=b({clientX:I,clientY:P});u&&c.onChange(r,B,c.selectedElements,{altKey:M}),p.style.background=B},E=()=>{c.onCancel()},y=(I,P)=>{c.onSelect(I,P)},v=I=>{u=!0,I.stopImmediatePropagation()},C=I=>{u=!1,m?.focus(),I.stopImmediatePropagation(),I.preventDefault(),y(b(I),I)},S=I=>{I.key===w.ESCAPE&&(I.preventDefault(),I.stopImmediatePropagation(),E())};return n.tabIndex=-1,n.focus(),x({clientX:c.app.lastViewportPosition.x,clientY:c.app.lastViewportPosition.y,altKey:!1}),n.addEventListener("keydown",S),n.addEventListener("pointerdown",v),n.addEventListener("pointerup",C),window.addEventListener("pointermove",x,{passive:!0}),window.addEventListener("blur",E),()=>{u=!1,n.removeEventListener("keydown",S),n.removeEventListener("pointerdown",v),n.removeEventListener("pointerup",C),window.removeEventListener("pointermove",x),window.removeEventListener("blur",E)}},[c,l.canvas,n,r,m,i.offsetLeft,i.offsetTop]);let d=d5(null);return Ji(d,()=>{e()},p=>!!p.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")),n?m5(p5("div",{ref:d,className:"excalidraw-eye-dropper-preview"}),n):null};import*as Qi from"@radix-ui/react-popover";import f5 from"clsx";import b5 from"react";import u5 from"react";import h5 from"clsx";import{jsx as g5}from"react/jsx-runtime";var ft=u5.forwardRef(({children:e,padding:o,className:t,style:r},n)=>g5("div",{className:h5("Island",t),style:{"--padding":o,...r},ref:n,children:e}));import{jsx as uu,jsxs as x5}from"react/jsx-runtime";var Kc=b5.forwardRef(({className:e,container:o,children:t,style:r,onClose:n,onKeyDown:i,onFocusOutside:a,onPointerLeave:l,onPointerDownOutside:s},c)=>{let m=be();return uu(Qi.Portal,{container:o,children:x5(Qi.Content,{ref:c,className:f5("focus-visible-none",e),"data-prevent-outside-click":!0,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-popup)"},onPointerLeave:l,onKeyDown:i,onFocusOutside:a,onPointerDownOutside:s,onCloseAutoFocus:d=>{d.stopPropagation(),d.preventDefault(),o&&!Hf(document.activeElement)&&o.focus(),n()},children:[uu(ft,{padding:3,style:r,children:t}),uu(Qi.Arrow,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})});import E5 from"clsx";import{useCallback as y5,useEffect as gu,useRef as qx,useState as v5}from"react";var an=({palette:e,color:o})=>{if(!o)return null;for(let[t,r]of Object.entries(e))if(Array.isArray(r)){let n=r.indexOf(o);if(n>-1)return{colorName:t,shade:n}}else if(r===o)return{colorName:t,shade:null};return null},Sl=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),hu=({color:e,palette:o})=>!Object.values(o).flat().includes(e),jx=(e,o,t)=>{let r={elementBackground:"backgroundColor",elementStroke:"strokeColor"},n=e.filter(a=>{if(a.isDeleted)return!1;let l=a[r[o]];return hu({color:l,palette:t})}),i=new Map;return n.forEach(a=>{let l=a[r[o]];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,Qg)},ko=Ne(null),$x=(e,o,t)=>(e*299+o*587+t*114)/1e3,ea=(e,o=160)=>{if(!e)return!0;if(e==="transparent")return!1;if(!e.startsWith("#")){let i=document.createElement("div");if(i.style.color=e,i.style.color){i.style.position="absolute",i.style.visibility="hidden",i.style.width="0",i.style.height="0",document.body.appendChild(i);let a=getComputedStyle(i).color;document.body.removeChild(i);let l=a.replace(/^(rgb|rgba)\(/,"").replace(/\)$/,"").replace(/\s/g,"").split(","),s=parseInt(l[0]),c=parseInt(l[1]),m=parseInt(l[2]);return $x(s,c,m)<o}return!0}let t=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),n=parseInt(e.slice(5,7),16);return $x(t,r,n)<o};import{Fragment as w5,jsx as Zc,jsxs as Jx}from"react/jsx-runtime";var Qx=({color:e,onChange:o,label:t,colorPickerType:r,placeholder:n})=>{let i=be(),[a,l]=v5(e),[s,c]=ve(ko);gu(()=>{l(e)},[e]);let m=y5(b=>{let x=b.toLowerCase(),E=eE(x);E&&o(E),l(x)},[o]),d=qx(null),p=qx(null);gu(()=>{d.current&&d.current.focus()},[s]);let[u,f]=ve(rn);return gu(()=>()=>{f(null)},[f]),Jx("div",{className:"color-picker__input-label",children:[Zc("div",{className:"color-picker__input-hash",children:"#"}),Zc("input",{ref:s==="hex"?d:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":t,onChange:b=>{m(b.target.value)},value:(a||"").replace(/^#/,""),onBlur:()=>{l(e)},tabIndex:-1,onFocus:()=>c("hex"),onKeyDown:b=>{b.key!==w.TAB&&(b.key===w.ESCAPE&&p.current?.focus(),b.stopPropagation())},placeholder:n}),!i.editor.isMobile&&Jx(w5,{children:[Zc("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),Zc("div",{ref:p,className:E5("excalidraw-eye-dropper-trigger",{selected:u}),onClick:()=>f(b=>b?null:{keepOpenOnAlt:!1,onSelect:x=>o(x),colorPickerType:r}),title:`${g("labels.eyeDropper")} \u2014 ${w.I.toLocaleUpperCase()} or ${D("Alt")} `,children:vx})]})]})};import Eu,{useEffect as yu,useImperativeHandle as H5,useState as U5}from"react";import k5 from"clsx";import{useEffect as I5,useRef as S5}from"react";import{jsxs as T5}from"react/jsx-runtime";var C5=({color:e,keyLabel:o,isShade:t=!1})=>T5("div",{className:"color-picker__button__hotkey-label",style:{color:ea(e)?"#fff":"#000"},children:[t&&"\u21E7",o]}),ta=C5;import{jsx as fu,jsxs as M5}from"react/jsx-runtime";var tE=({colors:e,color:o,onChange:t,label:r})=>{let[n,i]=ve(ko),a=S5(null);return I5(()=>{a.current&&a.current.focus()},[o,n]),fu("div",{className:"color-picker-content--default",children:e.map((l,s)=>M5("button",{ref:o===l?a:void 0,tabIndex:-1,type:"button",className:k5("color-picker__button color-picker__button--large has-outline",{active:o===l,"is-transparent":l==="transparent"||!l}),onClick:()=>{t(l),i("custom")},title:l,"aria-label":r,style:{"--swatch-color":l},children:[fu("div",{className:"color-picker__button-outline"}),fu(ta,{color:l,keyLabel:s+1})]},s))})};import L5 from"clsx";import{useEffect as A5,useRef as _5}from"react";import{jsx as bu,jsxs as D5}from"react/jsx-runtime";var P5=({palette:e,color:o,onChange:t,activeShade:r})=>{let n=an({color:o,palette:e}),[i,a]=ve(ko),l=_5(null);return A5(()=>{l.current&&i==="baseColors"&&l.current.focus()},[n?.colorName,i]),bu("div",{className:"color-picker-content--default",children:Object.entries(e).map(([s,c],m)=>{let d=(Array.isArray(c)?c[r]:c)||"transparent",p=Sl[m],u=g(`colors.${s.replace(/\d+/,"")}`,null,"");return D5("button",{ref:n?.colorName===s?l:void 0,tabIndex:-1,type:"button",className:L5("color-picker__button color-picker__button--large has-outline",{active:n?.colorName===s,"is-transparent":d==="transparent"||!d}),onClick:()=>{t(d),a("baseColors")},title:`${u}${d.startsWith("#")?` ${d}`:""} \u2014 ${p}`,"aria-label":`${u} \u2014 ${p}`,style:d?{"--swatch-color":d}:void 0,"data-testid":`color-${s}`,children:[bu("div",{className:"color-picker__button-outline"}),bu(ta,{color:d,keyLabel:p})]},s)})})},oE=P5;import{jsx as N5}from"react/jsx-runtime";var R5=({children:e})=>N5("div",{className:"color-picker__heading",children:e}),oa=R5;import O5 from"clsx";import{useEffect as B5,useRef as z5}from"react";import{jsx as Ml,jsxs as rE}from"react/jsx-runtime";var nE=({color:e,onChange:o,palette:t})=>{let r=an({color:e||"transparent",palette:t}),[n,i]=ve(ko),a=z5(null);if(B5(()=>{a.current&&n==="shades"&&a.current.focus()},[r,n]),r){let{colorName:l,shade:s}=r,c=t[l];if(Array.isArray(c))return Ml("div",{className:"color-picker-content--default shades",children:c.map((m,d)=>rE("button",{ref:d===s&&n==="shades"?a:void 0,tabIndex:-1,type:"button",className:O5("color-picker__button color-picker__button--large has-outline",{active:d===s}),"aria-label":"Shade",title:`${l} - ${d+1}`,style:m?{"--swatch-color":m}:void 0,onClick:()=>{o(m),i("shades")},children:[Ml("div",{className:"color-picker__button-outline"}),Ml(ta,{color:m,keyLabel:d+1,isShade:!0})]},d))})}return rE("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[Ml("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),Ml("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")})]})};var xu=(e,o,t)=>{let r=Math.ceil(t/Sn);switch(o=o??-1,e){case"ArrowLeft":{let n=o-1;return n<0?t-1:n}case"ArrowRight":return(o+1)%t;case"ArrowDown":{let n=o+Sn;return n>=t?o%Sn:n}case"ArrowUp":{let n=o-Sn,i=n<0?Sn*r+n:n;return i>=t?void 0:i}}},F5=({e,colorObj:o,onChange:t,palette:r,customColors:n,setActiveColorPickerSection:i,activeShade:a})=>{if(o?.shade!=null&&["Digit1","Digit2","Digit3","Digit4","Digit5"].includes(e.code)&&e.shiftKey){let l=Number(e.code.slice(-1))-1;return t(r[o.colorName][l]),i("shades"),!0}if(["1","2","3","4","5"].includes(e.key)&&n[Number(e.key)-1])return t(n[Number(e.key)-1]),i("custom"),!0;if(Sl.includes(e.key)){let l=Sl.indexOf(e.key),s=Object.keys(r)[l],c=r[s],m=Array.isArray(c)?c[a]:c;return t(m),i("baseColors"),!0}return!1},iE=({event:e,activeColorPickerSection:o,palette:t,color:r,onChange:n,customColors:i,setActiveColorPickerSection:a,updateData:l,activeShade:s,onEyeDropperToggle:c,onEscape:m})=>{if(e[w.CTRL_OR_CMD])return!1;if(e.key===w.ESCAPE)return m(e),!0;if(e.key===w.ALT)return c(!0),!0;if(e.key===w.I)return c(),!0;let d=an({color:r,palette:t});if(e.key===w.TAB){let p={custom:!!i.length,baseColors:!0,shades:d?.shade!=null,hex:!0},u=Object.entries(p).reduce((y,[v,C])=>(C&&y.push(v),y),[]),f=u.indexOf(o),b=e.shiftKey?-1:1,x=f+b>u.length-1?0:f+b<0?u.length-1:f+b,E=u[x];return E&&a(E),E==="custom"?n(i[0]):E==="baseColors"&&(Object.entries(t).find(([v,C])=>Array.isArray(C)?C.includes(r):C===r?v:null)||n(go.black)),e.preventDefault(),e.stopPropagation(),!0}if(F5({e,colorObj:d,onChange:n,palette:t,customColors:i,setActiveColorPickerSection:a,activeShade:s}))return!0;if(o==="shades"&&d){let{shade:p}=d,u=xu(e.key,p,Sn);if(u!==void 0)return n(t[d.colorName][u]),!0}if(o==="baseColors"&&d){let{colorName:p}=d,u=Object.keys(t),f=u.indexOf(p),b=xu(e.key,f,u.length);if(b!==void 0){let x=u[b],E=t[x];return n(Array.isArray(E)?E[s]:E),!0}}if(o==="custom"){let p=r!=null?i.indexOf(r):0,u=xu(e.key,p,i.length);if(u!==void 0){let f=i[u];return n(f),!0}}return!1};import{jsx as $n,jsxs as Xc}from"react/jsx-runtime";var aE=Eu.forwardRef(({color:e,onChange:o,type:t,elements:r,palette:n,updateData:i,children:a,onEyeDropperToggle:l,onEscape:s},c)=>{let[m]=Eu.useState(()=>t==="canvasBackground"?[]:jx(r,t,n)),[d,p]=ve(ko),u=an({color:e,palette:n});yu(()=>{if(!d){let E=!!e&&hu({color:e,palette:n}),y=E&&!m.includes(e);p(y?null:E?"custom":u?.shade!=null?"shades":"baseColors")}},[d,e,n,p,u,m]);let[f,b]=U5(u?.shade??(t==="elementBackground"?of:tf));yu(()=>{u?.shade!=null&&b(u.shade);let E=y=>{y.key===w.ALT&&l(!1)};return document.addEventListener("keyup",E,{capture:!0}),()=>{document.removeEventListener("keyup",E,{capture:!0})}},[u,l]);let x=Eu.useRef(null);return H5(c,()=>x.current),yu(()=>{x?.current?.focus()},[]),$n("div",{role:"dialog","aria-modal":"true","aria-label":g("labels.colorPicker"),children:Xc("div",{ref:x,onKeyDown:E=>{iE({event:E,activeColorPickerSection:d,palette:n,color:e,onChange:o,onEyeDropperToggle:l,customColors:m,setActiveColorPickerSection:p,updateData:i,activeShade:f,onEscape:s})&&(E.preventDefault(),E.stopPropagation())},className:"color-picker-content properties-content",tabIndex:-1,children:[!!m.length&&Xc("div",{children:[$n(oa,{children:g("colorPicker.mostUsedCustomColors")}),$n(tE,{colors:m,color:e,label:g("colorPicker.mostUsedCustomColors"),onChange:o})]}),Xc("div",{children:[$n(oa,{children:g("colorPicker.colors")}),$n(oE,{color:e,palette:n,onChange:o,activeShade:f})]}),Xc("div",{children:[$n(oa,{children:g("colorPicker.shades")}),$n(nE,{color:e,onChange:o,palette:n})]}),a]})})});import G5 from"clsx";import{jsx as vu}from"react/jsx-runtime";var lE=({onChange:e,type:o,activeColor:t,topPicks:r})=>{let n;return o==="elementStroke"&&(n=fs),o==="elementBackground"&&(n=bs),o==="canvasBackground"&&(n=xs),r&&(n=r),n?vu("div",{className:"color-picker__top-picks",children:n.map(i=>vu("button",{className:G5("color-picker__button",{active:i===t,"is-transparent":i==="transparent"||!i,"has-outline":!ea(i,gs)}),style:{"--swatch-color":i},type:"button",title:i,onClick:()=>e(i),"data-testid":`color-top-pick-${i}`,children:vu("div",{className:"color-picker__button-outline"})},i))}):(console.error("Invalid type for TopPicks"),null)};import{jsx as Vo,jsxs as wu}from"react/jsx-runtime";var sE=e=>{let o=new Option().style;return o.color=e,!!o.color},eE=e=>xr(e)?e:sE(`#${e}`)?`#${e}`:sE(e)?e:null,V5=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=go,updateData:a})=>{let{container:l}=at(),[,s]=ve(ko),[c,m]=ve(rn),d=wu("div",{children:[Vo(oa,{children:g("colorPicker.hexCode")}),Vo(Qx,{color:o||"",label:r,onChange:f=>{t(f)},colorPickerType:e,placeholder:g("colorPicker.color")})]}),p=Y5(null),u=()=>{p.current?.focus()};return Vo(Kc,{container:l,style:{maxWidth:"13rem"},onFocusOutside:f=>{u(),f.preventDefault()},onPointerDownOutside:f=>{c&&f.preventDefault()},onClose:()=>{a({openPopup:null}),s(null)},children:i?Vo(aE,{ref:p,palette:i,color:o,onChange:f=>{t(f)},onEyeDropperToggle:f=>{m(b=>f?(b=b||{keepOpenOnAlt:!0,onSelect:t,colorPickerType:e},b.keepOpenOnAlt=!0,b):f===!1||b?null:{keepOpenOnAlt:!1,onSelect:t,colorPickerType:e})},onEscape:f=>{c?m(null):a({openPopup:null})},type:e,elements:n,updateData:a,children:d}):d})},K5=({label:e,color:o,type:t})=>Vo($c.Trigger,{type:"button",className:W5("color-picker__button active-color properties-trigger",{"is-transparent":!o||o==="transparent","has-outline":!o||!ea(o,gs)}),"aria-label":e,style:o?{"--swatch-color":o}:void 0,title:t==="elementStroke"?g("labels.showStroke"):g("labels.showBackground"),children:Vo("div",{className:"color-picker__button-outline",children:!o&&kb})}),Ll=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=go,topPicks:a,updateData:l,appState:s})=>Vo("div",{children:wu("div",{role:"dialog","aria-modal":"true",className:"color-picker-container",children:[Vo(lE,{activeColor:o,onChange:t,type:e,topPicks:a}),Vo(Yc,{}),wu($c.Root,{open:s.openPopup===e,onOpenChange:c=>{l({openPopup:c?e:null})},children:[Vo(K5,{color:o,label:r,type:e}),s.openPopup===e&&Vo(V5,{type:e,color:o,onChange:t,label:r,elements:n,palette:i,updateData:l})]})]})});import*as xE from"@radix-ui/react-popover";import g6,{useCallback as f6,useMemo as b6}from"react";import s6,{useMemo as ln,useState as c6,useRef as d6,useEffect as m6,useCallback as p6}from"react";import Z5 from"clsx";import X5 from"react";import{jsx as $5,jsxs as j5}from"react/jsx-runtime";var jc=X5.forwardRef(({className:e,placeholder:o,onChange:t},r)=>j5("div",{className:Z5("QuickSearch__wrapper",e),children:[co,$5("input",{ref:r,className:"QuickSearch__input",type:"text",placeholder:o,onChange:n=>t(n.target.value.trim().toLowerCase())})]}));import q5 from"clsx";import{Children as J5}from"react";import{jsx as cE}from"react/jsx-runtime";var qc=({className:e,placeholder:o,children:t})=>{let r=!J5.count(t);return cE("div",{className:q5("ScrollableList__wrapper",e),role:"menu",children:r?cE("div",{className:"empty",children:o}):t})};import{jsx as Q5,jsxs as e6}from"react/jsx-runtime";var dE=({children:e,className:o="",style:t,title:r})=>e6("div",{className:`dropdown-menu-group ${o}`,style:t,children:[r&&Q5("p",{className:"dropdown-menu-group-title",children:r}),e]}),Al=dE;dE.displayName="DropdownMenuGroup";import{useEffect as a6,useRef as l6}from"react";import{Fragment as o6,jsx as Cu,jsxs as r6}from"react/jsx-runtime";var t6=({textStyle:e,icon:o,shortcut:t,children:r})=>{let n=be();return r6(o6,{children:[o&&Cu("div",{className:"dropdown-menu-item__icon",children:o}),Cu("div",{style:e,className:"dropdown-menu-item__text",children:r}),t&&!n.editor.isMobile&&Cu("div",{className:"dropdown-menu-item__shortcut",children:t})]})},Jc=t6;import n6,{useContext as i6}from"react";var Tu=n6.createContext({}),Qc=(e="",o=!1,t=!1)=>`dropdown-menu-item dropdown-menu-item-base ${e}
1
+ import{$ as xf,$a as Hm,$b as Qa,$c as On,$d as Wr,$e as Vr,$f as hp,$g as O0,A as pf,Aa as Ka,Ab as xi,Ac as Er,Ad as I1,Ae as qs,Af as r0,Ag as M0,Ah as Ec,B as Lm,Ba as br,Bb as Oo,Bc as Re,Bd as Ti,Be as we,Bf as n0,Bg as L0,Bh as Z0,C as ye,Ca as Pt,Cb as Uf,Cc as Bt,Cd as rl,Ce as Js,Cf as i0,Cg as O3,Ch as Ap,D as Qo,Da as Ms,Db as Gf,Dc as Nn,Dd as Ws,De as H1,Df as ic,Dg as yp,Dh as Vn,E as Ln,Ea as Je,Eb as Pn,Ec as wi,Ed as qm,Ee as rp,Ef as or,Eg as vp,Eh as X0,F as Ga,Fa as Ls,Fb as Ie,Fc as V,Fd as Jm,Fe as U1,Ff as Zr,Fg as ge,Fh as _p,G as Ot,Ga as Lf,Gb as D,Gc as Hs,Gd as ki,Ge as Ho,Gf as sl,Gg as wp,Gh as $0,H as mt,Ha as Za,Hb as Be,Hc as ce,Hd as Ys,He as G1,Hf as a0,Hg as _0,Hh as j0,I as re,Ia as Kt,Ib as ht,Ic as $m,Id as S1,Ie as W1,If as l0,Ig as Yn,Ih as yc,J as _t,Ja as ut,Jb as Ja,Jc as he,Jd as M1,Je as Li,Jf as s0,Jg as rr,Jh as Pp,K as fr,Ka as Af,Kb as Ps,Kc as je,Kd as Ii,Ke as Y1,Kf as pp,Kg as P0,Kh as q0,L as Rr,La as _f,Lb as Ds,Lc as Ae,Ld as L1,Le as Hn,Lf as ac,Lg as Bi,Lh as J0,M as ys,Ma as Ro,Mb as Wf,Mc as se,Md as Vs,Me as V1,Mf as lc,Mg as D0,Mh as Q0,N as Am,Na as Pf,Nb as xr,Nc as n1,Nd as zo,Ne as Ai,Nf as sc,Ng as Tp,Nh as eb,O as vs,Oa as le,Ob as Yf,Oc as i1,Od as ee,Oe as Qs,Of as Gn,Og as $r,P as _m,Pa as w,Pb as Vf,Pc as yr,Pd as wr,Pe as K1,Pf as c0,Pg as zi,Q as Wa,Qa as hi,Qb as Kf,Qc as a1,Qd as A1,Qe as ec,Qf as Xt,Qg as $t,R as uf,Ra as An,Rb as Zf,Rc as l1,Rd as Ur,Re as yo,Rf as up,Rg as Go,S as hf,Sa as Fm,Sb as j,Sc as vr,Sd as Ks,Se as np,Sf as d0,Sg as Fi,T as Pm,Ta as gi,Tb as Xf,Tc as s1,Td as Qm,Te as ip,Tf as Di,Tg as pc,U as Ya,Ua as As,Ub as tr,Uc as Us,Ud as nl,Ue as Z1,Uf as cl,Ug as kp,V as pe,Va as bt,Vb as Mt,Vc as gt,Vd as Zs,Ve as tc,Vf as zt,Vg as dl,W as gf,Wa as bo,Wb as $f,Wc as tt,Wd as _1,We as oc,Wf as m0,Wg as uc,X as ws,Xa as Df,Xb as Rs,Xc as c1,Xd as Si,Xe as X1,Xf as p0,Xg as Ip,Y as Nr,Ya as Rf,Yb as Ei,Yc as Fr,Yd as P1,Ye as $1,Yf as wo,Yg as Sp,Z as ff,Za as fi,Zb as jf,Zc as d1,Zd as il,Ze as j1,Zf as Xr,Zg as R0,_ as bf,_a as bi,_b as Br,_c as m1,_d as Gr,_e as N3,_f as cc,_g as N0,a as gs,aa as Ef,ab as _s,ac as ot,ad as jm,ae as ep,af as al,ag as Wn,ah as hc,b as Qg,ba as yf,bb as Um,bc as zr,bd as p1,be as Xs,bf as ap,bg as u0,bh as ml,c as Sn,ca as pi,cb as Gm,cc as yi,cd as u1,ce as tp,cf as lp,cg as Ri,ch as gc,d as ef,da as Dm,db as Nf,dc as Ns,dd as tl,de as $,df as sp,dg as gp,dh as fc,e as tf,ea as Rm,eb as Wm,ec as qf,ed as h1,ee as P3,ef as cp,eg as h0,eh as B0,f as of,fa as vf,fb as L,fc as Jf,fd as g1,fe as D3,ff as _i,fg as g0,fh as z0,g as go,ga as wf,gb as Ym,gc as Zt,gd as Et,ge as R3,gf as vo,gg as f0,gh as pl,h as fs,ha as Cs,hb as De,hc as vi,hd as f1,he as D1,hf as rc,hg as b0,hh as F0,i as bs,ia as Ts,ib as Or,ic as ze,id as b1,ie as rt,if as nt,ig as x0,ih as H0,j as xs,ja as Nm,jb as Xa,jc as Qf,jd as x1,je as $s,jf as q1,jg as fp,jh as U0,k as rf,ka as Cf,kb as Of,kc as e1,kd as Bn,ke as Fo,kf as J1,kg as E0,kh as bc,l as nf,la as Tf,lb as Bf,lc as Os,ld as E1,le as zn,lf as xe,lg as y0,lh as Hi,m as af,ma as kf,mb as ao,mc as Zm,md as y1,me as R1,mf as nc,mg as v0,mh as G0,n as lf,na as If,nb as $a,nc as Bs,nd as _3,ne as Mi,nf as so,ng as w0,nh as Mp,o as Do,oa as ks,ob as ja,oc as Dn,od as v1,oe as Fe,of as dp,og as Ni,oh as B3,p as Es,pa as ui,pb as zf,pc as lo,pd as Ci,pe as N1,pf as Kr,pg as C0,ph as Ui,q as fo,qa as Sf,qb as xt,qc as Bo,qd as Ke,qe as O1,qf as ll,qg as dc,qh as ul,r as sf,ra as Om,rb as Vm,rc as zs,rd as w1,re as B1,rf as Pi,rg as T0,s as cf,sa as Bm,sb as No,sc as Fs,sd as Hr,se as Fn,sf as mp,sg as k0,sh as W0,t as df,ta as Mf,tb as Ff,tc as xo,td as ol,te as js,tf as Q1,tg as mc,u as Fa,ua as Is,ub as Km,uc as Xm,ud as me,ue as Yr,uf as e0,ug as bp,uh as Y0,v as Ha,va as zm,vb as Hf,vc as t1,vd as Eo,ve as z1,vf as Un,vg as xp,vh as V0,w as Mn,wa as Vt,wb as er,wc as Rn,wd as Gs,we as F1,wf as Uo,wg as Ep,wh as xc,x as Ua,xa as Va,xb as _n,xc as o1,xd as C1,xe as op,xf as A,xg as Oi,xh as K0,y as mf,ya as pt,yb as Qe,yc as el,yd as T1,ye as _e,yf as t0,yg as I0,yh as hl,z as Mm,za as Ss,zb as qa,zc as r1,zd as k1,ze as q,zf as o0,zg as S0,zh as Lp}from"./chunk-QXIVGAGC.js";import{a as k}from"./chunk-IY7RJBAN.js";import{J as Cp}from"./chunk-KZXLT4YB.js";import{c as A0}from"./chunk-Z3N5DIM6.js";import{b as qg,c as Jg,d as T}from"./chunk-SRAX5OIU.js";import z7,{useEffect as F7}from"react";import m3 from"clsx";import u7 from"lodash.throttle";import gr,{useContext as Tn}from"react";import{flushSync as Pr}from"react-dom";import h7 from"roughjs/bin/rough";import{nanoid as g7}from"nanoid";var vc=class{constructor(o=0){T(this,"root");T(this,"gap");this.root=null,this.gap=o}fit(o){let t=o.length,r=t>0?o[0].w:0,n=t>0?o[0].h:0;this.root={x:0,y:0,w:r,h:n};for(let i=0;i<t;i++){let a=o[i],l=this.findNode(this.root,a.w,a.h);l?a.fit=this.splitNode(l,a.w,a.h):a.fit=this.growNode(a.w,a.h)}}findNode(o,t,r){return o?o.used?this.findNode(o.right||null,t,r)||this.findNode(o.down||null,t,r):t<=o.w&&r<=o.h?o:null:null}splitNode(o,t,r){return o.used=!0,o.down={x:o.x,y:o.y+r+this.gap,w:o.w,h:o.h-r-this.gap},o.right={x:o.x+t+this.gap,y:o.y,w:o.w-t-this.gap,h:r},o}growNode(o,t){if(!this.root)return null;let r=o<=this.root.w,n=t<=this.root.h,i=n&&this.root.h>=this.root.w+o+this.gap,a=r&&this.root.w>=this.root.h+t+this.gap;return i?this.growRight(o,t):a?this.growDown(o,t):n?this.growRight(o,t):r?this.growDown(o,t):null}growRight(o,t){if(!this.root)return null;this.root={used:!0,x:0,y:0,w:this.root.w+o+this.gap,h:this.root.h,down:this.root,right:{x:this.root.w+this.gap,y:0,w:o,h:this.root.h}};let r=this.findNode(this.root,o,t);return r?this.splitNode(r,o,t):null}growDown(o,t){if(!this.root)return null;this.root={used:!0,x:0,y:0,w:this.root.w,h:this.root.h+t+this.gap,down:{x:0,y:this.root.h+this.gap,w:this.root.w,h:t},right:this.root};let r=this.findNode(this.root,o,t);return r?this.splitNode(r,o,t):null}};var z3=(e,o,t)=>{let r=so(o),n=t.x-r.minX,i=t.y-r.minY;o.forEach(a=>{e.mutateElement(a,{x:a.x+n,y:a.y+i})})},tb=(e,o,t)=>{let r=o.flatMap(c=>c.group),n=so(r),i={x:n.minX,y:n.minY},a=o.sort((c,m)=>Math.max(m.boundingBox.width,m.boundingBox.height)-Math.max(c.boundingBox.width,c.boundingBox.height)).map(c=>({w:c.boundingBox.width,h:c.boundingBox.height,group:c.group}));new vc(t).fit(a);let s=[];for(let c=0;c<a.length;c++){let m=a[c];m.fit&&s.push(m)}return s.forEach(c=>{z3(e,c.group,{x:i.x+(c.fit?.x??0),y:i.y+(c.fit?.y??0)})}),s.flatMap(c=>c.group)},gl=(e,o,t,r,n)=>{let a=Fn(o,t).map(l=>({group:l,boundingBox:so(l)}));switch(r){case"bin-packing":return tb(e,a,n);default:return console.warn(`Unimplemented algorithm [${r}] - using bin-packing`),tb(e,a,n)}};import{atom as Ne,createStore as F3}from"jotai";import{createIsolation as H3}from"jotai-scope";var ob=H3();var{useAtom:ve,useSetAtom:Gi,useAtomValue:wc,useStore:Q7}=ob,rb=ob.Provider,yt=F3();var U3=qg({"./locales/ar-SA.json":()=>import("./locales/ar-SA-G6X2FPQ2.js"),"./locales/az-AZ.json":()=>import("./locales/az-AZ-76LH7QW2.js"),"./locales/bg-BG.json":()=>import("./locales/bg-BG-XCXSNQG7.js"),"./locales/bn-BD.json":()=>import("./locales/bn-BD-2XOGV67Q.js"),"./locales/ca-ES.json":()=>import("./locales/ca-ES-6MX7JW3Y.js"),"./locales/cs-CZ.json":()=>import("./locales/cs-CZ-2BRQDIVT.js"),"./locales/da-DK.json":()=>import("./locales/da-DK-5WZEPLOC.js"),"./locales/de-DE.json":()=>import("./locales/de-DE-XR44H4JA.js"),"./locales/el-GR.json":()=>import("./locales/el-GR-BZB4AONW.js"),"./locales/en.json":()=>import("./locales/en-XFR6MADM.js"),"./locales/es-ES.json":()=>import("./locales/es-ES-U4NZUMDT.js"),"./locales/eu-ES.json":()=>import("./locales/eu-ES-A7QVB2H4.js"),"./locales/fa-IR.json":()=>import("./locales/fa-IR-HGAKTJCU.js"),"./locales/fi-FI.json":()=>import("./locales/fi-FI-Z5N7JZ37.js"),"./locales/fr-FR.json":()=>import("./locales/fr-FR-RHASNOE6.js"),"./locales/gl-ES.json":()=>import("./locales/gl-ES-HMX3MZ6V.js"),"./locales/he-IL.json":()=>import("./locales/he-IL-6SHJWFNN.js"),"./locales/hi-IN.json":()=>import("./locales/hi-IN-IWLTKZ5I.js"),"./locales/hu-HU.json":()=>import("./locales/hu-HU-A5ZG7DT2.js"),"./locales/id-ID.json":()=>import("./locales/id-ID-SAP4L64H.js"),"./locales/it-IT.json":()=>import("./locales/it-IT-JPQ66NNP.js"),"./locales/ja-JP.json":()=>import("./locales/ja-JP-DBVTYXUO.js"),"./locales/kaa.json":()=>import("./locales/kaa-6HZHGXH3.js"),"./locales/kab-KAB.json":()=>import("./locales/kab-KAB-ZGHBKWFO.js"),"./locales/kk-KZ.json":()=>import("./locales/kk-KZ-P5N5QNE5.js"),"./locales/km-KH.json":()=>import("./locales/km-KH-HSX4SM5Z.js"),"./locales/ko-KR.json":()=>import("./locales/ko-KR-MTYHY66A.js"),"./locales/ku-TR.json":()=>import("./locales/ku-TR-6OUDTVRD.js"),"./locales/lt-LT.json":()=>import("./locales/lt-LT-XHIRWOB4.js"),"./locales/lv-LV.json":()=>import("./locales/lv-LV-5QDEKY6T.js"),"./locales/mr-IN.json":()=>import("./locales/mr-IN-CRQNXWMA.js"),"./locales/my-MM.json":()=>import("./locales/my-MM-5M5IBNSE.js"),"./locales/nb-NO.json":()=>import("./locales/nb-NO-T6EIAALU.js"),"./locales/nl-NL.json":()=>import("./locales/nl-NL-IS3SIHDZ.js"),"./locales/nn-NO.json":()=>import("./locales/nn-NO-6E72VCQL.js"),"./locales/oc-FR.json":()=>import("./locales/oc-FR-POXYY2M6.js"),"./locales/pa-IN.json":()=>import("./locales/pa-IN-N4M65BXN.js"),"./locales/percentages.json":()=>import("./locales/percentages-BXMCSKIN.js"),"./locales/pl-PL.json":()=>import("./locales/pl-PL-T2D74RX3.js"),"./locales/pt-BR.json":()=>import("./locales/pt-BR-5N22H2LF.js"),"./locales/pt-PT.json":()=>import("./locales/pt-PT-UZXXM6DQ.js"),"./locales/ro-RO.json":()=>import("./locales/ro-RO-JPDTUUEW.js"),"./locales/ru-RU.json":()=>import("./locales/ru-RU-B4JR7IUQ.js"),"./locales/si-LK.json":()=>import("./locales/si-LK-N5RQ5JYF.js"),"./locales/sk-SK.json":()=>import("./locales/sk-SK-C5VTKIMK.js"),"./locales/sl-SI.json":()=>import("./locales/sl-SI-NN7IZMDC.js"),"./locales/sv-SE.json":()=>import("./locales/sv-SE-XGPEYMSR.js"),"./locales/ta-IN.json":()=>import("./locales/ta-IN-2NMHFXQM.js"),"./locales/th-TH.json":()=>import("./locales/th-TH-HPSO5L25.js"),"./locales/tr-TR.json":()=>import("./locales/tr-TR-DEFEU3FU.js"),"./locales/uk-UA.json":()=>import("./locales/uk-UA-QMV73CPH.js"),"./locales/vi-VN.json":()=>import("./locales/vi-VN-M7AON7JQ.js"),"./locales/zh-CN.json":()=>import("./locales/zh-CN-LNUGB5OW.js"),"./locales/zh-HK.json":()=>import("./locales/zh-HK-E62DVLB3.js"),"./locales/zh-TW.json":()=>import("./locales/zh-TW-RAJ6MFWO.js")});var G3=85,nr={code:"en",label:"English"},Yi=[nr,...[{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(e=>A0[e.code]>=G3).sort((e,o)=>e.label>o.label?1:-1)],Tc="__test__";Mt()&&Yi.unshift({code:Tc,label:"test language"},{code:`${Tc}.rtl`,label:"\u202Atest language (rtl)\u202C",rtl:!0});var Wi=nr,Cc={},kc=async e=>{if(Wi=e,document.documentElement.dir=Wi.rtl?"rtl":"ltr",document.documentElement.lang=Wi.code,e.code.startsWith(Tc))Cc={};else try{Cc=await U3(`./locales/${Wi.code}.json`)}catch(o){console.error(`Failed to load language ${e.code}:`,o.message),Cc=Cp}yt.set(ib,e.code)},Cr=()=>Wi,nb=(e,o)=>{for(let t=0;t<o.length;++t){let r=o[t];if(e[r]===void 0)return;e=e[r]}if(typeof e=="string")return e},g=(e,o,t)=>{if(Wi.code.startsWith(Tc))return`\u202A[[${o?`${e}(${JSON.stringify(o).slice(1,-1)})`:e}]]\u202C`;let r=e.split("."),n=nb(Cc,r)||nb(Cp,r)||t;if(n===void 0){let i=`Can't find translation for ${e}`;if(k.PROD)return console.warn(i),"";throw new Error(i)}if(o)for(let i in o)n=n.replace(`{{${i}}}`,String(o[i]));return n},ib=Ne(nr.code),it=()=>{let e=wc(ib);return{t:g,langCode:e}};import W3 from"clsx";import Y3 from"open-color";import Lt from"react";import{Fragment as Se,jsx as h,jsxs as N}from"react/jsx-runtime";var Wo=e=>"var(--icon-fill-color)",ab=e=>e===re.LIGHT?Y3.white:"#1e1e1e",_=(e,o=512)=>{let{width:t=512,height:r=t,mirror:n,style:i,...a}=typeof o=="number"?{width:o}:o;return h("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${t} ${r}`,className:W3({"rtl-mirror":n}),style:i,...a,children:typeof e=="string"?h("path",{fill:"currentColor",d:e}):e})},U={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},ae={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},g8=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("rect",{x:3,y:8,width:18,height:4,rx:1}),h("line",{x1:12,y1:8,x2:12,y2:21}),h("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),h("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"})]}),U),Vi=_(N("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),h("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),h("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),h("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),h("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),U),lb=_(N("svg",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),h("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),U),sb=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"1"}),h("circle",{cx:"12",cy:"19",r:"1"}),h("circle",{cx:"12",cy:"5",r:"1"})]}),U),cb=_(N("svg",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),h("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),h("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),U),Dp=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M6.5 9.5l3.5 -3"}),h("path",{d:"M14 5.5l3 1.5"}),h("path",{d:"M18.5 10l-2.5 7"}),h("path",{d:"M13.5 17.5l-7 -5"})]}),U),Tr=_(N("g",{children:[h("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"}),h("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"}),h("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:h("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"})}),h("g",{mask:"url(#UnlockedIcon)",children:h("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"})})]}),ae),jr=_(N("g",{strokeWidth:"1.25",children:[h("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"}),h("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),h("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"})]}),ae),db=_(h("g",{fill:"currentColor",children:h("path",{d:"M12 2a5 5 0 0 1 5 5v3a3 3 0 0 1 3 3v6a3 3 0 0 1 -3 3h-10a3 3 0 0 1 -3 -3v-6a3 3 0 0 1 3 -3v-3a5 5 0 0 1 5 -5m0 12a2 2 0 0 0 -1.995 1.85l-.005 .15a2 2 0 1 0 2 -2m0 -10a3 3 0 0 0 -3 3v3h6v-3a3 3 0 0 0 -3 -3"})}),{width:24,height:24}),mb=_(N(Se,{children:[h("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"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),h("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"}),pb=_(N(Se,{children:[h("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"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),h("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"}),ub=_(N(Se,{children:[h("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"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),h("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"}),f8=_(h("g",{fill:"currentColor",children:h("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"}),Ic=_(N("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),fl=_(N("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,children:[h("path",{d:"M4.028 13.252c-.657 -.972 -1.028 -2.078 -1.028 -3.252c0 -3.866 4.03 -7 9 -7s9 3.134 9 7s-4.03 7 -9 7c-1.913 0 -3.686 -.464 -5.144 -1.255"}),h("path",{d:"M5 15m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 17c0 1.42 .316 2.805 1 4"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),qr=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),U),Jr=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"})]}),U),Qr=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"})]}),U),Ki=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),h("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),h("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),U),en=_(h("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),ae),hb=_(N("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),h("path",{d:"M16 7h4"}),h("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),U),ir=_(N("g",{strokeWidth:"1.25",children:[h("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"}),h("path",{d:"m11.25 5.417 3.333 3.333"})]}),ae),tn=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),h("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),h("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),h("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),h("polyline",{points:"5 20 11 4 13 4 20 20"})]}),U),Sc=_(N("g",{strokeWidth:"1.25",children:[h("path",{d:"M12.5 6.667h.01"}),h("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"}),h("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),h("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),ae),Mc=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M18 13.3l-6.3 -6.3"})]}),U),Rp=_(h("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),ae),Np=_(h("path",{d:"M5 10h10",strokeWidth:"1.25"}),ae),gb=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M21 21l-6 -6"}),h("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"}),h("path",{d:"M3 4v4h4"})]}),U),kr=_(h("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"}),ae),fb=_(N("g",{strokeWidth:"1.5",children:[h("polyline",{points:"12 16 18 10 12 4"}),h("polyline",{points:"8 4 2 10 8 16"})]}),ae),bl=_(N("g",{strokeWidth:"1.25",children:[h("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"}),h("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"})]}),ae),xl=_(h("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"}),ae),El=_(h("g",{stroke:"currentColor",strokeLinejoin:"round",children:h("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"})}),{...ae,strokeWidth:1.5}),Lc=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),h("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),h("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),U),Kn=_(h("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"}),ae),Zi=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"}),h("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),U),bb=_(N("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"}),h("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),U),b8=_(h("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"}),ae),xb=_(h("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"}),ae),Eb=_(N("g",{strokeWidth:"1.25",children:[h("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"}),h("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"})]}),ae),yb=_(N("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 4l11.733 16h4.267l-11.733 -16z"}),h("path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"})]}),U),vb=_(h("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),yl=_(N("g",{strokeWidth:"1.25",children:[h("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"}),h("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"})]}),ae),wb=_("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}),Cb=_("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}),Xi=_(h("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"}),ae),x8=_("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}),Tb=_("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"),Ac=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z"}),h("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"}),h("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"})]}),U),kb=_(h("g",{strokeWidth:1.5,children:h("path",{d:"M6 18l12 -12"})}),U),_c=_(N("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 8h.01"}),h("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),h("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),h("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),h("path",{d:"M19 16v6"}),h("path",{d:"M22 19l-3 3l-3 -3"})]}),U),Ib=_("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}),E8=_("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}),y8=_("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}),Sb=_("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"),v8=_("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"),Op=_(h("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"}),ae),Bp=_(h("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"}),ae),Mb=_("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}),Lb=_(h("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"}),ae),w8=_("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"),C8=_("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}),T8=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M12 14v-11"}),h("path",{d:"M9 6l3 -3l3 3"})]}),U),k8=_(N(Se,{children:[h("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"}),h("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}),I8=_(h("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}),Ab=N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 10l0 10"}),h("path",{d:"M12 10l4 4"}),h("path",{d:"M12 10l-4 4"}),h("path",{d:"M4 4l16 0"})]}),_b=N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 5l0 14"}),h("path",{d:"M16 9l-4 -4"}),h("path",{d:"M8 9l4 -4"})]}),zp=_(_b,U),Fp=_(_b,{...U,style:{transform:"rotate(180deg)"}}),Hp=_(Ab,U),Up=_(Ab,{...U,style:{transform:"rotate(180deg)"}}),Gp=_(N(Se,{children:[N("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),Wp=_(N(Se,{children:[N("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),Yp=_(N(Se,{children:[N("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),Vp=_(N(Se,{children:[N("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),Pb=_(N(Se,{children:[N("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),Db=_(N(Se,{children:[N("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),Kp=_(N("g",{stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),h("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),ae),Zp=_(N("g",{stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),h("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),ae),Pc=_(N("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"9",cy:"7",r:"4"}),h("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),h("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),h("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),U),S8=_("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"),M8=_("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"),Co=_(N(Se,{children:[h("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("path",{d:"M15 5 5 15M5 5l10 10"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),L8=_("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}),A8=_("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}),_8=_("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}),Xp=Lt.memo(({theme:e})=>_(N(Se,{children:[h("path",{d:"M25 26H111V111H25",fill:Wo(e)}),h("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:Wo(e),strokeWidth:"2"}),h("path",{d:"M100 100H160V160H100",fill:Wo(e)}),h("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:Wo(e),strokeWidth:"2"}),N("g",{fill:ab(e),stroke:Wo(e),strokeWidth:"6",children:[h("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),$p=Lt.memo(({theme:e})=>_(N(Se,{children:[h("path",{d:"M25 26H111V111H25",fill:Wo(e)}),h("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:Wo(e),strokeWidth:"2"}),h("path",{d:"M100 100H160V160H100",fill:Wo(e)}),h("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:Wo(e),strokeWidth:"2"}),N("g",{fill:ab(e),stroke:Wo(e),strokeWidth:"6",children:[h("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),h("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),Rb=_(h("g",{strokeWidth:1.25,children:h("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"})}),ae),Nb=_(N(Se,{children:[h("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"}),h("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:h("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"})}),h("g",{mask:"url(#FillHachureIcon)",children:h("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"})})]}),ae),Ob=_(N(Se,{children:[N("g",{clipPath:"url(#a)",children:[h("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"}),h("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:h("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"})}),h("g",{mask:"url(#FillCrossHatchIcon)",children:h("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"})})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),Bb=_(N(Se,{children:[h("g",{clipPath:"url(#a)",children:h("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"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),{...ae,fill:"currentColor"}),jp=_(h(Se,{children:h("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),ae),zb=_(h("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),ae),Fb=_(h("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),ae),P8=Lt.memo(({theme:e})=>_(h("path",{d:"M6 10H34",stroke:Wo(e),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})),Hb=_(N("g",{strokeWidth:"2",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12h2"}),h("path",{d:"M17 12h2"}),h("path",{d:"M11 12h2"})]}),U),Ub=_(N("g",{strokeWidth:"2",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 12v.01"}),h("path",{d:"M8 12v.01"}),h("path",{d:"M12 12v.01"}),h("path",{d:"M16 12v.01"}),h("path",{d:"M20 12v.01"})]}),U),Gb=_(h("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"}),ae),Wb=_(h("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"}),ae),Yb=_(h("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"}),ae),Vb=_(N("svg",{strokeWidth:"1.5",children:[h("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"}),h("path",{d:"M13.3333 3.33331V3.34331"}),h("path",{d:"M16.6667 3.33331V3.34331"}),h("path",{d:"M16.6667 6.66669V6.67669"}),h("path",{d:"M16.6667 10V10.01"}),h("path",{d:"M3.33334 13.3333V13.3433"}),h("path",{d:"M16.6667 13.3333V13.3433"}),h("path",{d:"M3.33334 16.6667V16.6767"}),h("path",{d:"M6.66666 16.6667V16.6767"}),h("path",{d:"M10 16.6667V16.6767"}),h("path",{d:"M13.3333 16.6667V16.6767"}),h("path",{d:"M16.6667 16.6667V16.6767"})]}),ae),Kb=_(N("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),h("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),h("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),h("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),h("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),h("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),h("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),h("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),h("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),h("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),h("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),h("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),U),Zb=_(N("g",{stroke:"currentColor",opacity:.3,strokeWidth:2,children:[h("path",{d:"M12 12l9 0"}),h("path",{d:"M3 9l6 6"}),h("path",{d:"M3 15l6 -6"})]}),U),Xb=Lt.memo(({flip:e=!1})=>_(N("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[h("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),h("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})),$b=Lt.memo(({flip:e=!1})=>_(N("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[h("path",{d:"M32 10L6 10",strokeWidth:2}),h("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),jb=Lt.memo(({flip:e=!1})=>_(N("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[h("path",{d:"M26 10L6 10"}),h("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),qb=Lt.memo(({flip:e=!1})=>_(h("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",children:h("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})),Jb=Lt.memo(({flip:e=!1})=>_(N("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[h("path",{d:"M32 10L6 10",strokeWidth:2}),h("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})),Qb=Lt.memo(({flip:e=!1})=>_(N("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",children:[h("path",{d:"M6,9.5H27"}),h("path",{d:"M27,5L34,10L27,14Z",fill:"none"})]}),{width:40,height:20})),ex=Lt.memo(({flip:e=!1})=>_(N("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{d:"M6,9.5H20"}),h("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),tx=Lt.memo(({flip:e=!1})=>_(N("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{d:"M6,9.5H20"}),h("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),ox=Lt.memo(({flip:e=!1})=>_(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),rx=Lt.memo(({flip:e=!1})=>_(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L15,15 L15,5"})}),{width:40,height:20})),nx=Lt.memo(({flip:e=!1})=>_(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L15,16 L15,4 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),ix=_(N(Se,{children:[h("g",{clipPath:"url(#a)",children:h("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"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),ax=_(N(Se,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),lx=_(N(Se,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),sx=_(h(Se,{children:h("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"})}),ae),Zn=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 7v-2h13v2"}),h("path",{d:"M10 5v14"}),h("path",{d:"M12 19h-4"}),h("path",{d:"M15 13v-1h6v1"}),h("path",{d:"M18 12v7"}),h("path",{d:"M17 19h2"})]}),U),cx=_(h(Se,{children:N("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 12h10"}),h("path",{d:"M7 5v14"}),h("path",{d:"M17 5v14"}),h("path",{d:"M15 19h4"}),h("path",{d:"M15 5h4"}),h("path",{d:"M5 19h4"}),h("path",{d:"M5 5h4"})]})}),U),vl=_(h(Se,{children:h("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("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"})})}),ae),Dc=_(N(Se,{children:[h("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("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"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ae),dx=_(N("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),h("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),U),mx=_(N("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),h("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),U),px=_(N("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),h("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),U),ux=Lt.memo(({theme:e})=>_(N("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),h("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),U)),hx=Lt.memo(({theme:e})=>_(N("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),h("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),U)),gx=Lt.memo(({theme:e})=>_(N("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),h("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),h("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),U)),Rc=_(N("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M21 19h-18l9 -15"}),h("path",{d:"M20.615 15.171h.015"}),h("path",{d:"M19.515 11.771h.015"}),h("path",{d:"M17.715 8.671h.015"}),h("path",{d:"M15.415 5.971h.015"})]}),U),fx=_(h("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}),D8=_(h("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"})),Nc=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),h("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),h("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),h("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"})]}),U),qp=_(N(Se,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),h("path",{d:"M7 11l5 5l5 -5"}),h("path",{d:"M12 4l0 12"})]}),U),$i=_(N(Se,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]}),U),bx=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("path",{d:"M9.15 14.85l8.85 -10.85"}),h("path",{d:"M6 4l8.85 10.85"})]}),U),xx=_(N(Se,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),h("path",{d:"M12 17l0 .01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),U),R8=_(N(Se,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 4v16l13 -8z"})]}),U),N8=_(N(Se,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"})]}),U),Ex=_(N(Se,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12l5 5l10 -10"})]}),U),yx=_(N(Se,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M12 9v4"}),h("path",{d:"M12 17h.01"})]}),U),vx=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M11 7l6 6"}),h("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"})]}),U),Jp=_(N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 3l-4 7h8z"}),h("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("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"})]}),U),ji=_(N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 7l16 0"}),h("path",{d:"M4 17l16 0"}),h("path",{d:"M7 4l0 16"}),h("path",{d:"M17 4l0 16"})]}),U),wx=_(h("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"})),O8=_(N("g",{strokeWidth:"1.25",children:[h("path",{d:"M4.16602 10H15.8327"}),h("path",{d:"M12.5 13.3333L15.8333 10"}),h("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),ae),wl=_(N("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[h("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"}),h("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),Cx=_(N("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z"}),h("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),h("path",{d:"M15 6l3 3"}),h("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"}),h("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"})]}),U),B8=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z"}),h("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),h("path",{d:"M15 6l3 3"}),h("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"}),h("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"})]}),U),z8=_(N("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35"}),h("path",{d:"M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946"}),h("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"}),h("path",{d:"M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45"}),h("path",{d:"M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946"}),h("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"})]}),U),Tx=_(N("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),h("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),h("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),h("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"})]}),U),Xn=_(N("g",{stroke:"currentColor",fill:"none",strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"}),h("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"})]}),U),kx=_(N("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"}),h("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"}),h("path",{d:"M3 3l18 18"})]}),U),F8=_(N("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("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"}),h("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),h("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),h("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),h("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),U),Ix=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("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"}),h("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),h("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),h("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),h("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),U),co=_(N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),h("path",{d:"M21 21l-6 -6"})]}),U),Sx=_(N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M20.984 12.53a9 9 0 1 0 -7.552 8.355"}),h("path",{d:"M12 7v5l3 3"}),h("path",{d:"M19 16l-2 3h4l-2 3"})]}),U),Mx=_(N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M5 10a7 7 0 0 0 14 0"}),h("path",{d:"M8 21l8 0"}),h("path",{d:"M12 17l0 4"})]}),U),Lx=_(N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 3l18 18"}),h("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"}),h("path",{d:"M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85"}),h("path",{d:"M8 21l8 0"}),h("path",{d:"M12 17l0 4"})]}),U),Cl=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"})]}),U),Ax=_(N("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M12 20v.01"}),h("path",{d:"M16 20v.01"}),h("path",{d:"M8 20v.01"}),h("path",{d:"M4 20v.01"}),h("path",{d:"M4 16v.01"}),h("path",{d:"M4 12v.01"}),h("path",{d:"M4 8v.01"}),h("path",{d:"M4 4v.01"}),h("path",{d:"M8 4v.01"}),h("path",{d:"M12 4v.01"}),h("path",{d:"M16 4v.01"}),h("path",{d:"M20 4v.01"}),h("path",{d:"M20 8v.01"}),h("path",{d:"M20 12v.01"}),h("path",{d:"M20 16v.01"}),h("path",{d:"M20 20v.01"})]}),U),_x=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 3v18"}),h("path",{d:"M19 21v-18"}),h("path",{d:"M5 7h14"}),h("path",{d:"M5 15h14"}),h("path",{d:"M8 13v4"}),h("path",{d:"M11 13v4"}),h("path",{d:"M16 13v4"}),h("path",{d:"M14 5v4"}),h("path",{d:"M11 5v4"}),h("path",{d:"M8 5v4"}),h("path",{d:"M3 21h18"})]}),U),Px=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 12l18 0"}),h("path",{d:"M7 16l10 0l-10 5l0 -5"}),h("path",{d:"M7 8l10 0l-10 -5l0 5"})]}),U),Dx=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 3l0 18"}),h("path",{d:"M16 7l0 10l5 0l-5 -10"}),h("path",{d:"M8 7l0 10l-5 0l5 -10"})]}),U),Qp=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"}),h("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"})]}),U),Oc=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"}),h("path",{d:"M22 22l-3 -3"}),h("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),h("path",{d:"M3 11v-1"}),h("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),h("path",{d:"M10 3h1"}),h("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"})]}),U),Rx=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),h("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),h("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"}),h("path",{d:"M10 15l2 6l2 -6"}),h("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"})]}),U),Nx=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),h("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),h("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"}),h("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"}),h("path",{d:"M11 21v-6l3 6v-6"})]}),U),Ox=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M4 8l5 0"}),h("path",{d:"M15 8l4 0"})]}),U),Bx=_(N("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),h("path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),h("path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z"}),h("path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555"})]}),U),zx=_(N("g",{stroke:"currentColor",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"})]}),{...U,strokeWidth:1.5}),H8=_(N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"}),h("path",{d:"M21 12h-13l3 -3"}),h("path",{d:"M11 15l-3 -3"})]}),U),U8=_(N("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M10 9l5 3l-5 3z"})]}),U),Fx=_(N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 6h18"}),h("path",{d:"M3 12h18"}),h("path",{d:"M3 18h18"}),h("path",{d:"M6 3v18"}),h("path",{d:"M12 3v18"}),h("path",{d:"M18 3v18"})]}),U),Hx=_(N("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M17 3m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),h("path",{d:"M3 17m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),h("path",{d:"M17 5c-6.627 0 -12 5.373 -12 12"})]}),U),Bc=_(N("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 18l12 -12"}),h("path",{d:"M18 10v-4h-4"})]}),U),zc=_(N("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4,19L10,19C11.097,19 12,18.097 12,17L12,9C12,7.903 12.903,7 14,7L21,7"}),h("path",{d:"M18 4l3 3l-3 3"})]}),U),Fc=_(N("g",{children:[h("path",{d:"M16,12L20,9L16,6"}),h("path",{d:"M6 20c0 -6.075 4.925 -11 11 -11h3"})]}),U),Hc=_(N("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 9l6 6l6 -6"})]}),U),Ux=_(N("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 15l6 -6l6 6"})]}),U),Gx=_(N("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 15l6 -6l6 6"})]}),U),eu=_(N("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"}),h("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"})]}),U),Uc=_(N("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 7l0 10"}),h("path",{d:"M7 5l10 0"}),h("path",{d:"M7 19l10 0"}),h("path",{d:"M19 7l0 10"})]}),U),tu=_(N("g",{strokeWidth:"1.25",children:[h("rect",{x:"4",y:"4",width:"4",height:"4",rx:"1"}),h("rect",{x:"10",y:"4",width:"4",height:"4",rx:"1"}),h("rect",{x:"16",y:"4",width:"4",height:"4",rx:"1"}),h("rect",{x:"4",y:"10",width:"4",height:"4",rx:"1"}),h("rect",{x:"10",y:"10",width:"4",height:"4",rx:"1"}),h("rect",{x:"16",y:"10",width:"4",height:"4",rx:"1"}),h("rect",{x:"4",y:"16",width:"4",height:"4",rx:"1"}),h("rect",{x:"10",y:"16",width:"4",height:"4",rx:"1"}),h("rect",{x:"16",y:"16",width:"4",height:"4",rx:"1"})]}),U),ou=_(h("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:.5,viewBox:"0 0 640 512",children:h("path",{d:"M15 15C24.4 5.7 39.6 5.7 49 15l63 63L112 40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 96c0 13.3-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l38.1 0L15 49C5.7 39.6 5.7 24.4 15 15zM133.5 243.9C158.6 193.6 222.7 112 320 112s161.4 81.6 186.5 131.9c3.8 7.6 3.8 16.5 0 24.2C481.4 318.4 417.3 400 320 400s-161.4-81.6-186.5-131.9c-3.8-7.6-3.8-16.5 0-24.2zM320 320a64 64 0 1 0 0-128 64 64 0 1 0 0 128zM591 15c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-63 63 38.1 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24s24 10.7 24 24l0 38.1 63-63zM15 497c-9.4-9.4-9.4-24.6 0-33.9l63-63L40 400c-13.3 0-24-10.7-24-24s10.7-24 24-24l96 0c13.3 0 24 10.7 24 24l0 96c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-38.1L49 497c-9.4 9.4-24.6 9.4-33.9 0zm576 0l-63-63 0 38.1c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24l96 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-38.1 0 63 63c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0z"})}),U);import Wx from"clsx";import nu,{useEffect as Z3,useRef as Yx,useState as X3}from"react";import V3 from"react";import{jsx as ru}from"react/jsx-runtime";var K3=({size:e="1em",circleWidth:o=8,synchronized:t=!1,className:r=""})=>{let i=-(V3.useRef(Date.now()).current%1600);return ru("div",{className:`Spinner ${r}`,children:ru("svg",{viewBox:"0 0 100 100",style:{width:e,height:e,"--spinner-delay":t?`${i}ms`:0},children:ru("circle",{cx:"50",cy:"50",r:50-o/2,strokeWidth:o,fill:"none",strokeMiterlimit:"10"})})})},mo=K3;import{jsx as Tl,jsxs as kl}from"react/jsx-runtime";var K=nu.forwardRef(({size:e="medium",visible:o=!0,className:t="",...r},n)=>{let{id:i}=at(),a=nu.useRef(null);nu.useImperativeHandle(n,()=>a.current);let l=`ToolIcon_size_${e}`,[s,c]=X3(!1),m=Yx(!0),d=async u=>{let f="onClick"in r&&r.onClick?.(u);if(Br(f))try{c(!0),await f}catch(b){if(b instanceof Bi)console.warn(b);else throw b}finally{m.current&&c(!1)}};Z3(()=>(m.current=!0,()=>{m.current=!1}),[]);let p=Yx(null);if(r.type==="button"||r.type==="icon"||r.type==="submit"){let u=r.type==="icon"?"button":r.type;return kl("button",{className:Wx("ToolIcon_type_button",l,t,o&&!r.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!r.hidden,"ToolIcon--selected":r.selected,"ToolIcon--plain":r.type==="icon"}),style:r.style,"data-testid":r["data-testid"],hidden:r.hidden,title:r.title,"aria-label":r["aria-label"],type:u,onClick:d,ref:a,disabled:s||r.isLoading||!!r.disabled,children:[(r.icon||r.label)&&kl("div",{className:"ToolIcon__icon","aria-hidden":"true","aria-disabled":!!r.disabled,children:[r.icon||r.label,r.keyBindingLabel&&Tl("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel}),r.isLoading&&Tl(mo,{})]}),r.showAriaLabel&&kl("div",{className:"ToolIcon__label",children:[r["aria-label"]," ",s&&Tl(mo,{})]}),r.children]})}return kl("label",{className:Wx("ToolIcon",t),title:r.title,onPointerDown:u=>{p.current=u.pointerType||null,r.onPointerDown?.({pointerType:u.pointerType||null})},onPointerUp:()=>{requestAnimationFrame(()=>{p.current=null})},children:[Tl("input",{className:`ToolIcon_type_radio ${l}`,type:"radio",name:r.name,"aria-label":r["aria-label"],"aria-keyshortcuts":r["aria-keyshortcuts"],"data-testid":r["data-testid"],id:`${i}-${r.id}`,onChange:()=>{r.onChange?.({pointerType:p.current})},checked:r.checked,ref:a}),kl("div",{className:"ToolIcon__icon",children:[r.icon,r.keyBindingLabel&&Tl("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel})]})]})});K.displayName="ToolButton";var Gc=[],O=e=>(Gc=Gc.concat(e),e);import{jsx as j3}from"react/jsx-runtime";var $3=(e,o,t)=>{let r=new Set(q(e.filter(m=>ce(m)),o).map(m=>m.id)),n={},i=t.scene.getNonDeletedElementsMap(),a=new Set;for(let m of r){let d=Ho(e,m);for(let p of d)if(!a.has(p.id)){if(tt(p)){let u=Eo(p,i);u&&(n[u.id]=!0)}else n[p.id]=!0;a.add(p.id)}}let l=!0,s=e.map(m=>{if(o.selectedElementIds[m.id]){let d=tt(m)?Eo(m,i):null;return m.frameId&&r.has(m.frameId)?(l=!1,n[m.id]=!0,m):d?.frameId&&r.has(d?.frameId)?m:(m.boundElements&&m.boundElements.forEach(p=>{let u=t.scene.getNonDeletedElementsMap().get(p.id);u&&se(u)&&t.scene.mutateElement(u,{startBinding:m.id===u.startBinding?.elementId?null:u.startBinding,endBinding:m.id===u.endBinding?.elementId?null:u.endBinding})}),ee(m,{isDeleted:!0}))}return m.frameId&&r.has(m.frameId)?(l=!1,tt(m)||(n[m.id]=!0),ee(m,{frameId:null})):tt(m)&&o.selectedElementIds[m.containerId]?ee(m,{isDeleted:!0}):m}),c=o.editingGroupId;if(l&&o.editingGroupId){let m=Fe(s,o.editingGroupId).filter(d=>!d.isDeleted);if(m.length>1)m[0]&&(n[m[0].id]=!0);else{c=null,m[0]&&(n[m[0].id]=!0);let d=m[0];if(d){let p=d.groupIds.findIndex(f=>f===o.editingGroupId),u=d.groupIds[p+1];if(u){let f=Fe(s,u).filter(b=>!b.isDeleted);f.length>1&&(c=u,f.forEach(b=>{n[b.id]=!0}))}}}}return{elements:s,appState:{...o,...rt({selectedElementIds:n,editingGroupId:c},s,o,null)}}},Vx=(e,o)=>{if(e.editingGroupId){let t=Fe(ge(o),e.editingGroupId);if(t.length)return{...e,selectedElementIds:{[t[0].id]:!0}}}return e},Il=O({name:"deleteSelectedElements",label:"labels.delete",icon:kr,trackEvent:{category:"element",action:"delete"},perform:(e,o,t,r)=>{if(o.editingLinearElement){let{elementId:a,selectedPointsIndices:l,startBindingElement:s,endBindingElement:c}=o.editingLinearElement,m=r.scene.getNonDeletedElementsMap(),d=$.getElement(a,m);if(!d||l==null)return!1;if(d.points.length<2){let u=e.map(b=>b.id===d.id?ee(b,{isDeleted:!0}):b),f=Vx(o,u);return{elements:u,appState:{...f,editingLinearElement:null},captureUpdate:A.IMMEDIATELY}}let p={startBindingElement:l?.includes(0)?null:s,endBindingElement:l?.includes(d.points.length-1)?null:c};return $.deletePoints(d,r,l),{elements:e,appState:{...o,editingLinearElement:{...o.editingLinearElement,...p,selectedPointsIndices:l?.[0]>0?[l[0]-1]:[0]}},captureUpdate:A.IMMEDIATELY}}let{elements:n,appState:i}=$3(e,o,r);return Xs(n,n.filter(a=>a.isDeleted)),i=Vx(i,n),{elements:n,appState:{...i,activeTool:Ie(o,{type:"selection"}),multiElement:null,activeEmbeddable:null,selectedLinearElement:null},captureUpdate:_e(ge(e),o)?A.IMMEDIATELY:A.EVENTUALLY}},keyTest:(e,o,t)=>(e.key===w.BACKSPACE||e.key===w.DELETE)&&!e[w.CTRL_OR_CMD],PanelComponent:({elements:e,appState:o,updateData:t})=>j3(K,{type:"button",icon:kr,title:g("labels.delete"),"aria-label":g("labels.delete"),onClick:()=>t(null),visible:_e(ge(e),o)})});import{jsx as Wc}from"react/jsx-runtime";var iu=O({name:"sendBackward",label:"labels.sendBackward",keywords:["move down","zindex","layer"],icon:Fp,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:I0(e,o,r.scene),appState:o,captureUpdate:A.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[w.CTRL_OR_CMD]&&!e.shiftKey&&e.code===le.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>Wc("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendBackward")} \u2014 ${D("CtrlOrCmd+[")}`,children:Fp})}),au=O({name:"bringForward",label:"labels.bringForward",keywords:["move up","zindex","layer"],icon:zp,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:S0(e,o,r.scene),appState:o,captureUpdate:A.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[w.CTRL_OR_CMD]&&!e.shiftKey&&e.code===le.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>Wc("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.bringForward")} \u2014 ${D("CtrlOrCmd+]")}`,children:zp})}),lu=O({name:"sendToBack",label:"labels.sendToBack",keywords:["move down","zindex","layer"],icon:Up,trackEvent:{category:"element"},perform:(e,o)=>({elements:M0(e,o),appState:o,captureUpdate:A.IMMEDIATELY}),keyTest:e=>Do?e[w.CTRL_OR_CMD]&&e.altKey&&e.code===le.BRACKET_LEFT:e[w.CTRL_OR_CMD]&&e.shiftKey&&e.code===le.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>Wc("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendToBack")} \u2014 ${Do?D("CtrlOrCmd+Alt+["):D("CtrlOrCmd+Shift+[")}`,children:Up})}),su=O({name:"bringToFront",label:"labels.bringToFront",keywords:["move up","zindex","layer"],icon:Hp,trackEvent:{category:"element"},perform:(e,o)=>({elements:L0(e,o),appState:o,captureUpdate:A.IMMEDIATELY}),keyTest:e=>Do?e[w.CTRL_OR_CMD]&&e.altKey&&e.code===le.BRACKET_RIGHT:e[w.CTRL_OR_CMD]&&e.shiftKey&&e.code===le.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>Wc("button",{type:"button",className:"zIndexButton",onClick:t=>e(null),title:`${g("labels.bringToFront")} \u2014 ${Do?D("CtrlOrCmd+Alt+]"):D("CtrlOrCmd+Shift+]")}`,children:Hp})});var cu=O({name:"selectAll",label:"labels.selectAll",icon:Ax,trackEvent:{category:"canvas"},viewMode:!1,perform:(e,o,t,r)=>{if(o.editingLinearElement)return!1;let n=e.filter(i=>!i.isDeleted&&!(V(i)&&i.containerId)&&!i.locked).reduce((i,a)=>(i[a.id]=!0,i),{});return{appState:{...o,...rt({editingGroupId:null,selectedElementIds:n},ge(e),o,r),selectedLinearElement:Object.keys(n).length===1&&he(e[0])?new $(e[0],j(e)):null},captureUpdate:A.IMMEDIATELY}},keyTest:e=>e[w.CTRL_OR_CMD]&&e.key===w.A});import{jsx as q3}from"react/jsx-runtime";var du=O({name:"duplicateSelection",label:"labels.duplicateSelection",icon:bl,trackEvent:{category:"element"},perform:(e,o,t,r)=>{if(o.selectedElementsAreBeingDragged)return!1;if(o.editingLinearElement)try{let a=$.duplicateSelectedPoints(o,r.scene);return{elements:e,appState:a,captureUpdate:A.IMMEDIATELY}}catch{return!1}let{duplicatedElements:n,elementsWithDuplicates:i}=Un({type:"in-place",elements:e,idsOfElementsToDuplicate:j(q(e,o,{includeBoundTextElement:!0,includeElementsInFrames:!0})),appState:o,randomizeSeed:!0,overrides:({origElement:a,origIdToDuplicateId:l})=>{let s=a.frameId&&l.get(a.frameId);return{x:a.x+Pm/2,y:a.y+Pm/2,frameId:s??a.frameId}}});if(r.props.onDuplicate&&i){let a=r.props.onDuplicate(i,e);a&&(i=a)}return{elements:or(i,j(n)),appState:{...o,...Js(n,ge(i),o)},captureUpdate:A.IMMEDIATELY}},keyTest:e=>e[w.CTRL_OR_CMD]&&e.key===w.D,PanelComponent:({elements:e,appState:o,updateData:t})=>q3(K,{type:"button",icon:bl,title:`${g("labels.duplicateSelection")} \u2014 ${D("CtrlOrCmd+D")}`,"aria-label":g("labels.duplicateSelection"),onClick:()=>t(null),visible:_e(ge(e),o)})});import{useEffect as _u,useMemo as S6,useRef as Pu,useState as M6}from"react";var J3=new Set(["command_palette","export"]),Ee=(e,o,t,r)=>{try{if(typeof window>"u"||k.VITE_WORKER_ID||k.VITE_APP_ENABLE_TRACKING!=="true"||!J3.has(e)||Mt())return;k.PROD||console.info("trackEvent",{category:e,action:o,label:t,value:r}),window.sa_event&&window.sa_event(o,{category:e,label:t,value:r})}catch(n){console.error("error during analytics",n)}};import o5 from"clsx";import Q3 from"clsx";import{forwardRef as e5}from"react";import{jsx as t5}from"react/jsx-runtime";var qi=e5((e,o)=>{let{title:t,className:r,testId:n,active:i,standalone:a,icon:l,onClick:s}=e;return t5("button",{type:"button",ref:o,title:t,"data-testid":n,className:Q3(r,{standalone:a,active:i}),onClick:s,style:e.style,children:l},t)});import{Fragment as n5,jsx as mu,jsxs as r5}from"react/jsx-runtime";var To=e=>mu(n5,{children:e.options.map(o=>e.type==="button"?mu(qi,{icon:o.icon,title:o.text,testId:o.testId,active:o.active??e.value===o.value,onClick:t=>e.onClick(o.value,t)},o.text):r5("label",{className:o5({active:e.value===o.value}),title:o.text,children:[mu("input",{type:"radio",name:e.group,onChange:()=>e.onChange(o.value),checked:e.value===o.value,"data-testid":o.testId}),o.icon]},o.text))});import*as $c from"@radix-ui/react-popover";import W5 from"clsx";import{useRef as Y5}from"react";import{jsx as i5}from"react/jsx-runtime";var Yc=()=>i5("div",{style:{width:1,height:"1rem",backgroundColor:"var(--default-border-color)",margin:"0 auto"}});import{useEffect as c5,useRef as d5}from"react";import{createPortal as m5}from"react-dom";import Kx from"react";var pu=Kx.createContext(null),Pe=()=>Kx.useContext(pu);import{useState as a5,useLayoutEffect as Zx}from"react";var Vc=e=>{let[o,t]=a5(null),r=be(),{theme:n}=Pe(),{container:i}=at();return Zx(()=>{o&&(o.className="",o.classList.add("excalidraw",...e?.className?.split(/\s+/)||[]),o.classList.toggle("excalidraw--mobile",r.editor.isMobile),o.classList.toggle("theme--dark",n===re.DARK))},[o,n,r.editor.isMobile,e?.className]),Zx(()=>{let a=e?.parentSelector?i?.querySelector(e.parentSelector):document.body;if(!a)return;let l=document.createElement("div");return a.appendChild(l),t(l),()=>{a.removeChild(l)}},[i,e?.parentSelector]),o};import{useEffect as l5}from"react";function Ji(e,o,t){l5(()=>{function r(n){let i=n;if(!e.current)return;let a=t?.(i,e.current);if(a===!0)return;if(a===!1)return o(i);e.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]")||o(i)}return document.addEventListener("pointerdown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("pointerdown",r),document.removeEventListener("touchstart",r)}},[e,o,t])}import{useRef as s5}from"react";var on=e=>{let o=s5(e);return Object.assign(o.current,e),o.current};import{jsx as p5}from"react/jsx-runtime";var rn=Ne(null),Xx=({onCancel:e,onChange:o,onSelect:t,colorPickerType:r})=>{let n=Vc({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),i=Pe(),a=nn(),l=vt(),s=q(a,i),c=on({app:l,onCancel:e,onChange:o,onSelect:t,selectedElements:s}),{container:m}=at();c5(()=>{let p=d.current;if(!p||!l.canvas||!n)return;let u=!1,f=l.canvas.getContext("2d"),b=({clientX:I,clientY:P})=>{let M=f.getImageData((I-i.offsetLeft)*window.devicePixelRatio,(P-i.offsetTop)*window.devicePixelRatio,1,1).data;return lf(M[0],M[1],M[2])},x=({clientX:I,clientY:P,altKey:M})=>{p.style.top=`${P+20}px`,p.style.left=`${I+20}px`;let B=b({clientX:I,clientY:P});u&&c.onChange(r,B,c.selectedElements,{altKey:M}),p.style.background=B},E=()=>{c.onCancel()},y=(I,P)=>{c.onSelect(I,P)},v=I=>{u=!0,I.stopImmediatePropagation()},C=I=>{u=!1,m?.focus(),I.stopImmediatePropagation(),I.preventDefault(),y(b(I),I)},S=I=>{I.key===w.ESCAPE&&(I.preventDefault(),I.stopImmediatePropagation(),E())};return n.tabIndex=-1,n.focus(),x({clientX:c.app.lastViewportPosition.x,clientY:c.app.lastViewportPosition.y,altKey:!1}),n.addEventListener("keydown",S),n.addEventListener("pointerdown",v),n.addEventListener("pointerup",C),window.addEventListener("pointermove",x,{passive:!0}),window.addEventListener("blur",E),()=>{u=!1,n.removeEventListener("keydown",S),n.removeEventListener("pointerdown",v),n.removeEventListener("pointerup",C),window.removeEventListener("pointermove",x),window.removeEventListener("blur",E)}},[c,l.canvas,n,r,m,i.offsetLeft,i.offsetTop]);let d=d5(null);return Ji(d,()=>{e()},p=>!!p.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")),n?m5(p5("div",{ref:d,className:"excalidraw-eye-dropper-preview"}),n):null};import*as Qi from"@radix-ui/react-popover";import f5 from"clsx";import b5 from"react";import u5 from"react";import h5 from"clsx";import{jsx as g5}from"react/jsx-runtime";var ft=u5.forwardRef(({children:e,padding:o,className:t,style:r},n)=>g5("div",{className:h5("Island",t),style:{"--padding":o,...r},ref:n,children:e}));import{jsx as uu,jsxs as x5}from"react/jsx-runtime";var Kc=b5.forwardRef(({className:e,container:o,children:t,style:r,onClose:n,onKeyDown:i,onFocusOutside:a,onPointerLeave:l,onPointerDownOutside:s},c)=>{let m=be();return uu(Qi.Portal,{container:o,children:x5(Qi.Content,{ref:c,className:f5("focus-visible-none",e),"data-prevent-outside-click":!0,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-popup)"},onPointerLeave:l,onKeyDown:i,onFocusOutside:a,onPointerDownOutside:s,onCloseAutoFocus:d=>{d.stopPropagation(),d.preventDefault(),o&&!Hf(document.activeElement)&&o.focus(),n()},children:[uu(ft,{padding:3,style:r,children:t}),uu(Qi.Arrow,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})});import E5 from"clsx";import{useCallback as y5,useEffect as gu,useRef as qx,useState as v5}from"react";var an=({palette:e,color:o})=>{if(!o)return null;for(let[t,r]of Object.entries(e))if(Array.isArray(r)){let n=r.indexOf(o);if(n>-1)return{colorName:t,shade:n}}else if(r===o)return{colorName:t,shade:null};return null},Sl=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),hu=({color:e,palette:o})=>!Object.values(o).flat().includes(e),jx=(e,o,t)=>{let r={elementBackground:"backgroundColor",elementStroke:"strokeColor"},n=e.filter(a=>{if(a.isDeleted)return!1;let l=a[r[o]];return hu({color:l,palette:t})}),i=new Map;return n.forEach(a=>{let l=a[r[o]];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,Qg)},ko=Ne(null),$x=(e,o,t)=>(e*299+o*587+t*114)/1e3,ea=(e,o=160)=>{if(!e)return!0;if(e==="transparent")return!1;if(!e.startsWith("#")){let i=document.createElement("div");if(i.style.color=e,i.style.color){i.style.position="absolute",i.style.visibility="hidden",i.style.width="0",i.style.height="0",document.body.appendChild(i);let a=getComputedStyle(i).color;document.body.removeChild(i);let l=a.replace(/^(rgb|rgba)\(/,"").replace(/\)$/,"").replace(/\s/g,"").split(","),s=parseInt(l[0]),c=parseInt(l[1]),m=parseInt(l[2]);return $x(s,c,m)<o}return!0}let t=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),n=parseInt(e.slice(5,7),16);return $x(t,r,n)<o};import{Fragment as w5,jsx as Zc,jsxs as Jx}from"react/jsx-runtime";var Qx=({color:e,onChange:o,label:t,colorPickerType:r,placeholder:n})=>{let i=be(),[a,l]=v5(e),[s,c]=ve(ko);gu(()=>{l(e)},[e]);let m=y5(b=>{let x=b.toLowerCase(),E=eE(x);E&&o(E),l(x)},[o]),d=qx(null),p=qx(null);gu(()=>{d.current&&d.current.focus()},[s]);let[u,f]=ve(rn);return gu(()=>()=>{f(null)},[f]),Jx("div",{className:"color-picker__input-label",children:[Zc("div",{className:"color-picker__input-hash",children:"#"}),Zc("input",{ref:s==="hex"?d:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":t,onChange:b=>{m(b.target.value)},value:(a||"").replace(/^#/,""),onBlur:()=>{l(e)},tabIndex:-1,onFocus:()=>c("hex"),onKeyDown:b=>{b.key!==w.TAB&&(b.key===w.ESCAPE&&p.current?.focus(),b.stopPropagation())},placeholder:n}),!i.editor.isMobile&&Jx(w5,{children:[Zc("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),Zc("div",{ref:p,className:E5("excalidraw-eye-dropper-trigger",{selected:u}),onClick:()=>f(b=>b?null:{keepOpenOnAlt:!1,onSelect:x=>o(x),colorPickerType:r}),title:`${g("labels.eyeDropper")} \u2014 ${w.I.toLocaleUpperCase()} or ${D("Alt")} `,children:vx})]})]})};import Eu,{useEffect as yu,useImperativeHandle as H5,useState as U5}from"react";import k5 from"clsx";import{useEffect as I5,useRef as S5}from"react";import{jsxs as T5}from"react/jsx-runtime";var C5=({color:e,keyLabel:o,isShade:t=!1})=>T5("div",{className:"color-picker__button__hotkey-label",style:{color:ea(e)?"#fff":"#000"},children:[t&&"\u21E7",o]}),ta=C5;import{jsx as fu,jsxs as M5}from"react/jsx-runtime";var tE=({colors:e,color:o,onChange:t,label:r})=>{let[n,i]=ve(ko),a=S5(null);return I5(()=>{a.current&&a.current.focus()},[o,n]),fu("div",{className:"color-picker-content--default",children:e.map((l,s)=>M5("button",{ref:o===l?a:void 0,tabIndex:-1,type:"button",className:k5("color-picker__button color-picker__button--large has-outline",{active:o===l,"is-transparent":l==="transparent"||!l}),onClick:()=>{t(l),i("custom")},title:l,"aria-label":r,style:{"--swatch-color":l},children:[fu("div",{className:"color-picker__button-outline"}),fu(ta,{color:l,keyLabel:s+1})]},s))})};import L5 from"clsx";import{useEffect as A5,useRef as _5}from"react";import{jsx as bu,jsxs as D5}from"react/jsx-runtime";var P5=({palette:e,color:o,onChange:t,activeShade:r})=>{let n=an({color:o,palette:e}),[i,a]=ve(ko),l=_5(null);return A5(()=>{l.current&&i==="baseColors"&&l.current.focus()},[n?.colorName,i]),bu("div",{className:"color-picker-content--default",children:Object.entries(e).map(([s,c],m)=>{let d=(Array.isArray(c)?c[r]:c)||"transparent",p=Sl[m],u=g(`colors.${s.replace(/\d+/,"")}`,null,"");return D5("button",{ref:n?.colorName===s?l:void 0,tabIndex:-1,type:"button",className:L5("color-picker__button color-picker__button--large has-outline",{active:n?.colorName===s,"is-transparent":d==="transparent"||!d}),onClick:()=>{t(d),a("baseColors")},title:`${u}${d.startsWith("#")?` ${d}`:""} \u2014 ${p}`,"aria-label":`${u} \u2014 ${p}`,style:d?{"--swatch-color":d}:void 0,"data-testid":`color-${s}`,children:[bu("div",{className:"color-picker__button-outline"}),bu(ta,{color:d,keyLabel:p})]},s)})})},oE=P5;import{jsx as N5}from"react/jsx-runtime";var R5=({children:e})=>N5("div",{className:"color-picker__heading",children:e}),oa=R5;import O5 from"clsx";import{useEffect as B5,useRef as z5}from"react";import{jsx as Ml,jsxs as rE}from"react/jsx-runtime";var nE=({color:e,onChange:o,palette:t})=>{let r=an({color:e||"transparent",palette:t}),[n,i]=ve(ko),a=z5(null);if(B5(()=>{a.current&&n==="shades"&&a.current.focus()},[r,n]),r){let{colorName:l,shade:s}=r,c=t[l];if(Array.isArray(c))return Ml("div",{className:"color-picker-content--default shades",children:c.map((m,d)=>rE("button",{ref:d===s&&n==="shades"?a:void 0,tabIndex:-1,type:"button",className:O5("color-picker__button color-picker__button--large has-outline",{active:d===s}),"aria-label":"Shade",title:`${l} - ${d+1}`,style:m?{"--swatch-color":m}:void 0,onClick:()=>{o(m),i("shades")},children:[Ml("div",{className:"color-picker__button-outline"}),Ml(ta,{color:m,keyLabel:d+1,isShade:!0})]},d))})}return rE("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[Ml("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),Ml("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")})]})};var xu=(e,o,t)=>{let r=Math.ceil(t/Sn);switch(o=o??-1,e){case"ArrowLeft":{let n=o-1;return n<0?t-1:n}case"ArrowRight":return(o+1)%t;case"ArrowDown":{let n=o+Sn;return n>=t?o%Sn:n}case"ArrowUp":{let n=o-Sn,i=n<0?Sn*r+n:n;return i>=t?void 0:i}}},F5=({e,colorObj:o,onChange:t,palette:r,customColors:n,setActiveColorPickerSection:i,activeShade:a})=>{if(o?.shade!=null&&["Digit1","Digit2","Digit3","Digit4","Digit5"].includes(e.code)&&e.shiftKey){let l=Number(e.code.slice(-1))-1;return t(r[o.colorName][l]),i("shades"),!0}if(["1","2","3","4","5"].includes(e.key)&&n[Number(e.key)-1])return t(n[Number(e.key)-1]),i("custom"),!0;if(Sl.includes(e.key)){let l=Sl.indexOf(e.key),s=Object.keys(r)[l],c=r[s],m=Array.isArray(c)?c[a]:c;return t(m),i("baseColors"),!0}return!1},iE=({event:e,activeColorPickerSection:o,palette:t,color:r,onChange:n,customColors:i,setActiveColorPickerSection:a,updateData:l,activeShade:s,onEyeDropperToggle:c,onEscape:m})=>{if(e[w.CTRL_OR_CMD])return!1;if(e.key===w.ESCAPE)return m(e),!0;if(e.key===w.ALT)return c(!0),!0;if(e.key===w.I)return c(),!0;let d=an({color:r,palette:t});if(e.key===w.TAB){let p={custom:!!i.length,baseColors:!0,shades:d?.shade!=null,hex:!0},u=Object.entries(p).reduce((y,[v,C])=>(C&&y.push(v),y),[]),f=u.indexOf(o),b=e.shiftKey?-1:1,x=f+b>u.length-1?0:f+b<0?u.length-1:f+b,E=u[x];return E&&a(E),E==="custom"?n(i[0]):E==="baseColors"&&(Object.entries(t).find(([v,C])=>Array.isArray(C)?C.includes(r):C===r?v:null)||n(go.black)),e.preventDefault(),e.stopPropagation(),!0}if(F5({e,colorObj:d,onChange:n,palette:t,customColors:i,setActiveColorPickerSection:a,activeShade:s}))return!0;if(o==="shades"&&d){let{shade:p}=d,u=xu(e.key,p,Sn);if(u!==void 0)return n(t[d.colorName][u]),!0}if(o==="baseColors"&&d){let{colorName:p}=d,u=Object.keys(t),f=u.indexOf(p),b=xu(e.key,f,u.length);if(b!==void 0){let x=u[b],E=t[x];return n(Array.isArray(E)?E[s]:E),!0}}if(o==="custom"){let p=r!=null?i.indexOf(r):0,u=xu(e.key,p,i.length);if(u!==void 0){let f=i[u];return n(f),!0}}return!1};import{jsx as $n,jsxs as Xc}from"react/jsx-runtime";var aE=Eu.forwardRef(({color:e,onChange:o,type:t,elements:r,palette:n,updateData:i,children:a,onEyeDropperToggle:l,onEscape:s},c)=>{let[m]=Eu.useState(()=>t==="canvasBackground"?[]:jx(r,t,n)),[d,p]=ve(ko),u=an({color:e,palette:n});yu(()=>{if(!d){let E=!!e&&hu({color:e,palette:n}),y=E&&!m.includes(e);p(y?null:E?"custom":u?.shade!=null?"shades":"baseColors")}},[d,e,n,p,u,m]);let[f,b]=U5(u?.shade??(t==="elementBackground"?of:tf));yu(()=>{u?.shade!=null&&b(u.shade);let E=y=>{y.key===w.ALT&&l(!1)};return document.addEventListener("keyup",E,{capture:!0}),()=>{document.removeEventListener("keyup",E,{capture:!0})}},[u,l]);let x=Eu.useRef(null);return H5(c,()=>x.current),yu(()=>{x?.current?.focus()},[]),$n("div",{role:"dialog","aria-modal":"true","aria-label":g("labels.colorPicker"),children:Xc("div",{ref:x,onKeyDown:E=>{iE({event:E,activeColorPickerSection:d,palette:n,color:e,onChange:o,onEyeDropperToggle:l,customColors:m,setActiveColorPickerSection:p,updateData:i,activeShade:f,onEscape:s})&&(E.preventDefault(),E.stopPropagation())},className:"color-picker-content properties-content",tabIndex:-1,children:[!!m.length&&Xc("div",{children:[$n(oa,{children:g("colorPicker.mostUsedCustomColors")}),$n(tE,{colors:m,color:e,label:g("colorPicker.mostUsedCustomColors"),onChange:o})]}),Xc("div",{children:[$n(oa,{children:g("colorPicker.colors")}),$n(oE,{color:e,palette:n,onChange:o,activeShade:f})]}),Xc("div",{children:[$n(oa,{children:g("colorPicker.shades")}),$n(nE,{color:e,onChange:o,palette:n})]}),a]})})});import G5 from"clsx";import{jsx as vu}from"react/jsx-runtime";var lE=({onChange:e,type:o,activeColor:t,topPicks:r})=>{let n;return o==="elementStroke"&&(n=fs),o==="elementBackground"&&(n=bs),o==="canvasBackground"&&(n=xs),r&&(n=r),n?vu("div",{className:"color-picker__top-picks",children:n.map(i=>vu("button",{className:G5("color-picker__button",{active:i===t,"is-transparent":i==="transparent"||!i,"has-outline":!ea(i,gs)}),style:{"--swatch-color":i},type:"button",title:i,onClick:()=>e(i),"data-testid":`color-top-pick-${i}`,children:vu("div",{className:"color-picker__button-outline"})},i))}):(console.error("Invalid type for TopPicks"),null)};import{jsx as Vo,jsxs as wu}from"react/jsx-runtime";var sE=e=>{let o=new Option().style;return o.color=e,!!o.color},eE=e=>xr(e)?e:sE(`#${e}`)?`#${e}`:sE(e)?e:null,V5=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=go,updateData:a})=>{let{container:l}=at(),[,s]=ve(ko),[c,m]=ve(rn),d=wu("div",{children:[Vo(oa,{children:g("colorPicker.hexCode")}),Vo(Qx,{color:o||"",label:r,onChange:f=>{t(f)},colorPickerType:e,placeholder:g("colorPicker.color")})]}),p=Y5(null),u=()=>{p.current?.focus()};return Vo(Kc,{container:l,style:{maxWidth:"13rem"},onFocusOutside:f=>{u(),f.preventDefault()},onPointerDownOutside:f=>{c&&f.preventDefault()},onClose:()=>{a({openPopup:null}),s(null)},children:i?Vo(aE,{ref:p,palette:i,color:o,onChange:f=>{t(f)},onEyeDropperToggle:f=>{m(b=>f?(b=b||{keepOpenOnAlt:!0,onSelect:t,colorPickerType:e},b.keepOpenOnAlt=!0,b):f===!1||b?null:{keepOpenOnAlt:!1,onSelect:t,colorPickerType:e})},onEscape:f=>{c?m(null):a({openPopup:null})},type:e,elements:n,updateData:a,children:d}):d})},K5=({label:e,color:o,type:t})=>Vo($c.Trigger,{type:"button",className:W5("color-picker__button active-color properties-trigger",{"is-transparent":!o||o==="transparent","has-outline":!o||!ea(o,gs)}),"aria-label":e,style:o?{"--swatch-color":o}:void 0,title:t==="elementStroke"?g("labels.showStroke"):g("labels.showBackground"),children:Vo("div",{className:"color-picker__button-outline",children:!o&&kb})}),Ll=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=go,topPicks:a,updateData:l,appState:s})=>Vo("div",{children:wu("div",{role:"dialog","aria-modal":"true",className:"color-picker-container",children:[Vo(lE,{activeColor:o,onChange:t,type:e,topPicks:a}),Vo(Yc,{}),wu($c.Root,{open:s.openPopup===e,onOpenChange:c=>{l({openPopup:c?e:null})},children:[Vo(K5,{color:o,label:r,type:e}),s.openPopup===e&&Vo(V5,{type:e,color:o,onChange:t,label:r,elements:n,palette:i,updateData:l})]})]})});import*as xE from"@radix-ui/react-popover";import g6,{useCallback as f6,useMemo as b6}from"react";import s6,{useMemo as ln,useState as c6,useRef as d6,useEffect as m6,useCallback as p6}from"react";import Z5 from"clsx";import X5 from"react";import{jsx as $5,jsxs as j5}from"react/jsx-runtime";var jc=X5.forwardRef(({className:e,placeholder:o,onChange:t},r)=>j5("div",{className:Z5("QuickSearch__wrapper",e),children:[co,$5("input",{ref:r,className:"QuickSearch__input",type:"text",placeholder:o,onChange:n=>t(n.target.value.trim().toLowerCase())})]}));import q5 from"clsx";import{Children as J5}from"react";import{jsx as cE}from"react/jsx-runtime";var qc=({className:e,placeholder:o,children:t})=>{let r=!J5.count(t);return cE("div",{className:q5("ScrollableList__wrapper",e),role:"menu",children:r?cE("div",{className:"empty",children:o}):t})};import{jsx as Q5,jsxs as e6}from"react/jsx-runtime";var dE=({children:e,className:o="",style:t,title:r})=>e6("div",{className:`dropdown-menu-group ${o}`,style:t,children:[r&&Q5("p",{className:"dropdown-menu-group-title",children:r}),e]}),Al=dE;dE.displayName="DropdownMenuGroup";import{useEffect as a6,useRef as l6}from"react";import{Fragment as o6,jsx as Cu,jsxs as r6}from"react/jsx-runtime";var t6=({textStyle:e,icon:o,shortcut:t,children:r})=>{let n=be();return r6(o6,{children:[o&&Cu("div",{className:"dropdown-menu-item__icon",children:o}),Cu("div",{style:e,className:"dropdown-menu-item__text",children:r}),t&&!n.editor.isMobile&&Cu("div",{className:"dropdown-menu-item__shortcut",children:t})]})},Jc=t6;import n6,{useContext as i6}from"react";var Tu=n6.createContext({}),Qc=(e="",o=!1,t=!1)=>`dropdown-menu-item dropdown-menu-item-base ${e}
2
2
  ${o?"dropdown-menu-item--selected":""} ${t?"dropdown-menu-item--hovered":""}`.trim(),ed=(e,o)=>{let t=i6(Tu);return zr(e,r=>{let n=new CustomEvent("menu.itemSelect",{bubbles:!0,cancelable:!0});o?.(n),n.defaultPrevented||t.onSelect?.(n)})};import{jsx as ku}from"react/jsx-runtime";var Iu=({icon:e,value:o,order:t,children:r,shortcut:n,className:i,hovered:a,selected:l,textStyle:s,onSelect:c,onClick:m,...d})=>{let p=ed(m,c),u=l6(null);return a6(()=>{a&&(t===0?u.current?.scrollIntoView({block:"end"}):u.current?.scrollIntoView({block:"nearest"}))},[a,t]),ku("button",{...d,ref:u,value:o,onClick:p,className:Qc(i,l,a),title:d.title??d["aria-label"],children:ku(Jc,{textStyle:s,icon:e,shortcut:n,children:r})})};Iu.displayName="DropdownMenuItem";var ra={GREEN:"green",RED:"red",BLUE:"blue"},td=({type:e=ra.BLUE,children:o})=>{let{theme:t}=ar(),r={display:"inline-flex",marginLeft:"auto",padding:"2px 4px",borderRadius:6,fontSize:9,fontFamily:"Cascadia, monospace",border:t===re.LIGHT?"1.5px solid white":"none"};switch(e){case ra.GREEN:Object.assign(r,{backgroundColor:"var(--background-color-badge)",color:"var(--color-badge)"});break;case ra.RED:Object.assign(r,{backgroundColor:"pink",color:"darkred"});break;case ra.BLUE:default:Object.assign(r,{background:"var(--color-promo)",color:"var(--color-surface-lowest)"})}return ku("div",{className:"DropDownMenuItemBadge",style:r,children:o})};td.displayName="DropdownMenuItemBadge";Iu.Badge=td;var jt=Iu;var mE=({event:e,inputRef:o,hoveredFont:t,filteredFonts:r,onClose:n,onSelect:i,onHover:a})=>{if(!e[w.CTRL_OR_CMD]&&e.shiftKey&&e.key.toLowerCase()===w.F)return o.current?.focus(),!0;if(e.key===w.ESCAPE)return n(),!0;if(e.key===w.ENTER)return t?.value&&i(t.value),!0;if(e.key===w.ARROW_DOWN)return t?.next?a(t.next.value):r[0]?.value&&a(r[0].value),!0;if(e.key===w.ARROW_UP)return t?.prev?a(t.prev.value):r[r.length-1]?.value&&a(r[r.length-1].value),!0};import{jsx as _l,jsxs as pE}from"react/jsx-runtime";var u6=e=>{switch(e){case mt.Excalifont:case mt.Virgil:return ir;case mt.Nunito:case mt.Helvetica:return vl;case mt["Lilita One"]:return cx;case mt["Comic Shanns"]:case mt.Cascadia:return Dc;default:return vl}},uE=s6.memo(({selectedFontFamily:e,hoveredFontFamily:o,onSelect:t,onHover:r,onLeave:n,onOpen:i,onClose:a})=>{let{container:l}=at(),{fonts:s}=vt(),{showDeprecatedFonts:c}=lr(),[m,d]=c6(""),p=d6(null),u=ln(()=>Array.from($r.registered.entries()).filter(([M,{metadata:B}])=>!B.private&&!B.fallback).map(([M,{metadata:B,fontFaces:R}])=>{let z={value:M,icon:u6(M),text:R[0]?.fontFace?.family??"Unknown"};return B.deprecated&&Object.assign(z,{deprecated:B.deprecated,badge:{type:ra.RED,placeholder:g("fontList.badge.old")}}),z}).sort((M,B)=>M.text.toLowerCase()>B.text.toLowerCase()?1:-1),[]),f=ln(()=>new Set(s.getSceneFamilies()),[e]),b=ln(()=>u.filter(M=>f.has(M.value)),[u,f]),x=ln(()=>u.filter(M=>!f.has(M.value)&&(c||!M.deprecated)),[u,f,c]),E=ln(()=>Xf([...b,...x].filter(M=>M.text?.toLowerCase().includes(m))),[b,x,m]),y=ln(()=>{let M;return o?M=E.find(B=>B.value===o):e&&(M=E.find(B=>B.value===e)),!M&&m&&(E[0]?.value?r(E[0].value):n()),M},[o,e,m,E,r,n]),v=p6(M=>{mE({event:M,inputRef:p,hoveredFont:y,filteredFonts:E,onSelect:t,onHover:r,onClose:a})&&(M.preventDefault(),M.stopPropagation())},[y,E,t,r,a]);m6(()=>(i(),()=>{a()}),[]);let C=ln(()=>E.filter(M=>f.has(M.value)),[E,f]),S=ln(()=>E.filter(M=>!f.has(M.value)),[E,f]),I=(M,B)=>pE(jt,{icon:M.icon,value:M.value,order:B,textStyle:{fontFamily:_n({fontFamily:M.value})},hovered:M.value===y?.value,selected:M.value===e,tabIndex:M.value===e?0:-1,onClick:R=>{t(Number(R.currentTarget.value))},onMouseMove:()=>{y?.value!==M.value&&r(M.value)},children:[M.text,M.badge&&_l(td,{type:M.badge.type,children:M.badge.placeholder})]},M.value),P=[];return C.length&&P.push(_l(Al,{title:g("fontList.sceneFonts"),children:C.map(I)},"group_1")),S.length&&P.push(_l(Al,{title:g("fontList.availableFonts"),children:S.map((M,B)=>I(M,B+C.length))},"group_2")),pE(Kc,{className:"properties-content",container:l,style:{width:"15rem"},onClose:a,onPointerLeave:n,onKeyDown:v,children:[_l(jc,{ref:p,placeholder:g("quickSearch.placeholder"),onChange:qa(d,20)}),_l(qc,{className:"dropdown-menu fonts manual-hover",placeholder:g("fontList.empty"),children:P.length?P:null})]})},(e,o)=>e.selectedFontFamily===o.selectedFontFamily&&e.hoveredFontFamily===o.hoveredFontFamily);import*as hE from"@radix-ui/react-popover";import{useMemo as h6}from"react";import{jsx as Su}from"react/jsx-runtime";var gE=({selectedFontFamily:e})=>{let o=h6(()=>!!(e&&!fE(e)),[e]);return Su(hE.Trigger,{asChild:!0,children:Su("div",{children:Su(qi,{standalone:!0,icon:tn,title:g("labels.showFonts"),className:"properties-trigger",testId:"font-family-show-fonts",active:o,onClick:()=>{}})})})};import{jsx as Pl,jsxs as bE}from"react/jsx-runtime";var EE=[{value:mt.Excalifont,icon:ir,text:g("labels.handDrawn"),testId:"font-family-hand-drawn"},{value:mt.Nunito,icon:vl,text:g("labels.normal"),testId:"font-family-normal"},{value:mt["Comic Shanns"],icon:Dc,text:g("labels.code"),testId:"font-family-code"}],x6=new Set(EE.map(e=>e.value)),fE=e=>e?x6.has(e):!1,yE=g6.memo(({isOpened:e,selectedFontFamily:o,hoveredFontFamily:t,onSelect:r,onHover:n,onLeave:i,onPopupChange:a})=>{let l=b6(()=>EE,[]),s=f6(c=>{c&&r(c)},[r]);return bE("div",{role:"dialog","aria-modal":"true",className:"FontPicker__container",children:[Pl("div",{className:"buttonList",children:Pl(To,{type:"button",options:l,value:o,onClick:s})}),Pl(Yc,{}),bE(xE.Root,{open:e,onOpenChange:a,children:[Pl(gE,{selectedFontFamily:o}),e&&Pl(uE,{selectedFontFamily:o,hoveredFontFamily:t,onSelect:s,onHover:n,onLeave:i,onOpen:()=>a(!0),onClose:()=>a(!1)})]})]})},(e,o)=>e.isOpened===o.isOpened&&e.selectedFontFamily===o.selectedFontFamily&&e.hoveredFontFamily===o.hoveredFontFamily);import*as ia from"@radix-ui/react-popover";import w6 from"clsx";import od,{useEffect as C6}from"react";import{jsx as E6}from"react/jsx-runtime";var na=({icon:e})=>E6("span",{style:{width:"1em",margin:"0 0.5ex 0 0.5ex",display:"inline-block",lineHeight:0,verticalAlign:"middle"},children:e});import{Fragment as v6,jsx as vE,jsxs as wE}from"react/jsx-runtime";var y6=({label:e,open:o,openTrigger:t,children:r,className:n,showCollapsedIcon:i=!0})=>wE(v6,{children:[wE("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center"},className:n,onClick:t,children:[e,i&&vE(na,{icon:o?Ux:Hc})]}),o&&vE("div",{style:{display:"flex",flexDirection:"column"},children:r})]}),Dl=y6;import{jsx as jn,jsxs as Mu}from"react/jsx-runtime";var T6=Ne(!1);function k6({options:e,value:o,label:t,onChange:r,onClose:n,numberOfOptionsToAlwaysShow:i=e.length}){let a=be(),l=u=>{let f=e.find(b=>b.keyBinding===u.key.toLowerCase());if(!(u.metaKey||u.altKey||u.ctrlKey)&&f)r(f.value),u.preventDefault();else if(u.key===w.TAB){let b=e.findIndex(E=>E.value===o),x=u.shiftKey?(e.length+b-1)%e.length:(b+1)%e.length;r(e[x].value)}else if(An(u.key)){let b=Cr().rtl,x=e.findIndex(E=>E.value===o);if(x!==-1){let E=e.length,y=x;switch(u.key){case(b?w.ARROW_LEFT:w.ARROW_RIGHT):y=(x+1)%E;break;case(b?w.ARROW_RIGHT:w.ARROW_LEFT):y=(E+x-1)%E;break;case w.ARROW_DOWN:{y=(x+(i??1))%E;break}case w.ARROW_UP:{y=(E+x-(i??1))%E;break}}r(e[y].value)}u.preventDefault()}else(u.key===w.ESCAPE||u.key===w.ENTER)&&(u.preventDefault(),n());u.nativeEvent.stopImmediatePropagation(),u.stopPropagation()},[s,c]=ve(T6),m=od.useMemo(()=>e.slice(0,i),[e,i]),d=od.useMemo(()=>e.slice(i),[e,i]);C6(()=>{m.some(u=>u.value===o)||c(!0)},[o,m,c]);let p=u=>jn("div",{className:"picker-content",children:u.map((f,b)=>Mu("button",{type:"button",className:w6("picker-option",{active:o===f.value}),onClick:x=>{r(f.value)},title:`${f.text} ${f.keyBinding&&`\u2014 ${f.keyBinding.toUpperCase()}`}`,"aria-label":f.text||"none","aria-keyshortcuts":f.keyBinding||void 0,ref:x=>{o===f.value&&setTimeout(()=>{x?.focus()},0)},children:[f.icon,f.keyBinding&&jn("span",{className:"picker-keybinding",children:f.keyBinding})]},f.text))});return jn(ia.Content,{side:a.editor.isMobile&&!a.viewport.isLandscape?"top":"bottom",align:"start",sideOffset:12,style:{zIndex:"var(--zIndex-popup)"},onKeyDown:l,children:Mu("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":t,children:[p(m),d.length>0&&jn(Dl,{label:g("labels.more_options"),open:s,openTrigger:()=>{c(u=>!u)},className:"picker-collapsible",children:p(d)})]})})}function Lu({value:e,label:o,options:t,onChange:r,group:n="",numberOfOptionsToAlwaysShow:i}){let[a,l]=od.useState(!1),s=od.useRef(null);return jn("div",{children:Mu(ia.Root,{open:a,onOpenChange:c=>l(c),children:[jn(ia.Trigger,{name:n,type:"button","aria-label":o,onClick:()=>l(!a),ref:s,className:a?"active":"",children:t.find(c=>c.value===e)?.icon}),a&&jn(k6,{options:t,value:e,label:o,onChange:r,onClose:()=>{l(!1)},numberOfOptionsToAlwaysShow:i})]})})}import CE,{useEffect as I6}from"react";import{jsx as Au,jsxs as TE}from"react/jsx-runtime";var kE=({updateData:e,app:o,testId:t})=>{let r=CE.useRef(null),n=CE.useRef(null),i=o.scene.getSelectedElements(o.state),a=!0,l=i.at(0),c=i.reduce((m,d)=>(m!=null&&m!==d.opacity&&(a=!1),m==null||m>d.opacity?d.opacity:m),l?.opacity??null)??o.state.currentItemOpacity;return I6(()=>{if(r.current&&n.current){let m=r.current,d=n.current,p=m.offsetWidth,u=15,f=c/100*(p-u)+u/2;d.style.left=`${f}px`,m.style.background=`linear-gradient(to right, var(--color-slider-track) 0%, var(--color-slider-track) ${c}%, var(--button-bg) ${c}%, var(--button-bg) 100%)`}},[c]),TE("label",{className:"control-label",children:[g("labels.opacity"),TE("div",{className:"range-wrapper",children:[Au("input",{style:{"--color-slider-track":a?void 0:"var(--button-bg)"},ref:r,type:"range",min:"0",max:"100",step:"10",onChange:m=>{e(+m.target.value)},value:c,className:"range-input","data-testid":t}),Au("div",{className:"value-bubble",ref:n,children:c!==0?c:null}),Au("div",{className:"zero-label",children:"0"})]})]})};import{Fragment as ME,jsx as ne,jsxs as Jt}from"react/jsx-runtime";var SE=.1,Ft=(e,o,t,r=!1)=>{let n=j(q(e,o,{includeBoundTextElement:r}));return e.map(i=>n.get(i.id)||i.id===o.editingTextElement?.id?t(i):i)},qt=function(e,o,t,r,n){let i=o.state.editingTextElement,a=ge(e),l=null;if(i&&(l=t(i)),!l)if(_e(a,o.state)){let c=o.scene.getSelectedElements(o.state),m=r===!0?c:c.filter(d=>r(d));l=Bs(m,t)??(typeof n=="function"?n(!0):n)}else l=typeof n=="function"?n(!1):n;return l},L6=(e,o,t)=>tt(o)||!o.autoResize?o:t.mutateElement(o,{x:e.textAlign==="left"?e.x:e.x+(e.width-o.width)/(e.textAlign==="center"?2:1),y:e.y+(e.height-o.height)/2}),Du=(e,o,t,r,n)=>{let i=new Set,a=Ft(e,o,l=>{if(V(l)){let s=r(l);i.add(s);let c=ee(l,{fontSize:s});return Ke(c,t.scene.getContainerElement(l),t.scene),c=L6(l,c,t.scene),c}return l},!0);return q(e,o,{includeBoundTextElement:!0}).forEach(l=>{V(l)&&Gr(l,t.scene)}),{elements:a,appState:{...o,currentItemFontSize:i.size===1?[...i][0]:n??o.currentItemFontSize},captureUpdate:A.IMMEDIATELY}},A6=O({name:"changeStrokeColor",label:"labels.stroke",trackEvent:!1,perform:(e,o,t)=>({...t.currentItemStrokeColor&&{elements:Ft(e,o,r=>al(r.type)?ee(r,{strokeColor:t.currentItemStrokeColor}):r,!0)},appState:{...o,...t},captureUpdate:t.currentItemStrokeColor?A.IMMEDIATELY:A.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Jt(ME,{children:[ne("h3",{"aria-hidden":"true",children:g("labels.stroke")}),ne(Ll,{topPicks:r.props.strokeColorTopPicks??fs,palette:rf,type:"elementStroke",label:g("labels.stroke"),color:qt(e,r,n=>n.strokeColor,!0,n=>n?null:o.currentItemStrokeColor),onChange:n=>t({currentItemStrokeColor:n}),elements:e,appState:o,updateData:t})]})}),_6=O({name:"changeBackgroundColor",label:"labels.changeBackground",trackEvent:!1,perform:(e,o,t,r)=>{if(!t.currentItemBackgroundColor)return{appState:{...o,...t},captureUpdate:A.EVENTUALLY};let n,i=r.scene.getSelectedElements(o);if(!xr(t.currentItemBackgroundColor)&&i.every(l=>je(l)&&p1(l.points))){let l=j(i);n=e.map(s=>l.has(s.id)&&je(s)?ee(s,{backgroundColor:t.currentItemBackgroundColor,...rc(s,!0)}):s)}else n=Ft(e,o,l=>ee(l,{backgroundColor:t.currentItemBackgroundColor}));return{elements:n,appState:{...o,...t},captureUpdate:A.IMMEDIATELY}},PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Jt(ME,{children:[ne("h3",{"aria-hidden":"true",children:g("labels.background")}),ne(Ll,{topPicks:r.props.backgroundColorTopPicks??bs,palette:nf,type:"elementBackground",label:g("labels.background"),color:qt(e,r,n=>n.backgroundColor,!0,n=>n?null:o.currentItemBackgroundColor),onChange:n=>t({currentItemBackgroundColor:n}),elements:e,appState:o,updateData:t})]})}),P6=O({name:"changeFillStyle",label:"labels.fill",trackEvent:!1,perform:(e,o,t,r)=>(Ee("element","changeFillStyle",`${t} (${r.device.editor.isMobile?"mobile":"desktop"})`),{elements:Ft(e,o,n=>ee(n,{fillStyle:t})),appState:{...o,currentItemFillStyle:t},captureUpdate:A.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=q(e,o),i=n.length>0&&n.every(a=>a.fillStyle==="zigzag");return Jt("fieldset",{children:[ne("legend",{children:g("labels.fill")}),ne("div",{className:"buttonList",children:ne(To,{type:"button",options:[{value:"hachure",text:`${i?g("labels.zigzag"):g("labels.hachure")} (${D("Alt-Click")})`,icon:i?Rb:Nb,active:i?!0:void 0,testId:"fill-hachure"},{value:"cross-hatch",text:g("labels.crossHatch"),icon:Ob,testId:"fill-cross-hatch"},{value:"solid",text:g("labels.solid"),icon:Bb,testId:"fill-solid"}],value:qt(e,r,a=>a.fillStyle,a=>a.hasOwnProperty("fillStyle"),a=>a?null:o.currentItemFillStyle),onClick:(a,l)=>{let s=l.altKey&&a==="hachure"&&n.every(c=>c.fillStyle==="hachure")?"zigzag":a;t(s)}})})]})}}),D6=O({name:"changeStrokeWidth",label:"labels.strokeWidth",trackEvent:!1,perform:(e,o,t)=>({elements:Ft(e,o,r=>ee(r,{strokeWidth:t})),appState:{...o,currentItemStrokeWidth:t},captureUpdate:A.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Jt("fieldset",{children:[ne("legend",{children:g("labels.strokeWidth")}),ne("div",{className:"buttonList",children:ne(To,{group:"stroke-width",options:[{value:Ss.thin,text:g("labels.thin"),icon:jp,testId:"strokeWidth-thin"},{value:Ss.bold,text:g("labels.bold"),icon:zb,testId:"strokeWidth-bold"},{value:Ss.extraBold,text:g("labels.extraBold"),icon:Fb,testId:"strokeWidth-extraBold"}],value:qt(e,r,n=>n.strokeWidth,n=>n.hasOwnProperty("strokeWidth"),n=>n?null:o.currentItemStrokeWidth),onChange:n=>t(n)})})]})}),R6=O({name:"changeSloppiness",label:"labels.sloppiness",trackEvent:!1,perform:(e,o,t)=>({elements:Ft(e,o,r=>ee(r,{seed:Dn(),roughness:t})),appState:{...o,currentItemRoughness:t},captureUpdate:A.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Jt("fieldset",{children:[ne("legend",{children:g("labels.sloppiness")}),ne("div",{className:"buttonList",children:ne(To,{group:"sloppiness",options:[{value:0,text:g("labels.architect"),icon:Gb},{value:1,text:g("labels.artist"),icon:Wb},{value:2,text:g("labels.cartoonist"),icon:Yb}],value:qt(e,r,n=>n.roughness,n=>n.hasOwnProperty("roughness"),n=>n?null:o.currentItemRoughness),onChange:n=>t(n)})})]})}),AR=O({name:"changeStrokeStyle",label:"labels.strokeStyle",trackEvent:!1,perform:(e,o,t)=>({elements:Ft(e,o,r=>ee(r,{strokeStyle:t})),appState:{...o,currentItemStrokeStyle:t},captureUpdate:A.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Jt("fieldset",{children:[ne("legend",{children:g("labels.strokeStyle")}),ne("div",{className:"buttonList",children:ne(To,{group:"strokeStyle",options:[{value:"solid",text:g("labels.strokeStyle_solid"),icon:jp},{value:"dashed",text:g("labels.strokeStyle_dashed"),icon:Hb},{value:"dotted",text:g("labels.strokeStyle_dotted"),icon:Ub}],value:qt(e,r,n=>n.strokeStyle,n=>n.hasOwnProperty("strokeStyle"),n=>n?null:o.currentItemStrokeStyle),onChange:n=>t(n)})})]})}),N6=O({name:"changeOpacity",label:"labels.opacity",trackEvent:!1,perform:(e,o,t)=>({elements:Ft(e,o,r=>ee(r,{opacity:t}),!0),appState:{...o,currentItemOpacity:t},captureUpdate:A.IMMEDIATELY}),PanelComponent:({app:e,updateData:o})=>ne(kE,{updateData:o,app:e,testId:"opacity"})}),O6=O({name:"changeFontSize",label:"labels.fontSize",trackEvent:!1,perform:(e,o,t,r)=>Du(e,o,r,()=>t,t),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Jt("fieldset",{children:[ne("legend",{children:g("labels.fontSize")}),ne("div",{className:"buttonList",children:ne(To,{group:"font-size",options:[{value:16,text:g("labels.small"),icon:ix,testId:"fontSize-small"},{value:20,text:g("labels.medium"),icon:ax,testId:"fontSize-medium"},{value:28,text:g("labels.large"),icon:lx,testId:"fontSize-large"},{value:36,text:g("labels.veryLarge"),icon:sx,testId:"fontSize-veryLarge"}],value:qt(e,r,n=>{if(V(n))return n.fontSize;let i=me(n,r.scene.getNonDeletedElementsMap());return i?i.fontSize:null},n=>V(n)||me(n,r.scene.getNonDeletedElementsMap())!==null,n=>n?null:o.currentItemFontSize||fr),onChange:n=>t(n)})})]})}),Ru=O({name:"decreaseFontSize",label:"labels.decreaseFontSize",icon:Zn,trackEvent:!1,perform:(e,o,t,r)=>Du(e,o,r,n=>Math.round(1/(1+SE)*n.fontSize)),keyTest:e=>e[w.CTRL_OR_CMD]&&e.shiftKey&&(e.key===w.CHEVRON_LEFT||e.key===w.COMMA)}),Nu=O({name:"increaseFontSize",label:"labels.increaseFontSize",icon:Zn,trackEvent:!1,perform:(e,o,t,r)=>Du(e,o,r,n=>Math.round(n.fontSize*(1+SE))),keyTest:e=>e[w.CTRL_OR_CMD]&&e.shiftKey&&(e.key===w.CHEVRON_RIGHT||e.key===w.PERIOD)}),B6=O({name:"changeFontFamily",label:"labels.fontFamily",trackEvent:!1,perform:(e,o,t,r)=>{let{cachedElements:n,resetAll:i,resetContainers:a,...l}=t;if(i)return{elements:Ft(e,o,b=>{let x=n?.get(b.id);return x?ee(b,{...x}):b},!0),appState:{...o,...l},captureUpdate:A.NEVER};let{currentItemFontFamily:s,currentHoveredFontFamily:c}=t,m=A.EVENTUALLY,d,p=!1;if(s)d=s,m=A.IMMEDIATELY;else if(c){d=c,m=A.EVENTUALLY;let f=q(e,o,{includeBoundTextElement:!0}).filter(b=>V(b));if(f.length>200)p=!0;else{let b=0,x=0;for(;b<f.length&&x<5e3;){let E=f[b];x+=E?.originalText.length||0,b++}x>5e3&&(p=!0)}}let u={appState:{...o,...l},captureUpdate:m};if(d&&!p){let f=new Map,b=new Set,x=!1,E=Array.from($r.loadedFontsCache.values()),y=Object.entries(mt).find(([S,I])=>I===d)?.[0];c&&y&&E.some(S=>S.startsWith(y))&&(x=!0),Object.assign(u,{elements:Ft(e,o,S=>{if(V(S)&&(S.fontFamily!==d||s)){let I=ee(S,{fontFamily:d,lineHeight:Ro(d)}),P=n?.get(S.containerId||"")||{},M=r.scene.getContainerElement(S);return a&&M&&P&&r.scene.mutateElement(M,{...P}),x||(b=new Set([...b,...Array.from(I.originalText)])),f.set(I,M),I}return S},!0)});let v=`10px ${_n({fontFamily:d})}`,C=Array.from(b.values()).join();if(x||window.document.fonts.check(v,C))for(let[S,I]of f)Ke(S,I,r.scene);else window.document.fonts.load(v,C).then(S=>{for(let[I,P]of f){let M=r.scene.getElement(I.id),B=P?r.scene.getElement(P.id):null;M&&Ke(M,B,r.scene)}r.fonts.onLoaded(S)})}return u},PanelComponent:({elements:e,appState:o,app:t,updateData:r})=>{let n=Pu(new Map),i=Pu(null),[a,l]=M6({}),s=Pu(!0),c=S6(()=>{let m=(d,p)=>qt(d,t,u=>{if(V(u))return u.fontFamily;let f=me(u,p);return f?f.fontFamily:null},u=>V(u)||me(u,p)!==null,u=>u?null:o.currentItemFontFamily||Rr);return a.openPopup==="fontFamily"&&o.openPopup==="fontFamily"?m(Array.from(n.current?.values()??[]),n.current):!a.openPopup&&o.openPopup!=="fontFamily"?m(e,t.scene.getNonDeletedElementsMap()):i.current},[a.openPopup,o,e,t]);return _u(()=>{i.current=c},[c]),_u(()=>{Object.keys(a).length&&(r(a),l({}))},[a]),_u(()=>(s.current=!1,()=>{s.current=!0}),[]),Jt("fieldset",{children:[ne("legend",{children:g("labels.fontFamily")}),ne(yE,{isOpened:o.openPopup==="fontFamily",selectedFontFamily:c,hoveredFontFamily:o.currentHoveredFontFamily,onSelect:m=>{l({openPopup:null,currentHoveredFontFamily:null,currentItemFontFamily:m}),n.current.clear()},onHover:m=>{l({currentHoveredFontFamily:m,cachedElements:new Map(n.current),resetContainers:!0})},onLeave:()=>{l({currentHoveredFontFamily:null,cachedElements:new Map(n.current),resetAll:!0})},onPopupChange:m=>{if(m){n.current.clear();let{editingTextElement:d}=o;if(d?.type==="text"){let p=t.scene.getElement(d.id);n.current.set(d.id,ee(p||d,{},!0))}else{let p=q(e,o,{includeBoundTextElement:!0});for(let u of p)n.current.set(u.id,ee(u,{},!0))}l({openPopup:"fontFamily"})}else{let d={openPopup:null,currentHoveredFontFamily:null,cachedElements:new Map(n.current),resetAll:!0};s.current?r({...a,...d}):l(d),n.current.clear()}}})]})}}),z6=O({name:"changeTextAlign",label:"Change text alignment",trackEvent:!1,perform:(e,o,t,r)=>({elements:Ft(e,o,n=>{if(V(n)){let i=ee(n,{textAlign:t});return Ke(i,r.scene.getContainerElement(n),r.scene),i}return n},!0),appState:{...o,currentItemTextAlign:t},captureUpdate:A.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=r.scene.getNonDeletedElementsMap();return Jt("fieldset",{children:[ne("legend",{children:g("labels.textAlign")}),ne("div",{className:"buttonList",children:ne(To,{group:"text-align",options:[{value:"left",text:g("labels.left"),icon:dx,testId:"align-left"},{value:"center",text:g("labels.center"),icon:mx,testId:"align-horizontal-center"},{value:"right",text:g("labels.right"),icon:px,testId:"align-right"}],value:qt(e,r,i=>{if(V(i))return i.textAlign;let a=me(i,n);return a?a.textAlign:null},i=>V(i)||me(i,n)!==null,i=>i?null:o.currentItemTextAlign),onChange:i=>t(i)})})]})}}),F6=O({name:"changeVerticalAlign",label:"Change vertical alignment",trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:Ft(e,o,n=>{if(V(n)){let i=ee(n,{verticalAlign:t});return Ke(i,r.scene.getContainerElement(n),r.scene),i}return n},!0),appState:{...o},captureUpdate:A.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>ne("fieldset",{children:ne("div",{className:"buttonList",children:ne(To,{group:"text-align",options:[{value:Vt.TOP,text:g("labels.alignTop"),icon:ne(ux,{theme:o.theme}),testId:"align-top"},{value:Vt.MIDDLE,text:g("labels.centerVertically"),icon:ne(gx,{theme:o.theme}),testId:"align-middle"},{value:Vt.BOTTOM,text:g("labels.alignBottom"),icon:ne(hx,{theme:o.theme}),testId:"align-bottom"}],value:qt(e,r,n=>{if(V(n)&&n.containerId)return n.verticalAlign;let i=me(n,r.scene.getNonDeletedElementsMap());return i?i.verticalAlign:null},n=>V(n)||me(n,r.scene.getNonDeletedElementsMap())!==null,n=>n?null:Vt.MIDDLE),onChange:n=>t(n)})})})}),_R=O({name:"changeRoundness",label:"Change edge roundness",trackEvent:!1,perform:(e,o,t)=>({elements:Ft(e,o,r=>se(r)?r:ee(r,{roundness:t==="round"?{type:Fr(r.type)?pt.ADAPTIVE_RADIUS:pt.PROPORTIONAL_RADIUS}:null})),appState:{...o,currentItemRoundness:t},captureUpdate:A.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r,renderAction:n})=>{let a=qs(ge(e),o).some(l=>l.roundness?.type===pt.LEGACY);return Jt("fieldset",{children:[ne("legend",{children:g("labels.edges")}),Jt("div",{className:"buttonList",children:[ne(To,{group:"edges",options:[{value:"sharp",text:g("labels.sharp"),icon:Vb},{value:"round",text:g("labels.round"),icon:Kb}],value:qt(e,r,l=>a?null:l.roundness?"round":"sharp",l=>!Ae(l)&&l.hasOwnProperty("roundness"),l=>l?null:o.currentItemRoundness),onChange:l=>t(l)}),n("togglePolygon")]})]})}}),IE=e=>[{value:null,text:g("labels.arrowhead_none"),keyBinding:"q",icon:Zb},{value:"arrow",text:g("labels.arrowhead_arrow"),keyBinding:"w",icon:ne(Xb,{flip:e})},{value:"triangle",text:g("labels.arrowhead_triangle"),icon:ne(Jb,{flip:e}),keyBinding:"e"},{value:"triangle_outline",text:g("labels.arrowhead_triangle_outline"),icon:ne(Qb,{flip:e}),keyBinding:"r"},{value:"circle",text:g("labels.arrowhead_circle"),keyBinding:"a",icon:ne($b,{flip:e})},{value:"circle_outline",text:g("labels.arrowhead_circle_outline"),keyBinding:"s",icon:ne(jb,{flip:e})},{value:"diamond",text:g("labels.arrowhead_diamond"),icon:ne(ex,{flip:e}),keyBinding:"d"},{value:"diamond_outline",text:g("labels.arrowhead_diamond_outline"),icon:ne(tx,{flip:e}),keyBinding:"f"},{value:"bar",text:g("labels.arrowhead_bar"),keyBinding:"z",icon:ne(qb,{flip:e})},{value:"crowfoot_one",text:g("labels.arrowhead_crowfoot_one"),icon:ne(rx,{flip:e}),keyBinding:"x"},{value:"crowfoot_many",text:g("labels.arrowhead_crowfoot_many"),icon:ne(ox,{flip:e}),keyBinding:"c"},{value:"crowfoot_one_or_many",text:g("labels.arrowhead_crowfoot_one_or_many"),icon:ne(nx,{flip:e}),keyBinding:"v"}],PR=O({name:"changeArrowhead",label:"Change arrowheads",trackEvent:!1,perform:(e,o,t)=>({elements:Ft(e,o,r=>{if(he(r)){let{position:n,type:i}=t;if(n==="start")return ee(r,{startArrowhead:i});if(n==="end")return ee(r,{endArrowhead:i})}return r}),appState:{...o,[t.position==="start"?"currentItemStartArrowhead":"currentItemEndArrowhead"]:t.type},captureUpdate:A.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=Cr().rtl;return Jt("fieldset",{children:[ne("legend",{children:g("labels.arrowheads")}),Jt("div",{className:"iconSelectList buttonList",children:[ne(Lu,{label:"arrowhead_start",options:IE(!n),value:qt(e,r,i=>he(i)&&_i(i.type)?i.startArrowhead:o.currentItemStartArrowhead,!0,o.currentItemStartArrowhead),onChange:i=>t({position:"start",type:i}),numberOfOptionsToAlwaysShow:4}),ne(Lu,{label:"arrowhead_end",group:"arrowheads",options:IE(!!n),value:qt(e,r,i=>he(i)&&_i(i.type)?i.endArrowhead:o.currentItemEndArrowhead,!0,o.currentItemEndArrowhead),onChange:i=>t({position:"end",type:i}),numberOfOptionsToAlwaysShow:4})]})]})}}),DR=O({name:"changeArrowType",label:"Change arrow types",trackEvent:!1,perform:(e,o,t,r)=>{let n=Ft(e,o,l=>{if(!Ae(l))return l;let s=ee(l,{roundness:t===ut.round?{type:pt.PROPORTIONAL_RADIUS}:null,elbowed:t===ut.elbow,points:t===ut.elbow||l.elbowed?[l.points[0],l.points[l.points.length-1]]:l.points});if(se(s)){s.fixedSegments=null;let c=r.scene.getNonDeletedElementsMap();r.dismissLinearEditor();let m=$.getPointAtIndexGlobalCoordinates(s,0,c),d=$.getPointAtIndexGlobalCoordinates(s,-1,c),p=s.startBinding&&c.get(s.startBinding.elementId),u=s.endBinding&&c.get(s.endBinding.elementId),f=p&&s.startBinding?{...s.startBinding,...ep(s,p,"start",c)}:null,b=u&&s.endBinding?{...s.endBinding,...ep(s,u,"end",c)}:null;s={...s,startBinding:f,endBinding:b,...Vs(s,c,{points:[m,d].map(x=>L(x[0]-s.x,x[1]-s.y)),startBinding:f,endBinding:b,fixedSegments:null})}}else{let c=r.scene.getNonDeletedElementsMap();if(s.startBinding){let m=c.get(s.startBinding.elementId);m&&Si(s,m,"start",r.scene)}if(s.endBinding){let m=c.get(s.endBinding.elementId);m&&Si(s,m,"end",r.scene)}}return s}),i={...o,currentItemArrowType:t},a=o.selectedLinearElement?.elementId;if(a){let l=n.find(s=>s.id===a);l&&(i.selectedLinearElement=new $(l,j(e)))}return{elements:n,appState:i,captureUpdate:A.IMMEDIATELY}},PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Jt("fieldset",{children:[ne("legend",{children:g("labels.arrowtypes")}),ne("div",{className:"buttonList",children:ne(To,{group:"arrowtypes",options:[{value:ut.sharp,text:g("labels.arrowtype_sharp"),icon:Bc,testId:"sharp-arrow"},{value:ut.round,text:g("labels.arrowtype_round"),icon:Fc,testId:"round-arrow"},{value:ut.elbow,text:g("labels.arrowtype_elbowed"),icon:zc,testId:"elbow-arrow"}],value:qt(e,r,n=>Ae(n)?n.elbowed?ut.elbow:n.roundness?ut.round:ut.sharp:null,n=>Ae(n),n=>n?null:o.currentItemArrowType),onChange:n=>t(n)})})]})});import{useEffect as H6}from"react";import{jsx as G6}from"react/jsx-runtime";var aa=()=>{let e=document.querySelector(".excalidraw-tooltip");if(e)return e;let o=document.createElement("div");return document.body.appendChild(o),o.classList.add("excalidraw-tooltip"),o},Ou=(e,o,t="bottom")=>{let r=e.getBoundingClientRect(),n=window.innerWidth,i=window.innerHeight,a=5,l=o.left+o.width/2-r.width/2;l<0?l=a:l+r.width>=n&&(l=n-r.width-a);let s;t==="bottom"?(s=o.top+o.height+a,s+r.height>=i&&(s=o.top-r.height-a)):(s=o.top-r.height-a,s<0&&(s=o.top+o.height+a)),Object.assign(e.style,{top:`${s}px`,left:`${l}px`})},U6=(e,o,t,r)=>{o.classList.add("excalidraw-tooltip--visible"),o.style.minWidth=r?"50ch":"10ch",o.style.maxWidth=r?"50ch":"15ch",o.textContent=t;let n=e.getBoundingClientRect();Ou(o,n)},Dt=({children:e,label:o,long:t=!1,style:r,disabled:n})=>(H6(()=>()=>aa().classList.remove("excalidraw-tooltip--visible"),[]),n?null:G6("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:i=>U6(i.currentTarget,aa(),o,t),onPointerLeave:()=>aa().classList.remove("excalidraw-tooltip--visible"),style:r,children:e}));import rd from"open-color";var AE='<svg viewBox="0 0 24 24" stroke-width="1" width="28" height="28" xmlns="http://www.w3.org/2000/svg">',W6='<path d="M6.164 11.755a5.314 5.314 0 0 1-4.932-5.298 5.314 5.314 0 0 1 5.311-5.311 5.314 5.314 0 0 1 5.307 5.113l8.773 8.773a3.322 3.322 0 0 1 0 4.696l-.895.895a3.322 3.322 0 0 1-4.696 0l-8.868-8.868Z" style="fill:#fff"/>',_E='<path stroke="#1b1b1f" fill="#fff" d="m7.868 11.113 7.773 7.774a2.359 2.359 0 0 0 1.667.691 2.368 2.368 0 0 0 2.357-2.358c0-.625-.248-1.225-.69-1.667L11.201 7.78 9.558 9.469l-1.69 1.643v.001Zm10.273 3.606-3.333 3.333m-3.25-6.583 2 2m-7-7 3 3M3.664 3.625l1 1M2.529 6.922l1.407-.144m5.735-2.932-1.118.866M4.285 9.823l.758-1.194m1.863-6.207-.13 1.408"/>',Y6=`data:${pe.svg},${encodeURIComponent(`${AE}${_E}</svg>`)}`,V6=`data:${pe.svg},${encodeURIComponent(`${AE}${W6}${_E}</svg>`)}`,Io=e=>{e&&(e.style.cursor="")},Me=(e,o)=>{e&&(e.style.cursor=o)},sr,LE,Bu=(e,o)=>{let r=()=>{let n=o===re.DARK;sr=document.createElement("canvas"),sr.theme=o,sr.height=20,sr.width=20;let i=sr.getContext("2d");i.lineWidth=1,i.beginPath(),i.arc(sr.width/2,sr.height/2,5,0,2*Math.PI),i.fillStyle=n?rd.black:rd.white,i.fill(),i.strokeStyle=n?rd.white:rd.black,i.stroke(),LE=sr.toDataURL(pe.svg)};(!sr||sr.theme!==o)&&r(),Me(e,`url(${LE}) ${20/2} ${20/2}, auto`)},po=(e,o)=>{if(e)if(o.activeTool.type==="selection")Io(e);else if(Go(o))e.style.cursor=ye.GRAB;else if($t(o))Bu(e,o.theme);else if(o.activeTool.type==="laser"){let t=o.theme===re.LIGHT?Y6:V6;e.style.cursor=`url(${t}), auto`}else["image","custom"].includes(o.activeTool.type)?o.activeTool.type!=="image"&&(e.style.cursor=ye.AUTO):e.style.cursor=ye.CROSSHAIR};var Ir=({viewportX:e,viewportY:o,nextZoom:t},r)=>{let n=e-r.offsetLeft,i=o-r.offsetTop,a=r.zoom.value,l=r.scrollX+(n-n/a),s=r.scrollY+(i-i/a),c=-(n-n/t),m=-(i-i/t);return{scrollX:l+c,scrollY:s+m,zoom:{value:t}}};import{jsx as ld,jsxs as $6}from"react/jsx-runtime";var K6=O({name:"changeViewBackgroundColor",label:"labels.canvasBackground",trackEvent:!1,predicate:(e,o,t,r)=>!!r.props.UIOptions.canvasActions.changeViewBackgroundColor&&!o.viewModeEnabled,perform:(e,o,t)=>({appState:{...o,...t},captureUpdate:t.viewBackgroundColor?A.IMMEDIATELY:A.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t,appProps:r})=>ld(Ll,{palette:null,topPicks:xs,label:g("labels.canvasBackground"),type:"canvasBackground",color:o.viewBackgroundColor,onChange:n=>t({viewBackgroundColor:n}),"data-testid":"canvas-background-picker",elements:e,appState:o,updateData:t})}),nd=O({name:"zoomIn",label:"buttons.zoomIn",viewMode:!0,icon:Rp,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>({appState:{...o,...Ir({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:rr(o.zoom.value+pi)},o),userToFollow:null},captureUpdate:A.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>ld(K,{type:"button",className:"zoom-in-button zoom-button",icon:Rp,title:`${g("buttons.zoomIn")} \u2014 ${D("CtrlOrCmd++")}`,"aria-label":g("buttons.zoomIn"),disabled:o.zoom.value>=Rm,onClick:()=>{e(null)}}),keyTest:e=>(e.code===le.EQUAL||e.code===le.NUM_ADD)&&(e[w.CTRL_OR_CMD]||e.shiftKey)}),id=O({name:"zoomOut",label:"buttons.zoomOut",icon:Np,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>({appState:{...o,...Ir({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:rr(o.zoom.value-pi)},o),userToFollow:null},captureUpdate:A.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>ld(K,{type:"button",className:"zoom-out-button zoom-button",icon:Np,title:`${g("buttons.zoomOut")} \u2014 ${D("CtrlOrCmd+-")}`,"aria-label":g("buttons.zoomOut"),disabled:o.zoom.value<=Dm,onClick:()=>{e(null)}}),keyTest:e=>(e.code===le.MINUS||e.code===le.NUM_SUBTRACT)&&(e[w.CTRL_OR_CMD]||e.shiftKey)}),ad=O({name:"resetZoom",label:"buttons.resetZoom",icon:gb,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>({appState:{...o,...Ir({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:rr(1)},o),userToFollow:null},captureUpdate:A.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>ld(Dt,{label:g("buttons.resetZoom"),style:{height:"100%"},children:$6(K,{type:"button",className:"reset-zoom-button zoom-button",title:g("buttons.resetZoom"),"aria-label":g("buttons.resetZoom"),onClick:()=>{e(null)},children:[(o.zoom.value*100).toFixed(0),"%"]})}),keyTest:e=>(e.code===le.ZERO||e.code===le.NUM_ZERO)&&(e[w.CTRL_OR_CMD]||e.shiftKey)}),Z6=(e,o,t=1)=>{let[r,n,i,a]=e,l=i-r,s=o.width/l,c=a-n,m=o.height/c,p=Math.min(s,m)*bt(t,.1,1);return Math.min(p,1)},PE=({bounds:e,appState:o,canvasOffsets:t,fitToViewport:r=!1,viewportZoomFactor:n=1,minZoom:i=-1/0,maxZoom:a=1/0})=>{n=bt(n,Dm,Rm);let[l,s,c,m]=e,d=(l+c)/2,p=(s+m)/2,u=t?.left??0,f=t?.top??0,b=t?.right??0,x=t?.bottom??0,E=o.width-u-b,y=o.height-f-x,v;if(r){let I=c-l,P=m-s;v=Math.min(E/I,y/P)*n}else v=Z6(e,{width:E,height:y},n);let C=rr(bt(Df(v,pi,"floor"),i,a)),S=_0({scenePoint:{x:d,y:p},viewportDimensions:{width:o.width,height:o.height},offsets:t,zoom:{value:C}});return{appState:{...o,scrollX:S.scrollX,scrollY:S.scrollY,zoom:{value:C}},captureUpdate:A.EVENTUALLY}},Rl=({canvasOffsets:e,targetElements:o,appState:t,fitToViewport:r,viewportZoomFactor:n,minZoom:i,maxZoom:a})=>{let l=xe(ge(o));return PE({canvasOffsets:e,bounds:l,appState:t,fitToViewport:r,viewportZoomFactor:n,minZoom:i,maxZoom:a})},hN=O({name:"zoomToFitSelectionInViewport",label:"labels.zoomToFitViewport",icon:Oc,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);return Rl({targetElements:n.length?n:e,appState:{...o,userToFollow:null},fitToViewport:!1,canvasOffsets:r.getEditorUIOffsets()})},keyTest:e=>e.code===le.TWO&&e.shiftKey&&!e.altKey&&!e[w.CTRL_OR_CMD]}),gN=O({name:"zoomToFitSelection",label:"helpDialog.zoomToSelection",icon:Oc,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);return Rl({targetElements:n.length?n:e,appState:{...o,userToFollow:null},fitToViewport:!0,canvasOffsets:r.getEditorUIOffsets()})},keyTest:e=>e.code===le.THREE&&e.shiftKey&&!e.altKey&&!e[w.CTRL_OR_CMD]}),X6=O({name:"zoomToFit",label:"helpDialog.zoomToFit",icon:Oc,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>Rl({targetElements:e,appState:{...o,userToFollow:null},fitToViewport:!1,canvasOffsets:r.getEditorUIOffsets()}),keyTest:e=>e.code===le.ONE&&e.shiftKey&&!e.altKey&&!e[w.CTRL_OR_CMD]}),qn=O({name:"toggleTheme",label:(e,o)=>o.theme===re.DARK?"buttons.lightMode":"buttons.darkMode",keywords:["toggle","dark","light","mode","theme"],icon:e=>e.theme===re.LIGHT?xl:El,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t)=>({appState:{...o,theme:t||(o.theme===re.LIGHT?re.DARK:re.LIGHT)},captureUpdate:A.EVENTUALLY}),keyTest:e=>e.altKey&&e.shiftKey&&e.code===le.D,predicate:(e,o,t,r)=>!!r.props.UIOptions.canvasActions.toggleTheme}),fN=O({name:"toggleEraserTool",label:"toolBar.eraser",trackEvent:{category:"toolbar"},perform:(e,o)=>{let t;return $t(o)?t=Ie(o,{...o.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):t=Ie(o,{type:"eraser",lastActiveToolBeforeEraser:o.activeTool}),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:t},captureUpdate:A.IMMEDIATELY}},keyTest:e=>e.key===w.E}),bN=O({name:"toggleLassoTool",label:"toolBar.lasso",icon:fl,trackEvent:{category:"toolbar"},perform:(e,o,t,r)=>{let n;return o.activeTool.type!=="lasso"?(n=Ie(o,{type:"lasso",fromSelection:!1}),Me(r.interactiveCanvas,ye.CROSSHAIR)):n=Ie(o,{type:"selection"}),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n},captureUpdate:A.NEVER}}}),DE=O({name:"toggleHandTool",label:"toolBar.hand",trackEvent:{category:"toolbar"},icon:Nc,viewMode:!1,perform:(e,o,t,r)=>{let n;return Go(o)?n=Ie(o,{...o.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):(n=Ie(o,{type:"hand",lastActiveToolBeforeEraser:o.activeTool}),Me(r.interactiveCanvas,ye.GRAB)),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n},captureUpdate:A.IMMEDIATELY}},keyTest:e=>!e.altKey&&!e[w.CTRL_OR_CMD]&&e.key===w.H});var j6=O({name:"setEmbeddableAsActiveTool",trackEvent:{category:"toolbar"},target:"Tool",label:"toolBar.embeddable",perform:(e,o,t,r)=>{let n=Ie(o,{type:"embeddable"});return po(r.canvas,{...o,activeTool:n}),{elements:e,appState:{...o,activeTool:Ie(o,{type:"embeddable"})},captureUpdate:A.EVENTUALLY}}});import{jsx as q6}from"react/jsx-runtime";var Ht=O({name:"finalize",label:"",trackEvent:!1,perform:(e,o,t,r)=>{let{interactiveCanvas:n,focusContainer:i,scene:a}=r,l=a.getNonDeletedElementsMap();if(t?.event&&o.selectedLinearElement){let d=$.handlePointerUp(t.event,o.selectedLinearElement,o,r.scene),{startBindingElement:p,endBindingElement:u}=d,f=r.scene.getElement(d.elementId);if(yr(f)&&Qm(f,p,u,r.scene),d!==o.selectedLinearElement){let b=e;return f&&Kr(f)&&(b=b.filter(x=>x.id!==f.id)),{elements:b,appState:{selectedLinearElement:{...d,selectedPointsIndices:null},suggestedBindings:[]},captureUpdate:A.IMMEDIATELY}}}if(o.editingLinearElement){let{elementId:d,startBindingElement:p,endBindingElement:u}=o.editingLinearElement,f=$.getElement(d,l);if(f)return yr(f)&&Qm(f,p,u,a),je(f)&&!jm(f.points)&&a.mutateElement(f,{polygon:!1}),{elements:f.points.length<2||Kr(f)?e.filter(b=>b.id!==f.id):void 0,appState:{...o,cursorButton:"up",editingLinearElement:null},captureUpdate:A.IMMEDIATELY}}let s=e;window.document.activeElement instanceof HTMLElement&&i();let c=null;if(o.multiElement)c=o.multiElement;else if(o.newElement?.type==="freedraw"||yr(o.newElement))c=o.newElement;else if(Object.keys(o.selectedElementIds).length===1){let d=l.get(Object.keys(o.selectedElementIds)[0]);d&&(c=d)}if(c){if(o.multiElement&&c.type!=="freedraw"&&o.lastPointerDownWith!=="touch"){let{points:d,lastCommittedPoint:p}=c;(!p||d[d.length-1]!==p)&&a.mutateElement(c,{points:c.points.slice(0,-1)})}if(c&&Kr(c)&&(s=s.filter(d=>d.id!==c.id)),he(c)||$m(c)){let d=el(c.points,o.zoom.value);if(d&&(je(c)||$m(c))){let p=c.points,u=p[0],f=p.map((b,x)=>x===p.length-1?L(u[0],u[1]):b);je(c)?a.mutateElement(c,{points:f,polygon:!0}):a.mutateElement(c,{points:f})}if(je(c)&&!jm(c.points)&&a.mutateElement(c,{polygon:!1}),yr(c)&&!d&&c.points.length>1&&Ur(o)){let[p,u]=$.getPointAtIndexGlobalCoordinates(c,-1,j(e));_1(c,o,{x:p,y:u},a)}}}(!o.activeTool.locked&&o.activeTool.type!=="freedraw"||!c)&&Io(n);let m;return o.activeTool.type==="eraser"?m=Ie(o,{...o.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):m=Ie(o,{type:"selection"}),{elements:s,appState:{...o,cursorButton:"up",activeTool:(o.activeTool.locked||o.activeTool.type==="freedraw")&&c?o.activeTool:m,activeEmbeddable:null,newElement:null,selectionElement:null,multiElement:null,editingTextElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:c&&!o.activeTool.locked&&o.activeTool.type!=="freedraw"?{...o.selectedElementIds,[c.id]:!0}:o.selectedElementIds,selectedLinearElement:c&&he(c)?new $(c,j(s)):o.selectedLinearElement},captureUpdate:A.IMMEDIATELY}},keyTest:(e,o)=>e.key===w.ESCAPE&&(o.editingLinearElement!==null||!o.newElement&&o.multiElement===null)||(e.key===w.ESCAPE||e.key===w.ENTER)&&o.multiElement!==null,PanelComponent:({appState:e,updateData:o,data:t})=>q6(K,{type:"button",icon:Sb,title:g("buttons.done"),"aria-label":g("buttons.done"),onClick:o,visible:e.multiElement!=null,size:t?.size||"medium",style:{pointerEvents:"all"}})});import J6 from"clsx";import{jsx as RE,jsxs as Q6}from"react/jsx-runtime";var Nl=({children:e,checked:o,onChange:t,className:r})=>Q6("div",{className:J6("Checkbox",r,{"is-checked":o}),onClick:n=>{t(!o,n),n.currentTarget.querySelector(".Checkbox-box").focus()},children:[RE("button",{type:"button",className:"Checkbox-box",role:"checkbox","aria-checked":o,children:vb}),RE("div",{className:"Checkbox-label",children:e})]});import{jsx as Ol}from"react/jsx-runtime";var OE=e=>{let o=e.title||(e.value===re.DARK?g("buttons.lightMode"):g("buttons.darkMode"));return Ol(K,{type:"icon",icon:e.value===re.LIGHT?NE.MOON:NE.SUN,title:o,"aria-label":o,onClick:()=>e.onChange(e.value===re.DARK?re.LIGHT:re.DARK),"data-testid":"toggle-dark-mode"})},NE={SUN:Ol("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:Ol("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:Ol("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:Ol("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"})})};import{useState as e4}from"react";import{jsx as BE,jsxs as t4}from"react/jsx-runtime";var zE=e=>{let{id:o}=at(),[t,r]=e4(e.value),n=a=>{e.ignoreFocus||Kf(a.target);let l=a.target.value;l!==e.value&&e.onChange(l)},i=a=>{if(a.key===w.ENTER){if(a.preventDefault(),a.nativeEvent.isComposing||a.keyCode===229)return;a.currentTarget.blur()}};return t4("div",{className:"ProjectName",children:[BE("label",{className:"ProjectName-label",htmlFor:"filename",children:`${e.label}:`}),BE("input",{type:"text",className:"TextInput",onBlur:n,onKeyDown:i,id:`${o}-filename`,value:t,onChange:a=>r(a.target.value)})]})};var Ko=32,Oe=12,sn=256,HE=50,Jn="NOT_SPREADSHEET",la="VALID_SPREADSHEET",Bl=e=>{let o=/^([-+]?)[$€£¥₩]?([-+]?)([\d.,]+)[%]?$/.exec(e);return o?parseFloat(`${(o[1]||o[2])+o[3]}`.replace(/,/g,"")):null},zu=(e,o)=>e.slice(1).every(t=>Bl(t[o])!==null),FE=e=>{let o=e[0].length;if(o>2)return{type:Jn,reason:"More than 2 columns"};if(o===1){if(!zu(e,0))return{type:Jn,reason:"Value is not numeric"};let s=Bl(e[0][0])===null,c=(s?e.slice(1):e).map(m=>Bl(m[0]));return c.length<2?{type:Jn,reason:"Less than two rows"}:{type:la,spreadsheet:{title:s?e[0][0]:null,labels:null,values:c}}}let t=zu(e,0),r=zu(e,1);if(!t&&!r)return{type:Jn,reason:"Value is not numeric"};let[n,i]=r?[0,1]:[1,0],a=Bl(e[0][i])===null,l=a?e.slice(1):e;return l.length<2?{type:Jn,reason:"Less than 2 rows"}:{type:la,spreadsheet:{title:a?e[0][i]:null,labels:l.map(s=>s[n]),values:l.map(s=>Bl(s[i]))}}},o4=e=>{let o=[];for(let t=0;t<e[0].length;t++){let r=[];for(let n=0;n<e.length;n++)r.push(e[n][t]);o.push(r)}return o},UE=e=>{let o=e.trim().split(`
3
3
  `).map(i=>i.trim().split(" "));if(o.length&&o[0].length!==2&&(o=e.trim().split(`
4
4
  `).map(i=>i.trim().split(","))),o.length===0)return{type:Jn,reason:"No values"};let t=o[0].length;if(!o.every(i=>i.length===t))return{type:Jn,reason:"All rows don't have same number of columns"};let n=FE(o);if(n.type!==la){let i=FE(o4(o));if(i.type===la)return i}return n},sd=af(ef),So={fillStyle:"hachure",fontFamily:Rr,fontSize:fr,opacity:100,roughness:1,strokeColor:go.black,roundness:null,strokeStyle:"solid",strokeWidth:1,verticalAlign:Vt.MIDDLE,locked:!1},GE=e=>{let o=(Ko+Oe)*e.values.length+Oe,t=sn+Oe*2;return{chartWidth:o,chartHeight:t}},r4=(e,o,t,r,n)=>e.labels?.map((i,a)=>zt({groupIds:[r],backgroundColor:n,...So,text:i.length>8?`${i.slice(0,5)}...`:i,x:o+a*(Ko+Oe)+Oe*2,y:t+Oe/2,width:Ko,angle:5.87,fontSize:16,textAlign:"center",verticalAlign:"top"}))||[],n4=(e,o,t,r,n)=>{let i=zt({groupIds:[r],backgroundColor:n,...So,x:o-Oe,y:t-Oe,text:"0",textAlign:"right"}),a=zt({groupIds:[r],backgroundColor:n,...So,x:o-Oe,y:t-sn-i.height/2,text:Math.max(...e.values).toLocaleString(),textAlign:"right"});return[i,a]},i4=(e,o,t,r,n)=>{let{chartWidth:i,chartHeight:a}=GE(e),l=wo({backgroundColor:n,groupIds:[r],...So,type:"line",x:o,y:t,width:i,points:[L(0,0),L(i,0)]}),s=wo({backgroundColor:n,groupIds:[r],...So,type:"line",x:o,y:t,height:a,points:[L(0,0),L(0,-a)]}),c=wo({backgroundColor:n,groupIds:[r],...So,type:"line",x:o,y:t-sn-Oe,strokeStyle:"dotted",width:i,opacity:HE,points:[L(0,0),L(i,0)]});return[l,s,c]},WE=(e,o,t,r,n,i)=>{let{chartWidth:a,chartHeight:l}=GE(e),s=e.title?zt({backgroundColor:n,groupIds:[r],...So,text:e.title,x:o+a/2,y:t-sn-Oe*2-fr,roundness:null,textAlign:"center"}):null,c=i?Xt({backgroundColor:n,groupIds:[r],...So,type:"rectangle",x:o,y:t-l,width:a,height:l,strokeColor:go.black,fillStyle:"solid",opacity:6}):null;return[...c?[c]:[],...s?[s]:[],...r4(e,o,t,r,n),...n4(e,o,t,r,n),...i4(e,o,t,r,n)]},a4=(e,o,t)=>{let r=Math.max(...e.values),n=lo(),i=sd[Math.floor(Math.random()*sd.length)];return[...e.values.map((l,s)=>{let c=l/r*sn;return Xt({backgroundColor:i,groupIds:[n],...So,type:"rectangle",x:o+s*(Ko+Oe)+Oe,y:t-c-Oe,width:Ko,height:c})}),...WE(e,o,t,n,i,Mt())]},l4=(e,o,t)=>{let r=Math.max(...e.values),n=lo(),i=sd[Math.floor(Math.random()*sd.length)],a=0,l=[];for(let b of e.values){let x=a*(Ko+Oe),E=-(b/r)*sn;l.push([x,E]),a++}let s=Math.max(...l.map(b=>b[0])),c=Math.max(...l.map(b=>b[1])),m=Math.min(...l.map(b=>b[0])),d=Math.min(...l.map(b=>b[1])),p=wo({backgroundColor:i,groupIds:[n],...So,type:"line",x:o+Oe+Ko/2,y:t-Oe,height:c-d,width:s-m,strokeWidth:2,points:l}),u=e.values.map((b,x)=>{let E=x*(Ko+Oe)+Oe/2,y=-(b/r)*sn+Oe/2;return Xt({backgroundColor:i,groupIds:[n],...So,fillStyle:"solid",strokeWidth:2,type:"ellipse",x:o+E+Ko/2,y:t+y-Oe*2,width:Oe,height:Oe})}),f=e.values.map((b,x)=>{let E=x*(Ko+Oe)+Oe/2,y=b/r*sn+Oe/2+Oe;return wo({backgroundColor:i,groupIds:[n],...So,type:"line",x:o+E+Ko/2+Oe/2,y:t-y,height:y,strokeStyle:"dotted",opacity:HE,points:[L(0,0),L(0,y)]})});return[...WE(e,o,t,n,i,Mt()),p,...f,...u]},YE=(e,o,t,r)=>e==="line"?l4(o,t,r):a4(o,t,r);var AO="clipboard"in navigator&&"readText"in navigator.clipboard,cd="clipboard"in navigator&&"writeText"in navigator.clipboard,cn="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,s4=e=>!!([Nr.excalidraw,Nr.excalidrawClipboard,Nr.excalidrawClipboardWithAPI].includes(e?.type)&&Array.isArray(e.elements)),VE=({types:e,files:o})=>{!e&&!o&&console.warn("createPasteEvent: no types or files provided");let t=new ClipboardEvent("paste",{clipboardData:new DataTransfer});if(e)for(let[r,n]of Object.entries(e)){if(typeof n!="string"){o=o||[],o.push(n);continue}try{if(t.clipboardData?.setData(r,n),t.clipboardData?.getData(r)!==n)throw new Error(`Failed to set "${r}" as clipboardData item`)}catch(i){throw new Error(i.message)}}if(o){let r=-1;for(let n of o){r++;try{if(t.clipboardData?.items.add(n),t.clipboardData?.files[r]!==n)throw new Error(`Failed to set file "${n.name}" as clipboardData item`)}catch(i){throw new Error(i.message)}}}return t},c4=({elements:e,files:o})=>{let t=j(e),r=new Set(e.filter(l=>ce(l))),n=!1,i=e.reduce((l,s)=>(Er(s)&&(n=!0,o&&o[s.fileId]&&(l[s.fileId]=o[s.fileId])),l),{});n&&!o&&console.warn("copyToClipboard: attempting to file element(s) without providing associated `files` object.");let a={type:Nr.excalidrawClipboard,elements:e.map(l=>{if(Hn(l,t)&&!r.has(Hn(l,t))){let s=Uo(l);return zo(s,t,{frameId:null}),s}return l}),files:o?i:void 0};return JSON.stringify(a)},dd=async(e,o,t)=>{await Zo(c4({elements:e,files:o}),t)},d4=e=>{let o=UE(e);return o.type===la?{spreadsheet:o.spreadsheet}:null};function KE(e){let o=[];for(let t of e.childNodes)if(t.nodeType===3){let r=t.textContent?.trim();r&&o.push({type:"text",value:r})}else if(t instanceof HTMLImageElement){let r=t.getAttribute("src");r&&r.startsWith("http")&&o.push({type:"imageUrl",value:r})}else o=o.concat(KE(t));return o}var m4=e=>{let o=e.clipboardData?.getData(pe.html);if(!o)return null;try{let t=new DOMParser().parseFromString(o,pe.html),r=KE(t.body);if(r.length)return{type:"mixedContent",value:r}}catch(t){console.error(`error in parseHTMLFromPaste: ${t.message}`)}return null},ZE=async()=>{let e={},o;try{o=await navigator.clipboard?.read()}catch(t){try{if(navigator.clipboard?.readText){console.warn(`navigator.clipboard.readText() failed (${t.message}). Failling back to navigator.clipboard.read()`);let r=await navigator.clipboard?.readText();if(r)return{[pe.text]:r}}}catch(r){if(navigator.clipboard?.read)console.warn(`navigator.clipboard.readText() failed (${r.message}). Failling back to navigator.clipboard.read()`);else{if(r.name==="DataError")return console.warn(`navigator.clipboard.read() error, clipboard is probably empty: ${r.message}`),e;throw r}}throw t}for(let t of o)for(let r of t.types)if(Jf(gf,r))try{if(r===pe.text||r===pe.html)e[r]=await(await t.getType(r)).text();else if(K0(r)){let n=await t.getType(r),i=Q0(n,r,void 0);e[r]=i}else throw new Tp(`Unsupported clipboard type: ${r}`)}catch(n){console.warn(n instanceof Tp?n.message:`Cannot retrieve ${r} from clipboardItem: ${n.message}`)}return Object.keys(e).length===0&&console.warn("No clipboard data found from clipboard.read()."),e},p4=async(e,o=!1)=>{try{let t=!o&&e&&m4(e);return t?t.value.every(n=>n.type==="text")?{type:"text",value:e.clipboardData?.getData(pe.text)||t.value.map(n=>n.value).join(`
5
- `).trim()}:t:{type:"text",value:(e.clipboardData?.getData(pe.text)||"").trim()}}catch{return{type:"text",value:""}}},md=async(e,o=!1)=>{let t=await p4(e,o);if(t.type==="mixedContent")return{mixedContent:t.value};try{let r=!o&&d4(t.value);if(r)return r}catch(r){console.error(r)}try{let r=JSON.parse(t.value),n=r.type===Nr.excalidrawClipboardWithAPI;if(s4(r))return{elements:r.elements,files:r.files,text:o?JSON.stringify(r.elements,null,2):void 0,programmaticAPI:n}}catch{}return{text:t.value}},pd=async e=>{try{await navigator.clipboard.write([new window.ClipboardItem({[pe.png]:e})])}catch(o){if(Br(e))await navigator.clipboard.write([new window.ClipboardItem({[pe.png]:await e})]);else throw o}},Zo=async(e,o)=>{if(cd)try{await navigator.clipboard.writeText(e||"");return}catch(t){console.error(t)}try{if(o){if(o.clipboardData?.setData(pe.text,e||""),o.clipboardData?.getData(pe.text)!==e)throw new Error("Failed to setData on clipboardEvent");return}}catch(t){console.error(t)}if(!u4(e))throw new Error("Error copying to clipboard.")},u4=e=>{e||(e=" ");let o=document.documentElement.getAttribute("dir")==="rtl",t=document.createElement("textarea");t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[o?"right":"left"]="-9999px";let r=window.pageYOffset||document.documentElement.scrollTop;t.style.top=`${r}px`,t.style.fontSize="12pt",t.setAttribute("readonly",""),t.value=e,document.body.appendChild(t);let n=!1;try{t.select(),t.setSelectionRange(0,t.value.length),n=document.execCommand("copy")}catch(i){console.error(i)}return t.remove(),n};var Qn=(e,{selectedElementIds:o},t)=>{e=ge(e);let r=t&&_e(e,{selectedElementIds:o}),n=null,i=r?q(e,{selectedElementIds:o},{includeBoundTextElement:!0}):e;return r&&(i.length===1&&ce(i[0])?(n=i[0],i=tc(e,n)):i.length>1&&(i=q(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}))),{exportingFrame:n,exportedElements:Zt(i)}},ei=async(e,o,t,r,{exportBackground:n,exportPadding:i=ui,viewBackgroundColor:a,name:l=t.name||Lf,fileHandle:s=null,exportingFrame:c=null})=>{if(o.length===0)throw new Error(g("alerts.cannotExportEmptyCanvas"));if(e==="svg"||e==="clipboard-svg"){let d=Hi(o,{exportBackground:n,exportWithDarkMode:t.exportWithDarkMode,viewBackgroundColor:a,exportPadding:i,exportScale:t.exportScale,exportEmbedScene:t.exportEmbedScene&&e==="svg"},r,{exportingFrame:c});if(e==="svg")return kp(d.then(p=>new Blob([Mf+p.outerHTML],{type:pe.svg})),{description:"Export to SVG",name:l,extension:t.exportEmbedScene?"excalidraw.svg":"svg",mimeTypes:[Ya.svg],fileHandle:s});if(e==="clipboard-svg"){let p=await d.then(u=>u.outerHTML);try{await Zo(p)}catch{throw new Error(g("errors.copyToSystemClipboardFailed"))}return}}let m=bc(o,t,r,{exportBackground:n,viewBackgroundColor:a,exportPadding:i,exportingFrame:c});if(e==="png"){let d=Vn(m);return t.exportEmbedScene&&(d=d.then(p=>import("./data/image-JVO2Y5EQ.js").then(({encodePngMetadata:u})=>u({blob:p,metadata:dl(o,t,r,"local")})))),kp(d,{description:"Export to PNG",name:l,extension:t.exportEmbedScene?"excalidraw.png":"png",mimeTypes:[Ya.png],fileHandle:s})}else if(e==="clipboard")try{let d=Vn(m);await pd(d)}catch(d){throw console.warn(d),d.name==="CANVAS_POSSIBLY_TOO_BIG"?new Error(g("canvasError.canvasTooBig")):fo&&d.name==="TypeError"?new Error(`${g("alerts.couldNotCopyToClipboard")}
5
+ `).trim()}:t:{type:"text",value:(e.clipboardData?.getData(pe.text)||"").trim()}}catch{return{type:"text",value:""}}},md=async(e,o=!1)=>{let t=await p4(e,o);if(t.type==="mixedContent")return{mixedContent:t.value};try{let r=!o&&d4(t.value);if(r)return r}catch(r){console.error(r)}try{let r=JSON.parse(t.value),n=r.type===Nr.excalidrawClipboardWithAPI;if(s4(r))return{elements:r.elements,files:r.files,text:o?JSON.stringify(r.elements,null,2):void 0,programmaticAPI:n}}catch{}return{text:t.value}},pd=async e=>{try{await navigator.clipboard.write([new window.ClipboardItem({[pe.png]:e})])}catch(o){if(Br(e))await navigator.clipboard.write([new window.ClipboardItem({[pe.png]:await e})]);else throw o}},Zo=async(e,o)=>{if(cd)try{await navigator.clipboard.writeText(e||"");return}catch(t){console.error(t)}try{if(o){if(o.clipboardData?.setData(pe.text,e||""),o.clipboardData?.getData(pe.text)!==e)throw new Error("Failed to setData on clipboardEvent");return}}catch(t){console.error(t)}if(!u4(e))throw new Error("Error copying to clipboard.")},u4=e=>{e||(e=" ");let o=document.documentElement.getAttribute("dir")==="rtl",t=document.createElement("textarea");t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[o?"right":"left"]="-9999px";let r=window.pageYOffset||document.documentElement.scrollTop;t.style.top=`${r}px`,t.style.fontSize="12pt",t.setAttribute("readonly",""),t.value=e,document.body.appendChild(t);let n=!1;try{t.select(),t.setSelectionRange(0,t.value.length),n=document.execCommand("copy")}catch(i){console.error(i)}return t.remove(),n};var Qn=(e,{selectedElementIds:o},t)=>{e=ge(e);let r=t&&_e(e,{selectedElementIds:o}),n=null,i=r?q(e,{selectedElementIds:o},{includeBoundTextElement:!0}):e;return r&&(i.length===1&&ce(i[0])?(n=i[0],i=tc(e,n)):i.length>1&&(i=q(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}))),{exportingFrame:n,exportedElements:Zt(i)}},ei=async(e,o,t,r,{exportBackground:n,exportPadding:i=ui,viewBackgroundColor:a,name:l=t.name||Lf,fileHandle:s=null,exportingFrame:c=null})=>{if(o.length===0)throw new Error(g("alerts.cannotExportEmptyCanvas"));if(e==="svg"||e==="clipboard-svg"){let d=Hi(o,{exportBackground:n,exportWithDarkMode:t.exportWithDarkMode,viewBackgroundColor:a,exportPadding:i,exportScale:t.exportScale,exportEmbedScene:t.exportEmbedScene&&e==="svg"},r,{exportingFrame:c});if(e==="svg")return kp(d.then(p=>new Blob([Mf+p.outerHTML],{type:pe.svg})),{description:"Export to SVG",name:l,extension:t.exportEmbedScene?"excalidraw.svg":"svg",mimeTypes:[Ya.svg],fileHandle:s});if(e==="clipboard-svg"){let p=await d.then(u=>u.outerHTML);try{await Zo(p)}catch{throw new Error(g("errors.copyToSystemClipboardFailed"))}return}}let m=bc(o,t,r,{exportBackground:n,viewBackgroundColor:a,exportPadding:i,exportingFrame:c});if(e==="png"){let d=Vn(m);return t.exportEmbedScene&&(d=d.then(p=>import("./data/image-RL6HVGCV.js").then(({encodePngMetadata:u})=>u({blob:p,metadata:dl(o,t,r,"local")})))),kp(d,{description:"Export to PNG",name:l,extension:t.exportEmbedScene?"excalidraw.png":"png",mimeTypes:[Ya.png],fileHandle:s})}else if(e==="clipboard")try{let d=Vn(m);await pd(d)}catch(d){throw console.warn(d),d.name==="CANVAS_POSSIBLY_TOO_BIG"?new Error(g("canvasError.canvasTooBig")):fo&&d.name==="TypeError"?new Error(`${g("alerts.couldNotCopyToClipboard")}
6
6
 
7
7
  ${g("hints.firefox_clipboard_write")}`):new Error(g("alerts.couldNotCopyToClipboard"))}else throw new Error("Unsupported export type")};var XE=async(e,o,t,r)=>{let{exportBackground:n,viewBackgroundColor:i,fileHandle:a}=o,l=Y0(a);if(!a||!V0(l))throw new Error("fileHandle should exist and should be of type svg or png when resaving");o={...o,exportEmbedScene:!0};let{exportedElements:s,exportingFrame:c}=Qn(e,o,!1);return await ei(l,s,o,t,{exportBackground:n,viewBackgroundColor:i,name:r,fileHandle:a,exportingFrame:c}),{fileHandle:a}};import{Fragment as h4,jsx as Sr,jsxs as g4}from"react/jsx-runtime";var Fu=O({name:"changeProjectName",label:"labels.fileTitle",trackEvent:!1,perform:(e,o,t)=>({appState:{...o,name:t},captureUpdate:A.EVENTUALLY}),PanelComponent:({appState:e,updateData:o,appProps:t,data:r,app:n})=>Sr(zE,{label:g("labels.fileTitle"),value:n.getName(),onChange:i=>o(i),ignoreFocus:r?.ignoreFocus??!1})}),$E=O({name:"changeExportScale",label:"imageExportDialog.scale",trackEvent:{category:"export",action:"scale"},perform:(e,o,t)=>({appState:{...o,exportScale:t},captureUpdate:A.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t})=>{let r=ge(e),i=_e(r,o)?q(r,o):r;return Sr(h4,{children:ks.map(a=>{let[l,s]=G0(i,ui,a),c=`${g("imageExportDialog.label.scale")} ${a}x (${l}x${s})`;return Sr(K,{size:"small",type:"radio",icon:`${a}x`,name:"export-canvas-scale",title:c,"aria-label":c,id:"export-canvas-scale",checked:a===o.exportScale,onChange:()=>t(a)},a)})})}}),Hu=O({name:"changeExportBackground",label:"imageExportDialog.label.withBackground",trackEvent:{category:"export",action:"toggleBackground"},perform:(e,o,t)=>({appState:{...o,exportBackground:t},captureUpdate:A.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>Sr(Nl,{checked:e.exportBackground,onChange:t=>o(t),children:g("imageExportDialog.label.withBackground")})}),ud=O({name:"changeExportEmbedScene",label:"imageExportDialog.tooltip.embedScene",trackEvent:{category:"export",action:"embedScene"},perform:(e,o,t)=>({appState:{...o,exportEmbedScene:t},captureUpdate:A.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>g4(Nl,{checked:e.exportEmbedScene,onChange:t=>o(t),children:[g("imageExportDialog.label.embedScene"),Sr(Dt,{label:g("imageExportDialog.tooltip.embedScene"),long:!0,children:Sr("div",{className:"excalidraw-tooltip-icon",children:Mb})})]})}),ti=O({name:"saveToActiveFile",label:"buttons.save",icon:Kn,trackEvent:{category:"export"},predicate:(e,o,t,r)=>!!r.props.UIOptions.canvasActions.saveToActiveFile&&!!o.fileHandle&&!o.viewModeEnabled,perform:async(e,o,t,r)=>{let n=!!o.fileHandle;try{let{fileHandle:i}=xc(o.fileHandle)?await XE(e,o,r.files,r.getName()):await uc(e,o,r.files,r.getName());return{captureUpdate:A.EVENTUALLY,appState:{...o,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),{captureUpdate:A.EVENTUALLY}}},keyTest:e=>!1}),zl=O({name:"saveFileToDisk",label:"exportDialog.disk_title",icon:Kn,viewMode:!0,trackEvent:{category:"export"},perform:async(e,o,t,r)=>{try{let{fileHandle:n}=await uc(e,{...o,fileHandle:null},r.files,r.getName());return{captureUpdate:A.EVENTUALLY,appState:{...o,openDialog:null,fileHandle:n,toast:{message:g("toast.fileSaved")}}}}catch(n){return n?.name!=="AbortError"?console.error(n):console.warn(n),{captureUpdate:A.EVENTUALLY}}},keyTest:e=>e.key===w.S&&e.shiftKey&&e[w.CTRL_OR_CMD],PanelComponent:({updateData:e})=>Sr(K,{type:"button",icon:Cb,title:g("buttons.saveAs"),"aria-label":g("buttons.saveAs"),showAriaLabel:be().editor.isMobile,hidden:!Fi,onClick:()=>e(null),"data-testid":"save-as-button"})}),sa=O({name:"loadScene",label:"buttons.load",trackEvent:{category:"export"},predicate:(e,o,t,r)=>!!r.props.UIOptions.canvasActions.loadScene&&!o.viewModeEnabled,perform:async(e,o,t,r)=>{try{let{elements:n,appState:i,files:a}=await Ip(o,e);return{elements:n,appState:i,files:a,captureUpdate:A.IMMEDIATELY}}catch(n){return n?.name==="AbortError"?(console.warn(n),!1):{elements:e,appState:{...o,errorMessage:n.message},files:r.files,captureUpdate:A.EVENTUALLY}}},keyTest:e=>e[w.CTRL_OR_CMD]&&e.key===w.O}),jE=O({name:"exportWithDarkMode",label:"imageExportDialog.label.darkMode",trackEvent:{category:"export",action:"toggleTheme"},perform:(e,o,t)=>({appState:{...o,exportWithDarkMode:t},captureUpdate:A.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>Sr("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"-45px",marginBottom:"10px"},children:Sr(OE,{value:e.exportWithDarkMode?re.DARK:re.LIGHT,onChange:t=>{o(t===re.DARK)},title:g("imageExportDialog.label.darkMode")})})});var qE="{}",Uu=O({name:"copyStyles",label:"labels.copyStyles",icon:Qp,trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=[],i=e.find(a=>o.selectedElementIds[a.id]);if(n.push(i),i&&gt(i)){let a=me(i,r.scene.getNonDeletedElementsMap());n.push(a)}return i&&(qE=JSON.stringify(n)),{appState:{...o,toast:{message:g("toast.copyStyles")}},captureUpdate:A.EVENTUALLY}},keyTest:e=>e[w.CTRL_OR_CMD]&&e.altKey&&e.code===le.C}),Gu=O({name:"pasteStyles",label:"labels.pasteStyles",icon:Qp,trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=JSON.parse(qE),i=n[0],a=n[1];if(!s1(i))return{elements:e,captureUpdate:A.EVENTUALLY};let l=q(e,o,{includeBoundTextElement:!0}),s=l.map(c=>c.id);return{elements:e.map(c=>{if(s.includes(c.id)){let m=i;if(V(c)&&c.containerId&&(m=a),!m)return c;let d=ee(c,{backgroundColor:m?.backgroundColor,strokeWidth:m?.strokeWidth,strokeColor:m?.strokeColor,strokeStyle:m?.strokeStyle,fillStyle:m?.fillStyle,opacity:m?.opacity,roughness:m?.roughness,roundness:m.roundness?d1(m.roundness.type,c)?m.roundness:m1(c):null});if(V(d)){let p=m.fontSize||fr,u=m.fontFamily||Rr;d=ee(d,{fontSize:p,fontFamily:u,textAlign:m.textAlign||ys,lineHeight:m.lineHeight||Ro(u)});let f=null;d.containerId&&(f=l.find(b=>V(d)&&b.id===d.containerId)||null),Ke(d,f,r.scene)}return d.type==="arrow"&&Ae(m)&&(d=ee(d,{startArrowhead:m.startArrowhead,endArrowhead:m.endArrowhead})),ce(c)&&(d=ee(d,{roundness:null,backgroundColor:"transparent"})),d}return c}),captureUpdate:A.IMMEDIATELY}},keyTest:e=>e[w.CTRL_OR_CMD]&&e.altKey&&e.code===le.V});import{jsx as JE}from"react/jsx-runtime";var f4=O({name:"toggleCanvasMenu",label:"buttons.menu",trackEvent:{category:"menu"},perform:(e,o)=>({appState:{...o,openMenu:o.openMenu==="canvas"?null:"canvas"},captureUpdate:A.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>JE(K,{type:"button",icon:Lc,"aria-label":g("buttons.menu"),onClick:o,selected:e.openMenu==="canvas"})}),b4=O({name:"toggleEditMenu",label:"buttons.edit",trackEvent:{category:"menu"},perform:(e,o)=>({appState:{...o,openMenu:o.openMenu==="shape"?null:"shape"},captureUpdate:A.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t})=>JE(K,{visible:Oi(o,ge(e)),type:"button",icon:Tb,"aria-label":g("buttons.edit"),onClick:t,selected:o.openMenu==="shape"})}),oi=O({name:"toggleShortcuts",label:"welcomeScreen.defaults.helpHint",icon:bb,viewMode:!0,trackEvent:{category:"menu",action:"toggleHelpDialog"},perform:(e,o,t,{focusContainer:r})=>(o.openDialog?.name==="help"&&r(),{appState:{...o,openDialog:o.openDialog?.name==="help"?null:{name:"help"}},captureUpdate:A.EVENTUALLY}),keyTest:e=>e.key===w.QUESTION_MARK});import{jsx as ca}from"react/jsx-runtime";var x4=e=>{if(e.length>=2){let o=e[0].groupIds;for(let t of o)if(e.reduce((r,n)=>r&&Mi(n,t),!0))return!0}return!1},QE=(e,o,t)=>{let r=t.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0});return r.length>=2&&!x4(r)&&!oc(r)},Wu=O({name:"group",label:"labels.group",icon:e=>ca(Xp,{theme:e.theme}),trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=W1(r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0}));if(n.length<2)return{appState:o,elements:e,captureUpdate:A.EVENTUALLY};let i=Fo(o);if(i.length===1){let x=i[0],E=new Set(Fe(e,x).map(C=>C.id)),y=new Set(n.map(C=>C.id));if(new Set([...Array.from(E),...Array.from(y)]).size===E.size)return{appState:o,elements:e,captureUpdate:A.EVENTUALLY}}let a=[...e];new Set(n.map(x=>x.frameId)).size>1&&U1(n).forEach((E,y)=>{Qs(E,r.scene.getNonDeletedElementsMap())});let s=lo(),c=j(n);a=a.map(x=>c.get(x.id)?ee(x,{groupIds:O1(x.groupIds,s,o.editingGroupId)}):x);let m=Fe(a,s),d=m[m.length-1],p=a.lastIndexOf(d),u=a.slice(p+1),f=a.slice(0,p).filter(x=>!Mi(x,s)),b=or([...f,...m,...u],j(m));return{appState:{...o,...D1(s,{...o,selectedGroupIds:{}},ge(a))},elements:b,captureUpdate:A.IMMEDIATELY}},predicate:(e,o,t,r)=>QE(e,o,r),keyTest:e=>!e.shiftKey&&e[w.CTRL_OR_CMD]&&e.key===w.G,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>ca(K,{hidden:!QE(e,o,r),type:"button",icon:ca(Xp,{theme:o.theme}),onClick:()=>t(null),title:`${g("labels.group")} \u2014 ${D("CtrlOrCmd+G")}`,"aria-label":g("labels.group"),visible:_e(ge(e),o)})}),Yu=O({name:"ungroup",label:"labels.ungroup",icon:e=>ca($p,{theme:e.theme}),trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=Fo(o),i=j(e);if(n.length===0)return{appState:o,elements:e,captureUpdate:A.EVENTUALLY};let a=[...e],l=[];a=a.map(p=>{tt(p)&&l.push(p.id);let u=B1(p.groupIds,o.selectedGroupIds);return u.length===p.groupIds.length?p:ee(p,{groupIds:u})});let s=rt(o,ge(a),o,null),c=r.scene.getSelectedElements(o),m=new Set(c.filter(p=>p.frameId).map(p=>p.frameId));return G1(e).filter(p=>m.has(p.id)).forEach(p=>{p&&(a=ec(a,Li(a,p,o,i),p,r))}),s.selectedElementIds=Object.entries(s.selectedElementIds).reduce((p,[u,f])=>(f&&!l.includes(u)&&(p[u]=!0),p),{}),{appState:{...o,...s},elements:a,captureUpdate:A.IMMEDIATELY}},keyTest:e=>e.shiftKey&&e[w.CTRL_OR_CMD]&&e.key===w.G.toUpperCase(),predicate:(e,o)=>Fo(o).length>0,PanelComponent:({elements:e,appState:o,updateData:t})=>ca(K,{type:"button",hidden:Fo(o).length===0,icon:ca($p,{theme:o.theme}),onClick:()=>t(null),title:`${g("labels.ungroup")} \u2014 ${D("CtrlOrCmd+Shift+G")}`,"aria-label":g("labels.ungroup"),visible:_e(ge(e),o)})});import w4 from"clsx";var hd=(e,o,t,r,n,i,a)=>{e.beginPath(),e.moveTo(o+i,t),e.lineTo(o+r-i,t),e.quadraticCurveTo(o+r,t,o+r,t+i),e.lineTo(o+r,t+n-i),e.quadraticCurveTo(o+r,t+n,o+r-i,t+n),e.lineTo(o+i,t+n),e.quadraticCurveTo(o,t+n,o,t+n-i),e.lineTo(o,t+i),e.quadraticCurveTo(o,t,o+i,t),e.closePath(),e.fill(),a&&(e.strokeStyle=a),e.stroke()};function E4(e){let o=0;if(e.length===0)return o;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);o=(o<<5)-o+r}return o}var ri=(e,o)=>`hsl(${Math.abs(E4(o?.id||e))%37*10}, 100%, 83%)`,e2=e=>{let o=e?.trim()?.codePointAt(0);return(o?String.fromCodePoint(o):"?").toUpperCase()},t2=({context:e,renderConfig:o,appState:t,normalizedWidth:r,normalizedHeight:n})=>{for(let[i,a]of o.remotePointerViewportCoords){let{x:l,y:s}=a,c=t.collaborators.get(i);l-=t.offsetLeft,s-=t.offsetTop;let m=11,d=14,p=l<0||l>r-m||s<0||s>n-d;l=Math.max(l,0),l=Math.min(l,r-m),s=Math.max(s,0),s=Math.min(s,n-d);let u=ri(i,c);e.save(),e.strokeStyle=u,e.fillStyle=u;let f=o.remotePointerUserStates.get(i),b=p||f==="idle"||f==="away";b&&(e.globalAlpha=.3),o.remotePointerButton.get(i)==="down"&&(e.beginPath(),e.arc(l,s,15,0,2*Math.PI,!1),e.lineWidth=3,e.strokeStyle="#ffffff88",e.stroke(),e.closePath(),e.beginPath(),e.arc(l,s,15,0,2*Math.PI,!1),e.lineWidth=1,e.strokeStyle=u,e.stroke(),e.closePath());let x=t.theme===re.DARK?"#2f6330":hf,E=c?.isSpeaking;E&&(e.fillStyle=x,e.strokeStyle=x,e.lineWidth=10,e.lineJoin="round",e.beginPath(),e.moveTo(l,s),e.lineTo(l+0,s+14),e.lineTo(l+4,s+9),e.lineTo(l+11,s+8),e.closePath(),e.stroke(),e.fill()),e.fillStyle=Wa,e.strokeStyle=Wa,e.lineWidth=6,e.lineJoin="round",e.beginPath(),e.moveTo(l,s),e.lineTo(l+0,s+14),e.lineTo(l+4,s+9),e.lineTo(l+11,s+8),e.closePath(),e.stroke(),e.fill(),e.fillStyle=u,e.strokeStyle=u,e.lineWidth=2,e.lineJoin="round",e.beginPath(),b?(e.moveTo(l-1,s-1),e.lineTo(l-1,s+15),e.lineTo(l+5,s+10),e.lineTo(l+12,s+9),e.closePath(),e.fill()):(e.moveTo(l,s),e.lineTo(l+0,s+14),e.lineTo(l+4,s+9),e.lineTo(l+11,s+8),e.closePath(),e.fill(),e.stroke());let y=o.remotePointerUsernames.get(i)||"";if(!p&&y){e.font="600 12px sans-serif";let v=(E?l+0:l)+m/2,C=(E?s+0:s)+d+2,S=5,I=3,P=e.measureText(y),M=P.actualBoundingBoxDescent+P.actualBoundingBoxAscent,B=Math.max(M,12),R=v-1,z=C-1,Y=P.width+2+S*2+2,W=B+2+I*2+2;if(e.roundRect?(e.beginPath(),e.roundRect(R,z,Y,W,8),e.fillStyle=u,e.fill(),e.strokeStyle=Wa,e.stroke(),E&&(e.beginPath(),e.roundRect(R-2,z-2,Y+4,W+4,8),e.strokeStyle=x,e.stroke())):hd(e,R,z,Y,W,8,Wa),e.fillStyle=uf,e.fillText(y,v+S+1,C+I+P.actualBoundingBoxAscent+Math.floor((B-M)/2)+2),E){e.fillStyle=x;let oe=8,H=8,F=5;e.fillRect(R+Y+H,z+(W/2-oe/2),2,oe),e.fillRect(R+Y+H+F,z+(W/2-oe*2/2),2,oe*2),e.fillRect(R+Y+H+F*2,z+(W/2-oe/2),2,oe)}}e.restore(),e.closePath()}};import y4 from"clsx";import{useState as v4}from"react";import{jsx as o2}from"react/jsx-runtime";var Vu=({color:e,onClick:o,name:t,src:r,className:n})=>{let i=e2(t),[a,l]=v4(!1),s=!a&&r,c=s?void 0:{background:e};return o2("div",{className:y4("Avatar",n),style:c,onClick:o,children:s?o2("img",{className:"Avatar-img",src:r,alt:i,referrerPolicy:"no-referrer",onError:()=>l(!0)}):i})};import{jsx as cr,jsxs as gd}from"react/jsx-runtime";var C4=O({name:"goToCollaborator",label:"Go to a collaborator",viewMode:!0,trackEvent:{category:"collab"},perform:(e,o,t)=>!t.socketId||o.userToFollow?.socketId===t.socketId||t.isCurrentUser?{appState:{...o,userToFollow:null},captureUpdate:A.EVENTUALLY}:{appState:{...o,userToFollow:{socketId:t.socketId,username:t.username||""},openMenu:o.openMenu==="canvas"?null:o.openMenu},captureUpdate:A.EVENTUALLY},PanelComponent:({updateData:e,data:o,appState:t})=>{let{socketId:r,collaborator:n,withName:i,isBeingFollowed:a}=o,l=ri(r,n),s=w4({"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?gd("div",{className:"UserList__collaborator-status-icon-speaking-indicator",title:g("userList.hint.isSpeaking"),children:[cr("div",{}),cr("div",{}),cr("div",{})]}):n.isMuted?cr("div",{className:"UserList__collaborator-status-icon-microphone-muted",title:g("userList.hint.micMuted"),children:Lx}):cr("div",{title:g("userList.hint.inCall"),children:Mx}):null;return i?gd("div",{className:`dropdown-menu-item dropdown-menu-item-base UserList__collaborator ${s}`,style:{"--avatar-size":"1.5rem"},onClick:()=>e(n),children:[cr(Vu,{color:l,onClick:()=>{},name:n.username||"",src:n.avatarUrl,className:s}),cr("div",{className:"UserList__collaborator-name",children:n.username}),gd("div",{className:"UserList__collaborator-status-icons","aria-hidden":!0,children:[a&&cr("div",{className:"UserList__collaborator-status-icon-is-followed",title:g("userList.hint.followStatus"),children:Xn}),c]})]}):gd("div",{className:`UserList__collaborator UserList__collaborator--avatar-only ${s}`,children:[cr(Vu,{color:l,onClick:()=>{e(n)},name:n.username||"",src:n.avatarUrl,className:s}),c&&cr("div",{className:"UserList__collaborator-status-icon",children:c})]})}});var Ku=O({name:"addToLibrary",trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});for(let i of Ms)if(n.some(a=>a.type===i))return{captureUpdate:A.EVENTUALLY,appState:{...o,errorMessage:g(`errors.libraryElementTypeError.${i}`)}};return r.library.getLatestLibrary().then(i=>r.library.setLibrary([{id:lo(),status:"unpublished",elements:n.map(Uo),created:Date.now()},...i])).then(()=>({captureUpdate:A.EVENTUALLY,appState:{...o,toast:{message:g("toast.addedToLibrary")}}})).catch(i=>({captureUpdate:A.EVENTUALLY,appState:{...o,errorMessage:i.message}}))},label:"labels.addToLibrary"});import{jsx as ma}from"react/jsx-runtime";var Rt=(e,o)=>{let t=o.scene.getSelectedElements(e);return Fn(t,o.scene.getNonDeletedElementsMap()).length>1&&!t.some(n=>ce(n))},da=(e,o,t,r)=>{let n=t.scene.getSelectedElements(o),i=e0(n,r,t.scene),a=j(i);return yo(e.map(l=>a.get(l.id)||l),o,t)},T4=O({name:"alignTop",label:"labels.alignTop",icon:Gp,trackEvent:{category:"element"},predicate:(e,o,t,r)=>Rt(o,r),perform:(e,o,t,r)=>({appState:o,elements:da(e,o,r,{position:"start",axis:"y"}),captureUpdate:A.IMMEDIATELY}),keyTest:e=>e[w.CTRL_OR_CMD]&&e.shiftKey&&e.key===w.ARROW_UP,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>ma(K,{hidden:!Rt(o,r),type:"button",icon:Gp,onClick:()=>t(null),title:`${g("labels.alignTop")} \u2014 ${D("CtrlOrCmd+Shift+Up")}`,"aria-label":g("labels.alignTop"),visible:_e(ge(e),o)})}),k4=O({name:"alignBottom",label:"labels.alignBottom",icon:Wp,trackEvent:{category:"element"},predicate:(e,o,t,r)=>Rt(o,r),perform:(e,o,t,r)=>({appState:o,elements:da(e,o,r,{position:"end",axis:"y"}),captureUpdate:A.IMMEDIATELY}),keyTest:e=>e[w.CTRL_OR_CMD]&&e.shiftKey&&e.key===w.ARROW_DOWN,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>ma(K,{hidden:!Rt(o,r),type:"button",icon:Wp,onClick:()=>t(null),title:`${g("labels.alignBottom")} \u2014 ${D("CtrlOrCmd+Shift+Down")}`,"aria-label":g("labels.alignBottom"),visible:_e(ge(e),o)})}),I4=O({name:"alignLeft",label:"labels.alignLeft",icon:Yp,trackEvent:{category:"element"},predicate:(e,o,t,r)=>Rt(o,r),perform:(e,o,t,r)=>({appState:o,elements:da(e,o,r,{position:"start",axis:"x"}),captureUpdate:A.IMMEDIATELY}),keyTest:e=>e[w.CTRL_OR_CMD]&&e.shiftKey&&e.key===w.ARROW_LEFT,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>ma(K,{hidden:!Rt(o,r),type:"button",icon:Yp,onClick:()=>t(null),title:`${g("labels.alignLeft")} \u2014 ${D("CtrlOrCmd+Shift+Left")}`,"aria-label":g("labels.alignLeft"),visible:_e(ge(e),o)})}),S4=O({name:"alignRight",label:"labels.alignRight",icon:Vp,trackEvent:{category:"element"},predicate:(e,o,t,r)=>Rt(o,r),perform:(e,o,t,r)=>({appState:o,elements:da(e,o,r,{position:"end",axis:"x"}),captureUpdate:A.IMMEDIATELY}),keyTest:e=>e[w.CTRL_OR_CMD]&&e.shiftKey&&e.key===w.ARROW_RIGHT,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>ma(K,{hidden:!Rt(o,r),type:"button",icon:Vp,onClick:()=>t(null),title:`${g("labels.alignRight")} \u2014 ${D("CtrlOrCmd+Shift+Right")}`,"aria-label":g("labels.alignRight"),visible:_e(ge(e),o)})}),M4=O({name:"alignVerticallyCentered",label:"labels.centerVertically",icon:Kp,trackEvent:{category:"element"},predicate:(e,o,t,r)=>Rt(o,r),perform:(e,o,t,r)=>({appState:o,elements:da(e,o,r,{position:"center",axis:"y"}),captureUpdate:A.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>ma(K,{hidden:!Rt(o,r),type:"button",icon:Kp,onClick:()=>t(null),title:g("labels.centerVertically"),"aria-label":g("labels.centerVertically"),visible:_e(ge(e),o)})}),L4=O({name:"alignHorizontallyCentered",label:"labels.centerHorizontally",icon:Zp,trackEvent:{category:"element"},predicate:(e,o,t,r)=>Rt(o,r),perform:(e,o,t,r)=>({appState:o,elements:da(e,o,r,{position:"center",axis:"x"}),captureUpdate:A.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>ma(K,{hidden:!Rt(o,r),type:"button",icon:Zp,onClick:()=>t(null),title:g("labels.centerHorizontally"),"aria-label":g("labels.centerHorizontally"),visible:_e(ge(e),o)})});import{jsx as i2}from"react/jsx-runtime";var r2=(e,o)=>{let t=o.scene.getSelectedElements(e);return t.length>1&&!t.some(r=>ce(r))},n2=(e,o,t,r)=>{let n=t.scene.getSelectedElements(o),i=a0(n,t.scene.getNonDeletedElementsMap(),r),a=j(i);return yo(e.map(l=>a.get(l.id)||l),o,t)},A4=O({name:"distributeHorizontally",label:"labels.distributeHorizontally",trackEvent:{category:"element"},perform:(e,o,t,r)=>({appState:o,elements:n2(e,o,r,{space:"between",axis:"x"}),captureUpdate:A.IMMEDIATELY}),keyTest:e=>!e[w.CTRL_OR_CMD]&&e.altKey&&e.code===le.H,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>i2(K,{hidden:!r2(o,r),type:"button",icon:Pb,onClick:()=>t(null),title:`${g("labels.distributeHorizontally")} \u2014 ${D("Alt+H")}`,"aria-label":g("labels.distributeHorizontally"),visible:_e(ge(e),o)})}),_4=O({name:"distributeVertically",label:"labels.distributeVertically",trackEvent:{category:"element"},perform:(e,o,t,r)=>({appState:o,elements:n2(e,o,r,{space:"between",axis:"y"}),captureUpdate:A.IMMEDIATELY}),keyTest:e=>!e[w.CTRL_OR_CMD]&&e.altKey&&e.code===le.V,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>i2(K,{hidden:!r2(o,r),type:"button",icon:Db,onClick:()=>t(null),title:`${g("labels.distributeVertically")} \u2014 ${D("Alt+V")}`,"aria-label":g("labels.distributeVertically"),visible:_e(ge(e),o)})});import{jsx as N4}from"react/jsx-runtime";var P4=(e,o,t)=>{let r=t.scene.getSelectedElements(o),n=j(e),i=gl(t.scene,r,n,o.arrangeConfiguration.algorithm,o.arrangeConfiguration.gap),a=j(i);return yo(e.map(l=>a.get(l.id)||l),o,t)},D4=Rt,R4=O({name:"arrangeElements",label:"labels.arrangeElements",keywords:["arrange","rearrange","spread"],icon:tu,trackEvent:{category:"element"},viewMode:!1,predicate:(e,o,t,r)=>D4(o,r),perform:(e,o,t,r)=>({appState:o,elements:P4(e,o,r),captureUpdate:A.IMMEDIATELY}),keyTest:e=>e.shiftKey&&hi(e,w.R),PanelComponent:({updateData:e})=>N4("button",{type:"button",className:"arrangeButton",onClick:()=>e(null),title:`${g("labels.arrangeElements")} \u2014 ${D("Shift+R")}`,children:tu})});var Zu=O({name:"flipHorizontal",label:"labels.flipHorizontal",icon:Dx,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:yo(a2(e,r.scene.getNonDeletedElementsMap(),o,"horizontal",r),o,r),appState:o,captureUpdate:A.IMMEDIATELY}),keyTest:e=>e.shiftKey&&e.code===le.H}),Xu=O({name:"flipVertical",label:"labels.flipVertical",icon:Px,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:yo(a2(e,r.scene.getNonDeletedElementsMap(),o,"vertical",r),o,r),appState:o,captureUpdate:A.IMMEDIATELY}),keyTest:e=>e.shiftKey&&e.code===le.V&&!e[w.CTRL_OR_CMD]}),a2=(e,o,t,r,n)=>{let i=q(ge(e),t,{includeBoundTextElement:!0,includeElementsInFrames:!0}),a=O4(i,o,t,r,n),l=j(a);return e.map(s=>l.get(s.id)||s)},O4=(e,o,t,r,n)=>{if(e.every(u=>Ae(u)&&(u.startBinding||u.endBinding)))return e.map(u=>{let f=u;return ee(f,{startArrowhead:f.endArrowhead,endArrowhead:f.startArrowhead})});let{midX:i,midY:a}=so(e);C0(e,o,"nw",n.scene,new Map(Array.from(o.values()).map(u=>[u.id,Uo(u)])),{flipByX:r==="horizontal",flipByY:r==="vertical",shouldResizeFromCenter:!0,shouldMaintainAspectRatio:!0}),nl(e.filter(he),Ur(t),[],n.scene,t.zoom);let{elbowArrows:l,otherElements:s}=e.reduce((u,f)=>se(f)?{...u,elbowArrows:u.elbowArrows.concat(f)}:{...u,otherElements:u.otherElements.concat(f)},{elbowArrows:[],otherElements:[]}),{midX:c,midY:m}=so(e),[d,p]=[i-c,a-m];return s.forEach(u=>n.scene.mutateElement(u,{x:u.x+d,y:u.y+p})),l.forEach(u=>n.scene.mutateElement(u,{x:u.x+d,y:u.y+p})),e};var pa=O({name:"copy",label:"labels.copy",icon:bl,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});try{await dd(n,r.files,t)}catch(i){return{captureUpdate:A.EVENTUALLY,appState:{...o,errorMessage:i.message}}}return{captureUpdate:A.EVENTUALLY}},keyTest:void 0}),$u=O({name:"paste",label:"labels.paste",trackEvent:{category:"element"},perform:async(e,o,t,r)=>{let n;try{n=await ZE()}catch(i){return i.name==="AbortError"||i.name==="NotAllowedError"?!1:(console.error(`actionPaste ${i.name}: ${i.message}`),fo?{captureUpdate:A.EVENTUALLY,appState:{...o,errorMessage:g("hints.firefox_clipboard_write")}}:{captureUpdate:A.EVENTUALLY,appState:{...o,errorMessage:g("errors.asyncPasteFailedOnRead")}})}try{r.pasteFromClipboard(VE({types:n}))}catch(i){return console.error(i),{captureUpdate:A.EVENTUALLY,appState:{...o,errorMessage:g("errors.asyncPasteFailedOnParse")}}}return{captureUpdate:A.EVENTUALLY}},keyTest:void 0}),fd=O({name:"cut",label:"labels.cut",icon:bx,trackEvent:{category:"element"},perform:(e,o,t,r)=>(pa.perform(e,o,t,r),Il.perform(e,o,null,r)),keyTest:e=>e[w.CTRL_OR_CMD]&&e.key===w.X}),bd=O({name:"copyAsSvg",label:"labels.copyAsSvg",icon:Rx,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{if(!r.canvas)return{captureUpdate:A.EVENTUALLY};let{exportedElements:n,exportingFrame:i}=Qn(e,o,!0);try{await ei("clipboard-svg",n,o,r.files,{...o,exportingFrame:i,name:r.getName()});let a=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});return{appState:{toast:{message:g("toast.copyToClipboardAsSvg",{exportSelection:a.length?g("toast.selection"):g("toast.canvas"),exportColorScheme:o.exportWithDarkMode?g("buttons.darkMode"):g("buttons.lightMode")})}},captureUpdate:A.EVENTUALLY}}catch(a){return console.error(a),{appState:{errorMessage:a.message},captureUpdate:A.EVENTUALLY}}},predicate:e=>cd&&e.length>0,keywords:["svg","clipboard","copy"]}),xd=O({name:"copyAsPng",label:"labels.copyAsPng",icon:Nx,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{if(!r.canvas)return{captureUpdate:A.EVENTUALLY};let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),{exportedElements:i,exportingFrame:a}=Qn(e,o,!0);try{return await ei("clipboard",i,o,r.files,{...o,exportingFrame:a,name:r.getName()}),{appState:{...o,toast:{message:g("toast.copyToClipboardAsPng",{exportSelection:n.length?g("toast.selection"):g("toast.canvas"),exportColorScheme:o.exportWithDarkMode?g("buttons.darkMode"):g("buttons.lightMode")})}},captureUpdate:A.EVENTUALLY}}catch(l){return console.error(l),{appState:{...o,errorMessage:l.message},captureUpdate:A.EVENTUALLY}}},predicate:e=>cn&&e.length>0,keyTest:e=>e.code===le.C&&e.altKey&&e.shiftKey,keywords:["png","clipboard","copy"]}),Ed=O({name:"copyText",label:"labels.copyText",trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0});try{Zo(qm(n))}catch{throw new Error(g("errors.copyToSystemClipboardFailed"))}return{captureUpdate:A.EVENTUALLY}},predicate:(e,o,t,r)=>cd&&r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0}).some(V),keywords:["text","clipboard","copy"]});var yd=O({name:"gridMode",icon:Fx,keywords:["snap"],label:"labels.toggleGrid",viewMode:!0,trackEvent:{category:"canvas",predicate:e=>e.gridModeEnabled},perform(e,o){return{appState:{...o,gridModeEnabled:!this.checked(o),objectsSnapModeEnabled:!1},captureUpdate:A.EVENTUALLY}},checked:e=>e.gridModeEnabled,predicate:(e,o,t)=>t.gridModeEnabled===void 0,keyTest:e=>e[w.CTRL_OR_CMD]&&e.code===le.QUOTE});var ua=O({name:"zenMode",label:"buttons.zenMode",icon:Bx,viewMode:!0,trackEvent:{category:"canvas",predicate:e=>!e.zenModeEnabled},perform(e,o){return{appState:{...o,zenModeEnabled:!this.checked(o)},captureUpdate:A.EVENTUALLY}},checked:e=>e.zenModeEnabled,predicate:(e,o,t)=>typeof t.zenModeEnabled>"u",keyTest:e=>!e[w.CTRL_OR_CMD]&&e.altKey&&e.code===le.Z});var ju=O({name:"objectsSnapMode",label:"buttons.objectsSnapMode",icon:Ox,viewMode:!1,trackEvent:{category:"canvas",predicate:e=>!e.objectsSnapModeEnabled},perform(e,o){return{appState:{...o,objectsSnapModeEnabled:!this.checked(o),gridModeEnabled:!1},captureUpdate:A.EVENTUALLY}},checked:e=>e.objectsSnapModeEnabled,predicate:(e,o,t)=>typeof t.objectsSnapModeEnabled>"u",keyTest:e=>!e[w.CTRL_OR_CMD]&&e.altKey&&e.code===le.S});var ha=O({name:"stats",label:"stats.fullTitle",icon:_x,viewMode:!0,trackEvent:{category:"menu"},keywords:["edit","attributes","customize"],perform(e,o){return{appState:{...o,stats:{...o.stats,open:!this.checked(o)}},captureUpdate:A.EVENTUALLY}},checked:e=>e.stats.open,keyTest:e=>!e[w.CTRL_OR_CMD]&&e.altKey&&e.code===le.SLASH});var qu=O({name:"unbindText",label:"labels.unbindText",trackEvent:{category:"element"},predicate:(e,o,t,r)=>r.scene.getSelectedElements(o).some(i=>gt(i)),perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o),i=r.scene.getNonDeletedElementsMap();return n.forEach(a=>{let l=me(a,i);if(l){let{width:s,height:c}=Et(l.originalText,Qe(l),l.lineHeight),m=g1(a.id);h1(a.id);let{x:d,y:p}=Hr(a,l,i);r.scene.mutateElement(l,{containerId:null,width:s,height:c,text:l.originalText,x:d,y:p}),r.scene.mutateElement(a,{boundElements:a.boundElements?.filter(u=>u.id!==l.id),height:m||a.height})}}),{elements:e,appState:o,captureUpdate:A.IMMEDIATELY}}}),Ju=O({name:"bindText",label:"labels.bindText",trackEvent:{category:"element"},predicate:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);if(n.length===2){let i=V(n[0])||V(n[1]),a;if(vr(n[0])?a=n[0]:vr(n[1])&&(a=n[1]),i&&a&&me(a,r.scene.getNonDeletedElementsMap())===null)return!0}return!1},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o),i,a;V(n[0])&&vr(n[1])?(i=n[0],a=n[1]):(i=n[1],a=n[0]),r.scene.mutateElement(i,{containerId:a.id,verticalAlign:Vt.MIDDLE,textAlign:Va.CENTER,autoResize:!0,angle:Ae(a)?0:a?.angle??0}),r.scene.mutateElement(a,{boundElements:(a.boundElements||[]).concat({type:"text",id:i.id})});let l=a.height;return Ke(i,a,r.scene),tl(a.id,l),{elements:B4(e,a,i),appState:{...o,selectedElementIds:{[a.id]:!0}},captureUpdate:A.IMMEDIATELY}}}),B4=(e,o,t)=>{let r=e.slice(),n=r.findIndex(a=>a.id===t.id);r.splice(n,1);let i=r.findIndex(a=>a.id===o.id);return r.splice(i+1,0,t),or(r,j([o,t])),r},z4=(e,o,t)=>{let r=e.slice(),n=r.findIndex(a=>a.id===o.id);r.splice(n,1);let i=r.findIndex(a=>a.id===t.id);return r.splice(i,0,o),or(r,j([o,t])),r},l2=O({name:"wrapTextInContainer",label:"labels.createContainerFromText",trackEvent:{category:"element"},predicate:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o),i=n.some(a=>V(a));return n.length>0&&i},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o),i=e.slice(),a={};for(let l of n)if(V(l)){let s=Xt({type:"rectangle",backgroundColor:o.currentItemBackgroundColor,boundElements:[...l.boundElements||[],{id:l.id,type:"text"}],angle:l.angle,fillStyle:o.currentItemFillStyle,strokeColor:o.currentItemStrokeColor,roughness:o.currentItemRoughness,strokeWidth:o.currentItemStrokeWidth,strokeStyle:o.currentItemStrokeStyle,roundness:o.currentItemRoundness==="round"?{type:Fr("rectangle")?pt.ADAPTIVE_RADIUS:pt.PROPORTIONAL_RADIUS}:null,opacity:100,locked:!1,x:l.x-zm,y:l.y-zm,width:Ti(l.width,"rectangle"),height:Ti(l.height,"rectangle"),groupIds:l.groupIds,frameId:l.frameId});if(l.boundElements?.length){let c=l.boundElements.filter(d=>d.type==="arrow").map(d=>d.id);i.filter(d=>c.includes(d.id)).forEach(d=>{let p=d.startBinding,u=d.endBinding;p?.elementId===l.id&&(p={...p,elementId:s.id}),u?.elementId===l.id&&(u={...u,elementId:s.id}),(p||u)&&r.scene.mutateElement(d,{startBinding:p,endBinding:u})})}r.scene.mutateElement(l,{containerId:s.id,verticalAlign:Vt.MIDDLE,boundElements:null,textAlign:Va.CENTER,autoResize:!0}),Ke(l,s,r.scene),i=z4([...i,s],s,l),a[s.id]=!0}return{elements:i,appState:{...o,selectedElementIds:a},captureUpdate:A.IMMEDIATELY}}});import F4 from"clsx";import{useCallback as s2,useEffect as c2,useLayoutEffect as H4,useRef as U4,useState as G4}from"react";import{jsx as ga,jsxs as d2}from"react/jsx-runtime";var th=380,W4=42,Qu=5,m2=85,Y4=500,eh=!1,vd=new Map,p2=({element:e,scene:o,setAppState:t,onLinkOpen:r,setToast:n,updateEmbedValidationStatus:i})=>{let a=o.getNonDeletedElementsMap(),l=ar(),s=lr(),c=be(),m=e.link||"",[d,p]=G4(m),u=U4(null),f=l.showHyperlinkPopup==="editor",b=s2(()=>{if(!u.current)return;let C=Bo(u.current.value)||null;if(!e.link&&C&&Ee("hyperlink","create"),Bt(e)){if(l.activeEmbeddable?.element===e&&t({activeEmbeddable:null}),!C){o.mutateElement(e,{link:null}),i(e,!1);return}if(!Ri(C,s.validateEmbeddable))C&&n({message:g("toast.unableToEmbed"),closable:!0}),e.link&&vd.set(e.id,e.link),o.mutateElement(e,{link:C}),i(e,!1);else{let{width:S,height:I}=e,P=Wn(C);P?.error instanceof URIError&&n({message:g("toast.unrecognizedLinkFormat"),closable:!0});let M=P?P.intrinsicSize.w/P.intrinsicSize.h:1,B=vd.get(e.id)!==e.link;o.mutateElement(e,{...B?{width:P?.type==="video"?S>I?S:I*M:S,height:P?.type==="video"&&S>I?S/M:I}:{},link:C}),i(e,!0),vd.has(e.id)&&vd.delete(e.id)}}else o.mutateElement(e,{link:C})},[e,o,n,s.validateEmbeddable,l.activeEmbeddable,t,i]);H4(()=>()=>{b()},[b]),c2(()=>{f&&u?.current&&!(c.viewport.isMobile||c.isTouchScreen)&&u.current.select()},[f,c.viewport.isMobile,c.isTouchScreen]),c2(()=>{let C=null,S=I=>{if(f)return;C&&clearTimeout(C),K4(e,a,l,L(I.clientX,I.clientY))&&(C=window.setTimeout(()=>{t({showHyperlinkPopup:!1})},Y4))};return window.addEventListener("pointermove",S,!1),()=>{window.removeEventListener("pointermove",S,!1),C&&clearTimeout(C)}},[l,e,f,t,a]);let x=s2(()=>{Ee("hyperlink","delete"),o.mutateElement(e,{link:null}),t({showHyperlinkPopup:!1})},[t,e,o]),E=()=>{Ee("hyperlink","edit","popup-ui"),t({showHyperlinkPopup:"editor"})},{x:y,y:v}=u2(e,l,a);return l.contextMenu||l.selectedElementsAreBeingDragged||l.resizingElement||l.isRotating||l.openMenu||l.viewModeEnabled?null:d2("div",{className:"excalidraw-hyperlinkContainer",style:{top:`${v}px`,left:`${y}px`,width:th,padding:Qu},children:[f?ga("input",{className:F4("excalidraw-hyperlinkContainer-input"),placeholder:g("labels.link.hint"),ref:u,value:d,onChange:C=>p(C.target.value),autoFocus:!0,onKeyDown:C=>{C.stopPropagation(),C[w.CTRL_OR_CMD]&&C.key===w.K&&C.preventDefault(),(C.key===w.ENTER||C.key===w.ESCAPE)&&(b(),t({showHyperlinkPopup:"info"}))}}):e.link?ga("a",{href:Bo(e.link||""),className:"excalidraw-hyperlinkContainer-link",target:zs(e.link)?"_self":"_blank",onClick:C=>{if(e.link&&r){let S=Rs("excalidraw-link",C.nativeEvent);r({...e,link:Bo(e.link)},S),S.defaultPrevented&&C.preventDefault()}},rel:"noopener noreferrer",children:e.link}):ga("div",{className:"excalidraw-hyperlinkContainer-link",children:g("labels.link.empty")}),d2("div",{className:"excalidraw-hyperlinkContainer__buttons",children:[!f&&ga(K,{type:"button",title:g("buttons.edit"),"aria-label":g("buttons.edit"),label:g("buttons.edit"),onClick:E,className:"excalidraw-hyperlinkContainer--edit",icon:ir}),ga(K,{type:"button",title:g("labels.linkToElement"),"aria-label":g("labels.linkToElement"),label:g("labels.linkToElement"),onClick:()=>{t({openDialog:{name:"elementLinkSelector",sourceElementId:e.id}})},icon:Uc}),m&&!Bt(e)&&ga(K,{type:"button",title:g("buttons.remove"),"aria-label":g("buttons.remove"),label:g("buttons.remove"),onClick:x,className:"excalidraw-hyperlinkContainer--remove",icon:kr})]})]})},u2=(e,o,t)=>{let[r,n]=nt(e,t),{x:i,y:a}=ht({sceneX:r+e.width/2,sceneY:n},o),l=i-o.offsetLeft-th/2,s=a-o.offsetTop-m2;return{x:l,y:s}},oh=(e,o)=>{let t=q(e,o);return Bt(t[0])?"labels.link.editEmbed":t[0]?.link?"labels.link.edit":"labels.link.create"},Fl=null,h2=(e,o,t)=>{Fl&&clearTimeout(Fl),Fl=window.setTimeout(()=>V4(e,o,t),vf)},V4=(e,o,t)=>{if(!e.link)return;let r=aa();r.classList.add("excalidraw-tooltip--visible"),r.style.maxWidth="20rem",r.textContent=Gn(e.link)?g("labels.link.goToElement"):e.link;let[n,i,a,l]=nt(e,t),[s,c,m,d]=N0([n,i,a,l],e.angle,o),p=ht({sceneX:s,sceneY:c},o);Ou(r,{left:p.x,top:p.y,width:m,height:d},"top"),Ee("hyperlink","tooltip","link-icon"),eh=!0},rh=()=>{Fl&&clearTimeout(Fl),eh&&(eh=!1,aa().classList.remove("excalidraw-tooltip--visible"))},K4=(e,o,t,[r,n])=>{let{x:i,y:a}=Be({clientX:r,clientY:n},t),l=15/t.zoom.value;if(Ys(L(i,a),e,o))return!1;let[s,c,m]=nt(e,o);if(i>=s&&i<=m&&a>=c-m2&&a<=c)return!1;let{x:d,y:p}=u2(e,t,o);return!(r>=d-l&&r<=d+th+Qu*2+l&&n>=p-l&&n<=p+l+Qu*2+W4)};import{jsx as Z4}from"react/jsx-runtime";var Hl=O({name:"hyperlink",label:(e,o)=>oh(e,o),icon:yl,perform:(e,o)=>o.showHyperlinkPopup==="editor"?!1:{elements:e,appState:{...o,showHyperlinkPopup:"editor",openMenu:null},captureUpdate:A.IMMEDIATELY},trackEvent:{category:"hyperlink",action:"click"},keyTest:e=>e[w.CTRL_OR_CMD]&&e.key===w.K,predicate:(e,o)=>q(e,o).length===1,PanelComponent:({elements:e,appState:o,updateData:t})=>{let r=q(e,o);return Z4(K,{type:"button",icon:yl,"aria-label":g(oh(e,o)),title:`${Bt(e[0])?g("labels.link.labelEmbed"):g("labels.link.label")} - ${D("CtrlOrCmd+K")}`,onClick:()=>t(null),selected:r.length===1&&!!r[0].link})}});var nh=e=>e.every(o=>!o.locked),Ul=O({name:"toggleElementLock",label:(e,o,t)=>{let r=t.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!1});return nh(r)?"labels.elementLock.lock":"labels.elementLock.unlock"},icon:(e,o)=>{let t=q(o,e);return nh(t)?jr:Tr},trackEvent:{category:"element"},predicate:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);return n.length>0&&!n.some(i=>i.locked&&i.frameId)},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});if(!n.length)return!1;let i=nh(n),a=j(n),l=n.length>1&&js(n),c=n.length===1||l?null:lo(),m={...o.lockedMultiSelections};if(i)m={...o.lockedMultiSelections,...c?{[c]:!0}:{}};else if(l){let E=n[0].groupIds.at(-1);delete m[E]}let d=e.map(E=>{if(!a.has(E.id))return E;let y=E.groupIds;return i?c&&(y=[...y,c]):y=y.filter(v=>!o.lockedMultiSelections[v]),ee(E,{locked:i,groupIds:y.length!==E.groupIds.length?y:E.groupIds})}),p=j(d),u=i?{}:Object.fromEntries(n.map(E=>[E.id,!0])),f=n.map(E=>p.get(E.id)||E),b=i?{}:zn(f,o),x=i?c||(l?n[0].groupIds.at(-1):n[0].id):null;return{elements:d,appState:{...o,selectedElementIds:u,selectedGroupIds:b,selectedLinearElement:i?null:o.selectedLinearElement,lockedMultiSelections:m,activeLockedId:x},captureUpdate:A.IMMEDIATELY}},keyTest:(e,o,t,r)=>e.key.toLocaleLowerCase()===w.L&&e[w.CTRL_OR_CMD]&&e.shiftKey&&r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!1}).length>0}),g2=O({name:"unlockAllElements",trackEvent:{category:"canvas"},viewMode:!1,icon:Tr,predicate:(e,o)=>q(e,o).length===0&&e.some(r=>r.locked),perform:(e,o)=>{let t=e.filter(a=>a.locked),r=e.map(a=>{if(a.locked){let l=a.groupIds.filter(s=>!o.lockedMultiSelections[s]);return ee(a,{locked:!1,groupIds:a.groupIds.length!==l.length?l:a.groupIds})}return a}),n=j(r),i=t.map(a=>n.get(a.id)||a);return{elements:r,appState:{...o,selectedElementIds:Object.fromEntries(t.map(a=>[a.id,!0])),selectedGroupIds:zn(i,o),lockedMultiSelections:{},activeLockedId:null},captureUpdate:A.IMMEDIATELY}},label:"labels.elementLock.unlockAll"});import Iy from"clsx";import ZT from"fuzzy";import{useEffect as Wd,useRef as XT,useState as Gd}from"react";import{useEffect as Yl,useMemo as f2,useRef as ah,useState as X4}from"react";import{jsx as ch}from"react/jsx-runtime";var $4=8,j4=10,Gl=["rectangle","diamond","ellipse"],Wl=["line","sharpArrow","curvedArrow","elbowArrow"],q4=new Set(Gl),J4=new Set(Wl),ba=e=>q4.has(e),Cd=e=>e==="arrow"||J4.has(e),Xo=Ne(null),Vl=new Map,Kl=new Map,Q4=({app:e})=>{let o=e.scene.getSelectedElements(e.state),t=ah(null);return Yl(()=>{if(o.length===0){e.updateEditorAtom(Xo,null);return}let r=xa(o);r&&!t.current?t.current=r:(t.current&&!r||t.current&&r!==t.current)&&(e.updateEditorAtom(Xo,null),t.current=null)},[o,e]),Yl(()=>()=>{Vl.clear(),Kl.clear()},[]),ch(eC,{app:e,elements:o})},eC=({app:e,elements:o})=>{let t=xa(o),r=f2(()=>t==="generic"?y2(o):[],[t,o]),n=f2(()=>t==="linear"?sh(o):[],[t,o]),i=t==="generic"?r.every(d=>d.type===r[0].type):t==="linear"?n.every(d=>On(d)===On(n[0])):!1,[a,l]=X4({x:0,y:0}),s=ah(""),c=ah(null);Yl(()=>{let d=[...r,...n].sort((x,E)=>x.id.localeCompare(E.id)),p=`
8
8
  ${e.state.scrollX}${e.state.scrollY}${e.state.offsetTop}${e.state.offsetLeft}${e.state.zoom.value}${d.map(x=>x.id).join(",")}`;if(p===s.current)return;s.current=p;let u;if(d.length===1){let[x,,,E,y,v]=nt(d[0],e.scene.getNonDeletedElementsMap());u=De(L(x,E),L(y,v),d[0].angle)}else{let{minX:x,maxY:E}=so(d);u=L(x,E)}let{x:f,y:b}=ht({sceneX:u[0],sceneY:u[1]},e.state);l({x:f,y:b})},[r,n,e.scene,e.state]),Yl(()=>{for(let d of n){let p=lh(d.id,iC(d));Kl.has(p)||Kl.set(p,d)}},[n]),Yl(()=>{for(let d of r)if(!Vl.has(d.id)){let p=me(d,e.scene.getNonDeletedElementsMap());p&&Vl.set(d.id,{fontSize:p.fontSize})}},[r,e.scene]);let m=t==="linear"?[["line",en],["sharpArrow",Bc],["curvedArrow",Fc],["elbowArrow",zc]]:t==="generic"?[["rectangle",qr],["diamond",Jr],["ellipse",Qr]]:[];return ch("div",{ref:c,tabIndex:-1,style:{position:"absolute",top:`${a.y+(j4+8)*e.state.zoom.value-e.state.offsetTop}px`,left:`${a.x-e.state.offsetLeft-$4}px`,zIndex:2},className:Ot.CONVERT_ELEMENT_TYPE_POPUP,children:m.map(([d,p])=>{let u=i&&(t==="generic"&&r[0].type===d||t==="linear"&&On(n[0])===d);return ch(K,{className:"Shape",type:"radio",icon:p,checked:u,name:"convertElementType-option",title:d,keyBindingLabel:"","aria-label":d,"data-testid":`toolbar-${d}`,onChange:()=>{e.state.activeTool.type!==d&&Ee("convertElementType",d,"ui"),dh(e,{conversionType:t,nextType:d}),c.current?.focus()}},`${o[0].id}${o[0].version}_${d}`)})})},tC=(e,o,t)=>{let r=rl(e,o),n=Ws(e,o),i=Ci(o.text,Qe(o),r),a=Et(i,Qe(o),o.lineHeight),l=o.fontSize;for(;(a.width>r||a.height>n)&&l>0;){l-=1;let s={...o,fontSize:l};a=Et(o.text,Qe(s),o.lineHeight)}zo(o,t.getNonDeletedElementsMap(),{fontSize:l,width:a.width,height:a.height}),Ke(o,e,t)},dh=(e,{conversionType:o,nextType:t,direction:r="right"})=>{if(!o)return!1;let n=e.scene.getSelectedElements(e.state),i=n.reduce((l,s)=>({...l,[s.id]:!0}),{}),a=r==="right"?1:-1;if(o==="generic"){let l=y2(n),c=l.every(m=>m.type===l[0].type)?Gl.indexOf(l[0].type):-1;if(t=t??Gl[(c+Gl.length+a)%Gl.length],t&&ba(t)){let m={};for(let p of l){let u=x2(p,t,e);m[u.id]=u}let d=[];for(let p of e.scene.getElementsIncludingDeleted())m[p.id]?d.push(m[p.id]):d.push(p);e.scene.replaceAllElements(d);for(let p of Object.values(m)){let u=me(p,e.scene.getNonDeletedElementsMap());u&&(Vl.get(p.id)&&zo(u,e.scene.getNonDeletedElementsMap(),{fontSize:Vl.get(p.id)?.fontSize??u.fontSize}),tC(p,u,e.scene))}e.setState(p=>({selectedElementIds:i,activeTool:Ie(p,{type:"selection"})}))}}if(o==="linear"){let l=sh(n);if(!t){let c=Bs(l,On),m=c?Wl.indexOf(c):-1;t=Wl[(m+Wl.length+a)%Wl.length]}if(Cd(t)){let c=[],m=e.scene.getElementsMapIncludingDeleted();for(let d of l){let p=Kl.get(lh(d.id,t));if(p&&On(p)===t)m.set(p.id,p),c.push(p);else{let u=x2(d,t,e);m.set(u.id,u),c.push(u)}}e.scene.replaceAllElements(m);for(let d of c)if(he(d))if(se(d)){let p=oC(d);if(p.length<2)continue;let u=[];for(let b=1;b<p.length-2;b++)u.push({start:p[b],end:p[b+1],index:b+1});let f=Vs(d,e.scene.getNonDeletedElementsMap(),{points:p,fixedSegments:u});zo(d,e.scene.getNonDeletedElementsMap(),{...f,endArrowhead:"arrow"})}else{let p=Wf(["line","sharpArrow","curvedArrow"],u=>Kl.get(lh(d.id,u)));if(p){let u=p.points;e.scene.mutateElement(d,{points:u})}}}let s=sh(e.scene.getSelectedElements(e.state));e.setState(c=>({selectedElementIds:i,selectedLinearElement:s.length===1?new $(s[0],e.scene.getNonDeletedElementsMap()):null,activeTool:Ie(c,{type:"selection"})}))}return!0},xa=e=>{if(e.length===0)return null;let o=!1;for(let t of e){if(ba(t.type))return"generic";E2(t)&&(o=!0)}return o?"linear":null},E2=e=>he(e)&&(!Ae(e)||!c1(e)&&!gt(e)),lh=(e,o)=>`${e}:${o}`,y2=e=>e.filter(o=>ba(o.type)),sh=e=>e.filter(o=>E2(o)),wd=20,fa=(e,o)=>e[0]===o[0],ih=(e,o)=>e[1]===o[1],b2=(e,o)=>fa(e,o)?Math.abs(e[1]-o[1]):Math.abs(e[0]-o[0]),oC=e=>{let o=[e.points[0]],t=rC(e.points);for(let i=1;i<t.length;++i){let a=o[o.length-1],l=[...t[i]];Math.abs(l[0]-a[0])<wd?l[0]=a[0]:Math.abs(l[1]-a[1])<wd&&(l[1]=a[1]),fa(a,l)||ih(a,l)||o.push(L(a[0],l[1])),o.push(l)}let r=[o[0]];for(let i=1;i<o.length-1;++i)fa(o[i-1],o[i])&&fa(o[i],o[i+1])||ih(o[i-1],o[i])&&ih(o[i],o[i+1])||r.push(o[i]);r.push(o[o.length-1]);let n=[r[0]];for(let i=1;i<r.length-1;++i){let a=n[n.length-1],l=r[i],s=r[i+1],c=fa(a,l),m=fa(l,s);if(c!==m){let d=b2(a,l),p=b2(l,s);if(d<wd||p<wd){if(p<d)c?s[0]=a[0]:s[1]=a[1];else if(m)for(let u=n.length-1;u>=0&&n[u][0]===a[0];--u)n[u][0]=l[0];else for(let u=n.length-1;u>=0&&n[u][1]===a[1];--u)n[u][1]=l[1];continue}}n.push(l)}return n.push(r[r.length-1]),n},rC=e=>{if(e.length===0)return[];let o=[e[0]];for(let t=1;t<e.length;t++){let[r,n]=o[o.length-1],[i,a]=e[t];(r!==i||n!==a)&&o.push(e[t])}return o},x2=(e,o,t)=>{if(!nC(e.type,o)){if(!$f())throw Error(`Invalid conversion from ${e.type} to ${o}.`);return e}if(e.type===o)return e;if(vo.delete(e),ba(o)){let r=wr(Xt({...e,type:o,roundness:o==="diamond"&&e.roundness?{type:Fr(o)?pt.ADAPTIVE_RADIUS:pt.PROPORTIONAL_RADIUS}:e.roundness}));return Wr(r,t.scene),r}if(Cd(o))switch(o){case"line":return wr(wo({...e,type:"line"}));case"sharpArrow":return wr(Xr({...e,type:"arrow",elbowed:!1,roundness:null,startArrowhead:t.state.currentItemStartArrowhead,endArrowhead:t.state.currentItemEndArrowhead}));case"curvedArrow":return wr(Xr({...e,type:"arrow",elbowed:!1,roundness:{type:pt.PROPORTIONAL_RADIUS},startArrowhead:t.state.currentItemStartArrowhead,endArrowhead:t.state.currentItemEndArrowhead}));case"elbowArrow":return wr(Xr({...e,type:"arrow",elbowed:!0,fixedSegments:null,roundness:null}))}return yi(o,`unhandled conversion type: ${o}`),e},nC=(e,o)=>!!(ba(e)&&ba(o)||Cd(e)&&Cd(o)),iC=e=>he(e)?On(e):e.type,v2=Q4;var w2=O({name:"toggleShapeSwitch",label:"labels.shapeSwitch",icon:()=>null,viewMode:!0,trackEvent:{category:"shape_switch",action:"toggle"},keywords:["change","switch","swap"],perform(e,o,t,r){return yt.set(Xo,{type:"panel"}),{captureUpdate:A.NEVER}},checked:e=>e.gridModeEnabled,predicate:(e,o,t)=>xa(e)!==null});var Td=O({name:"copyElementLink",label:"labels.copyElementLink",icon:$i,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{let n=q(e,o);try{if(window.location){let i=lc(n,o);return i?(await Zo(r.props.generateLinkForSelection?r.props.generateLinkForSelection(i.id,i.type):ac(i.id,i.type)),{appState:{toast:{message:g("toast.elementLinkCopied"),closable:!0}},captureUpdate:A.EVENTUALLY}):{appState:o,elements:e,app:r,captureUpdate:A.EVENTUALLY}}}catch(i){console.error(i)}return{appState:o,elements:e,app:r,captureUpdate:A.EVENTUALLY}},predicate:(e,o)=>sc(q(e,o))}),C2=O({name:"linkToElement",label:"labels.linkToElement",icon:Uc,perform:(e,o,t,r)=>{let n=q(e,o);return n.length!==1||!sc(n)?{elements:e,appState:o,app:r,captureUpdate:A.EVENTUALLY}:{appState:{...o,openDialog:{name:"elementLinkSelector",sourceElementId:q(e,o)[0].id}},captureUpdate:A.IMMEDIATELY}},predicate:(e,o,t,r)=>{let n=q(e,o);return o.openDialog?.name!=="elementLinkSelector"&&n.length===1&&sc(n)},trackEvent:!1});var aC={toggleTheme:[D("Shift+Alt+D")],saveScene:[D("CtrlOrCmd+S")],loadScene:[D("CtrlOrCmd+O")],imageExport:[D("CtrlOrCmd+Shift+E")],commandPalette:[D("CtrlOrCmd+/"),D("CtrlOrCmd+Shift+P")],cut:[D("CtrlOrCmd+X")],copy:[D("CtrlOrCmd+C")],paste:[D("CtrlOrCmd+V")],copyStyles:[D("CtrlOrCmd+Alt+C")],pasteStyles:[D("CtrlOrCmd+Alt+V")],selectAll:[D("CtrlOrCmd+A")],deleteSelectedElements:[D("Delete")],duplicateSelection:[D("CtrlOrCmd+D"),D(`Alt+${g("helpDialog.drag")}`)],sendBackward:[D("CtrlOrCmd+[")],bringForward:[D("CtrlOrCmd+]")],sendToBack:[Do?D("CtrlOrCmd+Alt+["):D("CtrlOrCmd+Shift+[")],bringToFront:[Do?D("CtrlOrCmd+Alt+]"):D("CtrlOrCmd+Shift+]")],copyAsPng:[D("Shift+Alt+C")],group:[D("CtrlOrCmd+G")],ungroup:[D("CtrlOrCmd+Shift+G")],gridMode:[D("CtrlOrCmd+'")],zenMode:[D("Alt+Z")],objectsSnapMode:[D("Alt+S")],stats:[D("Alt+/")],addToLibrary:[],flipHorizontal:[D("Shift+H")],flipVertical:[D("Shift+V")],viewMode:[D("Alt+R")],hyperlink:[D("CtrlOrCmd+K")],toggleElementLock:[D("CtrlOrCmd+Shift+L")],resetZoom:[D("CtrlOrCmd+0")],zoomOut:[D("CtrlOrCmd+-")],zoomIn:[D("CtrlOrCmd++")],zoomToFitSelection:[D("Shift+3")],zoomToFit:[D("Shift+1")],zoomToFitSelectionInViewport:[D("Shift+2")],toggleEraserTool:[D("E")],toggleHandTool:[D("H")],setFrameAsActiveTool:[D("F")],saveFileToDisk:[D("CtrlOrCmd+S")],saveToActiveFile:[D("CtrlOrCmd+S")],toggleShortcuts:[D("?")],searchMenu:[D("CtrlOrCmd+F")],wrapSelectionInFrame:[],arrangeElements:[D("Shift+R")]},Ye=(e,o=0)=>{let t=aC[e];return t&&t.length>0?t[o]||t[0]:""};var lC="\\u0300-\\u036f",sC="\\ufe20-\\ufe2f",cC="\\u20d0-\\u20ff",dC=lC+sC+cC,mC=`[${dC}]`,pC=RegExp(mC,"g"),uC=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,hC={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"E",\u00E6:"e",\u00DE:"T",\u00FE:"t",\u00DF:"s",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"I",\u0133:"i",\u0152:"E",\u0153:"e",\u0149:"n",\u017F:"s"},mh=e=>e.replace(uC,o=>hC[o]||o).replace(pC,"");import PT from"clsx";import{useEffect as DT,useState as RT}from"react";import{useCallback as gC,useState as fC}from"react";var T2=()=>{let[e,o]=fC(null),t=gC(r=>o(r),[]);return[e,t]};import{useState as py,useCallback as wh,useMemo as uy,useEffect as cy,memo as hy,useRef as kT}from"react";import{useEffect as M2,useRef as L2}from"react";var Ea=({elements:e,appState:o,files:t,maxWidthOrHeight:r,getDimensions:n,exportPadding:i,exportingFrame:a})=>{let{elements:l,appState:s}=Ui({elements:e,appState:o},null,null),{exportBackground:c,viewBackgroundColor:m}=s;return bc(l,{...s,offsetTop:0,offsetLeft:0,width:0,height:0},t||{},{exportBackground:c,exportPadding:i,viewBackgroundColor:m,exportingFrame:a},(d,p)=>{let u=document.createElement("canvas");if(r){typeof n=="function"&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");let b=Math.max(d,p),x=r<b?r/b:o?.exportScale??1;return u.width=d*x,u.height=p*x,{canvas:u,scale:x}}let f=n?.(d,p)||{width:d,height:p};return u.width=f.width,u.height=f.height,{canvas:u,scale:f.scale??1}})},k2=async e=>{let{mimeType:o=pe.png,quality:t}=e;o===pe.png&&typeof t=="number"&&console.warn(`"quality" will be ignored for "${pe.png}" mimeType`),o==="image/jpg"&&(o=pe.jpg),o===pe.jpg&&!e.appState?.exportBackground&&(console.warn(`Defaulting "exportBackground" to "true" for "${pe.jpg}" mimeType`),e={...e,appState:{...e.appState,exportBackground:!0}});let r=await Ea(e);return t=t||(/image\/jpe?g/.test(o)?.92:.8),new Promise((n,i)=>{r.toBlob(async a=>{if(!a)return i(new Error("couldn't export to blob"));a&&o===pe.png&&e.appState?.exportEmbedScene&&(a=await W0({blob:a,metadata:dl(e.elements,e.appState,e.files||{},"local")})),n(a)},o,t)})},ya=async({elements:e,appState:o=zi(),files:t={},exportPadding:r,renderEmbeddables:n,exportingFrame:i,skipInliningFonts:a,reuseImages:l})=>{let{elements:s,appState:c}=Ui({elements:e,appState:o},null,null),m={...c,exportPadding:r};return Hi(s,m,t,{exportingFrame:i,renderEmbeddables:n,skipInliningFonts:a,reuseImages:l})},bC=async e=>{if(e.type==="svg"){let o=await ya(e);await Zo(o.outerHTML)}else if(e.type==="png")await pd(k2(e));else if(e.type==="json")await dd(e.elements,e.files);else throw new Error("Invalid export type")};import{useEffect as xC,useState as EC}from"react";var ph=Ne(new Map),I2=async e=>await ya({elements:e,appState:{exportBackground:!1,viewBackgroundColor:go.white},files:null,renderEmbeddables:!1,skipInliningFonts:!0}),S2=(e,o,t)=>{let[r,n]=EC();return xC(()=>{if(o)if(e){let i=t.get(e);i?n(i):(async()=>{let a=await I2(o);a.querySelector(".style-fonts")?.remove(),a&&(t.set(e,a),n(a))})()}else(async()=>{let i=await I2(o);n(i)})()},[e,o,t,n]),r},kd=()=>{let[e]=ve(ph);return{clearLibraryCache:()=>e.clear(),deleteItemsFromLibraryCache:r=>{r.forEach(n=>e.delete(n))},svgCache:e}};var yC=["excalidraw.com","raw.githubusercontent.com/excalidraw/excalidraw-libraries"],_2=new xo,ni=Ne({status:"loaded",isInitialized:!1,libraryItems:[]}),Zl=e=>Zt(e),vC=(e,o)=>!e.find(t=>t.elements.length!==o.elements.length?!1:t.elements.every((r,n)=>r.id===o.elements[n].id&&r.versionNonce===o.elements[n].versionNonce)),P2=(e,o)=>{let t=[];for(let r of o)vC(e,r)&&t.push(r);return[...t,...e]},D2=(e,o)=>{let t=j(o),r={deletedItems:new Map,addedItems:new Map};for(let i of e)t.has(i.id)||r.deletedItems.set(i.id,i);let n=j(e);for(let i of o)n.has(i.id)||r.addedItems.set(i.id,i);return r},uh=class{constructor(o){T(this,"currLibraryItems",[]);T(this,"prevLibraryItems",Zl(this.currLibraryItems));T(this,"app");T(this,"updateQueue",[]);T(this,"getLastUpdateTask",()=>this.updateQueue[this.updateQueue.length-1]);T(this,"notifyListeners",()=>{if(this.updateQueue.length>0)yt.set(ni,o=>({status:"loading",libraryItems:this.currLibraryItems,isInitialized:o.isInitialized}));else{yt.set(ni,{status:"loaded",libraryItems:this.currLibraryItems,isInitialized:!0});try{let o=this.prevLibraryItems;this.prevLibraryItems=Zl(this.currLibraryItems);let t=Zl(this.currLibraryItems);this.app.props.onLibraryChange?.(t),_2.trigger(D2(o,t),t)}catch(o){console.error(o)}}});T(this,"destroy",()=>{this.updateQueue=[],this.currLibraryItems=[],yt.set(ph,new Map)});T(this,"resetLibrary",()=>this.setLibrary([]));T(this,"getLatestLibrary",()=>new Promise(async o=>{try{let t=await(this.getLastUpdateTask()||this.currLibraryItems);this.updateQueue.length>0?o(this.getLatestLibrary()):o(Zl(t))}catch{return o(this.currLibraryItems)}}));T(this,"updateLibrary",async({libraryItems:o,prompt:t=!1,merge:r=!1,openLibraryMenu:n=!1,defaultStatus:i="unpublished"})=>(n&&this.app.setState({openSidebar:{name:Pt.name,tab:Ka}}),this.setLibrary(()=>new Promise(async(a,l)=>{try{let s=await(typeof o=="function"&&!(o instanceof Blob)?o(this.currLibraryItems):o),c;s instanceof Blob?c=await Ap(s,i):c=ul(s,i),!t||window.confirm(g("alerts.confirmAddLibrary",{numShapes:c.length}))?(t&&this.app.focusContainer(),a(r?P2(this.currLibraryItems,c):c)):l(new Bi)}catch(s){l(s)}}))));T(this,"setLibrary",o=>{let t=new Promise(async(r,n)=>{try{await this.getLastUpdateTask(),typeof o=="function"&&(o=o(this.currLibraryItems)),this.currLibraryItems=Zl(await o),r(this.currLibraryItems)}catch(i){n(i)}}).catch(r=>{if(r.name==="AbortError")return console.warn("Library update aborted by user"),this.currLibraryItems;throw r}).finally(()=>{this.updateQueue=this.updateQueue.filter(r=>r!==t),this.notifyListeners()});return this.updateQueue.push(t),this.notifyListeners(),t});this.app=o}},R2=uh,Md=e=>{let t=Math.ceil(Math.sqrt(e.length)),r=[],n=u=>e.slice(u*t,u*t+t).reduce((b,x)=>{let{height:E}=so(x.elements);return Math.max(b,E)},0),i=u=>{let f=0,b=0,x=0;for(let E of e){if(f%t===0&&(b=0),b===u){let{width:y}=so(E.elements);x=Math.max(x,y)}f++,b++}return x},a=0,l=0,s=0,c=0,m=0,d=0,p=0;for(let u of e){m&&m%t===0&&(l+=s+50,a=0,d=0,p++),d===0&&(s=n(p)),c=i(d);let{minX:f,minY:b,width:x,height:E}=so(u.elements),y=(c-x)/2,v=(s-E)/2;r.push(...u.elements.map(C=>({...C,x:C.x+a+y-f,y:C.y+l+v-b}))),a+=c+50,m++,d++}return r},wC=(e,o=yC)=>{if(typeof o=="function"?o(e):o.some(t=>{let r=new URL(`https://${t.replace(/^https?:\/\//,"")}`),{hostname:n,pathname:i}=new URL(e);return new RegExp(`(^|\\.)${r.hostname}$`).test(n)&&new RegExp(`^${r.pathname.replace(/\/+$/,"")}(/+|$)`).test(i)}))return!0;throw new Error(`Invalid or disallowed library URL: "${e}"`)},hh=()=>{let e=new URLSearchParams(window.location.hash.slice(1)).get(Ts.addLibrary)||new URLSearchParams(window.location.search).get(Cs.addLibrary),o=e?new URLSearchParams(window.location.hash.slice(1)).get("token"):null;return e?{libraryUrl:e,idToken:o}:null},dn=class dn{constructor(o){T(this,"adapter");this.adapter=o}static async getLibraryItems(o,t,r=!0){let n=()=>new Promise(async(i,a)=>{try{let l=await o.load({source:t});i(ul(l?.libraryItems||[],"published"))}catch(l){a(l)}});return r?dn.queue.push(n):n()}getLibraryItems(o){return dn.getLibraryItems(this.adapter,o,!1)}};T(dn,"queue",new Pf),T(dn,"run",async(o,t)=>{let r=new dn(o);return dn.queue.push(()=>t(r))});var va=dn,Xl=0,Id=0,Sd=e=>vp(e.map(o=>`${o.id}:${yp(o.elements)}`).sort().join()),A2=async(e,o)=>{try{return Id++,await va.run(e,async t=>{let r=j(await t.getLibraryItems("save"));for(let[l]of o.deletedItems)r.delete(l);let n=[];for(let[l,s]of o.addedItems)r.has(l)?r.set(l,s):n.push(s);let i=n.concat(Array.from(r.values())),a=Sd(i);return a!==Xl&&await e.save({libraryItems:i}),Xl=a,i})}finally{Id--}},CC=e=>{let{excalidrawAPI:o}=e,t=L2(e);t.current=e;let r=L2(!1);M2(()=>{if(!o)return;r.current=!1;let n=async({libraryUrl:l,idToken:s})=>{let c=new Promise(async(d,p)=>{try{l=decodeURIComponent(l),l=Fs(l),wC(l,t.current.validateLibraryUrl);let f=await(await fetch(l)).blob();d(f)}catch(u){p(u)}}),m=s!==o.id;await(m&&document.hidden?new Promise(d=>{window.addEventListener("focus",()=>d(),{once:!0})}):null);try{await o.updateLibrary({libraryItems:c,prompt:m,merge:!0,defaultStatus:"published",openLibraryMenu:!0})}catch(d){throw o.updateScene({appState:{errorMessage:d.message}}),d}finally{if(window.location.hash.includes(Ts.addLibrary)){let d=new URLSearchParams(window.location.hash.slice(1));d.delete(Ts.addLibrary),window.history.replaceState({},Ha,`#${d.toString()}`)}else if(window.location.search.includes(Cs.addLibrary)){let d=new URLSearchParams(window.location.search);d.delete(Cs.addLibrary),window.history.replaceState({},Ha,`?${d.toString()}`)}}},i=l=>{l.preventDefault();let s=hh();s&&(l.stopImmediatePropagation(),window.history.replaceState({},"",l.oldURL),n(s))},a=hh();if(a&&n(a),"getInitialLibraryItems"in t.current&&t.current.getInitialLibraryItems&&(console.warn("useHandleLibrar `opts.getInitialLibraryItems` is deprecated. Use `opts.adapter` instead."),Promise.resolve(t.current.getInitialLibraryItems()).then(l=>{o.updateLibrary({libraryItems:l,merge:!0})}).catch(l=>{console.error(`UseHandeLibrary getInitialLibraryItems failed: ${l?.message}`)})),"adapter"in t.current&&t.current.adapter){let l=t.current.adapter,s=t.current.migrationAdapter,c=Yf();s?c.resolve(Zm(s.load).then(async m=>{let d=null;try{if(!m)return va.getLibraryItems(l,"load");d=ul(m.libraryItems||[],"published");let p=await A2(l,D2([],d));try{await s.clear()}catch(u){console.error(`couldn't delete legacy library data: ${u.message}`)}return p}catch(p){return console.error(`couldn't migrate legacy library data: ${p.message}`),d}}).catch(m=>(console.error(`error during library migration: ${m.message}`),va.getLibraryItems(l,"load")))):c.resolve(Zm(va.getLibraryItems,l,"load")),o.updateLibrary({libraryItems:c.then(m=>{let d=m||[];return Xl=Sd(d),d}),merge:!0}).finally(()=>{r.current=!0})}return window.addEventListener("hashchange",i),()=>{window.removeEventListener("hashchange",i)}},[o]),M2(()=>{let n=_2.on(async(a,l)=>{let s=r.current,c="adapter"in t.current&&t.current.adapter||null;try{c&&Xl!==Sd(l)&&await A2(c,a)}catch(m){console.error(`couldn't persist library update: ${m.message}`,a),s&&t.current.excalidrawAPI&&t.current.excalidrawAPI.updateScene({appState:{errorMessage:g("errors.saveLibraryError")}})}}),i=a=>{Id&&Zf(a)};return window.addEventListener("beforeunload",i),()=>{window.removeEventListener("beforeunload",i),n(),Xl=0,Id=0}},[])};import IC from"clsx";import{jsx as kC}from"react/jsx-runtime";var TC=({theme:e,id:o,libraryReturnUrl:t})=>{let r=t||window.location.origin+window.location.pathname;return kC("a",{className:"library-menu-browse-button",href:`${k.VITE_APP_LIBRARY_URL}?target=${window.name||"_blank"}&referrer=${r}&useHash=true&token=${o}&theme=${e}&version=${Is.excalidrawLibrary}`,target:"_excalidraw_libraries",children:g("labels.libraries")})},N2=TC;import{jsx as SC,jsxs as MC}from"react/jsx-runtime";var Ld=({libraryReturnUrl:e,theme:o,id:t,style:r,children:n,className:i})=>MC("div",{className:IC("library-menu-control-buttons",i),style:r,children:[SC(N2,{id:t,libraryReturnUrl:e,theme:o}),n]});import{useCallback as Ta,useEffect as yT,useMemo as ly,useRef as vT,useState as wT}from"react";import LC from"lodash.throttle";import{useEffect as AC}from"react";var _C=Ne(0),O2=e=>{let[o,t]=ve(_C);return AC(()=>{let{current:r}=e;if(!r)return;let n=LC(()=>{let{scrollTop:i}=r;t(i)},200);return r.addEventListener("scroll",n),()=>{n.cancel(),r.removeEventListener("scroll",n)}},[e,t]),o};import nT from"clsx";import{useCallback as iT,useState as bh}from"react";import{flushSync as B2}from"react-dom";import PC from"clsx";import{jsx as Ad,jsxs as RC}from"react/jsx-runtime";var DC=({label:e,onClick:o,className:t,children:r,actionType:n,type:i="button",isLoading:a,...l})=>{let s=n?`Dialog__action-button--${n}`:"";return RC("button",{className:PC("Dialog__action-button",s,t),type:i,"aria-label":e,onClick:o,...l,children:[r&&Ad("div",{style:a?{visibility:"hidden"}:{},children:r}),Ad("div",{style:a?{visibility:"hidden"}:{},children:e}),a&&Ad("div",{style:{position:"absolute",inset:0},children:Ad(mo,{})})]})},Mr=DC;import{jsx as z2,jsxs as F2}from"react/jsx-runtime";var NC=e=>{let{onConfirm:o,onCancel:t,children:r,confirmText:n=g("buttons.confirm"),cancelText:i=g("buttons.cancel"),className:a="",...l}=e,s=Le(),c=Gi(wa),{container:m}=at();return F2(lt,{onCloseRequest:t,size:"small",...l,className:`confirm-dialog ${a}`,children:[r,F2("div",{className:"confirm-dialog-buttons",children:[z2(Mr,{label:i,onClick:()=>{s({openMenu:null}),c(!1),B2(()=>{t()}),m?.focus()}}),z2(Mr,{label:n,onClick:()=>{s({openMenu:null}),c(!1),B2(()=>{o()}),m?.focus()},actionType:"danger"})]})]})},H2=NC;import Pd from"open-color";import{useCallback as GC,useEffect as fh,useRef as U2,useState as gh}from"react";var mn=class{static has(o){try{return!!window.localStorage.getItem(o)}catch(t){return console.warn(`localStorage.getItem error: ${t.message}`),!1}}static get(o){try{let t=window.localStorage.getItem(o);return t?JSON.parse(t):null}catch(t){return console.warn(`localStorage.getItem error: ${t.message}`),null}}};T(mn,"set",(o,t)=>{try{return window.localStorage.setItem(o,JSON.stringify(t)),!0}catch(r){return console.warn(`localStorage.setItem error: ${r.message}`),!1}}),T(mn,"delete",o=>{try{window.localStorage.removeItem(o)}catch(t){console.warn(`localStorage.removeItem error: ${t.message}`)}});import _d from"react";var OC=/({{[\w-]+}})|(<[\w-]+>)|(<\/[\w-]+>)/g,BC=/{{([\w-]+)}}/,zC=/<([\w-]+)>/,FC=/<\/([\w-]+)>/,HC=(e,o)=>{let t=[{name:"",children:[]}];return e.split(OC).filter(Boolean).forEach(r=>{let n=r.match(zC),i=r.match(FC),a=r.match(BC);if(n!==null){let l=n[1];o.hasOwnProperty(l)?t.push({name:l,children:[]}):console.warn(`Trans: missed to pass in prop ${l} for interpolating ${e}`)}else if(i!==null)if(i[1]===t[t.length-1].name){let s=t.pop(),c=_d.createElement(_d.Fragment,{},...s.children),m=o[s.name];typeof m=="function"&&t[t.length-1].children.push(m(c))}else console.warn(`Trans: unexpected end tag ${r} for interpolating ${e}`);else if(a!==null){let l=a[1];o.hasOwnProperty(l)?t[t.length-1].children.push(o[l]):console.warn(`Trans: key ${l} not in props for interpolating ${e}`)}else t[t.length-1].children.push(r)}),t.length!==1&&console.warn(`Trans: stack not empty for interpolating ${e}`),t[0].children},UC=({i18nKey:e,children:o,...t})=>{let{t:r}=it();return _d.createElement(_d.Fragment,{},...HC(r(e),t))},uo=UC;import{jsx as fe,jsxs as Nt}from"react/jsx-runtime";var WC=async e=>{let r=Math.round(8),n=Math.max(Math.round(128/64),2),i=Gf(e,6),a=document.createElement("canvas");a.width=i[0].length*128+(i[0].length+1)*(r*2)-r*2,a.height=i.length*128+(i.length+1)*(r*2)-r*2;let l=a.getContext("2d");l.fillStyle=Pd.white,l.fillRect(0,0,a.width,a.height);for(let[s,c]of e.entries()){let m=await Ea({elements:c.elements,files:null,maxWidthOrHeight:128}),{width:d,height:p}=m,u=Math.floor(s/6)*(128+r*2),f=s%6*(128+r*2);l.drawImage(m,f+(128-d)/2+r,u+(128-p)/2+r),l.lineWidth=n,l.strokeStyle=Pd.gray[4],l.strokeRect(f+r/2,u+r/2,128+r,128+r)}return await yc(new File([await Vn(a)],"preview",{type:pe.png}),{outputType:pe.jpg,maxWidthOrHeight:5e3})},YC=({libItem:e,appState:o,index:t,onChange:r,onRemove:n})=>{let i=U2(null),a=U2(null);return fh(()=>{let l=i.current;l&&(async()=>{let s=await ya({elements:e.elements,appState:{...o,viewBackgroundColor:Pd.white,exportBackground:!0},files:null,skipInliningFonts:!0});l.innerHTML=s.outerHTML})()},[e.elements,o]),Nt("div",{className:"single-library-item",children:[e.status==="published"&&fe("span",{className:"single-library-item-status",children:g("labels.statusPublished")}),fe("div",{ref:i,className:"single-library-item__svg"}),fe(K,{"aria-label":g("buttons.remove"),type:"button",icon:Co,className:"single-library-item--remove",onClick:n.bind(null,e.id),title:g("buttons.remove")}),Nt("div",{style:{display:"flex",margin:"0.8rem 0",width:"100%",fontSize:"14px",fontWeight:500,flexDirection:"column"},children:[Nt("label",{style:{display:"flex",justifyContent:"space-between",flexDirection:"column"},children:[Nt("div",{style:{padding:"0.5em 0"},children:[fe("span",{style:{fontWeight:500,color:Pd.gray[6]},children:g("publishDialog.itemName")}),fe("span",{"aria-hidden":"true",className:"required",children:"*"})]}),fe("input",{type:"text",ref:a,style:{width:"80%",padding:"0.2rem"},defaultValue:e.name,placeholder:"Item name",onChange:l=>{r(l.target.value,t)}})]}),fe("span",{className:"error",children:e.error})]})]})},VC=({onClose:e,libraryItems:o,appState:t,onSuccess:r,onError:n,updateItemsInStorage:i,onRemove:a})=>{let[l,s]=gh({authorName:"",githubHandle:"",name:"",description:"",twitterHandle:"",website:""}),[c,m]=gh(!1);fh(()=>{let v=mn.get(Ls.PUBLISH_LIBRARY);v&&s(v)},[]);let[d,p]=gh(o.slice());fh(()=>{p(o.slice())},[o]);let u=v=>{s({...l,[v.target.name]:v.target.value})},f=async v=>{v.preventDefault(),m(!0);let C=[],S=!1;if(d.forEach(z=>{let Y="";z.name||(Y=g("publishDialog.errors.required"),S=!0),C.push({...z,error:Y})}),S){p(C),m(!1);return}let I=await WC(d),P={type:Nr.excalidrawLibrary,version:Is.excalidrawLibrary,source:ff(),libraryItems:d},M=JSON.stringify(P,null,2),B=new Blob([M],{type:"application/json"}),R=new FormData;R.append("excalidrawLib",B),R.append("previewImage",I),R.append("previewImageType",I.type),R.append("title",l.name),R.append("authorName",l.authorName),R.append("githubHandle",l.githubHandle),R.append("name",l.name),R.append("description",l.description),R.append("twitterHandle",l.twitterHandle),R.append("website",l.website),fetch(`${k.VITE_APP_LIBRARY_BACKEND}/submit`,{method:"post",body:R}).then(z=>z.ok?z.json().then(({url:Y})=>{mn.delete(Ls.PUBLISH_LIBRARY),r({url:Y,authorName:l.authorName,items:d})}):z.json().catch(()=>{throw new Error(z.statusText||"something went wrong")}).then(Y=>{throw new Error(Y.message||z.statusText||"something went wrong")}),z=>{console.error(z),n(z),m(!1)}).catch(z=>{console.error(z),n(z),m(!1)})},b=()=>{let v=[];return d.forEach((C,S)=>{v.push(fe("div",{className:"single-library-item-wrapper",children:fe(YC,{libItem:C,appState:t,index:S,onChange:(I,P)=>{let M=d.slice();M[P].name=I,p(M)},onRemove:a})},S))}),fe("div",{className:"selected-library-items",children:v})},x=GC(()=>{i(d),mn.set(Ls.PUBLISH_LIBRARY,l),e()},[d,e,i,l]),E=!!o.length,y=o.some(v=>v.status==="published");return fe(lt,{onCloseRequest:x,title:g("publishDialog.title"),className:"publish-library",children:E?Nt("form",{onSubmit:f,children:[fe("div",{className:"publish-library-note",children:fe(uo,{i18nKey:"publishDialog.noteDescription",link:v=>fe("a",{href:"https://libraries.excalidraw.com",target:"_blank",rel:"noopener",children:v})})}),fe("span",{className:"publish-library-note",children:fe(uo,{i18nKey:"publishDialog.noteGuidelines",link:v=>fe("a",{href:"https://github.com/excalidraw/excalidraw-libraries#guidelines",target:"_blank",rel:"noopener noreferrer",children:v})})}),fe("div",{className:"publish-library-note",children:g("publishDialog.noteItems")}),y&&fe("span",{className:"publish-library-note publish-library-warning",children:g("publishDialog.republishWarning")}),b(),Nt("div",{className:"publish-library__fields",children:[Nt("label",{children:[Nt("div",{children:[fe("span",{children:g("publishDialog.libraryName")}),fe("span",{"aria-hidden":"true",className:"required",children:"*"})]}),fe("input",{type:"text",name:"name",required:!0,value:l.name,onChange:u,placeholder:g("publishDialog.placeholder.libraryName")})]}),Nt("label",{style:{alignItems:"flex-start"},children:[Nt("div",{children:[fe("span",{children:g("publishDialog.libraryDesc")}),fe("span",{"aria-hidden":"true",className:"required",children:"*"})]}),fe("textarea",{name:"description",rows:4,required:!0,value:l.description,onChange:u,placeholder:g("publishDialog.placeholder.libraryDesc")})]}),Nt("label",{children:[Nt("div",{children:[fe("span",{children:g("publishDialog.authorName")}),fe("span",{"aria-hidden":"true",className:"required",children:"*"})]}),fe("input",{type:"text",name:"authorName",required:!0,value:l.authorName,onChange:u,placeholder:g("publishDialog.placeholder.authorName")})]}),Nt("label",{children:[fe("span",{children:g("publishDialog.githubUsername")}),fe("input",{type:"text",name:"githubHandle",value:l.githubHandle,onChange:u,placeholder:g("publishDialog.placeholder.githubHandle")})]}),Nt("label",{children:[fe("span",{children:g("publishDialog.twitterUsername")}),fe("input",{type:"text",name:"twitterHandle",value:l.twitterHandle,onChange:u,placeholder:g("publishDialog.placeholder.twitterHandle")})]}),Nt("label",{children:[fe("span",{children:g("publishDialog.website")}),fe("input",{type:"text",name:"website",pattern:"https?://.+",title:g("publishDialog.errors.website"),value:l.website,onChange:u,placeholder:g("publishDialog.placeholder.website")})]}),fe("span",{className:"publish-library-note",children:fe(uo,{i18nKey:"publishDialog.noteLicense",link:v=>fe("a",{href:"https://github.com/excalidraw/excalidraw-libraries/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",children:v})})})]}),Nt("div",{className:"publish-library__buttons",children:[fe(Mr,{label:g("buttons.cancel"),onClick:x,"data-testid":"cancel-clear-canvas-button"}),fe(Mr,{type:"submit",label:g("buttons.submit"),actionType:"primary",isLoading:c})]})]}):fe("p",{style:{padding:"1em",textAlign:"center",fontWeight:500},children:g("publishDialog.atleastOneLibItem")})})},G2=VC;import XC from"clsx";import{useEffect as $C,useRef as jC}from"react";import{forwardRef as W2}from"react";import Y2 from"clsx";import{jsx as V2}from"react/jsx-runtime";var KC=W2(({children:e,gap:o,align:t,justifyContent:r,className:n,style:i},a)=>V2("div",{className:Y2("Stack Stack_horizontal",n),style:{"--gap":o,alignItems:t,justifyContent:r,...i},ref:a,children:e})),ZC=W2(({children:e,gap:o,align:t,justifyContent:r,className:n,style:i},a)=>V2("div",{className:Y2("Stack Stack_vertical",n),style:{"--gap":o,justifyItems:t,justifyContent:r,...i},ref:a,children:e})),wt={Row:KC,Col:ZC};import{jsx as Dd}from"react/jsx-runtime";var K2=({children:e,onClickOutside:o,className:t="",onSelect:r,style:n})=>{let i=be(),a=jC(null),l=on({onClickOutside:o});Ji(a,()=>{l.onClickOutside?.()}),$C(()=>{let c=d=>{d.key===w.ESCAPE&&(d.stopImmediatePropagation(),l.onClickOutside?.())},m={capture:!0};return document.addEventListener("keydown",c,m),()=>{document.removeEventListener("keydown",c,m)}},[l]);let s=XC(`dropdown-menu ${t}`,{"dropdown-menu--mobile":i.editor.isMobile}).trim();return Dd(Tu.Provider,{value:{onSelect:r},children:Dd("div",{ref:a,className:s,style:n,"data-testid":"dropdown-menu",children:i.editor.isMobile?Dd(wt.Col,{className:"dropdown-menu-container",children:e}):Dd(ft,{className:"dropdown-menu-container",padding:2,style:{zIndex:2},children:e})})})};K2.displayName="DropdownMenuContent";var Z2=K2;import{jsx as JC}from"react/jsx-runtime";var qC=({children:e,className:o="",selected:t,...r})=>JC("div",{...r,className:`dropdown-menu-item-base dropdown-menu-item-custom ${o} ${t?"dropdown-menu-item--selected":""}`.trim(),children:e}),X2=qC;import{jsx as $2}from"react/jsx-runtime";var j2=({icon:e,shortcut:o,href:t,children:r,onSelect:n,className:i="",selected:a,rel:l="noopener",...s})=>{let c=ed(s.onClick,n);return $2("a",{...s,href:t,target:"_blank",rel:l||"noopener",className:Qc(i,a),title:s.title??s["aria-label"],onClick:c,children:$2(Jc,{icon:e,shortcut:o,children:r})})},Ca=j2;j2.displayName="DropdownMenuItemLink";import{jsx as QC}from"react/jsx-runtime";var q2=()=>QC("div",{style:{height:"1px",backgroundColor:"var(--default-border-color)",margin:".5rem 0"}}),J2=q2;q2.displayName="DropdownMenuSeparator";import eT from"clsx";import{jsx as tT}from"react/jsx-runtime";var Q2=({className:e="",children:o,onToggle:t,title:r,...n})=>{let i=be(),a=eT(`dropdown-menu-button ${e}`,"zen-mode-transition",{"dropdown-menu-button--mobile":i.editor.isMobile}).trim();return tT("button",{"data-prevent-outside-click":!0,className:a,onClick:t,type:"button","data-testid":"dropdown-menu-button",title:r,...n,children:o})},ey=Q2;Q2.displayName="DropdownMenuTrigger";import Rd from"react";var ty=e=>{let o=Rd.Children.toArray(e).find(t=>Rd.isValidElement(t)&&typeof t.type!="string"&&t?.type.displayName&&t.type.displayName==="DropdownMenuTrigger");return o||null},oy=e=>{let o=Rd.Children.toArray(e).find(t=>Rd.isValidElement(t)&&typeof t.type!="string"&&t?.type.displayName&&t.type.displayName==="DropdownMenuContent");return o||null};import{Fragment as oT,jsxs as rT}from"react/jsx-runtime";var Lr=({children:e,open:o})=>{let t=ty(e),r=oy(e);return rT(oT,{children:[t,o&&r]})};Lr.Trigger=ey;Lr.Content=Z2;Lr.Item=jt;Lr.ItemLink=Ca;Lr.ItemCustom=X2;Lr.Group=Al;Lr.Separator=J2;var He=Lr;Lr.displayName="DropdownMenu";import{jsx as Qt,jsxs as Nd}from"react/jsx-runtime";var aT=(e,o)=>e.filter(t=>o.includes(t.id)),lT=({setAppState:e,selectedItems:o,library:t,onRemoveFromLibrary:r,resetLibrary:n,onSelectItems:i,appState:a,className:l})=>{let[s]=ve(ni),[c,m]=ve(wa),d=()=>{let R=o.length?g("alerts.removeItemsFromsLibrary",{count:o.length}):g("alerts.resetLibrary"),z=o.length?g("confirmDialog.removeItemsFromLib"):g("confirmDialog.resetLibrary");return Qt(H2,{onConfirm:()=>{o.length?r():n(),u(!1)},onCancel:()=>{u(!1)},title:z,children:Qt("p",{children:R})})},[p,u]=bh(!1),f=!!o.length,b=f?s.libraryItems.filter(R=>o.includes(R.id)):s.libraryItems,x=f?g("buttons.remove"):g("buttons.resetLibrary"),[E,y]=bh(!1),[v,C]=bh(null),S=iT(()=>Nd(lt,{onCloseRequest:()=>C(null),title:g("publishSuccessDialog.title"),className:"publish-library-success",size:"small",children:[Qt("p",{children:Qt(uo,{i18nKey:"publishSuccessDialog.content",authorName:v.authorName,link:R=>Qt("a",{href:v?.url,target:"_blank",rel:"noopener noreferrer",children:R})})}),Qt(K,{type:"button",title:g("buttons.close"),"aria-label":g("buttons.close"),label:g("buttons.close"),onClick:()=>C(null),"data-testid":"publish-library-success-close",className:"publish-library-success-close"})]}),[C,v]),I=(R,z)=>{y(!1),C({url:R.url,authorName:R.authorName});let Y=z.slice();Y.forEach(W=>{o.includes(W.id)&&(W.status="published")}),t.setLibrary(Y)},P=async()=>{try{await t.updateLibrary({libraryItems:pc({description:"Excalidraw library files"}),merge:!0,openLibraryMenu:!0})}catch(R){if(R?.name==="AbortError"){console.warn(R);return}e({errorMessage:g("errors.importLibraryError")})}},M=async()=>{let R=f?b:await t.getLatestLibrary();R0(R).catch(Ds).catch(z=>{e({errorMessage:z.message})})},B=()=>Nd(He,{open:c,children:[Qt(He.Trigger,{onToggle:()=>m(!c),children:sb}),Nd(He.Content,{onClickOutside:()=>m(!1),onSelect:()=>m(!1),className:"library-menu",children:[!f&&Qt(He.Item,{onSelect:P,icon:Xi,"data-testid":"lib-dropdown--load",children:g("buttons.load")}),!!b.length&&Qt(He.Item,{onSelect:M,icon:Kn,"data-testid":"lib-dropdown--export",children:g("buttons.export")}),!!b.length&&Qt(He.Item,{onSelect:()=>u(!0),icon:kr,children:x}),f&&Qt(He.Item,{icon:fx,onSelect:()=>y(!0),"data-testid":"lib-dropdown--remove",children:g("buttons.publishLibrary")})]})]});return Nd("div",{className:nT("library-menu-dropdown-container",l),children:[B(),o.length>0&&Qt("div",{className:"library-actions-counter",children:o.length}),p&&d(),E&&Qt(G2,{onClose:()=>y(!1),libraryItems:aT(s.libraryItems,o),appState:a,onSuccess:R=>I(R,s.libraryItems),onError:R=>window.alert(R),updateItemsInStorage:()=>t.setLibrary(s.libraryItems),onRemove:R=>i(o.filter(z=>z!==R))}),v&&S()]})},xh=({selectedItems:e,onSelectItems:o,className:t})=>{let{library:r}=vt(),{clearLibraryCache:n,deleteItemsFromLibraryCache:i}=kd(),a=Pe(),l=Le(),[s]=ve(ni),c=async d=>{let p=d.filter(u=>!e.includes(u.id));r.setLibrary(p).catch(()=>{l({errorMessage:g("alerts.errorRemovingFromLibrary")})}),i(e),o([])};return Qt(lT,{appState:a,setAppState:l,selectedItems:e,onSelectItems:o,library:r,onRemoveFromLibrary:()=>c(s.libraryItems),resetLibrary:()=>{r.resetLibrary(),n()},className:t})};import{memo as fT,useEffect as bT,useState as xT}from"react";import sT,{useCallback as cT}from"react";function dT(){return[!1,cT(o=>o(),[])]}var ry=sT.useTransition||dT;import ny from"clsx";import{memo as mT,useEffect as pT,useRef as uT,useState as hT}from"react";import{jsx as Od,jsxs as gT}from"react/jsx-runtime";var iy=mT(({id:e,elements:o,isPending:t,onClick:r,selected:n,onToggle:i,onDrag:a,svgCache:l})=>{let s=uT(null),c=S2(e,o,l);pT(()=>{let f=s.current;if(f)return c&&(f.innerHTML=c.outerHTML),()=>{f.innerHTML=""}},[c]);let[m,d]=hT(!1),p=be().editor.isMobile,u=t&&Od("div",{className:"library-unit__adder",children:lb});return gT("div",{className:ny("library-unit",{"library-unit__active":o,"library-unit--hover":o&&m,"library-unit--selected":n,"library-unit--skeleton":!c}),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),children:[Od("div",{className:ny("library-unit__dragger",{"library-unit__pulse":!!t}),ref:s,draggable:!!o,onClick:o||t?f=>{e&&f.shiftKey?i(e,f):r(e)}:void 0,onDragStart:f=>{if(!e){f.preventDefault();return}d(!1),a(e,f)}}),u,e&&o&&(m||p||n)&&Od(Nl,{checked:n,onChange:(f,b)=>i(e,b),className:"library-unit__checkbox"})]})}),ay=()=>Od("div",{className:"library-unit library-unit--skeleton"});import{Fragment as ET,jsx as Bd}from"react/jsx-runtime";var Eh=({children:e})=>Bd("div",{className:"library-menu-items-container__grid",children:e}),zd=fT(({items:e,onItemSelectToggle:o,onItemDrag:t,isItemSelected:r,onClick:n,svgCache:i,itemsRenderedPerBatch:a})=>{let[,l]=ry(),[s,c]=xT(0);return bT(()=>{s<e.length&&l(()=>{c(s+a)})},[s,e.length,l,a]),Bd(ET,{children:e.map((m,d)=>d<s?Bd(iy,{elements:m?.elements,isPending:!m?.id&&!!m?.elements,onClick:n,svgCache:i,id:m?.id,selected:r(m.id),onToggle:o,onDrag:t},m?.id??d):Bd(ay,{},d))})});import{Fragment as sy,jsx as eo,jsxs as ka}from"react/jsx-runtime";var CT=17,TT=64;function yh({isLoading:e,libraryItems:o,onAddToLibrary:t,onInsertLibraryItems:r,pendingElements:n,theme:i,id:a,libraryReturnUrl:l,onSelectItems:s,selectedItems:c}){let m=vT(null),d=O2(m);yT(()=>{d>0&&m.current?.scrollTo(0,d)},[]);let{svgCache:p}=kd(),u=ly(()=>o.filter(R=>R.status!=="published"),[o]),f=ly(()=>o.filter(R=>R.status==="published"),[o]),b=!o.length&&!n.length,x=!n.length&&!u.length&&!f.length,[E,y]=wT(null),v=Ta((R,z)=>{let Y=!c.includes(R),W=[...u,...f];if(Y){if(z.shiftKey&&E){let oe=W.findIndex(ie=>ie.id===E),H=W.findIndex(ie=>ie.id===R);if(oe===-1||H===-1){s([...c,R]);return}let F=j(c),Q=W.reduce((ie,X,de)=>((de>=oe&&de<=H||F.has(X.id))&&ie.push(X.id),ie),[]);s(Q)}else s([...c,R]);y(R)}else y(null),s(c.filter(oe=>oe!==R))},[E,s,f,c,u]),C=Ta(R=>{let z;return c.includes(R)?z=o.filter(Y=>c.includes(Y.id)):z=o.filter(Y=>Y.id===R),z.map(Y=>({...Y,elements:Un({type:"everything",elements:Y.elements,randomizeSeed:!0}).duplicatedElements}))},[o,c]),S=Ta((R,z)=>{z.dataTransfer.setData(pe.excalidrawlib,Sp(C(R)))},[C]),I=Ta(R=>R?c.includes(R):!1,[c]),P=Ta(()=>{t(n)},[n,t]),M=Ta(R=>{R&&r(C(R))},[C,r]),B=p.size>=o.length?TT:CT;return ka("div",{className:"library-menu-items-container",style:n.length||u.length||f.length?{justifyContent:"flex-start"}:{borderBottom:0},children:[!x&&eo(xh,{selectedItems:c,onSelectItems:s,className:"library-menu-dropdown-container--in-heading"}),ka(wt.Col,{className:"library-menu-items-container__items",align:"start",gap:1,style:{flex:f.length>0?1:"0 1 auto",marginBottom:0},ref:m,children:[ka(sy,{children:[!x&&eo("div",{className:"library-menu-items-container__header",children:g("labels.personalLib")}),e&&eo("div",{style:{position:"absolute",top:"var(--container-padding-y)",right:"var(--container-padding-x)",transform:"translateY(50%)"},children:eo(mo,{})}),!n.length&&!u.length?ka("div",{className:"library-menu-items__no-items",children:[eo("div",{className:"library-menu-items__no-items__label",children:g("library.noItems")}),eo("div",{className:"library-menu-items__no-items__hint",children:f.length>0?g("library.hint_emptyPrivateLibrary"):g("library.hint_emptyLibrary")})]}):ka(Eh,{children:[n.length>0&&eo(zd,{itemsRenderedPerBatch:B,items:[{id:null,elements:n}],onItemSelectToggle:v,onItemDrag:S,onClick:P,isItemSelected:I,svgCache:p}),eo(zd,{itemsRenderedPerBatch:B,items:u,onItemSelectToggle:v,onItemDrag:S,onClick:M,isItemSelected:I,svgCache:p})]})]}),ka(sy,{children:[(f.length>0||n.length>0||u.length>0)&&eo("div",{className:"library-menu-items-container__header library-menu-items-container__header--excal",children:g("labels.excalidrawLib")}),f.length>0?eo(Eh,{children:eo(zd,{itemsRenderedPerBatch:B,items:f,onItemSelectToggle:v,onItemDrag:S,onClick:M,isItemSelected:I,svgCache:p})}):u.length>0?eo("div",{style:{margin:"1rem 0",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",fontSize:".9rem"},children:g("library.noItems")}):null]}),b&&eo(Ld,{style:{padding:"16px 0",width:"100%"},id:a,libraryReturnUrl:l,theme:i,children:eo(xh,{selectedItems:c,onSelectItems:s})})]})]})}import{jsx as pn,jsxs as my}from"react/jsx-runtime";var wa=Ne(!1),dy=({children:e})=>pn("div",{className:"layer-ui__library",children:e}),IT=hy(({onInsertLibraryItems:e,pendingElements:o,onAddToLibrary:t,setAppState:r,libraryReturnUrl:n,library:i,id:a,theme:l,selectedItems:s,onSelectItems:c})=>{let[m]=ve(ni),d=wh(f=>{(async(x,E)=>{Ee("element","addToLibrary","ui");for(let v of Ms)if(x.some(C=>C.type===v))return r({errorMessage:g(`errors.libraryElementTypeError.${v}`)});let y=[{status:"unpublished",elements:x,id:lo(),created:Date.now()},...E];t(),i.setLibrary(y).catch(()=>{r({errorMessage:g("alerts.errorAddingToLibrary")})})})(f,m.libraryItems)},[t,i,r,m.libraryItems]),p=uy(()=>m.libraryItems,[m]);if(m.status==="loading"&&!m.isInitialized)return pn(dy,{children:pn("div",{className:"layer-ui__library-message",children:my("div",{children:[pn(mo,{size:"2em"}),pn("span",{children:g("labels.libraryLoadingMessage")})]})})});let u=m.libraryItems.length>0||o.length>0;return my(dy,{children:[pn(yh,{isLoading:m.status==="loading",libraryItems:p,onAddToLibrary:d,onInsertLibraryItems:e,pendingElements:o,id:a,libraryReturnUrl:n,theme:l,onSelectItems:c,selectedItems:s}),u&&pn(Ld,{className:"library-menu-control-buttons--at-bottom",style:{padding:"16px 12px 0 12px"},id:a,libraryReturnUrl:n,theme:l})]})}),vh=(e,o)=>({elements:e,pending:q(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}),selectedElementIds:o}),ST=(e,o)=>{let t=nn(),[r,n]=py(()=>vh(t,e.selectedElementIds)),i=kT(new Map);return cy(()=>{for(let a of r.pending)i.current.set(a.id,a.version)},[r.pending]),cy(()=>{o.state.cursorButton==="up"&&o.state.activeTool.type==="selection"&&n(a=>{if(!ot(a.selectedElementIds,e.selectedElementIds))return i.current.clear(),vh(t,e.selectedElementIds);let l=o.scene.getNonDeletedElementsMap();for(let s of Object.keys(e.selectedElementIds)){let c=l.get(s)?.version;if(c&&c!==i.current.get(s))return vh(t,e.selectedElementIds)}return a})},[o,o.state.cursorButton,o.state.activeTool.type,e.selectedElementIds,t]),r.pending},gy=hy(()=>{let e=vt(),{onInsertElements:o}=e,t=lr(),r=Pe(),n=Le(),[i,a]=py([]),l=uy(()=>e.library,[e.library]),s=ST(r,e),c=wh(d=>{o(Md(d))},[o]),m=wh(()=>{n({selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null})},[n]);return pn(IT,{pendingElements:s,onInsertLibraryItems:c,onAddToLibrary:m,setAppState:n,libraryReturnUrl:t.libraryReturnUrl,library:l,id:e.id,theme:r.theme,selectedItems:i,onSelectItems:a})});import MT from"clsx";import{useRef as LT}from"react";import{createPortal as AT}from"react-dom";import{jsx as fy,jsxs as _T}from"react/jsx-runtime";var by=e=>{let{closeOnClickOutside:o=!0}=e,t=Vc({className:"excalidraw-modal-container"}),r=LT(document.body.classList.contains("excalidraw-animations-disabled"));if(!t)return null;let n=i=>{i.key===w.ESCAPE&&(i.nativeEvent.stopImmediatePropagation(),i.stopPropagation(),e.onCloseRequest())};return AT(_T("div",{className:MT("Modal",e.className,{"animations-disabled":r.current}),role:"dialog","aria-modal":"true",onKeyDown:n,"aria-labelledby":e.labelledBy,"data-prevent-outside-click":!0,children:[fy("div",{className:"Modal__background",onClick:o?e.onCloseRequest:void 0}),fy("div",{className:"Modal__content",style:{"--max-width":`${e.maxWidth}px`},tabIndex:0,children:e.children})]}),t)};import{jsx as Fd,jsxs as xy}from"react/jsx-runtime";function NT(e){if(e&&typeof e=="number")return e;switch(e){case"small":return 550;case"wide":return 1024;case"regular":default:return 800}}var lt=e=>{let[o,t]=T2(),[r]=RT(document.activeElement),{id:n}=at(),i=be().viewport.isMobile;DT(()=>{if(!o)return;let c=Qa(o);setTimeout(()=>{c.length>0&&e.autofocus!==!1&&(c[1]||c[0]).focus()});let m=d=>{if(d.key===w.TAB){let p=Qa(o),{activeElement:u}=document,f=p.findIndex(b=>b===u);f===0&&d.shiftKey?(p[p.length-1].focus(),d.preventDefault()):f===p.length-1&&!d.shiftKey&&(p[0].focus(),d.preventDefault())}};return o.addEventListener("keydown",m),()=>o.removeEventListener("keydown",m)},[o,e.autofocus]);let a=Le(),l=Gi(wa),s=()=>{a({openMenu:null}),l(!1),r.focus(),e.onCloseRequest()};return Fd(by,{className:PT("Dialog",e.className,{"Dialog--fullscreen":i}),labelledBy:"dialog-title",maxWidth:NT(e.size),onCloseRequest:s,closeOnClickOutside:e.closeOnClickOutside,children:xy(ft,{ref:t,children:[e.title&&xy("h2",{id:`${n}-dialog-title`,className:"Dialog__title",children:[Fd("span",{className:"Dialog__titleContent",children:e.title}),e.titleButton]}),i&&Fd("button",{className:"Dialog__close",onClick:s,title:g("buttons.close"),"aria-label":g("buttons.close"),type:"button",children:Co}),Fd("div",{className:"Dialog__content",children:e.children})]})})};import Ch from"clsx";import{forwardRef as zT,useRef as FT,useImperativeHandle as HT,useLayoutEffect as UT,useState as GT}from"react";import OT from"clsx";import{jsx as BT}from"react/jsx-runtime";var $o=({type:e="button",onSelect:o,selected:t,children:r,className:n="",...i})=>BT("button",{onClick:zr(i.onClick,a=>{o()}),type:e,className:OT("excalidraw-button",n,{selected:t}),...i,children:r});import{jsx as Th,jsxs as Ey}from"react/jsx-runtime";var Ia=zT(({onChange:e,label:o,fullWidth:t,placeholder:r,readonly:n,selectOnRender:i,onKeyDown:a,isRedacted:l=!1,icon:s,className:c,...m},d)=>{let p=FT(null);HT(d,()=>p.current),UT(()=>{i&&(p.current?.focus(),p.current?.select())},[i]);let[u,f]=GT(!1);return Ey("div",{className:Ch("ExcTextField",c,{"ExcTextField--fullWidth":t,"ExcTextField--hasIcon":!!s}),onClick:()=>{p.current?.focus()},children:[s,o&&Th("div",{className:"ExcTextField__label",children:o}),Ey("div",{className:Ch("ExcTextField__input",{"ExcTextField__input--readonly":n}),children:[Th("input",{className:Ch({"is-redacted":"value"in m&&m.value&&l&&!u}),readOnly:n,value:"value"in m?m.value:void 0,defaultValue:"defaultValue"in m?m.defaultValue:void 0,placeholder:r,ref:p,onChange:b=>e?.(b.target.value),onKeyDown:a}),l&&Th($o,{onSelect:()=>f(!u),style:{border:0,userSelect:"none"},children:u?kx:Xn})]})]})});var un=[{icon:Ic,value:"selection",key:w.V,fillable:!0,myocSimplifiedMode:!0},{icon:qr,value:"rectangle",key:w.R,fillable:!0,myocSimplifiedMode:!1},{icon:Jr,value:"diamond",key:w.D,fillable:!0,myocSimplifiedMode:!1},{icon:Qr,value:"ellipse",key:w.O,fillable:!0,myocSimplifiedMode:!1},{icon:Ki,value:"arrow",key:w.A,fillable:!0,myocSimplifiedMode:!1},{icon:en,value:"line",key:w.L,fillable:!0,myocSimplifiedMode:!1},{icon:ir,value:"freedraw",key:[w.P,w.X],fillable:!1,myocSimplifiedMode:!0},{icon:tn,value:"text",key:w.T,fillable:!1,myocSimplifiedMode:!0},{icon:Sc,value:"image",key:[w.I],fillable:!1,myocSimplifiedMode:!0},{icon:Mc,value:"eraser",key:w.E,fillable:!1,myocSimplifiedMode:!0}],yy=e=>un.find((t,r)=>t.key&&(typeof t.key=="string"?t.key===e:t.key.includes(e)))?.value||null;import kh from"clsx";import{useMemo as WT,useState as YT}from"react";import{Fragment as hn,jsx as qe,jsxs as Ct}from"react/jsx-runtime";var Ih=(e,o)=>{let t=o[0]?.type||null;for(let r of o)if(r.type!==t){t=null;break}return al(e.activeTool.type)&&e.activeTool.type!=="image"&&t!=="image"&&t!=="frame"&&t!=="magicframe"||o.some(r=>al(r.type))},Sh=(e,o)=>Vr(e.activeTool.type)||o.some(t=>Vr(t.type)),Hd=({appState:e,elementsMap:o,renderAction:t,app:r})=>{let n=qs(o,e),i=!1;n.length===2&&(gt(n[0])||gt(n[1]))&&(i=!0);let a=!!(e.editingTextElement||e.newElement),l=be(),s=document.documentElement.getAttribute("dir")==="rtl",c=Vr(e.activeTool.type)&&!xr(e.currentItemBackgroundColor)||n.some(f=>Vr(f.type)&&!xr(f.backgroundColor)),m=n.length===1||i,d=!e.editingLinearElement&&n.length===1&&he(n[0])&&!se(n[0]),p=!e.croppingElementId&&n.length===1&&Re(n[0]),u=!i&&Rt(e,r);return Ct("div",{className:"selected-shape-actions",children:[qe("div",{children:Ih(e,n)&&t("changeStrokeColor")}),Sh(e,n)&&qe("div",{children:t("changeBackgroundColor")}),c&&t("changeFillStyle"),(ap(e.activeTool.type)||n.some(f=>ap(f.type)))&&t("changeStrokeWidth"),(e.activeTool.type==="freedraw"||n.some(f=>f.type==="freedraw"))&&t("changeStrokeShape"),(lp(e.activeTool.type)||n.some(f=>lp(f.type)))&&Ct(hn,{children:[t("changeStrokeStyle"),t("changeSloppiness")]}),(sp(e.activeTool.type)||n.some(f=>sp(f.type)))&&qe(hn,{children:t("changeRoundness")}),(cp(e.activeTool.type)||n.some(f=>cp(f.type)))&&qe(hn,{children:t("changeArrowType")}),(e.activeTool.type==="text"||n.some(V))&&Ct(hn,{children:[t("changeFontFamily"),t("changeFontSize"),(e.activeTool.type==="text"||k1(n,o))&&t("changeTextAlign")]}),T1(n,o)&&t("changeVerticalAlign"),(_i(e.activeTool.type)||n.some(f=>_i(f.type)))&&qe(hn,{children:t("changeArrowhead")}),t("changeOpacity"),Ct("fieldset",{children:[qe("legend",{children:g("labels.layers")}),Ct("div",{className:"buttonList",children:[t("sendToBack"),t("sendBackward"),t("bringForward"),t("bringToFront")]})]}),u&&!i&&Ct("fieldset",{children:[qe("legend",{children:g("labels.align")}),Ct("div",{className:"buttonList",children:[s?Ct(hn,{children:[t("alignRight"),t("alignHorizontallyCentered"),t("alignLeft")]}):Ct(hn,{children:[t("alignLeft"),t("alignHorizontallyCentered"),t("alignRight")]}),n.length>2&&t("distributeHorizontally"),qe("div",{style:{flexBasis:"100%",height:0}}),Ct("div",{style:{display:"flex",flexWrap:"wrap",gap:".5rem",marginTop:"-0.5rem"},children:[t("alignTop"),t("alignVerticallyCentered"),t("alignBottom"),n.length>2&&t("distributeVertically"),qe("div",{style:{flexBasis:"100%",height:0}}),t("arrangeElements")]})]})]}),!a&&n.length>0&&Ct("fieldset",{children:[qe("legend",{children:g("labels.actions")}),Ct("div",{className:"buttonList",children:[!l.editor.isMobile&&t("duplicateSelection"),!l.editor.isMobile&&t("deleteSelectedElements"),t("group"),t("ungroup"),m&&t("hyperlink"),p&&t("cropEditor"),d&&t("toggleLinearEditor"),t("smartZoom")]})]})]})},Ud=({activeTool:e,appState:o,app:t,UIOptions:r})=>{let[n,i]=YT(!1),a=e.type==="frame",l=e.type==="laser",s=e.type==="lasso",c=e.type==="embeddable",m=un.filter(p=>p.myocSimplifiedMode===!1),d=WT(()=>{switch(e.type){case"frame":return{icon:ji,highlight:!1};case"lasso":return{icon:fl,highlight:!0};case"embeddable":return{icon:fb,highlight:!0};case"laser":return t.props.isCollaborating?{icon:Jp,highlight:!0}:{icon:wl,highlight:!0};case"diamond":return{icon:Jr,highlight:!0};case"rectangle":return{icon:qr,highlight:!0};case"ellipse":return{icon:Qr,highlight:!0};case"arrow":return{icon:Ki,highlight:!0};case"line":return{icon:en,highlight:!0};default:return{icon:Jp,highlight:!1}}},[e.type,t.props.isCollaborating]);return Ct(hn,{children:[un.filter(p=>!o.myocSimplifiedMode||p.myocSimplifiedMode).map(({value:p,icon:u,key:f,fillable:b},x)=>{if(r.tools?.[p]===!1)return null;let E=g(`toolBar.${p}`),y=f&&No(typeof f=="string"?f:f[0]),v=`${y}`;return qe(K,{className:kh("Shape",{fillable:b}),type:"radio",icon:u,checked:e.type===p,name:"editor-current-shape",title:`${No(E)} \u2014 ${v}`,keyBindingLabel:y,"aria-label":No(E),"aria-keyshortcuts":v,"data-testid":`toolbar-${p}`,onPointerDown:({pointerType:C})=>{!o.penDetected&&C==="pen"&&t.togglePenMode(!0),p==="selection"&&(o.activeTool.type==="selection"?t.setActiveTool({type:"lasso"}):t.setActiveTool({type:"selection"}))},onChange:({pointerType:C})=>{o.activeTool.type!==p&&Ee("toolbar",p,"ui"),p==="image"?t.setActiveTool({type:p}):t.setActiveTool({type:p})}},p)}),Ct(He,{open:n,children:[qe(He.Trigger,{className:kh("App-toolbar__extra-tools-trigger",{"App-toolbar__extra-tools-trigger--selected":d.highlight}),onToggle:()=>i(!n),title:g("toolBar.extraTools"),children:d.icon}),Ct(He.Content,{onClickOutside:()=>i(!1),onSelect:()=>i(!1),className:"App-toolbar__extra-tools-dropdown",children:[qe(He.Item,{onSelect:()=>t.setActiveTool({type:"lasso"}),icon:fl,"data-testid":"toolbar-lasso",selected:s,children:g("toolBar.lasso")}),m.map(({value:p,icon:u,key:f,fillable:b})=>{let x=g(`toolBar.${p}`),E=f&&No(typeof f=="string"?f:f[0]);return qe(He.Item,{onSelect:()=>t.setActiveTool({type:p}),icon:u,"data-testid":`toolbar-${p}`,selected:e.type===p,shortcut:E??void 0,children:No(x)},p)}),qe("div",{className:"App-toolbar__dropdown-divider"}),qe(He.Item,{onSelect:()=>t.toggleLock(),icon:o.activeTool.locked?jr:Tr,"data-testid":"toolbar-lock",selected:o.activeTool.locked,shortcut:w.Q,children:No(g("toolBar.lock-short"))}),!o.myocSimplifiedMode&&qe(He.Item,{onSelect:()=>t.setActiveTool({type:"laser"}),icon:wl,"data-testid":"toolbar-laser",selected:l,shortcut:w.K.toLocaleUpperCase(),children:g("toolBar.laser")})]})]})]})},vy=({renderAction:e,zoom:o})=>qe(wt.Col,{gap:1,className:Ot.ZOOM_ACTIONS,children:Ct(wt.Row,{align:"center",children:[e("zoomOut"),e("resetZoom"),e("zoomIn")]})}),wy=({renderAction:e,className:o})=>Ct("div",{className:`undo-redo-buttons ${o}`,children:[qe("div",{className:"undo-button-container",children:qe(Dt,{label:g("buttons.undo"),children:e("undo")})}),qe("div",{className:"redo-button-container",children:Ct(Dt,{label:g("buttons.redo"),children:[" ",e("redo")]})})]}),Cy=({actionManager:e,showExitZenModeBtn:o})=>qe("button",{type:"button",className:kh("disable-zen-mode",{"disable-zen-mode--visible":o}),onClick:()=>e.executeAction(ua),children:g("buttons.exitZenMode")}),Ty=({renderAction:e,className:o})=>qe("div",{className:`finalize-button ${o}`,children:e("finalize",{size:"small"})});import{useRef as VT}from"react";var Mh=e=>{let o=VT({userFn:e});return o.current.userFn=e,o.current.stableFn||(o.current.stableFn=(...t)=>o.current.userFn(...t)),o.current.stableFn};var Lh={};Jg(Lh,{toggleTheme:()=>KT});var KT={...qn,category:"App",label:"Toggle theme",perform:({actionManager:e})=>{e.executeAction(qn,"commandPalette")}};import{jsx as Ut,jsxs as dr}from"react/jsx-runtime";var $T=Ne(null),Ze={app:"App",export:"Export",tools:"Tools",editor:"Editor",elements:"Elements",links:"Links"},jT=e=>{switch(e){case Ze.app:return 1;case Ze.export:return 2;case Ze.editor:return 3;case Ze.tools:return 4;case Ze.elements:return 5;case Ze.links:return 6;default:return 10}},Yd=({shortcut:e,className:o,children:t})=>{let r=e.replace("++","+$").split("+");return dr("div",{className:Iy("shortcut",o),children:[r.map((n,i)=>Ut("div",{className:"shortcut-wrapper",children:Ut("div",{className:"shortcut-key",children:n==="$"?"+":n})},n)),Ut("div",{className:"shortcut-desc",children:t})]})},Sy=e=>!e.altKey&&e[w.CTRL_OR_CMD]&&(e.shiftKey&&e.key.toLowerCase()===w.P||e.key===w.SLASH),CX=Object.assign(e=>{let o=Pe(),t=Le();return Wd(()=>{let r=n=>{Sy(n)&&(n.preventDefault(),n.stopPropagation(),t(i=>{let a=i.openDialog?.name==="commandPalette"?null:{name:"commandPalette"};return a&&Ee("command_palette","open","shortcut"),{openDialog:a}}))};return window.addEventListener("keydown",r,{capture:!0}),()=>window.removeEventListener("keydown",r,{capture:!0})},[t]),o.openDialog?.name!=="commandPalette"?null:Ut(qT,{...e})},{defaultItems:Lh});function qT({customCommandPaletteItems:e}){let o=vt(),t=Pe(),r=Le(),n=lr(),i=At(),[a,l]=ve($T),[s,c]=Gd(null),m=XT(null),d=on({uiAppState:t,customCommandPaletteItems:e,appProps:n});Wd(()=>{let{uiAppState:I,customCommandPaletteItems:P,appProps:M}=d,B=W=>{let oe="";return W.label&&(typeof W.label=="function"?oe=g(W.label(o.scene.getNonDeletedElements(),I,o)):oe=g(W.label)),oe},R=W=>typeof W.icon=="function"?W.icon(I,o.scene.getNonDeletedElements()):W.icon,z=[],Y=(W,oe,H)=>{let F={label:B(W),icon:R(W),category:oe,shortcut:Ye(W.name),keywords:W.keywords,predicate:W.predicate,viewMode:W.viewMode,perform:()=>{i.executeAction(W,"commandPalette")}};return H?H(F,W):F};if(I&&o.scene&&i){let W=[i.actions.group,i.actions.ungroup,i.actions.cut,i.actions.copy,i.actions.deleteSelectedElements,i.actions.wrapSelectionInFrame,i.actions.copyStyles,i.actions.pasteStyles,i.actions.bringToFront,i.actions.bringForward,i.actions.sendBackward,i.actions.sendToBack,i.actions.alignTop,i.actions.alignBottom,i.actions.alignLeft,i.actions.alignRight,i.actions.alignVerticallyCentered,i.actions.alignHorizontallyCentered,i.actions.arrangeElements,i.actions.duplicateSelection,i.actions.smartZoom,i.actions.flipHorizontal,i.actions.flipVertical,i.actions.zoomToFitSelection,i.actions.zoomToFitSelectionInViewport,i.actions.increaseFontSize,i.actions.decreaseFontSize,i.actions.toggleLinearEditor,i.actions.cropEditor,i.actions.togglePolygon,Hl,Td,C2].map(X=>Y(X,Ze.elements,(de,ue)=>({...de,predicate:ue.predicate?ue.predicate:(Ce,dt,io,In)=>q(Ce,dt).length>0}))),oe=[i.actions.toggleHandTool,i.actions.setFrameAsActiveTool,i.actions.toggleLassoTool].map(X=>Y(X,Ze.tools)),H=[i.actions.undo,i.actions.redo,i.actions.zoomIn,i.actions.zoomOut,i.actions.resetZoom,i.actions.zoomToFit,i.actions.smartZoom,i.actions.zenMode,i.actions.viewMode,i.actions.gridMode,i.actions.objectsSnapMode,i.actions.toggleShortcuts,i.actions.selectAll,i.actions.toggleElementLock,i.actions.unlockAllElements,i.actions.stats].map(X=>Y(X,Ze.editor)),F=[i.actions.saveToActiveFile,i.actions.saveFileToDisk,i.actions.copyAsPng,i.actions.copyAsSvg].map(X=>Y(X,Ze.export));z=[...W,...H,{label:g("buttons.exportImage"),category:Ze.export,icon:_c,shortcut:Ye("imageExport"),keywords:["export","image","png","jpeg","svg","clipboard","picture"],perform:()=>{r({openDialog:{name:"imageExport"}})}},...F];let Q=[{label:g("toolBar.library"),category:Ze.app,icon:Vi,viewMode:!1,perform:()=>{I.openSidebar?r({openSidebar:null}):r({openSidebar:{name:Pt.name,tab:Pt.defaultTab}})}},{label:g("search.title"),category:Ze.app,icon:co,viewMode:!0,perform:()=>{i.executeAction($l)}},{label:g("labels.shapeSwitch"),category:Ze.elements,icon:Cl,perform:()=>{i.executeAction(w2)}},{label:g("labels.changeStroke"),keywords:["color","outline"],category:Ze.elements,icon:Ac,viewMode:!1,predicate:(X,de)=>{let ue=q(X,de);return ue.length>0&&Ih(de,ue)},perform:()=>{r(X=>({openMenu:X.openMenu==="shape"?null:"shape",openPopup:"elementStroke"}))}},{label:g("labels.changeBackground"),keywords:["color","fill"],icon:Ac,category:Ze.elements,viewMode:!1,predicate:(X,de)=>{let ue=q(X,de);return ue.length>0&&Sh(de,ue)},perform:()=>{r(X=>({openMenu:X.openMenu==="shape"?null:"shape",openPopup:"elementBackground"}))}},{label:g("labels.canvasBackground"),keywords:["color"],icon:Ac,category:Ze.editor,viewMode:!1,perform:()=>{r(X=>({openMenu:X.openMenu==="canvas"?null:"canvas",openPopup:"canvasBackground"}))}},...un.reduce((X,de)=>{let{value:ue,icon:Ce,key:dt}=de;if(M.UIOptions.tools?.[ue]===!1)return X;let In=dt&&No(typeof dt=="string"?dt:dt[0]),mi={label:g(`toolBar.${ue}`),category:Ze.tools,shortcut:In,icon:Ce,keywords:["toolbar"],viewMode:!1,perform:({event:Im})=>{ue==="image"?o.setActiveTool({type:ue}):o.setActiveTool({type:ue})}};return X.push(mi),X},[]),...oe,{label:g("toolBar.lock"),category:Ze.tools,icon:I.activeTool.locked?jr:Tr,shortcut:w.Q.toLocaleUpperCase(),viewMode:!1,perform:()=>{o.toggleLock()}},{label:`${g("labels.textToDiagram")}...`,category:Ze.tools,icon:Ix,viewMode:!1,predicate:M.aiEnabled,perform:()=>{r(X=>({...X,openDialog:{name:"ttd",tab:"text-to-diagram"}}))}},{label:`${g("toolBar.mermaidToExcalidraw")}...`,category:Ze.tools,icon:wx,viewMode:!1,predicate:M.aiEnabled,perform:()=>{r(X=>({...X,openDialog:{name:"ttd",tab:"mermaid"}}))}}],ie=[...z,...Q,...P||[]].map(X=>({...X,icon:X.icon||Cl,order:X.order??jT(X.category),haystack:`${mh(X.label.toLocaleLowerCase())} ${X.keywords?.join(" ")||""}`}));c(ie),l(ie.find(X=>X.label===a?.label)??null)}},[d,o,i,c,a?.label,l,r]);let[p,u]=Gd(""),[f,b]=Gd(null),[x,E]=Gd({}),y=I=>{r({openDialog:null},I),u("")},v=(I,P)=>{t.openDialog?.name==="commandPalette"&&(P.stopPropagation(),P.preventDefault(),document.body.classList.add("excalidraw-animations-disabled"),y(()=>{I.perform({actionManager:i,event:P}),l(I),requestAnimationFrame(()=>{document.body.classList.remove("excalidraw-animations-disabled")})}))},C=Mh(I=>I.viewMode===!1&&t.viewModeEnabled?!1:typeof I.predicate=="function"?I.predicate(o.scene.getNonDeletedElements(),t,n,o):I.predicate===void 0||I.predicate),S=Mh(I=>{let P=er(I.target)||Sy(I)||I.key===w.ESCAPE;if(P&&I.key!==w.ARROW_UP&&I.key!==w.ARROW_DOWN&&I.key!==w.ENTER)return;let M=Object.values(x).flat(),B=a&&!p&&C(a);if(I.key===w.ARROW_UP){I.preventDefault();let R=M.findIndex(W=>W.label===f?.label);if(B){if(R===0){b(a);return}if(f===a){let W=M[M.length-1];W&&b(W);return}}let z;R===-1?z=M.length-1:z=R===0?M.length-1:(R-1)%M.length;let Y=M[z];Y&&b(Y);return}if(I.key===w.ARROW_DOWN){I.preventDefault();let R=M.findIndex(W=>W.label===f?.label);if(B){if(!f||R===M.length-1){b(a);return}if(f===a){let W=M[0];W&&b(W);return}}let z=(R+1)%M.length,Y=M[z];Y&&b(Y);return}if(I.key===w.ENTER&&f&&setTimeout(()=>{v(f,I)}),!P){if(I.stopPropagation(),/^[a-zA-Z0-9]$/.test(I.key)){m?.current?.focus();return}I.preventDefault()}});return Wd(()=>(window.addEventListener("keydown",S,{capture:!0}),()=>window.removeEventListener("keydown",S,{capture:!0})),[S]),Wd(()=>{if(!s)return;let I=R=>{let z={};for(let Y of R)z[Y.category]?z[Y.category].push(Y):z[Y.category]=[Y];return z},P=s.filter(C).sort((R,z)=>R.order-z.order),M=!p&&a&&C(a);if(!p){E(I(M?P.filter(R=>R.label!==a?.label):P)),b(M?a:P[0]||null);return}let B=mh(p.toLocaleLowerCase().replace(/[<>_| -]/g,""));P=ZT.filter(B,P,{extract:R=>R.haystack}).sort((R,z)=>z.score-R.score).map(R=>R.original),E(I(P)),b(P[0]??null)},[p,s,C,a]),dr(lt,{onCloseRequest:()=>y(),closeOnClickOutside:!0,title:!1,size:720,autofocus:!0,className:"command-palette-dialog",children:[Ut(Ia,{value:p,placeholder:g("commandPalette.search.placeholder"),onChange:I=>{u(I)},selectOnRender:!0,ref:m}),!o.device.viewport.isMobile&&dr("div",{className:"shortcuts-wrapper",children:[Ut(Yd,{shortcut:"\u2191\u2193",children:g("commandPalette.shortcuts.select")}),Ut(Yd,{shortcut:"\u21B5",children:g("commandPalette.shortcuts.confirm")}),Ut(Yd,{shortcut:D("Esc"),children:g("commandPalette.shortcuts.close")})]}),dr("div",{className:"commands",children:[a&&!p&&dr("div",{className:"command-category",children:[dr("div",{className:"command-category-title",children:[g("commandPalette.recents"),Ut("div",{className:"icon",style:{marginLeft:"6px"},children:Sx})]}),Ut(ky,{command:a,isSelected:a.label===f?.label,onClick:I=>v(a,I),disabled:!C(a),onMouseMove:()=>b(a),showShortcut:!o.device.viewport.isMobile,appState:t})]}),Object.keys(x).length>0?Object.keys(x).map((I,P)=>dr("div",{className:"command-category",children:[Ut("div",{className:"command-category-title",children:I}),x[I].map(M=>Ut(ky,{command:M,isSelected:M.label===f?.label,onClick:B=>v(M,B),onMouseMove:()=>b(M),showShortcut:!o.device.viewport.isMobile,appState:t},M.label))]},I)):s?dr("div",{className:"no-match",children:[Ut("div",{className:"icon",children:co})," ",g("commandPalette.search.noMatch")]}):null]})]})}var ky=({command:e,isSelected:o,disabled:t,onMouseMove:r,onClick:n,showShortcut:i,appState:a})=>{let l=()=>{};return dr("div",{className:Iy("command-item",{"item-selected":o,"item-disabled":t}),ref:s=>{o&&!t&&s?.scrollIntoView?.({block:"nearest"})},onClick:t?l:n,onMouseMove:t?l:r,title:t?g("commandPalette.itemNotAvailable"):"",children:[dr("div",{className:"name",children:[e.icon&&Ut(na,{icon:typeof e.icon=="function"?e.icon(a):e.icon}),e.label]}),i&&e.shortcut&&Ut(Yd,{shortcut:e.shortcut})]})};import{jsx as My}from"react/jsx-runtime";var Ah=O({name:"toggleLinearEditor",category:Ze.elements,label:(e,o,t)=>t.scene.getSelectedElements({selectedElementIds:o.selectedElementIds})[0]?.type==="arrow"?"labels.lineEditor.editArrow":"labels.lineEditor.edit",keywords:["line"],trackEvent:{category:"element"},predicate:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);return!!(!o.editingLinearElement&&n.length===1&&he(n[0])&&!se(n[0]))},perform(e,o,t,r){let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0})[0],i=o.editingLinearElement?.elementId===n.id?null:new $(n,j(e));return{appState:{...o,editingLinearElement:i},captureUpdate:A.IMMEDIATELY}},PanelComponent:({appState:e,updateData:o,app:t})=>{let r=t.scene.getSelectedElements({selectedElementIds:e.selectedElementIds})[0],n=g(r.type==="arrow"?"labels.lineEditor.editArrow":"labels.lineEditor.edit");return My(K,{type:"button",icon:Hx,title:n,"aria-label":n,onClick:()=>o(null)})}}),zX=O({name:"togglePolygon",category:Ze.elements,icon:Dp,keywords:["loop"],label:(e,o,t)=>!t.scene.getSelectedElements({selectedElementIds:o.selectedElementIds}).some(i=>!je(i)||!i.polygon)?"labels.polygon.breakPolygon":"labels.polygon.convertToPolygon",trackEvent:{category:"element"},predicate:(e,o,t,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds});return n.length>0&&n.every(i=>je(i)&&i.points.length>=4)},perform(e,o,t,r){let n=r.scene.getSelectedElements(o);if(n.some(s=>!je(s)))return!1;let i=n,a=i.some(s=>!s.polygon),l=j(i);return{elements:e.map(s=>!l.has(s.id)||!je(s)?s:ee(s,{backgroundColor:a?s.backgroundColor:"transparent",...rc(s,a)})),appState:o,captureUpdate:A.IMMEDIATELY}},PanelComponent:({appState:e,updateData:o,app:t})=>{let r=t.scene.getSelectedElements({selectedElementIds:e.selectedElementIds});if(r.length===0||r.some(a=>!je(a)||!a.polygon||a.points.length<3))return null;let n=r.every(a=>je(a)&&a.polygon),i=g(n?"labels.polygon.breakPolygon":"labels.polygon.convertToPolygon");return My(qi,{icon:Dp,title:i,"aria-label":i,active:n,onClick:()=>o(null),style:{marginLeft:"auto"}})}});var $l=O({name:"searchMenu",icon:co,keywords:["search","find"],label:"search.title",viewMode:!0,trackEvent:{category:"search_menu",action:"toggle",predicate:e=>e.gridModeEnabled},perform(e,o,t,r){if(o.openDialog)return!1;if(o.openSidebar?.name===Pt.name&&o.openSidebar.tab===br){let n=r.excalidrawContainerValue.container?.querySelector(`.${Ot.SEARCH_MENU_INPUT_WRAPPER} input`);return n?.focus(),n?.select(),!1}return{appState:{...o,openSidebar:{name:Pt.name,tab:br},openDialog:null},captureUpdate:A.EVENTUALLY}},checked:e=>e.gridModeEnabled,predicate:(e,o,t)=>t.gridModeEnabled===void 0,keyTest:e=>e[w.CTRL_OR_CMD]&&e.key===w.F});import{jsx as JT}from"react/jsx-runtime";var _h=O({name:"cropEditor",label:"helpDialog.cropStart",icon:eu,viewMode:!0,trackEvent:{category:"menu"},keywords:["image","crop"],perform(e,o,t,r){let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0})[0];return{appState:{...o,isCropping:!1,croppingElementId:n.id},captureUpdate:A.IMMEDIATELY}},predicate:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);return!!(!o.croppingElementId&&n.length===1&&Re(n[0]))},PanelComponent:({appState:e,updateData:o,app:t})=>{let r=g("helpDialog.cropStart");return JT(K,{type:"button",icon:eu,title:r,"aria-label":r,onClick:()=>o(null)})}});var Ly=(e,o)=>{let t=o.scene.getSelectedElements(e);return t.length===1&&ce(t[0])},Ay=O({name:"selectAllElementsInFrame",label:"labels.selectAllElementsInFrame",trackEvent:{category:"canvas"},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o).at(0)||null;if(ce(n)){let i=Ho(ge(e),n.id).filter(a=>!(a.type==="text"&&a.containerId));return{elements:e,appState:{...o,selectedElementIds:i.reduce((a,l)=>(a[l.id]=!0,a),{})},captureUpdate:A.IMMEDIATELY}}return{elements:e,appState:o,captureUpdate:A.EVENTUALLY}},predicate:(e,o,t,r)=>Ly(o,r)}),_y=O({name:"removeAllElementsFromFrame",label:"labels.removeAllElementsFromFrame",trackEvent:{category:"history"},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o).at(0)||null;return ce(n)?{elements:K1(e,n),appState:{...o,selectedElementIds:{[n.id]:!0}},captureUpdate:A.IMMEDIATELY}:{elements:e,appState:o,captureUpdate:A.EVENTUALLY}},predicate:(e,o,t,r)=>Ly(o,r)}),X$=O({name:"updateFrameRendering",label:"labels.updateFrameRendering",viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o)=>({elements:e,appState:{...o,frameRendering:{...o.frameRendering,enabled:!o.frameRendering.enabled}},captureUpdate:A.EVENTUALLY}),checked:e=>e.frameRendering.enabled}),$$=O({name:"setFrameAsActiveTool",label:"toolBar.frame",trackEvent:{category:"toolbar"},icon:ji,viewMode:!1,perform:(e,o,t,r)=>{let n=Ie(o,{type:"frame"});return po(r.interactiveCanvas,{...o,activeTool:n}),{elements:e,appState:{...o,activeTool:Ie(o,{type:"frame"})},captureUpdate:A.EVENTUALLY}},keyTest:e=>!1}),Py=O({name:"wrapSelectionInFrame",label:"labels.wrapSelectionInFrame",trackEvent:{category:"element"},predicate:(e,o,t,r)=>{let n=q(e,o);return n.length>0&&!n.some(i=>ce(i))},perform:(e,o,t,r)=>{let n=q(e,o),i=r.scene.getNonDeletedElementsMap(),[a,l,s,c]=xe(n,i),m=16,d=Di({x:a-m,y:l-m,width:s-a+m*2,height:c-l+m*2});if(o.editingGroupId){let u=Fe(n,o.editingGroupId);for(let f of u){let b=f.groupIds.indexOf(o.editingGroupId);zo(f,i,{groupIds:f.groupIds.slice(0,b)})}}return{elements:Ai([...r.scene.getElementsIncludingDeleted(),d],n,d,o),appState:{selectedElementIds:{[d.id]:!0}},captureUpdate:A.IMMEDIATELY}}});var Sa=class extends r0{applyTo(o,t,r){let[n,i]=this.elements.applyTo(o,r.elements,{excludedProperties:new Set(["version","versionNonce"])}),[a,l]=this.appState.applyTo(t,n);return[n,a,i||l]}static calculate(o,t){return super.calculate(o,t)}static inverse(o){return super.inverse(o)}static applyLatestChanges(o,t,r,n){return super.applyLatestChanges(o,t,r,n)}},ii=class{constructor(o=!0,t=!0){this.isUndoStackEmpty=o;this.isRedoStackEmpty=t}},jl=class e{constructor(o){this.store=o;T(this,"onHistoryChangedEmitter",new xo);T(this,"undoStack",[]);T(this,"redoStack",[])}get isUndoStackEmpty(){return this.undoStack.length===0}get isRedoStackEmpty(){return this.redoStack.length===0}clear(){this.undoStack.length=0,this.redoStack.length=0}record(o){if(o.isEmpty()||o instanceof Sa)return;let t=Sa.inverse(o);this.undoStack.push(t),t.elements.isEmpty()||(this.redoStack.length=0),this.onHistoryChangedEmitter.trigger(new ii(this.isUndoStackEmpty,this.isRedoStackEmpty))}undo(o,t){return this.perform(o,t,()=>e.pop(this.undoStack),r=>e.push(this.redoStack,r))}redo(o,t){return this.perform(o,t,()=>e.pop(this.redoStack),r=>e.push(this.undoStack,r))}perform(o,t,r,n){try{let i=r();if(i===null)return;let a=A.IMMEDIATELY,l=this.store.snapshot,s=o,c=t,m=!1;for(;i;){try{[s,c,m]=i.applyTo(s,c,l);let d=l.elements,p=l.maybeClone(a,s,c),u=o0.create(l,p),f=Sa.applyLatestChanges(i,d,s);f.isEmpty()||(this.store.scheduleMicroAction({action:a,change:u,delta:f}),i=f),l=p}finally{n(i)}if(m)break;i=r()}return[s,c]}finally{this.onHistoryChangedEmitter.trigger(new ii(this.isUndoStackEmpty,this.isRedoStackEmpty))}}static pop(o){if(!o.length)return null;let t=o.pop();return t!==void 0?t:null}static push(o,t){let r=Sa.inverse(t);return o.push(r)}};import{useEffect as QT,useState as ek}from"react";var Ph=(e,o)=>{let[t,r]=ek(o);return QT(()=>{let n=e.on(i=>{r(i)});return()=>{n()}},[e]),t};import{jsx as Oy}from"react/jsx-runtime";var Dy=(e,o,t)=>{if(!o.multiElement&&!o.resizingElement&&!o.editingTextElement&&!o.newElement&&!o.selectedElementsAreBeingDragged&&!o.selectionElement&&!e.flowChartCreator.isCreatingChart){let r=t();if(!r)return{captureUpdate:A.EVENTUALLY};let[n,i]=r,a=ic(Array.from(n.values()));return{appState:i,elements:a,captureUpdate:A.NEVER}}return{captureUpdate:A.EVENTUALLY}},Ry=e=>({name:"undo",label:"buttons.undo",icon:Op,trackEvent:{category:"history"},viewMode:!1,perform:(o,t,r,n)=>Dy(n,t,()=>e.undo(j(o),t)),keyTest:o=>o[w.CTRL_OR_CMD]&&hi(o,w.Z)&&!o.shiftKey,PanelComponent:({updateData:o,data:t})=>{let{isUndoStackEmpty:r}=Ph(e.onHistoryChangedEmitter,new ii(e.isUndoStackEmpty,e.isRedoStackEmpty));return Oy(K,{type:"button",icon:Op,"aria-label":g("buttons.undo"),onClick:o,size:t?.size||"medium",disabled:r,"data-testid":"button-undo"})}}),Ny=e=>({name:"redo",label:"buttons.redo",icon:Bp,trackEvent:{category:"history"},viewMode:!1,perform:(o,t,r,n)=>Dy(n,t,()=>e.redo(j(o),t)),keyTest:o=>o[w.CTRL_OR_CMD]&&o.shiftKey&&hi(o,w.Z)||Es&&o.ctrlKey&&!o.shiftKey&&hi(o,w.Y),PanelComponent:({updateData:o,data:t})=>{let{isRedoStackEmpty:r}=Ph(e.onHistoryChangedEmitter,new ii(e.isUndoStackEmpty,e.isRedoStackEmpty));return Oy(K,{type:"button",icon:Bp,"aria-label":g("buttons.redo"),onClick:o,size:t?.size||"medium",disabled:r,"data-testid":"button-redo"})}});var By=O({name:"autoResize",label:"labels.autoResize",icon:null,trackEvent:{category:"element"},predicate:(e,o,t,r)=>{let n=q(e,o);return n.length===1&&V(n[0])&&!n[0].autoResize},perform:(e,o,t,r)=>{let n=q(e,o);return{appState:o,elements:e.map(i=>{if(i.id===n[0].id&&V(i)){let a=Et(i.originalText,Qe(i),i.lineHeight);return ee(i,{autoResize:!0,width:a.width,height:a.height,text:i.originalText})}return i}),captureUpdate:A.IMMEDIATELY}}});import tk from"clsx";import{jsx as ok}from"react/jsx-runtime";var Dh=O({name:"viewMode",label:"labels.viewMode",icon:Xn,viewMode:!0,trackEvent:{category:"canvas",predicate:e=>!e.viewModeEnabled},perform(e,o){return{appState:{...o,viewModeEnabled:!this.checked(o)},captureUpdate:A.EVENTUALLY}},checked:e=>e.viewModeEnabled,predicate:(e,o,t)=>typeof t.viewModeEnabled>"u",keyTest:e=>!e[w.CTRL_OR_CMD]&&e.altKey&&e.code===le.R,PanelComponent:({data:e,updateData:o,appState:t})=>ok(K,{type:"button",icon:Xn,"aria-label":g("labels.viewMode"),onClick:()=>o(null),size:e?.size||"medium","data-testid":"button-view-mode",className:tk({enabled:t.viewModeEnabled})})});import{jsx as rk}from"react/jsx-runtime";var Rh=(e,o,t,r,n,i)=>{if(e.trackEvent)try{typeof e.trackEvent=="object"&&(!e.trackEvent.predicate||e.trackEvent.predicate(t,r,i))&&Ee(e.trackEvent.category,e.trackEvent.action||e.name,`${o} (${n.device.editor.isMobile?"mobile":"desktop"})`)}catch(a){console.error("error while logging action:",a)}},Vd=class{constructor(o,t,r,n){T(this,"actions",{});T(this,"updater");T(this,"getAppState");T(this,"getElementsIncludingDeleted");T(this,"app");T(this,"renderAction",(o,t)=>{let r=this.app.props.UIOptions.canvasActions;if(this.actions[o]&&"PanelComponent"in this.actions[o]&&(!(o in r)||r[o])){let n=this.actions[o],i=n.PanelComponent;i.displayName="PanelComponent";let a=this.getElementsIncludingDeleted(),l=this.getAppState(),s=c=>{Rh(n,"ui",l,a,this.app,c),this.updater(n.perform(this.getElementsIncludingDeleted(),this.getAppState(),c,this.app))};return rk(i,{elements:this.getElementsIncludingDeleted(),appState:this.getAppState(),updateData:s,appProps:this.app.props,app:this.app,data:t,renderAction:this.renderAction})}return null});T(this,"isActionEnabled",o=>{let t=this.getElementsIncludingDeleted(),r=this.getAppState();return!o.predicate||o.predicate(t,r,this.app.props,this.app)});this.updater=i=>{if(Br(i))i.then(a=>o(a));else return o(i)},this.getAppState=t,this.getElementsIncludingDeleted=r,this.app=n}registerAction(o){this.actions[o.name]=o}registerAll(o){o.forEach(t=>this.registerAction(t))}handleKeyDown(o){let t=this.app.props.UIOptions.canvasActions,r=Object.values(this.actions).sort((s,c)=>(c.keyPriority||0)-(s.keyPriority||0)).filter(s=>(s.name in t?t[s.name]:!0)&&s.keyTest&&s.keyTest(o,this.getAppState(),this.getElementsIncludingDeleted(),this.app));if(r.length!==1)return r.length>1&&console.warn("Canceling as multiple actions match this shortcut",r),!1;let n=r[0];if(this.getAppState().viewModeEnabled&&n.viewMode!==!0)return!1;let i=this.getElementsIncludingDeleted(),a=this.getAppState(),l=null;return Rh(n,"keyboard",a,i,this.app,null),o.preventDefault(),o.stopPropagation(),this.updater(r[0].perform(i,a,l,this.app)),!0}executeAction(o,t="api",r=null){let n=this.getElementsIncludingDeleted(),i=this.getAppState();Rh(o,t,i,n,this.app,r),this.updater(o.perform(n,i,r,this.app))}};var Kd=class{constructor(){T(this,"targets",new WeakMap);T(this,"rafIds",new WeakMap)}register(o,t){this.targets.set(o,{callback:t,stopped:!0})}start(o){let t=this.targets.get(o);t&&(this.rafIds.has(o)||(this.targets.set(o,{...t,stopped:!1}),this.scheduleFrame(o)))}stop(o){let t=this.targets.get(o);t&&!t.stopped&&this.targets.set(o,{...t,stopped:!0}),this.cancelFrame(o)}constructFrame(o){return t=>{let r=this.targets.get(o);if(!r)return;let n=this.onFrame(r,t);!r.stopped&&!n?this.scheduleFrame(o):this.cancelFrame(o)}}scheduleFrame(o){let t=requestAnimationFrame(this.constructFrame(o));this.rafIds.set(o,t)}cancelFrame(o){if(this.rafIds.has(o)){let t=this.rafIds.get(o);cancelAnimationFrame(t)}this.rafIds.delete(o)}onFrame(o,t){return o.callback(t)??!1}};var Nh=e=>{let o=Array.from(e.values());return{x:zy(o,t=>t.x)/o.length,y:zy(o,t=>t.y)/o.length}},Oh=([e,o])=>Math.hypot(e.x-o.x,e.y-o.y),zy=(e,o)=>e.reduce((t,r)=>t+o(r),0);var nk=8,Fy=99999,Zd=e=>nk/e,Gt=class Gt{};T(Gt,"referenceSnapPoints",null),T(Gt,"visibleGaps",null),T(Gt,"setReferenceSnapPoints",o=>{Gt.referenceSnapPoints=o}),T(Gt,"getReferenceSnapPoints",()=>Gt.referenceSnapPoints),T(Gt,"setVisibleGaps",o=>{Gt.visibleGaps=o}),T(Gt,"getVisibleGaps",()=>Gt.visibleGaps),T(Gt,"destroy",()=>{Gt.referenceSnapPoints=null,Gt.visibleGaps=null});var Mo=Gt,gn=e=>e.props.gridModeEnabled??e.state.gridModeEnabled,Ar=({event:e,app:o,selectedElements:t})=>e?o.state.activeTool.type!=="lasso"&&(o.state.objectsSnapModeEnabled&&!e[w.CTRL_OR_CMD]||!o.state.objectsSnapModeEnabled&&e[w.CTRL_OR_CMD]&&!gn(o)):t.length===1&&t[0].type==="arrow"?!1:o.state.objectsSnapModeEnabled,ik=(e,o,t=.01)=>Math.abs(e-o)<=t,ql=(e,o,{omitCenter:t,boundingBoxCorners:r,dragOffset:n}={omitCenter:!1,boundingBoxCorners:!1})=>{let i=[];if(e.length===1){let a=e[0],[l,s,c,m,d,p]=nt(a,o);n&&(l+=n.x,c+=n.x,d+=n.x,s+=n.y,m+=n.y,p+=n.y);let u=(c-l)/2,f=(m-s)/2;if((a.type==="diamond"||a.type==="ellipse")&&!r){let b=De(L(l,s+f),L(d,p),a.angle),x=De(L(l+u,s),L(d,p),a.angle),E=De(L(c,s+f),L(d,p),a.angle),y=De(L(l+u,m),L(d,p),a.angle),v=L(d,p);i=t?[b,x,E,y]:[b,x,E,y,v]}else{let b=De(L(l,s),L(d,p),a.angle),x=De(L(c,s),L(d,p),a.angle),E=De(L(l,m),L(d,p),a.angle),y=De(L(c,m),L(d,p),a.angle),v=L(d,p);i=t?[b,x,E,y]:[b,x,E,y,v]}}else if(e.length>1){let[a,l,s,c]=nc(e,n??{x:0,y:0}),m=s-a,d=c-l,p=L(a,l),u=L(s,l),f=L(a,c),b=L(s,c),x=L(a+m/2,l+d/2);i=t?[p,u,f,b]:[p,u,f,b,x]}return i.map(a=>L(Xe(a[0]),Xe(a[1])))},Gy=(e,o,t,r)=>{let n=o.filter(i=>ce(i)).map(i=>i.id);return op(e,o,t,r).filter(i=>!(i.frameId&&n.includes(i.frameId)))},Wy=(e,o,t,r)=>{let n=Gy(e,o,t,r),i=Fn(n,r).filter(d=>!(d.length===1&&tt(d[0]))).map(d=>xe(d).map(p=>Xe(p))),a=i.sort((d,p)=>d[0]-p[0]),l=[],s=0;e:for(let d=0;d<a.length;d++){let p=a[d];for(let u=d+1;u<a.length;u++){if(++s>Fy)break e;let f=a[u],[,b,x,E]=p,[y,v,,C]=f;x<y&&$a(ao(b,E),ao(v,C))&&l.push({startBounds:p,endBounds:f,startSide:[L(x,b),L(x,E)],endSide:[L(y,v),L(y,C)],length:y-x,overlap:ja(ao(b,E),ao(v,C))})}}let c=i.sort((d,p)=>d[1]-p[1]),m=[];s=0;e:for(let d=0;d<c.length;d++){let p=c[d];for(let u=d+1;u<c.length;u++){if(++s>Fy)break e;let f=c[u],[b,,x,E]=p,[y,v,C]=f;E<v&&$a(ao(b,x),ao(y,C))&&m.push({startBounds:p,endBounds:f,startSide:[L(b,E),L(x,E)],endSide:[L(y,v),L(C,v)],length:v-E,overlap:ja(ao(b,x),ao(y,C))})}}return{horizontalGaps:l,verticalGaps:m}},Hy=(e,o,t,r,n,i,a)=>{if(!Ar({app:t,event:r,selectedElements:e}))return[];if(e.length===0)return[];let l=Mo.getVisibleGaps();if(l){let{horizontalGaps:s,verticalGaps:c}=l,[m,d,p,u]=nc(e,o).map(x=>Xe(x)),f=(m+p)/2,b=(d+u)/2;for(let x of s){if(!$a(ao(d,u),x.overlap))continue;let E=x.startSide[0][0]+x.length/2,y=Xe(E-f);if(x.length>p-m&&Math.abs(y)<=a.x){Math.abs(y)<a.x&&(n.length=0),a.x=Math.abs(y);let R={type:"gap",direction:"center_horizontal",gap:x,offset:y};n.push(R);continue}let[,,C]=x.endBounds,S=m-C,I=Xe(x.length-S);if(Math.abs(I)<=a.x){Math.abs(I)<a.x&&(n.length=0),a.x=Math.abs(I);let R={type:"gap",direction:"side_right",gap:x,offset:I};n.push(R);continue}let[P,,,]=x.startBounds,M=P-p,B=Xe(M-x.length);if(Math.abs(B)<=a.x){Math.abs(B)<a.x&&(n.length=0),a.x=Math.abs(B);let R={type:"gap",direction:"side_left",gap:x,offset:B};n.push(R);continue}}for(let x of c){if(!$a(ao(m,p),x.overlap))continue;let E=x.startSide[0][1]+x.length/2,y=Xe(E-b);if(x.length>u-d&&Math.abs(y)<=a.y){Math.abs(y)<a.y&&(i.length=0),a.y=Math.abs(y);let R={type:"gap",direction:"center_vertical",gap:x,offset:y};i.push(R);continue}let[,C,,]=x.startBounds,S=C-u,I=Xe(S-x.length);if(Math.abs(I)<=a.y){Math.abs(I)<a.y&&(i.length=0),a.y=Math.abs(I);let R={type:"gap",direction:"side_top",gap:x,offset:I};i.push(R);continue}let[,,,P]=x.endBounds,M=Xe(d-P),B=x.length-M;if(Math.abs(B)<=a.y){Math.abs(B)<a.y&&(i.length=0),a.y=Math.abs(B);let R={type:"gap",direction:"side_bottom",gap:x,offset:B};i.push(R);continue}}}},Yy=(e,o,t,r)=>{let n=Gy(e,o,t,r);return Fn(n,r).filter(i=>!(i.length===1&&tt(i[0]))).flatMap(i=>ql(i,r))},Ma=(e,o,t,r,n,i,a)=>{if(!Ar({app:t,event:r,selectedElements:e})||e.length===0&&o.length===0)return[];let l=Mo.getReferenceSnapPoints();if(l)for(let s of o)for(let c of l){let m=c[0]-s[0],d=c[1]-s[1];Math.abs(m)<=a.x&&(Math.abs(m)<a.x&&(n.length=0),n.push({type:"point",points:[s,c],offset:m}),a.x=Math.abs(m)),Math.abs(d)<=a.y&&(Math.abs(d)<a.y&&(i.length=0),i.push({type:"point",points:[s,c],offset:d}),a.y=Math.abs(d))}},Vy=(e,o,t,r,n)=>{let i=t.state,a=q(e,i);if(!Ar({app:t,event:r,selectedElements:a})||a.length===0)return{snapOffset:{x:0,y:0},snapLines:[]};o.x=Xe(o.x),o.y=Xe(o.y);let l=[],s=[],c=Zd(i.zoom.value),m={x:c,y:c},d=ql(a,n,{dragOffset:o});Ma(a,d,t,r,l,s,m),Hy(a,o,t,r,l,s,m);let p={x:l[0]?.offset??0,y:s[0]?.offset??0};m.x=0,m.y=0,l.length=0,s.length=0;let u={x:Xe(o.x+p.x),y:Xe(o.y+p.y)};Ma(a,ql(a,n,{dragOffset:u}),t,r,l,s,m),Hy(a,u,t,r,l,s,m);let f=Bh(l,s),b=lk(a,u,[...l,...s].filter(x=>x.type==="gap"));return{snapOffset:p,snapLines:[...f,...b]}},Xe=e=>Math.round(e*10**6)/10**6,Uy=e=>{let o=new Map;for(let t of e){let r=t.join(",");o.has(r)||o.set(r,t)}return Array.from(o.values())},Bh=(e,o)=>{let t={},r={};if(e.length>0){for(let n of e)if(n.type==="point"){let i=Xe(n.points[0][0]);t[i]||(t[i]=[]),t[i].push(...n.points.map(a=>L(Xe(a[0]),Xe(a[1]))))}}if(o.length>0){for(let n of o)if(n.type==="point"){let i=Xe(n.points[0][1]);r[i]||(r[i]=[]),r[i].push(...n.points.map(a=>L(Xe(a[0]),Xe(a[1]))))}}return Object.entries(t).map(([n,i])=>({type:"points",points:Uy(i.map(a=>L(Number(n),a[1])).sort((a,l)=>a[1]-l[1]))})).concat(Object.entries(r).map(([n,i])=>({type:"points",points:Uy(i.map(a=>L(a[0],Number(n))).sort((a,l)=>a[0]-l[0]))})))},ak=e=>{let o=new Map;for(let t of e){let r=t.points.flat().map(n=>[Xe(n)]).join(",");o.has(r)||o.set(r,t)}return Array.from(o.values())},lk=(e,o,t)=>{let[r,n,i,a]=nc(e,o),l=[];for(let s of t){let[c,m,d,p]=s.gap.startBounds,[u,f,b,x]=s.gap.endBounds,E=ja(ao(n,a),s.gap.overlap),y=ja(ao(r,i),s.gap.overlap);switch(s.direction){case"center_horizontal":{if(E){let v=(E[0]+E[1])/2;l.push({type:"gap",direction:"horizontal",points:[L(s.gap.startSide[0][0],v),L(r,v)]},{type:"gap",direction:"horizontal",points:[L(i,v),L(s.gap.endSide[0][0],v)]})}break}case"center_vertical":{if(y){let v=(y[0]+y[1])/2;l.push({type:"gap",direction:"vertical",points:[L(v,s.gap.startSide[0][1]),L(v,n)]},{type:"gap",direction:"vertical",points:[L(v,a),L(v,s.gap.endSide[0][1])]})}break}case"side_right":{if(E){let v=(E[0]+E[1])/2;l.push({type:"gap",direction:"horizontal",points:[L(d,v),L(u,v)]},{type:"gap",direction:"horizontal",points:[L(b,v),L(r,v)]})}break}case"side_left":{if(E){let v=(E[0]+E[1])/2;l.push({type:"gap",direction:"horizontal",points:[L(i,v),L(c,v)]},{type:"gap",direction:"horizontal",points:[L(d,v),L(u,v)]})}break}case"side_top":{if(y){let v=(y[0]+y[1])/2;l.push({type:"gap",direction:"vertical",points:[L(v,a),L(v,m)]},{type:"gap",direction:"vertical",points:[L(v,p),L(v,f)]})}break}case"side_bottom":{if(y){let v=(y[0]+y[1])/2;l.push({type:"gap",direction:"vertical",points:[L(v,p),L(v,f)]},{type:"gap",direction:"vertical",points:[L(v,x),L(v,n)]})}break}}}return ak(l.map(s=>({...s,points:s.points.map(c=>L(Xe(c[0]),Xe(c[1])))})))},zh=(e,o,t,r,n,i)=>{if(!Ar({event:r,selectedElements:e,app:t})||e.length===0||e.length===1&&!ik(e[0].angle,0))return{snapOffset:{x:0,y:0},snapLines:[]};let[a,l,s,c]=xe(o);i&&(i.includes("e")?s+=n.x:i.includes("w")&&(a+=n.x),i.includes("n")?l+=n.y:i.includes("s")&&(c+=n.y));let m=[];if(i)switch(i){case"e":{m.push(L(s,l),L(s,c));break}case"w":{m.push(L(a,l),L(a,c));break}case"n":{m.push(L(a,l),L(s,l));break}case"s":{m.push(L(a,c),L(s,c));break}case"ne":{m.push(L(s,l));break}case"nw":{m.push(L(a,l));break}case"se":{m.push(L(s,c));break}case"sw":{m.push(L(a,c));break}}let d=Zd(t.state.zoom.value),p={x:d,y:d},u=[],f=[];Ma(o,m,t,r,u,f,p);let b={x:u[0]?.offset??0,y:f[0]?.offset??0};p.x=0,p.y=0,u.length=0,f.length=0;let[x,E,y,v]=xe(e).map(I=>Xe(I)),C=[L(x,E),L(x,v),L(y,E),L(y,v)];Ma(e,C,t,r,u,f,p);let S=Bh(u,f);return{snapOffset:b,snapLines:S}},Ky=(e,o,t,r,n,i)=>{if(!Ar({event:t,selectedElements:[e],app:o}))return{snapOffset:{x:0,y:0},snapLines:[]};let a=[L(r.x+n.x,r.y+n.y)],l=Zd(o.state.zoom.value),s={x:l,y:l},c=[],m=[];Ma([e],a,o,t,c,m,s);let d={x:c[0]?.offset??0,y:m[0]?.offset??0};s.x=0,s.y=0,c.length=0,m.length=0;let p=ql([e],i,{boundingBoxCorners:!0,omitCenter:!0});Ma([e],p,o,t,c,m,s);let u=Bh(c,m);return{snapOffset:d,snapLines:u}},Zy=(e,o,t,r,n)=>{if(!Ar({event:r,selectedElements:[],app:o}))return{originOffset:{x:0,y:0},snapLines:[]};let i=op(e,[],o.state,n),a=Zd(o.state.zoom.value),l={x:a,y:a},s=[],c=[];for(let m of i){let d=ql([m],n);for(let p of d){let u=p[0]-t.x;Math.abs(u)<=Math.abs(l.x)&&(Math.abs(u)<Math.abs(l.x)&&(c.length=0),c.push({type:"pointer",points:[p,L(p[0],t.y)],direction:"vertical"}),l.x=u);let f=p[1]-t.y;Math.abs(f)<=Math.abs(l.y)&&(Math.abs(f)<Math.abs(l.y)&&(s.length=0),s.push({type:"pointer",points:[p,L(t.x,p[1])],direction:"horizontal"}),l.y=f)}}return{originOffset:{x:c.length>0?c[0].points[0][0]-t.x:0,y:s.length>0?s[0].points[0][1]-t.y:0},snapLines:[...c,...s]}},Xy=e=>e===Je.rectangle||e===Je.ellipse||e===Je.diamond||e===Je.frame||e===Je.magicframe||e===Je.image||e===Je.text;var Xd={width:100,height:0},fn=100,sk=(e,o,t)=>{let r=zt({x:0,y:0,textAlign:Va.CENTER,verticalAlign:Vt.MIDDLE,...o,containerId:e.id,strokeColor:o.strokeColor||e.strokeColor});return Object.assign(e,{boundElements:(e.boundElements||[]).concat({type:"text",id:r.id})}),Ke(r,e,t),[e,r]},$y=(e,o,t,r,n)=>{let i,a;if(Object.assign(e,{startBinding:e?.startBinding||null,endBinding:e.endBinding||null}),o){let m=o?.width??fn,d=o?.height??fn,p;o.id&&(p=r.getElement(o.id),p||console.error(`No element for start binding with id ${o.id} found`));let u=o.x||e.x-m,f=o.y||e.y-d/2,b=p?p.type:o.type;if(b){if(b==="text"){let x="";p&&p.type==="text"?x=p.text:o.type==="text"&&(x=o.text),x||console.error(`No text found for start binding text element for ${e.id}`),i=zt({x:u,y:f,type:"text",...p,...o,text:x}),Object.assign(i,{x:o.x||e.x-i.width,y:o.y||e.y-i.height/2})}else switch(b){case"rectangle":case"ellipse":case"diamond":{i=Xt({x:u,y:f,width:m,height:d,...p,...o,type:b});break}default:yi(e,`Unhandled element start type "${o.type}"`,!0)}Si(e,i,"start",n)}}if(t){let m=t?.height??fn,d=t?.width??fn,p;t.id&&(p=r.getElement(t.id),p||console.error(`No element for end binding with id ${t.id} found`));let u=t.x||e.x+e.width,f=t.y||e.y-m/2,b=p?p.type:t.type;if(b){if(b==="text"){let x="";p&&p.type==="text"?x=p.text:t.type==="text"&&(x=t.text),x||console.error(`No text found for end binding text element for ${e.id}`),a=zt({x:u,y:f,type:"text",...p,...t,text:x}),Object.assign(a,{y:t.y||e.y-a.height/2})}else switch(b){case"rectangle":case"ellipse":case"diamond":{a=Xt({x:u,y:f,width:d,height:m,...p,...t,type:b});break}default:yi(e,`Unhandled element end type "${b}"`,!0)}Si(e,a,"end",n)}}if(e.points.length<2)return{linearElement:e,startBoundElement:i,endBoundElement:a};let l=e.points.length-1,s=.5,c=Zt(e.points);return e.points[l][0]>e.points[l-1][0]&&(c[0][0]=s,c[l][0]-=s),e.points[l][0]<e.points[l-1][0]&&(c[0][0]=-s,c[l][0]+=s),e.points[l][1]>e.points[l-1][1]&&(c[0][1]=s,c[l][1]-=s),e.points[l][1]<e.points[l-1][1]&&(c[0][1]=-s,c[l][1]+=s),Object.assign(e,$.getNormalizeElementPointsAndCoords({...e,points:c})),{linearElement:e,startBoundElement:i,endBoundElement:a}},Fh=class{constructor(){T(this,"excalidrawElements",new Map);T(this,"add",o=>{o&&this.excalidrawElements.set(o.id,o)});T(this,"getElements",()=>Zr(Array.from(this.excalidrawElements.values())));T(this,"getElementsMap",()=>Os(j(this.getElements())));T(this,"getElement",o=>this.excalidrawElements.get(o))}},Hh=(e,o)=>{if(!e)return[];let t=Zt(e),r=new Fh,n=new Map,i=new Map;for(let s of t){let c,m=s.id;switch(o?.regenerateIds!==!1&&Object.assign(s,{id:lo()}),s.type){case"rectangle":case"ellipse":case"diamond":{let p=s?.label?.text&&s.width===void 0?0:s?.width||fn,u=s?.label?.text&&s.height===void 0?0:s?.height||fn;c=Xt({...s,width:p,height:u});break}case"line":{let p=s.width||Xd.width,u=s.height||Xd.height;c=wo({width:p,height:u,points:[L(0,0),L(p,u)],...s});break}case"arrow":{let p=s.width||Xd.width,u=s.height||Xd.height;c=Xr({width:p,height:u,endArrowhead:"arrow",points:[L(0,0),L(p,u)],...s,type:"arrow"}),Object.assign(c,zf(c.points));break}case"text":{let p=s?.fontFamily||Rr,u=s?.fontSize||fr,f=s?.lineHeight||Ro(p),b=s.text??"",x=Bn(b),E=Et(x,Qe({fontFamily:p,fontSize:u}),f);c=zt({width:E.width,height:E.height,fontFamily:p,fontSize:u,...s});break}case"image":{c=cc({width:s?.width||fn,height:s?.height||fn,...s});break}case"frame":{c=Di({x:0,y:0,...s});break}case"magicframe":{c=cl({x:0,y:0,...s});break}case"freedraw":case"iframe":case"embeddable":{c=s;break}default:c=s,yi(s,`Unhandled element type "${s.type}"`,!0)}r.getElement(c.id)?console.error(`Duplicate id found for ${c.id}`):(r.add(c),n.set(c.id,s),m&&i.set(m,c.id))}let a=r.getElementsMap(),l=new sl(a);for(let[s,c]of n){let m=r.getElement(s);switch(c.type){case"rectangle":case"ellipse":case"diamond":case"arrow":{if(c.label?.text){let[d,p]=sk(m,c?.label,l);if(r.add(d),r.add(p),Ae(d)){let u=c.type==="arrow"?c?.start:void 0,f=c.type==="arrow"?c?.end:void 0;if(u&&u.id){let y=i.get(u.id);y&&Object.assign(u,{id:y})}if(f&&f.id){let y=i.get(f.id);y&&Object.assign(f,{id:y})}let{linearElement:b,startBoundElement:x,endBoundElement:E}=$y(d,u,f,r,l);d=b,r.add(b),r.add(x),r.add(E)}}else switch(c.type){case"arrow":{let{start:d,end:p}=c;if(d&&d.id){let x=i.get(d.id);Object.assign(d,{id:x})}if(p&&p.id){let x=i.get(p.id);Object.assign(p,{id:x})}let{linearElement:u,startBoundElement:f,endBoundElement:b}=$y(m,d,p,r,l);r.add(u),r.add(f),r.add(b);break}}break}}}for(let[s,c]of n){if(c.type!=="frame"&&c.type!=="magicframe")continue;let m=r.getElement(s);if(!m)throw new Error(`Excalidraw element with id ${s} doesn't exist`);let d=[];c.children.forEach(S=>{let I=i.get(S);if(!I)throw new Error(`Element with ${S} wasn't mapped correctly`);let P=r.getElement(I);if(!P)throw new Error(`Frame element with id ${I} doesn't exist`);Object.assign(P,{frameId:m.id}),P?.boundElements?.forEach(M=>{let B=r.getElement(M.id);if(!B)throw new Error(`Bound element with id ${M.id} doesn't exist`);Object.assign(B,{frameId:m.id}),d.push(B)}),d.push(P)});let[p,u,f,b]=xe(d),x=10;p=p-x,u=u-x,f=f+x,b=b+x;let E=m?.x||p,y=m?.y||u,v=m?.width||f-p,C=m?.height||b-u;Object.assign(m,{x:E,y,width:v,height:C}),Mt()&&c.children.length&&(m?.x||m?.y||m?.width||m?.height)&&console.info("User provided frame attributes are being considered, if you find this inaccurate, please remove any of the attributes - x, y, width and height so frame coordinates and dimensions are calculated automatically")}return r.getElements()};import $d from"open-color";var ck="#ff6b6b",dk="#ff0000",jy=1,qy=2,Jy=(e,o)=>{if(!o.snapLines.length)return;let t=o.theme===re.LIGHT||o.zenModeEnabled?ck:dk,r=(o.zenModeEnabled?jy*1.5:jy)/o.zoom.value;e.save(),e.translate(o.scrollX,o.scrollY);for(let n of o.snapLines)n.type==="pointer"?(e.lineWidth=r,e.strokeStyle=t,pk(n,e,o)):n.type==="gap"?(e.lineWidth=r,e.strokeStyle=t,uk(n.points[0],n.points[1],n.direction,o,e)):n.type==="points"&&(e.lineWidth=r,e.strokeStyle=t,mk(n,e,o));e.restore()},mk=(e,o,t)=>{if(!t.zenModeEnabled){let r=e.points[0],n=e.points[e.points.length-1];Lo(r,n,o)}for(let r of e.points)Qy(r,t,o)},pk=(e,o,t)=>{Qy(e.points[0],t,o),t.zenModeEnabled||Lo(e.points[0],e.points[1],o)},Qy=([e,o],t,r)=>{r.save();let n=(t.zenModeEnabled?qy*1.5:qy)/t.zoom.value;r.beginPath(),r.moveTo(e-n,o-n),r.lineTo(e+n,o+n),r.moveTo(e+n,o-n),r.lineTo(e-n,o+n),r.stroke(),r.restore()},Lo=(e,o,t)=>{t.beginPath(),t.lineTo(e[0],e[1]),t.lineTo(o[0],o[1]),t.stroke()},uk=(e,o,t,r,n)=>{let i=8/r.zoom.value,a=i/2,l=i/4;if(t==="horizontal"){let s=[(e[0]+o[0])/2,e[1]];r.zenModeEnabled||Lo(L(e[0],e[1]-i),L(e[0],e[1]+i),n),Lo(L(s[0]-l,s[1]-a),L(s[0]-l,s[1]+a),n),Lo(L(s[0]+l,s[1]-a),L(s[0]+l,s[1]+a),n),r.zenModeEnabled||(Lo(L(o[0],o[1]-i),L(o[0],o[1]+i),n),Lo(e,o,n))}else{let s=[e[0],(e[1]+o[1])/2];r.zenModeEnabled||Lo(L(e[0]-i,e[1]),L(e[0]+i,e[1]),n),Lo(L(s[0]-a,s[1]-l),L(s[0]+a,s[1]-l),n),Lo(L(s[0]-a,s[1]+l),L(s[0]+a,s[1]+l),n),r.zenModeEnabled||(Lo(L(o[0]-i,o[1]),L(o[0]+i,o[1]),n),Lo(e,o,n))}};var jo=4,to=6,ev="rgba(0,0,0,0.3)",tv=(e,o,t,r)=>{if(!e.size)return{horizontal:null,vertical:null};let[n,i,a,l]=xe(e),s=o/r.zoom.value,c=t/r.zoom.value,m={top:parseInt(Ja("sat"))||0,bottom:parseInt(Ja("sab"))||0,left:parseInt(Ja("sal"))||0,right:parseInt(Ja("sar"))||0},d=Cr().rtl,p=-r.scrollX+m.left,u=-r.scrollY+m.top,f=p+s-m.right,b=u+c-m.bottom,x=Math.min(n,p),E=Math.min(i,u),y=Math.max(a,f),v=Math.max(l,b),C=a-n,S=l-i,I=y-x,P=v-E,M=Math.max(jo*2,m.left+m.right)+to*2,B=o*(s/I)-M,R=Math.max(jo*2,m.top+m.bottom)+to*2,z=t*(c/P)-R,Y=I>C?I*r.zoom.value/(B+M):o/(B+M),W=P>S?P*r.zoom.value/(z+R):t/(z+R);return{horizontal:p===x&&f===y?null:{x:Math.max(m.left,jo)+to+(p-x)/I*o,y:t-to-Math.max(jo,m.bottom),width:B,height:to,deltaMultiplier:Y},vertical:u===E&&b===v?null:{x:d?Math.max(m.left,jo):o-to-Math.max(m.right,jo),y:Math.max(m.top,jo)+to+(u-E)/P*t,width:to,height:z,deltaMultiplier:W}}},Uh=(e,o,t)=>{let[r,n]=[e.horizontal,e.vertical].map(a=>a!=null&&a.x<=o&&o<=a.x+a.width&&a.y<=t&&t<=a.y+a.height);return{isOverEither:r||n,isOverHorizontal:r,isOverVertical:n}};var hk=(e,o)=>{Ns(o.selectedLinearElement,"selectedLinearElement is null");let{segmentMidPointHoveredCoords:t}=o.selectedLinearElement;Ns(t,"midPointCoords is null"),e.save(),e.translate(o.scrollX,o.scrollY),nv(t,e,o),e.restore()},gk=(e,o,t)=>{let{elementId:r,hoverPointIndex:n}=o.selectedLinearElement;if(o.editingLinearElement?.selectedPointsIndices?.includes(n))return;let i=$.getElement(r,t);if(!i)return;let a=$.getPointAtIndexGlobalCoordinates(i,n,t);e.save(),e.translate(o.scrollX,o.scrollY),nv(a,e,o),e.restore()},nv=(e,o,t)=>{o.fillStyle="rgba(105, 101, 219, 0.4)",ml(o,e[0],e[1],$.POINT_HANDLE_SIZE/t.zoom.value,!1)},Gh=(e,o,t,r,n,i,a)=>{e.strokeStyle="#5e5ad8",e.setLineDash([]),e.fillStyle="rgba(255, 255, 255, 0.9)",n?e.fillStyle="rgba(134, 131, 226, 0.9)":i&&(e.fillStyle="rgba(177, 151, 252, 0.7)"),ml(e,t[0],t[1],(a?r*(o.editingLinearElement?1.5:2):r)/o.zoom.value,!i,!a||n)},fk=(e,o,t,r)=>{let n=tp(o,o.width,o.height,r);switch(e.fillStyle="rgba(0,0,0,.05)",o.type){case"rectangle":case"text":case"image":case"iframe":case"embeddable":case"frame":case"magicframe":B0(e,o,t,n);break;case"diamond":F0(e,n,o,t);break;case"ellipse":{let[i,a,l,s]=nt(o,t),c=l-i,m=s-a;e.strokeStyle="rgba(0,0,0,.05)",e.lineWidth=n-Ks,z0(e,c+n+Ks,m+n+Ks,i+c/2,a+m/2,o.angle);break}}},bk=(e,o,t,r)=>{let[n,i,a]=o,l=tp(a,a.width,a.height,r);e.strokeStyle="rgba(0,0,0,0)",e.fillStyle="rgba(0,0,0,.05)",(i==="both"?[0,-1]:i==="start"?[0]:[-1]).forEach(c=>{let[m,d]=$.getPointAtIndexGlobalCoordinates(n,c,t);ml(e,m,d,l,!0)})},iv=(e,o,t)=>{let{angle:r,x1:n,y1:i,x2:a,y2:l,selectionColors:s,cx:c,cy:m,dashed:d,activeEmbeddable:p}=t,u=a-n,f=l-i,x=(t.padding??vs*2)/o.zoom.value,E=8/o.zoom.value,y=4/o.zoom.value;e.save(),e.translate(o.scrollX,o.scrollY),e.lineWidth=(p?4:1)/o.zoom.value;let v=s.length;for(let C=0;C<v;++C)e.strokeStyle=s[C],d&&e.setLineDash([E,y+(E+y)*(v-1)]),e.lineDashOffset=(E+y)*C,pl(e,n-x,i-x,u+x*2,f+x*2,c,m,r);e.restore()},xk=(e,o,t,r)=>{let n=Array.isArray(t)?bk:fk;e.save(),e.translate(o.scrollX,o.scrollY),n(e,t,r,o.zoom),e.restore()},Ek=(e,o,t,r)=>{let[n,i,a,l]=nt(t,r),s=a-n,c=l-i;e.strokeStyle="rgb(0,118,255)",e.lineWidth=_t.strokeWidth/o.zoom.value,e.save(),e.translate(o.scrollX,o.scrollY),pl(e,n,i,s,c,n+s/2,i+c/2,t.angle,!1,_t.radius/o.zoom.value),e.restore()},ov=(e,o,t,r)=>{let{colors:n=["rgb(0,118,255)"],dashed:i=!1}=r||{},a=t.filter(m=>m.groupIds.length===0),l=t.filter(m=>m.groupIds.length>0),s=m=>{let[d,p,u,f]=xe(m);return{angle:0,x1:d,x2:u,y1:p,y2:f,selectionColors:n,dashed:i,cx:d+(u-d)/2,cy:p+(f-p)/2,activeEmbeddable:!1}},c=m=>{let d=Fe(t,m);return s(d)};Object.entries(zn(l,o)).filter(([m,d])=>d).map(([m,d])=>m).map(m=>c(m)).concat(a.map(m=>s([m]))).forEach(m=>iv(e,o,m))},Wh=(e,o,t,r)=>{if(!o.selectedLinearElement)return;e.save(),e.translate(o.scrollX,o.scrollY),e.lineWidth=1/o.zoom.value;let n=$.getPointsGlobalCoordinates(t,r),{POINT_HANDLE_SIZE:i}=$,a=o.editingLinearElement?i:i/2,l=se(t),s=je(t);if(n.forEach((c,m)=>{if(l&&m!==0&&m!==n.length-1)return;let d=m>0&&(m!==n.length-1||!s||!t.polygon)&&Ym(c,m===n.length-1?n[0]:n[m-1],2/o.zoom.value),p=!!o.editingLinearElement?.selectedPointsIndices?.includes(m);s&&t.polygon&&!p&&m===t.points.length-1&&o.editingLinearElement?.selectedPointsIndices?.includes(0)&&(p=!0),Gh(e,o,c,a,p,!1,d)}),se(t)){let c=t.fixedSegments?.map(m=>m.index)||[];n.slice(0,-1).forEach((m,d)=>{$.isSegmentTooShort(t,n[d+1],n[d],d,o.zoom)||Gh(e,o,L((m[0]+n[d+1][0])/2,(m[1]+n[d+1][1])/2),i/2,!1,!c.includes(d+1),!1)})}else $.getEditorMidPoints(t,r,o).filter((m,d,p)=>m!==null&&!(se(t)&&(d===0||d===p.length-1))).forEach(m=>{(o.editingLinearElement||n.length===2)&&Gh(e,o,m,i/2,!1,!0,!1)});e.restore()},rv=(e,o,t,r,n)=>{Object.keys(r).forEach(i=>{let a=r[i];if(a!==void 0){let[l,s,c,m]=a;e.save(),e.lineWidth=1/t.zoom.value,o.selectionColor&&(e.strokeStyle=o.selectionColor),i==="rotation"?ml(e,l+c/2,s+m/2,c/2,!0):e.roundRect?(e.beginPath(),e.roundRect(l,s,c,m,2/t.zoom.value),e.fill(),e.stroke()):pl(e,l,s,c,m,l+c/2,s+m/2,n,!0),e.restore()}})},yk=(e,o,t,r,n)=>{let[i,a,,,l,s]=nt(r,n),c=3,m=20,d=c/t.zoom.value,p=d/2,u=l-i+d,f=s-a+d,b=Math.min(m/t.zoom.value,u),x=Math.min(m/t.zoom.value,f);e.save(),e.fillStyle=o.selectionColor,e.strokeStyle=o.selectionColor,e.lineWidth=d,[[[-u,-f],[0,p],[b,p],[p,0],[p,x]],[[u-p,-f],[p,p],[-b+p,p],[0,0],[0,x]],[[-u,f],[0,-p],[b,-p],[p,0],[p,-x]],[[u-p,f],[p,-p],[-b+p,-p],[0,0],[0,-x]]].forEach(y=>{let[[v,C],[S,I],[P,M],[B,R],[z,Y]]=y;e.save(),e.translate(l,s),e.rotate(r.angle),e.beginPath(),e.moveTo(v+S,C+I),e.lineTo(v+P,C+M),e.stroke(),e.beginPath(),e.moveTo(v+B,C+R),e.lineTo(v+z,C+Y),e.stroke(),e.restore()}),e.restore()},vk=(e,o,t,r)=>{o.save();let n=vs*2/t.zoom.value,i=e.width+n*2,a=e.height+n*2,l=e.x+i/2,s=e.y+a/2,c=-(i/2+n),m=-(a/2+n);o.translate(l+t.scrollX,s+t.scrollY),o.rotate(e.angle),o.lineWidth=1/t.zoom.value,o.strokeStyle=r,o.strokeRect(c,m,i,a),o.restore()},av=({canvas:e,elementsMap:o,visibleElements:t,selectedElements:r,allElementsMap:n,scale:i,appState:a,renderConfig:l,device:s})=>{if(e===null)return{atLeastOneVisibleElement:!1,elementsMap:o};let[c,m]=gc(e,i),d=fc({canvas:e,scale:i,normalizedWidth:c,normalizedHeight:m});d.save(),d.scale(a.zoom.value,a.zoom.value);let p;if(t.forEach(b=>{a.editingLinearElement?.elementId===b.id&&b&&(p=b)}),p&&Wh(d,a,p,o),a.selectionElement&&!a.isCropping)try{$1(a.selectionElement,d,a,l.selectionColor)}catch(b){console.error(b)}if(a.editingTextElement&&V(a.editingTextElement)){let b=n.get(a.editingTextElement.id);b&&!b.autoResize&&vk(b,d,a,l.selectionColor)}if(a.isBindingEnabled&&a.suggestedBindings.filter(b=>b!=null).forEach(b=>{xk(d,a,b,o)}),a.frameToHighlight&&Ek(d,a,a.frameToHighlight,o),a.elementsToHighlight&&ov(d,a,a.elementsToHighlight),a.activeLockedId){let b=n.get(a.activeLockedId),x=b?[b]:Fe(n,a.activeLockedId);ov(d,a,x,{colors:["#ced4da"],dashed:!0})}let u=r.some(b=>ce(b));if(r.length===1&&a.editingLinearElement?.elementId===r[0].id&&Wh(d,a,r[0],o),a.selectedLinearElement){let b=a.selectedLinearElement,x=r.find(E=>E.id===b.elementId);b.segmentMidPointHoveredCoords?hk(d,a):(se(x)?b.hoverPointIndex===0||b.hoverPointIndex===x.points.length-1:b.hoverPointIndex>=0)&&gk(d,a,o)}if(!a.multiElement&&!a.editingLinearElement){let b=mc(r,a),x=r.length===1&&he(r[0]);x&&a.selectedLinearElement?.elementId===r[0].id&&!r[0].locked&&Wh(d,a,r[0],o);let E=l.selectionColor||$d.black;if(b){let y=j(r),v=[];for(let S of o.values()){let I=[],P=l.remoteSelectedElementIds.get(S.id);if(x&&se(S)&&(S.startBinding||S.endBinding)||(y.has(S.id)&&!$s(a,S)&&I.push(E),P&&I.push(...P.map(M=>ri(M,a.collaborators.get(M))))),I.length){let[M,B,R,z,Y,W]=nt(S,o,!0);v.push({angle:S.angle,x1:M,y1:B,x2:R,y2:z,selectionColors:S.locked?["#ced4da"]:I,dashed:!!P||S.locked,cx:Y,cy:W,activeEmbeddable:a.activeEmbeddable?.element===S&&a.activeEmbeddable.state==="active",padding:S.id===a.croppingElementId||Re(S)?0:void 0})}}let C=S=>{let I=Fe(o,S),[P,M,B,R]=xe(I);v.push({angle:0,x1:P,x2:B,y1:M,y2:R,selectionColors:I.some(z=>z.locked)?["#ced4da"]:[$d.black],dashed:!0,cx:P+(B-P)/2,cy:M+(R-M)/2,activeEmbeddable:!1})};for(let S of Fo(a))C(S);a.editingGroupId&&C(a.editingGroupId),v.forEach(S=>iv(d,a,S))}if(d.save(),d.translate(a.scrollX,a.scrollY),r.length===1){d.fillStyle=$d.white;let y=k0(r[0],a.zoom,o,"mouse",dc(s));if(!a.viewModeEnabled&&b&&!V(a.editingTextElement)&&!a.croppingElementId&&rv(d,l,a,y,r[0].angle),a.croppingElementId&&!a.isCropping){let v=o.get(a.croppingElementId);v&&Re(v)&&yk(d,l,a,v,o)}}else if(r.length>1&&!a.isRotating&&!r.some(y=>y.locked)){let y=vs*2/a.zoom.value;d.fillStyle=$d.white;let[v,C,S,I]=xe(r,o),P=d.getLineDash();d.setLineDash([2/a.zoom.value]);let M=d.lineWidth;d.lineWidth=1/a.zoom.value,d.strokeStyle=E,pl(d,v-y,C-y,S-v+y*2,I-C+y*2,(v+S)/2,(C+I)/2,0),d.lineWidth=M,d.setLineDash(P);let B=T0([v,C,S,I,(v+S)/2,(C+I)/2],0,a.zoom,"mouse",u?{...dc(s),rotation:!0}:dc(s));r.some(R=>!R.locked)&&rv(d,l,a,B,0)}d.restore()}a.searchMatches?.matches.forEach(({id:b,focus:x,matchedLines:E})=>{let y=o.get(b);if(y){let[v,C,,,S,I]=nt(y,o,!0);d.save(),a.theme===re.LIGHT?x?d.fillStyle="rgba(255, 124, 0, 0.4)":d.fillStyle="rgba(255, 226, 0, 0.4)":x?d.fillStyle="rgba(229, 82, 0, 0.4)":d.fillStyle="rgba(99, 52, 0, 0.4)";let P=ce(y)?a.zoom.value:1;d.translate(a.scrollX,a.scrollY),d.translate(S,I),d.rotate(y.angle),E.forEach(M=>{(M.showOnCanvas||x)&&d.fillRect(v+M.offsetX/P-S,C+M.offsetY/P-I,M.width/P,M.height/P)}),d.restore()}}),Jy(d,a),d.restore(),t2({context:d,renderConfig:l,appState:a,normalizedWidth:c,normalizedHeight:m});let f;return l.renderScrollbars&&(f=tv(o,c,m,a),d.save(),d.fillStyle=ev,d.strokeStyle="rgba(255,255,255,0.8)",[f.horizontal,f.vertical].forEach(b=>{b&&hd(d,b.x,b.y,b.width,b.height,to/2)}),d.restore()),{scrollBars:f,atLeastOneVisibleElement:t.length>0,elementsMap:o}},Yh=xi(e=>{let o=av(e);e.callback?.(o)},{trailing:!0}),lv=(e,o)=>{if(o){Yh(e);return}let t=av(e);return e.callback(t),t};var Jl=class{constructor(o){T(this,"scene");T(this,"getRenderableElements",(()=>{let o=({elementsMap:r,zoom:n,offsetLeft:i,offsetTop:a,scrollX:l,scrollY:s,height:c,width:m})=>{let d=[];for(let p of r.values())ll(p,m,c,{zoom:n,offsetLeft:i,offsetTop:a,scrollX:l,scrollY:s},r)&&d.push(p);return d},t=({elements:r,editingTextElement:n,newElementId:i})=>{let a=Os(new Map);for(let l of r)i!==l.id&&(!n||n.type!=="text"||l.id!==n.id)&&a.set(l.id,l);return a};return qf(({zoom:r,offsetLeft:n,offsetTop:i,scrollX:a,scrollY:l,height:s,width:c,editingTextElement:m,newElementId:d,sceneNonce:p})=>{let u=this.scene.getNonDeletedElements(),f=t({elements:u,editingTextElement:m,newElementId:d}),b=o({elementsMap:f,zoom:r,offsetLeft:n,offsetTop:i,scrollX:a,scrollY:l,height:s,width:c});return{elementsMap:f,visibleElements:b}})})());this.scene=o}destroy(){Yh.cancel(),H0.cancel(),this.getRenderableElements.clear()}};import{jsx as Tk}from"react/jsx-runtime";var wk=5,Ck=(e,o,t)=>{let[r,n]=nt(e,t),{x:i,y:a}=ht({sceneX:r+e.width,sceneY:n},o),l=i-o.offsetLeft+10,s=a-o.offsetTop;return{x:l,y:s}},Vh=({children:e,element:o,elementsMap:t})=>{let r=ar();if(r.contextMenu||r.newElement||r.resizingElement||r.isRotating||r.openMenu||r.viewModeEnabled)return null;let{x:n,y:i}=Ck(o,r,t);return Tk("div",{className:"excalidraw-canvas-buttons",style:{top:`${i}px`,left:`${n}px`,padding:wk},children:e})};import{LaserPointer as kk}from"@excalidraw/laser-pointer";var _r=class{constructor(o,t,r){this.animationFrameHandler=o;this.app=t;this.options=r;T(this,"currentTrail");T(this,"pastTrails",[]);T(this,"container");T(this,"trailElement");T(this,"trailAnimation");this.animationFrameHandler.register(this,this.onFrame.bind(this)),this.trailElement=document.createElementNS(Bm,"path"),this.options.animateTrail&&(this.trailAnimation=document.createElementNS(Bm,"animate"),this.trailAnimation.setAttribute("attributeName","stroke-dashoffset"),this.trailElement.setAttribute("stroke-dasharray","7 7"),this.trailElement.setAttribute("stroke-dashoffset","10"),this.trailAnimation.setAttribute("from","0"),this.trailAnimation.setAttribute("to","-14"),this.trailAnimation.setAttribute("dur","0.3s"),this.trailElement.appendChild(this.trailAnimation))}get hasCurrentTrail(){return!!this.currentTrail}hasLastPoint(o,t){if(this.currentTrail){let r=this.currentTrail.originalPoints.length;return this.currentTrail.originalPoints[r-1][0]===o&&this.currentTrail.originalPoints[r-1][1]===t}return!1}start(o){o&&(this.container=o),this.trailElement.parentNode!==this.container&&this.container&&this.container.appendChild(this.trailElement),this.animationFrameHandler.start(this)}stop(){this.animationFrameHandler.stop(this),this.trailElement.parentNode===this.container&&this.container?.removeChild(this.trailElement)}startPath(o,t){this.currentTrail=new kk(this.options),this.currentTrail.addPoint([o,t,performance.now()]),this.update()}addPointToPath(o,t){this.currentTrail&&(this.currentTrail.addPoint([o,t,performance.now()]),this.update())}endPath(){this.currentTrail&&(this.currentTrail.close(),this.currentTrail.options.keepHead=!1,this.pastTrails.push(this.currentTrail),this.currentTrail=void 0,this.update())}getCurrentTrail(){return this.currentTrail}clearTrails(){this.pastTrails=[],this.currentTrail=void 0,this.update()}update(){this.start(),this.trailAnimation&&(this.trailAnimation.setAttribute("begin","indefinite"),this.trailAnimation.setAttribute("repeatCount","indefinite"))}onFrame(){let o=[];for(let r of this.pastTrails)o.push(this.drawTrail(r,this.app.state));if(this.currentTrail){let r=this.drawTrail(this.currentTrail,this.app.state);o.push(r)}this.pastTrails=this.pastTrails.filter(r=>r.getStrokeOutline().length!==0),o.length===0&&this.stop();let t=o.join(" ").trim();this.trailElement.setAttribute("d",t),this.trailAnimation?(this.trailElement.setAttribute("fill",(this.options.fill??(()=>"black"))(this)),this.trailElement.setAttribute("stroke",(this.options.stroke??(()=>"black"))(this))):this.trailElement.setAttribute("fill",(this.options.fill??(()=>"black"))(this))}drawTrail(o,t){let r=o.getStrokeOutline(o.options.size/t.zoom.value).map(([i,a])=>{let l=ht({sceneX:i,sceneY:a},t);return[l.x,l.y]}),n=this.trailAnimation?r.slice(0,r.length/2):r;return Qf(n,!0)}};var jd=class{constructor(o,t){this.animationFrameHandler=o;this.app=t;T(this,"localTrail");T(this,"collabTrails",new Map);T(this,"container");this.animationFrameHandler.register(this,this.onFrame.bind(this)),this.localTrail=new _r(o,t,{...this.getTrailOptions(),fill:()=>Lm})}getTrailOptions(){return{simplify:0,streamline:.4,sizeMapping:o=>{let n=Math.max(0,1-(performance.now()-o.pressure)/1e3),i=(50-Math.min(50,o.totalLength-o.currentIndex))/50;return Math.min(Oo(i),Oo(n))}}}startPath(o,t){this.localTrail.startPath(o,t)}addPointToPath(o,t){this.localTrail.addPointToPath(o,t)}endPath(){this.localTrail.endPath()}start(o){this.container=o,this.animationFrameHandler.start(this),this.localTrail.start(o)}stop(){this.animationFrameHandler.stop(this),this.localTrail.stop()}onFrame(){this.updateCollabTrails()}updateCollabTrails(){if(!(!this.container||this.app.state.collaborators.size===0)){for(let[o,t]of this.app.state.collaborators.entries()){let r;this.collabTrails.has(o)?r=this.collabTrails.get(o):(r=new _r(this.animationFrameHandler,this.app,{...this.getTrailOptions(),fill:()=>t.pointer?.laserColor||ri(o,t)}),r.start(this.container),this.collabTrails.set(o,r)),t.pointer&&t.pointer.tool==="laser"&&(t.button==="down"&&!r.hasCurrentTrail&&r.startPath(t.pointer.x,t.pointer.y),t.button==="down"&&r.hasCurrentTrail&&!r.hasLastPoint(t.pointer.x,t.pointer.y)&&r.addPointToPath(t.pointer.x,t.pointer.y),t.button==="up"&&r.hasCurrentTrail&&(r.addPointToPath(t.pointer.x,t.pointer.y),r.endPath()))}for(let o of this.collabTrails.keys())this.app.state.collaborators.has(o)||(this.collabTrails.get(o).stop(),this.collabTrails.delete(o))}}};import{version as Ik}from"react";import{unstable_batchedUpdates as sv}from"react-dom";var $e=e=>o=>{sv(e,o)},qd=e=>xi(o=>{sv(e,o)}),La=(()=>{let e;try{let t=Ik.split(".");e=Number(t[0])>17}catch{e=!1}let o=!1;return()=>window.EXCALIDRAW_THROTTLE_RENDER===!0?e?!0:(o||(o=!0,console.warn("Excalidraw: render throttling is disabled on React versions < 18.")),!1):!1})();var Sk=(e,o,t,r,n,i)=>{let{zoom:a}=r,l=180*t/Math.PI,s=e*(a.value-1)/2,c=o*(a.value-1)/2;return e>n&&a.value!==1&&(s=n*(a.value-1)/2),o>i&&a.value!==1&&(c=i*(a.value-1)/2),`translate(${s}px, ${c}px) scale(${a.value}) rotate(${l}deg)`},cv=({id:e,onChange:o,onSubmit:t,getViewportCoords:r,element:n,canvas:i,excalidrawContainer:a,app:l,autoSelect:s=!0})=>{let c=(H,F)=>{if(!F.style.fontFamily||!F.style.fontSize)return!1;let Q=F.style.fontFamily.replace(/"/g,"");return _n({fontFamily:H.fontFamily})!==Q||`${H.fontSize}px`!==F.style.fontSize},m=()=>{let H=l.state,F=l.scene.getElement(e);if(!F)return;let{textAlign:Q,verticalAlign:ie}=F,X=l.scene.getNonDeletedElementsMap();if(F&&V(F)){let de=F.x,ue=F.y,Ce=Eo(F,l.scene.getNonDeletedElementsMap()),dt=F.width,io=F.height,In=F.width,mi=F.height;if(Ce&&F.containerId){if(Ae(Ce)){let Dr=$.getBoundTextElementPosition(Ce,F,X);de=Dr.x,ue=Dr.y}let hs=c(F,d),za;if(hs?za=tl(Ce.id,Ce.height):(za=u1[Ce.id],za||(za=tl(Ce.id,Ce.height))),In=rl(Ce,F),mi=Ws(Ce,F),!Ae(Ce)&&io>mi){let Dr=Ti(io,Ce.type);l.scene.mutateElement(Ce,{height:Dr});return}else if(!Ae(Ce)&&Ce.height>za.height&&io<mi){let Dr=Ti(io,Ce.type);l.scene.mutateElement(Ce,{height:Dr})}else{let{y:Dr}=Hr(Ce,F,X);ue=Dr}}let[Im,Xg]=r(de,ue),L3=d.selectionStart,Sm=d.selectionEnd,$g=d.value.length;if(L3===Sm&&Sm!==$g){let hs=$g-Sm;d.selectionStart=d.value.length-hs,d.selectionEnd=d.value.length-hs}Ce?dt+=.5:(In=(H.width-8-Im)/H.zoom.value,dt=Math.min(dt,In)),io*=1.05;let A3=Qe(F),jg=(H.height-Xg)/H.zoom.value;Object.assign(d.style,{font:A3,lineHeight:F.lineHeight,width:`${dt}px`,height:`${io}px`,left:`${Im}px`,top:`${Xg}px`,transform:Sk(dt,io,C1(F,Ce),H,In,jg),textAlign:Q,verticalAlign:ie,color:F.strokeColor,opacity:F.opacity/100,filter:"var(--theme-filter)",maxHeight:`${jg}px`}),d.scrollTop=0,tr()&&(d.style.fontFamily=_n(F)),l.scene.mutateElement(F,{x:de,y:ue})}},d=document.createElement("textarea");d.dir="auto",d.tabIndex=0,d.dataset.type="wysiwyg",d.wrap="off",d.classList.add("excalidraw-wysiwyg");let p="pre",u="normal";(tt(n)||!n.autoResize)&&(p="pre-wrap",u="break-word"),Object.assign(d.style,{position:"absolute",display:"inline-block",minHeight:"1em",backfaceVisibility:"hidden",margin:0,padding:0,border:0,outline:0,resize:"none",background:"transparent",overflow:"hidden",zIndex:"var(--zIndex-wysiwyg)",wordBreak:u,whiteSpace:p,overflowWrap:"break-word",boxSizing:"content-box"}),d.value=n.originalText,m(),o&&(d.onpaste=async H=>{let F=await md(H,!0);if(!F.text)return;let Q=Bn(F.text);if(!Q)return;let ie=Eo(n,l.scene.getNonDeletedElementsMap()),X=Qe({fontSize:l.state.currentItemFontSize,fontFamily:l.state.currentItemFontFamily});if(ie){let de=me(ie,l.scene.getNonDeletedElementsMap()),ue=Ci(`${d.value}${Q}`,X,rl(ie,de)),Ce=v1(ue,X);d.style.width=`${Ce}px`}},d.oninput=()=>{let H=Bn(d.value);if(d.value!==H){let F=d.selectionStart;d.value=H,d.selectionStart=F,d.selectionEnd=F}o(d.value)}),d.onkeydown=H=>{if(!H.shiftKey&&nd.keyTest(H))H.preventDefault(),l.actionManager.executeAction(nd),m();else if(!H.shiftKey&&id.keyTest(H))H.preventDefault(),l.actionManager.executeAction(id),m();else if(!H.shiftKey&&ad.keyTest(H))H.preventDefault(),l.actionManager.executeAction(ad),m();else if(Ru.keyTest(H))l.actionManager.executeAction(Ru);else if(Nu.keyTest(H))l.actionManager.executeAction(Nu);else if(H.key===w.ESCAPE)H.preventDefault(),S=!0,I();else if(ti.keyTest(H))H.preventDefault(),I(),l.actionManager.executeAction(ti);else if(H.key===w.ENTER&&H[w.CTRL_OR_CMD]){if(H.preventDefault(),H.isComposing||H.keyCode===229)return;S=!0,I()}else if(H.key===w.TAB||H[w.CTRL_OR_CMD]&&(H.code===le.BRACKET_LEFT||H.code===le.BRACKET_RIGHT)){if(H.preventDefault(),H.isComposing)return;H.shiftKey||H.code===le.BRACKET_LEFT?y():E(),d.dispatchEvent(new Event("input"))}};let f=4,b=" ".repeat(f),x=new RegExp(`^ {1,${f}}`),E=()=>{let{selectionStart:H,selectionEnd:F}=d,Q=v(),ie=d.value;Q.forEach(X=>{let de=ie.slice(0,X),ue=ie.slice(X);ie=`${de}${b}${ue}`}),d.value=ie,d.selectionStart=H+f,d.selectionEnd=F+f*Q.length},y=()=>{let{selectionStart:H,selectionEnd:F}=d,Q=v(),ie=[],X=d.value;Q.forEach(de=>{let ue=X.slice(de,de+f).match(x);if(ue){let Ce=X.slice(0,de),dt=X.slice(de+ue[0].length);X=`${Ce}${dt}`,ie.push(de)}}),d.value=X,ie.length&&(H>ie[ie.length-1]?d.selectionStart=Math.max(H-f,ie[ie.length-1]):d.selectionStart=H,d.selectionEnd=Math.max(d.selectionStart,F-f*ie.length))},v=()=>{let{selectionStart:H,selectionEnd:F,value:Q}=d,ie=Q.slice(0,H).match(/[^\n]*$/)[0].length;return H=H-ie,Q.slice(H,F).split(`