@wildmio/excalidraw 0.18.0-custom.2 → 0.18.0-custom.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev/{chunk-QRXFLJOF.js → chunk-6RO6HAKL.js} +2 -2
- package/dist/dev/{chunk-4FKPNSAF.js → chunk-FF5ZIUVE.js} +3 -3
- package/dist/dev/data/{image-ZNW3236J.js → image-LXOOLHGM.js} +3 -3
- package/dist/dev/index.js +3 -3
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/{chunk-OVC72EOF.js → chunk-AJ35V3HR.js} +1 -1
- package/dist/prod/{chunk-B42KGT6Z.js → chunk-BNLQYA3M.js} +2 -2
- package/dist/prod/data/image-V5AMX3V6.js +1 -0
- package/dist/prod/index.js +2 -2
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/package.json +3 -2
- package/dist/prod/data/image-T7X6V6XU.js +0 -1
- /package/dist/dev/{chunk-QRXFLJOF.js.map → chunk-6RO6HAKL.js.map} +0 -0
- /package/dist/dev/{chunk-4FKPNSAF.js.map → chunk-FF5ZIUVE.js.map} +0 -0
- /package/dist/dev/data/{image-ZNW3236J.js.map → image-LXOOLHGM.js.map} +0 -0
package/dist/prod/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{$ as tt,$a as G1,$b as re,$c as Hc,$d as Gr,$e as ur,$f as sd,$g as sa,$h as Jl,A as Il,Aa as $p,Ab as Se,Ac as Nc,Ad as Ki,Ae as Vb,Af as Vr,Ag as L0,Ah as j0,B as E1,Ba as z1,Bb as q1,Bc as Oc,Bd as ct,Be as bu,Bf as wu,Bg as A0,Bh as MT,C as $n,Ca as vc,Cb as nu,Cc as yo,Cd as Db,Ce as jc,Cf as ta,Cg as _0,Ch as hi,D as y1,Da as wc,Db as J1,Dc as au,Dd as xn,De as yn,Df as Tu,Dg as aa,Dh as ma,E as v1,Ea as xo,Eb as ao,Ec as hb,Ed as Fl,Ee as qc,Ef as fr,Eg as P0,Eh as ql,F as w1,Fa as Tc,Fb as ti,Fc as ii,Fd as xe,Fe as Yb,Ff as Zl,Fg as dd,G as Mo,Ga as mn,Gb as bt,Gc as gb,Gd as _o,Ge as Kb,Gf as oa,Gg as D0,Gh as q0,H as uc,Ha as F1,Hb as Q1,Hc as fn,Hd as Uc,He as xu,Hf as s0,Hg as R0,I as hc,Ia as jp,Ib as oi,Ic as He,Id as Rb,Ie as ze,If as c0,Ig as md,Ih as J0,J as gc,Ja as qp,Jb as Lc,Jc as Ut,Jd as du,Je as te,Jf as vn,Jg as Pu,Jh as Q0,K as T1,Ka as H1,Kb as Xo,Kc as ai,Kd as mu,Ke as Ji,Kf as Qo,Kg as Du,Kh as Ed,L as I1,La as Ic,Lb as eb,Lc as Vi,Ld as Nb,Le as De,Lf as _,Lg as Ru,Lh as ex,M as C1,Ma as Jp,Mb as tb,Mc as X,Md as Zi,Me as Jc,Mf as d0,Mg as N0,Mh as Gu,N as k1,Na as Lo,Nb as ri,Nc as Bc,Nd as Hl,Ne as Zb,Nf as m0,Ng as la,Nh as Wu,O as fc,Oa as Qp,Ob as Dl,Oc as ne,Od as Gc,Oe as Eu,Of as Xl,Og as O0,Oh as yd,P as Cl,Pa as St,Pb as Pe,Pc as Yi,Pd as pu,Pe as Xb,Pf as p0,Pg as B0,Ph as tx,Q as kl,Qa as Cc,Qb as We,Qc as be,Qd as Ob,Qe as Do,Qf as u0,Qg as z0,Qh as Vu,R as S1,Ra as Al,Rb as Ct,Rc as Je,Rd as Xi,Re as $b,Rf as id,Rg as F0,Rh as Yr,S as bc,Sa as Or,Sb as Rl,Sc as Ce,Sd as Wc,Se as jb,Sf as br,Sg as kT,Sh as ox,T as M1,Ta as Ht,Tb as Ac,Tc as Te,Td as Bb,Te as lo,Tf as ra,Tg as Nu,Th as Yu,U as Wp,Ua as kc,Ub as _c,Uc as zc,Ud as zb,Ue as qb,Uf as Iu,Ug as Ou,Uh as rx,V as L1,Va as lt,Vb as ob,Vc as fb,Vd as Po,Ve as ci,Vf as h0,Vg as Ie,Vh as nx,W as Vp,Wa as pn,Wb as Eo,Wc as Xt,Wd as $i,We as Jb,Wf as g0,Wg as Bu,Wh as vd,X as ke,Xa as U1,Xb as rb,Xc as bb,Xd as Vc,Xe as Qi,Xf as f0,Xg as U0,Xh as Ku,Y as mr,Ya as _l,Yb as nb,Yc as Fc,Yd as Yc,Ye as Qc,Yf as Cu,Yg as ui,Yh as ix,Z as jn,Za as no,Zb as ib,Zc as Ur,Zd as Wt,Ze as Qb,Zf as ad,Zg as vr,Zh as ax,_ as Sl,_a as st,_b as ab,_c as xb,_d as ee,_e as pr,_f as ld,_g as G0,_h as lx,a as at,aa as qn,ab as W1,ac as lb,ad as ht,ae as Kc,af as e0,ag as mi,ah as W0,b as So,ba as It,bb as V1,bc as Hr,bd as ot,be as Fb,bf as yu,bg as b0,bh as Fu,c as u1,ca as oe,cb as un,cc as Bt,cd as Eb,ce as ji,cf as t0,cg as xr,ch as wn,d as Bp,da as Ge,db as Br,dc as sb,dd as bn,de as Zc,df as vu,dg as ku,dh as Tn,e as Bi,ea as Jn,eb as zr,ec as Pc,ed as yb,ee as Ul,ef as o0,eg as x0,eh as so,f as zi,fa as Fi,fb as Y1,fc as Gi,fd as vb,fe as uu,ff as ed,fg as cd,fh as er,g as zp,ga as xc,gb as io,gc as cb,gd as li,ge as hu,gf as td,gg as Su,gh as ca,h as dc,ha as Yp,hb as Sc,hc as hn,hd as lu,he as Wr,hf as r0,hg as Er,hh as pd,i as Fp,ia as Ec,ib as Fr,ic as Nl,id as wb,ie as En,if as n0,ig as E0,ih as Hu,j as Hp,ja as Kp,jb as K1,jc as ut,jd as su,je as gu,jf as i0,jg as y0,jh as $l,k as h1,ka as Ml,kb as Z1,kc as gn,kd as cu,ke as fu,kf as a0,kg as yr,kh as ud,l as Up,la as A1,lb as X1,lc as db,ld as Ol,le as Xc,lf as hr,lg as na,lh as Uu,m as L,ma as _1,mb as eu,mc as Xe,md as Tb,me as Z,mf as Gl,mg as v0,mh as ST,n as g1,na as Zp,nb as Qn,nc as mb,nd as Ib,ne as TT,nf as Wl,ng as Mu,nh as V0,o as Ue,oa as Ll,ob as tu,oc as Dc,od as Bl,oe as IT,of as Vl,og as pi,oh as Y0,p as cn,pa as he,pb as $1,pc as $o,pd as Cb,pe as CT,pf as Yl,pg as w0,ph as K0,q as vl,qa as P1,qb as j1,qc as Wi,qd as kb,qe as Hb,qf as Kl,qg as ia,qh as hd,r as Gp,ra as yc,rb as ue,rc as Ve,rd as Gt,re as gt,rf as ea,rg as Lu,rh as gd,s as f1,sa as dn,sb as T,sc as pb,sd as Sb,se as $c,sf as gr,sg as T0,sh as fd,t as b1,ta as D1,tb as Mc,tc as ub,td as Mb,te as Jo,tf as od,tg as I0,th as bd,u as mc,ua as R1,ub as ei,uc as iu,ud as Lb,ue as si,uf as l0,ug as C0,uh as jl,v as bo,va as N1,vb as ou,vc as Rc,vd as zl,ve as Ub,vf as Mt,vg as k0,vh as Z0,w as wl,wa as O1,wb as Ui,wc as Ao,wd as Ab,we as qi,wf as rd,wg as S0,wh as X0,x as Tl,xa as B1,xb as Pl,xc as ni,xd as _b,xe as Ye,xf as di,xg as Au,xh as $0,y as x1,ya as Hi,yb as Ot,yc as jo,yd as wT,ye as Gb,yf as Me,yg as _u,yh as xd,z as pc,za as Xp,zb as ru,zc as qo,zd as Pb,ze as Wb,zf as nd,zg as M0,zh as da}from"./chunk-B42KGT6Z.js";import{a as C}from"./chunk-OVC72EOF.js";import{K as zu}from"./chunk-2KZFBCBN.js";import{c as H0}from"./chunk-AJI3LATG.js";import{b as m1,c as p1,d as k}from"./chunk-SRAX5OIU.js";import YA,{useEffect as KA}from"react";import tT from"clsx";import xA from"lodash.throttle";import Nr,{useContext as Zn}from"react";import{flushSync as Yo}from"react-dom";import EA from"roughjs/bin/rough";import{nanoid as yA}from"nanoid";import{atom as Le,createStore as LT}from"jotai";import{createIsolation as AT}from"jotai-scope";var sx=AT();var{useAtom:Ee,useSetAtom:In,useAtomValue:wd,useStore:JA}=sx,cx=sx.Provider,xt=LT();var _T=m1({"./locales/ar-SA.json":()=>import("./locales/ar-SA-IYHKZRSE.js"),"./locales/az-AZ.json":()=>import("./locales/az-AZ-WL5GYRHK.js"),"./locales/bg-BG.json":()=>import("./locales/bg-BG-FXZYTRPD.js"),"./locales/bn-BD.json":()=>import("./locales/bn-BD-KO6YL5G2.js"),"./locales/bn-IN.json":()=>import("./locales/bn-IN-PC6JHKYB.js"),"./locales/ca-ES.json":()=>import("./locales/ca-ES-AREX5NEO.js"),"./locales/cs-CZ.json":()=>import("./locales/cs-CZ-HXAZMFYH.js"),"./locales/da-DK.json":()=>import("./locales/da-DK-5X7ZLFU3.js"),"./locales/de-CH.json":()=>import("./locales/de-CH-76ZNVSOF.js"),"./locales/de-DE.json":()=>import("./locales/de-DE-G3JVZ4MQ.js"),"./locales/el-GR.json":()=>import("./locales/el-GR-4AZTZGY6.js"),"./locales/en.json":()=>import("./locales/en-7B5CVO5K.js"),"./locales/es-ES.json":()=>import("./locales/es-ES-ART7BI3G.js"),"./locales/eu-ES.json":()=>import("./locales/eu-ES-BIF4XBMT.js"),"./locales/fa-IR.json":()=>import("./locales/fa-IR-D4HHKAAI.js"),"./locales/fi-FI.json":()=>import("./locales/fi-FI-O35ZY7UI.js"),"./locales/fr-FR.json":()=>import("./locales/fr-FR-XEFNCM4I.js"),"./locales/gl-ES.json":()=>import("./locales/gl-ES-U4NYM3X5.js"),"./locales/he-IL.json":()=>import("./locales/he-IL-656ABAVQ.js"),"./locales/hi-IN.json":()=>import("./locales/hi-IN-Z55GAFFR.js"),"./locales/hu-HU.json":()=>import("./locales/hu-HU-UJ62DVIW.js"),"./locales/id-ID.json":()=>import("./locales/id-ID-FLZFU3OO.js"),"./locales/it-IT.json":()=>import("./locales/it-IT-GIGIGIBJ.js"),"./locales/ja-JP.json":()=>import("./locales/ja-JP-43VXGDWI.js"),"./locales/kaa.json":()=>import("./locales/kaa-L3IMSDYL.js"),"./locales/kab-KAB.json":()=>import("./locales/kab-KAB-XKPWJLNL.js"),"./locales/kk-KZ.json":()=>import("./locales/kk-KZ-SXPDDY2H.js"),"./locales/km-KH.json":()=>import("./locales/km-KH-DOS4CPGC.js"),"./locales/ko-KR.json":()=>import("./locales/ko-KR-BGC6VCY4.js"),"./locales/ku-TR.json":()=>import("./locales/ku-TR-J7IUITIA.js"),"./locales/lt-LT.json":()=>import("./locales/lt-LT-AC3LV5KG.js"),"./locales/lv-LV.json":()=>import("./locales/lv-LV-I6AY7QG2.js"),"./locales/mr-IN.json":()=>import("./locales/mr-IN-5SP4HV5B.js"),"./locales/my-MM.json":()=>import("./locales/my-MM-S7ECRBYZ.js"),"./locales/nb-NO.json":()=>import("./locales/nb-NO-6PNHTF4R.js"),"./locales/nl-NL.json":()=>import("./locales/nl-NL-R4C4SUIG.js"),"./locales/nn-NO.json":()=>import("./locales/nn-NO-3TFXTM7Y.js"),"./locales/oc-FR.json":()=>import("./locales/oc-FR-IK6GIE7H.js"),"./locales/pa-IN.json":()=>import("./locales/pa-IN-YAKHYJET.js"),"./locales/percentages.json":()=>import("./locales/percentages-OL6W367U.js"),"./locales/pl-PL.json":()=>import("./locales/pl-PL-BIY22ZWU.js"),"./locales/pt-BR.json":()=>import("./locales/pt-BR-Q23NUPD6.js"),"./locales/pt-PT.json":()=>import("./locales/pt-PT-LOPEJLPJ.js"),"./locales/ro-RO.json":()=>import("./locales/ro-RO-W3D2ZATV.js"),"./locales/ru-RU.json":()=>import("./locales/ru-RU-DCTW7QSH.js"),"./locales/si-LK.json":()=>import("./locales/si-LK-FYRRHO3C.js"),"./locales/sk-SK.json":()=>import("./locales/sk-SK-MC7UOHQO.js"),"./locales/sl-SI.json":()=>import("./locales/sl-SI-L6B6HFY5.js"),"./locales/sv-SE.json":()=>import("./locales/sv-SE-KMY6L2BA.js"),"./locales/ta-IN.json":()=>import("./locales/ta-IN-ZQCYE2JK.js"),"./locales/th-TH.json":()=>import("./locales/th-TH-WS7ECBAV.js"),"./locales/tr-TR.json":()=>import("./locales/tr-TR-S5FI7JRW.js"),"./locales/uk-UA.json":()=>import("./locales/uk-UA-4EZUWUSQ.js"),"./locales/uz-UZ.json":()=>import("./locales/uz-UZ-OKHL6AFA.js"),"./locales/vi-VN.json":()=>import("./locales/vi-VN-K34TWHF7.js"),"./locales/zh-CN.json":()=>import("./locales/zh-CN-JE4UZWNO.js"),"./locales/zh-HK.json":()=>import("./locales/zh-HK-RM35YDXX.js"),"./locales/zh-TW.json":()=>import("./locales/zh-TW-ONGLV6Y5.js")});var PT=85,wr={code:"en",label:"English"},ua=[wr,...[{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=>H0[e.code]>=PT).sort((e,o)=>e.label>o.label?1:-1)],Id="__test__";Bt()&&ua.unshift({code:Id,label:"test language"},{code:`${Id}.rtl`,label:"\u202Atest language (rtl)\u202C",rtl:!0});var pa=wr,Td={},Cd=async e=>{if(pa=e,document.documentElement.dir=pa.rtl?"rtl":"ltr",document.documentElement.lang=pa.code,e.code.startsWith(Id))Td={};else try{Td=await _T(`./locales/${pa.code}.json`)}catch(o){console.error(`Failed to load language ${e.code}:`,o.message),Td=zu}xt.set(mx,e.code)},Kr=()=>pa,dx=(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(pa.code.startsWith(Id))return`\u202A[[${o?`${e}(${JSON.stringify(o).slice(1,-1)})`:e}]]\u202C`;let r=e.split("."),n=dx(Td,r)||dx(zu,r)||t;if(n===void 0){let i=`Can't find translation for ${e}`;if(C.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},mx=Le(wr.code),it=()=>{let e=wd(mx);return{t:g,langCode:e}};import DT from"clsx";import RT from"open-color";import zt from"react";import{Fragment as Oe,jsx as u,jsxs as B}from"react/jsx-runtime";var tr=e=>"var(--icon-fill-color)",px=e=>e===oe.LIGHT?RT.white:"#1e1e1e",A=(e,o=512)=>{let{width:t=512,height:r=t,mirror:n,style:i,...a}=typeof o=="number"?{width:o}:o;return u("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${t} ${r}`,className:DT({"rtl-mirror":n}),style:i,...a,children:typeof e=="string"?u("path",{fill:"currentColor",d:e}):e})},G={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},me={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},h7=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("rect",{x:3,y:8,width:18,height:4,rx:1}),u("line",{x1:12,y1:8,x2:12,y2:21}),u("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),u("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"})]}),G),kd=A(B("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),u("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),u("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),u("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),u("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),G),ux=A(B("svg",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),u("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),G),hx=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("circle",{cx:"12",cy:"12",r:"1"}),u("circle",{cx:"12",cy:"19",r:"1"}),u("circle",{cx:"12",cy:"5",r:"1"})]}),G),gx=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),u("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),u("path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]}),G),fx=A(B("svg",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),u("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),u("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),G),Zu=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M6.5 9.5l3.5 -3"}),u("path",{d:"M14 5.5l3 1.5"}),u("path",{d:"M18.5 10l-2.5 7"}),u("path",{d:"M13.5 17.5l-7 -5"})]}),G),gi=A(B("g",{children:[u("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"}),u("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"}),u("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:u("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"})}),u("g",{mask:"url(#UnlockedIcon)",children:u("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"})})]}),me),ha=A(B("g",{strokeWidth:"1.25",children:[u("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"}),u("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),u("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"})]}),me),bx=A(u("g",{fill:"currentColor",children:u("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}),xx=A(B(Oe,{children:[u("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"}),u("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),u("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"}),Ex=A(B(Oe,{children:[u("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"}),u("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),u("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"}),yx=A(B(Oe,{children:[u("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"}),u("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),u("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"}),g7=A(u("g",{fill:"currentColor",children:u("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"}),fi=A(B("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),Cn=A(B("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,children:[u("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"}),u("path",{d:"M5 15m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M5 17c0 1.42 .316 2.805 1 4"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),ga=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),G),fa=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"})]}),G),ba=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("circle",{cx:"12",cy:"12",r:"9"})]}),G),Sd=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),u("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),u("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),G),xa=A(u("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),me),vx=A(B("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),u("path",{d:"M16 7h4"}),u("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),G),Tr=A(B("g",{strokeWidth:"1.25",children:[u("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"}),u("path",{d:"m11.25 5.417 3.333 3.333"})]}),me),Ir=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),u("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),u("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),u("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),u("polyline",{points:"5 20 11 4 13 4 20 20"})]}),G),wx=A(B("g",{stroke:"currentColor",strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 7v-2h13v2"}),u("path",{d:"M10 5v14"}),u("path",{d:"M12 19h-4"}),u("path",{d:"M15 13v-1h6v1"}),u("path",{d:"M18 12v7"}),u("path",{d:"M17 19h2"})]}),G),Ea=A(B("g",{strokeWidth:"1.25",children:[u("path",{d:"M12.5 6.667h.01"}),u("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"}),u("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),u("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),me),Md=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M18 13.3l-6.3 -6.3"})]}),G),Xu=A(u("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),me),$u=A(u("path",{d:"M5 10h10",strokeWidth:"1.25"}),me),Tx=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M21 21l-6 -6"}),u("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"}),u("path",{d:"M3 4v4h4"})]}),G),vo=A(u("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"}),me),ya=A(B("g",{strokeWidth:"1.5",children:[u("polyline",{points:"12 16 18 10 12 4"}),u("polyline",{points:"8 4 2 10 8 16"})]}),me),Ql=A(B("g",{strokeWidth:"1.25",children:[u("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"}),u("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"})]}),me),es=A(u("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"}),me),ts=A(u("g",{stroke:"currentColor",strokeLinejoin:"round",children:u("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"})}),{...me,strokeWidth:1.5}),Ix=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),u("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),u("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),G),bi=A(u("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"}),me),va=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("circle",{cx:"12",cy:"12",r:"9"}),u("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),u("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),G),Cx=A(B("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("circle",{cx:"12",cy:"12",r:"9"}),u("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),u("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),G),kx=A(u("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",children:u("path",{d:"M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z"})}),G),Sx=A(u("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",children:u("path",{d:"m644-428-58-58q9-47-27-88t-93-32l-58-58q17-8 34.5-12t37.5-4q75 0 127.5 52.5T660-500q0 20-4 37.5T644-428Zm128 126-58-56q38-29 67.5-63.5T832-500q-50-101-143.5-160.5T480-720q-29 0-57 4t-55 12l-62-62q41-17 84-25.5t90-8.5q151 0 269 83.5T920-500q-23 59-60.5 109.5T772-302Zm20 246L624-222q-35 11-70.5 16.5T480-200q-151 0-269-83.5T40-500q21-53 53-98.5t73-81.5L56-792l56-56 736 736-56 56ZM222-624q-29 26-53 57t-41 67q50 101 143.5 160.5T480-280q20 0 39-2.5t39-5.5l-36-38q-11 3-21 4.5t-21 1.5q-75 0-127.5-52.5T300-500q0-11 1.5-21t4.5-21l-84-82Zm319 93Zm-151 75Z"})}),G),ju=A(u("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"}),me),Ld=A(u("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"}),me),Mx=A(B("g",{strokeWidth:"1.25",children:[u("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"}),u("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"})]}),me),Lx=A(B("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 4l11.733 16h4.267l-11.733 -16z"}),u("path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"})]}),G),Ax=A(u("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),os=A(B("g",{strokeWidth:"1.25",children:[u("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"}),u("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"})]}),me),_x=A("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}),Px=A("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}),wa=A(u("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"}),me),f7=A("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}),b7=A("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"),Ad=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z"}),u("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"}),u("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"})]}),G),Dx=A(u("g",{strokeWidth:1.5,children:u("path",{d:"M6 18l12 -12"})}),G),_d=A(B("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M15 8h.01"}),u("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),u("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),u("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),u("path",{d:"M19 16v6"}),u("path",{d:"M22 19l-3 3l-3 -3"})]}),G),Rx=A("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}),x7=A("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}),E7=A("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}),Nx=A("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"),y7=A("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"),qu=A(u("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"}),me),Ju=A(u("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"}),me),Ox=A("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}),Bx=A(u("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"}),me),v7=A("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"),w7=A("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}),T7=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M12 14v-11"}),u("path",{d:"M9 6l3 -3l3 3"})]}),G),I7=A(B(Oe,{children:[u("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"}),u("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}),C7=A(u("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}),zx=B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 10l0 10"}),u("path",{d:"M12 10l4 4"}),u("path",{d:"M12 10l-4 4"}),u("path",{d:"M4 4l16 0"})]}),Fx=B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 5l0 14"}),u("path",{d:"M16 9l-4 -4"}),u("path",{d:"M8 9l4 -4"})]}),Qu=A(Fx,G),eh=A(Fx,{...G,style:{transform:"rotate(180deg)"}}),th=A(zx,G),oh=A(zx,{...G,style:{transform:"rotate(180deg)"}}),rh=A(B(Oe,{children:[B("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("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"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),nh=A(B(Oe,{children:[B("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("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"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),ih=A(B(Oe,{children:[B("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("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"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),ah=A(B(Oe,{children:[B("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("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"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),Hx=A(B(Oe,{children:[B("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("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"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),Ux=A(B(Oe,{children:[B("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("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"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),lh=A(B("g",{stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),u("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),u("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"})]}),me),sh=A(B("g",{stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),u("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),u("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"})]}),me),Pd=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("circle",{cx:"9",cy:"7",r:"4"}),u("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),u("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),u("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),G),k7=A("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"),S7=A("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"),Ro=A(B(Oe,{children:[u("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:u("path",{d:"M15 5 5 15M5 5l10 10"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),M7=A("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}),L7=A("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}),A7=A("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}),ch=zt.memo(({theme:e})=>A(B(Oe,{children:[u("path",{d:"M25 26H111V111H25",fill:tr(e)}),u("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:tr(e),strokeWidth:"2"}),u("path",{d:"M100 100H160V160H100",fill:tr(e)}),u("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:tr(e),strokeWidth:"2"}),B("g",{fill:px(e),stroke:tr(e),strokeWidth:"6",children:[u("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),u("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),u("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),u("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),dh=zt.memo(({theme:e})=>A(B(Oe,{children:[u("path",{d:"M25 26H111V111H25",fill:tr(e)}),u("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:tr(e),strokeWidth:"2"}),u("path",{d:"M100 100H160V160H100",fill:tr(e)}),u("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:tr(e),strokeWidth:"2"}),B("g",{fill:px(e),stroke:tr(e),strokeWidth:"6",children:[u("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),u("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),u("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),u("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),u("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),u("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),Gx=A(u("g",{strokeWidth:1.25,children:u("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"})}),me),Wx=A(B(Oe,{children:[u("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"}),u("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:u("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"})}),u("g",{mask:"url(#FillHachureIcon)",children:u("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"})})]}),me),Vx=A(B(Oe,{children:[B("g",{clipPath:"url(#a)",children:[u("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"}),u("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:u("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"})}),u("g",{mask:"url(#FillCrossHatchIcon)",children:u("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"})})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),Yx=A(B(Oe,{children:[u("g",{clipPath:"url(#a)",children:u("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"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),{...me,fill:"currentColor"}),mh=A(u(Oe,{children:u("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),me),Kx=A(u("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),me),Zx=A(u("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),me),_7=zt.memo(({theme:e})=>A(u("path",{d:"M6 10H34",stroke:tr(e),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})),Xx=A(B("g",{strokeWidth:"2",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 12h2"}),u("path",{d:"M17 12h2"}),u("path",{d:"M11 12h2"})]}),G),$x=A(B("g",{strokeWidth:"2",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 12v.01"}),u("path",{d:"M8 12v.01"}),u("path",{d:"M12 12v.01"}),u("path",{d:"M16 12v.01"}),u("path",{d:"M20 12v.01"})]}),G),jx=A(u("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"}),me),qx=A(u("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"}),me),Jx=A(u("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"}),me),Qx=A(B("svg",{strokeWidth:"1.5",children:[u("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"}),u("path",{d:"M13.3333 3.33331V3.34331"}),u("path",{d:"M16.6667 3.33331V3.34331"}),u("path",{d:"M16.6667 6.66669V6.67669"}),u("path",{d:"M16.6667 10V10.01"}),u("path",{d:"M3.33334 13.3333V13.3433"}),u("path",{d:"M16.6667 13.3333V13.3433"}),u("path",{d:"M3.33334 16.6667V16.6767"}),u("path",{d:"M6.66666 16.6667V16.6767"}),u("path",{d:"M10 16.6667V16.6767"}),u("path",{d:"M13.3333 16.6667V16.6767"}),u("path",{d:"M16.6667 16.6667V16.6767"})]}),me),eE=A(B("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),u("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),u("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),u("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),u("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),u("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),u("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),u("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),u("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),u("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),u("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),u("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),G),tE=A(B("g",{stroke:"currentColor",opacity:.3,strokeWidth:2,children:[u("path",{d:"M12 12l9 0"}),u("path",{d:"M3 9l6 6"}),u("path",{d:"M3 15l6 -6"})]}),G),oE=zt.memo(({flip:e=!1})=>A(B("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[u("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),u("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})),rE=zt.memo(({flip:e=!1})=>A(B("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[u("path",{d:"M32 10L6 10",strokeWidth:2}),u("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),nE=zt.memo(({flip:e=!1})=>A(B("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[u("path",{d:"M26 10L6 10"}),u("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),iE=zt.memo(({flip:e=!1})=>A(u("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",children:u("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})),aE=zt.memo(({flip:e=!1})=>A(B("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[u("path",{d:"M32 10L6 10",strokeWidth:2}),u("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})),lE=zt.memo(({flip:e=!1})=>A(B("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",children:[u("path",{d:"M6,9.5H27"}),u("path",{d:"M27,5L34,10L27,14Z",fill:"none"})]}),{width:40,height:20})),sE=zt.memo(({flip:e=!1})=>A(B("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[u("path",{d:"M6,9.5H20"}),u("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),cE=zt.memo(({flip:e=!1})=>A(B("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[u("path",{d:"M6,9.5H20"}),u("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),dE=zt.memo(({flip:e=!1})=>A(u("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:u("path",{d:"M34,10 H6 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),mE=zt.memo(({flip:e=!1})=>A(u("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:u("path",{d:"M34,10 H6 M15,10 L15,15 L15,5"})}),{width:40,height:20})),pE=zt.memo(({flip:e=!1})=>A(u("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:u("path",{d:"M34,10 H6 M15,10 L15,16 L15,4 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),uE=A(B(Oe,{children:[u("g",{clipPath:"url(#a)",children:u("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"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),hE=A(B(Oe,{children:[u("g",{clipPath:"url(#a)",children:u("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),gE=A(B(Oe,{children:[u("g",{clipPath:"url(#a)",children:u("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),fE=A(u(Oe,{children:u("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"})}),me),xi=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 7v-2h13v2"}),u("path",{d:"M10 5v14"}),u("path",{d:"M12 19h-4"}),u("path",{d:"M15 13v-1h6v1"}),u("path",{d:"M18 12v7"}),u("path",{d:"M17 19h2"})]}),G),bE=A(u(Oe,{children:B("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M7 12h10"}),u("path",{d:"M7 5v14"}),u("path",{d:"M17 5v14"}),u("path",{d:"M15 19h4"}),u("path",{d:"M15 5h4"}),u("path",{d:"M5 19h4"}),u("path",{d:"M5 5h4"})]})}),G),rs=A(u(Oe,{children:u("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:u("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"})})}),me),Dd=A(B(Oe,{children:[u("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:u("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"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),xE=A(B("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),u("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),u("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),G),EE=A(B("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),u("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),u("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),G),yE=A(B("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),u("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),u("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),G),vE=zt.memo(({theme:e})=>A(B("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),u("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),G)),wE=zt.memo(({theme:e})=>A(B("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),u("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),G)),TE=zt.memo(({theme:e})=>A(B("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),u("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),u("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),G)),Rd=A(B("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M21 19h-18l9 -15"}),u("path",{d:"M20.615 15.171h.015"}),u("path",{d:"M19.515 11.771h.015"}),u("path",{d:"M17.715 8.671h.015"}),u("path",{d:"M15.415 5.971h.015"})]}),G),IE=A(u("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}),P7=A(u("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"})),Nd=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),u("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),u("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),u("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"})]}),G),ph=A(B(Oe,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),u("path",{d:"M7 11l5 5l5 -5"}),u("path",{d:"M12 4l0 12"})]}),G),Ta=A(B(Oe,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]}),G),CE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),u("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),u("path",{d:"M9.15 14.85l8.85 -10.85"}),u("path",{d:"M6 4l8.85 10.85"})]}),G),kE=A(B(Oe,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),u("path",{d:"M12 17l0 .01"}),u("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),G),D7=A(B(Oe,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M7 4v16l13 -8z"})]}),G),R7=A(B(Oe,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"})]}),G),SE=A(B(Oe,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 12l5 5l10 -10"})]}),G),ME=A(B(Oe,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M12 9v4"}),u("path",{d:"M12 17h.01"})]}),G),LE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M11 7l6 6"}),u("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"})]}),G),ns=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 3l-4 7h8z"}),u("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),u("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"})]}),G),or=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 7l16 0"}),u("path",{d:"M4 17l16 0"}),u("path",{d:"M7 4l0 16"}),u("path",{d:"M17 4l0 16"})]}),G),Ia=A(u("path",{fill:"currentColor",d:"M407.48,111.18C335.587,108.103 269.573,152.338 245.08,220C220.587,152.338 154.573,108.103 82.68,111.18C80.285,168.229 107.577,222.632 154.74,254.82C178.908,271.419 193.35,298.951 193.27,328.27L193.27,379.13L296.9,379.13L296.9,328.27C296.816,298.953 311.255,271.42 335.42,254.82C382.596,222.644 409.892,168.233 407.48,111.18Z"})),Ca=A(B("g",{strokeWidth:"1.25",children:[u("path",{d:"M4.16602 10H15.8327"}),u("path",{d:"M12.5 13.3333L15.8333 10"}),u("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),me),kn=A(B("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[u("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"}),u("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),Ei=A(B("g",{stroke:"currentColor",fill:"none",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z"}),u("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),u("path",{d:"M15 6l3 3"}),u("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"}),u("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"})]}),G),N7=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z"}),u("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),u("path",{d:"M15 6l3 3"}),u("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"}),u("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"})]}),G),O7=A(B("g",{stroke:"currentColor",fill:"none",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35"}),u("path",{d:"M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946"}),u("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"}),u("path",{d:"M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45"}),u("path",{d:"M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946"}),u("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"})]}),G),AE=A(B("g",{stroke:"currentColor",fill:"none",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),u("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),u("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),u("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"})]}),G),ka=A(B("g",{stroke:"currentColor",fill:"none",strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"}),u("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"})]}),G),_E=A(B("g",{stroke:"currentColor",fill:"none",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"}),u("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"}),u("path",{d:"M3 3l18 18"})]}),G),PE=A(B("g",{stroke:"currentColor",fill:"none",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("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"}),u("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),u("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),u("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),u("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),G),DE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("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"}),u("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),u("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),u("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),u("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),G),wo=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),u("path",{d:"M21 21l-6 -6"})]}),G),RE=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M20.984 12.53a9 9 0 1 0 -7.552 8.355"}),u("path",{d:"M12 7v5l3 3"}),u("path",{d:"M19 16l-2 3h4l-2 3"})]}),G),NE=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M5 10a7 7 0 0 0 14 0"}),u("path",{d:"M8 21l8 0"}),u("path",{d:"M12 17l0 4"})]}),G),OE=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 3l18 18"}),u("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"}),u("path",{d:"M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85"}),u("path",{d:"M8 21l8 0"}),u("path",{d:"M12 17l0 4"})]}),G),is=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"})]}),G),BE=A(B("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M12 20v.01"}),u("path",{d:"M16 20v.01"}),u("path",{d:"M8 20v.01"}),u("path",{d:"M4 20v.01"}),u("path",{d:"M4 16v.01"}),u("path",{d:"M4 12v.01"}),u("path",{d:"M4 8v.01"}),u("path",{d:"M4 4v.01"}),u("path",{d:"M8 4v.01"}),u("path",{d:"M12 4v.01"}),u("path",{d:"M16 4v.01"}),u("path",{d:"M20 4v.01"}),u("path",{d:"M20 8v.01"}),u("path",{d:"M20 12v.01"}),u("path",{d:"M20 16v.01"}),u("path",{d:"M20 20v.01"})]}),G),zE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 3v18"}),u("path",{d:"M19 21v-18"}),u("path",{d:"M5 7h14"}),u("path",{d:"M5 15h14"}),u("path",{d:"M8 13v4"}),u("path",{d:"M11 13v4"}),u("path",{d:"M16 13v4"}),u("path",{d:"M14 5v4"}),u("path",{d:"M11 5v4"}),u("path",{d:"M8 5v4"}),u("path",{d:"M3 21h18"})]}),G),FE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 12l18 0"}),u("path",{d:"M7 16l10 0l-10 5l0 -5"}),u("path",{d:"M7 8l10 0l-10 -5l0 5"})]}),G),HE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 3l0 18"}),u("path",{d:"M16 7l0 10l5 0l-5 -10"}),u("path",{d:"M8 7l0 10l-5 0l5 -10"})]}),G),uh=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"}),u("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"})]}),G),Od=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"}),u("path",{d:"M22 22l-3 -3"}),u("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),u("path",{d:"M3 11v-1"}),u("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),u("path",{d:"M10 3h1"}),u("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"})]}),G),UE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),u("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),u("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"}),u("path",{d:"M10 15l2 6l2 -6"}),u("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"})]}),G),GE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),u("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),u("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"}),u("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"}),u("path",{d:"M11 21v-6l3 6v-6"})]}),G),WE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M4 8l5 0"}),u("path",{d:"M15 8l4 0"})]}),G),VE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),u("path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),u("path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z"}),u("path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555"})]}),G),YE=A(B("g",{stroke:"currentColor",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"})]}),{...G,strokeWidth:1.5}),B7=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M21 12h-13l3 -3"}),u("path",{d:"M11 15l-3 -3"})]}),G),KE=A(B("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M10 9l5 3l-5 3z"})]}),G),ZE=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 6h18"}),u("path",{d:"M3 12h18"}),u("path",{d:"M3 18h18"}),u("path",{d:"M6 3v18"}),u("path",{d:"M12 3v18"}),u("path",{d:"M18 3v18"})]}),G),XE=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("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"}),u("path",{d:"M17 5c-6.627 0 -12 5.373 -12 12"})]}),G),Sa=A(B("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 18l12 -12"}),u("path",{d:"M18 10v-4h-4"})]}),G),Ma=A(B("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4,19L10,19C11.097,19 12,18.097 12,17L12,9C12,7.903 12.903,7 14,7L21,7"}),u("path",{d:"M18 4l3 3l-3 3"})]}),G),La=A(B("g",{children:[u("path",{d:"M16,12L20,9L16,6"}),u("path",{d:"M6 20c0 -6.075 4.925 -11 11 -11h3"})]}),G),Bd=A(B("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 9l6 6l6 -6"})]}),G),$E=A(B("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 15l6 -6l6 6"})]}),G),jE=A(B("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 15l6 -6l6 6"})]}),G),hh=A(B("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"}),u("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"})]}),G),zd=A(B("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M19 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M5 7l0 10"}),u("path",{d:"M7 5l10 0"}),u("path",{d:"M7 19l10 0"}),u("path",{d:"M19 7l0 10"})]}),G),z7=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 11v8a1 1 0 0 0 1 1h8m-9 -14v-1a1 1 0 0 1 1 -1h1m5 0h2m5 0h1a1 1 0 0 1 1 1v1m0 5v2m0 5v1a1 1 0 0 1 -1 1h-1"}),u("path",{d:"M4 12h7a1 1 0 0 1 1 1v7"})]}),G),qE=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M14 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M4 6l8 0"}),u("path",{d:"M16 6l4 0"}),u("path",{d:"M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M4 12l2 0"}),u("path",{d:"M10 12l10 0"}),u("path",{d:"M17 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M4 18l11 0"}),u("path",{d:"M19 18l1 0"})]}),G),JE=A(B("g",{strokeWidth:1,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 10l4 -4 L6 14l8 -8 L6 18l12 -12 L10 18l8 -8 L14 18l4 -4"})]}),G),QE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4"}),u("path",{d:"M13.5 6.5l4 4"})]}),G),F7=A(B("g",{strokeWidth:1,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M11 7l-5 5l5 5"}),u("path",{d:"M17 7l-5 5l5 5"})]}),G),ey=A(B("g",{strokeWidth:"1.75",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"}),u("path",{d:"M15 4l0 16"})]}),G),H7=A(B("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 20l1.3 -3.9c-2.324 -3.437 -1.426 -7.872 2.1 -10.374c3.526 -2.501 8.59 -2.296 11.845 .48c3.255 2.777 3.695 7.266 1.029 10.501c-2.666 3.235 -7.615 4.215 -11.574 2.293l-4.7 1"})]}),G),U7=A(B("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 4l18 0"}),u("path",{d:"M4 4v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-10"}),u("path",{d:"M12 16l0 4"}),u("path",{d:"M9 20l6 0"}),u("path",{d:"M8 12l3 -3l2 2l3 -3"})]}),G);import ty from"clsx";import fh,{useEffect as BT,useRef as oy,useState as zT}from"react";import NT from"react";import{jsx as gh}from"react/jsx-runtime";var OT=({size:e="1em",circleWidth:o=8,synchronized:t=!1,className:r=""})=>{let i=-(NT.useRef(Date.now()).current%1600);return gh("div",{className:`Spinner ${r}`,children:gh("svg",{viewBox:"0 0 100 100",style:{width:e,height:e,"--spinner-delay":t?`${i}ms`:0},children:gh("circle",{cx:"50",cy:"50",r:50-o/2,strokeWidth:o,fill:"none",strokeMiterlimit:"10"})})})},Ft=OT;import{jsx as as,jsxs as ls}from"react/jsx-runtime";var j=fh.forwardRef(({size:e="medium",visible:o=!0,className:t="",...r},n)=>{let{id:i}=$e(),a=fh.useRef(null);fh.useImperativeHandle(n,()=>a.current);let l=`ToolIcon_size_${e}`,[s,c]=zT(!1),m=oy(!0),d=async h=>{let b="onClick"in r&&r.onClick?.(h);if(hn(b))try{c(!0),await b}catch(f){if(f instanceof sa)console.warn(f);else throw f}finally{m.current&&c(!1)}};BT(()=>(m.current=!0,()=>{m.current=!1}),[]);let p=oy(null);if(r.type==="button"||r.type==="icon"||r.type==="submit"){let h=r.type==="icon"?"button":r.type;return ls("button",{className:ty("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:h,onClick:d,ref:a,disabled:s||r.isLoading||!!r.disabled,children:[(r.icon||r.label)&&ls("div",{className:"ToolIcon__icon","aria-hidden":"true","aria-disabled":!!r.disabled,children:[r.icon||r.label,r.keyBindingLabel&&as("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel}),r.isLoading&&as(Ft,{})]}),r.showAriaLabel&&ls("div",{className:"ToolIcon__label",children:[r["aria-label"]," ",s&&as(Ft,{})]}),r.children]})}return ls("label",{className:ty("ToolIcon",t),title:r.title,onPointerDown:h=>{p.current=h.pointerType||null,r.onPointerDown?.({pointerType:h.pointerType||null})},onPointerUp:()=>{requestAnimationFrame(()=>{p.current=null})},children:[as("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}),ls("div",{className:"ToolIcon__icon",children:[r.icon,r.keyBindingLabel&&as("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel})]})]})});j.displayName="ToolButton";var Fd=[],U=e=>(Fd=Fd.concat(e),e);import{jsx as HT}from"react/jsx-runtime";var FT=(e,o,t)=>{let r=new Set(te(e.filter(m=>ne(m)),o).map(m=>m.id)),n={},i=t.scene.getNonDeletedElementsMap(),a=new Set;for(let m of r){let d=Do(e,m);for(let p of d)if(!a.has(p.id)){if(ot(p)){let h=_o(p,i);h&&(n[h.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=ot(m)?_o(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 h=t.scene.getNonDeletedElementsMap().get(p.id);h&&Te(h)&&t.scene.mutateElement(h,{startBinding:m.id===h.startBinding?.elementId?null:h.startBinding,endBinding:m.id===h.endBinding?.elementId?null:h.endBinding})}),ee(m,{isDeleted:!0}))}return m.frameId&&r.has(m.frameId)?(l=!1,ot(m)||(n[m.id]=!0),ee(m,{frameId:null})):ot(m)&&o.selectedElementIds[m.containerId]?ee(m,{isDeleted:!0}):m}),c=o.editingGroupId;if(l&&o.editingGroupId){let m=Ye(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(b=>b===o.editingGroupId),h=d.groupIds[p+1];if(h){let b=Ye(s,h).filter(f=>!f.isDeleted);b.length>1&&(c=h,b.forEach(f=>{n[f.id]=!0}))}}}}return{elements:s,appState:{...o,...gt({selectedElementIds:n,editingGroupId:c},s,o,null)}}},ry=(e,o)=>{if(e.editingGroupId){let t=Ye(Ie(o),e.editingGroupId);if(t.length)return{...e,selectedElementIds:{[t[0].id]:!0}}}return e},ss=U({name:"deleteSelectedElements",label:"labels.delete",icon:vo,trackEvent:{category:"element",action:"delete"},perform:(e,o,t,r)=>{if(o.selectedLinearElement?.isEditing){let{elementId:a,selectedPointsIndices:l}=o.selectedLinearElement,s=r.scene.getNonDeletedElementsMap(),c=Z.getElement(a,s);if(!c||l==null)return!1;if(l.length>=c.points.length){let m=e.map(p=>p.id===c.id?ee(p,{isDeleted:!0}):p),d=ry(o,m);return{elements:m,appState:{...d,selectedLinearElement:null},captureUpdate:_.IMMEDIATELY}}return Z.deletePoints(c,r,l),{elements:e,appState:{...o,selectedLinearElement:{...o.selectedLinearElement,selectedPointsIndices:l?.[0]>0?[l[0]-1]:[0]}},captureUpdate:_.IMMEDIATELY}}let{elements:n,appState:i}=FT(e,o,r);return Xc(n,n.filter(a=>a.isDeleted)),i=ry(i,n),{elements:n,appState:{...i,activeTool:Pe(o,{type:r.state.preferredSelectionTool.type}),multiElement:null,newElement:null,activeEmbeddable:null,selectedLinearElement:null},captureUpdate:ze(Ie(e),o)?_.IMMEDIATELY:_.EVENTUALLY}},keyTest:(e,o,t)=>(e.key===T.BACKSPACE||e.key===T.DELETE)&&!e[T.CTRL_OR_CMD],PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=Lt()==="mobile";return HT(j,{type:"button",icon:vo,title:g("labels.delete"),"aria-label":g("labels.delete"),onClick:()=>t(null),disabled:!ze(Ie(e),o),style:{...n&&o.openPopup!=="compactOtherProperties"?Br:{}}})}});var O=e=>e.replace(/\b(Opt(?:ion)?|Alt)\b/i,io?g("keys.option"):g("keys.alt")).replace(/\bShift\b/i,g("keys.shift")).replace(/\b(Enter|Return)\b/i,g("keys.enter")).replace(/\b(Ctrl|Cmd|Command|CtrlOrCmd)\b/gi,io?g("keys.cmd"):g("keys.ctrl")).replace(/\b(Esc(?:ape)?)\b/i,g("keys.escape")).replace(/\b(Space(?:bar)?)\b/i,g("keys.spacebar")).replace(/\b(Del(?:ete)?)\b/i,g("keys.delete"));import{jsx as Hd}from"react/jsx-runtime";var bh=U({name:"sendBackward",label:"labels.sendBackward",keywords:["move down","zindex","layer"],icon:eh,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:O0(e,o,r.scene),appState:o,captureUpdate:_.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[T.CTRL_OR_CMD]&&!e.shiftKey&&e.code===ue.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>Hd("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendBackward")} \u2014 ${O("CtrlOrCmd+[")}`,children:eh})}),xh=U({name:"bringForward",label:"labels.bringForward",keywords:["move up","zindex","layer"],icon:Qu,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:B0(e,o,r.scene),appState:o,captureUpdate:_.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[T.CTRL_OR_CMD]&&!e.shiftKey&&e.code===ue.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>Hd("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.bringForward")} \u2014 ${O("CtrlOrCmd+]")}`,children:Qu})}),Eh=U({name:"sendToBack",label:"labels.sendToBack",keywords:["move down","zindex","layer"],icon:oh,trackEvent:{category:"element"},perform:(e,o)=>({elements:z0(e,o),appState:o,captureUpdate:_.IMMEDIATELY}),keyTest:e=>io?e[T.CTRL_OR_CMD]&&e.altKey&&e.code===ue.BRACKET_LEFT:e[T.CTRL_OR_CMD]&&e.shiftKey&&e.code===ue.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>Hd("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendToBack")} \u2014 ${io?O("CtrlOrCmd+Alt+["):O("CtrlOrCmd+Shift+[")}`,children:oh})}),yh=U({name:"bringToFront",label:"labels.bringToFront",keywords:["move up","zindex","layer"],icon:th,trackEvent:{category:"element"},perform:(e,o)=>({elements:F0(e,o),appState:o,captureUpdate:_.IMMEDIATELY}),keyTest:e=>io?e[T.CTRL_OR_CMD]&&e.altKey&&e.code===ue.BRACKET_RIGHT:e[T.CTRL_OR_CMD]&&e.shiftKey&&e.code===ue.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>Hd("button",{type:"button",className:"zIndexButton",onClick:t=>e(null),title:`${g("labels.bringToFront")} \u2014 ${io?O("CtrlOrCmd+Alt+]"):O("CtrlOrCmd+Shift+]")}`,children:th})});var vh=U({name:"selectAll",label:"labels.selectAll",icon:BE,trackEvent:{category:"canvas"},viewMode:!1,perform:(e,o,t,r)=>{if(o.selectedLinearElement?.isEditing)return!1;let n=e.filter(i=>!i.isDeleted&&!(X(i)&&i.containerId)&&!i.locked).reduce((i,a)=>(i[a.id]=!0,i),{});return{appState:{...o,...gt({editingGroupId:null,selectedElementIds:n},Ie(e),o,r),selectedLinearElement:Object.keys(n).length===1&&be(e[0])?new Z(e[0],re(e)):null},captureUpdate:_.IMMEDIATELY}},keyTest:e=>e[T.CTRL_OR_CMD]&&e.key===T.A});import{jsx as UT}from"react/jsx-runtime";var wh=U({name:"duplicateSelection",label:"labels.duplicateSelection",icon:Ql,trackEvent:{category:"element"},perform:(e,o,t,r)=>{if(o.selectedElementsAreBeingDragged)return!1;if(o.selectedLinearElement?.isEditing)try{let a=Z.duplicateSelectedPoints(o,r.scene);return{elements:e,appState:a,captureUpdate:_.IMMEDIATELY}}catch{return!1}let{duplicatedElements:n,elementsWithDuplicates:i}=vn({type:"in-place",elements:e,idsOfElementsToDuplicate:re(te(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+Zp/2,y:a.y+Zp/2,frameId:s??a.frameId}}});if(r.props.onDuplicate&&i){let a=r.props.onDuplicate(i,e);a&&(i=a)}return{elements:br(i,re(n)),appState:{...o,...Jc(n,Ie(i),o)},captureUpdate:_.IMMEDIATELY}},keyTest:e=>e[T.CTRL_OR_CMD]&&e.key===T.D,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=Lt()==="mobile";return UT(j,{type:"button",icon:Ql,title:`${g("labels.duplicateSelection")} \u2014 ${O("CtrlOrCmd+D")}`,"aria-label":g("labels.duplicateSelection"),onClick:()=>t(null),disabled:!ze(Ie(e),o),style:{...n&&o.openPopup!=="compactOtherProperties"?Br:{}}})}});import{useEffect as Gh,useMemo as E4,useRef as Wh,useState as y4}from"react";var GT=new Set(["command_palette","export"]),pe=(e,o,t,r)=>{try{if(typeof window>"u"||C.VITE_WORKER_ID||C.VITE_APP_ENABLE_TRACKING!=="true"||!GT.has(e)||Bt())return;C.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 KT from"clsx";import WT from"clsx";import{forwardRef as VT}from"react";import{jsx as YT}from"react/jsx-runtime";var Aa=VT((e,o)=>{let{title:t,className:r,testId:n,active:i,standalone:a,icon:l,onClick:s}=e;return YT("button",{type:"button",ref:o,title:t,"data-testid":n,className:WT(r,{standalone:a,active:i}),onClick:s,style:e.style,children:l},t)});import{Fragment as XT,jsx as Th,jsxs as ZT}from"react/jsx-runtime";var No=e=>Th(XT,{children:e.options.map(o=>e.type==="button"?Th(Aa,{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):ZT("label",{className:KT({active:e.value===o.value}),title:o.text,children:[Th("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 Xd from"@radix-ui/react-popover";import yy from"clsx";import{useRef as vy,useEffect as B6}from"react";import{jsx as $T}from"react/jsx-runtime";var Ud=()=>$T("div",{style:{width:1,height:"1rem",backgroundColor:"var(--default-border-color)",margin:"0 auto"}});import{useEffect as QT,useRef as e6}from"react";import{createPortal as t6}from"react-dom";import ny from"react";var Ih=ny.createContext(null),Re=()=>ny.useContext(Ih);import{useState as jT,useLayoutEffect as iy}from"react";var Gd=e=>{let[o,t]=jT(null),r=ve(),{theme:n}=Re(),{container:i}=$e();return iy(()=>{o&&(o.className="",o.classList.add("excalidraw",...e?.className?.split(/\s+/)||[]),o.classList.toggle("excalidraw--mobile",r.formFactor==="phone"),o.classList.toggle("theme--dark",n===oe.DARK))},[o,n,r.formFactor,e?.className]),iy(()=>{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 qT}from"react";function _a(e,o,t){qT(()=>{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 JT}from"react";var Sn=e=>{let o=JT(e);return Object.assign(o.current,e),o.current};import{jsx as o6}from"react/jsx-runtime";var Mn=Le(null),ay=({onCancel:e,onChange:o,onSelect:t,colorPickerType:r})=>{let n=Gd({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),i=Re(),a=Ln(),l=dt(),s=te(a,i),c=Sn({app:l,onCancel:e,onChange:o,onSelect:t,selectedElements:s}),{container:m}=$e();QT(()=>{let p=d.current;if(!p||!l.canvas||!n)return;let h=!1,b=l.canvas.getContext("2d"),f=({clientX:S,clientY:P})=>{let M=b.getImageData((S-i.offsetLeft)*window.devicePixelRatio,(P-i.offsetTop)*window.devicePixelRatio,1,1).data;return k1(M[0],M[1],M[2])},y=({clientX:S,clientY:P,altKey:M})=>{p.style.top=`${P+20}px`,p.style.left=`${S+20}px`;let F=f({clientX:S,clientY:P});h&&c.onChange(r,F,c.selectedElements,{altKey:M}),p.style.background=F},v=()=>{c.onCancel()},x=(S,P)=>{c.onSelect(S,P)},E=S=>{h=!0,S.stopImmediatePropagation()},w=S=>{h=!1,m?.focus(),S.stopImmediatePropagation(),S.preventDefault(),x(f(S),S)},I=S=>{S.key===T.ESCAPE&&(S.preventDefault(),S.stopImmediatePropagation(),v())};return n.tabIndex=-1,n.focus(),y({clientX:c.app.lastViewportPosition.x,clientY:c.app.lastViewportPosition.y,altKey:!1}),n.addEventListener("keydown",I),n.addEventListener("pointerdown",E),n.addEventListener("pointerup",w),window.addEventListener("pointermove",y,{passive:!0}),window.addEventListener("blur",v),()=>{h=!1,n.removeEventListener("keydown",I),n.removeEventListener("pointerdown",E),n.removeEventListener("pointerup",w),window.removeEventListener("pointermove",y),window.removeEventListener("blur",v)}},[c,l.canvas,n,r,m,i.offsetLeft,i.offsetTop]);let d=e6(null);return _a(d,()=>{e()},p=>!!p.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")),n?t6(o6("div",{ref:d,className:"excalidraw-eye-dropper-preview"}),n):null};import*as Pa from"@radix-ui/react-popover";import a6 from"clsx";import l6 from"react";import r6 from"react";import n6 from"clsx";import{jsx as i6}from"react/jsx-runtime";var ft=r6.forwardRef(({children:e,padding:o,className:t,style:r},n)=>i6("div",{className:n6("Island",t),style:{"--padding":o,...r},ref:n,children:e}));import{jsx as Ch,jsxs as s6}from"react/jsx-runtime";var Zr=l6.forwardRef(({className:e,container:o,children:t,style:r,onClose:n,onKeyDown:i,onFocusOutside:a,onPointerLeave:l,onPointerDownOutside:s,preventAutoFocusOnTouch:c=!1},m)=>{let d=ve(),p=d.formFactor==="phone"&&!d.isLandscape;return Ch(Pa.Portal,{container:o,children:s6(Pa.Content,{ref:m,className:a6("focus-visible-none",e),"data-prevent-outside-click":!0,side:p?"bottom":"right",align:p?"center":"start",alignOffset:-16,sideOffset:20,collisionBoundary:o??void 0,style:{zIndex:"var(--zIndex-ui-styles-popup)",marginLeft:d.formFactor==="phone"?"0.5rem":void 0},onPointerLeave:l,onKeyDown:i,onFocusOutside:a,onPointerDownOutside:s,onOpenAutoFocus:h=>{c&&d.isTouchScreen&&h.preventDefault()},onCloseAutoFocus:h=>{h.stopPropagation(),h.preventDefault(),o&&!J1(document.activeElement)&&o.focus(),n()},children:[Ch(ft,{padding:3,style:r,children:t}),Ch(Pa.Arrow,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})});import{useState as c6,useCallback as kh}from"react";var Wd=()=>document.querySelector(".excalidraw-wysiwyg"),Vd=()=>{let e=Wd();return e?{start:e.selectionStart,end:e.selectionEnd}:null},cs=e=>{setTimeout(()=>{let o=Wd();o&&(o.focus(),e&&(o.selectionStart=e.start,o.selectionEnd=e.end))},0)},ds=(e,o,t,r)=>{o&&r&&r();let n=o&&t?Vd():null;e(),o&&t&&cs(n)},ly=()=>{let[e,o]=c6(null),t=kh(()=>{let i=Vd();o(i)},[]),r=kh(()=>{setTimeout(()=>{let i=Wd();i&&(i.focus(),e&&(i.selectionStart=e.start,i.selectionEnd=e.end,o(null)))},0)},[e]),n=kh(()=>{o(null)},[]);return{saveCaretPosition:t,restoreCaretPosition:r,clearSavedPosition:n,hasSavedPosition:!!e}},sy=(e=100)=>{let o=Wd();if(o){let t=o.onblur;o.onblur=null,setTimeout(()=>{o.onblur=t},e)}};import m6 from"clsx";import{useCallback as p6,useEffect as Mh,useRef as dy,useState as u6}from"react";import h6 from"tinycolor2";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},ms=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),Sh=({color:e,palette:o})=>!Object.values(o).flat().includes(e),cy=(e,o,t)=>{let r={elementBackground:"backgroundColor",elementStroke:"strokeColor"},n=e.filter(a=>{if(a.isDeleted)return!1;let l=a[r[o]];return Sh({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,E1)},Oo=Le(null),d6=(e,o,t)=>(e*299+o*587+t*114)/1e3,yi=(e,o=160)=>{if(!e)return!0;if(Eo(e))return!1;let t=x1(e);if(!t.isValid())return!0;let{r,g:n,b:i}=t.toRgb();return d6(r,n,i)<o};import{Fragment as f6,jsx as Yd,jsxs as my}from"react/jsx-runtime";var g6=e=>{if(e=e.trim(),Eo(e))return e;let o=h6(e);return o.isValid()?o.getFormat()==="hex"&&!e.startsWith("#")?`#${e}`:e:null},py=({color:e,onChange:o,label:t,colorPickerType:r,placeholder:n})=>{let i=ve(),[a,l]=u6(e),[s,c]=Ee(Oo);Mh(()=>{l(e)},[e]);let m=p6(f=>{let y=f.toLowerCase(),v=g6(y);v&&o(v),l(y)},[o]),d=dy(null),p=dy(null);Mh(()=>{d.current&&d.current.focus()},[s]);let[h,b]=Ee(Mn);return Mh(()=>()=>{b(null)},[b]),my("div",{className:"color-picker__input-label",children:[Yd("div",{className:"color-picker__input-hash",children:"#"}),Yd("input",{ref:s==="hex"?d:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":t,onChange:f=>{m(f.target.value)},value:(a||"").replace(/^#/,""),onBlur:()=>{l(e)},tabIndex:-1,onFocus:()=>c("hex"),onKeyDown:f=>{f.key!==T.TAB&&(f.key===T.ESCAPE&&p.current?.focus(),f.stopPropagation())},placeholder:n}),i.formFactor!=="phone"&&my(f6,{children:[Yd("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),Yd("div",{ref:p,className:m6("excalidraw-eye-dropper-trigger",{selected:h}),onClick:()=>b(f=>f?null:{keepOpenOnAlt:!1,onSelect:y=>o(y),colorPickerType:r}),title:`${g("labels.eyeDropper")} \u2014 ${T.I.toLocaleUpperCase()} or ${O("Alt")} `,children:LE})]})]})};import Ph,{useEffect as Dh,useImperativeHandle as R6,useState as N6}from"react";import E6 from"clsx";import{useEffect as y6,useRef as v6}from"react";import{jsxs as x6}from"react/jsx-runtime";var b6=({color:e,keyLabel:o,isShade:t=!1})=>x6("div",{className:"color-picker__button__hotkey-label",style:{color:yi(e)?"#fff":"#000"},children:[t&&"\u21E7",o]}),Da=b6;import{jsx as Lh,jsxs as w6}from"react/jsx-runtime";var uy=({colors:e,color:o,onChange:t,label:r})=>{let[n,i]=Ee(Oo),a=v6(null);return y6(()=>{a.current&&a.current.focus()},[o,n]),Lh("div",{className:"color-picker-content--default",children:e.map((l,s)=>w6("button",{ref:o===l?a:void 0,tabIndex:-1,type:"button",className:E6("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:[Lh("div",{className:"color-picker__button-outline"}),Lh(Da,{color:l,keyLabel:s+1})]},s))})};import T6 from"clsx";import{useEffect as I6,useRef as C6}from"react";import{jsx as Ah,jsxs as S6}from"react/jsx-runtime";var k6=({palette:e,color:o,onChange:t,activeShade:r,showHotKey:n=!0})=>{let i=An({color:o,palette:e}),[a,l]=Ee(Oo),s=C6(null);return I6(()=>{s.current&&a==="baseColors"&&s.current.focus()},[i?.colorName,a]),Ah("div",{className:"color-picker-content--default",children:Object.entries(e).map(([c,m],d)=>{let p=(Array.isArray(m)?m[r]:m)||"transparent",h=ms[d],b=g(`colors.${c.replace(/\d+/,"")}`,null,"");return S6("button",{ref:i?.colorName===c?s:void 0,tabIndex:-1,type:"button",className:T6("color-picker__button color-picker__button--large has-outline",{active:i?.colorName===c,"is-transparent":p==="transparent"||!p}),onClick:()=>{t(p),l("baseColors")},title:`${b}${p.startsWith("#")?` ${p}`:""} \u2014 ${h}`,"aria-label":`${b} \u2014 ${h}`,style:p?{"--swatch-color":p}:void 0,"data-testid":`color-${c}`,children:[Ah("div",{className:"color-picker__button-outline"}),n&&Ah(Da,{color:p,keyLabel:h})]},c)})})},hy=k6;import{jsx as L6}from"react/jsx-runtime";var M6=({children:e})=>L6("div",{className:"color-picker__heading",children:e}),Ra=M6;import A6 from"clsx";import{useEffect as _6,useRef as P6}from"react";import{jsx as ps,jsxs as gy}from"react/jsx-runtime";var fy=({color:e,onChange:o,palette:t,showHotKey:r})=>{let n=An({color:e||"transparent",palette:t}),[i,a]=Ee(Oo),l=P6(null);if(_6(()=>{l.current&&i==="shades"&&l.current.focus()},[n,i]),n){let{colorName:s,shade:c}=n,m=t[s];if(Array.isArray(m))return ps("div",{className:"color-picker-content--default shades",children:m.map((d,p)=>gy("button",{ref:p===c&&i==="shades"?l:void 0,tabIndex:-1,type:"button",className:A6("color-picker__button color-picker__button--large has-outline",{active:p===c}),"aria-label":"Shade",title:`${s} - ${p+1}`,style:d?{"--swatch-color":d}:void 0,onClick:()=>{o(d),a("shades")},children:[ps("div",{className:"color-picker__button-outline"}),r&&ps(Da,{color:d,keyLabel:p+1,isShade:!0})]},p))})}return gy("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[ps("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),ps("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 _h=(e,o,t)=>{let r=Math.ceil(t/$n);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+$n;return n>=t?o%$n:n}case"ArrowUp":{let n=o-$n,i=n<0?$n*r+n:n;return i>=t?void 0:i}}},D6=({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(ms.includes(e.key)){let l=ms.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},by=({event:e,activeColorPickerSection:o,palette:t,color:r,onChange:n,customColors:i,setActiveColorPickerSection:a,updateData:l,activeShade:s,onEyeDropperToggle:c,onEscape:m})=>{if(e[T.CTRL_OR_CMD])return!1;if(e.key===T.ESCAPE)return m(e),!0;if(e.key===T.ALT)return c(!0),!0;if(e.key===T.I)return c(),!0;let d=An({color:r,palette:t});if(e.key===T.TAB){let p={custom:!!i.length,baseColors:!0,shades:d?.shade!=null,hex:!0},h=Object.entries(p).reduce((x,[E,w])=>(w&&x.push(E),x),[]),b=h.indexOf(o),f=e.shiftKey?-1:1,y=b+f>h.length-1?0:b+f<0?h.length-1:b+f,v=h[y];return v&&a(v),v==="custom"?n(i[0]):v==="baseColors"&&(Object.entries(t).find(([E,w])=>Array.isArray(w)?w.includes(r):w===r?E:null)||n(Mo.black)),e.preventDefault(),e.stopPropagation(),!0}if(D6({e,colorObj:d,onChange:n,palette:t,customColors:i,setActiveColorPickerSection:a,activeShade:s}))return!0;if(o==="shades"&&d){let{shade:p}=d,h=_h(e.key,p,$n);if(h!==void 0)return n(t[d.colorName][h]),!0}if(o==="baseColors"&&d){let{colorName:p}=d,h=Object.keys(t),b=h.indexOf(p),f=_h(e.key,b,h.length);if(f!==void 0){let y=h[f],v=t[y];return n(Array.isArray(v)?v[s]:v),!0}}if(o==="custom"){let p=r!=null?i.indexOf(r):0,h=_h(e.key,p,i.length);if(h!==void 0){let b=i[h];return n(b),!0}}return!1};import{jsx as _n,jsxs as Kd}from"react/jsx-runtime";var xy=Ph.forwardRef(({color:e,onChange:o,type:t,elements:r,palette:n,updateData:i,children:a,showTitle:l,onEyeDropperToggle:s,onEscape:c,showHotKey:m=!0},d)=>{let p=l?t==="elementStroke"?g("labels.stroke"):t==="elementBackground"?g("labels.background"):null:null,[h]=Ph.useState(()=>t==="canvasBackground"?[]:cy(r,t,n)),[b,f]=Ee(Oo),y=An({color:e,palette:n});Dh(()=>{if(!b){let w=!!e&&Sh({color:e,palette:n}),I=w&&!h.includes(e);f(I?null:w?"custom":y?.shade!=null?"shades":"baseColors")}},[b,e,n,f,y,h]);let[v,x]=N6(y?.shade??(t==="elementBackground"?w1:v1));Dh(()=>{y?.shade!=null&&x(y.shade);let w=I=>{I.key===T.ALT&&s(!1)};return document.addEventListener("keyup",w,{capture:!0}),()=>{document.removeEventListener("keyup",w,{capture:!0})}},[y,s]);let E=Ph.useRef(null);return R6(d,()=>E.current),Dh(()=>{E?.current?.focus()},[]),_n("div",{role:"dialog","aria-modal":"true","aria-label":g("labels.colorPicker"),children:Kd("div",{ref:E,onKeyDown:w=>{by({event:w,activeColorPickerSection:b,palette:n,color:e,onChange:o,onEyeDropperToggle:s,customColors:h,setActiveColorPickerSection:f,updateData:i,activeShade:v,onEscape:c})&&(w.preventDefault(),w.stopPropagation())},className:"color-picker-content properties-content",tabIndex:-1,children:[p&&_n("div",{className:"color-picker__title",children:p}),!!h.length&&Kd("div",{children:[_n(Ra,{children:g("colorPicker.mostUsedCustomColors")}),_n(uy,{colors:h,color:e,label:g("colorPicker.mostUsedCustomColors"),onChange:o})]}),Kd("div",{children:[_n(Ra,{children:g("colorPicker.colors")}),_n(hy,{color:e,palette:n,onChange:o,activeShade:v,showHotKey:m})]}),Kd("div",{children:[_n(Ra,{children:g("colorPicker.shades")}),_n(fy,{color:e,onChange:o,palette:n,showHotKey:m})]}),a]})})});import O6 from"clsx";import{jsx as Rh}from"react/jsx-runtime";var Ey=({onChange:e,type:o,activeColor:t,topPicks:r})=>{let n;return o==="elementStroke"&&(n=uc),o==="elementBackground"&&(n=hc),o==="canvasBackground"&&(n=gc),r&&(n=r),n?Rh("div",{className:"color-picker__top-picks",children:n.map(i=>Rh("button",{className:O6("color-picker__button",{active:i===t,"is-transparent":i==="transparent"||!i,"has-outline":!yi(i,Il)}),style:{"--swatch-color":i},type:"button",title:i,onClick:()=>e(i),"data-testid":`color-top-pick-${i}`,children:Rh("div",{className:"color-picker__button-outline"})},i))}):(console.error("Invalid type for TopPicks"),null)};import{jsx as Bo,jsxs as Zd}from"react/jsx-runtime";var z6=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=Mo,updateData:a,getOpenPopup:l,appState:s})=>{let{container:c}=$e(),m=Lt(),d=m!=="full",p=m==="mobile",[,h]=Ee(Oo),[b,f]=Ee(Mn),y=Zd("div",{children:[Bo(Ra,{children:g("colorPicker.hexCode")}),Bo(py,{color:o||"",label:r,onChange:E=>{t(E)},colorPickerType:e,placeholder:g("colorPicker.color")})]}),v=vy(null),x=()=>{v.current?.focus()};return Bo(Zr,{container:c,style:{maxWidth:"13rem"},preventAutoFocusOnTouch:!!s.editingTextElement,onFocusOutside:E=>{ao(E.target)||x(),E.preventDefault()},onPointerDownOutside:E=>{b&&E.preventDefault()},onClose:()=>{l()===e&&a({openPopup:null}),h(null),s.editingTextElement&&setTimeout(()=>{let E=document.querySelector(".excalidraw-wysiwyg");E&&E.focus()},0)},children:i?Bo(xy,{ref:v,palette:i,color:o,onChange:E=>{let w=s.editingTextElement?Vd():null;t(E),s.editingTextElement&&w&&cs(w)},onEyeDropperToggle:E=>{f(w=>E?(w=w||{keepOpenOnAlt:!0,onSelect:t,colorPickerType:e},w.keepOpenOnAlt=!0,w):E===!1||w?null:{keepOpenOnAlt:!1,onSelect:t,colorPickerType:e})},onEscape:E=>{b?f(null):a({openPopup:null})},type:e,elements:n,updateData:a,showTitle:d,showHotKey:!p,children:y}):y})},F6=({label:e,color:o,type:t,mode:r="background",onToggle:n,editingTextElement:i})=>{let a=Lt(),l=a!=="full",s=a==="mobile",c=m=>{m.preventDefault(),m.stopPropagation(),i&&sy(),n()};return Zd(Xd.Trigger,{type:"button",className:yy("color-picker__button active-color properties-trigger",{"is-transparent":!o||o==="transparent","has-outline":!o||!yi(o,Il),"compact-sizing":l,"mobile-border":s}),"aria-label":e,style:o?{"--swatch-color":o}:void 0,title:t==="elementStroke"?g("labels.showStroke"):g("labels.showBackground"),"data-openpopup":t,onClick:c,children:[Bo("div",{className:"color-picker__button-outline",children:!o&&Dx}),l&&o&&r==="stroke"&&Bo("div",{className:"color-picker__button-background",children:Bo("span",{style:{color:o&&yi(o,Il)?"#fff":"#111"},children:JE})})]})},us=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=Mo,topPicks:a,updateData:l,appState:s})=>{let c=vy(s.openPopup);B6(()=>{c.current=s.openPopup},[s.openPopup]);let d=Lt()!=="full";return Bo("div",{children:Zd("div",{role:"dialog","aria-modal":"true",className:yy("color-picker-container",{"color-picker-container--no-top-picks":d}),children:[!d&&Bo(Ey,{activeColor:o,onChange:t,type:e,topPicks:a}),!d&&Bo(Ud,{}),Zd(Xd.Root,{open:s.openPopup===e,onOpenChange:p=>{p&&l({openPopup:e})},children:[Bo(F6,{color:o,label:r,type:e,mode:e==="elementStroke"?"stroke":"background",editingTextElement:!!s.editingTextElement,onToggle:()=>{s.openPopup===e?l({openPopup:null}):s.openPopup?l({openPopup:e}):l({openPopup:e})}}),s.openPopup===e&&Bo(z6,{type:e,color:o,onChange:t,label:r,elements:n,palette:i,updateData:l,getOpenPopup:()=>c.current,appState:s})]})]})})};import*as _y from"@radix-ui/react-popover";import l4 from"clsx";import s4,{useCallback as c4,useMemo as d4}from"react";import o4,{useMemo as Pn,useState as r4,useRef as n4,useEffect as i4,useCallback as Cy}from"react";import H6 from"clsx";import U6 from"react";import{jsx as G6,jsxs as W6}from"react/jsx-runtime";var $d=U6.forwardRef(({className:e,placeholder:o,onChange:t},r)=>W6("div",{className:H6("QuickSearch__wrapper",e),children:[wo,G6("input",{ref:r,className:"QuickSearch__input",type:"text",placeholder:o,onChange:n=>t(n.target.value.trim().toLowerCase())})]}));import V6 from"clsx";import{Children as Y6}from"react";import{jsx as wy}from"react/jsx-runtime";var jd=({className:e,placeholder:o,children:t})=>{let r=!Y6.count(t);return wy("div",{className:V6("ScrollableList__wrapper",e),role:"menu",children:r?wy("div",{className:"empty",children:o}):t})};import{jsx as K6,jsxs as Z6}from"react/jsx-runtime";var Ty=({children:e,className:o="",style:t,title:r})=>Z6("div",{className:`dropdown-menu-group ${o}`,style:t,children:[r&&K6("p",{className:"dropdown-menu-group-title",children:r}),e]}),hs=Ty;Ty.displayName="DropdownMenuGroup";import{useEffect as e4,useRef as t4}from"react";import{jsx as X6}from"react/jsx-runtime";var gs=({children:e,...o})=>X6("span",{...o,style:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",...o.style},children:e});import{Fragment as j6,jsx as qd,jsxs as q6}from"react/jsx-runtime";var $6=({textStyle:e,icon:o,shortcut:t,children:r})=>{let n=ve();return q6(j6,{children:[o&&qd("div",{className:"dropdown-menu-item__icon",children:o}),qd("div",{style:e,className:"dropdown-menu-item__text",children:qd(gs,{children:r})}),t&&n.formFactor!=="phone"&&qd("div",{className:"dropdown-menu-item__shortcut",children:t})]})},Jd=$6;import J6,{useContext as Q6}from"react";var Nh=J6.createContext({}),Qd=(e="",o=!1,t=!1)=>`dropdown-menu-item dropdown-menu-item-base ${e}
|
|
1
|
+
import{$ as tt,$a as G1,$b as re,$c as Hc,$d as Gr,$e as ur,$f as sd,$g as sa,$h as Jl,A as Il,Aa as $p,Ab as Se,Ac as Nc,Ad as Ki,Ae as Vb,Af as Vr,Ag as L0,Ah as j0,B as E1,Ba as z1,Bb as q1,Bc as Oc,Bd as ct,Be as bu,Bf as wu,Bg as A0,Bh as MT,C as $n,Ca as vc,Cb as nu,Cc as yo,Cd as Db,Ce as jc,Cf as ta,Cg as _0,Ch as hi,D as y1,Da as wc,Db as J1,Dc as au,Dd as xn,De as yn,Df as Tu,Dg as aa,Dh as ma,E as v1,Ea as xo,Eb as ao,Ec as hb,Ed as Fl,Ee as qc,Ef as fr,Eg as P0,Eh as ql,F as w1,Fa as Tc,Fb as ti,Fc as ii,Fd as xe,Fe as Yb,Ff as Zl,Fg as dd,G as Mo,Ga as mn,Gb as bt,Gc as gb,Gd as _o,Ge as Kb,Gf as oa,Gg as D0,Gh as q0,H as uc,Ha as F1,Hb as Q1,Hc as fn,Hd as Uc,He as xu,Hf as s0,Hg as R0,I as hc,Ia as jp,Ib as oi,Ic as He,Id as Rb,Ie as ze,If as c0,Ig as md,Ih as J0,J as gc,Ja as qp,Jb as Lc,Jc as Ut,Jd as du,Je as te,Jf as vn,Jg as Pu,Jh as Q0,K as T1,Ka as H1,Kb as Xo,Kc as ai,Kd as mu,Ke as Ji,Kf as Qo,Kg as Du,Kh as Ed,L as I1,La as Ic,Lb as eb,Lc as Vi,Ld as Nb,Le as De,Lf as _,Lg as Ru,Lh as ex,M as C1,Ma as Jp,Mb as tb,Mc as X,Md as Zi,Me as Jc,Mf as d0,Mg as N0,Mh as Gu,N as k1,Na as Lo,Nb as ri,Nc as Bc,Nd as Hl,Ne as Zb,Nf as m0,Ng as la,Nh as Wu,O as fc,Oa as Qp,Ob as Dl,Oc as ne,Od as Gc,Oe as Eu,Of as Xl,Og as O0,Oh as yd,P as Cl,Pa as St,Pb as Pe,Pc as Yi,Pd as pu,Pe as Xb,Pf as p0,Pg as B0,Ph as tx,Q as kl,Qa as Cc,Qb as We,Qc as be,Qd as Ob,Qe as Do,Qf as u0,Qg as z0,Qh as Vu,R as S1,Ra as Al,Rb as Ct,Rc as Je,Rd as Xi,Re as $b,Rf as id,Rg as F0,Rh as Yr,S as bc,Sa as Or,Sb as Rl,Sc as Ce,Sd as Wc,Se as jb,Sf as br,Sg as kT,Sh as ox,T as M1,Ta as Ht,Tb as Ac,Tc as Te,Td as Bb,Te as lo,Tf as ra,Tg as Nu,Th as Yu,U as Wp,Ua as kc,Ub as _c,Uc as zc,Ud as zb,Ue as qb,Uf as Iu,Ug as Ou,Uh as rx,V as L1,Va as lt,Vb as ob,Vc as fb,Vd as Po,Ve as ci,Vf as h0,Vg as Ie,Vh as nx,W as Vp,Wa as pn,Wb as Eo,Wc as Xt,Wd as $i,We as Jb,Wf as g0,Wg as Bu,Wh as vd,X as ke,Xa as U1,Xb as rb,Xc as bb,Xd as Vc,Xe as Qi,Xf as f0,Xg as U0,Xh as Ku,Y as mr,Ya as _l,Yb as nb,Yc as Fc,Yd as Yc,Ye as Qc,Yf as Cu,Yg as ui,Yh as ix,Z as jn,Za as no,Zb as ib,Zc as Ur,Zd as Wt,Ze as Qb,Zf as ad,Zg as vr,Zh as ax,_ as Sl,_a as st,_b as ab,_c as xb,_d as ee,_e as pr,_f as ld,_g as G0,_h as lx,a as at,aa as qn,ab as W1,ac as lb,ad as ht,ae as Kc,af as e0,ag as mi,ah as W0,b as So,ba as It,bb as V1,bc as Hr,bd as ot,be as Fb,bf as yu,bg as b0,bh as Fu,c as u1,ca as oe,cb as un,cc as Bt,cd as Eb,ce as ji,cf as t0,cg as xr,ch as wn,d as Bp,da as Ge,db as Br,dc as sb,dd as bn,de as Zc,df as vu,dg as ku,dh as Tn,e as Bi,ea as Jn,eb as zr,ec as Pc,ed as yb,ee as Ul,ef as o0,eg as x0,eh as so,f as zi,fa as Fi,fb as Y1,fc as Gi,fd as vb,fe as uu,ff as ed,fg as cd,fh as er,g as zp,ga as xc,gb as io,gc as cb,gd as li,ge as hu,gf as td,gg as Su,gh as ca,h as dc,ha as Yp,hb as Sc,hc as hn,hd as lu,he as Wr,hf as r0,hg as Er,hh as pd,i as Fp,ia as Ec,ib as Fr,ic as Nl,id as wb,ie as En,if as n0,ig as E0,ih as Hu,j as Hp,ja as Kp,jb as K1,jc as ut,jd as su,je as gu,jf as i0,jg as y0,jh as $l,k as h1,ka as Ml,kb as Z1,kc as gn,kd as cu,ke as fu,kf as a0,kg as yr,kh as ud,l as Up,la as A1,lb as X1,lc as db,ld as Ol,le as Xc,lf as hr,lg as na,lh as Uu,m as L,ma as _1,mb as eu,mc as Xe,md as Tb,me as Z,mf as Gl,mg as v0,mh as ST,n as g1,na as Zp,nb as Qn,nc as mb,nd as Ib,ne as TT,nf as Wl,ng as Mu,nh as V0,o as Ue,oa as Ll,ob as tu,oc as Dc,od as Bl,oe as IT,of as Vl,og as pi,oh as Y0,p as cn,pa as he,pb as $1,pc as $o,pd as Cb,pe as CT,pf as Yl,pg as w0,ph as K0,q as vl,qa as P1,qb as j1,qc as Wi,qd as kb,qe as Hb,qf as Kl,qg as ia,qh as hd,r as Gp,ra as yc,rb as ue,rc as Ve,rd as Gt,re as gt,rf as ea,rg as Lu,rh as gd,s as f1,sa as dn,sb as T,sc as pb,sd as Sb,se as $c,sf as gr,sg as T0,sh as fd,t as b1,ta as D1,tb as Mc,tc as ub,td as Mb,te as Jo,tf as od,tg as I0,th as bd,u as mc,ua as R1,ub as ei,uc as iu,ud as Lb,ue as si,uf as l0,ug as C0,uh as jl,v as bo,va as N1,vb as ou,vc as Rc,vd as zl,ve as Ub,vf as Mt,vg as k0,vh as Z0,w as wl,wa as O1,wb as Ui,wc as Ao,wd as Ab,we as qi,wf as rd,wg as S0,wh as X0,x as Tl,xa as B1,xb as Pl,xc as ni,xd as _b,xe as Ye,xf as di,xg as Au,xh as $0,y as x1,ya as Hi,yb as Ot,yc as jo,yd as wT,ye as Gb,yf as Me,yg as _u,yh as xd,z as pc,za as Xp,zb as ru,zc as qo,zd as Pb,ze as Wb,zf as nd,zg as M0,zh as da}from"./chunk-BNLQYA3M.js";import{a as C}from"./chunk-AJ35V3HR.js";import{K as zu}from"./chunk-2KZFBCBN.js";import{c as H0}from"./chunk-AJI3LATG.js";import{b as m1,c as p1,d as k}from"./chunk-SRAX5OIU.js";import YA,{useEffect as KA}from"react";import tT from"clsx";import xA from"lodash.throttle";import Nr,{useContext as Zn}from"react";import{flushSync as Yo}from"react-dom";import EA from"roughjs/bin/rough";import{nanoid as yA}from"nanoid";import{atom as Le,createStore as LT}from"jotai";import{createIsolation as AT}from"jotai-scope";var sx=AT();var{useAtom:Ee,useSetAtom:In,useAtomValue:wd,useStore:JA}=sx,cx=sx.Provider,xt=LT();var _T=m1({"./locales/ar-SA.json":()=>import("./locales/ar-SA-IYHKZRSE.js"),"./locales/az-AZ.json":()=>import("./locales/az-AZ-WL5GYRHK.js"),"./locales/bg-BG.json":()=>import("./locales/bg-BG-FXZYTRPD.js"),"./locales/bn-BD.json":()=>import("./locales/bn-BD-KO6YL5G2.js"),"./locales/bn-IN.json":()=>import("./locales/bn-IN-PC6JHKYB.js"),"./locales/ca-ES.json":()=>import("./locales/ca-ES-AREX5NEO.js"),"./locales/cs-CZ.json":()=>import("./locales/cs-CZ-HXAZMFYH.js"),"./locales/da-DK.json":()=>import("./locales/da-DK-5X7ZLFU3.js"),"./locales/de-CH.json":()=>import("./locales/de-CH-76ZNVSOF.js"),"./locales/de-DE.json":()=>import("./locales/de-DE-G3JVZ4MQ.js"),"./locales/el-GR.json":()=>import("./locales/el-GR-4AZTZGY6.js"),"./locales/en.json":()=>import("./locales/en-7B5CVO5K.js"),"./locales/es-ES.json":()=>import("./locales/es-ES-ART7BI3G.js"),"./locales/eu-ES.json":()=>import("./locales/eu-ES-BIF4XBMT.js"),"./locales/fa-IR.json":()=>import("./locales/fa-IR-D4HHKAAI.js"),"./locales/fi-FI.json":()=>import("./locales/fi-FI-O35ZY7UI.js"),"./locales/fr-FR.json":()=>import("./locales/fr-FR-XEFNCM4I.js"),"./locales/gl-ES.json":()=>import("./locales/gl-ES-U4NYM3X5.js"),"./locales/he-IL.json":()=>import("./locales/he-IL-656ABAVQ.js"),"./locales/hi-IN.json":()=>import("./locales/hi-IN-Z55GAFFR.js"),"./locales/hu-HU.json":()=>import("./locales/hu-HU-UJ62DVIW.js"),"./locales/id-ID.json":()=>import("./locales/id-ID-FLZFU3OO.js"),"./locales/it-IT.json":()=>import("./locales/it-IT-GIGIGIBJ.js"),"./locales/ja-JP.json":()=>import("./locales/ja-JP-43VXGDWI.js"),"./locales/kaa.json":()=>import("./locales/kaa-L3IMSDYL.js"),"./locales/kab-KAB.json":()=>import("./locales/kab-KAB-XKPWJLNL.js"),"./locales/kk-KZ.json":()=>import("./locales/kk-KZ-SXPDDY2H.js"),"./locales/km-KH.json":()=>import("./locales/km-KH-DOS4CPGC.js"),"./locales/ko-KR.json":()=>import("./locales/ko-KR-BGC6VCY4.js"),"./locales/ku-TR.json":()=>import("./locales/ku-TR-J7IUITIA.js"),"./locales/lt-LT.json":()=>import("./locales/lt-LT-AC3LV5KG.js"),"./locales/lv-LV.json":()=>import("./locales/lv-LV-I6AY7QG2.js"),"./locales/mr-IN.json":()=>import("./locales/mr-IN-5SP4HV5B.js"),"./locales/my-MM.json":()=>import("./locales/my-MM-S7ECRBYZ.js"),"./locales/nb-NO.json":()=>import("./locales/nb-NO-6PNHTF4R.js"),"./locales/nl-NL.json":()=>import("./locales/nl-NL-R4C4SUIG.js"),"./locales/nn-NO.json":()=>import("./locales/nn-NO-3TFXTM7Y.js"),"./locales/oc-FR.json":()=>import("./locales/oc-FR-IK6GIE7H.js"),"./locales/pa-IN.json":()=>import("./locales/pa-IN-YAKHYJET.js"),"./locales/percentages.json":()=>import("./locales/percentages-OL6W367U.js"),"./locales/pl-PL.json":()=>import("./locales/pl-PL-BIY22ZWU.js"),"./locales/pt-BR.json":()=>import("./locales/pt-BR-Q23NUPD6.js"),"./locales/pt-PT.json":()=>import("./locales/pt-PT-LOPEJLPJ.js"),"./locales/ro-RO.json":()=>import("./locales/ro-RO-W3D2ZATV.js"),"./locales/ru-RU.json":()=>import("./locales/ru-RU-DCTW7QSH.js"),"./locales/si-LK.json":()=>import("./locales/si-LK-FYRRHO3C.js"),"./locales/sk-SK.json":()=>import("./locales/sk-SK-MC7UOHQO.js"),"./locales/sl-SI.json":()=>import("./locales/sl-SI-L6B6HFY5.js"),"./locales/sv-SE.json":()=>import("./locales/sv-SE-KMY6L2BA.js"),"./locales/ta-IN.json":()=>import("./locales/ta-IN-ZQCYE2JK.js"),"./locales/th-TH.json":()=>import("./locales/th-TH-WS7ECBAV.js"),"./locales/tr-TR.json":()=>import("./locales/tr-TR-S5FI7JRW.js"),"./locales/uk-UA.json":()=>import("./locales/uk-UA-4EZUWUSQ.js"),"./locales/uz-UZ.json":()=>import("./locales/uz-UZ-OKHL6AFA.js"),"./locales/vi-VN.json":()=>import("./locales/vi-VN-K34TWHF7.js"),"./locales/zh-CN.json":()=>import("./locales/zh-CN-JE4UZWNO.js"),"./locales/zh-HK.json":()=>import("./locales/zh-HK-RM35YDXX.js"),"./locales/zh-TW.json":()=>import("./locales/zh-TW-ONGLV6Y5.js")});var PT=85,wr={code:"en",label:"English"},ua=[wr,...[{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=>H0[e.code]>=PT).sort((e,o)=>e.label>o.label?1:-1)],Id="__test__";Bt()&&ua.unshift({code:Id,label:"test language"},{code:`${Id}.rtl`,label:"\u202Atest language (rtl)\u202C",rtl:!0});var pa=wr,Td={},Cd=async e=>{if(pa=e,document.documentElement.dir=pa.rtl?"rtl":"ltr",document.documentElement.lang=pa.code,e.code.startsWith(Id))Td={};else try{Td=await _T(`./locales/${pa.code}.json`)}catch(o){console.error(`Failed to load language ${e.code}:`,o.message),Td=zu}xt.set(mx,e.code)},Kr=()=>pa,dx=(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(pa.code.startsWith(Id))return`\u202A[[${o?`${e}(${JSON.stringify(o).slice(1,-1)})`:e}]]\u202C`;let r=e.split("."),n=dx(Td,r)||dx(zu,r)||t;if(n===void 0){let i=`Can't find translation for ${e}`;if(C.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},mx=Le(wr.code),it=()=>{let e=wd(mx);return{t:g,langCode:e}};import DT from"clsx";import RT from"open-color";import zt from"react";import{Fragment as Oe,jsx as u,jsxs as B}from"react/jsx-runtime";var tr=e=>"var(--icon-fill-color)",px=e=>e===oe.LIGHT?RT.white:"#1e1e1e",A=(e,o=512)=>{let{width:t=512,height:r=t,mirror:n,style:i,...a}=typeof o=="number"?{width:o}:o;return u("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${t} ${r}`,className:DT({"rtl-mirror":n}),style:i,...a,children:typeof e=="string"?u("path",{fill:"currentColor",d:e}):e})},G={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},me={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},h7=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("rect",{x:3,y:8,width:18,height:4,rx:1}),u("line",{x1:12,y1:8,x2:12,y2:21}),u("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),u("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"})]}),G),kd=A(B("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),u("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),u("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),u("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),u("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),G),ux=A(B("svg",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),u("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),G),hx=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("circle",{cx:"12",cy:"12",r:"1"}),u("circle",{cx:"12",cy:"19",r:"1"}),u("circle",{cx:"12",cy:"5",r:"1"})]}),G),gx=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),u("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),u("path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]}),G),fx=A(B("svg",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),u("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),u("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),G),Zu=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M6.5 9.5l3.5 -3"}),u("path",{d:"M14 5.5l3 1.5"}),u("path",{d:"M18.5 10l-2.5 7"}),u("path",{d:"M13.5 17.5l-7 -5"})]}),G),gi=A(B("g",{children:[u("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"}),u("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"}),u("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:u("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"})}),u("g",{mask:"url(#UnlockedIcon)",children:u("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"})})]}),me),ha=A(B("g",{strokeWidth:"1.25",children:[u("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"}),u("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),u("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"})]}),me),bx=A(u("g",{fill:"currentColor",children:u("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}),xx=A(B(Oe,{children:[u("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"}),u("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),u("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"}),Ex=A(B(Oe,{children:[u("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"}),u("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),u("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"}),yx=A(B(Oe,{children:[u("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"}),u("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),u("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"}),g7=A(u("g",{fill:"currentColor",children:u("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"}),fi=A(B("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),Cn=A(B("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,children:[u("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"}),u("path",{d:"M5 15m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M5 17c0 1.42 .316 2.805 1 4"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),ga=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),G),fa=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"})]}),G),ba=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("circle",{cx:"12",cy:"12",r:"9"})]}),G),Sd=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),u("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),u("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),G),xa=A(u("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),me),vx=A(B("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),u("path",{d:"M16 7h4"}),u("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),G),Tr=A(B("g",{strokeWidth:"1.25",children:[u("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"}),u("path",{d:"m11.25 5.417 3.333 3.333"})]}),me),Ir=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),u("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),u("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),u("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),u("polyline",{points:"5 20 11 4 13 4 20 20"})]}),G),wx=A(B("g",{stroke:"currentColor",strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 7v-2h13v2"}),u("path",{d:"M10 5v14"}),u("path",{d:"M12 19h-4"}),u("path",{d:"M15 13v-1h6v1"}),u("path",{d:"M18 12v7"}),u("path",{d:"M17 19h2"})]}),G),Ea=A(B("g",{strokeWidth:"1.25",children:[u("path",{d:"M12.5 6.667h.01"}),u("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"}),u("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),u("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),me),Md=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M18 13.3l-6.3 -6.3"})]}),G),Xu=A(u("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),me),$u=A(u("path",{d:"M5 10h10",strokeWidth:"1.25"}),me),Tx=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M21 21l-6 -6"}),u("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"}),u("path",{d:"M3 4v4h4"})]}),G),vo=A(u("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"}),me),ya=A(B("g",{strokeWidth:"1.5",children:[u("polyline",{points:"12 16 18 10 12 4"}),u("polyline",{points:"8 4 2 10 8 16"})]}),me),Ql=A(B("g",{strokeWidth:"1.25",children:[u("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"}),u("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"})]}),me),es=A(u("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"}),me),ts=A(u("g",{stroke:"currentColor",strokeLinejoin:"round",children:u("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"})}),{...me,strokeWidth:1.5}),Ix=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),u("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),u("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),G),bi=A(u("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"}),me),va=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("circle",{cx:"12",cy:"12",r:"9"}),u("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),u("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),G),Cx=A(B("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("circle",{cx:"12",cy:"12",r:"9"}),u("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),u("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),G),kx=A(u("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",children:u("path",{d:"M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z"})}),G),Sx=A(u("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",children:u("path",{d:"m644-428-58-58q9-47-27-88t-93-32l-58-58q17-8 34.5-12t37.5-4q75 0 127.5 52.5T660-500q0 20-4 37.5T644-428Zm128 126-58-56q38-29 67.5-63.5T832-500q-50-101-143.5-160.5T480-720q-29 0-57 4t-55 12l-62-62q41-17 84-25.5t90-8.5q151 0 269 83.5T920-500q-23 59-60.5 109.5T772-302Zm20 246L624-222q-35 11-70.5 16.5T480-200q-151 0-269-83.5T40-500q21-53 53-98.5t73-81.5L56-792l56-56 736 736-56 56ZM222-624q-29 26-53 57t-41 67q50 101 143.5 160.5T480-280q20 0 39-2.5t39-5.5l-36-38q-11 3-21 4.5t-21 1.5q-75 0-127.5-52.5T300-500q0-11 1.5-21t4.5-21l-84-82Zm319 93Zm-151 75Z"})}),G),ju=A(u("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"}),me),Ld=A(u("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"}),me),Mx=A(B("g",{strokeWidth:"1.25",children:[u("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"}),u("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"})]}),me),Lx=A(B("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 4l11.733 16h4.267l-11.733 -16z"}),u("path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"})]}),G),Ax=A(u("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),os=A(B("g",{strokeWidth:"1.25",children:[u("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"}),u("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"})]}),me),_x=A("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}),Px=A("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}),wa=A(u("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"}),me),f7=A("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}),b7=A("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"),Ad=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z"}),u("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"}),u("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"})]}),G),Dx=A(u("g",{strokeWidth:1.5,children:u("path",{d:"M6 18l12 -12"})}),G),_d=A(B("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M15 8h.01"}),u("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),u("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),u("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),u("path",{d:"M19 16v6"}),u("path",{d:"M22 19l-3 3l-3 -3"})]}),G),Rx=A("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}),x7=A("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}),E7=A("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}),Nx=A("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"),y7=A("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"),qu=A(u("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"}),me),Ju=A(u("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"}),me),Ox=A("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}),Bx=A(u("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"}),me),v7=A("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"),w7=A("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}),T7=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M12 14v-11"}),u("path",{d:"M9 6l3 -3l3 3"})]}),G),I7=A(B(Oe,{children:[u("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"}),u("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}),C7=A(u("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}),zx=B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 10l0 10"}),u("path",{d:"M12 10l4 4"}),u("path",{d:"M12 10l-4 4"}),u("path",{d:"M4 4l16 0"})]}),Fx=B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 5l0 14"}),u("path",{d:"M16 9l-4 -4"}),u("path",{d:"M8 9l4 -4"})]}),Qu=A(Fx,G),eh=A(Fx,{...G,style:{transform:"rotate(180deg)"}}),th=A(zx,G),oh=A(zx,{...G,style:{transform:"rotate(180deg)"}}),rh=A(B(Oe,{children:[B("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("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"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),nh=A(B(Oe,{children:[B("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("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"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),ih=A(B(Oe,{children:[B("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("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"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),ah=A(B(Oe,{children:[B("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("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"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),Hx=A(B(Oe,{children:[B("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("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"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),Ux=A(B(Oe,{children:[B("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("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"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),lh=A(B("g",{stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),u("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),u("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"})]}),me),sh=A(B("g",{stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),u("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),u("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"})]}),me),Pd=A(B("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("circle",{cx:"9",cy:"7",r:"4"}),u("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),u("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),u("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),G),k7=A("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"),S7=A("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"),Ro=A(B(Oe,{children:[u("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:u("path",{d:"M15 5 5 15M5 5l10 10"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),M7=A("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}),L7=A("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}),A7=A("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}),ch=zt.memo(({theme:e})=>A(B(Oe,{children:[u("path",{d:"M25 26H111V111H25",fill:tr(e)}),u("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:tr(e),strokeWidth:"2"}),u("path",{d:"M100 100H160V160H100",fill:tr(e)}),u("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:tr(e),strokeWidth:"2"}),B("g",{fill:px(e),stroke:tr(e),strokeWidth:"6",children:[u("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),u("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),u("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),u("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),dh=zt.memo(({theme:e})=>A(B(Oe,{children:[u("path",{d:"M25 26H111V111H25",fill:tr(e)}),u("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:tr(e),strokeWidth:"2"}),u("path",{d:"M100 100H160V160H100",fill:tr(e)}),u("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:tr(e),strokeWidth:"2"}),B("g",{fill:px(e),stroke:tr(e),strokeWidth:"6",children:[u("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),u("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),u("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),u("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),u("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),u("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),Gx=A(u("g",{strokeWidth:1.25,children:u("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"})}),me),Wx=A(B(Oe,{children:[u("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"}),u("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:u("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"})}),u("g",{mask:"url(#FillHachureIcon)",children:u("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"})})]}),me),Vx=A(B(Oe,{children:[B("g",{clipPath:"url(#a)",children:[u("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"}),u("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:u("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"})}),u("g",{mask:"url(#FillCrossHatchIcon)",children:u("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"})})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),Yx=A(B(Oe,{children:[u("g",{clipPath:"url(#a)",children:u("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"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),{...me,fill:"currentColor"}),mh=A(u(Oe,{children:u("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),me),Kx=A(u("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),me),Zx=A(u("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),me),_7=zt.memo(({theme:e})=>A(u("path",{d:"M6 10H34",stroke:tr(e),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})),Xx=A(B("g",{strokeWidth:"2",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 12h2"}),u("path",{d:"M17 12h2"}),u("path",{d:"M11 12h2"})]}),G),$x=A(B("g",{strokeWidth:"2",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 12v.01"}),u("path",{d:"M8 12v.01"}),u("path",{d:"M12 12v.01"}),u("path",{d:"M16 12v.01"}),u("path",{d:"M20 12v.01"})]}),G),jx=A(u("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"}),me),qx=A(u("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"}),me),Jx=A(u("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"}),me),Qx=A(B("svg",{strokeWidth:"1.5",children:[u("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"}),u("path",{d:"M13.3333 3.33331V3.34331"}),u("path",{d:"M16.6667 3.33331V3.34331"}),u("path",{d:"M16.6667 6.66669V6.67669"}),u("path",{d:"M16.6667 10V10.01"}),u("path",{d:"M3.33334 13.3333V13.3433"}),u("path",{d:"M16.6667 13.3333V13.3433"}),u("path",{d:"M3.33334 16.6667V16.6767"}),u("path",{d:"M6.66666 16.6667V16.6767"}),u("path",{d:"M10 16.6667V16.6767"}),u("path",{d:"M13.3333 16.6667V16.6767"}),u("path",{d:"M16.6667 16.6667V16.6767"})]}),me),eE=A(B("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),u("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),u("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),u("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),u("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),u("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),u("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),u("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),u("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),u("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),u("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),u("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),G),tE=A(B("g",{stroke:"currentColor",opacity:.3,strokeWidth:2,children:[u("path",{d:"M12 12l9 0"}),u("path",{d:"M3 9l6 6"}),u("path",{d:"M3 15l6 -6"})]}),G),oE=zt.memo(({flip:e=!1})=>A(B("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[u("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),u("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})),rE=zt.memo(({flip:e=!1})=>A(B("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[u("path",{d:"M32 10L6 10",strokeWidth:2}),u("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),nE=zt.memo(({flip:e=!1})=>A(B("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[u("path",{d:"M26 10L6 10"}),u("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),iE=zt.memo(({flip:e=!1})=>A(u("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",children:u("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})),aE=zt.memo(({flip:e=!1})=>A(B("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[u("path",{d:"M32 10L6 10",strokeWidth:2}),u("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})),lE=zt.memo(({flip:e=!1})=>A(B("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",children:[u("path",{d:"M6,9.5H27"}),u("path",{d:"M27,5L34,10L27,14Z",fill:"none"})]}),{width:40,height:20})),sE=zt.memo(({flip:e=!1})=>A(B("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[u("path",{d:"M6,9.5H20"}),u("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),cE=zt.memo(({flip:e=!1})=>A(B("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[u("path",{d:"M6,9.5H20"}),u("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),dE=zt.memo(({flip:e=!1})=>A(u("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:u("path",{d:"M34,10 H6 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),mE=zt.memo(({flip:e=!1})=>A(u("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:u("path",{d:"M34,10 H6 M15,10 L15,15 L15,5"})}),{width:40,height:20})),pE=zt.memo(({flip:e=!1})=>A(u("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:u("path",{d:"M34,10 H6 M15,10 L15,16 L15,4 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),uE=A(B(Oe,{children:[u("g",{clipPath:"url(#a)",children:u("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"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),hE=A(B(Oe,{children:[u("g",{clipPath:"url(#a)",children:u("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),gE=A(B(Oe,{children:[u("g",{clipPath:"url(#a)",children:u("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),fE=A(u(Oe,{children:u("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"})}),me),xi=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 7v-2h13v2"}),u("path",{d:"M10 5v14"}),u("path",{d:"M12 19h-4"}),u("path",{d:"M15 13v-1h6v1"}),u("path",{d:"M18 12v7"}),u("path",{d:"M17 19h2"})]}),G),bE=A(u(Oe,{children:B("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M7 12h10"}),u("path",{d:"M7 5v14"}),u("path",{d:"M17 5v14"}),u("path",{d:"M15 19h4"}),u("path",{d:"M15 5h4"}),u("path",{d:"M5 19h4"}),u("path",{d:"M5 5h4"})]})}),G),rs=A(u(Oe,{children:u("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:u("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"})})}),me),Dd=A(B(Oe,{children:[u("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:u("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"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),me),xE=A(B("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),u("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),u("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),G),EE=A(B("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),u("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),u("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),G),yE=A(B("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),u("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),u("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),G),vE=zt.memo(({theme:e})=>A(B("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),u("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),G)),wE=zt.memo(({theme:e})=>A(B("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),u("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),G)),TE=zt.memo(({theme:e})=>A(B("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),u("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),u("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),G)),Rd=A(B("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M21 19h-18l9 -15"}),u("path",{d:"M20.615 15.171h.015"}),u("path",{d:"M19.515 11.771h.015"}),u("path",{d:"M17.715 8.671h.015"}),u("path",{d:"M15.415 5.971h.015"})]}),G),IE=A(u("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}),P7=A(u("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"})),Nd=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),u("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),u("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),u("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"})]}),G),ph=A(B(Oe,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),u("path",{d:"M7 11l5 5l5 -5"}),u("path",{d:"M12 4l0 12"})]}),G),Ta=A(B(Oe,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]}),G),CE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),u("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),u("path",{d:"M9.15 14.85l8.85 -10.85"}),u("path",{d:"M6 4l8.85 10.85"})]}),G),kE=A(B(Oe,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),u("path",{d:"M12 17l0 .01"}),u("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),G),D7=A(B(Oe,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M7 4v16l13 -8z"})]}),G),R7=A(B(Oe,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"})]}),G),SE=A(B(Oe,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 12l5 5l10 -10"})]}),G),ME=A(B(Oe,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M12 9v4"}),u("path",{d:"M12 17h.01"})]}),G),LE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M11 7l6 6"}),u("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"})]}),G),ns=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 3l-4 7h8z"}),u("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),u("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"})]}),G),or=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 7l16 0"}),u("path",{d:"M4 17l16 0"}),u("path",{d:"M7 4l0 16"}),u("path",{d:"M17 4l0 16"})]}),G),Ia=A(u("path",{fill:"currentColor",d:"M407.48,111.18C335.587,108.103 269.573,152.338 245.08,220C220.587,152.338 154.573,108.103 82.68,111.18C80.285,168.229 107.577,222.632 154.74,254.82C178.908,271.419 193.35,298.951 193.27,328.27L193.27,379.13L296.9,379.13L296.9,328.27C296.816,298.953 311.255,271.42 335.42,254.82C382.596,222.644 409.892,168.233 407.48,111.18Z"})),Ca=A(B("g",{strokeWidth:"1.25",children:[u("path",{d:"M4.16602 10H15.8327"}),u("path",{d:"M12.5 13.3333L15.8333 10"}),u("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),me),kn=A(B("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[u("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"}),u("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),Ei=A(B("g",{stroke:"currentColor",fill:"none",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z"}),u("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),u("path",{d:"M15 6l3 3"}),u("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"}),u("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"})]}),G),N7=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z"}),u("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),u("path",{d:"M15 6l3 3"}),u("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"}),u("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"})]}),G),O7=A(B("g",{stroke:"currentColor",fill:"none",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35"}),u("path",{d:"M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946"}),u("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"}),u("path",{d:"M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45"}),u("path",{d:"M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946"}),u("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"})]}),G),AE=A(B("g",{stroke:"currentColor",fill:"none",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),u("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),u("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),u("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"})]}),G),ka=A(B("g",{stroke:"currentColor",fill:"none",strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"}),u("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"})]}),G),_E=A(B("g",{stroke:"currentColor",fill:"none",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"}),u("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"}),u("path",{d:"M3 3l18 18"})]}),G),PE=A(B("g",{stroke:"currentColor",fill:"none",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("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"}),u("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),u("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),u("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),u("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),G),DE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("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"}),u("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),u("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),u("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),u("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),G),wo=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),u("path",{d:"M21 21l-6 -6"})]}),G),RE=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M20.984 12.53a9 9 0 1 0 -7.552 8.355"}),u("path",{d:"M12 7v5l3 3"}),u("path",{d:"M19 16l-2 3h4l-2 3"})]}),G),NE=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M5 10a7 7 0 0 0 14 0"}),u("path",{d:"M8 21l8 0"}),u("path",{d:"M12 17l0 4"})]}),G),OE=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 3l18 18"}),u("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"}),u("path",{d:"M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85"}),u("path",{d:"M8 21l8 0"}),u("path",{d:"M12 17l0 4"})]}),G),is=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"})]}),G),BE=A(B("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M12 20v.01"}),u("path",{d:"M16 20v.01"}),u("path",{d:"M8 20v.01"}),u("path",{d:"M4 20v.01"}),u("path",{d:"M4 16v.01"}),u("path",{d:"M4 12v.01"}),u("path",{d:"M4 8v.01"}),u("path",{d:"M4 4v.01"}),u("path",{d:"M8 4v.01"}),u("path",{d:"M12 4v.01"}),u("path",{d:"M16 4v.01"}),u("path",{d:"M20 4v.01"}),u("path",{d:"M20 8v.01"}),u("path",{d:"M20 12v.01"}),u("path",{d:"M20 16v.01"}),u("path",{d:"M20 20v.01"})]}),G),zE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 3v18"}),u("path",{d:"M19 21v-18"}),u("path",{d:"M5 7h14"}),u("path",{d:"M5 15h14"}),u("path",{d:"M8 13v4"}),u("path",{d:"M11 13v4"}),u("path",{d:"M16 13v4"}),u("path",{d:"M14 5v4"}),u("path",{d:"M11 5v4"}),u("path",{d:"M8 5v4"}),u("path",{d:"M3 21h18"})]}),G),FE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 12l18 0"}),u("path",{d:"M7 16l10 0l-10 5l0 -5"}),u("path",{d:"M7 8l10 0l-10 -5l0 5"})]}),G),HE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 3l0 18"}),u("path",{d:"M16 7l0 10l5 0l-5 -10"}),u("path",{d:"M8 7l0 10l-5 0l5 -10"})]}),G),uh=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"}),u("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"})]}),G),Od=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"}),u("path",{d:"M22 22l-3 -3"}),u("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),u("path",{d:"M3 11v-1"}),u("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),u("path",{d:"M10 3h1"}),u("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"})]}),G),UE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),u("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),u("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"}),u("path",{d:"M10 15l2 6l2 -6"}),u("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"})]}),G),GE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),u("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),u("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"}),u("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"}),u("path",{d:"M11 21v-6l3 6v-6"})]}),G),WE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M4 8l5 0"}),u("path",{d:"M15 8l4 0"})]}),G),VE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),u("path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),u("path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z"}),u("path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555"})]}),G),YE=A(B("g",{stroke:"currentColor",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"})]}),{...G,strokeWidth:1.5}),B7=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M21 12h-13l3 -3"}),u("path",{d:"M11 15l-3 -3"})]}),G),KE=A(B("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("path",{d:"M10 9l5 3l-5 3z"})]}),G),ZE=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 6h18"}),u("path",{d:"M3 12h18"}),u("path",{d:"M3 18h18"}),u("path",{d:"M6 3v18"}),u("path",{d:"M12 3v18"}),u("path",{d:"M18 3v18"})]}),G),XE=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("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"}),u("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"}),u("path",{d:"M17 5c-6.627 0 -12 5.373 -12 12"})]}),G),Sa=A(B("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 18l12 -12"}),u("path",{d:"M18 10v-4h-4"})]}),G),Ma=A(B("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4,19L10,19C11.097,19 12,18.097 12,17L12,9C12,7.903 12.903,7 14,7L21,7"}),u("path",{d:"M18 4l3 3l-3 3"})]}),G),La=A(B("g",{children:[u("path",{d:"M16,12L20,9L16,6"}),u("path",{d:"M6 20c0 -6.075 4.925 -11 11 -11h3"})]}),G),Bd=A(B("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 9l6 6l6 -6"})]}),G),$E=A(B("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 15l6 -6l6 6"})]}),G),jE=A(B("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 15l6 -6l6 6"})]}),G),hh=A(B("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"}),u("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"})]}),G),zd=A(B("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M19 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M5 7l0 10"}),u("path",{d:"M7 5l10 0"}),u("path",{d:"M7 19l10 0"}),u("path",{d:"M19 7l0 10"})]}),G),z7=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 11v8a1 1 0 0 0 1 1h8m-9 -14v-1a1 1 0 0 1 1 -1h1m5 0h2m5 0h1a1 1 0 0 1 1 1v1m0 5v2m0 5v1a1 1 0 0 1 -1 1h-1"}),u("path",{d:"M4 12h7a1 1 0 0 1 1 1v7"})]}),G),qE=A(B("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M14 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M4 6l8 0"}),u("path",{d:"M16 6l4 0"}),u("path",{d:"M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M4 12l2 0"}),u("path",{d:"M10 12l10 0"}),u("path",{d:"M17 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M4 18l11 0"}),u("path",{d:"M19 18l1 0"})]}),G),JE=A(B("g",{strokeWidth:1,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 10l4 -4 L6 14l8 -8 L6 18l12 -12 L10 18l8 -8 L14 18l4 -4"})]}),G),QE=A(B("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4"}),u("path",{d:"M13.5 6.5l4 4"})]}),G),F7=A(B("g",{strokeWidth:1,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M11 7l-5 5l5 5"}),u("path",{d:"M17 7l-5 5l5 5"})]}),G),ey=A(B("g",{strokeWidth:"1.75",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"}),u("path",{d:"M15 4l0 16"})]}),G),H7=A(B("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 20l1.3 -3.9c-2.324 -3.437 -1.426 -7.872 2.1 -10.374c3.526 -2.501 8.59 -2.296 11.845 .48c3.255 2.777 3.695 7.266 1.029 10.501c-2.666 3.235 -7.615 4.215 -11.574 2.293l-4.7 1"})]}),G),U7=A(B("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 4l18 0"}),u("path",{d:"M4 4v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-10"}),u("path",{d:"M12 16l0 4"}),u("path",{d:"M9 20l6 0"}),u("path",{d:"M8 12l3 -3l2 2l3 -3"})]}),G);import ty from"clsx";import fh,{useEffect as BT,useRef as oy,useState as zT}from"react";import NT from"react";import{jsx as gh}from"react/jsx-runtime";var OT=({size:e="1em",circleWidth:o=8,synchronized:t=!1,className:r=""})=>{let i=-(NT.useRef(Date.now()).current%1600);return gh("div",{className:`Spinner ${r}`,children:gh("svg",{viewBox:"0 0 100 100",style:{width:e,height:e,"--spinner-delay":t?`${i}ms`:0},children:gh("circle",{cx:"50",cy:"50",r:50-o/2,strokeWidth:o,fill:"none",strokeMiterlimit:"10"})})})},Ft=OT;import{jsx as as,jsxs as ls}from"react/jsx-runtime";var j=fh.forwardRef(({size:e="medium",visible:o=!0,className:t="",...r},n)=>{let{id:i}=$e(),a=fh.useRef(null);fh.useImperativeHandle(n,()=>a.current);let l=`ToolIcon_size_${e}`,[s,c]=zT(!1),m=oy(!0),d=async h=>{let b="onClick"in r&&r.onClick?.(h);if(hn(b))try{c(!0),await b}catch(f){if(f instanceof sa)console.warn(f);else throw f}finally{m.current&&c(!1)}};BT(()=>(m.current=!0,()=>{m.current=!1}),[]);let p=oy(null);if(r.type==="button"||r.type==="icon"||r.type==="submit"){let h=r.type==="icon"?"button":r.type;return ls("button",{className:ty("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:h,onClick:d,ref:a,disabled:s||r.isLoading||!!r.disabled,children:[(r.icon||r.label)&&ls("div",{className:"ToolIcon__icon","aria-hidden":"true","aria-disabled":!!r.disabled,children:[r.icon||r.label,r.keyBindingLabel&&as("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel}),r.isLoading&&as(Ft,{})]}),r.showAriaLabel&&ls("div",{className:"ToolIcon__label",children:[r["aria-label"]," ",s&&as(Ft,{})]}),r.children]})}return ls("label",{className:ty("ToolIcon",t),title:r.title,onPointerDown:h=>{p.current=h.pointerType||null,r.onPointerDown?.({pointerType:h.pointerType||null})},onPointerUp:()=>{requestAnimationFrame(()=>{p.current=null})},children:[as("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}),ls("div",{className:"ToolIcon__icon",children:[r.icon,r.keyBindingLabel&&as("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel})]})]})});j.displayName="ToolButton";var Fd=[],U=e=>(Fd=Fd.concat(e),e);import{jsx as HT}from"react/jsx-runtime";var FT=(e,o,t)=>{let r=new Set(te(e.filter(m=>ne(m)),o).map(m=>m.id)),n={},i=t.scene.getNonDeletedElementsMap(),a=new Set;for(let m of r){let d=Do(e,m);for(let p of d)if(!a.has(p.id)){if(ot(p)){let h=_o(p,i);h&&(n[h.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=ot(m)?_o(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 h=t.scene.getNonDeletedElementsMap().get(p.id);h&&Te(h)&&t.scene.mutateElement(h,{startBinding:m.id===h.startBinding?.elementId?null:h.startBinding,endBinding:m.id===h.endBinding?.elementId?null:h.endBinding})}),ee(m,{isDeleted:!0}))}return m.frameId&&r.has(m.frameId)?(l=!1,ot(m)||(n[m.id]=!0),ee(m,{frameId:null})):ot(m)&&o.selectedElementIds[m.containerId]?ee(m,{isDeleted:!0}):m}),c=o.editingGroupId;if(l&&o.editingGroupId){let m=Ye(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(b=>b===o.editingGroupId),h=d.groupIds[p+1];if(h){let b=Ye(s,h).filter(f=>!f.isDeleted);b.length>1&&(c=h,b.forEach(f=>{n[f.id]=!0}))}}}}return{elements:s,appState:{...o,...gt({selectedElementIds:n,editingGroupId:c},s,o,null)}}},ry=(e,o)=>{if(e.editingGroupId){let t=Ye(Ie(o),e.editingGroupId);if(t.length)return{...e,selectedElementIds:{[t[0].id]:!0}}}return e},ss=U({name:"deleteSelectedElements",label:"labels.delete",icon:vo,trackEvent:{category:"element",action:"delete"},perform:(e,o,t,r)=>{if(o.selectedLinearElement?.isEditing){let{elementId:a,selectedPointsIndices:l}=o.selectedLinearElement,s=r.scene.getNonDeletedElementsMap(),c=Z.getElement(a,s);if(!c||l==null)return!1;if(l.length>=c.points.length){let m=e.map(p=>p.id===c.id?ee(p,{isDeleted:!0}):p),d=ry(o,m);return{elements:m,appState:{...d,selectedLinearElement:null},captureUpdate:_.IMMEDIATELY}}return Z.deletePoints(c,r,l),{elements:e,appState:{...o,selectedLinearElement:{...o.selectedLinearElement,selectedPointsIndices:l?.[0]>0?[l[0]-1]:[0]}},captureUpdate:_.IMMEDIATELY}}let{elements:n,appState:i}=FT(e,o,r);return Xc(n,n.filter(a=>a.isDeleted)),i=ry(i,n),{elements:n,appState:{...i,activeTool:Pe(o,{type:r.state.preferredSelectionTool.type}),multiElement:null,newElement:null,activeEmbeddable:null,selectedLinearElement:null},captureUpdate:ze(Ie(e),o)?_.IMMEDIATELY:_.EVENTUALLY}},keyTest:(e,o,t)=>(e.key===T.BACKSPACE||e.key===T.DELETE)&&!e[T.CTRL_OR_CMD],PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=Lt()==="mobile";return HT(j,{type:"button",icon:vo,title:g("labels.delete"),"aria-label":g("labels.delete"),onClick:()=>t(null),disabled:!ze(Ie(e),o),style:{...n&&o.openPopup!=="compactOtherProperties"?Br:{}}})}});var O=e=>e.replace(/\b(Opt(?:ion)?|Alt)\b/i,io?g("keys.option"):g("keys.alt")).replace(/\bShift\b/i,g("keys.shift")).replace(/\b(Enter|Return)\b/i,g("keys.enter")).replace(/\b(Ctrl|Cmd|Command|CtrlOrCmd)\b/gi,io?g("keys.cmd"):g("keys.ctrl")).replace(/\b(Esc(?:ape)?)\b/i,g("keys.escape")).replace(/\b(Space(?:bar)?)\b/i,g("keys.spacebar")).replace(/\b(Del(?:ete)?)\b/i,g("keys.delete"));import{jsx as Hd}from"react/jsx-runtime";var bh=U({name:"sendBackward",label:"labels.sendBackward",keywords:["move down","zindex","layer"],icon:eh,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:O0(e,o,r.scene),appState:o,captureUpdate:_.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[T.CTRL_OR_CMD]&&!e.shiftKey&&e.code===ue.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>Hd("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendBackward")} \u2014 ${O("CtrlOrCmd+[")}`,children:eh})}),xh=U({name:"bringForward",label:"labels.bringForward",keywords:["move up","zindex","layer"],icon:Qu,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:B0(e,o,r.scene),appState:o,captureUpdate:_.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[T.CTRL_OR_CMD]&&!e.shiftKey&&e.code===ue.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>Hd("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.bringForward")} \u2014 ${O("CtrlOrCmd+]")}`,children:Qu})}),Eh=U({name:"sendToBack",label:"labels.sendToBack",keywords:["move down","zindex","layer"],icon:oh,trackEvent:{category:"element"},perform:(e,o)=>({elements:z0(e,o),appState:o,captureUpdate:_.IMMEDIATELY}),keyTest:e=>io?e[T.CTRL_OR_CMD]&&e.altKey&&e.code===ue.BRACKET_LEFT:e[T.CTRL_OR_CMD]&&e.shiftKey&&e.code===ue.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>Hd("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendToBack")} \u2014 ${io?O("CtrlOrCmd+Alt+["):O("CtrlOrCmd+Shift+[")}`,children:oh})}),yh=U({name:"bringToFront",label:"labels.bringToFront",keywords:["move up","zindex","layer"],icon:th,trackEvent:{category:"element"},perform:(e,o)=>({elements:F0(e,o),appState:o,captureUpdate:_.IMMEDIATELY}),keyTest:e=>io?e[T.CTRL_OR_CMD]&&e.altKey&&e.code===ue.BRACKET_RIGHT:e[T.CTRL_OR_CMD]&&e.shiftKey&&e.code===ue.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>Hd("button",{type:"button",className:"zIndexButton",onClick:t=>e(null),title:`${g("labels.bringToFront")} \u2014 ${io?O("CtrlOrCmd+Alt+]"):O("CtrlOrCmd+Shift+]")}`,children:th})});var vh=U({name:"selectAll",label:"labels.selectAll",icon:BE,trackEvent:{category:"canvas"},viewMode:!1,perform:(e,o,t,r)=>{if(o.selectedLinearElement?.isEditing)return!1;let n=e.filter(i=>!i.isDeleted&&!(X(i)&&i.containerId)&&!i.locked).reduce((i,a)=>(i[a.id]=!0,i),{});return{appState:{...o,...gt({editingGroupId:null,selectedElementIds:n},Ie(e),o,r),selectedLinearElement:Object.keys(n).length===1&&be(e[0])?new Z(e[0],re(e)):null},captureUpdate:_.IMMEDIATELY}},keyTest:e=>e[T.CTRL_OR_CMD]&&e.key===T.A});import{jsx as UT}from"react/jsx-runtime";var wh=U({name:"duplicateSelection",label:"labels.duplicateSelection",icon:Ql,trackEvent:{category:"element"},perform:(e,o,t,r)=>{if(o.selectedElementsAreBeingDragged)return!1;if(o.selectedLinearElement?.isEditing)try{let a=Z.duplicateSelectedPoints(o,r.scene);return{elements:e,appState:a,captureUpdate:_.IMMEDIATELY}}catch{return!1}let{duplicatedElements:n,elementsWithDuplicates:i}=vn({type:"in-place",elements:e,idsOfElementsToDuplicate:re(te(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+Zp/2,y:a.y+Zp/2,frameId:s??a.frameId}}});if(r.props.onDuplicate&&i){let a=r.props.onDuplicate(i,e);a&&(i=a)}return{elements:br(i,re(n)),appState:{...o,...Jc(n,Ie(i),o)},captureUpdate:_.IMMEDIATELY}},keyTest:e=>e[T.CTRL_OR_CMD]&&e.key===T.D,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=Lt()==="mobile";return UT(j,{type:"button",icon:Ql,title:`${g("labels.duplicateSelection")} \u2014 ${O("CtrlOrCmd+D")}`,"aria-label":g("labels.duplicateSelection"),onClick:()=>t(null),disabled:!ze(Ie(e),o),style:{...n&&o.openPopup!=="compactOtherProperties"?Br:{}}})}});import{useEffect as Gh,useMemo as E4,useRef as Wh,useState as y4}from"react";var GT=new Set(["command_palette","export"]),pe=(e,o,t,r)=>{try{if(typeof window>"u"||C.VITE_WORKER_ID||C.VITE_APP_ENABLE_TRACKING!=="true"||!GT.has(e)||Bt())return;C.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 KT from"clsx";import WT from"clsx";import{forwardRef as VT}from"react";import{jsx as YT}from"react/jsx-runtime";var Aa=VT((e,o)=>{let{title:t,className:r,testId:n,active:i,standalone:a,icon:l,onClick:s}=e;return YT("button",{type:"button",ref:o,title:t,"data-testid":n,className:WT(r,{standalone:a,active:i}),onClick:s,style:e.style,children:l},t)});import{Fragment as XT,jsx as Th,jsxs as ZT}from"react/jsx-runtime";var No=e=>Th(XT,{children:e.options.map(o=>e.type==="button"?Th(Aa,{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):ZT("label",{className:KT({active:e.value===o.value}),title:o.text,children:[Th("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 Xd from"@radix-ui/react-popover";import yy from"clsx";import{useRef as vy,useEffect as B6}from"react";import{jsx as $T}from"react/jsx-runtime";var Ud=()=>$T("div",{style:{width:1,height:"1rem",backgroundColor:"var(--default-border-color)",margin:"0 auto"}});import{useEffect as QT,useRef as e6}from"react";import{createPortal as t6}from"react-dom";import ny from"react";var Ih=ny.createContext(null),Re=()=>ny.useContext(Ih);import{useState as jT,useLayoutEffect as iy}from"react";var Gd=e=>{let[o,t]=jT(null),r=ve(),{theme:n}=Re(),{container:i}=$e();return iy(()=>{o&&(o.className="",o.classList.add("excalidraw",...e?.className?.split(/\s+/)||[]),o.classList.toggle("excalidraw--mobile",r.formFactor==="phone"),o.classList.toggle("theme--dark",n===oe.DARK))},[o,n,r.formFactor,e?.className]),iy(()=>{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 qT}from"react";function _a(e,o,t){qT(()=>{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 JT}from"react";var Sn=e=>{let o=JT(e);return Object.assign(o.current,e),o.current};import{jsx as o6}from"react/jsx-runtime";var Mn=Le(null),ay=({onCancel:e,onChange:o,onSelect:t,colorPickerType:r})=>{let n=Gd({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),i=Re(),a=Ln(),l=dt(),s=te(a,i),c=Sn({app:l,onCancel:e,onChange:o,onSelect:t,selectedElements:s}),{container:m}=$e();QT(()=>{let p=d.current;if(!p||!l.canvas||!n)return;let h=!1,b=l.canvas.getContext("2d"),f=({clientX:S,clientY:P})=>{let M=b.getImageData((S-i.offsetLeft)*window.devicePixelRatio,(P-i.offsetTop)*window.devicePixelRatio,1,1).data;return k1(M[0],M[1],M[2])},y=({clientX:S,clientY:P,altKey:M})=>{p.style.top=`${P+20}px`,p.style.left=`${S+20}px`;let F=f({clientX:S,clientY:P});h&&c.onChange(r,F,c.selectedElements,{altKey:M}),p.style.background=F},v=()=>{c.onCancel()},x=(S,P)=>{c.onSelect(S,P)},E=S=>{h=!0,S.stopImmediatePropagation()},w=S=>{h=!1,m?.focus(),S.stopImmediatePropagation(),S.preventDefault(),x(f(S),S)},I=S=>{S.key===T.ESCAPE&&(S.preventDefault(),S.stopImmediatePropagation(),v())};return n.tabIndex=-1,n.focus(),y({clientX:c.app.lastViewportPosition.x,clientY:c.app.lastViewportPosition.y,altKey:!1}),n.addEventListener("keydown",I),n.addEventListener("pointerdown",E),n.addEventListener("pointerup",w),window.addEventListener("pointermove",y,{passive:!0}),window.addEventListener("blur",v),()=>{h=!1,n.removeEventListener("keydown",I),n.removeEventListener("pointerdown",E),n.removeEventListener("pointerup",w),window.removeEventListener("pointermove",y),window.removeEventListener("blur",v)}},[c,l.canvas,n,r,m,i.offsetLeft,i.offsetTop]);let d=e6(null);return _a(d,()=>{e()},p=>!!p.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")),n?t6(o6("div",{ref:d,className:"excalidraw-eye-dropper-preview"}),n):null};import*as Pa from"@radix-ui/react-popover";import a6 from"clsx";import l6 from"react";import r6 from"react";import n6 from"clsx";import{jsx as i6}from"react/jsx-runtime";var ft=r6.forwardRef(({children:e,padding:o,className:t,style:r},n)=>i6("div",{className:n6("Island",t),style:{"--padding":o,...r},ref:n,children:e}));import{jsx as Ch,jsxs as s6}from"react/jsx-runtime";var Zr=l6.forwardRef(({className:e,container:o,children:t,style:r,onClose:n,onKeyDown:i,onFocusOutside:a,onPointerLeave:l,onPointerDownOutside:s,preventAutoFocusOnTouch:c=!1},m)=>{let d=ve(),p=d.formFactor==="phone"&&!d.isLandscape;return Ch(Pa.Portal,{container:o,children:s6(Pa.Content,{ref:m,className:a6("focus-visible-none",e),"data-prevent-outside-click":!0,side:p?"bottom":"right",align:p?"center":"start",alignOffset:-16,sideOffset:20,collisionBoundary:o??void 0,style:{zIndex:"var(--zIndex-ui-styles-popup)",marginLeft:d.formFactor==="phone"?"0.5rem":void 0},onPointerLeave:l,onKeyDown:i,onFocusOutside:a,onPointerDownOutside:s,onOpenAutoFocus:h=>{c&&d.isTouchScreen&&h.preventDefault()},onCloseAutoFocus:h=>{h.stopPropagation(),h.preventDefault(),o&&!J1(document.activeElement)&&o.focus(),n()},children:[Ch(ft,{padding:3,style:r,children:t}),Ch(Pa.Arrow,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})});import{useState as c6,useCallback as kh}from"react";var Wd=()=>document.querySelector(".excalidraw-wysiwyg"),Vd=()=>{let e=Wd();return e?{start:e.selectionStart,end:e.selectionEnd}:null},cs=e=>{setTimeout(()=>{let o=Wd();o&&(o.focus(),e&&(o.selectionStart=e.start,o.selectionEnd=e.end))},0)},ds=(e,o,t,r)=>{o&&r&&r();let n=o&&t?Vd():null;e(),o&&t&&cs(n)},ly=()=>{let[e,o]=c6(null),t=kh(()=>{let i=Vd();o(i)},[]),r=kh(()=>{setTimeout(()=>{let i=Wd();i&&(i.focus(),e&&(i.selectionStart=e.start,i.selectionEnd=e.end,o(null)))},0)},[e]),n=kh(()=>{o(null)},[]);return{saveCaretPosition:t,restoreCaretPosition:r,clearSavedPosition:n,hasSavedPosition:!!e}},sy=(e=100)=>{let o=Wd();if(o){let t=o.onblur;o.onblur=null,setTimeout(()=>{o.onblur=t},e)}};import m6 from"clsx";import{useCallback as p6,useEffect as Mh,useRef as dy,useState as u6}from"react";import h6 from"tinycolor2";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},ms=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),Sh=({color:e,palette:o})=>!Object.values(o).flat().includes(e),cy=(e,o,t)=>{let r={elementBackground:"backgroundColor",elementStroke:"strokeColor"},n=e.filter(a=>{if(a.isDeleted)return!1;let l=a[r[o]];return Sh({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,E1)},Oo=Le(null),d6=(e,o,t)=>(e*299+o*587+t*114)/1e3,yi=(e,o=160)=>{if(!e)return!0;if(Eo(e))return!1;let t=x1(e);if(!t.isValid())return!0;let{r,g:n,b:i}=t.toRgb();return d6(r,n,i)<o};import{Fragment as f6,jsx as Yd,jsxs as my}from"react/jsx-runtime";var g6=e=>{if(e=e.trim(),Eo(e))return e;let o=h6(e);return o.isValid()?o.getFormat()==="hex"&&!e.startsWith("#")?`#${e}`:e:null},py=({color:e,onChange:o,label:t,colorPickerType:r,placeholder:n})=>{let i=ve(),[a,l]=u6(e),[s,c]=Ee(Oo);Mh(()=>{l(e)},[e]);let m=p6(f=>{let y=f.toLowerCase(),v=g6(y);v&&o(v),l(y)},[o]),d=dy(null),p=dy(null);Mh(()=>{d.current&&d.current.focus()},[s]);let[h,b]=Ee(Mn);return Mh(()=>()=>{b(null)},[b]),my("div",{className:"color-picker__input-label",children:[Yd("div",{className:"color-picker__input-hash",children:"#"}),Yd("input",{ref:s==="hex"?d:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":t,onChange:f=>{m(f.target.value)},value:(a||"").replace(/^#/,""),onBlur:()=>{l(e)},tabIndex:-1,onFocus:()=>c("hex"),onKeyDown:f=>{f.key!==T.TAB&&(f.key===T.ESCAPE&&p.current?.focus(),f.stopPropagation())},placeholder:n}),i.formFactor!=="phone"&&my(f6,{children:[Yd("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),Yd("div",{ref:p,className:m6("excalidraw-eye-dropper-trigger",{selected:h}),onClick:()=>b(f=>f?null:{keepOpenOnAlt:!1,onSelect:y=>o(y),colorPickerType:r}),title:`${g("labels.eyeDropper")} \u2014 ${T.I.toLocaleUpperCase()} or ${O("Alt")} `,children:LE})]})]})};import Ph,{useEffect as Dh,useImperativeHandle as R6,useState as N6}from"react";import E6 from"clsx";import{useEffect as y6,useRef as v6}from"react";import{jsxs as x6}from"react/jsx-runtime";var b6=({color:e,keyLabel:o,isShade:t=!1})=>x6("div",{className:"color-picker__button__hotkey-label",style:{color:yi(e)?"#fff":"#000"},children:[t&&"\u21E7",o]}),Da=b6;import{jsx as Lh,jsxs as w6}from"react/jsx-runtime";var uy=({colors:e,color:o,onChange:t,label:r})=>{let[n,i]=Ee(Oo),a=v6(null);return y6(()=>{a.current&&a.current.focus()},[o,n]),Lh("div",{className:"color-picker-content--default",children:e.map((l,s)=>w6("button",{ref:o===l?a:void 0,tabIndex:-1,type:"button",className:E6("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:[Lh("div",{className:"color-picker__button-outline"}),Lh(Da,{color:l,keyLabel:s+1})]},s))})};import T6 from"clsx";import{useEffect as I6,useRef as C6}from"react";import{jsx as Ah,jsxs as S6}from"react/jsx-runtime";var k6=({palette:e,color:o,onChange:t,activeShade:r,showHotKey:n=!0})=>{let i=An({color:o,palette:e}),[a,l]=Ee(Oo),s=C6(null);return I6(()=>{s.current&&a==="baseColors"&&s.current.focus()},[i?.colorName,a]),Ah("div",{className:"color-picker-content--default",children:Object.entries(e).map(([c,m],d)=>{let p=(Array.isArray(m)?m[r]:m)||"transparent",h=ms[d],b=g(`colors.${c.replace(/\d+/,"")}`,null,"");return S6("button",{ref:i?.colorName===c?s:void 0,tabIndex:-1,type:"button",className:T6("color-picker__button color-picker__button--large has-outline",{active:i?.colorName===c,"is-transparent":p==="transparent"||!p}),onClick:()=>{t(p),l("baseColors")},title:`${b}${p.startsWith("#")?` ${p}`:""} \u2014 ${h}`,"aria-label":`${b} \u2014 ${h}`,style:p?{"--swatch-color":p}:void 0,"data-testid":`color-${c}`,children:[Ah("div",{className:"color-picker__button-outline"}),n&&Ah(Da,{color:p,keyLabel:h})]},c)})})},hy=k6;import{jsx as L6}from"react/jsx-runtime";var M6=({children:e})=>L6("div",{className:"color-picker__heading",children:e}),Ra=M6;import A6 from"clsx";import{useEffect as _6,useRef as P6}from"react";import{jsx as ps,jsxs as gy}from"react/jsx-runtime";var fy=({color:e,onChange:o,palette:t,showHotKey:r})=>{let n=An({color:e||"transparent",palette:t}),[i,a]=Ee(Oo),l=P6(null);if(_6(()=>{l.current&&i==="shades"&&l.current.focus()},[n,i]),n){let{colorName:s,shade:c}=n,m=t[s];if(Array.isArray(m))return ps("div",{className:"color-picker-content--default shades",children:m.map((d,p)=>gy("button",{ref:p===c&&i==="shades"?l:void 0,tabIndex:-1,type:"button",className:A6("color-picker__button color-picker__button--large has-outline",{active:p===c}),"aria-label":"Shade",title:`${s} - ${p+1}`,style:d?{"--swatch-color":d}:void 0,onClick:()=>{o(d),a("shades")},children:[ps("div",{className:"color-picker__button-outline"}),r&&ps(Da,{color:d,keyLabel:p+1,isShade:!0})]},p))})}return gy("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[ps("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),ps("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 _h=(e,o,t)=>{let r=Math.ceil(t/$n);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+$n;return n>=t?o%$n:n}case"ArrowUp":{let n=o-$n,i=n<0?$n*r+n:n;return i>=t?void 0:i}}},D6=({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(ms.includes(e.key)){let l=ms.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},by=({event:e,activeColorPickerSection:o,palette:t,color:r,onChange:n,customColors:i,setActiveColorPickerSection:a,updateData:l,activeShade:s,onEyeDropperToggle:c,onEscape:m})=>{if(e[T.CTRL_OR_CMD])return!1;if(e.key===T.ESCAPE)return m(e),!0;if(e.key===T.ALT)return c(!0),!0;if(e.key===T.I)return c(),!0;let d=An({color:r,palette:t});if(e.key===T.TAB){let p={custom:!!i.length,baseColors:!0,shades:d?.shade!=null,hex:!0},h=Object.entries(p).reduce((x,[E,w])=>(w&&x.push(E),x),[]),b=h.indexOf(o),f=e.shiftKey?-1:1,y=b+f>h.length-1?0:b+f<0?h.length-1:b+f,v=h[y];return v&&a(v),v==="custom"?n(i[0]):v==="baseColors"&&(Object.entries(t).find(([E,w])=>Array.isArray(w)?w.includes(r):w===r?E:null)||n(Mo.black)),e.preventDefault(),e.stopPropagation(),!0}if(D6({e,colorObj:d,onChange:n,palette:t,customColors:i,setActiveColorPickerSection:a,activeShade:s}))return!0;if(o==="shades"&&d){let{shade:p}=d,h=_h(e.key,p,$n);if(h!==void 0)return n(t[d.colorName][h]),!0}if(o==="baseColors"&&d){let{colorName:p}=d,h=Object.keys(t),b=h.indexOf(p),f=_h(e.key,b,h.length);if(f!==void 0){let y=h[f],v=t[y];return n(Array.isArray(v)?v[s]:v),!0}}if(o==="custom"){let p=r!=null?i.indexOf(r):0,h=_h(e.key,p,i.length);if(h!==void 0){let b=i[h];return n(b),!0}}return!1};import{jsx as _n,jsxs as Kd}from"react/jsx-runtime";var xy=Ph.forwardRef(({color:e,onChange:o,type:t,elements:r,palette:n,updateData:i,children:a,showTitle:l,onEyeDropperToggle:s,onEscape:c,showHotKey:m=!0},d)=>{let p=l?t==="elementStroke"?g("labels.stroke"):t==="elementBackground"?g("labels.background"):null:null,[h]=Ph.useState(()=>t==="canvasBackground"?[]:cy(r,t,n)),[b,f]=Ee(Oo),y=An({color:e,palette:n});Dh(()=>{if(!b){let w=!!e&&Sh({color:e,palette:n}),I=w&&!h.includes(e);f(I?null:w?"custom":y?.shade!=null?"shades":"baseColors")}},[b,e,n,f,y,h]);let[v,x]=N6(y?.shade??(t==="elementBackground"?w1:v1));Dh(()=>{y?.shade!=null&&x(y.shade);let w=I=>{I.key===T.ALT&&s(!1)};return document.addEventListener("keyup",w,{capture:!0}),()=>{document.removeEventListener("keyup",w,{capture:!0})}},[y,s]);let E=Ph.useRef(null);return R6(d,()=>E.current),Dh(()=>{E?.current?.focus()},[]),_n("div",{role:"dialog","aria-modal":"true","aria-label":g("labels.colorPicker"),children:Kd("div",{ref:E,onKeyDown:w=>{by({event:w,activeColorPickerSection:b,palette:n,color:e,onChange:o,onEyeDropperToggle:s,customColors:h,setActiveColorPickerSection:f,updateData:i,activeShade:v,onEscape:c})&&(w.preventDefault(),w.stopPropagation())},className:"color-picker-content properties-content",tabIndex:-1,children:[p&&_n("div",{className:"color-picker__title",children:p}),!!h.length&&Kd("div",{children:[_n(Ra,{children:g("colorPicker.mostUsedCustomColors")}),_n(uy,{colors:h,color:e,label:g("colorPicker.mostUsedCustomColors"),onChange:o})]}),Kd("div",{children:[_n(Ra,{children:g("colorPicker.colors")}),_n(hy,{color:e,palette:n,onChange:o,activeShade:v,showHotKey:m})]}),Kd("div",{children:[_n(Ra,{children:g("colorPicker.shades")}),_n(fy,{color:e,onChange:o,palette:n,showHotKey:m})]}),a]})})});import O6 from"clsx";import{jsx as Rh}from"react/jsx-runtime";var Ey=({onChange:e,type:o,activeColor:t,topPicks:r})=>{let n;return o==="elementStroke"&&(n=uc),o==="elementBackground"&&(n=hc),o==="canvasBackground"&&(n=gc),r&&(n=r),n?Rh("div",{className:"color-picker__top-picks",children:n.map(i=>Rh("button",{className:O6("color-picker__button",{active:i===t,"is-transparent":i==="transparent"||!i,"has-outline":!yi(i,Il)}),style:{"--swatch-color":i},type:"button",title:i,onClick:()=>e(i),"data-testid":`color-top-pick-${i}`,children:Rh("div",{className:"color-picker__button-outline"})},i))}):(console.error("Invalid type for TopPicks"),null)};import{jsx as Bo,jsxs as Zd}from"react/jsx-runtime";var z6=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=Mo,updateData:a,getOpenPopup:l,appState:s})=>{let{container:c}=$e(),m=Lt(),d=m!=="full",p=m==="mobile",[,h]=Ee(Oo),[b,f]=Ee(Mn),y=Zd("div",{children:[Bo(Ra,{children:g("colorPicker.hexCode")}),Bo(py,{color:o||"",label:r,onChange:E=>{t(E)},colorPickerType:e,placeholder:g("colorPicker.color")})]}),v=vy(null),x=()=>{v.current?.focus()};return Bo(Zr,{container:c,style:{maxWidth:"13rem"},preventAutoFocusOnTouch:!!s.editingTextElement,onFocusOutside:E=>{ao(E.target)||x(),E.preventDefault()},onPointerDownOutside:E=>{b&&E.preventDefault()},onClose:()=>{l()===e&&a({openPopup:null}),h(null),s.editingTextElement&&setTimeout(()=>{let E=document.querySelector(".excalidraw-wysiwyg");E&&E.focus()},0)},children:i?Bo(xy,{ref:v,palette:i,color:o,onChange:E=>{let w=s.editingTextElement?Vd():null;t(E),s.editingTextElement&&w&&cs(w)},onEyeDropperToggle:E=>{f(w=>E?(w=w||{keepOpenOnAlt:!0,onSelect:t,colorPickerType:e},w.keepOpenOnAlt=!0,w):E===!1||w?null:{keepOpenOnAlt:!1,onSelect:t,colorPickerType:e})},onEscape:E=>{b?f(null):a({openPopup:null})},type:e,elements:n,updateData:a,showTitle:d,showHotKey:!p,children:y}):y})},F6=({label:e,color:o,type:t,mode:r="background",onToggle:n,editingTextElement:i})=>{let a=Lt(),l=a!=="full",s=a==="mobile",c=m=>{m.preventDefault(),m.stopPropagation(),i&&sy(),n()};return Zd(Xd.Trigger,{type:"button",className:yy("color-picker__button active-color properties-trigger",{"is-transparent":!o||o==="transparent","has-outline":!o||!yi(o,Il),"compact-sizing":l,"mobile-border":s}),"aria-label":e,style:o?{"--swatch-color":o}:void 0,title:t==="elementStroke"?g("labels.showStroke"):g("labels.showBackground"),"data-openpopup":t,onClick:c,children:[Bo("div",{className:"color-picker__button-outline",children:!o&&Dx}),l&&o&&r==="stroke"&&Bo("div",{className:"color-picker__button-background",children:Bo("span",{style:{color:o&&yi(o,Il)?"#fff":"#111"},children:JE})})]})},us=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=Mo,topPicks:a,updateData:l,appState:s})=>{let c=vy(s.openPopup);B6(()=>{c.current=s.openPopup},[s.openPopup]);let d=Lt()!=="full";return Bo("div",{children:Zd("div",{role:"dialog","aria-modal":"true",className:yy("color-picker-container",{"color-picker-container--no-top-picks":d}),children:[!d&&Bo(Ey,{activeColor:o,onChange:t,type:e,topPicks:a}),!d&&Bo(Ud,{}),Zd(Xd.Root,{open:s.openPopup===e,onOpenChange:p=>{p&&l({openPopup:e})},children:[Bo(F6,{color:o,label:r,type:e,mode:e==="elementStroke"?"stroke":"background",editingTextElement:!!s.editingTextElement,onToggle:()=>{s.openPopup===e?l({openPopup:null}):s.openPopup?l({openPopup:e}):l({openPopup:e})}}),s.openPopup===e&&Bo(z6,{type:e,color:o,onChange:t,label:r,elements:n,palette:i,updateData:l,getOpenPopup:()=>c.current,appState:s})]})]})})};import*as _y from"@radix-ui/react-popover";import l4 from"clsx";import s4,{useCallback as c4,useMemo as d4}from"react";import o4,{useMemo as Pn,useState as r4,useRef as n4,useEffect as i4,useCallback as Cy}from"react";import H6 from"clsx";import U6 from"react";import{jsx as G6,jsxs as W6}from"react/jsx-runtime";var $d=U6.forwardRef(({className:e,placeholder:o,onChange:t},r)=>W6("div",{className:H6("QuickSearch__wrapper",e),children:[wo,G6("input",{ref:r,className:"QuickSearch__input",type:"text",placeholder:o,onChange:n=>t(n.target.value.trim().toLowerCase())})]}));import V6 from"clsx";import{Children as Y6}from"react";import{jsx as wy}from"react/jsx-runtime";var jd=({className:e,placeholder:o,children:t})=>{let r=!Y6.count(t);return wy("div",{className:V6("ScrollableList__wrapper",e),role:"menu",children:r?wy("div",{className:"empty",children:o}):t})};import{jsx as K6,jsxs as Z6}from"react/jsx-runtime";var Ty=({children:e,className:o="",style:t,title:r})=>Z6("div",{className:`dropdown-menu-group ${o}`,style:t,children:[r&&K6("p",{className:"dropdown-menu-group-title",children:r}),e]}),hs=Ty;Ty.displayName="DropdownMenuGroup";import{useEffect as e4,useRef as t4}from"react";import{jsx as X6}from"react/jsx-runtime";var gs=({children:e,...o})=>X6("span",{...o,style:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",...o.style},children:e});import{Fragment as j6,jsx as qd,jsxs as q6}from"react/jsx-runtime";var $6=({textStyle:e,icon:o,shortcut:t,children:r})=>{let n=ve();return q6(j6,{children:[o&&qd("div",{className:"dropdown-menu-item__icon",children:o}),qd("div",{style:e,className:"dropdown-menu-item__text",children:qd(gs,{children:r})}),t&&n.formFactor!=="phone"&&qd("div",{className:"dropdown-menu-item__shortcut",children:t})]})},Jd=$6;import J6,{useContext as Q6}from"react";var Nh=J6.createContext({}),Qd=(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(),em=(e,o)=>{let t=Q6(Nh);return gn(e,r=>{let n=new CustomEvent("menu.itemSelect",{bubbles:!0,cancelable:!0});o?.(n),n.defaultPrevented||t.onSelect?.(n)})};import{jsx as Oh}from"react/jsx-runtime";var Bh=({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=em(m,c),h=t4(null);return e4(()=>{a&&(t===0?h.current?.scrollIntoView({block:"end"}):h.current?.scrollIntoView({block:"nearest"}))},[a,t]),Oh("button",{...d,ref:h,value:o,onClick:p,className:Qd(i,l,a),title:d.title??d["aria-label"],children:Oh(Jd,{textStyle:s,icon:e,shortcut:n,children:r})})};Bh.displayName="DropdownMenuItem";var Na={GREEN:"green",RED:"red",BLUE:"blue"},tm=({type:e=Na.BLUE,children:o})=>{let{theme:t}=Cr(),r={display:"inline-flex",marginLeft:"auto",padding:"2px 4px",borderRadius:6,fontSize:9,fontFamily:"Cascadia, monospace",border:t===oe.LIGHT?"1.5px solid white":"none"};switch(e){case Na.GREEN:Object.assign(r,{backgroundColor:"var(--background-color-badge)",color:"var(--color-badge)"});break;case Na.RED:Object.assign(r,{backgroundColor:"pink",color:"darkred"});break;case Na.BLUE:default:Object.assign(r,{background:"var(--color-promo)",color:"var(--color-surface-lowest)"})}return Oh("div",{className:"DropDownMenuItemBadge",style:r,children:o})};tm.displayName="DropdownMenuItemBadge";Bh.Badge=tm;var $t=Bh;var Iy=({event:e,inputRef:o,hoveredFont:t,filteredFonts:r,onClose:n,onSelect:i,onHover:a})=>{if(!e[T.CTRL_OR_CMD]&&e.shiftKey&&e.key.toLowerCase()===T.F)return o.current?.focus(),!0;if(e.key===T.ESCAPE)return n(),!0;if(e.key===T.ENTER)return t?.value&&i(t.value),!0;if(e.key===T.ARROW_DOWN)return t?.next?a(t.next.value):r[0]?.value&&a(r[0].value),!0;if(e.key===T.ARROW_UP)return t?.prev?a(t.prev.value):r[r.length-1]?.value&&a(r[r.length-1].value),!0};import{jsx as fs,jsxs as ky}from"react/jsx-runtime";var a4=e=>{switch(e){case It.Excalifont:case It.Virgil:return Tr;case It.Nunito:case It.Helvetica:return rs;case It["Lilita One"]:return bE;case It["Comic Shanns"]:case It.Cascadia:return Dd;default:return rs}},Sy=o4.memo(({selectedFontFamily:e,hoveredFontFamily:o,onSelect:t,onHover:r,onLeave:n,onOpen:i,onClose:a})=>{let{container:l}=$e(),s=dt(),{fonts:c}=s,{showDeprecatedFonts:m}=Vt(),d=Lt(),[p,h]=r4(""),b=n4(null),f=Pn(()=>Array.from(wn.registered.entries()).filter(([D,{metadata:N}])=>!N.private&&!N.fallback).map(([D,{metadata:N,fontFaces:Y}])=>{let J={value:D,icon:a4(D),text:Y[0]?.fontFace?.family??"Unknown"};return N.deprecated&&Object.assign(J,{deprecated:N.deprecated,badge:{type:Na.RED,placeholder:g("fontList.badge.old")}}),J}).sort((D,N)=>D.text.toLowerCase()>N.text.toLowerCase()?1:-1),[]),y=Pn(()=>new Set(c.getSceneFamilies()),[e]),v=Pn(()=>f.filter(D=>y.has(D.value)),[f,y]),x=Pn(()=>f.filter(D=>!y.has(D.value)&&(m||!D.deprecated)),[f,y,m]),E=Pn(()=>lb([...v,...x].filter(D=>D.text?.toLowerCase().includes(p))),[v,x,p]),w=Pn(()=>{let D;return o?D=E.find(N=>N.value===o):e&&(D=E.find(N=>N.value===e)),!D&&p&&(E[0]?.value?r(E[0].value):n()),D},[o,e,p,E,r,n]),I=Cy(D=>{let N=null;if(s.state.editingTextElement){let Y=document.querySelector(".excalidraw-wysiwyg");Y&&(N={start:Y.selectionStart,end:Y.selectionEnd})}t(D),s.state.editingTextElement&&N&&setTimeout(()=>{let Y=document.querySelector(".excalidraw-wysiwyg");Y&&N&&(Y.focus(),Y.selectionStart=N.start,Y.selectionEnd=N.end)},0)},[t,s.state.editingTextElement]),S=Cy(D=>{Iy({event:D,inputRef:b,hoveredFont:w,filteredFonts:E,onSelect:I,onHover:r,onClose:a})&&(D.preventDefault(),D.stopPropagation())},[w,E,I,r,a]);i4(()=>(i(),()=>{a()}),[]);let P=Pn(()=>E.filter(D=>y.has(D.value)),[E,y]),M=Pn(()=>E.filter(D=>!y.has(D.value)),[E,y]),F=(D,N)=>ky($t,{icon:D.icon,value:D.value,order:N,textStyle:{fontFamily:ti({fontFamily:D.value})},hovered:D.value===w?.value,selected:D.value===e,tabIndex:D.value===e?0:-1,onClick:Y=>{I(Number(Y.currentTarget.value))},onMouseMove:()=>{w?.value!==D.value&&r(D.value)},children:[D.text,D.badge&&fs(tm,{type:D.badge.type,children:D.badge.placeholder})]},D.value),R=[];return P.length&&R.push(fs(hs,{title:g("fontList.sceneFonts"),children:P.map(F)},"group_1")),M.length&&R.push(fs(hs,{title:g("fontList.availableFonts"),children:M.map((D,N)=>F(D,N+P.length))},"group_2")),ky(Zr,{className:"properties-content",container:l,style:{width:"15rem"},onClose:()=>{a(),s.state.editingTextElement&&setTimeout(()=>{let D=document.querySelector(".excalidraw-wysiwyg");D&&D.focus()},0)},onPointerLeave:n,onKeyDown:S,preventAutoFocusOnTouch:!!s.state.editingTextElement,children:[d==="full"&&fs($d,{ref:b,placeholder:g("quickSearch.placeholder"),onChange:oi(h,20)}),fs(jd,{className:"dropdown-menu fonts manual-hover",placeholder:g("fontList.empty"),children:R.length?R:null})]})},(e,o)=>e.selectedFontFamily===o.selectedFontFamily&&e.hoveredFontFamily===o.hoveredFontFamily);import*as My from"@radix-ui/react-popover";import{jsx as zh}from"react/jsx-runtime";var Ly=({selectedFontFamily:e,isOpened:o=!1,compactMode:t=!1})=>{let r=ye(),n=t?{...Br,width:"2rem",height:"2rem"}:{};return zh(My.Trigger,{asChild:!0,children:zh("div",{"data-openpopup":"fontFamily",className:"properties-trigger",children:zh(Aa,{standalone:!0,icon:Ir,title:g("labels.showFonts"),className:"properties-trigger",testId:"font-family-show-fonts",active:o,onClick:()=>{r(i=>({openPopup:i.openPopup==="fontFamily"?null:i.openPopup}))},style:{border:"none",...n}})})})};import{jsx as bs,jsxs as Ay}from"react/jsx-runtime";var Py=[{value:It.Excalifont,icon:Tr,text:g("labels.handDrawn"),testId:"font-family-hand-drawn"},{value:It.Nunito,icon:rs,text:g("labels.normal"),testId:"font-family-normal"},{value:It["Comic Shanns"],icon:Dd,text:g("labels.code"),testId:"font-family-code"}],XN=new Set(Py.map(e=>e.value));var Dy=s4.memo(({isOpened:e,selectedFontFamily:o,hoveredFontFamily:t,onSelect:r,onHover:n,onLeave:i,onPopupChange:a,compactMode:l=!1})=>{let s=d4(()=>Py,[]),c=c4(m=>{m&&r(m)},[r]);return Ay("div",{role:"dialog","aria-modal":"true",className:l4("FontPicker__container",{"FontPicker__container--compact":l}),children:[!l&&bs("div",{className:"buttonList",children:bs(No,{type:"button",options:s,value:o,onClick:c})}),!l&&bs(Ud,{}),Ay(_y.Root,{open:e,onOpenChange:a,children:[bs(Ly,{selectedFontFamily:o,isOpened:e,compactMode:l}),e&&bs(Sy,{selectedFontFamily:o,hoveredFontFamily:t,onSelect:c,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 Oa from"@radix-ui/react-popover";import h4 from"clsx";import om,{useEffect as g4}from"react";import{jsx as m4}from"react/jsx-runtime";var Dn=({className:e,icon:o,size:t="1em"})=>m4("span",{className:e,style:{width:t,height:"100%",margin:"0 0.5ex 0 0.5ex",display:"inline-flex",lineHeight:0,verticalAlign:"middle",flex:"0 0 auto"},children:o});import{Fragment as u4,jsx as Ry,jsxs as Ny}from"react/jsx-runtime";var p4=({label:e,open:o,openTrigger:t,children:r,className:n,showCollapsedIcon:i=!0})=>Ny(u4,{children:[Ny("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center"},className:n,onClick:t,children:[e,i&&Ry(Dn,{icon:o?$E:Bd})]}),o&&Ry("div",{style:{display:"flex",flexDirection:"column"},children:r})]}),xs=p4;import{jsx as vi,jsxs as Fh}from"react/jsx-runtime";var f4=Le(!1);function b4({options:e,value:o,label:t,onChange:r,onClose:n,numberOfOptionsToAlwaysShow:i=e.length}){let a=ve(),{container:l}=$e(),s=f=>{let y=e.find(v=>v.keyBinding===f.key.toLowerCase());if(!(f.metaKey||f.altKey||f.ctrlKey)&&y)r(y.value),f.preventDefault();else if(f.key===T.TAB){let v=e.findIndex(E=>E.value===o),x=f.shiftKey?(e.length+v-1)%e.length:(v+1)%e.length;r(e[x].value)}else if(ei(f.key)){let v=Kr().rtl,x=e.findIndex(E=>E.value===o);if(x!==-1){let E=e.length,w=x;switch(f.key){case(v?T.ARROW_LEFT:T.ARROW_RIGHT):w=(x+1)%E;break;case(v?T.ARROW_RIGHT:T.ARROW_LEFT):w=(E+x-1)%E;break;case T.ARROW_DOWN:{w=(x+(i??1))%E;break}case T.ARROW_UP:{w=(E+x-(i??1))%E;break}}r(e[w].value)}f.preventDefault()}else(f.key===T.ESCAPE||f.key===T.ENTER)&&(f.preventDefault(),n());f.nativeEvent.stopImmediatePropagation(),f.stopPropagation()},[c,m]=Ee(f4),d=om.useMemo(()=>e.slice(0,i),[e,i]),p=om.useMemo(()=>e.slice(i),[e,i]);g4(()=>{d.some(f=>f.value===o)||m(!0)},[o,d,m]);let h=f=>vi("div",{className:"picker-content",children:f.map((y,v)=>Fh("button",{type:"button",className:h4("picker-option",{active:o===y.value}),onClick:x=>{r(y.value)},title:`${y.text} ${y.keyBinding&&`\u2014 ${y.keyBinding.toUpperCase()}`}`,"aria-label":y.text||"none","aria-keyshortcuts":y.keyBinding||void 0,ref:x=>{o===y.value&&setTimeout(()=>{x?.focus()},0)},children:[y.icon,y.keyBinding&&vi("span",{className:"picker-keybinding",children:y.keyBinding})]},y.text))}),b=a.formFactor==="phone";return vi(Oa.Content,{side:b?"right":"bottom",align:"start",sideOffset:b?8:12,style:{zIndex:"var(--zIndex-ui-styles-popup)"},onKeyDown:s,collisionBoundary:l??void 0,children:Fh("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":t,children:[h(d),p.length>0&&vi(xs,{label:g("labels.more_options"),open:c,openTrigger:()=>{m(f=>!f)},className:"picker-collapsible",children:h(p)})]})})}function Hh({value:e,label:o,options:t,onChange:r,group:n="",numberOfOptionsToAlwaysShow:i}){let[a,l]=om.useState(!1),s=om.useRef(null);return vi("div",{children:Fh(Oa.Root,{open:a,onOpenChange:c=>l(c),children:[vi(Oa.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&&vi(b4,{options:t,value:e,label:o,onChange:r,onClose:()=>{l(!1)},numberOfOptionsToAlwaysShow:i})]})})}import Oy,{useEffect as x4}from"react";import{jsx as Uh,jsxs as By}from"react/jsx-runtime";var zy=({updateData:e,app:o,testId:t})=>{let r=Oy.useRef(null),n=Oy.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 x4(()=>{if(r.current&&n.current){let m=r.current,d=n.current,p=m.offsetWidth,h=15,b=c/100*(p-h)+h/2;d.style.left=`${b}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]),By("label",{className:"control-label",children:[g("labels.opacity"),By("div",{className:"range-wrapper",children:[Uh("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}),Uh("div",{className:"value-bubble",ref:n,children:c!==0?c:null}),Uh("div",{className:"zero-label",children:"0"})]})]})};import{Fragment as Zh,jsx as ce,jsxs as qt}from"react/jsx-runtime";var Hy=.1,Ba=e=>{let o=Qn(e.editorInterface);return{stylesPanelMode:o,isCompact:o!=="full",isMobile:o==="mobile"}},jt=(e,o,t,r=!1)=>{let n=re(te(e,o,{includeBoundTextElement:r}));return e.map(i=>n.get(i.id)||i.id===o.editingTextElement?.id?t(i):i)},Yt=function(e,o,t,r,n){let i=o.state.editingTextElement,a=Ie(e),l=null;if(i&&(l=t(i)),!l)if(ze(a,o.state)){let c=o.scene.getSelectedElements(o.state),m=r===!0?c:c.filter(d=>r(d));l=Rc(m,t)??(typeof n=="function"?n(!0):n)}else l=typeof n=="function"?n(!1):n;return l},v4=(e,o,t)=>ot(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}),Vh=(e,o,t,r,n)=>{let i=new Set,a=jt(e,o,l=>{if(X(l)){let s=r(l);i.add(s);let c=ee(l,{fontSize:s});return ct(c,t.scene.getContainerElement(l),t.scene),c=v4(l,c,t.scene),c}return l},!0);return te(e,o,{includeBoundTextElement:!0}).forEach(l=>{X(l)&&Wr(l,t.scene)}),{elements:a,appState:{...o,currentItemFontSize:i.size===1?[...i][0]:n??o.currentItemFontSize},captureUpdate:_.IMMEDIATELY}},w4=U({name:"changeStrokeColor",label:"labels.stroke",trackEvent:!1,perform:(e,o,t)=>({...t?.currentItemStrokeColor&&{elements:jt(e,o,r=>Gl(r.type)?ee(r,{strokeColor:t.currentItemStrokeColor}):r,!0)},appState:{...o,...t},captureUpdate:t?.currentItemStrokeColor?_.IMMEDIATELY:_.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r,data:n})=>{let{stylesPanelMode:i}=Ba(r);return qt(Zh,{children:[i==="full"&&ce("h3",{"aria-hidden":"true",children:g("labels.stroke")}),ce(us,{topPicks:uc,palette:T1,type:"elementStroke",label:g("labels.stroke"),color:Yt(e,r,a=>a.strokeColor,!0,a=>a?null:o.currentItemStrokeColor),onChange:a=>t({currentItemStrokeColor:a}),elements:e,appState:o,updateData:t})]})}}),T4=U({name:"changeBackgroundColor",label:"labels.changeBackground",trackEvent:!1,perform:(e,o,t,r)=>{if(!t?.currentItemBackgroundColor)return{appState:{...o,...t},captureUpdate:_.EVENTUALLY};let n,i=r.scene.getSelectedElements(o);if(!Eo(t.currentItemBackgroundColor)&&i.every(l=>Je(l)&&wb(l.points))){let l=re(i);n=e.map(s=>l.has(s.id)&&Je(s)?ee(s,{backgroundColor:t.currentItemBackgroundColor,...od(s,!0)}):s)}else n=jt(e,o,l=>ee(l,{backgroundColor:t.currentItemBackgroundColor}));return{elements:n,appState:{...o,...t},captureUpdate:_.IMMEDIATELY}},PanelComponent:({elements:e,appState:o,updateData:t,app:r,data:n})=>{let{stylesPanelMode:i}=Ba(r);return qt(Zh,{children:[i==="full"&&ce("h3",{"aria-hidden":"true",children:g("labels.background")}),ce(us,{topPicks:hc,palette:I1,type:"elementBackground",label:g("labels.background"),color:Yt(e,r,a=>a.backgroundColor,!0,a=>a?null:o.currentItemBackgroundColor),onChange:a=>t({currentItemBackgroundColor:a}),elements:e,appState:o,updateData:t})]})}}),I4=U({name:"changeFillStyle",label:"labels.fill",trackEvent:!1,perform:(e,o,t,r)=>(pe("element","changeFillStyle",`${t} (${r.editorInterface.formFactor==="phone"?"mobile":"desktop"})`),{elements:jt(e,o,n=>ee(n,{fillStyle:t})),appState:{...o,currentItemFillStyle:t},captureUpdate:_.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=te(e,o),i=n.length>0&&n.every(a=>a.fillStyle==="zigzag");return qt("fieldset",{children:[ce("legend",{children:g("labels.fill")}),ce("div",{className:"buttonList",children:ce(No,{type:"button",options:[{value:"hachure",text:`${i?g("labels.zigzag"):g("labels.hachure")} (${O("Alt-Click")})`,icon:i?Gx:Wx,active:i?!0:void 0,testId:"fill-hachure"},{value:"cross-hatch",text:g("labels.crossHatch"),icon:Vx,testId:"fill-cross-hatch"},{value:"solid",text:g("labels.solid"),icon:Yx,testId:"fill-solid"}],value:Yt(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)}})})]})}}),C4=U({name:"changeStrokeWidth",label:"labels.strokeWidth",trackEvent:!1,perform:(e,o,t)=>({elements:jt(e,o,r=>ee(r,{strokeWidth:t})),appState:{...o,currentItemStrokeWidth:t},captureUpdate:_.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r,data:n})=>qt("fieldset",{children:[ce("legend",{children:g("labels.strokeWidth")}),ce("div",{className:"buttonList",children:ce(No,{group:"stroke-width",options:[{value:Cc.thin,text:g("labels.thin"),icon:mh,testId:"strokeWidth-thin"},{value:Cc.bold,text:g("labels.bold"),icon:Kx,testId:"strokeWidth-bold"},{value:Cc.extraBold,text:g("labels.extraBold"),icon:Zx,testId:"strokeWidth-extraBold"}],value:Yt(e,r,i=>i.strokeWidth,i=>i.hasOwnProperty("strokeWidth"),i=>i?null:o.currentItemStrokeWidth),onChange:i=>t(i)})})]})}),k4=U({name:"changeSloppiness",label:"labels.sloppiness",trackEvent:!1,perform:(e,o,t)=>({elements:jt(e,o,r=>ee(r,{seed:ni(),roughness:t})),appState:{...o,currentItemRoughness:t},captureUpdate:_.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r,data:n})=>qt("fieldset",{children:[ce("legend",{children:g("labels.sloppiness")}),ce("div",{className:"buttonList",children:ce(No,{group:"sloppiness",options:[{value:0,text:g("labels.architect"),icon:jx},{value:1,text:g("labels.artist"),icon:qx},{value:2,text:g("labels.cartoonist"),icon:Jx}],value:Yt(e,r,i=>i.roughness,i=>i.hasOwnProperty("roughness"),i=>i?null:o.currentItemRoughness),onChange:i=>t(i)})})]})}),JO=U({name:"changeStrokeStyle",label:"labels.strokeStyle",trackEvent:!1,perform:(e,o,t)=>({elements:jt(e,o,r=>ee(r,{strokeStyle:t})),appState:{...o,currentItemStrokeStyle:t},captureUpdate:_.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r,data:n})=>qt("fieldset",{children:[ce("legend",{children:g("labels.strokeStyle")}),ce("div",{className:"buttonList",children:ce(No,{group:"strokeStyle",options:[{value:"solid",text:g("labels.strokeStyle_solid"),icon:mh},{value:"dashed",text:g("labels.strokeStyle_dashed"),icon:Xx},{value:"dotted",text:g("labels.strokeStyle_dotted"),icon:$x}],value:Yt(e,r,i=>i.strokeStyle,i=>i.hasOwnProperty("strokeStyle"),i=>i?null:o.currentItemStrokeStyle),onChange:i=>t(i)})})]})}),S4=U({name:"changeOpacity",label:"labels.opacity",trackEvent:!1,perform:(e,o,t)=>({elements:jt(e,o,r=>ee(r,{opacity:t}),!0),appState:{...o,currentItemOpacity:t},captureUpdate:_.IMMEDIATELY}),PanelComponent:({app:e,updateData:o})=>ce(zy,{updateData:o,app:e,testId:"opacity"})}),M4=U({name:"changeFontSize",label:"labels.fontSize",trackEvent:!1,perform:(e,o,t,r)=>Vh(e,o,r,()=>(Xe(t,"actionChangeFontSize: Expected a font size value"),t),t),PanelComponent:({elements:e,appState:o,updateData:t,app:r,data:n})=>{let{isCompact:i}=Ba(r);return qt("fieldset",{children:[ce("legend",{children:g("labels.fontSize")}),ce("div",{className:"buttonList",children:ce(No,{group:"font-size",options:[{value:qn.sm,text:g("labels.small"),icon:uE,testId:"fontSize-small"},{value:qn.md,text:g("labels.medium"),icon:hE,testId:"fontSize-medium"},{value:qn.lg,text:g("labels.large"),icon:gE,testId:"fontSize-large"},{value:qn.xl,text:g("labels.veryLarge"),icon:fE,testId:"fontSize-veryLarge"}],value:Yt(e,r,a=>{if(X(a))return a.fontSize;let l=xe(a,r.scene.getNonDeletedElementsMap());return l?l.fontSize:null},a=>X(a)||xe(a,r.scene.getNonDeletedElementsMap())!==null,a=>a?null:o.currentItemFontSize||Jn),onChange:a=>{ds(()=>t(a),i,!!o.editingTextElement,n?.onPreventClose)}})})]})}}),Yh=U({name:"decreaseFontSize",label:"labels.decreaseFontSize",icon:xi,trackEvent:!1,perform:(e,o,t,r)=>Vh(e,o,r,n=>Math.round(1/(1+Hy)*n.fontSize)),keyTest:e=>e[T.CTRL_OR_CMD]&&e.shiftKey&&(e.key===T.CHEVRON_LEFT||e.key===T.COMMA)}),Kh=U({name:"increaseFontSize",label:"labels.increaseFontSize",icon:xi,trackEvent:!1,perform:(e,o,t,r)=>Vh(e,o,r,n=>Math.round(n.fontSize*(1+Hy))),keyTest:e=>e[T.CTRL_OR_CMD]&&e.shiftKey&&(e.key===T.CHEVRON_RIGHT||e.key===T.PERIOD)}),L4=U({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:jt(e,o,f=>{let y=n?.get(f.id);return y?ee(f,{...y}):f},!0),appState:{...o,...l},captureUpdate:_.NEVER};Xe(t,"actionChangeFontFamily: value must be defined");let{currentItemFontFamily:s,currentHoveredFontFamily:c}=t,m=_.EVENTUALLY,d,p=!1;if(s)d=s,m=_.IMMEDIATELY;else if(c){d=c,m=_.EVENTUALLY;let b=te(e,o,{includeBoundTextElement:!0}).filter(f=>X(f));if(b.length>200)p=!0;else{let f=0,y=0;for(;f<b.length&&y<5e3;){let v=b[f];y+=v?.originalText.length||0,f++}y>5e3&&(p=!0)}}let h={appState:{...o,...l},captureUpdate:m};if(d&&!p){let b=new Map,f=new Set,y=!1,v=Array.from(wn.loadedFontsCache.values()),x=Object.entries(It).find(([I,S])=>S===d)?.[0];c&&x&&v.some(I=>I.startsWith(x))&&(y=!0),Object.assign(h,{elements:jt(e,o,I=>{if(X(I)&&(I.fontFamily!==d||s)){let S=ee(I,{fontFamily:d,lineHeight:zr(d)}),P=n?.get(I.containerId||"")||{},M=r.scene.getContainerElement(I);return a&&M&&P&&r.scene.mutateElement(M,{...P}),y||(f=new Set([...f,...Array.from(S.originalText)])),b.set(S,M),S}return I},!0)});let E=`10px ${ti({fontFamily:d})}`,w=Array.from(f.values()).join();if(y||window.document.fonts.check(E,w))for(let[I,S]of b)ct(I,S,r.scene);else window.document.fonts.load(E,w).then(I=>{for(let[S,P]of b){let M=r.scene.getElement(S.id),F=P?r.scene.getElement(P.id):null;M&&ct(M,F,r.scene)}r.fonts.onLoaded(I)})}return h},PanelComponent:({elements:e,appState:o,app:t,updateData:r})=>{let n=Wh(new Map),i=Wh(null),[a,l]=y4({}),s=Wh(!0),{stylesPanelMode:c,isCompact:m}=Ba(t),d=E4(()=>{let p=(h,b)=>Yt(h,t,f=>{if(X(f))return f.fontFamily;let y=xe(f,b);return y?y.fontFamily:null},f=>X(f)||xe(f,b)!==null,f=>f?null:o.currentItemFontFamily||Fi);return a.openPopup==="fontFamily"&&o.openPopup==="fontFamily"?p(Array.from(n.current?.values()??[]),n.current):!a.openPopup&&o.openPopup!=="fontFamily"?p(e,t.scene.getNonDeletedElementsMap()):i.current},[a.openPopup,o,e,t]);return Gh(()=>{i.current=d},[d]),Gh(()=>{Object.keys(a).length&&(r(a),l({}))},[a]),Gh(()=>(s.current=!1,()=>{s.current=!0}),[]),qt(Zh,{children:[c==="full"&&ce("legend",{children:g("labels.fontFamily")}),ce(Dy,{isOpened:o.openPopup==="fontFamily",selectedFontFamily:d,hoveredFontFamily:o.currentHoveredFontFamily,compactMode:c!=="full",onSelect:p=>{ds(()=>{l({openPopup:null,currentHoveredFontFamily:null,currentItemFontFamily:p}),n.current.clear()},m,!!o.editingTextElement)},onHover:p=>{l({currentHoveredFontFamily:p,cachedElements:new Map(n.current),resetContainers:!0})},onLeave:()=>{l({currentHoveredFontFamily:null,cachedElements:new Map(n.current),resetAll:!0})},onPopupChange:p=>{if(p){n.current.clear();let{editingTextElement:h}=o;if(h?.type==="text"){let b=t.scene.getElement(h.id);n.current.set(h.id,ee(b||h,{},!0))}else{let b=te(e,o,{includeBoundTextElement:!0});for(let f of b)n.current.set(f.id,ee(f,{},!0))}l({...a,openPopup:"fontFamily"})}else{let h={currentHoveredFontFamily:null,cachedElements:new Map(n.current),resetAll:!0};l({...h}),n.current.clear(),m&&o.editingTextElement&&cs(null)}}})]})}}),A4=U({name:"changeTextAlign",label:"Change text alignment",trackEvent:!1,perform:(e,o,t,r)=>({elements:jt(e,o,n=>{if(X(n)){let i=ee(n,{textAlign:t});return ct(i,r.scene.getContainerElement(n),r.scene),i}return n},!0),appState:{...o,currentItemTextAlign:t},captureUpdate:_.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r,data:n})=>{let i=r.scene.getNonDeletedElementsMap(),{isCompact:a}=Ba(r);return qt("fieldset",{children:[ce("legend",{children:g("labels.textAlign")}),ce("div",{className:"buttonList",children:ce(No,{group:"text-align",options:[{value:"left",text:g("labels.left"),icon:xE,testId:"align-left"},{value:"center",text:g("labels.center"),icon:EE,testId:"align-horizontal-center"},{value:"right",text:g("labels.right"),icon:yE,testId:"align-right"}],value:Yt(e,r,l=>{if(X(l))return l.textAlign;let s=xe(l,i);return s?s.textAlign:null},l=>X(l)||xe(l,i)!==null,l=>l?null:o.currentItemTextAlign),onChange:l=>{ds(()=>t(l),a,!!o.editingTextElement,n?.onPreventClose)}})})]})}}),_4=U({name:"changeVerticalAlign",label:"Change vertical alignment",trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:jt(e,o,n=>{if(X(n)){let i=ee(n,{verticalAlign:t});return ct(i,r.scene.getContainerElement(n),r.scene),i}return n},!0),appState:{...o},captureUpdate:_.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r,data:n})=>{let{isCompact:i}=Ba(r);return ce("fieldset",{children:ce("div",{className:"buttonList",children:ce(No,{group:"text-align",options:[{value:Lo.TOP,text:g("labels.alignTop"),icon:ce(vE,{theme:o.theme}),testId:"align-top"},{value:Lo.MIDDLE,text:g("labels.centerVertically"),icon:ce(TE,{theme:o.theme}),testId:"align-middle"},{value:Lo.BOTTOM,text:g("labels.alignBottom"),icon:ce(wE,{theme:o.theme}),testId:"align-bottom"}],value:Yt(e,r,a=>{if(X(a)&&a.containerId)return a.verticalAlign;let l=xe(a,r.scene.getNonDeletedElementsMap());return l?l.verticalAlign:null},a=>X(a)||xe(a,r.scene.getNonDeletedElementsMap())!==null,a=>a?null:Lo.MIDDLE),onChange:a=>{ds(()=>t(a),i,!!o.editingTextElement,n?.onPreventClose)}})})})}}),QO=U({name:"changeRoundness",label:"Change edge roundness",trackEvent:!1,perform:(e,o,t)=>({elements:jt(e,o,r=>Te(r)?r:ee(r,{roundness:t==="round"?{type:bn(r.type)?St.ADAPTIVE_RADIUS:St.PROPORTIONAL_RADIUS}:null})),appState:{...o,currentItemRoundness:t},captureUpdate:_.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r,renderAction:n})=>{let a=Ji(Ie(e),o).some(l=>l.roundness?.type===St.LEGACY);return qt("fieldset",{children:[ce("legend",{children:g("labels.edges")}),qt("div",{className:"buttonList",children:[ce(No,{group:"edges",options:[{value:"sharp",text:g("labels.sharp"),icon:Qx},{value:"round",text:g("labels.round"),icon:eE}],value:Yt(e,r,l=>a?null:l.roundness?"round":"sharp",l=>!Ce(l)&&l.hasOwnProperty("roundness"),l=>l?null:o.currentItemRoundness),onChange:l=>t(l)}),n("togglePolygon")]})]})}}),Fy=e=>[{value:null,text:g("labels.arrowhead_none"),keyBinding:"q",icon:tE},{value:"arrow",text:g("labels.arrowhead_arrow"),keyBinding:"w",icon:ce(oE,{flip:e})},{value:"triangle",text:g("labels.arrowhead_triangle"),icon:ce(aE,{flip:e}),keyBinding:"e"},{value:"triangle_outline",text:g("labels.arrowhead_triangle_outline"),icon:ce(lE,{flip:e}),keyBinding:"r"},{value:"circle",text:g("labels.arrowhead_circle"),keyBinding:"a",icon:ce(rE,{flip:e})},{value:"circle_outline",text:g("labels.arrowhead_circle_outline"),keyBinding:"s",icon:ce(nE,{flip:e})},{value:"diamond",text:g("labels.arrowhead_diamond"),icon:ce(sE,{flip:e}),keyBinding:"d"},{value:"diamond_outline",text:g("labels.arrowhead_diamond_outline"),icon:ce(cE,{flip:e}),keyBinding:"f"},{value:"bar",text:g("labels.arrowhead_bar"),keyBinding:"z",icon:ce(iE,{flip:e})},{value:"crowfoot_one",text:g("labels.arrowhead_crowfoot_one"),icon:ce(mE,{flip:e}),keyBinding:"x"},{value:"crowfoot_many",text:g("labels.arrowhead_crowfoot_many"),icon:ce(dE,{flip:e}),keyBinding:"c"},{value:"crowfoot_one_or_many",text:g("labels.arrowhead_crowfoot_one_or_many"),icon:ce(pE,{flip:e}),keyBinding:"v"}],eB=U({name:"changeArrowhead",label:"Change arrowheads",trackEvent:!1,perform:(e,o,t)=>(Xe(t,"actionChangeArrowhead: value must be defined"),{elements:jt(e,o,r=>{if(be(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:_.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=Kr().rtl;return qt("fieldset",{children:[ce("legend",{children:g("labels.arrowheads")}),qt("div",{className:"iconSelectList buttonList",children:[ce(Hh,{label:"arrowhead_start",options:Fy(!n),value:Yt(e,r,i=>be(i)&&ea(i.type)?i.startArrowhead:o.currentItemStartArrowhead,!0,o.currentItemStartArrowhead),onChange:i=>t({position:"start",type:i}),numberOfOptionsToAlwaysShow:4}),ce(Hh,{label:"arrowhead_end",group:"arrowheads",options:Fy(!!n),value:Yt(e,r,i=>be(i)&&ea(i.type)?i.endArrowhead:o.currentItemEndArrowhead,!0,o.currentItemEndArrowhead),onChange:i=>t({position:"end",type:i}),numberOfOptionsToAlwaysShow:4})]})]})}}),P4=U({name:"changeArrowProperties",label:"Change arrow properties",trackEvent:!1,perform:(e,o,t,r)=>!1,PanelComponent:({elements:e,appState:o,updateData:t,app:r,renderAction:n})=>qt("div",{className:"selected-shape-actions",children:[n("changeArrowhead"),n("changeArrowType")]})}),tB=U({name:"changeArrowType",label:"Change arrow types",trackEvent:!1,perform:(e,o,t,r)=>{let n=jt(e,o,l=>{if(!Ce(l))return l;let s=r.scene.getNonDeletedElementsMap(),c=Z.getPointAtIndexGlobalCoordinates(l,0,s),m=Z.getPointAtIndexGlobalCoordinates(l,-1,s),d=ee(l,{x:t===st.elbow?c[0]:l.x,y:t===st.elbow?c[1]:l.y,roundness:t===st.round?{type:St.PROPORTIONAL_RADIUS}:null,elbowed:t===st.elbow,angle:t===st.elbow?0:l.angle,points:t===st.elbow||l.elbowed?[Z.pointFromAbsoluteCoords({...l,x:c[0],y:c[1],angle:0},c,s),Z.pointFromAbsoluteCoords({...l,x:c[0],y:c[1],angle:0},m,s)]:l.points});if(Te(d)){d.fixedSegments=null;let p=r.scene.getNonDeletedElementsMap();r.dismissLinearEditor();let h=Z.getPointAtIndexGlobalCoordinates(d,0,p),b=Z.getPointAtIndexGlobalCoordinates(d,-1,p),f=d.startBinding&&p.get(d.startBinding.elementId),y=d.endBinding&&p.get(d.endBinding.elementId),v=f&&d.startBinding?{...d.startBinding,...gu(d,f,"start",p)}:null,x=y&&d.endBinding?{...d.endBinding,...gu(d,y,"end",p)}:null;d={...d,startBinding:v,endBinding:x,...Yc(d,p,{points:[h,b].map(E=>L(E[0]-d.x,E[1]-d.y)),startBinding:v,endBinding:x,fixedSegments:null})}}else{let p=r.scene.getNonDeletedElementsMap();if(d.startBinding){let h=p.get(d.startBinding.elementId);h&&uu(d,h,o.bindMode==="inside"?"inside":"orbit","start",r.scene)}if(d.endBinding){let h=p.get(d.endBinding.elementId);h&&uu(d,h,o.bindMode==="inside"?"inside":"orbit","end",r.scene)}}return d}),i={...o,currentItemArrowType:t},a=o.selectedLinearElement?.elementId;if(a){let l=n.find(s=>s.id===a);l&&(i.selectedLinearElement=new Z(l,re(e)))}return{elements:n,appState:i,captureUpdate:_.IMMEDIATELY}},PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>qt("fieldset",{children:[ce("legend",{children:g("labels.arrowtypes")}),ce("div",{className:"buttonList",children:ce(No,{group:"arrowtypes",options:[{value:st.sharp,text:g("labels.arrowtype_sharp"),icon:Sa,testId:"sharp-arrow"},{value:st.round,text:g("labels.arrowtype_round"),icon:La,testId:"round-arrow"},{value:st.elbow,text:g("labels.arrowtype_elbowed"),icon:Ma,testId:"elbow-arrow"}],value:Yt(e,r,n=>Ce(n)?n.elbowed?st.elbow:n.roundness?st.round:st.sharp:null,n=>Ce(n),n=>n?null:o.currentItemArrowType),onChange:n=>t(n)})})]})});import{useEffect as D4}from"react";import{jsx as N4}from"react/jsx-runtime";var za=()=>{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},Xh=(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`})},R4=(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();Xh(o,n)},To=({children:e,label:o,long:t=!1,style:r,disabled:n})=>(D4(()=>()=>za().classList.remove("excalidraw-tooltip--visible"),[]),n?null:N4("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:i=>R4(i.currentTarget,za(),o,t),onPointerLeave:()=>za().classList.remove("excalidraw-tooltip--visible"),style:r,children:e}));import rm from"open-color";var Gy='<svg viewBox="0 0 24 24" stroke-width="1" width="28" height="28" xmlns="http://www.w3.org/2000/svg">',O4='<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"/>',Wy='<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"/>',B4=`data:${he.svg},${encodeURIComponent(`${Gy}${Wy}</svg>`)}`,z4=`data:${he.svg},${encodeURIComponent(`${Gy}${O4}${Wy}</svg>`)}`,Io=e=>{e&&(e.style.cursor="")},Be=(e,o)=>{e&&(e.style.cursor=o)},kr,Uy,$h=(e,o)=>{let r=()=>{let n=o===oe.DARK;kr=document.createElement("canvas"),kr.theme=o,kr.height=20,kr.width=20;let i=kr.getContext("2d");i.lineWidth=1,i.beginPath(),i.arc(kr.width/2,kr.height/2,5,0,2*Math.PI),i.fillStyle=n?rm.black:rm.white,i.fill(),i.strokeStyle=n?rm.white:rm.black,i.stroke(),Uy=kr.toDataURL(he.svg)};(!kr||kr.theme!==o)&&r(),Be(e,`url(${Uy}) ${20/2} ${20/2}, auto`)},Co=(e,o)=>{if(e)if(o.activeTool.type==="selection")Io(e);else if(er(o))e.style.cursor=ke.GRAB;else if(so(o))$h(e,o.theme);else if(o.activeTool.type==="laser"){let t=o.theme===oe.LIGHT?B4:z4;e.style.cursor=`url(${t}), auto`}else["image","custom"].includes(o.activeTool.type)?o.activeTool.type!=="image"&&(e.style.cursor=ke.AUTO):e.style.cursor=ke.CROSSHAIR};var Xr=({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 lm,jsxs as G4}from"react/jsx-runtime";var F4=U({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?_.IMMEDIATELY:_.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t,appProps:r,data:n})=>lm(us,{palette:null,topPicks:gc,label:g("labels.canvasBackground"),type:"canvasBackground",color:o.viewBackgroundColor,onChange:i=>t({viewBackgroundColor:i}),"data-testid":"canvas-background-picker",elements:e,appState:o,updateData:t})}),$r=U({name:"clearCanvas",label:"labels.clearCanvas",icon:vo,trackEvent:{category:"canvas"},predicate:(e,o,t,r)=>!!r.props.UIOptions.canvasActions.clearCanvas&&!o.viewModeEnabled&&o.openDialog?.name!=="elementLinkSelector",perform:(e,o,t,r)=>(r.imageCache.clear(),{elements:e.map(n=>ee(n,{isDeleted:!0})),appState:{...Tn(),files:{},theme:o.theme,penMode:o.penMode,penDetected:o.penDetected,exportBackground:o.exportBackground,exportEmbedScene:o.exportEmbedScene,gridSize:o.gridSize,gridStep:o.gridStep,gridModeEnabled:o.gridModeEnabled,stats:o.stats,pasteDialog:o.pasteDialog,activeTool:o.activeTool.type==="image"?{...o.activeTool,type:r.state.preferredSelectionTool.type}:o.activeTool},captureUpdate:_.IMMEDIATELY})}),nm=U({name:"zoomIn",label:"buttons.zoomIn",viewMode:!0,icon:Xu,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>({appState:{...o,...Xr({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:vr(o.zoom.value+Hi)},o),userToFollow:null},captureUpdate:_.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>lm(j,{type:"button",className:"zoom-in-button zoom-button",icon:Xu,title:`${g("buttons.zoomIn")} \u2014 ${O("CtrlOrCmd++")}`,"aria-label":g("buttons.zoomIn"),disabled:o.zoom.value>=$p,onClick:()=>{e(null)}}),keyTest:e=>(e.code===ue.EQUAL||e.code===ue.NUM_ADD)&&(e[T.CTRL_OR_CMD]||e.shiftKey)}),im=U({name:"zoomOut",label:"buttons.zoomOut",icon:$u,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>({appState:{...o,...Xr({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:vr(o.zoom.value-Hi)},o),userToFollow:null},captureUpdate:_.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>lm(j,{type:"button",className:"zoom-out-button zoom-button",icon:$u,title:`${g("buttons.zoomOut")} \u2014 ${O("CtrlOrCmd+-")}`,"aria-label":g("buttons.zoomOut"),disabled:o.zoom.value<=Xp,onClick:()=>{e(null)}}),keyTest:e=>(e.code===ue.MINUS||e.code===ue.NUM_SUBTRACT)&&(e[T.CTRL_OR_CMD]||e.shiftKey)}),am=U({name:"resetZoom",label:"buttons.resetZoom",icon:Tx,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>({appState:{...o,...Xr({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:vr(1)},o),userToFollow:null},captureUpdate:_.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>lm(To,{label:g("buttons.resetZoom"),style:{height:"100%"},children:G4(j,{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===ue.ZERO||e.code===ue.NUM_ZERO)&&(e[T.CTRL_OR_CMD]||e.shiftKey)}),H4=(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)*at(t,.1,1);return Math.min(p,1)},Vy=({bounds:e,appState:o,canvasOffsets:t,fitToViewport:r=!1,viewportZoomFactor:n=1,minZoom:i=-1/0,maxZoom:a=1/0})=>{n=at(n,Xp,$p);let[l,s,c,m]=e,d=(l+c)/2,p=(s+m)/2,h=t?.left??0,b=t?.top??0,f=t?.right??0,y=t?.bottom??0,v=o.width-h-f,x=o.height-b-y,E;if(r){let S=c-l,P=m-s;E=Math.min(v/S,x/P)*n}else E=H4(e,{width:v,height:x},n);let w=vr(at(u1(E,Hi,"floor"),i,a)),I=U0({scenePoint:{x:d,y:p},viewportDimensions:{width:o.width,height:o.height},offsets:t,zoom:{value:w}});return{appState:{...o,scrollX:I.scrollX,scrollY:I.scrollY,zoom:{value:w}},captureUpdate:_.EVENTUALLY}},Es=({canvasOffsets:e,targetElements:o,appState:t,fitToViewport:r,viewportZoomFactor:n,minZoom:i,maxZoom:a})=>{let l=Me(Ie(o));return Vy({canvasOffsets:e,bounds:l,appState:t,fitToViewport:r,viewportZoomFactor:n,minZoom:i,maxZoom:a})},zB=U({name:"zoomToFitSelectionInViewport",label:"labels.zoomToFitViewport",icon:Od,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);return Es({targetElements:n.length?n:e,appState:{...o,userToFollow:null},fitToViewport:!1,canvasOffsets:r.getEditorUIOffsets()})},keyTest:e=>e.code===ue.TWO&&e.shiftKey&&!e.altKey&&!e[T.CTRL_OR_CMD]}),FB=U({name:"zoomToFitSelection",label:"helpDialog.zoomToSelection",icon:Od,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);return Es({targetElements:n.length?n:e,appState:{...o,userToFollow:null},fitToViewport:!0,canvasOffsets:r.getEditorUIOffsets()})},keyTest:e=>e.code===ue.THREE&&e.shiftKey&&!e.altKey&&!e[T.CTRL_OR_CMD]}),U4=U({name:"zoomToFit",label:"helpDialog.zoomToFit",icon:Od,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>Es({targetElements:e,appState:{...o,userToFollow:null},fitToViewport:!1,canvasOffsets:r.getEditorUIOffsets()}),keyTest:e=>e.code===ue.ONE&&e.shiftKey&&!e.altKey&&!e[T.CTRL_OR_CMD]}),wi=U({name:"toggleTheme",label:(e,o)=>o.theme===oe.DARK?"buttons.lightMode":"buttons.darkMode",keywords:["toggle","dark","light","mode","theme"],icon:(e,o)=>e.theme===oe.LIGHT?es:ts,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t)=>({appState:{...o,theme:t||(o.theme===oe.LIGHT?oe.DARK:oe.LIGHT)},captureUpdate:_.EVENTUALLY}),keyTest:e=>e.altKey&&e.shiftKey&&e.code===ue.D,predicate:(e,o,t,r)=>!!r.props.UIOptions.canvasActions.toggleTheme}),HB=U({name:"toggleEraserTool",label:"toolBar.eraser",trackEvent:{category:"toolbar"},perform:(e,o,t,r)=>{let n;return so(o)?n=Pe(o,{...o.activeTool.lastActiveTool||{type:r.state.preferredSelectionTool.type},lastActiveToolBeforeEraser:null}):n=Pe(o,{type:"eraser",lastActiveToolBeforeEraser:o.activeTool}),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n},captureUpdate:_.IMMEDIATELY}},keyTest:e=>e.key===T.E}),UB=U({name:"toggleLassoTool",label:"toolBar.lasso",icon:Cn,trackEvent:{category:"toolbar"},predicate:(e,o,t,r)=>r.state.preferredSelectionTool.type!=="lasso",perform:(e,o,t,r)=>{let n;return o.activeTool.type!=="lasso"?(n=Pe(o,{type:"lasso",fromSelection:!1}),Be(r.interactiveCanvas,ke.CROSSHAIR)):n=Pe(o,{type:"selection"}),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n},captureUpdate:_.NEVER}}}),Yy=U({name:"toggleHandTool",label:"toolBar.hand",trackEvent:{category:"toolbar"},icon:Nd,viewMode:!1,perform:(e,o,t,r)=>{let n;return er(o)?n=Pe(o,{...o.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):(n=Pe(o,{type:"hand",lastActiveToolBeforeEraser:o.activeTool}),Be(r.interactiveCanvas,ke.GRAB)),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n},captureUpdate:_.IMMEDIATELY}},keyTest:e=>!e.altKey&&!e[T.CTRL_OR_CMD]&&e.key===T.H});var W4=U({name:"setEmbeddableAsActiveTool",trackEvent:{category:"toolbar"},target:"Tool",label:"toolBar.embeddable",perform:(e,o,t,r)=>{let n=Pe(o,{type:"embeddable"});return Co(r.canvas,{...o,activeTool:n}),{elements:e,appState:{...o,activeTool:Pe(o,{type:"embeddable"})},captureUpdate:_.EVENTUALLY}}});import{jsx as V4}from"react/jsx-runtime";var Jt=U({name:"finalize",label:"",trackEvent:!1,perform:(e,o,t,r)=>{let n=e,{interactiveCanvas:i,focusContainer:a,scene:l}=r,s=l.getNonDeletedElementsMap();if(t&&o.selectedLinearElement){let{event:p,sceneCoords:h}=t,b=Z.getElement(o.selectedLinearElement.elementId,s);Xe(b,"Arrow element should exist if selectedLinearElement is set"),Xe(h,"sceneCoords should be defined if actionFinalize is called with event");let f=Z.handlePointerUp(p,o.selectedLinearElement,o,r.scene);if(Xt(b)){let y=!!o.newElement,x=(y||!o.selectedLinearElement.selectedPointsIndices?[b.points.length-1]:o.selectedLinearElement.selectedPointsIndices).reduce((E,w)=>(E.set(w,{point:Z.pointFromAbsoluteCoords(b,L(h.x,h.y),s)}),E),new Map)??new Map;Zc(b,x,h.x,h.y,l,o,{newArrow:y,altKey:p.altKey,angleLocked:Pl(p)})}else Je(b)&&o.selectedLinearElement?.isEditing&&!o.newElement&&!lu(b.points)&&l.mutateElement(b,{polygon:!1});if(f!==o.selectedLinearElement){b&&fr(b)&&(n=n.map(v=>v.id===b.id?ee(v,{isDeleted:!0}):v));let y=o.activeTool?.locked;return{elements:b.points.length<2||fr(b)?e.map(v=>v.id===b.id?ee(v,{isDeleted:!0}):v):n,appState:{...o,cursorButton:"up",selectedLinearElement:y?null:{...f,selectedPointsIndices:null,isEditing:!1,initialState:{...f.initialState,lastClickedPoint:-1}},selectionElement:null,suggestedBinding:null,newElement:null,multiElement:null},captureUpdate:_.IMMEDIATELY}}}window.document.activeElement instanceof HTMLElement&&a();let c=null;if(o.multiElement)c=o.multiElement;else if(o.newElement?.type==="freedraw"||Xt(o.newElement))c=o.newElement;else if(Object.keys(o.selectedElementIds).length===1){let p=s.get(Object.keys(o.selectedElementIds)[0]);p&&(c=p)}if(c){if(o.selectedLinearElement&&o.multiElement&&c.type!=="freedraw"&&o.lastPointerDownWith!=="touch"){let{points:p}=c,{lastCommittedPoint:h}=o.selectedLinearElement;(!h||p[p.length-1]!==h)&&l.mutateElement(c,{points:c.points.slice(0,-1)})}if(c&&fr(c)&&(n=n.map(p=>p.id===c?.id?ee(p,{isDeleted:!0}):p)),be(c)||Yi(c)){if(Ol(c.points,o.zoom.value)&&(Je(c)||Yi(c))){let h=c.points,b=h[0],f=h.map((y,v)=>v===h.length-1?L(b[0],b[1]):y);Je(c)?l.mutateElement(c,{points:f,polygon:!0}):l.mutateElement(c,{points:f})}Je(c)&&!lu(c.points)&&l.mutateElement(c,{polygon:!1})}}(!o.activeTool.locked&&o.activeTool.type!=="freedraw"||!c)&&Io(i);let m;o.activeTool.type==="eraser"?m=Pe(o,{...o.activeTool.lastActiveTool||{type:r.state.preferredSelectionTool.type},lastActiveToolBeforeEraser:null}):m=Pe(o,{type:r.state.preferredSelectionTool.type});let d=c&&be(c)?new Z(c,re(n)):o.selectedLinearElement;return d=d&&{...d,isEditing:o.newElement?!1:d.isEditing,initialState:{...d.initialState,lastClickedPoint:-1,origin:null}},{elements:n,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,suggestedBinding:null,selectedElementIds:c&&!o.activeTool.locked&&o.activeTool.type!=="freedraw"?{...o.selectedElementIds,[c.id]:!0}:o.selectedElementIds,selectedLinearElement:d},captureUpdate:_.IMMEDIATELY}},keyTest:(e,o)=>e.key===T.ESCAPE&&(o.selectedLinearElement?.isEditing||!o.newElement&&o.multiElement===null)||(e.key===T.ESCAPE||e.key===T.ENTER)&&o.multiElement!==null,PanelComponent:({appState:e,updateData:o,data:t})=>V4(j,{type:"button",icon:Nx,title:g("buttons.done"),"aria-label":g("buttons.done"),onClick:o,visible:e.multiElement!=null,size:t?.size||"medium",style:{pointerEvents:"all"}})});import Y4 from"clsx";import{jsx as Ky,jsxs as K4}from"react/jsx-runtime";var ys=({children:e,checked:o,onChange:t,className:r})=>K4("div",{className:Y4("Checkbox",r,{"is-checked":o}),onClick:n=>{t(!o,n),n.currentTarget.querySelector(".Checkbox-box").focus()},children:[Ky("button",{type:"button",className:"Checkbox-box",role:"checkbox","aria-checked":o,children:Ax}),Ky("div",{className:"Checkbox-label",children:e})]});import{jsx as vs}from"react/jsx-runtime";var Xy=e=>{let o=e.title||(e.value===oe.DARK?g("buttons.lightMode"):g("buttons.darkMode"));return vs(j,{type:"icon",icon:e.value===oe.LIGHT?Zy.MOON:Zy.SUN,title:o,"aria-label":o,onClick:()=>e.onChange(e.value===oe.DARK?oe.LIGHT:oe.DARK),"data-testid":"toggle-dark-mode"})},Zy={SUN:vs("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:vs("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:vs("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:vs("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 Z4}from"react";import{jsx as $y,jsxs as X4}from"react/jsx-runtime";var jy=e=>{let{id:o}=$e(),[t,r]=Z4(e.value),n=a=>{e.ignoreFocus||ib(a.target);let l=a.target.value;l!==e.value&&e.onChange(l)},i=a=>{if(a.key===T.ENTER){if(a.preventDefault(),a.nativeEvent.isComposing||a.keyCode===229)return;a.currentTarget.blur()}};return X4("div",{className:"ProjectName",children:[$y("label",{className:"ProjectName-label",htmlFor:"filename",children:`${e.label}:`}),$y("input",{type:"text",className:"TextInput",onBlur:n,onKeyDown:i,id:`${o}-filename`,value:t,onChange:a=>r(a.target.value)})]})};var rr=32,Ke=12,Rn=256,Jy=50,Ti="NOT_SPREADSHEET",Fa="VALID_SPREADSHEET",ws=e=>{let o=/^([-+]?)[$€£¥₩]?([-+]?)([\d.,]+)[%]?$/.exec(e);return o?parseFloat(`${(o[1]||o[2])+o[3]}`.replace(/,/g,"")):null},jh=(e,o)=>e.slice(1).every(t=>ws(t[o])!==null),qy=e=>{let o=e[0].length;if(o>2)return{type:Ti,reason:"More than 2 columns"};if(o===1){if(!jh(e,0))return{type:Ti,reason:"Value is not numeric"};let s=ws(e[0][0])===null,c=(s?e.slice(1):e).map(m=>ws(m[0]));return c.length<2?{type:Ti,reason:"Less than two rows"}:{type:Fa,spreadsheet:{title:s?e[0][0]:null,labels:null,values:c}}}let t=jh(e,0),r=jh(e,1);if(!t&&!r)return{type:Ti,reason:"Value is not numeric"};let[n,i]=r?[0,1]:[1,0],a=ws(e[0][i])===null,l=a?e.slice(1):e;return l.length<2?{type:Ti,reason:"Less than 2 rows"}:{type:Fa,spreadsheet:{title:a?e[0][i]:null,labels:l.map(s=>s[n]),values:l.map(s=>ws(s[i]))}}},$4=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},Qy=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:Ti,reason:"No values"};let t=o[0].length;if(!o.every(i=>i.length===t))return{type:Ti,reason:"All rows don't have same number of columns"};let n=qy(o);if(n.type!==Fa){let i=qy($4(o));if(i.type===Fa)return i}return n},sm=C1(y1),zo={fillStyle:"hachure",fontFamily:Fi,fontSize:Jn,opacity:100,roughness:1,strokeColor:Mo.black,roundness:null,strokeStyle:"solid",strokeWidth:1,verticalAlign:Lo.MIDDLE,locked:!1},e2=e=>{let o=(rr+Ke)*e.values.length+Ke,t=Rn+Ke*2;return{chartWidth:o,chartHeight:t}},j4=(e,o,t,r,n)=>e.labels?.map((i,a)=>Er({groupIds:[r],backgroundColor:n,...zo,text:i.length>8?`${i.slice(0,5)}...`:i,x:o+a*(rr+Ke)+Ke*2,y:t+Ke/2,width:rr,angle:5.87,fontSize:qn.sm,textAlign:"center",verticalAlign:"top"}))||[],q4=(e,o,t,r,n)=>{let i=Er({groupIds:[r],backgroundColor:n,...zo,x:o-Ke,y:t-Ke,text:"0",textAlign:"right"}),a=Er({groupIds:[r],backgroundColor:n,...zo,x:o-Ke,y:t-Rn-i.height/2,text:Math.max(...e.values).toLocaleString(),textAlign:"right"});return[i,a]},J4=(e,o,t,r,n)=>{let{chartWidth:i,chartHeight:a}=e2(e),l=yr({backgroundColor:n,groupIds:[r],...zo,type:"line",x:o,y:t,width:i,points:[L(0,0),L(i,0)]}),s=yr({backgroundColor:n,groupIds:[r],...zo,type:"line",x:o,y:t,height:a,points:[L(0,0),L(0,-a)]}),c=yr({backgroundColor:n,groupIds:[r],...zo,type:"line",x:o,y:t-Rn-Ke,strokeStyle:"dotted",width:i,opacity:Jy,points:[L(0,0),L(i,0)]});return[l,s,c]},t2=(e,o,t,r,n,i)=>{let{chartWidth:a,chartHeight:l}=e2(e),s=e.title?Er({backgroundColor:n,groupIds:[r],...zo,text:e.title,x:o+a/2,y:t-Rn-Ke*2-Jn,roundness:null,textAlign:"center"}):null,c=i?xr({backgroundColor:n,groupIds:[r],...zo,type:"rectangle",x:o,y:t-l,width:a,height:l,strokeColor:Mo.black,fillStyle:"solid",opacity:6}):null;return[...c?[c]:[],...s?[s]:[],...j4(e,o,t,r,n),...q4(e,o,t,r,n),...J4(e,o,t,r,n)]},Q4=(e,o,t)=>{let r=Math.max(...e.values),n=jo(),i=sm[Math.floor(Math.random()*sm.length)];return[...e.values.map((l,s)=>{let c=l/r*Rn;return xr({backgroundColor:i,groupIds:[n],...zo,type:"rectangle",x:o+s*(rr+Ke)+Ke,y:t-c-Ke,width:rr,height:c})}),...t2(e,o,t,n,i,Bt())]},eI=(e,o,t)=>{let r=Math.max(...e.values),n=jo(),i=sm[Math.floor(Math.random()*sm.length)],a=0,l=[];for(let f of e.values){let y=a*(rr+Ke),v=-(f/r)*Rn;l.push([y,v]),a++}let s=Math.max(...l.map(f=>f[0])),c=Math.max(...l.map(f=>f[1])),m=Math.min(...l.map(f=>f[0])),d=Math.min(...l.map(f=>f[1])),p=yr({backgroundColor:i,groupIds:[n],...zo,type:"line",x:o+Ke+rr/2,y:t-Ke,height:c-d,width:s-m,strokeWidth:2,points:l}),h=e.values.map((f,y)=>{let v=y*(rr+Ke)+Ke/2,x=-(f/r)*Rn+Ke/2;return xr({backgroundColor:i,groupIds:[n],...zo,fillStyle:"solid",strokeWidth:2,type:"ellipse",x:o+v+rr/2,y:t+x-Ke*2,width:Ke,height:Ke})}),b=e.values.map((f,y)=>{let v=y*(rr+Ke)+Ke/2,x=f/r*Rn+Ke/2+Ke;return yr({backgroundColor:i,groupIds:[n],...zo,type:"line",x:o+v+rr/2+Ke/2,y:t-x,height:x,strokeStyle:"dotted",opacity:Jy,points:[L(0,0),L(0,x)]})});return[...t2(e,o,t,n,i,Bt()),p,...b,...h]},o2=(e,o,t,r)=>e==="line"?eI(o,t,r):Q4(o,t,r);var eF="clipboard"in navigator&&"readText"in navigator.clipboard,cm="clipboard"in navigator&&"writeText"in navigator.clipboard,Ha="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,tI=e=>!!([dn.excalidraw,dn.excalidrawClipboard,dn.excalidrawClipboardWithAPI].includes(e?.type)&&Array.isArray(e.elements)),r2=({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?.items.add(n,r),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},oI=({elements:e,files:o})=>{let t=re(e),r=new Set(e.filter(l=>ne(l))),n=!1,i=e.reduce((l,s)=>(fn(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:dn.excalidrawClipboard,elements:e.map(l=>{if(ci(l,t)&&!r.has(ci(l,t))){let s=Qo(l);return Wt(s,t,{frameId:null}),s}return l}),files:o?i:void 0};return JSON.stringify(a)},dm=async(e,o,t)=>{await nr(oI({elements:e,files:o}),t)},rI=e=>{let o=Qy(e);return o.type===Fa?{spreadsheet:o.spreadsheet}:null};function n2(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(n2(t));return o}var nI=e=>{let o=e.value;try{let t=new DOMParser().parseFromString(o,he.html),r=n2(t.body);if(r.length)return{type:"mixedContent",value:r}}catch(t){console.error(`error in parseHTMLFromPaste: ${t.message}`)}return null},i2=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{[he.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(Dc(P1,r))try{if(r===he.text||r===he.html)e[r]=await(await t.getType(r)).text();else if(ex(r)){let n=await t.getType(r),i=lx(n,r,void 0);e[r]=i}else throw new Fu(`Unsupported clipboard type: ${r}`)}catch(n){console.warn(n instanceof Fu?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},iI=async(e,o=!1)=>{try{let t=e.findByType(he.html),r=!o&&t&&nI(t);return r?r.value.every(n=>n.type==="text")?{type:"text",value:e.getData(he.text)??r.value.map(n=>n.value).join(`
|
|
5
|
-
`).trim()}:r:{type:"text",value:(e.getData(he.text)||"").trim()}}catch{return{type:"text",value:""}}},aI=function(e){return this.find(o=>o.type===e)||null},lI=function(e){return this.find(t=>t.type===e)?.value??null},sI=function(){return this.filter(e=>e.kind==="file")},Ts=async e=>{let o;dI(e)?o=e.clipboardData?.items:o=e.dataTransfer?.items;let t=(await Promise.all(Array.from(o||[]).map(async r=>{if(r.kind==="file"){let n=r.getAsFile();if(n){let i=await ax(r);return n=await Jl(n),{type:n.type,kind:"file",file:n,fileHandle:i}}}else if(r.kind==="string"){let{type:n}=r,i;return"clipboardData"in e&&e.clipboardData?i=e.clipboardData?.getData(n):i=await new Promise(a=>{r.getAsString(l=>a(l))}),{type:n,kind:"string",value:i}}return null}))).filter(r=>r!=null);return Object.assign(t,{findByType:aI,getData:lI,getFiles:sI})},a2=async(e,o=!1)=>{let t=await iI(e,o);if(t.type==="mixedContent")return{mixedContent:t.value};try{let r=!o&&rI(t.value);if(r)return r}catch(r){console.error(r)}try{let r=JSON.parse(t.value),n=r.type===dn.excalidrawClipboardWithAPI;if(tI(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}},mm=async e=>{try{await navigator.clipboard.write([new window.ClipboardItem({[he.png]:e})])}catch(o){if(hn(e))await navigator.clipboard.write([new window.ClipboardItem({[he.png]:await e})]);else throw o}},nr=async(e,o)=>{if(cm)try{await navigator.clipboard.writeText(e||"");return}catch(t){console.error(t)}try{if(o){if(o.clipboardData?.setData(he.text,e||""),o.clipboardData?.getData(he.text)!==e)throw new Error("Failed to setData on clipboardEvent");return}}catch(t){console.error(t)}if(!cI(e))throw new Error("Error copying to clipboard.")},cI=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},dI=e=>e.type==="paste"||e.type==="copy"||e.type==="cut";var Ii=(e,{selectedElementIds:o},t)=>{e=Ie(e);let r=t&&ze(e,{selectedElementIds:o}),n=null,i=r?te(e,{selectedElementIds:o},{includeBoundTextElement:!0}):e;return r&&(i.length===1&&ne(i[0])?(n=i[0],i=ed(e,n)):i.length>1&&(i=te(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}))),{exportingFrame:n,exportedElements:$o(i)}},Ci=async(e,o,t,r,{exportBackground:n,exportPadding:i=mn,viewBackgroundColor:a,name:l=t.name||U1,fileHandle:s=null,exportingFrame:c=null})=>{if(o.length===0)throw new Error(g("alerts.cannotExportEmptyCanvas"));if(e==="svg"||e==="clipboard-svg"){let d=da(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 Hu(d.then(p=>new Blob([H1+p.outerHTML],{type:he.svg})),{description:"Export to SVG",name:l,extension:t.exportEmbedScene?"excalidraw.svg":"svg",mimeTypes:[Ll.svg],fileHandle:s});if(e==="clipboard-svg"){let p=await d.then(h=>h.outerHTML);try{await nr(p)}catch{throw new Error(g("errors.copyToSystemClipboardFailed"))}return}}let m=xd(o,t,r,{exportBackground:n,viewBackgroundColor:a,exportPadding:i,exportingFrame:c});if(e==="png"){let d=Yr(m);return t.exportEmbedScene&&(d=d.then(p=>import("./data/image-
|
|
5
|
+
`).trim()}:r:{type:"text",value:(e.getData(he.text)||"").trim()}}catch{return{type:"text",value:""}}},aI=function(e){return this.find(o=>o.type===e)||null},lI=function(e){return this.find(t=>t.type===e)?.value??null},sI=function(){return this.filter(e=>e.kind==="file")},Ts=async e=>{let o;dI(e)?o=e.clipboardData?.items:o=e.dataTransfer?.items;let t=(await Promise.all(Array.from(o||[]).map(async r=>{if(r.kind==="file"){let n=r.getAsFile();if(n){let i=await ax(r);return n=await Jl(n),{type:n.type,kind:"file",file:n,fileHandle:i}}}else if(r.kind==="string"){let{type:n}=r,i;return"clipboardData"in e&&e.clipboardData?i=e.clipboardData?.getData(n):i=await new Promise(a=>{r.getAsString(l=>a(l))}),{type:n,kind:"string",value:i}}return null}))).filter(r=>r!=null);return Object.assign(t,{findByType:aI,getData:lI,getFiles:sI})},a2=async(e,o=!1)=>{let t=await iI(e,o);if(t.type==="mixedContent")return{mixedContent:t.value};try{let r=!o&&rI(t.value);if(r)return r}catch(r){console.error(r)}try{let r=JSON.parse(t.value),n=r.type===dn.excalidrawClipboardWithAPI;if(tI(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}},mm=async e=>{try{await navigator.clipboard.write([new window.ClipboardItem({[he.png]:e})])}catch(o){if(hn(e))await navigator.clipboard.write([new window.ClipboardItem({[he.png]:await e})]);else throw o}},nr=async(e,o)=>{if(cm)try{await navigator.clipboard.writeText(e||"");return}catch(t){console.error(t)}try{if(o){if(o.clipboardData?.setData(he.text,e||""),o.clipboardData?.getData(he.text)!==e)throw new Error("Failed to setData on clipboardEvent");return}}catch(t){console.error(t)}if(!cI(e))throw new Error("Error copying to clipboard.")},cI=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},dI=e=>e.type==="paste"||e.type==="copy"||e.type==="cut";var Ii=(e,{selectedElementIds:o},t)=>{e=Ie(e);let r=t&&ze(e,{selectedElementIds:o}),n=null,i=r?te(e,{selectedElementIds:o},{includeBoundTextElement:!0}):e;return r&&(i.length===1&&ne(i[0])?(n=i[0],i=ed(e,n)):i.length>1&&(i=te(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}))),{exportingFrame:n,exportedElements:$o(i)}},Ci=async(e,o,t,r,{exportBackground:n,exportPadding:i=mn,viewBackgroundColor:a,name:l=t.name||U1,fileHandle:s=null,exportingFrame:c=null})=>{if(o.length===0)throw new Error(g("alerts.cannotExportEmptyCanvas"));if(e==="svg"||e==="clipboard-svg"){let d=da(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 Hu(d.then(p=>new Blob([H1+p.outerHTML],{type:he.svg})),{description:"Export to SVG",name:l,extension:t.exportEmbedScene?"excalidraw.svg":"svg",mimeTypes:[Ll.svg],fileHandle:s});if(e==="clipboard-svg"){let p=await d.then(h=>h.outerHTML);try{await nr(p)}catch{throw new Error(g("errors.copyToSystemClipboardFailed"))}return}}let m=xd(o,t,r,{exportBackground:n,viewBackgroundColor:a,exportPadding:i,exportingFrame:c});if(e==="png"){let d=Yr(m);return t.exportEmbedScene&&(d=d.then(p=>import("./data/image-V5AMX3V6.js").then(({encodePngMetadata:h})=>h({blob:p,metadata:$l(o,t,r,"local")})))),Hu(d,{description:"Export to PNG",name:l,extension:t.exportEmbedScene?"excalidraw.png":"png",mimeTypes:[Ll.png],fileHandle:s})}else if(e==="clipboard")try{let d=Yr(m);await mm(d)}catch(d){throw console.warn(d),d.name==="CANVAS_POSSIBLY_TOO_BIG"?new Error(g("canvasError.canvasTooBig")):Fr&&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 l2=async(e,o,t,r)=>{let{exportBackground:n,viewBackgroundColor:i,fileHandle:a}=o,l=J0(a);if(!a||!Q0(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}=Ii(e,o,!1);return await Ci(l,s,o,t,{exportBackground:n,viewBackgroundColor:i,name:r,fileHandle:a,exportingFrame:c}),{fileHandle:a}};import{Fragment as mI,jsx as jr,jsxs as pI}from"react/jsx-runtime";var qh=U({name:"changeProjectName",label:"labels.fileTitle",trackEvent:!1,perform:(e,o,t)=>({appState:{...o,name:t},captureUpdate:_.EVENTUALLY}),PanelComponent:({appState:e,updateData:o,appProps:t,data:r,app:n})=>jr(jy,{label:g("labels.fileTitle"),value:n.getName(),onChange:i=>o(i),ignoreFocus:r?.ignoreFocus??!1})}),s2=U({name:"changeExportScale",label:"imageExportDialog.scale",trackEvent:{category:"export",action:"scale"},perform:(e,o,t)=>({appState:{...o,exportScale:t},captureUpdate:_.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t})=>{let r=Ie(e),i=ze(r,o)?te(r,o):r;return jr(mI,{children:Tc.map(a=>{let[l,s]=j0(i,mn,a),c=`${g("imageExportDialog.label.scale")} ${a}x (${l}x${s})`;return jr(j,{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)})})}}),Jh=U({name:"changeExportBackground",label:"imageExportDialog.label.withBackground",trackEvent:{category:"export",action:"toggleBackground"},perform:(e,o,t)=>({appState:{...o,exportBackground:t},captureUpdate:_.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>jr(ys,{checked:e.exportBackground,onChange:t=>o(t),children:g("imageExportDialog.label.withBackground")})}),pm=U({name:"changeExportEmbedScene",label:"imageExportDialog.tooltip.embedScene",trackEvent:{category:"export",action:"embedScene"},perform:(e,o,t)=>({appState:{...o,exportEmbedScene:t},captureUpdate:_.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>pI(ys,{checked:e.exportEmbedScene,onChange:t=>o(t),children:[g("imageExportDialog.label.embedScene"),jr(To,{label:g("imageExportDialog.tooltip.embedScene"),long:!0,children:jr("div",{className:"excalidraw-tooltip-icon",children:Ox})})]})}),ki=U({name:"saveToActiveFile",label:"buttons.save",icon:bi,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}=Ed(o.fileHandle)?await l2(e,o,r.files,r.getName()):await ud(e,o,r.files,r.getName());return{captureUpdate:_.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:_.EVENTUALLY}}},keyTest:e=>e.key===T.S&&e[T.CTRL_OR_CMD]&&!e.shiftKey}),Is=U({name:"saveFileToDisk",label:"exportDialog.disk_title",icon:bi,viewMode:!0,trackEvent:{category:"export"},perform:async(e,o,t,r)=>{try{let{fileHandle:n}=await ud(e,{...o,fileHandle:null},r.files,r.getName());return{captureUpdate:_.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:_.EVENTUALLY}}},keyTest:e=>e.key===T.S&&e.shiftKey&&e[T.CTRL_OR_CMD],PanelComponent:({updateData:e})=>jr(j,{type:"button",icon:Px,title:g("buttons.saveAs"),"aria-label":g("buttons.saveAs"),showAriaLabel:ve().formFactor==="phone",hidden:!ca,onClick:()=>e(null),"data-testid":"save-as-button"})}),Ua=U({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 Uu(o,e);return{elements:n,appState:i,files:a,captureUpdate:_.IMMEDIATELY}}catch(n){return n?.name==="AbortError"?(console.warn(n),!1):{elements:e,appState:{...o,errorMessage:n.message},files:r.files,captureUpdate:_.EVENTUALLY}}},keyTest:e=>e[T.CTRL_OR_CMD]&&e.key===T.O}),c2=U({name:"exportWithDarkMode",label:"imageExportDialog.label.darkMode",trackEvent:{category:"export",action:"toggleTheme"},perform:(e,o,t)=>({appState:{...o,exportWithDarkMode:t},captureUpdate:_.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>jr("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"-45px",marginBottom:"10px"},children:jr(Xy,{value:e.exportWithDarkMode?oe.DARK:oe.LIGHT,onChange:t=>{o(t===oe.DARK)},title:g("imageExportDialog.label.darkMode")})})});var d2="{}",Qh=U({name:"copyStyles",label:"labels.copyStyles",icon:uh,trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=[],i=e.find(a=>o.selectedElementIds[a.id]);if(n.push(i),i&&ht(i)){let a=xe(i,r.scene.getNonDeletedElementsMap());n.push(a)}return i&&(d2=JSON.stringify(n)),{appState:{...o,toast:{message:g("toast.copyStyles")}},captureUpdate:_.EVENTUALLY}},keyTest:e=>e[T.CTRL_OR_CMD]&&e.altKey&&e.code===ue.C}),eg=U({name:"pasteStyles",label:"labels.pasteStyles",icon:uh,trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=JSON.parse(d2),i=n[0],a=n[1];if(!xb(i))return{elements:e,captureUpdate:_.EVENTUALLY};let l=te(e,o,{includeBoundTextElement:!0}),s=l.map(c=>c.id);return{elements:e.map(c=>{if(s.includes(c.id)){let m=i;if(X(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?yb(m.roundness.type,c)?m.roundness:vb(c):null});if(X(d)){let p=m.fontSize||Jn,h=m.fontFamily||Fi;d=ee(d,{fontSize:p,fontFamily:h,textAlign:m.textAlign||xc,lineHeight:m.lineHeight||zr(h)});let b=null;d.containerId&&(b=l.find(f=>X(d)&&f.id===d.containerId)||null),ct(d,b,r.scene)}return d.type==="arrow"&&Ce(m)&&(d=ee(d,{startArrowhead:m.startArrowhead,endArrowhead:m.endArrowhead})),ne(c)&&(d=ee(d,{roundness:null,backgroundColor:"transparent"})),d}return c}),captureUpdate:_.IMMEDIATELY}},keyTest:e=>e[T.CTRL_OR_CMD]&&e.altKey&&e.code===ue.V});var Si=U({name:"toggleShortcuts",label:"welcomeScreen.defaults.helpHint",icon:Cx,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"},openMenu:null,openPopup:null},captureUpdate:_.EVENTUALLY}),keyTest:e=>e.key===T.QUESTION_MARK});import{jsx as Ga}from"react/jsx-runtime";var uI=e=>{if(e.length>=2){let o=e[0].groupIds;for(let t of o)if(e.reduce((r,n)=>r&&qi(n,t),!0))return!0}return!1},m2=(e,o,t)=>{let r=t.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0});return r.length>=2&&!uI(r)&&!td(r)},tg=U({name:"group",label:"labels.group",icon:e=>Ga(ch,{theme:e.theme}),trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=jb(r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0}));if(n.length<2)return{appState:o,elements:e,captureUpdate:_.EVENTUALLY};let i=Jo(o);if(i.length===1){let y=i[0],v=new Set(Ye(e,y).map(w=>w.id)),x=new Set(n.map(w=>w.id));if(new Set([...Array.from(v),...Array.from(x)]).size===v.size)return{appState:o,elements:e,captureUpdate:_.EVENTUALLY}}let a=[...e];new Set(n.map(y=>y.frameId)).size>1&&Xb(n).forEach((v,x)=>{Qc(v,r.scene.getNonDeletedElementsMap())});let s=jo(),c=re(n);a=a.map(y=>c.get(y.id)?ee(y,{groupIds:Wb(y.groupIds,s,o.editingGroupId)}):y);let m=Ye(a,s),d=m[m.length-1],p=a.lastIndexOf(d),h=a.slice(p+1),b=a.slice(0,p).filter(y=>!qi(y,s)),f=br([...b,...m,...h],re(m));return{appState:{...o,...Hb(s,{...o,selectedGroupIds:{}},Ie(a))},elements:f,captureUpdate:_.IMMEDIATELY}},predicate:(e,o,t,r)=>m2(e,o,r),keyTest:e=>!e.shiftKey&&e[T.CTRL_OR_CMD]&&e.key===T.G,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Ga(j,{hidden:!m2(e,o,r),type:"button",icon:Ga(ch,{theme:o.theme}),onClick:()=>t(null),title:`${g("labels.group")} \u2014 ${O("CtrlOrCmd+G")}`,"aria-label":g("labels.group"),visible:ze(Ie(e),o)})}),og=U({name:"ungroup",label:"labels.ungroup",icon:e=>Ga(dh,{theme:e.theme}),trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=Jo(o),i=re(e);if(n.length===0)return{appState:o,elements:e,captureUpdate:_.EVENTUALLY};let a=[...e],l=[];a=a.map(p=>{ot(p)&&l.push(p.id);let h=Vb(p.groupIds,o.selectedGroupIds);return h.length===p.groupIds.length?p:ee(p,{groupIds:h})});let s=gt(o,Ie(a),o,null),c=r.scene.getSelectedElements(o),m=new Set(c.filter(p=>p.frameId).map(p=>p.frameId));return $b(e).filter(p=>m.has(p.id)).forEach(p=>{p&&(a=pr(a,lo(a,p,o,i),p,r))}),s.selectedElementIds=Object.entries(s.selectedElementIds).reduce((p,[h,b])=>(b&&!l.includes(h)&&(p[h]=!0),p),{}),{appState:{...o,...s},elements:a,captureUpdate:_.IMMEDIATELY}},keyTest:e=>e.shiftKey&&e[T.CTRL_OR_CMD]&&e.key===T.G.toUpperCase(),predicate:(e,o)=>Jo(o).length>0,PanelComponent:({elements:e,appState:o,updateData:t})=>Ga(j,{type:"button",hidden:Jo(o).length===0,icon:Ga(dh,{theme:o.theme}),onClick:()=>t(null),title:`${g("labels.ungroup")} \u2014 ${O("CtrlOrCmd+Shift+G")}`,"aria-label":g("labels.ungroup"),visible:ze(Ie(e),o)})});import bI from"clsx";var um=(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 hI(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 Mi=(e,o)=>`hsl(${Math.abs(hI(o?.id||e))%37*10}, 100%, 83%)`,p2=e=>{let o=e?.trim()?.codePointAt(0);return(o?String.fromCodePoint(o):"?").toUpperCase()},u2=({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 h=Mi(i,c);e.save(),e.strokeStyle=h,e.fillStyle=h;let b=o.remotePointerUserStates.get(i),f=p||b==="idle"||b==="away";f&&(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=h,e.stroke(),e.closePath());let y=t.theme===oe.DARK?"#2f6330":_1,v=c?.isSpeaking;v&&(e.fillStyle=y,e.strokeStyle=y,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=Ml,e.strokeStyle=Ml,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=h,e.strokeStyle=h,e.lineWidth=2,e.lineJoin="round",e.beginPath(),f?(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 x=o.remotePointerUsernames.get(i)||"";if(!p&&x){e.font="600 12px sans-serif";let E=(v?l+0:l)+m/2,w=(v?s+0:s)+d+2,I=5,S=3,P=e.measureText(x),M=P.actualBoundingBoxDescent+P.actualBoundingBoxAscent,F=Math.max(M,12),R=E-1,D=w-1,N=P.width+2+I*2+2,Y=F+2+S*2+2;if(e.roundRect?(e.beginPath(),e.roundRect(R,D,N,Y,8),e.fillStyle=h,e.fill(),e.strokeStyle=Ml,e.stroke(),v&&(e.beginPath(),e.roundRect(R-2,D-2,N+4,Y+4,8),e.strokeStyle=y,e.stroke())):um(e,R,D,N,Y,8,Ml),e.fillStyle=A1,e.fillText(x,E+I+1,w+S+P.actualBoundingBoxAscent+Math.floor((F-M)/2)+2),v){e.fillStyle=y;let J=8,z=8,H=5;e.fillRect(R+N+z,D+(Y/2-J/2),2,J),e.fillRect(R+N+z+H,D+(Y/2-J*2/2),2,J*2),e.fillRect(R+N+z+H*2,D+(Y/2-J/2),2,J)}}e.restore(),e.closePath()}};import gI from"clsx";import{useState as fI}from"react";import{jsx as h2}from"react/jsx-runtime";var rg=({color:e,onClick:o,name:t,src:r,className:n})=>{let i=p2(t),[a,l]=fI(!1),s=!a&&r,c=s?void 0:{background:e};return h2("div",{className:gI("Avatar",n),style:c,onClick:o,children:s?h2("img",{className:"Avatar-img",src:r,alt:i,referrerPolicy:"no-referrer",onError:()=>l(!0)}):i})};import{jsx as Sr,jsxs as hm}from"react/jsx-runtime";var xI=U({name:"goToCollaborator",label:"Go to a collaborator",viewMode:!0,trackEvent:{category:"collab"},perform:(e,o,t)=>(Xe(t,"actionGoToCollaborator: collaborator should be defined when actionGoToCollaborator is called"),!t.socketId||o.userToFollow?.socketId===t.socketId||t.isCurrentUser?{appState:{...o,userToFollow:null},captureUpdate:_.EVENTUALLY}:{appState:{...o,userToFollow:{socketId:t.socketId,username:t.username||""},openMenu:o.openMenu==="canvas"?null:o.openMenu},captureUpdate:_.EVENTUALLY}),PanelComponent:({updateData:e,data:o,appState:t})=>{let{socketId:r,collaborator:n,withName:i,isBeingFollowed:a}=o,l=Mi(r,n),s=bI({"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?hm("div",{className:"UserList__collaborator-status-icon-speaking-indicator",title:g("userList.hint.isSpeaking"),children:[Sr("div",{}),Sr("div",{}),Sr("div",{})]}):n.isMuted?Sr("div",{className:"UserList__collaborator-status-icon-microphone-muted",title:g("userList.hint.micMuted"),children:OE}):Sr("div",{title:g("userList.hint.inCall"),children:NE}):null;return i?hm("div",{className:`dropdown-menu-item dropdown-menu-item-base UserList__collaborator ${s}`,style:{"--avatar-size":"1.5rem"},onClick:()=>e(n),children:[Sr(rg,{color:l,onClick:()=>{},name:n.username||"",src:n.avatarUrl,className:s}),Sr("div",{className:"UserList__collaborator-name",children:n.username}),hm("div",{className:"UserList__collaborator-status-icons","aria-hidden":!0,children:[a&&Sr("div",{className:"UserList__collaborator-status-icon-is-followed",title:g("userList.hint.followStatus"),children:ka}),c]})]}):hm("div",{className:`UserList__collaborator UserList__collaborator--avatar-only ${s}`,children:[Sr(rg,{color:l,onClick:()=>{e(n)},name:n.username||"",src:n.avatarUrl,className:s}),c&&Sr("div",{className:"UserList__collaborator-status-icon",children:c})]})}});var ng=U({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 kc)if(n.some(a=>a.type===i))return{captureUpdate:_.EVENTUALLY,appState:{...o,errorMessage:g(`errors.libraryElementTypeError.${i}`)}};return r.library.getLatestLibrary().then(i=>r.library.setLibrary([{id:jo(),status:"unpublished",elements:n.map(Qo),created:Date.now()},...i])).then(()=>({captureUpdate:_.EVENTUALLY,appState:{...o,toast:{message:g("toast.addedToLibrary")}}})).catch(i=>({captureUpdate:_.EVENTUALLY,appState:{...o,errorMessage:i.message}}))},label:"labels.addToLibrary"});import{jsx as Va}from"react/jsx-runtime";var Qt=(e,o)=>{let t=o.scene.getSelectedElements(e);return qc(t,o.scene.getNonDeletedElementsMap(),e).length>1&&!t.some(r=>ne(r))},Wa=(e,o,t,r)=>{let n=t.scene.getSelectedElements(o),i=c0(n,r,t.scene,o),a=re(i);return ur(e.map(l=>a.get(l.id)||l),o,t)},EI=U({name:"alignTop",label:"labels.alignTop",icon:rh,trackEvent:{category:"element"},predicate:(e,o,t,r)=>Qt(o,r),perform:(e,o,t,r)=>({appState:o,elements:Wa(e,o,r,{position:"start",axis:"y"}),captureUpdate:_.IMMEDIATELY}),keyTest:e=>e[T.CTRL_OR_CMD]&&e.shiftKey&&e.key===T.ARROW_UP,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Va(j,{hidden:!Qt(o,r),type:"button",icon:rh,onClick:()=>t(null),title:`${g("labels.alignTop")} \u2014 ${O("CtrlOrCmd+Shift+Up")}`,"aria-label":g("labels.alignTop"),visible:ze(Ie(e),o)})}),yI=U({name:"alignBottom",label:"labels.alignBottom",icon:nh,trackEvent:{category:"element"},predicate:(e,o,t,r)=>Qt(o,r),perform:(e,o,t,r)=>({appState:o,elements:Wa(e,o,r,{position:"end",axis:"y"}),captureUpdate:_.IMMEDIATELY}),keyTest:e=>e[T.CTRL_OR_CMD]&&e.shiftKey&&e.key===T.ARROW_DOWN,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Va(j,{hidden:!Qt(o,r),type:"button",icon:nh,onClick:()=>t(null),title:`${g("labels.alignBottom")} \u2014 ${O("CtrlOrCmd+Shift+Down")}`,"aria-label":g("labels.alignBottom"),visible:ze(Ie(e),o)})}),vI=U({name:"alignLeft",label:"labels.alignLeft",icon:ih,trackEvent:{category:"element"},predicate:(e,o,t,r)=>Qt(o,r),perform:(e,o,t,r)=>({appState:o,elements:Wa(e,o,r,{position:"start",axis:"x"}),captureUpdate:_.IMMEDIATELY}),keyTest:e=>e[T.CTRL_OR_CMD]&&e.shiftKey&&e.key===T.ARROW_LEFT,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Va(j,{hidden:!Qt(o,r),type:"button",icon:ih,onClick:()=>t(null),title:`${g("labels.alignLeft")} \u2014 ${O("CtrlOrCmd+Shift+Left")}`,"aria-label":g("labels.alignLeft"),visible:ze(Ie(e),o)})}),wI=U({name:"alignRight",label:"labels.alignRight",icon:ah,trackEvent:{category:"element"},predicate:(e,o,t,r)=>Qt(o,r),perform:(e,o,t,r)=>({appState:o,elements:Wa(e,o,r,{position:"end",axis:"x"}),captureUpdate:_.IMMEDIATELY}),keyTest:e=>e[T.CTRL_OR_CMD]&&e.shiftKey&&e.key===T.ARROW_RIGHT,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Va(j,{hidden:!Qt(o,r),type:"button",icon:ah,onClick:()=>t(null),title:`${g("labels.alignRight")} \u2014 ${O("CtrlOrCmd+Shift+Right")}`,"aria-label":g("labels.alignRight"),visible:ze(Ie(e),o)})}),TI=U({name:"alignVerticallyCentered",label:"labels.centerVertically",icon:lh,trackEvent:{category:"element"},predicate:(e,o,t,r)=>Qt(o,r),perform:(e,o,t,r)=>({appState:o,elements:Wa(e,o,r,{position:"center",axis:"y"}),captureUpdate:_.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Va(j,{hidden:!Qt(o,r),type:"button",icon:lh,onClick:()=>t(null),title:g("labels.centerVertically"),"aria-label":g("labels.centerVertically"),visible:ze(Ie(e),o)})}),II=U({name:"alignHorizontallyCentered",label:"labels.centerHorizontally",icon:sh,trackEvent:{category:"element"},predicate:(e,o,t,r)=>Qt(o,r),perform:(e,o,t,r)=>({appState:o,elements:Wa(e,o,r,{position:"center",axis:"x"}),captureUpdate:_.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Va(j,{hidden:!Qt(o,r),type:"button",icon:sh,onClick:()=>t(null),title:g("labels.centerHorizontally"),"aria-label":g("labels.centerHorizontally"),visible:ze(Ie(e),o)})});import{jsx as b2}from"react/jsx-runtime";var g2=(e,o)=>{let t=o.scene.getSelectedElements(e);return qc(t,o.scene.getNonDeletedElementsMap(),e).length>2&&!t.some(r=>ne(r))},f2=(e,o,t,r)=>{let n=t.scene.getSelectedElements(o),i=h0(n,t.scene.getNonDeletedElementsMap(),r,o),a=re(i);return ur(e.map(l=>a.get(l.id)||l),o,t)},CI=U({name:"distributeHorizontally",label:"labels.distributeHorizontally",trackEvent:{category:"element"},perform:(e,o,t,r)=>({appState:o,elements:f2(e,o,r,{space:"between",axis:"x"}),captureUpdate:_.IMMEDIATELY}),keyTest:e=>!e[T.CTRL_OR_CMD]&&e.altKey&&e.code===ue.H,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>b2(j,{hidden:!g2(o,r),type:"button",icon:Hx,onClick:()=>t(null),title:`${g("labels.distributeHorizontally")} \u2014 ${O("Alt+H")}`,"aria-label":g("labels.distributeHorizontally"),visible:ze(Ie(e),o)})}),kI=U({name:"distributeVertically",label:"labels.distributeVertically",trackEvent:{category:"element"},perform:(e,o,t,r)=>({appState:o,elements:f2(e,o,r,{space:"between",axis:"y"}),captureUpdate:_.IMMEDIATELY}),keyTest:e=>!e[T.CTRL_OR_CMD]&&e.altKey&&e.code===ue.V,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>b2(j,{hidden:!g2(o,r),type:"button",icon:Ux,onClick:()=>t(null),title:`${g("labels.distributeVertically")} \u2014 ${O("Alt+V")}`,"aria-label":g("labels.distributeVertically"),visible:ze(Ie(e),o)})});var ig=U({name:"flipHorizontal",label:"labels.flipHorizontal",icon:HE,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:ur(x2(e,r.scene.getNonDeletedElementsMap(),o,"horizontal",r),o,r),appState:o,captureUpdate:_.IMMEDIATELY}),keyTest:e=>e.shiftKey&&e.code===ue.H}),ag=U({name:"flipVertical",label:"labels.flipVertical",icon:FE,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:ur(x2(e,r.scene.getNonDeletedElementsMap(),o,"vertical",r),o,r),appState:o,captureUpdate:_.IMMEDIATELY}),keyTest:e=>e.shiftKey&&e.code===ue.V&&!e[T.CTRL_OR_CMD]}),x2=(e,o,t,r,n)=>{let i=te(Ie(e),t,{includeBoundTextElement:!0,includeElementsInFrames:!0}),a=SI(i,o,r,n),l=re(a);return e.map(s=>l.get(s.id)||s)},SI=(e,o,t,r)=>{if(e.every(p=>Ce(p)&&(p.startBinding||p.endBinding)))return e.map(p=>{let h=p;return ee(h,{startArrowhead:h.endArrowhead,endArrowhead:h.startArrowhead})});let{midX:n,midY:i}=Vr(e);P0(e,o,"nw",r.scene,new Map(Array.from(o.values()).map(p=>[p.id,Qo(p)])),{flipByX:t==="horizontal",flipByY:t==="vertical",shouldResizeFromCenter:!0,shouldMaintainAspectRatio:!0}),Ul(e.filter(Ce),r.scene,r.state);let{elbowArrows:a,otherElements:l}=e.reduce((p,h)=>Te(h)?{...p,elbowArrows:p.elbowArrows.concat(h)}:{...p,otherElements:p.otherElements.concat(h)},{elbowArrows:[],otherElements:[]}),{midX:s,midY:c}=Vr(e),[m,d]=[n-s,i-c];return l.forEach(p=>r.scene.mutateElement(p,{x:p.x+m,y:p.y+d})),a.forEach(p=>r.scene.mutateElement(p,{x:p.x+m,y:p.y+d})),e};var Ya=U({name:"copy",label:"labels.copy",icon:Ql,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});try{await dm(n,r.files,t)}catch(i){return{captureUpdate:_.EVENTUALLY,appState:{...o,errorMessage:i.message}}}return{captureUpdate:_.EVENTUALLY}},keyTest:void 0}),lg=U({name:"paste",label:"labels.paste",trackEvent:{category:"element"},perform:async(e,o,t,r)=>{let n;try{n=await i2()}catch(i){return i.name==="AbortError"||i.name==="NotAllowedError"?!1:(console.error(`actionPaste ${i.name}: ${i.message}`),Fr?{captureUpdate:_.EVENTUALLY,appState:{...o,errorMessage:g("hints.firefox_clipboard_write")}}:{captureUpdate:_.EVENTUALLY,appState:{...o,errorMessage:g("errors.asyncPasteFailedOnRead")}})}try{r.pasteFromClipboard(r2({types:n}))}catch(i){return console.error(i),{captureUpdate:_.EVENTUALLY,appState:{...o,errorMessage:g("errors.asyncPasteFailedOnParse")}}}return{captureUpdate:_.EVENTUALLY}},keyTest:void 0}),gm=U({name:"cut",label:"labels.cut",icon:CE,trackEvent:{category:"element"},perform:(e,o,t,r)=>(Ya.perform(e,o,t,r),ss.perform(e,o,null,r)),keyTest:e=>e[T.CTRL_OR_CMD]&&e.key===T.X}),fm=U({name:"copyAsSvg",label:"labels.copyAsSvg",icon:UE,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{if(!r.canvas)return{captureUpdate:_.EVENTUALLY};let{exportedElements:n,exportingFrame:i}=Ii(e,o,!0);try{await Ci("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:_.EVENTUALLY}}catch(a){return console.error(a),{appState:{errorMessage:a.message},captureUpdate:_.EVENTUALLY}}},predicate:e=>cm&&e.length>0,keywords:["svg","clipboard","copy"]}),bm=U({name:"copyAsPng",label:"labels.copyAsPng",icon:GE,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{if(!r.canvas)return{captureUpdate:_.EVENTUALLY};let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),{exportedElements:i,exportingFrame:a}=Ii(e,o,!0);try{return await Ci("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:_.EVENTUALLY}}catch(l){return console.error(l),{appState:{...o,errorMessage:l.message},captureUpdate:_.EVENTUALLY}}},predicate:e=>Ha&&e.length>0,keyTest:e=>e.code===ue.C&&e.altKey&&e.shiftKey,keywords:["png","clipboard","copy"]}),xm=U({name:"copyText",label:"labels.copyText",trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0});try{nr(pu(n))}catch{throw new Error(g("errors.copyToSystemClipboardFailed"))}return{captureUpdate:_.EVENTUALLY}},predicate:(e,o,t,r)=>cm&&r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0}).some(X),keywords:["text","clipboard","copy"]});var Em=U({name:"gridMode",icon:ZE,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:_.EVENTUALLY}},checked:e=>e.gridModeEnabled,predicate:(e,o,t)=>t.gridModeEnabled===void 0,keyTest:e=>e[T.CTRL_OR_CMD]&&e.code===ue.QUOTE});var Ka=U({name:"zenMode",label:"buttons.zenMode",icon:VE,viewMode:!0,trackEvent:{category:"canvas",predicate:e=>!e.zenModeEnabled},perform(e,o){return{appState:{...o,zenModeEnabled:!this.checked(o)},captureUpdate:_.EVENTUALLY}},checked:e=>e.zenModeEnabled,predicate:(e,o,t,r)=>r.editorInterface.formFactor!=="phone"&&typeof t.zenModeEnabled>"u",keyTest:e=>!e[T.CTRL_OR_CMD]&&e.altKey&&e.code===ue.Z});var sg=U({name:"objectsSnapMode",label:"buttons.objectsSnapMode",icon:WE,viewMode:!1,trackEvent:{category:"canvas",predicate:e=>!e.objectsSnapModeEnabled},perform(e,o){return{appState:{...o,objectsSnapModeEnabled:!this.checked(o),gridModeEnabled:!1},captureUpdate:_.EVENTUALLY}},checked:e=>e.objectsSnapModeEnabled,predicate:(e,o,t)=>typeof t.objectsSnapModeEnabled>"u",keyTest:e=>!e[T.CTRL_OR_CMD]&&e.altKey&&e.code===ue.S});var Za=U({name:"stats",label:"stats.fullTitle",icon:zE,viewMode:!0,trackEvent:{category:"menu"},keywords:["edit","attributes","customize"],perform(e,o){return{appState:{...o,stats:{...o.stats,open:!this.checked(o)}},captureUpdate:_.EVENTUALLY}},checked:e=>e.stats.open,keyTest:e=>!e[T.CTRL_OR_CMD]&&e.altKey&&e.code===ue.SLASH});var cg=U({name:"unbindText",label:"labels.unbindText",trackEvent:{category:"element"},predicate:(e,o,t,r)=>r.scene.getSelectedElements(o).some(i=>ht(i)),perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o),i=r.scene.getNonDeletedElementsMap();return n.forEach(a=>{let l=xe(a,i);if(l){let{width:s,height:c}=Gt(l.originalText,bt(l),l.lineHeight),m=kb(a.id);Cb(a.id);let{x:d,y:p}=xn(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(h=>h.id!==l.id),height:m||a.height})}}),{elements:e,appState:o,captureUpdate:_.IMMEDIATELY}}}),dg=U({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=X(n[0])||X(n[1]),a;if(Ur(n[0])?a=n[0]:Ur(n[1])&&(a=n[1]),i&&a&&xe(a,r.scene.getNonDeletedElementsMap())===null)return!0}return!1},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o),i,a;X(n[0])&&Ur(n[1])?(i=n[0],a=n[1]):(i=n[1],a=n[0]),r.scene.mutateElement(i,{containerId:a.id,verticalAlign:Lo.MIDDLE,textAlign:Qp.CENTER,autoResize:!0,angle:Ce(a)?0:a?.angle??0}),r.scene.mutateElement(a,{boundElements:(a.boundElements||[]).concat({type:"text",id:i.id})});let l=a.height;return ct(i,a,r.scene),Bl(a.id,l),{elements:MI(e,a,i),appState:{...o,selectedElementIds:{[a.id]:!0}},captureUpdate:_.IMMEDIATELY}}}),MI=(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),br(r,re([o,t])),r},LI=(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),br(r,re([o,t])),r},E2=U({name:"wrapTextInContainer",label:"labels.createContainerFromText",trackEvent:{category:"element"},predicate:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o),i=n.some(a=>X(a)&&!ot(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(X(l)&&!ot(l)){let s=xr({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:bn("rectangle")?St.ADAPTIVE_RADIUS:St.PROPORTIONAL_RADIUS}:null,opacity:100,locked:!1,x:l.x-Jp,y:l.y-Jp,width:Zi(l.width,"rectangle"),height:Zi(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,h=d.endBinding;p?.elementId===l.id&&(p={...p,elementId:s.id}),h?.elementId===l.id&&(h={...h,elementId:s.id}),(p||h)&&r.scene.mutateElement(d,{startBinding:p,endBinding:h})})}r.scene.mutateElement(l,{containerId:s.id,verticalAlign:Lo.MIDDLE,boundElements:null,textAlign:Qp.CENTER,autoResize:!0}),ct(l,s,r.scene),i=LI([...i,s],s,l),a[s.id]=!0}return{elements:i,appState:{...o,selectedElementIds:a},captureUpdate:_.IMMEDIATELY}}});import AI from"clsx";import{useCallback as y2,useEffect as v2,useLayoutEffect as _I,useRef as PI,useState as DI}from"react";import{jsx as Xa,jsxs as w2}from"react/jsx-runtime";var ug=380,RI=42,mg=5,T2=85,NI=500,pg=!1,ym=new Map,I2=({element:e,scene:o,setAppState:t,onLinkOpen:r,setToast:n,updateEmbedValidationStatus:i})=>{let a=o.getNonDeletedElementsMap(),l=Cr(),s=Vt(),c=ve(),m=e.link||"",[d,p]=DI(m),h=PI(null),b=l.showHyperlinkPopup==="editor",f=y2(()=>{if(!h.current)return;let w=qo(h.current.value)||null;if(!e.link&&w&&pe("hyperlink","create"),Ut(e)){if(l.activeEmbeddable?.element===e&&t({activeEmbeddable:null}),!w){o.mutateElement(e,{link:null}),i(e,!1);return}if(!ia(w,s.validateEmbeddable))w&&n({message:g("toast.unableToEmbed"),closable:!0}),e.link&&ym.set(e.id,e.link),o.mutateElement(e,{link:w}),i(e,!1);else{let{width:I,height:S}=e,P=pi(w);P?.error instanceof URIError&&n({message:g("toast.unrecognizedLinkFormat"),closable:!0});let M=P?P.intrinsicSize.w/P.intrinsicSize.h:1,F=ym.get(e.id)!==e.link;o.mutateElement(e,{...F?{width:P?.type==="video"?I>S?I:S*M:I,height:P?.type==="video"&&I>S?I/M:S}:{},link:w}),i(e,!0),ym.has(e.id)&&ym.delete(e.id)}}else o.mutateElement(e,{link:w})},[e,o,n,s.validateEmbeddable,l.activeEmbeddable,t,i]);_I(()=>()=>{f()},[f]),v2(()=>{b&&h?.current&&!(c.formFactor==="phone"||c.isTouchScreen)&&h.current.select()},[b,c.formFactor,c.isTouchScreen]),v2(()=>{let w=null,I=S=>{if(b)return;w&&clearTimeout(w),BI(e,a,l,L(S.clientX,S.clientY))&&(w=window.setTimeout(()=>{t({showHyperlinkPopup:!1})},NI))};return window.addEventListener("pointermove",I,!1),()=>{window.removeEventListener("pointermove",I,!1),w&&clearTimeout(w)}},[l,e,b,t,a]);let y=y2(()=>{pe("hyperlink","delete"),o.mutateElement(e,{link:null}),t({showHyperlinkPopup:!1})},[t,e,o]),v=()=>{pe("hyperlink","edit","popup-ui"),t({showHyperlinkPopup:"editor"})},{x,y:E}=C2(e,l,a);return l.contextMenu||l.selectedElementsAreBeingDragged||l.resizingElement||l.isRotating||l.openMenu||l.viewModeEnabled||l.hideAnnotations?null:w2("div",{className:"excalidraw-hyperlinkContainer",style:{top:`${E}px`,left:`${x}px`,width:ug,padding:mg},children:[b?Xa("input",{className:AI("excalidraw-hyperlinkContainer-input"),placeholder:g("labels.link.hint"),ref:h,value:d,onChange:w=>p(w.target.value),autoFocus:!0,onKeyDown:w=>{w.stopPropagation(),w[T.CTRL_OR_CMD]&&w.key===T.K&&w.preventDefault(),(w.key===T.ENTER||w.key===T.ESCAPE)&&(f(),t({showHyperlinkPopup:"info"}))}}):e.link?Xa("a",{href:qo(e.link||""),className:"excalidraw-hyperlinkContainer-link",target:Nc(e.link)?"_self":"_blank",onClick:w=>{if(e.link&&r){let I=Pc("excalidraw-link",w.nativeEvent);r({...e,link:qo(e.link)},I),I.defaultPrevented&&w.preventDefault()}},rel:"noopener noreferrer",children:e.link}):Xa("div",{className:"excalidraw-hyperlinkContainer-link",children:g("labels.link.empty")}),w2("div",{className:"excalidraw-hyperlinkContainer__buttons",children:[!b&&Xa(j,{type:"button",title:g("buttons.edit"),"aria-label":g("buttons.edit"),label:g("buttons.edit"),onClick:v,className:"excalidraw-hyperlinkContainer--edit",icon:Tr}),Xa(j,{type:"button",title:g("labels.linkToElement"),"aria-label":g("labels.linkToElement"),label:g("labels.linkToElement"),onClick:()=>{t({openDialog:{name:"elementLinkSelector",sourceElementId:e.id}})},icon:zd}),m&&!Ut(e)&&Xa(j,{type:"button",title:g("buttons.remove"),"aria-label":g("buttons.remove"),label:g("buttons.remove"),onClick:y,className:"excalidraw-hyperlinkContainer--remove",icon:vo})]})]})},C2=(e,o,t)=>{let[r,n]=Mt(e,t),{x:i,y:a}=Ct({sceneX:r+e.width/2,sceneY:n},o),l=i-o.offsetLeft-ug/2,s=a-o.offsetTop-T2;return{x:l,y:s}},hg=(e,o)=>{let t=te(e,o);return Ut(t[0])?"labels.link.editEmbed":t[0]?.link?"labels.link.edit":"labels.link.create"},Cs=null,k2=(e,o,t)=>{Cs&&clearTimeout(Cs),Cs=window.setTimeout(()=>OI(e,o,t),z1)},OI=(e,o,t)=>{if(!e.link)return;let r=za();r.classList.add("excalidraw-tooltip--visible"),r.style.maxWidth="20rem",r.textContent=mi(e.link)?g("labels.link.goToElement"):e.link;let[n,i,a,l]=Mt(e,t),[s,c,m,d]=Y0([n,i,a,l],e.angle,o),p=Ct({sceneX:s,sceneY:c},o);Xh(r,{left:p.x,top:p.y,width:m,height:d},"top"),pe("hyperlink","tooltip","link-icon"),pg=!0},gg=()=>{Cs&&clearTimeout(Cs),pg&&(pg=!1,za().classList.remove("excalidraw-tooltip--visible"))},BI=(e,o,t,[r,n])=>{let{x:i,y:a}=We({clientX:r,clientY:n},t),l=15/t.zoom.value;if(Wc(L(i,a),e,o))return!1;let[s,c,m]=Mt(e,o);if(i>=s&&i<=m&&a>=c-T2&&a<=c)return!1;let{x:d,y:p}=C2(e,t,o);return!(r>=d-l&&r<=d+ug+mg*2+l&&n>=p-l&&n<=p+l+mg*2+RI)};import{jsx as zI}from"react/jsx-runtime";var ks=U({name:"hyperlink",label:(e,o)=>hg(e,o),icon:os,perform:(e,o)=>o.showHyperlinkPopup==="editor"?!1:{elements:e,appState:{...o,showHyperlinkPopup:"editor",openMenu:null},captureUpdate:_.IMMEDIATELY},trackEvent:{category:"hyperlink",action:"click"},keyTest:e=>e[T.CTRL_OR_CMD]&&e.key===T.K,predicate:(e,o)=>te(e,o).length===1,PanelComponent:({elements:e,appState:o,updateData:t})=>{let r=te(e,o);return zI(j,{type:"button",icon:os,"aria-label":g(hg(e,o)),title:`${Ut(e[0])?g("labels.link.labelEmbed"):g("labels.link.label")} - ${O("CtrlOrCmd+K")}`,onClick:()=>t(null),selected:r.length===1&&!!r[0].link})}});var fg=e=>e.every(o=>!o.locked),Ss=U({name:"toggleElementLock",label:(e,o,t)=>{let r=t.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!1});return fg(r)?"labels.elementLock.lock":"labels.elementLock.unlock"},icon:(e,o)=>{let t=te(o,e);return fg(t)?ha:gi},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=fg(n),a=re(n),l=n.length>1&&jc(n),c=n.length===1||l?null:jo(),m={...o.lockedMultiSelections};if(i)m={...o.lockedMultiSelections,...c?{[c]:!0}:{}};else if(l){let v=n[0].groupIds.at(-1);delete m[v]}let d=e.map(v=>{if(!a.has(v.id))return v;let x=v.groupIds;return i?c&&(x=[...x,c]):x=x.filter(E=>!o.lockedMultiSelections[E]),ee(v,{locked:i,groupIds:x.length!==v.groupIds.length?x:v.groupIds})}),p=re(d),h=i?{}:Object.fromEntries(n.map(v=>[v.id,!0])),b=n.map(v=>p.get(v.id)||v),f=i?{}:si(b,o),y=i?c||(l?n[0].groupIds.at(-1):n[0].id):null;return{elements:d,appState:{...o,selectedElementIds:h,selectedGroupIds:f,selectedLinearElement:i?null:o.selectedLinearElement,lockedMultiSelections:m,activeLockedId:y},captureUpdate:_.IMMEDIATELY}},keyTest:(e,o,t,r)=>e.key.toLocaleLowerCase()===T.L&&e[T.CTRL_OR_CMD]&&e.shiftKey&&r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!1}).length>0}),S2=U({name:"unlockAllElements",trackEvent:{category:"canvas"},viewMode:!1,icon:gi,predicate:(e,o)=>te(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=re(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:si(i,o),lockedMultiSelections:{},activeLockedId:null},captureUpdate:_.IMMEDIATELY}},label:"labels.elementLock.unlockAll"});import $v from"clsx";import Gk from"fuzzy";import{useEffect as Gm,useRef as jv,useMemo as Wk,useState as Um}from"react";import{useEffect as As,useMemo as M2,useRef as xg,useState as FI}from"react";import{jsx as vg}from"react/jsx-runtime";var HI=8,UI=10,Ms=["rectangle","diamond","ellipse"],Ls=["line","sharpArrow","curvedArrow","elbowArrow"],GI=new Set(Ms),WI=new Set(Ls),ja=e=>GI.has(e),wm=e=>e==="arrow"||WI.has(e),ir=Le(null),_s=new Map,Ps=new Map,VI=({app:e})=>{let o=e.scene.getSelectedElements(e.state),t=xg(null);return As(()=>{if(o.length===0){e.updateEditorAtom(ir,null);return}let r=qa(o);r&&!t.current?t.current=r:(t.current&&!r||t.current&&r!==t.current)&&(e.updateEditorAtom(ir,null),t.current=null)},[o,e]),As(()=>()=>{_s.clear(),Ps.clear()},[]),vg(YI,{app:e,elements:o})},YI=({app:e,elements:o})=>{let t=qa(o),r=M2(()=>t==="generic"?P2(o):[],[t,o]),n=M2(()=>t==="linear"?yg(o):[],[t,o]),i=t==="generic"?r.every(d=>d.type===r[0].type):t==="linear"?n.every(d=>li(d)===li(n[0])):!1,[a,l]=FI({x:0,y:0}),s=xg(""),c=xg(null);As(()=>{let d=[...r,...n].sort((y,v)=>y.id.localeCompare(v.id)),p=`
|
|
8
8
|
${e.state.scrollX}${e.state.scrollY}${e.state.offsetTop}${e.state.offsetLeft}${e.state.zoom.value}${d.map(y=>y.id).join(",")}`;if(p===s.current)return;s.current=p;let h;if(d.length===1){let[y,,,v,x,E]=Mt(d[0],e.scene.getNonDeletedElementsMap());h=Ue(L(y,v),L(x,E),d[0].angle)}else{let{minX:y,maxY:v}=Vr(d);h=L(y,v)}let{x:b,y:f}=Ct({sceneX:h[0],sceneY:h[1]},e.state);l({x:b,y:f})},[r,n,e.scene,e.state]),As(()=>{for(let d of n){let p=Eg(d.id,jI(d));Ps.has(p)||Ps.set(p,d)}},[n]),As(()=>{for(let d of r)if(!_s.has(d.id)){let p=xe(d,e.scene.getNonDeletedElementsMap());p&&_s.set(d.id,{fontSize:p.fontSize})}},[r,e.scene]);let m=t==="linear"?[["line",xa],["sharpArrow",Sa],["curvedArrow",La],["elbowArrow",Ma]]:t==="generic"?[["rectangle",ga],["diamond",fa],["ellipse",ba]]:[];return vg("div",{ref:c,tabIndex:-1,style:{position:"absolute",top:`${a.y+(UI+8)*e.state.zoom.value-e.state.offsetTop}px`,left:`${a.x-e.state.offsetLeft-HI}px`,zIndex:2},className:tt.CONVERT_ELEMENT_TYPE_POPUP,children:m.map(([d,p])=>{let h=i&&(t==="generic"&&r[0].type===d||t==="linear"&&li(n[0])===d);return vg(j,{className:"Shape",type:"radio",icon:p,checked:h,name:"convertElementType-option",title:d,keyBindingLabel:"","aria-label":d,"data-testid":`toolbar-${d}`,onChange:()=>{e.state.activeTool.type!==d&&pe("convertElementType",d,"ui"),wg(e,{conversionType:t,nextType:d}),c.current?.focus()}},`${o[0].id}${o[0].version}_${d}`)})})},KI=(e,o,t)=>{let r=Hl(e,o),n=Gc(e,o),i=Ki(o.text,bt(o),r),a=Gt(i,bt(o),o.lineHeight),l=o.fontSize;for(;(a.width>r||a.height>n)&&l>0;){l-=1;let s={...o,fontSize:l};a=Gt(o.text,bt(s),o.lineHeight)}Wt(o,t.getNonDeletedElementsMap(),{fontSize:l,width:a.width,height:a.height}),ct(o,e,t)},wg=(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=P2(n),c=l.every(m=>m.type===l[0].type)?Ms.indexOf(l[0].type):-1;if(t=t??Ms[(c+Ms.length+a)%Ms.length],t&&ja(t)){let m={};for(let p of l){let h=A2(p,t,e);m[h.id]=h}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 h=xe(p,e.scene.getNonDeletedElementsMap());h&&(_s.get(p.id)&&Wt(h,e.scene.getNonDeletedElementsMap(),{fontSize:_s.get(p.id)?.fontSize??h.fontSize}),KI(p,h,e.scene))}e.setState(p=>({selectedElementIds:i,activeTool:Pe(p,{type:"selection"})}))}}if(o==="linear"){let l=yg(n);if(!t){let c=Rc(l,li),m=c?Ls.indexOf(c):-1;t=Ls[(m+Ls.length+a)%Ls.length]}if(wm(t)){let c=[],m=e.scene.getElementsMapIncludingDeleted();for(let d of l){let p=Ps.get(Eg(d.id,t));if(p&&li(p)===t)m.set(p.id,p),c.push(p);else{let h=A2(d,t,e);m.set(h.id,h),c.push(h)}}e.scene.replaceAllElements(m);for(let d of c)if(be(d))if(Te(d)){let p=ZI(d);if(p.length<2)continue;let h=[];for(let f=1;f<p.length-2;f++)h.push({start:p[f],end:p[f+1],index:f+1});let b=Yc(d,e.scene.getNonDeletedElementsMap(),{points:p,fixedSegments:h});Wt(d,e.scene.getNonDeletedElementsMap(),{...b,endArrowhead:"arrow"})}else{let p=ob(["line","sharpArrow","curvedArrow"],h=>Ps.get(Eg(d.id,h)));if(p){let h=p.points;e.scene.mutateElement(d,{points:h})}}}let s=yg(e.scene.getSelectedElements(e.state));e.setState(c=>({selectedElementIds:i,selectedLinearElement:s.length===1?new Z(s[0],e.scene.getNonDeletedElementsMap()):null,activeTool:Pe(c,{type:"selection"})}))}return!0},qa=e=>{if(e.length===0)return null;let o=!1;for(let t of e){if(ja(t.type))return"generic";_2(t)&&(o=!0)}return o?"linear":null},_2=e=>be(e)&&(!Ce(e)||!Eb(e)&&!ht(e)),Eg=(e,o)=>`${e}:${o}`,P2=e=>e.filter(o=>ja(o.type)),yg=e=>e.filter(o=>_2(o)),vm=20,$a=(e,o)=>e[0]===o[0],bg=(e,o)=>e[1]===o[1],L2=(e,o)=>$a(e,o)?Math.abs(e[1]-o[1]):Math.abs(e[0]-o[0]),ZI=e=>{let o=[e.points[0]],t=XI(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])<vm?l[0]=a[0]:Math.abs(l[1]-a[1])<vm&&(l[1]=a[1]),$a(a,l)||bg(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)$a(o[i-1],o[i])&&$a(o[i],o[i+1])||bg(o[i-1],o[i])&&bg(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=$a(a,l),m=$a(l,s);if(c!==m){let d=L2(a,l),p=L2(l,s);if(d<vm||p<vm){if(p<d)c?s[0]=a[0]:s[1]=a[1];else if(m)for(let h=n.length-1;h>=0&&n[h][0]===a[0];--h)n[h][0]=l[0];else for(let h=n.length-1;h>=0&&n[h][1]===a[1];--h)n[h][1]=l[1];continue}}n.push(l)}return n.push(r[r.length-1]),n},XI=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},A2=(e,o,t)=>{if(!$I(e.type,o)){if(!sb())throw Error(`Invalid conversion from ${e.type} to ${o}.`);return e}if(e.type===o)return e;if(gr.delete(e),ja(o)){let r=Gr(xr({...e,type:o,roundness:o==="diamond"&&e.roundness?{type:bn(o)?St.ADAPTIVE_RADIUS:St.PROPORTIONAL_RADIUS}:e.roundness}));return En(r,t.scene,t.state),r}if(wm(o))switch(o){case"line":return Gr(yr({...e,type:"line"}));case"sharpArrow":return Gr(na({...e,type:"arrow",elbowed:!1,roundness:null,startArrowhead:t.state.currentItemStartArrowhead,endArrowhead:t.state.currentItemEndArrowhead}));case"curvedArrow":return Gr(na({...e,type:"arrow",elbowed:!1,roundness:{type:St.PROPORTIONAL_RADIUS},startArrowhead:t.state.currentItemStartArrowhead,endArrowhead:t.state.currentItemEndArrowhead}));case"elbowArrow":return Gr(na({...e,type:"arrow",elbowed:!0,fixedSegments:null,roundness:null}))}return db(o,`unhandled conversion type: ${o}`),e},$I=(e,o)=>!!(ja(e)&&ja(o)||wm(e)&&wm(o)),jI=e=>be(e)?li(e):e.type,D2=VI;var R2=U({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 xt.set(ir,{type:"panel"}),{captureUpdate:_.NEVER}},checked:e=>e.gridModeEnabled,predicate:(e,o,t)=>qa(e)!==null});var Tm=U({name:"copyElementLink",label:"labels.copyElementLink",icon:Ta,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{let n=te(e,o);try{if(window.location){let i=ld(n,o);return i?(await nr(r.props.generateLinkForSelection?r.props.generateLinkForSelection(i.id,i.type):ad(i.id,i.type)),{appState:{toast:{message:g("toast.elementLinkCopied"),closable:!0}},captureUpdate:_.EVENTUALLY}):{appState:o,elements:e,app:r,captureUpdate:_.EVENTUALLY}}}catch(i){console.error(i)}return{appState:o,elements:e,app:r,captureUpdate:_.EVENTUALLY}},predicate:(e,o)=>sd(te(e,o))}),N2=U({name:"linkToElement",label:"labels.linkToElement",icon:zd,perform:(e,o,t,r)=>{let n=te(e,o);return n.length!==1||!sd(n)?{elements:e,appState:o,app:r,captureUpdate:_.EVENTUALLY}:{appState:{...o,openDialog:{name:"elementLinkSelector",sourceElementId:te(e,o)[0].id}},captureUpdate:_.IMMEDIATELY}},predicate:(e,o,t,r)=>{let n=te(e,o);return o.openDialog?.name!=="elementLinkSelector"&&n.length===1&&sd(n)},trackEvent:!1});var qI={toggleTheme:[O("Shift+Alt+D")],saveScene:[O("CtrlOrCmd+S")],loadScene:[O("CtrlOrCmd+O")],clearCanvas:[O("CtrlOrCmd+Delete")],imageExport:[O("CtrlOrCmd+Shift+E")],commandPalette:[O("CtrlOrCmd+/"),O("CtrlOrCmd+Shift+P")],cut:[O("CtrlOrCmd+X")],copy:[O("CtrlOrCmd+C")],paste:[O("CtrlOrCmd+V")],copyStyles:[O("CtrlOrCmd+Alt+C")],pasteStyles:[O("CtrlOrCmd+Alt+V")],selectAll:[O("CtrlOrCmd+A")],deleteSelectedElements:[O("Delete")],duplicateSelection:[O("CtrlOrCmd+D"),O(`Alt+${g("helpDialog.drag")}`)],sendBackward:[O("CtrlOrCmd+[")],bringForward:[O("CtrlOrCmd+]")],sendToBack:[io?O("CtrlOrCmd+Alt+["):O("CtrlOrCmd+Shift+[")],bringToFront:[io?O("CtrlOrCmd+Alt+]"):O("CtrlOrCmd+Shift+]")],copyAsPng:[O("Shift+Alt+C")],group:[O("CtrlOrCmd+G")],ungroup:[O("CtrlOrCmd+Shift+G")],gridMode:[O("CtrlOrCmd+'")],zenMode:[O("Alt+Z")],objectsSnapMode:[O("Alt+S")],stats:[O("Alt+/")],addToLibrary:[],flipHorizontal:[O("Shift+H")],flipVertical:[O("Shift+V")],viewMode:[O("Alt+R")],hyperlink:[O("CtrlOrCmd+K")],toggleElementLock:[O("CtrlOrCmd+Shift+L")],resetZoom:[O("CtrlOrCmd+0")],zoomOut:[O("CtrlOrCmd+-")],zoomIn:[O("CtrlOrCmd++")],zoomToFitSelection:[O("Shift+3")],zoomToFit:[O("Shift+1")],zoomToFitSelectionInViewport:[O("Shift+2")],toggleEraserTool:[O("E")],toggleHandTool:[O("H")],setFrameAsActiveTool:[O("F")],saveFileToDisk:[O("CtrlOrCmd+S")],saveToActiveFile:[O("CtrlOrCmd+S")],toggleShortcuts:[O("?")],searchMenu:[O("CtrlOrCmd+F")],wrapSelectionInFrame:[]},mt=(e,o=0)=>{let t=qI[e];return t&&t.length>0?t[o]||t[0]:""};var JI="\\u0300-\\u036f",QI="\\ufe20-\\ufe2f",eC="\\u20d0-\\u20ff",tC=JI+QI+eC,oC=`[${tC}]`,rC=RegExp(oC,"g"),nC=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,iC={\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"},Li=e=>e.replace(nC,o=>iC[o]||o).replace(rC,"");import Ck from"clsx";import{useEffect as kk,useState as Sk}from"react";import{useCallback as aC,useState as lC}from"react";var O2=()=>{let[e,o]=lC(null),t=aC(r=>o(r),[]);return[e,t]};import{useState as kv,useCallback as Og,useMemo as Sv,useEffect as Bg,memo as Mv,useRef as xk}from"react";import{useEffect as H2,useRef as U2}from"react";var Nn=({elements:e,appState:o,files:t,maxWidthOrHeight:r,getDimensions:n,exportPadding:i,exportingFrame:a})=>{let l=hi(e,null,{deleteInvisibleElements:!0}),s=ma(o,null),{exportBackground:c,viewBackgroundColor:m}=s;return xd(l,{...s,offsetTop:0,offsetLeft:0,width:0,height:0},t||{},{exportBackground:c,exportPadding:i,viewBackgroundColor:m,exportingFrame:a},(d,p)=>{let h=document.createElement("canvas");if(r){typeof n=="function"&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");let f=Math.max(d,p),y=r<f?r/f:o?.exportScale??1;return h.width=d*y,h.height=p*y,{canvas:h,scale:y}}let b=n?.(d,p)||{width:d,height:p};return h.width=b.width,h.height=b.height,{canvas:h,scale:b.scale??1}})},B2=async e=>{let{mimeType:o=he.png,quality:t}=e;o===he.png&&typeof t=="number"&&console.warn(`"quality" will be ignored for "${he.png}" mimeType`),o==="image/jpg"&&(o=he.jpg),o===he.jpg&&!e.appState?.exportBackground&&(console.warn(`Defaulting "exportBackground" to "true" for "${he.jpg}" mimeType`),e={...e,appState:{...e.appState,exportBackground:!0}});let r=await Nn(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===he.png&&e.appState?.exportEmbedScene&&(a=await q0({blob:a,metadata:$l(e.elements,e.appState,e.files||{},"local")})),n(a)},o,t)})},Ja=async({elements:e,appState:o=Tn(),files:t={},exportPadding:r,renderEmbeddables:n,exportingFrame:i,skipInliningFonts:a,reuseImages:l})=>{let s=hi(e,null,{deleteInvisibleElements:!0}),m={...ma(o,null),exportPadding:r};return da(s,m,t,{exportingFrame:i,renderEmbeddables:n,skipInliningFonts:a,reuseImages:l})},sC=async e=>{if(e.type==="svg"){let o=await Ja(e);await nr(o.outerHTML)}else if(e.type==="png")await mm(B2(e));else if(e.type==="json")await dm(e.elements,e.files);else throw new Error("Invalid export type")};import{useEffect as z2,useState as cC}from"react";var Tg=Le(new Map),F2=async e=>await Ja({elements:e,appState:{exportBackground:!1,viewBackgroundColor:Mo.white},files:null,renderEmbeddables:!1,skipInliningFonts:!0}),Im=(e,o,t,r)=>{let[n,i]=cC();return z2(()=>{if(o)if(e){let a=t.get(e);a?i(a):(async()=>{let l=await F2(o);l.querySelector(".style-fonts")?.remove(),l&&(t.set(e,l),i(l))})()}else(async()=>{let a=await F2(o);i(a)})()},[e,o,t,i]),z2(()=>{let a=r.current;if(a)return n&&(a.innerHTML=n.outerHTML),()=>{a.innerHTML=""}},[n,r]),n},Qa=()=>{let[e]=Ee(Tg);return{clearLibraryCache:()=>e.clear(),deleteItemsFromLibraryCache:r=>{r.forEach(n=>e.delete(n))},svgCache:e}};var dC=["excalidraw.com","raw.githubusercontent.com/excalidraw/excalidraw-libraries"],W2=new yo,qr=Le({status:"loaded",isInitialized:!1,libraryItems:[]}),Ds=e=>$o(e),mC=(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)),V2=(e,o)=>{let t=[];for(let r of o)mC(e,r)&&t.push(r);return[...t,...e]},Y2=(e,o)=>{let t=re(o),r={deletedItems:new Map,addedItems:new Map,updatedItems:new Map};for(let i of e)t.has(i.id)||r.deletedItems.set(i.id,i);let n=re(e);for(let i of o){let a=n.get(i.id);a?kg(a)!==kg(i)&&r.updatedItems.set(i.id,i):r.addedItems.set(i.id,i)}return r},Ig=class{constructor(o){k(this,"currLibraryItems",[]);k(this,"prevLibraryItems",Ds(this.currLibraryItems));k(this,"app");k(this,"updateQueue",[]);k(this,"getLastUpdateTask",()=>this.updateQueue[this.updateQueue.length-1]);k(this,"notifyListeners",()=>{if(this.updateQueue.length>0)xt.set(qr,o=>({status:"loading",libraryItems:this.currLibraryItems,isInitialized:o.isInitialized}));else{xt.set(qr,{status:"loaded",libraryItems:this.currLibraryItems,isInitialized:!0});try{let o=this.prevLibraryItems;this.prevLibraryItems=Ds(this.currLibraryItems);let t=Ds(this.currLibraryItems);this.app.props.onLibraryChange?.(t),W2.trigger(Y2(o,t),t)}catch(o){console.error(o)}}});k(this,"destroy",()=>{this.updateQueue=[],this.currLibraryItems=[],xt.set(Tg,new Map)});k(this,"resetLibrary",()=>this.setLibrary([]));k(this,"getLatestLibrary",()=>new Promise(async o=>{try{let t=await(this.getLastUpdateTask()||this.currLibraryItems);this.updateQueue.length>0?o(this.getLatestLibrary()):o(Ds(t))}catch{return o(this.currLibraryItems)}}));k(this,"updateLibrary",async({libraryItems:o,prompt:t=!1,merge:r=!1,openLibraryMenu:n=!1,defaultStatus:i="unpublished"})=>(n&&this.app.setState({openSidebar:{name:Ht.name,tab:Al}}),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 Vu(s,i):c=ql(s,i),!t||window.confirm(g("alerts.confirmAddLibrary",{numShapes:c.length}))?(t&&this.app.focusContainer(),a(r?V2(this.currLibraryItems,c):c)):l(new sa)}catch(s){l(s)}}))));k(this,"setLibrary",o=>{let t=new Promise(async(r,n)=>{try{await this.getLastUpdateTask(),typeof o=="function"&&(o=o(this.currLibraryItems)),this.currLibraryItems=Ds(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}},K2=Ig,tl=e=>{let t=Math.ceil(Math.sqrt(e.length)),r=[],n=h=>e.slice(h*t,h*t+t).reduce((f,y)=>{let{height:v}=Vr(y.elements);return Math.max(f,v)},0),i=h=>{let b=0,f=0,y=0;for(let v of e){if(b%t===0&&(f=0),f===h){let{width:x}=Vr(v.elements);y=Math.max(y,x)}b++,f++}return y},a=0,l=0,s=0,c=0,m=0,d=0,p=0;for(let h of e){m&&m%t===0&&(l+=s+50,a=0,d=0,p++),d===0&&(s=n(p)),c=i(d);let{minX:b,minY:f,width:y,height:v}=Vr(h.elements),x=(c-y)/2,E=(s-v)/2;r.push(...h.elements.map(w=>({...w,x:w.x+a+x-b,y:w.y+l+E-f}))),a+=c+50,m++,d++}return r},pC=(e,o=dC)=>{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}"`)},Cg=()=>{let e=new URLSearchParams(window.location.hash.slice(1)).get(wc.addLibrary)||new URLSearchParams(window.location.search).get(vc.addLibrary),o=e?new URLSearchParams(window.location.hash.slice(1)).get("token"):null;return e?{libraryUrl:e,idToken:o}:null},On=class On{constructor(o){k(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(ql(l?.libraryItems||[],"published"))}catch(l){a(l)}});return r?On.queue.push(n):n()}getLibraryItems(o){return On.getLibraryItems(this.adapter,o,!1)}};k(On,"queue",new Y1),k(On,"run",async(o,t)=>{let r=new On(o);return On.queue.push(()=>t(r))});var el=On,Rs=0,Cm=0,kg=e=>`${e.id}:${e.name||""}:${Nu(e.elements)}`,km=e=>Ou(e.map(o=>kg(o)).sort().join()),G2=async(e,o)=>{try{return Cm++,await el.run(e,async t=>{let r=re(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);if(o.updatedItems)for(let[l,s]of o.updatedItems)r.set(l,s);let i=n.concat(Array.from(r.values())),a=km(i);return a!==Rs&&await e.save({libraryItems:i}),Rs=a,i})}finally{Cm--}},uC=e=>{let{excalidrawAPI:o}=e,t=U2(e);t.current=e;let r=U2(!1);H2(()=>{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=Oc(l),pC(l,t.current.validateLibraryUrl);let b=await(await fetch(l)).blob();d(b)}catch(h){p(h)}}),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(wc.addLibrary)){let d=new URLSearchParams(window.location.hash.slice(1));d.delete(wc.addLibrary),window.history.replaceState({},Cl,`#${d.toString()}`)}else if(window.location.search.includes(vc.addLibrary)){let d=new URLSearchParams(window.location.search);d.delete(vc.addLibrary),window.history.replaceState({},Cl,`?${d.toString()}`)}}},i=l=>{l.preventDefault();let s=Cg();s&&(l.stopImmediatePropagation(),window.history.replaceState({},"",l.oldURL),n(s))},a=Cg();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=rb();s?c.resolve(iu(s.load).then(async m=>{let d=null;try{if(!m)return el.getLibraryItems(l,"load");d=ql(m.libraryItems||[],"published");let p=await G2(l,Y2([],d));try{await s.clear()}catch(h){console.error(`couldn't delete legacy library data: ${h.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}`),el.getLibraryItems(l,"load")))):c.resolve(iu(el.getLibraryItems,l,"load")),o.updateLibrary({libraryItems:c.then(m=>{let d=m||[];return Rs=km(d),d}),merge:!0}).finally(()=>{r.current=!0})}return window.addEventListener("hashchange",i),()=>{window.removeEventListener("hashchange",i)}},[o]),H2(()=>{let n=W2.on(async(a,l)=>{let s=r.current,c="adapter"in t.current&&t.current.adapter||null;try{c&&Rs!==km(l)&&await G2(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=>{Cm&&ab(a)};return window.addEventListener("beforeunload",i),()=>{window.removeEventListener("beforeunload",i),n(),Rs=0,Cm=0}},[])};import fC from"clsx";import{jsx as gC}from"react/jsx-runtime";var hC=({theme:e,id:o,libraryReturnUrl:t})=>{let r=t||window.location.origin+window.location.pathname;return gC("a",{className:"library-menu-browse-button",href:`${C.VITE_APP_LIBRARY_URL}?target=${window.name||"_blank"}&referrer=${r}&useHash=true&token=${o}&theme=${e}&version=${Ic.excalidrawLibrary}`,target:"_excalidraw_libraries",children:g("labels.libraries")})},Z2=hC;import{jsx as bC,jsxs as xC}from"react/jsx-runtime";var Sm=({libraryReturnUrl:e,theme:o,id:t,style:r,children:n,className:i})=>xC("div",{className:fC("library-menu-control-buttons",i),style:r,children:[bC(Z2,{id:t,libraryReturnUrl:e,theme:o}),n]});import{useCallback as nl,useEffect as Pg,useMemo as Dg,useRef as vv,useState as wv}from"react";import gk from"clsx";import EC from"lodash.throttle";import{useEffect as yC}from"react";var vC=Le(0),X2=e=>{let[o,t]=Ee(vC);return yC(()=>{let{current:r}=e;if(!r)return;let n=EC(()=>{let{scrollTop:i}=r;t(i)},200);return r.addEventListener("scroll",n),()=>{n.cancel(),r.removeEventListener("scroll",n)}},[e,t]),o};import ZC from"clsx";import{useCallback as XC,useState as Lg}from"react";import{flushSync as $2}from"react-dom";import wC from"clsx";import{jsx as Mm,jsxs as IC}from"react/jsx-runtime";var TC=({label:e,onClick:o,className:t,children:r,actionType:n,type:i="button",isLoading:a,...l})=>{let s=n?`Dialog__action-button--${n}`:"";return IC("button",{className:wC("Dialog__action-button",s,t),type:i,"aria-label":e,onClick:o,...l,children:[r&&Mm("div",{style:a?{visibility:"hidden"}:{},children:r}),Mm("div",{style:a?{visibility:"hidden"}:{},children:e}),a&&Mm("div",{style:{position:"absolute",inset:0},children:Mm(Ft,{})})]})},Jr=TC;import{jsx as j2,jsxs as q2}from"react/jsx-runtime";var CC=e=>{let{onConfirm:o,onCancel:t,children:r,confirmText:n=g("buttons.confirm"),cancelText:i=g("buttons.cancel"),className:a="",...l}=e,s=ye(),c=In(ol),{container:m}=$e();return q2(pt,{onCloseRequest:t,size:"small",...l,className:`confirm-dialog ${a}`,children:[r,q2("div",{className:"confirm-dialog-buttons",children:[j2(Jr,{label:i,onClick:()=>{s({openMenu:null}),c(!1),$2(()=>{t()}),m?.focus()}}),j2(Jr,{label:n,onClick:()=>{s({openMenu:null}),c(!1),$2(()=>{o()}),m?.focus()},actionType:"danger"})]})]})},Lm=CC;import _m from"open-color";import{useCallback as PC,useEffect as Mg,useRef as J2,useState as Sg}from"react";var Fo=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}}};k(Fo,"set",(o,t)=>{try{return window.localStorage.setItem(o,JSON.stringify(t)),!0}catch(r){return console.warn(`localStorage.setItem error: ${r.message}`),!1}}),k(Fo,"delete",o=>{try{window.localStorage.removeItem(o)}catch(t){console.warn(`localStorage.removeItem error: ${t.message}`)}});import Am from"react";var kC=/({{[\w-]+}})|(<[\w-]+>)|(<\/[\w-]+>)/g,SC=/{{([\w-]+)}}/,MC=/<([\w-]+)>/,LC=/<\/([\w-]+)>/,AC=(e,o)=>{let t=[{name:"",children:[]}];return e.split(kC).filter(Boolean).forEach(r=>{let n=r.match(MC),i=r.match(LC),a=r.match(SC);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=Am.createElement(Am.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},_C=({i18nKey:e,children:o,...t})=>{let{t:r}=it();return Am.createElement(Am.Fragment,{},...AC(r(e),t))},eo=_C;import{jsx as we,jsxs as Kt}from"react/jsx-runtime";var DC=async e=>{let r=Math.round(8),n=Math.max(Math.round(128/64),2),i=tb(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=_m.white,l.fillRect(0,0,a.width,a.height);for(let[s,c]of e.entries()){let m=await Nn({elements:c.elements,files:null,maxWidthOrHeight:128}),{width:d,height:p}=m,h=Math.floor(s/6)*(128+r*2),b=s%6*(128+r*2);l.drawImage(m,b+(128-d)/2+r,h+(128-p)/2+r),l.lineWidth=n,l.strokeStyle=_m.gray[4],l.strokeRect(b+r/2,h+r/2,128+r,128+r)}return await vd(new File([await Yr(a)],"preview",{type:he.png}),{outputType:he.jpg,maxWidthOrHeight:5e3})},RC=({libItem:e,appState:o,index:t,onChange:r,onRemove:n})=>{let i=J2(null),a=J2(null);return Mg(()=>{let l=i.current;l&&(async()=>{let s=await Ja({elements:e.elements,appState:{...o,viewBackgroundColor:_m.white,exportBackground:!0},files:null,skipInliningFonts:!0});l.innerHTML=s.outerHTML})()},[e.elements,o]),Kt("div",{className:"single-library-item",children:[e.status==="published"&&we("span",{className:"single-library-item-status",children:g("labels.statusPublished")}),we("div",{ref:i,className:"single-library-item__svg"}),we(j,{"aria-label":g("buttons.remove"),type:"button",icon:Ro,className:"single-library-item--remove",onClick:n.bind(null,e.id),title:g("buttons.remove")}),Kt("div",{style:{display:"flex",margin:"0.8rem 0",width:"100%",fontSize:"14px",fontWeight:500,flexDirection:"column"},children:[Kt("label",{style:{display:"flex",justifyContent:"space-between",flexDirection:"column"},children:[Kt("div",{style:{padding:"0.5em 0"},children:[we("span",{style:{fontWeight:500,color:_m.gray[6]},children:g("publishDialog.itemName")}),we("span",{"aria-hidden":"true",className:"required",children:"*"})]}),we("input",{type:"text",ref:a,style:{width:"80%",padding:"0.2rem"},defaultValue:e.name,placeholder:"Item name",onChange:l=>{r(l.target.value,t)}})]}),we("span",{className:"error",children:e.error})]})]})},NC=({onClose:e,libraryItems:o,appState:t,onSuccess:r,onError:n,updateItemsInStorage:i,onRemove:a})=>{let[l,s]=Sg({authorName:"",githubHandle:"",name:"",description:"",twitterHandle:"",website:""}),[c,m]=Sg(!1);Mg(()=>{let E=Fo.get(pn.PUBLISH_LIBRARY);E&&s(E)},[]);let[d,p]=Sg(o.slice());Mg(()=>{p(o.slice())},[o]);let h=E=>{s({...l,[E.target.name]:E.target.value})},b=async E=>{E.preventDefault(),m(!0);let w=[],I=!1;if(d.forEach(D=>{let N="";D.name||(N=g("publishDialog.errors.required"),I=!0),w.push({...D,error:N})}),I){p(w),m(!1);return}let S=await DC(d),P={type:dn.excalidrawLibrary,version:Ic.excalidrawLibrary,source:D1(),libraryItems:d},M=JSON.stringify(P,null,2),F=new Blob([M],{type:"application/json"}),R=new FormData;R.append("excalidrawLib",F),R.append("previewImage",S),R.append("previewImageType",S.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(`${C.VITE_APP_LIBRARY_BACKEND}/submit`,{method:"post",body:R}).then(D=>D.ok?D.json().then(({url:N})=>{Fo.delete(pn.PUBLISH_LIBRARY),r({url:N,authorName:l.authorName,items:d})}):D.json().catch(()=>{throw new Error(D.statusText||"something went wrong")}).then(N=>{throw new Error(N.message||D.statusText||"something went wrong")}),D=>{console.error(D),n(D),m(!1)}).catch(D=>{console.error(D),n(D),m(!1)})},f=()=>{let E=[];return d.forEach((w,I)=>{E.push(we("div",{className:"single-library-item-wrapper",children:we(RC,{libItem:w,appState:t,index:I,onChange:(S,P)=>{let M=d.slice();M[P].name=S,p(M)},onRemove:a})},I))}),we("div",{className:"selected-library-items",children:E})},y=PC(()=>{i(d),Fo.set(pn.PUBLISH_LIBRARY,l),e()},[d,e,i,l]),v=!!o.length,x=o.some(E=>E.status==="published");return we(pt,{onCloseRequest:y,title:g("publishDialog.title"),className:"publish-library",children:v?Kt("form",{onSubmit:b,children:[we("div",{className:"publish-library-note",children:we(eo,{i18nKey:"publishDialog.noteDescription",link:E=>we("a",{href:"https://libraries.excalidraw.com",target:"_blank",rel:"noopener",children:E})})}),we("span",{className:"publish-library-note",children:we(eo,{i18nKey:"publishDialog.noteGuidelines",link:E=>we("a",{href:"https://github.com/excalidraw/excalidraw-libraries#guidelines",target:"_blank",rel:"noopener noreferrer",children:E})})}),we("div",{className:"publish-library-note",children:g("publishDialog.noteItems")}),x&&we("span",{className:"publish-library-note publish-library-warning",children:g("publishDialog.republishWarning")}),f(),Kt("div",{className:"publish-library__fields",children:[Kt("label",{children:[Kt("div",{children:[we("span",{children:g("publishDialog.libraryName")}),we("span",{"aria-hidden":"true",className:"required",children:"*"})]}),we("input",{type:"text",name:"name",required:!0,value:l.name,onChange:h,placeholder:g("publishDialog.placeholder.libraryName")})]}),Kt("label",{style:{alignItems:"flex-start"},children:[Kt("div",{children:[we("span",{children:g("publishDialog.libraryDesc")}),we("span",{"aria-hidden":"true",className:"required",children:"*"})]}),we("textarea",{name:"description",rows:4,required:!0,value:l.description,onChange:h,placeholder:g("publishDialog.placeholder.libraryDesc")})]}),Kt("label",{children:[Kt("div",{children:[we("span",{children:g("publishDialog.authorName")}),we("span",{"aria-hidden":"true",className:"required",children:"*"})]}),we("input",{type:"text",name:"authorName",required:!0,value:l.authorName,onChange:h,placeholder:g("publishDialog.placeholder.authorName")})]}),Kt("label",{children:[we("span",{children:g("publishDialog.githubUsername")}),we("input",{type:"text",name:"githubHandle",value:l.githubHandle,onChange:h,placeholder:g("publishDialog.placeholder.githubHandle")})]}),Kt("label",{children:[we("span",{children:g("publishDialog.twitterUsername")}),we("input",{type:"text",name:"twitterHandle",value:l.twitterHandle,onChange:h,placeholder:g("publishDialog.placeholder.twitterHandle")})]}),Kt("label",{children:[we("span",{children:g("publishDialog.website")}),we("input",{type:"text",name:"website",pattern:"https?://.+",title:g("publishDialog.errors.website"),value:l.website,onChange:h,placeholder:g("publishDialog.placeholder.website")})]}),we("span",{className:"publish-library-note",children:we(eo,{i18nKey:"publishDialog.noteLicense",link:E=>we("a",{href:"https://github.com/excalidraw/excalidraw-libraries/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",children:E})})})]}),Kt("div",{className:"publish-library__buttons",children:[we(Jr,{label:g("buttons.saveLibNames"),onClick:y,"data-testid":"cancel-clear-canvas-button"}),we(Jr,{type:"submit",label:g("buttons.submit"),actionType:"primary",isLoading:c})]})]}):we("p",{style:{padding:"1em",textAlign:"center",fontWeight:500},children:g("publishDialog.atleastOneLibItem")})})},Q2=NC;import hv from"react";import zC from"clsx";import{useEffect as FC,useRef as HC}from"react";import{forwardRef as ev}from"react";import tv from"clsx";import{jsx as ov}from"react/jsx-runtime";var OC=ev(({children:e,gap:o,align:t,justifyContent:r,className:n,style:i},a)=>ov("div",{className:tv("Stack Stack_horizontal",n),style:{"--gap":o,alignItems:t,justifyContent:r,...i},ref:a,children:e})),BC=ev(({children:e,gap:o,align:t,justifyContent:r,className:n,style:i},a)=>ov("div",{className:tv("Stack Stack_vertical",n),style:{"--gap":o,justifyItems:t,justifyContent:r,...i},ref:a,children:e})),mo={Row:OC,Col:BC};import{jsx as Pm}from"react/jsx-runtime";var rv=({children:e,onClickOutside:o,className:t="",onSelect:r,style:n,placement:i="bottom"})=>{let a=ve(),l=HC(null),s=Sn({onClickOutside:o});_a(l,m=>{l.current?.closest(".dropdown-menu-container")?.contains(m.target)||s.onClickOutside?.()}),FC(()=>{let m=p=>{p.key===T.ESCAPE&&(p.stopImmediatePropagation(),s.onClickOutside?.())},d={capture:!0};return document.addEventListener("keydown",m,d),()=>{document.removeEventListener("keydown",m,d)}},[s]);let c=zC(`dropdown-menu ${t}`,{"dropdown-menu--mobile":a.formFactor==="phone","dropdown-menu--placement-top":i==="top"}).trim();return Pm(Nh.Provider,{value:{onSelect:r},children:Pm("div",{ref:l,className:c,style:n,"data-testid":"dropdown-menu",children:a.formFactor==="phone"?Pm(mo.Col,{className:"dropdown-menu-container",children:e}):Pm(ft,{className:"dropdown-menu-container",padding:2,style:{zIndex:2},children:e})})})};rv.displayName="DropdownMenuContent";var nv=rv;import{jsx as GC}from"react/jsx-runtime";var UC=({children:e,className:o="",selected:t,...r})=>GC("div",{...r,className:`dropdown-menu-item-base dropdown-menu-item-custom ${o} ${t?"dropdown-menu-item--selected":""}`.trim(),children:e}),iv=UC;import{jsx as av}from"react/jsx-runtime";var lv=({icon:e,shortcut:o,href:t,children:r,onSelect:n,className:i="",selected:a,rel:l="noopener",...s})=>{let c=em(s.onClick,n);return av("a",{...s,href:t,target:"_blank",rel:l||"noopener",className:Qd(i,a),title:s.title??s["aria-label"],onClick:c,children:av(Jd,{icon:e,shortcut:o,children:r})})},rl=lv;lv.displayName="DropdownMenuItemLink";import{jsx as WC}from"react/jsx-runtime";var sv=()=>WC("div",{style:{height:"1px",backgroundColor:"var(--default-border-color)",margin:".5rem 0",flex:"0 0 auto"}}),cv=sv;sv.displayName="DropdownMenuSeparator";import VC from"clsx";import{jsx as YC}from"react/jsx-runtime";var dv=({className:e="",children:o,onToggle:t,title:r,...n})=>{let i=ve(),a=VC(`dropdown-menu-button ${e}`,"zen-mode-transition",{"dropdown-menu-button--mobile":i.formFactor==="phone"}).trim();return YC("button",{className:a,onClick:t,type:"button","data-testid":"dropdown-menu-button",title:r,...n,children:o})},mv=dv;dv.displayName="DropdownMenuTrigger";import Dm from"react";var pv=e=>{let o=Dm.Children.toArray(e).find(t=>Dm.isValidElement(t)&&typeof t.type!="string"&&t?.type.displayName&&t.type.displayName==="DropdownMenuTrigger");return o||null},uv=e=>{let o=Dm.Children.toArray(e).find(t=>Dm.isValidElement(t)&&typeof t.type!="string"&&t?.type.displayName&&t.type.displayName==="DropdownMenuContent");return o||null};import{jsxs as KC}from"react/jsx-runtime";var Qr=({children:e,open:o,placement:t})=>{let r=pv(e),n=uv(e),i=n&&hv.isValidElement(n)?hv.cloneElement(n,{placement:t}):n;return KC("div",{className:"dropdown-menu-container",style:{display:"contents"},children:[r,o&&i]})};Qr.Trigger=mv;Qr.Content=nv;Qr.Item=$t;Qr.ItemLink=rl;Qr.ItemCustom=iv;Qr.Group=hs;Qr.Separator=cv;var ge=Qr;Qr.displayName="DropdownMenu";import{jsx as po,jsxs as Rm}from"react/jsx-runtime";var $C=(e,o)=>e.filter(t=>o.includes(t.id)),jC=({setAppState:e,selectedItems:o,library:t,onRemoveFromLibrary:r,resetLibrary:n,onSelectItems:i,appState:a,className:l})=>{let[s]=Ee(qr),[c,m]=Ee(ol),d=()=>{let R=o.length?g("alerts.removeItemsFromsLibrary",{count:o.length}):g("alerts.resetLibrary"),D=o.length?g("confirmDialog.removeItemsFromLib"):g("confirmDialog.resetLibrary");return po(Lm,{onConfirm:()=>{o.length?r():n(),h(!1)},onCancel:()=>{h(!1)},title:D,children:po("p",{children:R})})},[p,h]=Lg(!1),b=!!o.length,f=b?s.libraryItems.filter(R=>o.includes(R.id)):s.libraryItems,y=b?g("buttons.remove"):g("buttons.resetLibrary"),[v,x]=Lg(!1),[E,w]=Lg(null),I=XC(()=>Rm(pt,{onCloseRequest:()=>w(null),title:g("publishSuccessDialog.title"),className:"publish-library-success",size:"small",children:[po("p",{children:po(eo,{i18nKey:"publishSuccessDialog.content",authorName:E.authorName,link:R=>po("a",{href:E?.url,target:"_blank",rel:"noopener noreferrer",children:R})})}),po(j,{type:"button",title:g("buttons.close"),"aria-label":g("buttons.close"),label:g("buttons.close"),onClick:()=>w(null),"data-testid":"publish-library-success-close",className:"publish-library-success-close"})]}),[w,E]),S=(R,D)=>{x(!1),w({url:R.url,authorName:R.authorName});let N=D.slice();N.forEach(Y=>{o.includes(Y.id)&&(Y.status="published")}),t.setLibrary(N)},P=async()=>{try{await t.updateLibrary({libraryItems:pd({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=b?f:await t.getLatestLibrary();V0(R).catch(_c).catch(D=>{e({errorMessage:D.message})})},F=()=>Rm(ge,{open:c,children:[po(ge.Trigger,{onToggle:()=>m(!c),children:hx}),Rm(ge.Content,{onClickOutside:()=>m(!1),onSelect:()=>m(!1),className:"library-menu",children:[!b&&po(ge.Item,{onSelect:P,icon:wa,"data-testid":"lib-dropdown--load",children:g("buttons.load")}),!!f.length&&po(ge.Item,{onSelect:M,icon:bi,"data-testid":"lib-dropdown--export",children:g("buttons.export")}),b&&po(ge.Item,{icon:IE,onSelect:()=>x(!0),"data-testid":"lib-dropdown--remove",children:g("buttons.publishLibrary")}),!!f.length&&po(ge.Item,{onSelect:()=>h(!0),icon:vo,children:y})]})]});return Rm("div",{className:ZC("library-menu-dropdown-container",l),children:[F(),o.length>0&&po("div",{className:"library-actions-counter",children:o.length}),p&&d(),v&&po(Q2,{onClose:()=>x(!1),libraryItems:$C(s.libraryItems,o),appState:a,onSuccess:R=>S(R,s.libraryItems),onError:R=>window.alert(R),updateItemsInStorage:()=>t.setLibrary(s.libraryItems),onRemove:R=>i(o.filter(D=>D!==R))}),E&&I()]})},gv=({selectedItems:e,onSelectItems:o,className:t})=>{let{library:r}=dt(),{clearLibraryCache:n,deleteItemsFromLibraryCache:i}=Qa(),a=Re(),l=ye(),[s]=Ee(qr),c=async d=>{let p=d.filter(h=>!e.includes(h.id));r.setLibrary(p).catch(()=>{l({errorMessage:g("alerts.errorRemovingFromLibrary")})}),i(e),o([])};return po(jC,{appState:a,setAppState:l,selectedItems:e,onSelectItems:o,library:r,onRemoveFromLibrary:()=>c(s.libraryItems),resetLibrary:()=>{r.resetLibrary(),n()},className:t})};import{memo as nk,useEffect as ik,useState as ak}from"react";import qC,{useCallback as JC}from"react";function QC(){return[!1,JC(o=>o(),[])]}var fv=qC.useTransition||QC;import bv from"clsx";import{memo as ek,useRef as tk,useState as ok}from"react";import{jsx as Nm,jsxs as rk}from"react/jsx-runtime";var xv=ek(({id:e,elements:o,isPending:t,onClick:r,selected:n,onToggle:i,onDrag:a,svgCache:l})=>{let s=tk(null),c=Im(e,o,l,s),[m,d]=ok(!1),p=ve().formFactor==="phone",h=t&&Nm("div",{className:"library-unit__adder",children:ux});return rk("div",{className:bv("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:[Nm("div",{className:bv("library-unit__dragger",{"library-unit__pulse":!!t}),ref:s,draggable:!!o,onClick:o||t?b=>{e&&b.shiftKey?i(e,b):r(e)}:void 0,onDragStart:b=>{if(!e){b.preventDefault();return}d(!1),a(e,b)}}),h,e&&o&&(m||p||n)&&Nm(ys,{checked:n,onChange:(b,f)=>i(e,f),className:"library-unit__checkbox"})]})}),Ev=()=>Nm("div",{className:"library-unit library-unit--skeleton"});import{Fragment as lk,jsx as Om}from"react/jsx-runtime";var Bm=({children:e})=>Om("div",{className:"library-menu-items-container__grid",children:e}),Ns=nk(({items:e,onItemSelectToggle:o,onItemDrag:t,isItemSelected:r,onClick:n,svgCache:i,itemsRenderedPerBatch:a})=>{let[,l]=fv(),[s,c]=ak(0);return ik(()=>{s<e.length&&l(()=>{c(s+a)})},[s,e.length,l,a]),Om(lk,{children:e.map((m,d)=>d<s?Om(xv,{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):Om(Ev,{},d))})});import Ag from"clsx";import{forwardRef as dk,useRef as mk,useImperativeHandle as pk,useLayoutEffect as uk,useState as hk}from"react";import sk from"clsx";import{jsx as ck}from"react/jsx-runtime";var to=({type:e="button",onSelect:o,selected:t,children:r,className:n="",...i})=>ck("button",{onClick:gn(i.onClick,a=>{o()}),type:e,className:sk("excalidraw-button",n,{selected:t}),...i,children:r});import{jsx as _g,jsxs as yv}from"react/jsx-runtime";var Bn=dk(({onChange:e,label:o,fullWidth:t,placeholder:r,readonly:n,selectOnRender:i,onKeyDown:a,isRedacted:l=!1,icon:s,className:c,type:m,...d},p)=>{let h=mk(null);pk(p,()=>h.current),uk(()=>{i&&(h.current?.focus(),h.current?.select())},[i]);let[b,f]=hk(!1);return yv("div",{className:Ag("ExcTextField",c,{"ExcTextField--fullWidth":t,"ExcTextField--hasIcon":!!s}),onClick:()=>{h.current?.focus()},children:[s,o&&_g("div",{className:"ExcTextField__label",children:o}),yv("div",{className:Ag("ExcTextField__input",{"ExcTextField__input--readonly":n}),children:[_g("input",{className:Ag({"is-redacted":"value"in d&&d.value&&l&&!b}),readOnly:n,value:"value"in d?d.value:void 0,defaultValue:"defaultValue"in d?d.defaultValue:void 0,placeholder:r,ref:h,onChange:y=>e?.(y.target.value),onKeyDown:a,type:m}),l&&_g(to,{onSelect:()=>f(!b),style:{border:0,userSelect:"none"},children:b?_E:ka})]})]})});import{Fragment as Tv,jsx as At,jsxs as Mr}from"react/jsx-runtime";var fk=17,bk=64;function Rg({isLoading:e,libraryItems:o,onAddToLibrary:t,onInsertLibraryItems:r,pendingElements:n,theme:i,id:a,libraryReturnUrl:l,onSelectItems:s,selectedItems:c}){let m=ve(),d=vv(null),p=X2(d);Pg(()=>{p>0&&d.current?.scrollTo(0,p)},[]);let{svgCache:h}=Qa(),[b,f]=wv(null),[y,v]=wv(""),x=!o.length&&!n.length,E=!x&&!!y.trim(),w=Dg(()=>{let V=Li(y.trim().toLowerCase());return V?o.filter(ae=>{let de=ae.name||"";return de.trim()&&Li(de.toLowerCase()).includes(V)}):[]},[o,y]),I=Dg(()=>o.filter(V=>V.status!=="published"),[o]),S=Dg(()=>o.filter(V=>V.status==="published"),[o]),P=nl((V,ae)=>{let de=!c.includes(V),se=[...I,...S];if(de){if(ae.shiftKey&&b){let q=se.findIndex(Zo=>Zo.id===b),ie=se.findIndex(Zo=>Zo.id===V);if(q===-1||ie===-1){s([...c,V]);return}let Fe=re(c),Tt=Math.min(q,ie),Nt=Math.max(q,ie),an=se.reduce((Zo,ln,Oi)=>((Oi>=Tt&&Oi<=Nt||Fe.has(ln.id))&&Zo.push(ln.id),Zo),[]);s(an)}else s([...c,V]);f(V)}else f(null),s(c.filter(q=>q!==V))},[b,s,S,c,I]);Pg(()=>{c.length||f(null)},[c]);let M=nl(V=>{let ae;return c.includes(V)?ae=o.filter(de=>c.includes(de.id)):ae=o.filter(de=>de.id===V),ae.map(de=>({...de,elements:vn({type:"everything",elements:de.elements,randomizeSeed:!0}).duplicatedElements}))},[o,c]),F=nl((V,ae)=>{let de={itemIds:c.includes(V)?c:[V]};ae.dataTransfer.setData(he.excalidrawlibIds,JSON.stringify(de))},[c]),R=nl(V=>V?c.includes(V):!1,[c]),D=nl(()=>{t(n)},[n,t]),N=nl(V=>{V&&r(M(V))},[M,r]),Y=h.size>=(w.length?w:o).length?bk:fk,J=vv(null);Pg(()=>{Q1(()=>{J.current?.focus()})},[]);let z=!E&&Mr(Tv,{children:[!x&&At("div",{className:"library-menu-items-container__header",children:g("labels.personalLib")}),!n.length&&!I.length?Mr("div",{className:"library-menu-items__no-items",children:[!S.length&&At("div",{className:"library-menu-items__no-items__label",children:g("library.noItems")}),At("div",{className:"library-menu-items__no-items__hint",children:S.length>0?g("library.hint_emptyPrivateLibrary"):g("library.hint_emptyLibrary")})]}):Mr(Bm,{children:[n.length>0&&At(Ns,{itemsRenderedPerBatch:Y,items:[{id:null,elements:n}],onItemSelectToggle:P,onItemDrag:F,onClick:D,isItemSelected:R,svgCache:h}),At(Ns,{itemsRenderedPerBatch:Y,items:I,onItemSelectToggle:P,onItemDrag:F,onClick:N,isItemSelected:R,svgCache:h})]}),S.length>0&&At("div",{className:"library-menu-items-container__header",style:{marginTop:"0.75rem"},children:g("labels.excalidrawLib")}),S.length>0&&At(Bm,{children:At(Ns,{itemsRenderedPerBatch:Y,items:S,onItemSelectToggle:P,onItemDrag:F,onClick:N,isItemSelected:R,svgCache:h})})]}),H=E&&Mr(Tv,{children:[Mr("div",{className:"library-menu-items-container__header",children:[g("library.search.heading"),!e&&Mr("div",{className:"library-menu-items-container__header__hint",style:{cursor:"pointer"},onPointerDown:V=>V.preventDefault(),onClick:V=>{v("")},children:[At("kbd",{children:"esc"})," to clear"]})]}),w.length>0?At(Bm,{children:At(Ns,{itemsRenderedPerBatch:Y,items:w,onItemSelectToggle:P,onItemDrag:F,onClick:N,isItemSelected:R,svgCache:h})}):Mr("div",{className:"library-menu-items__no-items",children:[At("div",{className:"library-menu-items__no-items__hint",children:g("library.search.noResults")}),At(to,{onPointerDown:V=>V.preventDefault(),onSelect:()=>{v("")},style:{width:"auto",marginTop:"1rem"},children:g("library.search.clearSearch")})]})]});return Mr("div",{className:"library-menu-items-container",style:n.length||I.length||S.length?{justifyContent:"flex-start"}:{borderBottom:0},children:[Mr("div",{className:"library-menu-items-header",children:[!x&&At(Bn,{ref:J,type:"search",className:gk("library-menu-items-container__search",{hideCancelButton:m.formFactor!=="phone"}),placeholder:g("library.search.inputPlaceholder"),value:y,onChange:V=>v(V)}),At(gv,{selectedItems:c,onSelectItems:s,className:"library-menu-dropdown-container--in-heading"})]}),Mr(mo.Col,{className:"library-menu-items-container__items",align:"start",gap:1,style:{flex:S.length>0?1:"0 1 auto",margin:x?"auto":0},ref:d,children:[e&&At("div",{style:{position:"absolute",top:"var(--container-padding-y)",right:"var(--container-padding-x)",transform:"translateY(50%)"},children:At(Ft,{})}),z,H,x&&At(Sm,{style:{padding:"16px 0",width:"100%"},id:a,libraryReturnUrl:l,theme:i})]})]})}import{jsx as zn,jsxs as Cv}from"react/jsx-runtime";var ol=Le(!1),Iv=({children:e})=>zn("div",{className:"layer-ui__library",children:e}),Ek=Mv(({onInsertLibraryItems:e,pendingElements:o,onAddToLibrary:t,setAppState:r,libraryReturnUrl:n,library:i,id:a,theme:l,selectedItems:s,onSelectItems:c})=>{let[m]=Ee(qr),d=Og(b=>{(async(y,v)=>{pe("element","addToLibrary","ui");for(let E of kc)if(y.some(w=>w.type===E))return r({errorMessage:g(`errors.libraryElementTypeError.${E}`)});let x=[{status:"unpublished",elements:y,id:jo(),created:Date.now()},...v];t(),i.setLibrary(x).catch(()=>{r({errorMessage:g("alerts.errorAddingToLibrary")})})})(b,m.libraryItems)},[t,i,r,m.libraryItems]),p=Sv(()=>m.libraryItems,[m]);if(m.status==="loading"&&!m.isInitialized)return zn(Iv,{children:zn("div",{className:"layer-ui__library-message",children:Cv("div",{children:[zn(Ft,{size:"2em"}),zn("span",{children:g("labels.libraryLoadingMessage")})]})})});let h=m.libraryItems.length>0||o.length>0;return Cv(Iv,{children:[zn(Rg,{isLoading:m.status==="loading",libraryItems:p,onAddToLibrary:d,onInsertLibraryItems:e,pendingElements:o,id:a,libraryReturnUrl:n,theme:l,onSelectItems:c,selectedItems:s}),h&&zn(Sm,{className:"library-menu-control-buttons--at-bottom",style:{padding:"16px 12px 0 12px"},id:a,libraryReturnUrl:n,theme:l})]})}),Ng=(e,o)=>({elements:e,pending:te(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}),selectedElementIds:o}),yk=(e,o)=>{let t=Ln(),[r,n]=kv(()=>Ng(t,e.selectedElementIds)),i=xk(new Map);return Bg(()=>{for(let a of r.pending)i.current.set(a.id,a.version)},[r.pending]),Bg(()=>{o.state.cursorButton==="up"&&o.state.activeTool.type==="selection"&&n(a=>{if(!ut(a.selectedElementIds,e.selectedElementIds))return i.current.clear(),Ng(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 Ng(t,e.selectedElementIds)}return a})},[o,o.state.cursorButton,o.state.activeTool.type,e.selectedElementIds,t]),r.pending},Lv=Mv(()=>{let e=dt(),{onInsertElements:o}=e,t=Vt(),r=Re(),n=ye(),[i,a]=kv([]),l=Sv(()=>e.library,[e.library]),s=yk(r,e);Bg(()=>Ve(document,"keydown",d=>{if(d.key===T.ESCAPE&&d.target instanceof HTMLElement){let p=d.target;if(p.closest(`.${tt.SIDEBAR}`))i.length>0?(d.stopPropagation(),a([])):ao(p)&&p instanceof HTMLInputElement&&!p.value&&(d.stopPropagation(),n({openSidebar:null}),e.focusContainer());else if(i.length>0){let{x:h,y:b}=e.lastViewportPosition;document.elementFromPoint(h,b)?.closest(`.${tt.SIDEBAR}`)&&(d.stopPropagation(),a([]))}}},{capture:!0}),[i,n,e]);let c=Og(d=>{o(tl(d)),e.focusContainer()},[o,e]),m=Og(()=>{n({selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null})},[n]);return zn(Ek,{pendingElements:s,onInsertLibraryItems:c,onAddToLibrary:m,setAppState:n,libraryReturnUrl:t.libraryReturnUrl,library:l,id:e.id,theme:r.theme,selectedItems:i,onSelectItems:a})});import vk from"clsx";import{useRef as wk}from"react";import{createPortal as Tk}from"react-dom";import{jsx as Av,jsxs as Ik}from"react/jsx-runtime";var _v=e=>{let{closeOnClickOutside:o=!0}=e,t=Gd({className:"excalidraw-modal-container"}),r=wk(document.body.classList.contains("excalidraw-animations-disabled"));if(!t)return null;let n=i=>{i.key===T.ESCAPE&&(i.nativeEvent.stopImmediatePropagation(),i.stopPropagation(),e.onCloseRequest())};return Tk(Ik("div",{className:vk("Modal",e.className,{"animations-disabled":r.current}),role:"dialog","aria-modal":"true",onKeyDown:n,"aria-labelledby":e.labelledBy,"data-prevent-outside-click":!0,children:[Av("div",{className:"Modal__background",onClick:o?e.onCloseRequest:void 0}),Av("div",{className:"Modal__content",style:{"--max-width":`${e.maxWidth}px`},tabIndex:0,children:e.children})]}),t)};import{jsx as Os,jsxs as Lk}from"react/jsx-runtime";function Mk(e){if(e&&typeof e=="number")return e;switch(e){case"small":return 550;case"wide":return 1024;case"regular":default:return 800}}var pt=e=>{let[o,t]=O2(),[r]=Sk(document.activeElement),{id:n}=$e(),i=ve().formFactor==="phone";kk(()=>{if(!o)return;let c=Nl(o);setTimeout(()=>{c.length>0&&e.autofocus!==!1&&(c[1]||c[0]).focus()});let m=d=>{if(d.key===T.TAB){let p=Nl(o),{activeElement:h}=document,b=p.findIndex(f=>f===h);b===0&&d.shiftKey?(p[p.length-1].focus(),d.preventDefault()):b===p.length-1&&!d.shiftKey&&(p[0].focus(),d.preventDefault())}};return o.addEventListener("keydown",m),()=>o.removeEventListener("keydown",m)},[o,e.autofocus]);let a=ye(),l=In(ol),s=()=>{a({openMenu:null}),l(!1),r.focus(),e.onCloseRequest()};return Os(_v,{className:Ck("Dialog",e.className,{"Dialog--fullscreen":i}),labelledBy:"dialog-title",maxWidth:Mk(e.size),onCloseRequest:s,closeOnClickOutside:e.closeOnClickOutside,children:Lk(ft,{ref:t,children:[e.title&&Os("h2",{id:`${n}-dialog-title`,className:"Dialog__title",children:Os("span",{className:"Dialog__titleContent",children:e.title})}),i&&Os("button",{className:"Dialog__close",onClick:s,title:g("buttons.close"),"aria-label":g("buttons.close"),type:"button",children:Ro}),Os("div",{className:"Dialog__content",children:e.children})]})})};var zm=[{icon:fi,value:"selection",key:T.V,numericKey:T[1],fillable:!0},{icon:ga,value:"rectangle",key:T.R,numericKey:T[2],fillable:!0},{icon:fa,value:"diamond",key:T.D,numericKey:T[3],fillable:!0},{icon:ba,value:"ellipse",key:T.O,numericKey:T[4],fillable:!0},{icon:Sd,value:"arrow",key:T.A,numericKey:T[5],fillable:!0},{icon:xa,value:"line",key:T.L,numericKey:T[6],fillable:!0},{icon:Tr,value:"freedraw",key:[T.P,T.X],numericKey:T[7],fillable:!1},{icon:Ir,value:"text",key:T.T,numericKey:T[8],fillable:!1},{icon:Ea,value:"image",key:null,numericKey:T[9],fillable:!1},{icon:Md,value:"eraser",key:T.E,numericKey:T[0],fillable:!1}],zg=e=>e.state.preferredSelectionTool.type==="lasso"?[{value:"lasso",icon:fi,key:T.V,numericKey:T[1],fillable:!0},...zm.slice(1)]:zm,Pv=(e,o)=>zg(o).find((r,n)=>r.numericKey!=null&&e===r.numericKey.toString()||r.key&&(typeof r.key=="string"?r.key===e:r.key.includes(e)))?.value||null;import ar from"clsx";import{useRef as Nk,useState as Ok}from"react";import*as Ar from"@radix-ui/react-popover";import{createIsolation as Ak}from"jotai-scope";import Fg from"react";import Lr from"tunnel-rat";var Hg=Fg.createContext(null),Ze=()=>Fg.useContext(Hg),_k=Ak(),Dv=()=>Fg.useMemo(()=>({MainMenuTunnel:Lr(),WelcomeScreenMenuHintTunnel:Lr(),WelcomeScreenToolbarHintTunnel:Lr(),WelcomeScreenHelpHintTunnel:Lr(),WelcomeScreenCenterTunnel:Lr(),FooterCenterTunnel:Lr(),DefaultSidebarTriggerTunnel:Lr(),DefaultSidebarTabTriggersTunnel:Lr(),OverwriteConfirmDialogTunnel:Lr(),TTDDialogTriggerTunnel:Lr(),tunnelsJotai:_k}),[]);var Bs=U({name:"viewMode",label:"labels.viewMode",icon:ka,viewMode:!0,trackEvent:{category:"canvas",predicate:e=>!e.viewModeEnabled},perform(e,o){return{appState:{...o,viewModeEnabled:!this.checked(o)},captureUpdate:_.EVENTUALLY}},checked:e=>e.viewModeEnabled,predicate:(e,o,t)=>!!t.UIOptions?.viewModeControlEnabled&&typeof t.viewModeEnabled>"u",keyTest:e=>!e[T.CTRL_OR_CMD]&&e.altKey&&e.code===ue.R});import{useEffect as Pk,useState as Dk}from"react";import Rv from"clsx";import*as il from"@radix-ui/react-popover";import{jsx as Fm,jsxs as Rk}from"react/jsx-runtime";var al=({app:e,options:o,activeTool:t,defaultOption:r,className:n="Shape",namePrefix:i,title:a,"data-testid":l,onToolChange:s,displayedOption:c,fillable:m=!1})=>{let[d,p]=Dk(!1),h=t.type,b=c.type===h,f=32/2+10,{container:y}=$e();return!o.some(v=>v.type===h)&&d&&p(!1),Pk(()=>{let v=e.onPointerDownEmitter.on(()=>{p(!1)});return()=>v?.()},[e]),Rk(il.Root,{open:d,children:[Fm(il.Trigger,{asChild:!0,children:Fm(j,{className:Rv(n,{fillable:m,active:o.some(v=>v.type===t.type)}),type:"radio",icon:c.icon,checked:b,name:"editor-current-shape",title:a,"aria-label":a,"data-testid":l,onPointerDown:()=>{p(v=>!v),s(r)}})}),Fm(il.Content,{className:"tool-popover-content",sideOffset:f,collisionBoundary:y??void 0,children:o.map(({type:v,icon:x,title:E})=>Fm(j,{className:Rv(n,{active:h===v}),type:"radio",icon:x,checked:h===v,name:`${i}-option`,title:E||Se(v),keyBindingLabel:"","aria-label":E||Se(v),"data-testid":`toolbar-${v}`,onChange:()=>{e.state.activeTool.type!==v&&pe("toolbar",v,"ui"),e.setActiveTool({type:v}),s?.(v)}},v))})]})};import{Fragment as uo,jsx as $,jsxs as fe}from"react/jsx-runtime";var Ug=ar([tt.SHAPE_ACTIONS_THEME_SCOPE,"properties-content"]),zs=(e,o)=>{let t=o[0]?.type||null;for(let r of o)if(r.type!==t){t=null;break}return Gl(e.activeTool.type)&&t!=="image"&&t!=="frame"&&t!=="magicframe"||o.some(r=>Gl(r.type))},Fs=(e,o)=>hr(e.activeTool.type)||o.some(t=>hr(t.type)),Nv=({appState:e,elementsMap:o,renderAction:t,app:r})=>{let n=Ji(o,e),i=!1;n.length===2&&(ht(n[0])||ht(n[1]))&&(i=!0);let a=!!(e.editingTextElement||e.newElement),l=ve(),s=document.documentElement.getAttribute("dir")==="rtl",c=hr(e.activeTool.type)&&!Eo(e.currentItemBackgroundColor)||n.some(b=>hr(b.type)&&!Eo(b.backgroundColor)),m=n.length===1||i,d=!e.selectedLinearElement?.isEditing&&n.length===1&&be(n[0])&&!Te(n[0]),p=!e.croppingElementId&&n.length===1&&He(n[0]),h=!i&&Qt(e,r);return fe("div",{className:"selected-shape-actions",children:[$("div",{children:zs(e,n)&&t("changeStrokeColor")}),Fs(e,n)&&$("div",{children:t("changeBackgroundColor")}),c&&t("changeFillStyle"),(Wl(e.activeTool.type)||n.some(b=>Wl(b.type)))&&t("changeStrokeWidth"),(e.activeTool.type==="freedraw"||n.some(b=>b.type==="freedraw"))&&t("changeStrokeShape"),(Vl(e.activeTool.type)||n.some(b=>Vl(b.type)))&&fe(uo,{children:[t("changeStrokeStyle"),r.props.UIOptions.shapeControl?.sloppinessChangeEnabled&&t("changeSloppiness")]}),(Yl(e.activeTool.type)||n.some(b=>Yl(b.type)))&&$(uo,{children:t("changeRoundness")}),(Kl(e.activeTool.type)||n.some(b=>Kl(b.type)))&&$(uo,{children:t("changeArrowType")}),(e.activeTool.type==="text"||n.some(X))&&fe(uo,{children:[r.props.UIOptions.fontPicker?.familyChangeEnabled&&t("changeFontFamily"),t("changeFontSize"),(e.activeTool.type==="text"||mu(n,o))&&t("changeTextAlign")]}),du(n,o)&&t("changeVerticalAlign"),(ea(e.activeTool.type)||n.some(b=>ea(b.type)))&&$(uo,{children:t("changeArrowhead")}),t("changeOpacity"),fe("fieldset",{children:[$("legend",{children:g("labels.layers")}),fe("div",{className:"buttonList",children:[t("sendToBack"),t("sendBackward"),t("bringForward"),t("bringToFront")]})]}),h&&!i&&fe("fieldset",{children:[$("legend",{children:g("labels.align")}),fe("div",{className:"buttonList",children:[s?fe(uo,{children:[t("alignRight"),t("alignHorizontallyCentered"),t("alignLeft")]}):fe(uo,{children:[t("alignLeft"),t("alignHorizontallyCentered"),t("alignRight")]}),n.length>2&&t("distributeHorizontally"),$("div",{style:{flexBasis:"100%",height:0}}),fe("div",{style:{display:"flex",flexWrap:"wrap",gap:".5rem",marginTop:"-0.5rem"},children:[t("alignTop"),t("alignVerticallyCentered"),t("alignBottom"),n.length>2&&t("distributeVertically")]})]})]}),!a&&n.length>0&&fe("fieldset",{children:[$("legend",{children:g("labels.actions")}),fe("div",{className:"buttonList",children:[l.formFactor!=="phone"&&t("duplicateSelection"),l.formFactor!=="phone"&&t("deleteSelectedElements"),t("group"),t("ungroup"),m&&t("hyperlink"),p&&t("cropEditor"),d&&t("toggleLinearEditor")]})]})]})},Ov=({appState:e,renderAction:o,setAppState:t,targetElements:r,container:n,app:i})=>{let a=hr(e.activeTool.type)&&!Eo(e.currentItemBackgroundColor)||r.some(c=>hr(c.type)&&!Eo(c.backgroundColor)),l=r.length>0||e.activeTool.type!=="selection"&&e.activeTool.type!=="eraser"&&e.activeTool.type!=="hand"&&e.activeTool.type!=="laser"&&e.activeTool.type!=="lasso",s=e.openPopup==="compactStrokeStyles";return l?$("div",{className:"compact-action-item",children:fe(Ar.Root,{open:s,onOpenChange:c=>{t(c?{openPopup:"compactStrokeStyles"}:{openPopup:null})},children:[$(Ar.Trigger,{asChild:!0,children:$("button",{type:"button",className:ar("compact-action-button properties-trigger",{active:s}),title:g("labels.stroke"),onClick:c=>{c.preventDefault(),c.stopPropagation(),t({openPopup:s?null:"compactStrokeStyles"})},children:qE})}),s&&$(Zr,{className:Ug,container:n,style:{maxWidth:"13rem"},onClose:()=>{},children:fe("div",{className:"selected-shape-actions",children:[a&&o("changeFillStyle"),(Wl(e.activeTool.type)||r.some(c=>Wl(c.type)))&&o("changeStrokeWidth"),(Vl(e.activeTool.type)||r.some(c=>Vl(c.type)))&&fe(uo,{children:[o("changeStrokeStyle"),i.props.UIOptions.shapeControl?.sloppinessChangeEnabled&&o("changeSloppiness")]}),(Yl(e.activeTool.type)||r.some(c=>Yl(c.type)))&&o("changeRoundness"),o("changeOpacity")]})})]})}):null},Bv=({appState:e,renderAction:o,setAppState:t,targetElements:r,container:n,app:i})=>{let a=Kl(e.activeTool.type)||r.some(s=>Kl(s.type)),l=e.openPopup==="compactArrowProperties";return a?$("div",{className:"compact-action-item",children:fe(Ar.Root,{open:l,onOpenChange:s=>{t(s?{openPopup:"compactArrowProperties"}:{openPopup:null})},children:[$(Ar.Trigger,{asChild:!0,children:$("button",{type:"button",className:ar("compact-action-button properties-trigger",{active:l}),title:g("labels.arrowtypes"),onClick:s=>{s.preventDefault(),s.stopPropagation(),t({openPopup:l?null:"compactArrowProperties"})},children:(()=>{let s=Yt(r,i,c=>Ce(c)?c.elbowed?"elbow":c.roundness?"round":"sharp":null,c=>Ce(c),c=>c?null:e.currentItemArrowType);return s==="elbow"?Ma:s==="round"?La:Sa})()})}),l&&$(Zr,{container:n,className:"properties-content",style:{maxWidth:"13rem"},onClose:()=>{},children:o("changeArrowProperties")})]})}):null},zv=({appState:e,renderAction:o,setAppState:t,targetElements:r,container:n,elementsMap:i})=>{let{saveCaretPosition:a,restoreCaretPosition:l}=ly(),s=e.openPopup==="compactTextProperties";return $("div",{className:"compact-action-item",children:fe(Ar.Root,{open:s,onOpenChange:c=>{c?(e.editingTextElement&&a(),t({openPopup:"compactTextProperties"})):(t({openPopup:null}),e.editingTextElement&&l())},children:[$(Ar.Trigger,{asChild:!0,children:$("button",{type:"button",className:ar("compact-action-button properties-trigger",{active:s}),title:g("labels.textAlign"),onClick:c=>{c.preventDefault(),c.stopPropagation(),s?t({openPopup:null}):(e.editingTextElement&&a(),t({openPopup:"compactTextProperties"}))},children:wx})}),e.openPopup==="compactTextProperties"&&$(Zr,{className:Ug,container:n,style:{maxWidth:"13rem"},preventAutoFocusOnTouch:!!e.editingTextElement,onClose:()=>{e.editingTextElement&&l()},children:fe("div",{className:"selected-shape-actions",children:[(e.activeTool.type==="text"||r.some(X))&&o("changeFontSize"),(e.activeTool.type==="text"||mu(r,i))&&o("changeTextAlign"),du(r,i)&&o("changeVerticalAlign")]})})]})})},Fv=({appState:e,renderAction:o,targetElements:t,setAppState:r,container:n,app:i,showDuplicate:a,showDelete:l})=>{let s=!!(e.editingTextElement||e.newElement),c=!e.croppingElementId&&t.length===1&&He(t[0]),m=t.length===1,d=Qt(e,i),p=!1;t.length===2&&(ht(t[0])||ht(t[1]))&&(p=!0);let h=document.documentElement.getAttribute("dir")==="rtl",b=e.openPopup==="compactOtherProperties";return s||t.length===0?null:$("div",{className:"compact-action-item",children:fe(Ar.Root,{open:b,onOpenChange:f=>{r(f?{openPopup:"compactOtherProperties"}:{openPopup:null})},children:[$(Ar.Trigger,{asChild:!0,children:$("button",{type:"button",className:ar("compact-action-button properties-trigger",{active:b}),title:g("labels.actions"),onClick:f=>{f.preventDefault(),f.stopPropagation(),r({openPopup:b?null:"compactOtherProperties"})},children:gx})}),b&&$(Zr,{className:Ug,container:n,style:{maxWidth:"12rem",justifyContent:"center",alignItems:"center"},onClose:()=>{},children:fe("div",{className:"selected-shape-actions",children:[fe("fieldset",{children:[$("legend",{children:g("labels.layers")}),fe("div",{className:"buttonList",children:[o("sendToBack"),o("sendBackward"),o("bringForward"),o("bringToFront")]})]}),d&&!p&&fe("fieldset",{children:[$("legend",{children:g("labels.align")}),fe("div",{className:"buttonList",children:[h?fe(uo,{children:[o("alignRight"),o("alignHorizontallyCentered"),o("alignLeft")]}):fe(uo,{children:[o("alignLeft"),o("alignHorizontallyCentered"),o("alignRight")]}),t.length>2&&o("distributeHorizontally"),$("div",{style:{flexBasis:"100%",height:0}}),fe("div",{style:{display:"flex",flexWrap:"wrap",gap:".5rem",marginTop:"-0.5rem"},children:[o("alignTop"),o("alignVerticallyCentered"),o("alignBottom"),t.length>2&&o("distributeVertically")]})]})]}),fe("fieldset",{children:[$("legend",{children:g("labels.actions")}),fe("div",{className:"buttonList",children:[o("group"),o("ungroup"),m&&o("hyperlink"),c&&o("cropEditor"),a&&o("duplicateSelection"),l&&o("deleteSelectedElements")]})]})]})})]})})},Bk=({appState:e,renderAction:o,targetElements:t})=>!e.selectedLinearElement?.isEditing&&t.length===1&&be(t[0])&&!Te(t[0])?$("div",{className:"compact-action-item",children:o("toggleLinearEditor")}):null,Hv=({appState:e,elementsMap:o,renderAction:t,app:r,setAppState:n})=>{let i=Ji(o,e),{container:a}=$e(),l=!!(e.editingTextElement||e.newElement),s=!e.selectedLinearElement?.isEditing&&i.length===1&&be(i[0])&&!Te(i[0]);return fe("div",{className:"compact-shape-actions",children:[zs(e,i)&&$("div",{className:ar("compact-action-item"),children:t("changeStrokeColor")}),Fs(e,i)&&$("div",{className:"compact-action-item",children:t("changeBackgroundColor")}),$(Ov,{appState:e,renderAction:t,setAppState:n,targetElements:i,container:a,app:r}),$(Bv,{appState:e,renderAction:t,setAppState:n,targetElements:i,container:a,app:r}),s&&$("div",{className:"compact-action-item",children:t("toggleLinearEditor")}),(e.activeTool.type==="text"||i.some(X))&&fe(uo,{children:[r.props.UIOptions.fontPicker?.familyChangeEnabled&&$("div",{className:"compact-action-item",children:t("changeFontFamily")}),$(zv,{appState:e,renderAction:t,setAppState:n,targetElements:i,container:a,elementsMap:o})]}),!l&&i.length>0&&$("div",{className:"compact-action-item",children:t("duplicateSelection")}),!l&&i.length>0&&$("div",{className:"compact-action-item",children:t("deleteSelectedElements")}),$(Fv,{appState:e,renderAction:t,targetElements:i,setAppState:n,container:a,app:r})]})},Uv=({appState:e,elementsMap:o,renderAction:t,app:r,setAppState:n})=>{let i=Ji(o,e),{container:a}=$e(),l=Nk(null),s=l.current?.getBoundingClientRect()?.width??0,c=9,m=6,d=32,p=c*d+(c-1)*m,h=d+m,b=s>=p+h,f=s>=p+2*h;return fe(ft,{className:"compact-shape-actions mobile-shape-actions",style:{flexDirection:"row",boxShadow:"none",padding:0,zIndex:2,backgroundColor:"transparent",height:d*1.35,marginBottom:4,alignItems:"center",gap:m,pointerEvents:"none"},ref:l,children:[fe("div",{style:{display:"flex",flexDirection:"row",gap:m,flex:1},children:[zs(e,i)&&$("div",{className:ar("compact-action-item"),children:t("changeStrokeColor")}),Fs(e,i)&&$("div",{className:"compact-action-item",children:t("changeBackgroundColor")}),$(Ov,{appState:e,renderAction:t,setAppState:n,targetElements:i,container:a,app:r}),$(Bv,{appState:e,renderAction:t,setAppState:n,targetElements:i,container:a,app:r}),$(Bk,{appState:e,renderAction:t,targetElements:i}),(e.activeTool.type==="text"||i.some(X))&&fe(uo,{children:[r.props.UIOptions.fontPicker?.familyChangeEnabled&&$("div",{className:"compact-action-item",children:t("changeFontFamily")}),$(zv,{appState:e,renderAction:t,setAppState:n,targetElements:i,container:a,elementsMap:o})]}),$(Fv,{appState:e,renderAction:t,targetElements:i,setAppState:n,container:a,app:r,showDuplicate:!f,showDelete:!b})]}),fe("div",{style:{display:"flex",flexDirection:"row",gap:m},children:[$("div",{className:"compact-action-item",children:t("undo")}),$("div",{className:"compact-action-item",children:t("redo")}),f&&$("div",{className:"compact-action-item",children:t("duplicateSelection")}),b&&$("div",{className:"compact-action-item",children:t("deleteSelectedElements")})]})]})},Gv=({activeTool:e,setAppState:o,app:t,UIOptions:r})=>{let[n,i]=Ok(!1),a=Lt(),l=a==="full",s=a==="compact",c=[{type:"selection",icon:fi,title:Se(g("toolBar.selection"))},{type:"lasso",icon:Cn,title:Se(g("toolBar.lasso"))}],m=e.type==="frame",d=e.type==="laser",p=l&&e.type==="lasso"&&t.state.preferredSelectionTool.type!=="lasso",h=e.type==="embeddable",{TTDDialogTriggerTunnel:b}=Ze();return fe(uo,{children:[zg(t).map(({value:f,icon:y,key:v,numericKey:x,fillable:E},w)=>{if(r.tools?.[f]===!1)return null;let I=g(`toolBar.${f}`),S=v&&Se(typeof v=="string"?v:v[0]),P=S?`${S} ${g("helpDialog.or")} ${x}`:`${x}`;return(f==="selection"||f==="lasso")&&s?$(al,{app:t,options:c,activeTool:e,defaultOption:t.state.preferredSelectionTool.type,namePrefix:"selectionType",title:Se(g("toolBar.selection")),"data-testid":"toolbar-selection",onToolChange:M=>{(M==="selection"||M==="lasso")&&(t.setActiveTool({type:M}),o({preferredSelectionTool:{type:M,initialized:!0}}))},displayedOption:c.find(M=>M.type===t.state.preferredSelectionTool.type)||c[0],fillable:e.type==="selection"},"selection-popover"):$(j,{className:ar("Shape",{fillable:E}),type:"radio",icon:y,checked:e.type===f,name:"editor-current-shape",title:`${Se(I)} \u2014 ${P}`,keyBindingLabel:x||S,"aria-label":Se(I),"aria-keyshortcuts":P,"data-testid":`toolbar-${f}`,onPointerDown:({pointerType:M})=>{!t.state.penDetected&&M==="pen"&&t.togglePenMode(!0),f==="selection"&&(t.state.activeTool.type==="selection"?t.setActiveTool({type:"lasso"}):t.setActiveTool({type:"selection"}))},onChange:({pointerType:M})=>{t.state.activeTool.type!==f&&pe("toolbar",f,"ui"),f==="image"?t.setActiveTool({type:f}):t.setActiveTool({type:f})}},f)}),r.toolBar?.moreToolsEnabled&&fe(uo,{children:[$("div",{className:"App-toolbar__divider"}),fe(ge,{open:n,children:[$(ge.Trigger,{className:ar("App-toolbar__extra-tools-trigger",{"App-toolbar__extra-tools-trigger--selected":m||h||p||d&&!t.props.isCollaborating}),onToggle:()=>{i(!n),o({openMenu:null,openPopup:null})},title:g("toolBar.extraTools"),children:m?or:h?ya:d&&!t.props.isCollaborating?kn:p?Cn:ns}),fe(ge.Content,{onClickOutside:()=>i(!1),onSelect:()=>i(!1),className:ar("App-toolbar__extra-tools-dropdown",{"dropdown-menu-align-bottom":t.props.UIOptions.swapTopMenuAndFooter}),children:[$(ge.Item,{onSelect:()=>t.setActiveTool({type:"frame"}),icon:or,shortcut:T.F.toLocaleUpperCase(),"data-testid":"toolbar-frame",selected:m,children:g("toolBar.frame")}),$(ge.Item,{onSelect:()=>t.setActiveTool({type:"embeddable"}),icon:ya,"data-testid":"toolbar-embeddable",selected:h,children:g("toolBar.embeddable")}),$(ge.Item,{onSelect:()=>t.setActiveTool({type:"laser"}),icon:kn,"data-testid":"toolbar-laser",selected:d,shortcut:T.K.toLocaleUpperCase(),children:g("toolBar.laser")}),l&&$(ge.Item,{onSelect:()=>t.setActiveTool({type:"lasso"}),icon:Cn,"data-testid":"toolbar-lasso",selected:p,children:g("toolBar.lasso")}),$("div",{style:{margin:"6px 0",fontSize:14,fontWeight:600},children:"Generate"}),t.props.aiEnabled!==!1&&$(b.Out,{}),$(ge.Item,{onSelect:()=>t.setOpenDialog({name:"ttd",tab:"mermaid"}),icon:Ia,"data-testid":"toolbar-embeddable",children:g("toolBar.mermaidToExcalidraw")}),t.props.aiEnabled!==!1&&t.plugins.diagramToCode&&fe(ge.Item,{onSelect:()=>t.onMagicframeToolSelect(),icon:Ei,"data-testid":"toolbar-magicframe",children:[g("toolBar.magicframe"),$(ge.Item.Badge,{children:"AI"})]})]})]})]})]})},Wv=({renderAction:e,zoom:o})=>$(mo.Col,{gap:1,className:tt.ZOOM_ACTIONS,children:fe(mo.Row,{align:"center",children:[e("zoomOut"),e("resetZoom"),e("zoomIn")]})}),Hm=({renderAction:e,className:o})=>fe("div",{className:`undo-redo-buttons ${o}`,children:[$("div",{className:"undo-button-container",children:$(To,{label:g("buttons.undo"),children:e("undo")})}),$("div",{className:"redo-button-container",children:fe(To,{label:g("buttons.redo"),children:[" ",e("redo")]})})]}),Vv=({actionManager:e,showExitZenModeBtn:o})=>$("button",{type:"button",className:ar("disable-zen-mode",{"disable-zen-mode--visible":o}),onClick:()=>e.executeAction(Ka),children:g("buttons.exitZenMode")}),Yv=({actionManager:e})=>$("button",{type:"button",className:"disable-view-mode",onClick:()=>e.executeAction(Bs),children:QE});import{useRef as zk}from"react";var Gg=e=>{let o=zk({userFn:e});return o.current.userFn=e,o.current.stableFn||(o.current.stableFn=(...t)=>o.current.userFn(...t)),o.current.stableFn};import{jsx as Hk,jsxs as Fk}from"react/jsx-runtime";var Ai=Le(null),Kv=()=>{let[e,o]=Ee(Ai),t=Et();return e&&e==="clearCanvas"?Hk(Lm,{onConfirm:()=>{t.executeAction($r),o(null)},onCancel:()=>o(null),title:g("clearCanvasDialog.title"),children:Fk("p",{className:"clear-canvas__content",children:[" ",g("alerts.clearReset")]})}):null};var Wg={};p1(Wg,{toggleTheme:()=>Uk});var Uk={...wi,category:"App",label:"Toggle theme",perform:({actionManager:e})=>{e.executeAction(wi,"commandPalette")}};import{jsx as _t,jsxs as _r}from"react/jsx-runtime";var Vk=Le(null),Qe={app:"App",export:"Export",tools:"Tools",editor:"Editor",elements:"Elements",links:"Links",library:"Library"},Zv=e=>{switch(e){case Qe.app:return 1;case Qe.export:return 2;case Qe.editor:return 3;case Qe.tools:return 4;case Qe.elements:return 5;case Qe.links:return 6;default:return 10}},Wm=({shortcut:e,className:o,children:t})=>{let r=e.replace("++","+$").split("+");return _r("div",{className:$v("shortcut",o),children:[r.map((n,i)=>_t("div",{className:"shortcut-wrapper",children:_t("div",{className:"shortcut-key",children:n==="$"?"+":n})},n)),_t("div",{className:"shortcut-desc",children:t})]})},qv=e=>!e.altKey&&e[T.CTRL_OR_CMD]&&(e.shiftKey&&e.key.toLowerCase()===T.P||e.key===T.SLASH),_q=Object.assign(e=>{let o=Re(),t=ye();return Gm(()=>{let r=n=>{qv(n)&&(n.preventDefault(),n.stopPropagation(),t(i=>{let a=i.openDialog?.name==="commandPalette"?null:{name:"commandPalette"};return a&&pe("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:_t(Yk,{...e})},{defaultItems:Wg});function Yk({customCommandPaletteItems:e}){let o=dt(),t=Re(),r=ye(),n=Vt(),i=Et(),[a,l]=Ee(Vk),[s,c]=Um(null),m=jv(null),d=Sn({uiAppState:t,customCommandPaletteItems:e,appProps:n}),[p]=Ee(qr),h=Wk(()=>p.libraryItems?.filter(M=>!!M.name).map(M=>({label:M.name,icon:_t(Kk,{id:M.id,elements:M.elements}),category:"Library",order:Zv("Library"),haystack:Li(M.name),perform:()=>{o.onInsertElements(tl([M]))}}))||[],[o,p.libraryItems]);Gm(()=>{let{uiAppState:M,customCommandPaletteItems:F,appProps:R}=d,D=z=>{let H="";return z.label&&(typeof z.label=="function"?H=g(z.label(o.scene.getNonDeletedElements(),M,o)):H=g(z.label)),H},N=z=>typeof z.icon=="function"?z.icon(M,o.scene.getNonDeletedElements()):z.icon,Y=[],J=(z,H,V)=>{let ae={label:D(z),icon:N(z),category:H,shortcut:mt(z.name),keywords:z.keywords,predicate:z.predicate,viewMode:z.viewMode,perform:()=>{i.executeAction(z,"commandPalette")}};return V?V(ae,z):ae};if(M&&o.scene&&i){let z=[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.duplicateSelection,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,ks,Tm,N2].map(q=>J(q,Qe.elements,(ie,Fe)=>({...ie,predicate:Fe.predicate?Fe.predicate:(Tt,Nt,an,Zo)=>te(Tt,Nt).length>0}))),H=[i.actions.toggleHandTool,i.actions.setFrameAsActiveTool,i.actions.toggleLassoTool].map(q=>J(q,Qe.tools)),V=[i.actions.undo,i.actions.redo,i.actions.zoomIn,i.actions.zoomOut,i.actions.resetZoom,i.actions.zoomToFit,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(q=>J(q,Qe.editor)),ae=[i.actions.saveToActiveFile,i.actions.saveFileToDisk,i.actions.copyAsPng,i.actions.copyAsSvg].map(q=>J(q,Qe.export));Y=[...z,...V,{label:D($r),icon:N($r),shortcut:mt($r.name),category:Qe.editor,keywords:["delete","destroy"],viewMode:!1,perform:()=>{xt.set(Ai,"clearCanvas")}},{label:g("buttons.exportImage"),category:Qe.export,icon:_d,shortcut:mt("imageExport"),keywords:["export","image","png","jpeg","svg","clipboard","picture"],perform:()=>{r({openDialog:{name:"imageExport"}})}},...ae];let de=[{label:g("toolBar.library"),category:Qe.app,icon:kd,viewMode:!1,perform:()=>{M.openSidebar?r({openSidebar:null}):r({openSidebar:{name:Ht.name,tab:Ht.defaultTab}})}},{label:g("search.title"),category:Qe.app,icon:wo,viewMode:!0,perform:()=>{i.executeAction(Hs)}},{label:g("labels.shapeSwitch"),category:Qe.elements,icon:is,perform:()=>{i.executeAction(R2)}},{label:g("labels.changeStroke"),keywords:["color","outline"],category:Qe.elements,icon:Ad,viewMode:!1,predicate:(q,ie)=>{let Fe=te(q,ie);return Fe.length>0&&zs(ie,Fe)},perform:()=>{r(q=>({openPopup:"elementStroke"}))}},{label:g("labels.changeBackground"),keywords:["color","fill"],icon:Ad,category:Qe.elements,viewMode:!1,predicate:(q,ie)=>{let Fe=te(q,ie);return Fe.length>0&&Fs(ie,Fe)},perform:()=>{r(q=>({openPopup:"elementBackground"}))}},{label:g("labels.canvasBackground"),keywords:["color"],icon:Ad,category:Qe.editor,viewMode:!1,perform:()=>{r(q=>({openMenu:q.openMenu==="canvas"?null:"canvas",openPopup:"canvasBackground"}))}},...zm.reduce((q,ie)=>{let{value:Fe,icon:Tt,key:Nt,numericKey:an}=ie;if(R.UIOptions.tools?.[Fe]===!1)return q;let ln=Nt&&Se(typeof Nt=="string"?Nt:Nt[0])||an,Oi={label:g(`toolBar.${Fe}`),category:Qe.tools,shortcut:ln,icon:Tt,keywords:["toolbar"],viewMode:!1,perform:({event:Op})=>{Fe==="image"?o.setActiveTool({type:Fe}):o.setActiveTool({type:Fe})}};return q.push(Oi),q},[]),...H,{label:g("toolBar.lock"),category:Qe.tools,icon:M.activeTool.locked?ha:gi,shortcut:T.Q.toLocaleUpperCase(),viewMode:!1,perform:()=>{o.toggleLock()}},{label:`${g("labels.textToDiagram")}...`,category:Qe.tools,icon:DE,viewMode:!1,predicate:R.aiEnabled,perform:()=>{r(q=>({...q,openDialog:{name:"ttd",tab:"text-to-diagram"}}))}},{label:`${g("toolBar.mermaidToExcalidraw")}...`,category:Qe.tools,icon:Ia,viewMode:!1,predicate:R.aiEnabled,perform:()=>{r(q=>({...q,openDialog:{name:"ttd",tab:"mermaid"}}))}}],se=[...Y,...de,...F||[]].map(q=>({...q,icon:q.icon||is,order:q.order??Zv(q.category),haystack:`${Li(q.label.toLocaleLowerCase())} ${q.keywords?.join(" ")||""}`}));c(se),l([...se,...h].find(q=>q.label===a?.label)??null)}},[d,o,i,c,a?.label,l,r,h]);let[b,f]=Um(""),[y,v]=Um(null),[x,E]=Um({}),w=M=>{r({openDialog:null},M),f("")},I=(M,F)=>{t.openDialog?.name==="commandPalette"&&(F.stopPropagation(),F.preventDefault(),document.body.classList.add("excalidraw-animations-disabled"),w(()=>{M.perform({actionManager:i,event:F}),l(M),requestAnimationFrame(()=>{document.body.classList.remove("excalidraw-animations-disabled")})}))},S=Gg(M=>M.viewMode===!1&&(t.viewModeEnabled||t.hideAnnotations)?!1:typeof M.predicate=="function"?M.predicate(o.scene.getNonDeletedElements(),t,n,o):M.predicate===void 0||M.predicate),P=Gg(M=>{let F=ao(M.target)||qv(M)||M.key===T.ESCAPE;if(F&&M.key!==T.ARROW_UP&&M.key!==T.ARROW_DOWN&&M.key!==T.ENTER)return;let R=Object.values(x).flat(),D=a&&!b&&S(a);if(M.key===T.ARROW_UP){M.preventDefault();let N=R.findIndex(z=>z.label===y?.label);if(D){if(N===0){v(a);return}if(y===a){let z=R[R.length-1];z&&v(z);return}}let Y;N===-1?Y=R.length-1:Y=N===0?R.length-1:(N-1)%R.length;let J=R[Y];J&&v(J);return}if(M.key===T.ARROW_DOWN){M.preventDefault();let N=R.findIndex(z=>z.label===y?.label);if(D){if(!y||N===R.length-1){v(a);return}if(y===a){let z=R[0];z&&v(z);return}}let Y=(N+1)%R.length,J=R[Y];J&&v(J);return}if(M.key===T.ENTER&&y&&setTimeout(()=>{I(y,M)}),!F){if(M.stopPropagation(),/^[a-zA-Z0-9]$/.test(M.key)){m?.current?.focus();return}M.preventDefault()}});return Gm(()=>(window.addEventListener("keydown",P,{capture:!0}),()=>window.removeEventListener("keydown",P,{capture:!0})),[P]),Gm(()=>{if(!s)return;let M=N=>{let Y={};for(let J of N)Y[J.category]?Y[J.category].push(J):Y[J.category]=[J];return Y},F=b?.length>1?[...s.filter(S).sort((N,Y)=>N.order-Y.order),...h]:s.filter(S).sort((N,Y)=>N.order-Y.order),R=!b&&a&&S(a);if(!b){E(M(R?F.filter(N=>N.label!==a?.label):F)),v(R?a:F[0]||null);return}let D=Li(b.toLocaleLowerCase().replace(/[<>_| -]/g,""));F=Gk.filter(D,F,{extract:N=>N.haystack??""}).sort((N,Y)=>Y.score-N.score).map(N=>N.original),E(M(F)),v(F[0]??null)},[b,s,S,a,h]),_r(pt,{onCloseRequest:()=>w(),closeOnClickOutside:!0,title:!1,size:720,autofocus:!0,className:"command-palette-dialog",children:[_t(Bn,{value:b,placeholder:g("commandPalette.search.placeholder"),onChange:M=>{f(M)},selectOnRender:!0,ref:m}),o.editorInterface.formFactor!=="phone"&&_r("div",{className:"shortcuts-wrapper",children:[_t(Wm,{shortcut:"\u2191\u2193",children:g("commandPalette.shortcuts.select")}),_t(Wm,{shortcut:"\u21B5",children:g("commandPalette.shortcuts.confirm")}),_t(Wm,{shortcut:O("Esc"),children:g("commandPalette.shortcuts.close")})]}),_r("div",{className:"commands",children:[a&&!b&&_r("div",{className:"command-category",children:[_r("div",{className:"command-category-title",children:[g("commandPalette.recents"),_t("div",{className:"icon",style:{marginLeft:"6px"},children:RE})]}),_t(Xv,{command:a,isSelected:a.label===y?.label,onClick:M=>I(a,M),disabled:!S(a),onMouseMove:()=>v(a),showShortcut:o.editorInterface.formFactor!=="phone",appState:t})]}),Object.keys(x).length>0?Object.keys(x).map((M,F)=>_r("div",{className:"command-category",children:[_t("div",{className:"command-category-title",children:M}),x[M].map(R=>_t(Xv,{command:R,isSelected:R.label===y?.label,onClick:D=>I(R,D),onMouseMove:()=>v(R),showShortcut:o.editorInterface.formFactor!=="phone",appState:t,size:M==="Library"?"large":"small"},R.label))]},M)):s?_r("div",{className:"no-match",children:[_t("div",{className:"icon",children:wo})," ",g("commandPalette.search.noMatch")]}):null]})]})}var Kk=({id:e,elements:o})=>{let t=jv(null),{svgCache:r}=Qa();return Im(e,o,r,t),_t("div",{className:"library-item-icon",ref:t})},Xv=({command:e,isSelected:o,disabled:t,onMouseMove:r,onClick:n,showShortcut:i,appState:a,size:l="small"})=>{let s=()=>{};return _r("div",{className:$v("command-item",{"item-selected":o,"item-disabled":t,"command-item-large":l==="large"}),ref:c=>{o&&!t&&c?.scrollIntoView?.({block:"nearest"})},onClick:t?s:n,onMouseMove:t?s:r,title:t?g("commandPalette.itemNotAvailable"):"",children:[_r("div",{className:"name",children:[e.icon&&_t(Dn,{className:"icon",size:"var(--icon-size, 1rem)",icon:typeof e.icon=="function"?e.icon(a,[]):e.icon}),_t(gs,{children:e.label})]}),i&&e.shortcut&&_t(Wm,{shortcut:e.shortcut})]})};import{jsx as Jv}from"react/jsx-runtime";var ll=U({name:"toggleLinearEditor",category:Qe.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.selectedLinearElement?.isEditing&&n.length===1&&be(n[0])&&!Te(n[0]))},perform(e,o,t,r){let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0})[0];Xe(n,"No selected element found"),Xe(o.selectedLinearElement,"No selected linear element found"),Xe(n.id===o.selectedLinearElement.elementId,"Selected element ID and linear editor elementId does not match");let i={...o.selectedLinearElement,isEditing:!o.selectedLinearElement.isEditing};return{appState:{...o,selectedLinearElement:i},captureUpdate:_.IMMEDIATELY}},PanelComponent:({appState:e,updateData:o,app:t})=>{let r=t.scene.getSelectedElements({selectedElementIds:e.selectedElementIds})[0];if(!r)return null;let n=g(r.type==="arrow"?"labels.lineEditor.editArrow":"labels.lineEditor.edit");return Jv(j,{type:"button",icon:XE,title:n,"aria-label":n,onClick:()=>o(null)})}}),Yq=U({name:"togglePolygon",category:Qe.elements,icon:Zu,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=re(i);return{elements:e.map(s=>!l.has(s.id)||!Je(s)?s:ee(s,{backgroundColor:a?s.backgroundColor:"transparent",...od(s,a)})),appState:o,captureUpdate:_.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 Jv(Aa,{icon:Zu,title:i,"aria-label":i,active:n,onClick:()=>o(null),style:{marginLeft:"auto"}})}});var Hs=U({name:"searchMenu",icon:wo,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===Ht.name&&o.openSidebar.tab===Or){let n=r.excalidrawContainerValue.container?.querySelector(`.${tt.SEARCH_MENU_INPUT_WRAPPER} input`);return n?.focus(),n?.select(),!1}return{appState:{...o,openSidebar:{name:Ht.name,tab:Or},openDialog:null},captureUpdate:_.EVENTUALLY}},checked:e=>e.gridModeEnabled,predicate:(e,o,t)=>t.gridModeEnabled===void 0,keyTest:e=>e[T.CTRL_OR_CMD]&&e.key===T.F});import{jsx as Zk}from"react/jsx-runtime";var Vg=U({name:"cropEditor",label:"helpDialog.cropStart",icon:hh,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:_.IMMEDIATELY}},predicate:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);return!!(!o.croppingElementId&&n.length===1&&He(n[0]))},PanelComponent:({appState:e,updateData:o,app:t})=>{let r=g("helpDialog.cropStart");return Zk(j,{type:"button",icon:hh,title:r,"aria-label":r,onClick:()=>o(null)})}});var Qv=(e,o)=>{let t=o.scene.getSelectedElements(e);return t.length===1&&ne(t[0])},ew=U({name:"selectAllElementsInFrame",label:"labels.selectAllElementsInFrame",trackEvent:{category:"canvas"},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o).at(0)||null;if(ne(n)){let i=Do(Ie(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:_.IMMEDIATELY}}return{elements:e,appState:o,captureUpdate:_.EVENTUALLY}},predicate:(e,o,t,r)=>Qv(o,r)}),tw=U({name:"removeAllElementsFromFrame",label:"labels.removeAllElementsFromFrame",trackEvent:{category:"history"},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o).at(0)||null;return ne(n)?{elements:Qb(e,n),appState:{...o,selectedElementIds:{[n.id]:!0}},captureUpdate:_.IMMEDIATELY}:{elements:e,appState:o,captureUpdate:_.EVENTUALLY}},predicate:(e,o,t,r)=>Qv(o,r)}),eQ=U({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:_.EVENTUALLY}),checked:e=>e.frameRendering.enabled}),tQ=U({name:"setFrameAsActiveTool",label:"toolBar.frame",trackEvent:{category:"toolbar"},icon:or,viewMode:!1,perform:(e,o,t,r)=>{let n=Pe(o,{type:"frame"});return Co(r.interactiveCanvas,{...o,activeTool:n}),{elements:e,appState:{...o,activeTool:Pe(o,{type:"frame"})},captureUpdate:_.EVENTUALLY}},keyTest:e=>!e[T.CTRL_OR_CMD]&&!e.shiftKey&&!e.altKey&&e.key.toLocaleLowerCase()===T.F}),ow=U({name:"wrapSelectionInFrame",label:"labels.wrapSelectionInFrame",trackEvent:{category:"element"},predicate:(e,o,t,r)=>{let n=te(e,o);return n.length>0&&!n.some(i=>ne(i))},perform:(e,o,t,r)=>{let n=te(e,o),i=r.scene.getNonDeletedElementsMap(),[a,l,s,c]=Me(n,i),m=16,d=cd({x:a-m,y:l-m,width:s-a+m*2,height:c-l+m*2});if(o.editingGroupId){let h=Ye(n,o.editingGroupId);for(let b of h){let f=b.groupIds.indexOf(o.editingGroupId);Wt(b,i,{groupIds:b.groupIds.slice(0,f)})}}return{elements:Qi([...r.scene.getElementsIncludingDeleted(),d],n,d,o),appState:{selectedElementIds:{[d.id]:!0}},captureUpdate:_.IMMEDIATELY}}});var sl=class extends Xl{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)}},_i=class{constructor(o=!0,t=!0){this.isUndoStackEmpty=o;this.isRedoStackEmpty=t}},Us=class e{constructor(o){this.store=o;k(this,"onHistoryChangedEmitter",new yo);k(this,"undoStack",[]);k(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 sl)return;let t=sl.inverse(o);this.undoStack.push(t),t.elements.isEmpty()||(this.redoStack.length=0),this.onHistoryChangedEmitter.trigger(new _i(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=_.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),h=m0.create(l,p),b=sl.applyLatestChanges(i,d,s);b.isEmpty()||(this.store.scheduleMicroAction({action:a,change:h,delta:b}),i=b),l=p}finally{n(i)}if(m)break;i=r()}return[s,c]}finally{this.onHistoryChangedEmitter.trigger(new _i(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=sl.inverse(t);return o.push(r)}};import{useEffect as Xk,useState as $k}from"react";var Yg=(e,o)=>{let[t,r]=$k(o);return Xk(()=>{let n=e.on(i=>{r(i)});return()=>{n()}},[e]),t};import{jsx as aw}from"react/jsx-runtime";var rw=(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:_.EVENTUALLY};let[n,i]=r,a=id(Array.from(n.values()));return{appState:i,elements:a,captureUpdate:_.NEVER}}return{captureUpdate:_.EVENTUALLY}},nw=e=>({name:"undo",label:"buttons.undo",icon:qu,trackEvent:{category:"history"},viewMode:!1,perform:(o,t,r,n)=>rw(n,t,()=>e.undo(re(o),t)),keyTest:o=>o[T.CTRL_OR_CMD]&&Mc(o,T.Z)&&!o.shiftKey,PanelComponent:({appState:o,updateData:t,data:r,app:n})=>{let{isUndoStackEmpty:i}=Yg(e.onHistoryChangedEmitter,new _i(e.isUndoStackEmpty,e.isRedoStackEmpty)),a=Lt()==="mobile";return aw(j,{type:"button",icon:qu,"aria-label":g("buttons.undo"),onClick:t,size:r?.size||"medium",disabled:i,"data-testid":"button-undo",style:{...a?Br:{}}})}}),iw=e=>({name:"redo",label:"buttons.redo",icon:Ju,trackEvent:{category:"history"},viewMode:!1,perform:(o,t,r,n)=>rw(n,t,()=>e.redo(re(o),t)),keyTest:o=>o[T.CTRL_OR_CMD]&&o.shiftKey&&Mc(o,T.Z)||Sc&&o.ctrlKey&&!o.shiftKey&&Mc(o,T.Y),PanelComponent:({appState:o,updateData:t,data:r,app:n})=>{let{isRedoStackEmpty:i}=Yg(e.onHistoryChangedEmitter,new _i(e.isUndoStackEmpty,e.isRedoStackEmpty)),a=Lt()==="mobile";return aw(j,{type:"button",icon:Ju,"aria-label":g("buttons.redo"),onClick:t,size:r?.size||"medium",disabled:i,"data-testid":"button-redo",style:{...a?Br:{}}})}});var lw=U({name:"autoResize",label:"labels.autoResize",icon:null,trackEvent:{category:"element"},predicate:(e,o,t,r)=>{let n=te(e,o);return n.length===1&&X(n[0])&&!n[0].autoResize},perform:(e,o,t,r)=>{let n=te(e,o);return{appState:o,elements:e.map(i=>{if(i.id===n[0].id&&X(i)){let a=Gt(i.originalText,bt(i),i.lineHeight);return ee(i,{autoResize:!0,width:a.width,height:a.height,text:i.originalText})}return i}),captureUpdate:_.IMMEDIATELY}}});import{jsx as jk}from"react/jsx-runtime";var Kg=(e,o,t,r,n,i)=>{if(e.trackEvent)try{typeof e.trackEvent=="object"&&(!e.trackEvent.predicate||e.trackEvent.predicate(t,r,i))&&pe(e.trackEvent.category,e.trackEvent.action||e.name,`${o} (${n.editorInterface.formFactor==="phone"?"mobile":"desktop"})`)}catch(a){console.error("error while logging action:",a)}},Vm=class{constructor(o,t,r,n){k(this,"actions",{});k(this,"updater");k(this,"getAppState");k(this,"getElementsIncludingDeleted");k(this,"app");k(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=>{Kg(n,"ui",l,a,this.app,c),this.updater(n.perform(this.getElementsIncludingDeleted(),this.getAppState(),c,this.app))};return jk(i,{elements:this.getElementsIncludingDeleted(),appState:this.getAppState(),updateData:s,appProps:this.app.props,app:this.app,data:t,renderAction:this.renderAction})}return null});k(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(hn(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 Kg(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();Kg(o,t,i,n,this.app,r),this.updater(o.perform(n,i,r,this.app))}};var Ym=class{constructor(){k(this,"targets",new WeakMap);k(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 Zg=e=>{let o=Array.from(e.values());return{x:sw(o,t=>t.x)/o.length,y:sw(o,t=>t.y)/o.length}},Xg=([e,o])=>Math.hypot(e.x-o.x,e.y-o.y),sw=(e,o)=>e.reduce((t,r)=>t+o(r),0);var qk=8,cw=99999,Km=e=>qk/e,oo=class oo{};k(oo,"referenceSnapPoints",null),k(oo,"visibleGaps",null),k(oo,"setReferenceSnapPoints",o=>{oo.referenceSnapPoints=o}),k(oo,"getReferenceSnapPoints",()=>oo.referenceSnapPoints),k(oo,"setVisibleGaps",o=>{oo.visibleGaps=o}),k(oo,"getVisibleGaps",()=>oo.visibleGaps),k(oo,"destroy",()=>{oo.referenceSnapPoints=null,oo.visibleGaps=null});var Ho=oo,Fn=e=>e.props.gridModeEnabled??e.state.gridModeEnabled,en=({event:e,app:o,selectedElements:t})=>{if(e){let r=o.state.activeTool.type==="lasso"&&o.state.selectedElementsAreBeingDragged;return(o.state.activeTool.type!=="lasso"||r)&&(o.state.objectsSnapModeEnabled&&!e[T.CTRL_OR_CMD]||!o.state.objectsSnapModeEnabled&&e[T.CTRL_OR_CMD]&&!Fn(o))}return t.length===1&&t[0].type==="arrow"?!1:o.state.objectsSnapModeEnabled},Jk=(e,o,t=.01)=>Math.abs(e-o)<=t,Gs=(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]=Mt(a,o);n&&(l+=n.x,c+=n.x,d+=n.x,s+=n.y,m+=n.y,p+=n.y);let h=(c-l)/2,b=(m-s)/2;if((a.type==="diamond"||a.type==="ellipse")&&!r){let f=Ue(L(l,s+b),L(d,p),a.angle),y=Ue(L(l+h,s),L(d,p),a.angle),v=Ue(L(c,s+b),L(d,p),a.angle),x=Ue(L(l+h,m),L(d,p),a.angle),E=L(d,p);i=t?[f,y,v,x]:[f,y,v,x,E]}else{let f=Ue(L(l,s),L(d,p),a.angle),y=Ue(L(c,s),L(d,p),a.angle),v=Ue(L(l,m),L(d,p),a.angle),x=Ue(L(c,m),L(d,p),a.angle),E=L(d,p);i=t?[f,y,v,x]:[f,y,v,x,E]}}else if(e.length>1){let[a,l,s,c]=nd(e,n??{x:0,y:0}),m=s-a,d=c-l,p=L(a,l),h=L(s,l),b=L(a,c),f=L(s,c),y=L(a+m/2,l+d/2);i=t?[p,h,b,f]:[p,h,b,f,y]}return i.map(a=>L(rt(a[0]),rt(a[1])))},pw=(e,o,t,r)=>xu(e,o,t,r),uw=(e,o,t,r)=>{let n=pw(e,o,t,r),i=bu(n,r).filter(d=>!(d.length===1&&ot(d[0]))).map(d=>Me(d).map(p=>rt(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 h=d+1;h<a.length;h++){if(++s>cw)break e;let b=a[h],[,f,y,v]=p,[x,E,,w]=b;y<x&&wl(bo(f,v),bo(E,w))&&l.push({startBounds:p,endBounds:b,startSide:[L(y,f),L(y,v)],endSide:[L(x,E),L(x,w)],length:x-y,overlap:Tl(bo(f,v),bo(E,w))})}}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 h=d+1;h<c.length;h++){if(++s>cw)break e;let b=c[h],[f,,y,v]=p,[x,E,w]=b;v<E&&wl(bo(f,y),bo(x,w))&&m.push({startBounds:p,endBounds:b,startSide:[L(f,v),L(y,v)],endSide:[L(x,E),L(w,E)],length:E-v,overlap:Tl(bo(f,y),bo(x,w))})}}return{horizontalGaps:l,verticalGaps:m}},dw=(e,o,t,r,n,i,a)=>{if(!en({app:t,event:r,selectedElements:e}))return[];if(e.length===0)return[];let l=Ho.getVisibleGaps();if(l){let{horizontalGaps:s,verticalGaps:c}=l,[m,d,p,h]=nd(e,o).map(y=>rt(y)),b=(m+p)/2,f=(d+h)/2;for(let y of s){if(!wl(bo(d,h),y.overlap))continue;let v=y.startSide[0][0]+y.length/2,x=rt(v-b);if(y.length>p-m&&Math.abs(x)<=a.x){Math.abs(x)<a.x&&(n.length=0),a.x=Math.abs(x);let R={type:"gap",direction:"center_horizontal",gap:y,offset:x};n.push(R);continue}let[,,w]=y.endBounds,I=m-w,S=rt(y.length-I);if(Math.abs(S)<=a.x){Math.abs(S)<a.x&&(n.length=0),a.x=Math.abs(S);let R={type:"gap",direction:"side_right",gap:y,offset:S};n.push(R);continue}let[P,,,]=y.startBounds,M=P-p,F=rt(M-y.length);if(Math.abs(F)<=a.x){Math.abs(F)<a.x&&(n.length=0),a.x=Math.abs(F);let R={type:"gap",direction:"side_left",gap:y,offset:F};n.push(R);continue}}for(let y of c){if(!wl(bo(m,p),y.overlap))continue;let v=y.startSide[0][1]+y.length/2,x=rt(v-f);if(y.length>h-d&&Math.abs(x)<=a.y){Math.abs(x)<a.y&&(i.length=0),a.y=Math.abs(x);let R={type:"gap",direction:"center_vertical",gap:y,offset:x};i.push(R);continue}let[,w,,]=y.startBounds,I=w-h,S=rt(I-y.length);if(Math.abs(S)<=a.y){Math.abs(S)<a.y&&(i.length=0),a.y=Math.abs(S);let R={type:"gap",direction:"side_top",gap:y,offset:S};i.push(R);continue}let[,,,P]=y.endBounds,M=rt(d-P),F=y.length-M;if(Math.abs(F)<=a.y){Math.abs(F)<a.y&&(i.length=0),a.y=Math.abs(F);let R={type:"gap",direction:"side_bottom",gap:y,offset:F};i.push(R);continue}}}},hw=(e,o,t,r)=>{let n=pw(e,o,t,r);return bu(n,r).filter(i=>!(i.length===1&&ot(i[0]))).flatMap(i=>Gs(i,r))},cl=(e,o,t,r,n,i,a)=>{if(!en({app:t,event:r,selectedElements:e})||e.length===0&&o.length===0)return[];let l=Ho.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))}},gw=(e,o,t,r,n)=>{let i=t.state,a=te(e,i);if(!en({app:t,event:r,selectedElements:a})||a.length===0)return{snapOffset:{x:0,y:0},snapLines:[]};o.x=rt(o.x),o.y=rt(o.y);let l=[],s=[],c=Km(i.zoom.value),m={x:c,y:c},d=Gs(a,n,{dragOffset:o});cl(a,d,t,r,l,s,m),dw(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 h={x:rt(o.x+p.x),y:rt(o.y+p.y)};cl(a,Gs(a,n,{dragOffset:h}),t,r,l,s,m),dw(a,h,t,r,l,s,m);let b=$g(l,s),f=eS(a,h,[...l,...s].filter(y=>y.type==="gap"));return{snapOffset:p,snapLines:[...b,...f]}},rt=e=>Math.round(e*10**6)/10**6,mw=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())},$g=(e,o)=>{let t={},r={};if(e.length>0){for(let n of e)if(n.type==="point"){let i=rt(n.points[0][0]);t[i]||(t[i]=[]),t[i].push(...n.points.map(a=>L(rt(a[0]),rt(a[1]))))}}if(o.length>0){for(let n of o)if(n.type==="point"){let i=rt(n.points[0][1]);r[i]||(r[i]=[]),r[i].push(...n.points.map(a=>L(rt(a[0]),rt(a[1]))))}}return Object.entries(t).map(([n,i])=>({type:"points",points:mw(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:mw(i.map(a=>L(a[0],Number(n))).sort((a,l)=>a[0]-l[0]))})))},Qk=e=>{let o=new Map;for(let t of e){let r=t.points.flat().map(n=>[rt(n)]).join(",");o.has(r)||o.set(r,t)}return Array.from(o.values())},eS=(e,o,t)=>{let[r,n,i,a]=nd(e,o),l=[];for(let s of t){let[c,m,d,p]=s.gap.startBounds,[h,b,f,y]=s.gap.endBounds,v=Tl(bo(n,a),s.gap.overlap),x=Tl(bo(r,i),s.gap.overlap);switch(s.direction){case"center_horizontal":{if(v){let E=(v[0]+v[1])/2;l.push({type:"gap",direction:"horizontal",points:[L(s.gap.startSide[0][0],E),L(r,E)]},{type:"gap",direction:"horizontal",points:[L(i,E),L(s.gap.endSide[0][0],E)]})}break}case"center_vertical":{if(x){let E=(x[0]+x[1])/2;l.push({type:"gap",direction:"vertical",points:[L(E,s.gap.startSide[0][1]),L(E,n)]},{type:"gap",direction:"vertical",points:[L(E,a),L(E,s.gap.endSide[0][1])]})}break}case"side_right":{if(v){let E=(v[0]+v[1])/2;l.push({type:"gap",direction:"horizontal",points:[L(d,E),L(h,E)]},{type:"gap",direction:"horizontal",points:[L(f,E),L(r,E)]})}break}case"side_left":{if(v){let E=(v[0]+v[1])/2;l.push({type:"gap",direction:"horizontal",points:[L(i,E),L(c,E)]},{type:"gap",direction:"horizontal",points:[L(d,E),L(h,E)]})}break}case"side_top":{if(x){let E=(x[0]+x[1])/2;l.push({type:"gap",direction:"vertical",points:[L(E,a),L(E,m)]},{type:"gap",direction:"vertical",points:[L(E,p),L(E,b)]})}break}case"side_bottom":{if(x){let E=(x[0]+x[1])/2;l.push({type:"gap",direction:"vertical",points:[L(E,p),L(E,b)]},{type:"gap",direction:"vertical",points:[L(E,y),L(E,n)]})}break}}}return Qk(l.map(s=>({...s,points:s.points.map(c=>L(rt(c[0]),rt(c[1])))})))},jg=(e,o,t,r,n,i)=>{if(!en({event:r,selectedElements:e,app:t})||e.length===0||e.length===1&&!Jk(e[0].angle,0))return{snapOffset:{x:0,y:0},snapLines:[]};let[a,l,s,c]=Me(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=Km(t.state.zoom.value),p={x:d,y:d},h=[],b=[];cl(o,m,t,r,h,b,p);let f={x:h[0]?.offset??0,y:b[0]?.offset??0};p.x=0,p.y=0,h.length=0,b.length=0;let[y,v,x,E]=Me(e).map(S=>rt(S)),w=[L(y,v),L(y,E),L(x,v),L(x,E)];cl(e,w,t,r,h,b,p);let I=$g(h,b);return{snapOffset:f,snapLines:I}},fw=(e,o,t,r,n,i)=>{if(!en({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=Km(o.state.zoom.value),s={x:l,y:l},c=[],m=[];cl([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=Gs([e],i,{boundingBoxCorners:!0,omitCenter:!0});cl([e],p,o,t,c,m,s);let h=$g(c,m);return{snapOffset:d,snapLines:h}},bw=(e,o,t,r,n)=>{if(!en({event:r,selectedElements:[],app:o}))return{originOffset:{x:0,y:0},snapLines:[]};let i=xu(e,[],o.state,n),a=Km(o.state.zoom.value),l={x:a,y:a},s=[],c=[];for(let m of i){let d=Gs([m],n);for(let p of d){let h=p[0]-t.x;Math.abs(h)<=Math.abs(l.x)&&(Math.abs(h)<Math.abs(l.x)&&(c.length=0),c.push({type:"pointer",points:[p,L(p[0],t.y)],direction:"vertical"}),l.x=h);let b=p[1]-t.y;Math.abs(b)<=Math.abs(l.y)&&(Math.abs(b)<Math.abs(l.y)&&(s.length=0),s.push({type:"pointer",points:[p,L(t.x,p[1])],direction:"horizontal"}),l.y=b)}}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]}},xw=e=>e===lt.rectangle||e===lt.ellipse||e===lt.diamond||e===lt.frame||e===lt.magicframe||e===lt.image||e===lt.text;var Ws=class{constructor(o){k(this,"scene");k(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())Zl(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=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 mb(({zoom:r,offsetLeft:n,offsetTop:i,scrollX:a,scrollY:l,height:s,width:c,editingTextElement:m,newElementId:d,sceneNonce:p,hideAnnotations:h})=>{let b=this.scene.getNonDeletedElements(),f=h?b.filter(x=>x.customData?.alwaysVisible===!0):b,y=t({elements:f,editingTextElement:m,newElementId:d}),v=o({elementsMap:y,zoom:r,offsetLeft:n,offsetTop:i,scrollX:a,scrollY:l,height:s,width:c});return{elementsMap:y,visibleElements:v}})})());this.scene=o}destroy(){X0.cancel(),this.getRenderableElements.clear()}};import{jsx as rS}from"react/jsx-runtime";var tS=5,oS=(e,o,t)=>{let[r,n]=Mt(e,t),{x:i,y:a}=Ct({sceneX:r+e.width,sceneY:n},o),l=i-o.offsetLeft+10,s=a-o.offsetTop;return{x:l,y:s}},qg=({children:e,element:o,elementsMap:t})=>{let r=Cr();if(r.contextMenu||r.newElement||r.resizingElement||r.isRotating||r.openMenu||r.viewModeEnabled||r.hideAnnotations)return null;let{x:n,y:i}=oS(o,r,t);return rS("div",{className:"excalidraw-canvas-buttons",style:{top:`${i}px`,left:`${n}px`,padding:tS},children:e})};import{LaserPointer as nS}from"@excalidraw/laser-pointer";var tn=class{constructor(o,t,r){this.animationFrameHandler=o;this.app=t;this.options=r;k(this,"currentTrail");k(this,"pastTrails",[]);k(this,"container");k(this,"trailElement");k(this,"trailAnimation");this.animationFrameHandler.register(this,this.onFrame.bind(this)),this.trailElement=document.createElementNS(qp,"path"),this.options.animateTrail&&(this.trailAnimation=document.createElementNS(qp,"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 nS(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=Ct({sceneX:i,sceneY:a},t);return[l.x,l.y]}),n=this.trailAnimation?r.slice(0,r.length/2):r;return pb(n,!0)}};var Zm=class{constructor(o,t){this.animationFrameHandler=o;this.app=t;k(this,"localTrail");k(this,"collabTrails",new Map);k(this,"container");this.animationFrameHandler.register(this,this.onFrame.bind(this)),this.localTrail=new tn(o,t,{...this.getTrailOptions(),fill:()=>Vp})}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(Xo(i),Xo(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 tn(this.animationFrameHandler,this.app,{...this.getTrailOptions(),fill:()=>t.pointer?.laserColor||Mi(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 iS}from"react";import{unstable_batchedUpdates as Ew}from"react-dom";var nt=e=>o=>{Ew(e,o)},Xm=e=>Lc(o=>{Ew(e,o)}),Pi=(()=>{let e;try{let t=iS.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 aS=(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)`},yw=({id:e,onChange:o,onSubmit:t,getViewportCoords:r,element:n,canvas:i,excalidrawContainer:a,app:l,autoSelect:s=!0})=>{let c=(z,H)=>{if(!H.style.fontFamily||!H.style.fontSize)return!1;let V=H.style.fontFamily.replace(/"/g,"");return ti({fontFamily:z.fontFamily})!==V||`${z.fontSize}px`!==H.style.fontSize},m=()=>{let z=l.state,H=l.scene.getElement(e);if(!H)return;let{textAlign:V,verticalAlign:ae}=H,de=l.scene.getNonDeletedElementsMap();if(H&&X(H)){let se=H.x,q=H.y,ie=_o(H,l.scene.getNonDeletedElementsMap()),Fe=H.width,Tt=H.height,Nt=H.width,an=H.height;if(ie&&H.containerId){if(Ce(ie)){let sn=Z.getBoundTextElementPosition(ie,H,de);se=sn.x,q=sn.y}let yT=c(H,d),yl;if(yT?yl=Bl(ie.id,ie.height):(yl=Ib[ie.id],yl||(yl=Bl(ie.id,ie.height))),Nt=Hl(ie,H),an=Gc(ie,H),!Ce(ie)&&Tt>an){let sn=Zi(Tt,ie.type);l.scene.mutateElement(ie,{height:sn});return}else if(!Ce(ie)&&ie.height>yl.height&&Tt<an){let sn=Zi(Tt,ie.type);l.scene.mutateElement(ie,{height:sn})}else{let{x:sn,y:vT}=xn(ie,H,de);se=sn,q=vT}}let[Zo,ln]=r(se,q);ie?Fe+=.5:(Nt=(z.width-8-Zo)/z.zoom.value,Fe=Math.min(Fe,Nt)),Tt*=1.05;let Oi=bt(H),Op=(z.height-ln)/z.zoom.value;Object.assign(d.style,{font:Oi,lineHeight:H.lineHeight,width:`${Fe}px`,height:`${Tt}px`,left:`${Zo}px`,top:`${ln}px`,transform:aS(Fe,Tt,Rb(H,ie),z,Nt,Op),textAlign:V,verticalAlign:ae,color:z.theme===oe.DARK?pc(H.strokeColor):H.strokeColor,opacity:H.opacity/100,maxHeight:`${Op}px`}),d.scrollTop=0,Hr()&&(d.style.fontFamily=ti(H)),l.scene.mutateElement(H,{x:se,y:q})}},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",h="normal";(ot(n)||!n.autoResize)&&(p="pre-wrap",h="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:h,whiteSpace:p,overflowWrap:"break-word",boxSizing:"content-box"}),d.value=n.originalText,m(),o&&(d.onpaste=async z=>{let H=(await Ts(z)).findByType(he.text);if(!H)return;let V=zl(H.value);if(!V)return;let ae=_o(n,l.scene.getNonDeletedElementsMap()),de=bt({fontSize:l.state.currentItemFontSize,fontFamily:l.state.currentItemFontFamily});if(ae){let se=xe(ae,l.scene.getNonDeletedElementsMap()),q=Ki(`${d.value}${V}`,de,Hl(ae,se)),ie=Pb(q,de);d.style.width=`${ie}px`}},d.oninput=()=>{let z=zl(d.value);if(d.value!==z){let H=d.selectionStart;d.value=z,d.selectionStart=H,d.selectionEnd=H}o(d.value)}),d.onkeydown=z=>{if(!z.shiftKey&&nm.keyTest(z))z.preventDefault(),l.actionManager.executeAction(nm),m();else if(!z.shiftKey&&im.keyTest(z))z.preventDefault(),l.actionManager.executeAction(im),m();else if(!z.shiftKey&&am.keyTest(z))z.preventDefault(),l.actionManager.executeAction(am),m();else if(Yh.keyTest(z))l.actionManager.executeAction(Yh);else if(Kh.keyTest(z))l.actionManager.executeAction(Kh);else if(z.key===T.ESCAPE)z.preventDefault(),I=!0,S();else if(ki.keyTest(z))z.preventDefault(),S(),l.actionManager.executeAction(ki);else if(z.key===T.ENTER&&z[T.CTRL_OR_CMD]){if(z.preventDefault(),z.isComposing||z.keyCode===229)return;I=!0,S()}else if(z.key===T.TAB||z[T.CTRL_OR_CMD]&&(z.code===ue.BRACKET_LEFT||z.code===ue.BRACKET_RIGHT)){if(z.preventDefault(),z.isComposing)return;z.shiftKey||z.code===ue.BRACKET_LEFT?x():v(),d.dispatchEvent(new Event("input"))}};let b=4,f=" ".repeat(b),y=new RegExp(`^ {1,${b}}`),v=()=>{let{selectionStart:z,selectionEnd:H}=d,V=E(),ae=d.value;V.forEach(de=>{let se=ae.slice(0,de),q=ae.slice(de);ae=`${se}${f}${q}`}),d.value=ae,d.selectionStart=z+b,d.selectionEnd=H+b*V.length},x=()=>{let{selectionStart:z,selectionEnd:H}=d,V=E(),ae=[],de=d.value;V.forEach(se=>{let q=de.slice(se,se+b).match(y);if(q){let ie=de.slice(0,se),Fe=de.slice(se+q[0].length);de=`${ie}${Fe}`,ae.push(se)}}),d.value=de,ae.length&&(z>ae[ae.length-1]?d.selectionStart=Math.max(z-b,ae[ae.length-1]):d.selectionStart=z,d.selectionEnd=Math.max(d.selectionStart,H-b*ae.length))},E=()=>{let{selectionStart:z,selectionEnd:H,value:V}=d,ae=V.slice(0,z).match(/[^\n]*$/)[0].length;return z=z-ae,V.slice(z,H).split(`
|