@haoxin-web/excalidraw 1.0.2 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- import{$ as N1,A as zm,B as T1,C as I1,D as C1,E as os,F as pa,G as rs,H as ns,I as S1,J as k1,K as ua,L as M1,M as L1,N as P1,O as A1,P as is,Q as Dn,R as _1,S as FC,T as Hm,U as OC,V as Rn,W as ha,Y as D1,_ as R1,a as E1,aa as as,b as Jr,ba as B1,c as wo,ca as Gm,d as y1,da as Um,e as ye,ea as ls,f as w1,fa as F1,g as q,ga as Ym,h as Ql,ha as zo,i as lr,ia as O1,j as Dm,ja as Wm,k as Rm,ka as z1,l as Pn,la as H1,m as Nm,ma as ss,n as An,na as Vm,o as v1,oa as G1,p as Bm,pa as U1,q as sr,qa as Y1,r as cr,ra as cs,s as It,t as Oo,u as _n,v as es,w as Fm,x as ma,y as ts,z as Om}from"./chunk-2BSXP2T3.js";import{a as T}from"./chunk-T5E2FHQC.js";import{J as _m}from"./chunk-LUHP3LHA.js";import{c as x1}from"./chunk-Z3N5DIM6.js";import{b as f1,c as b1,d as C}from"./chunk-SRAX5OIU.js";import NU,{useEffect as BU}from"react";import{DEFAULT_UI_OPTIONS as LC,isShallowEqual as FU}from"@haoxin-web/excalidraw-common";import sI from"clsx";import gH from"lodash.throttle";import Fo,{useContext as jr}from"react";import{flushSync as na}from"react-dom";import fH from"roughjs/bin/rough";import{nanoid as bH}from"nanoid";import{clamp as cI,pointFrom as ae,pointDistance as Vr,vector as dI,pointRotateRads as wf,vectorScale as xH,vectorFromPoint as vf,vectorSubtract as mI,vectorDot as pI,vectorNormalize as uI}from"@haoxin-web/excalidraw-math";import{COLOR_PALETTE as EH,CODES as hI,shouldResizeFromCenter as gI,shouldMaintainAspectRatio as Nl,shouldRotateWithDiscreteAngle as Tf,isArrowKey as xm,KEYS as X,APP_NAME as yH,CURSOR_TYPE as Be,DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT as wH,DEFAULT_VERTICAL_ALIGN as fI,DRAGGING_THRESHOLD as vH,ELEMENT_SHIFT_TRANSLATE_AMOUNT as TH,ELEMENT_TRANSLATE_AMOUNT as bI,EVENT as oe,FRAME_STYLE as Xr,IMAGE_MIME_TYPES as IH,IMAGE_RENDER_TIMEOUT as CH,isBrave as SH,LINE_CONFIRM_THRESHOLD as If,MAX_ALLOWED_FILE_BYTES as xI,MIME_TYPES as rr,MQ_MAX_HEIGHT_LANDSCAPE as kH,MQ_MAX_WIDTH_LANDSCAPE as MH,MQ_MAX_WIDTH_PORTRAIT as LH,MQ_RIGHT_SIDEBAR_MIN_WIDTH as PH,POINTER_BUTTON as In,ROUNDNESS as Em,SCROLL_TIMEOUT as AH,TAP_TWICE_TIMEOUT as _H,TEXT_TO_CENTER_SNAP_THRESHOLD as DH,THEME as ym,THEME_FILTER as RH,TOUCH_CTX_MENU_TIMEOUT as NH,VERTICAL_ALIGN as BH,YOUTUBE_STATES as wm,ZOOM_STEP as FH,POINTER_EVENTS as ia,TOOL_TYPE as Bo,isIOS as OH,supportsResizeObserver as EI,DEFAULT_COLLISION_THRESHOLD as yI,DEFAULT_TEXT_ALIGN as zH,ARROW_TYPE as Kr,DEFAULT_REDUCED_GLOBAL_ALPHA as HH,isSafari as GH,isLocalLink as UH,normalizeLink as Cf,toValidURL as YH,getGridPoint as lt,getLineHeight as wI,debounce as vI,distance as aa,getFontString as Sf,getNearestScrollableContainer as WH,isInputLike as TI,isToolIcon as VH,isWritableElement as Bl,sceneCoordsToViewportCoords as vm,tupleToCoors as kf,viewportCoordsToSceneCoords as Ye,wrapEvent as XH,updateObject as Mf,updateActiveTool as nr,getShortcutKey as KH,isTransparent as $H,easeToValuesRAF as ZH,muteFSAbortError as jH,isTestEnv as qf,isDevEnv as lC,easeOut as qH,updateStable as Fl,addEventListener as Fe,normalizeEOL as JH,getDateTime as II,isShallowEqual as QH,arrayToMap as Tm,randomInteger as eG,CLASSES as tG,Emitter as Cn,isMobile as oG,MINIMUM_ARROW_SIZE as CI,DOUBLE_TAP_POSITION_THRESHOLD as rG}from"@haoxin-web/excalidraw-common";import{getObservedAppState as nG,getCommonBounds as la,maybeSuggestBindingsForLinearElementAtCoords as SI,getElementAbsoluteCoords as kI,bindOrUnbindLinearElements as MI,fixBindingsAfterDeletion as iG,getHoveredElementForBinding as Lf,isBindingEnabled as Pf,shouldEnableBindingForPointerEvent as aG,updateBoundElements as Af,getSuggestedBindingsForArrows as _f,LinearElementEditor as Le,newElementWith as $r,newFrameElement as lG,newFreeDrawElement as sG,newEmbeddableElement as LI,newMagicFrameElement as PI,newIframeElement as cG,newArrowElement as dG,newElement as mG,newImageElement as pG,newLinearElement as uG,newTextElement as AI,refreshTextDimensions as hG,deepCopyElement as _I,duplicateElements as DI,hasBoundTextElement as RI,isArrowElement as Df,isBindingElement as Rf,isBindingElementType as NI,isBoundToContainer as Nf,isFrameLikeElement as _t,isImageElement as Sn,isEmbeddableElement as ir,isInitializedImageElement as Ol,isLinearElement as oo,isLinearElementType as gG,isUsingAdaptiveRadius as fG,isIframeElement as sa,isIframeLikeElement as zl,isMagicFrameElement as Bf,isTextBindableContainer as BI,isElbowArrow as je,isFlowchartNodeElement as bG,isBindableElement as xG,isTextElement as yo,getLockedLinearCursorAlignSize as FI,getNormalizedDimensions as EG,isElementCompletelyInViewport as Ff,isElementInViewport as OI,isInvisiblySmallElement as zI,getCornerRadius as yG,isPathALoop as HI,createSrcDoc as GI,embeddableURLValidator as Of,maybeParseEmbedSrc as wG,getEmbedLink as Im,getInitializedImageElements as vG,normalizeSVG as UI,updateImageCache as TG,getBoundTextElement as zf,getContainerCenter as Hf,getContainerElement as YI,isValidTextContainer as IG,redrawTextBoundingBox as CG,shouldShowBoundingBox as SG,getFrameChildren as Gf,isCursorInFrame as WI,addElementsToFrame as Uf,replaceAllElementsInFrame as kG,removeElementsFromFrame as MG,getElementsInResizingFrame as Yf,getElementsInNewFrame as LG,getContainingFrame as Wf,elementOverlapsWithFrame as PG,updateFrameMembershipOfSelectedElements as VI,isElementInFrame as XI,getFrameLikeTitle as AG,getElementsOverlappingFrame as _G,filterElementsEligibleAsFrameChildren as DG,hitElementBoundText as RG,hitElementBoundingBoxOnly as NG,hitElementItself as Hl,getVisibleSceneBounds as BG,FlowChartCreator as FG,FlowChartNavigator as OG,getLinkDirectionFromKey as KI,cropElement as zG,wrapText as HG,isElementLink as Vf,parseElementLinkFromURL as GG,isMeasureTextSupported as UG,normalizeText as YG,measureText as $I,getLineHeightInPx as WG,getApproxMinLineWidth as VG,getApproxMinLineHeight as XG,getMinTextElementWidth as KG,ShapeCache as Gl,getRenderOpacity as $G,editGroupForSelectedElement as ZG,getElementsInGroup as kn,getSelectedGroupIdForElement as jG,getSelectedGroupIds as qG,isElementInGroup as ZI,isSelectedViaGroup as JG,selectGroupsForSelectedElements as ro,syncInvalidIndices as sC,syncMovedIndices as jI,excludeElementsInFramesFromSelection as QG,getSelectionStateForElements as eU,makeNextSelectedElementIds as ve,getResizeOffsetXY as tU,getResizeArrowDirection as oU,transformElements as rU,getCursorForResizingElement as qI,getElementWithTransformHandleType as JI,getTransformHandleTypeFromCoords as QI,dragNewElement as eC,dragSelectedElements as nU,getDragOffsetXY as iU,isNonDeletedElement as tC,Scene as oC,Store as aU,CaptureUpdateAction as Tt,hitElementBoundingBox as lU,isLineElement as Xf,isSimpleArrow as sU,StoreDelta as rC,positionElementsOnGrid as nC}from"@haoxin-web/excalidraw-element";import{KEYS as gp,updateActiveTool as JC}from"@haoxin-web/excalidraw-common";import{getNonDeletedElements as fp}from"@haoxin-web/excalidraw-element";import{fixBindingsAfterDeletion as QC}from"@haoxin-web/excalidraw-element";import{LinearElementEditor as Rb}from"@haoxin-web/excalidraw-element";import{newElementWith as Hs}from"@haoxin-web/excalidraw-element";import{getContainerElement as Nb}from"@haoxin-web/excalidraw-element";import{isBoundToContainer as Os,isElbowArrow as eS,isFrameLikeElement as tS}from"@haoxin-web/excalidraw-element";import{getFrameChildren as oS}from"@haoxin-web/excalidraw-element";import{getElementsInGroup as bp,selectGroupsForSelectedElements as rS}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as zs}from"@haoxin-web/excalidraw-element";import{isDevEnv as UC}from"@haoxin-web/excalidraw-common";import{atom as he,createStore as zC}from"jotai";import{createIsolation as HC}from"jotai-scope";var W1=HC();var{useAtom:ce,useSetAtom:dr,useAtomValue:ds,useStore:YU}=W1,V1=W1.Provider,Ve=zC();var GC=f1({"./locales/ar-SA.json":()=>import("./locales/ar-SA-G6X2FPQ2.js"),"./locales/az-AZ.json":()=>import("./locales/az-AZ-76LH7QW2.js"),"./locales/bg-BG.json":()=>import("./locales/bg-BG-XCXSNQG7.js"),"./locales/bn-BD.json":()=>import("./locales/bn-BD-2XOGV67Q.js"),"./locales/ca-ES.json":()=>import("./locales/ca-ES-6MX7JW3Y.js"),"./locales/cs-CZ.json":()=>import("./locales/cs-CZ-2BRQDIVT.js"),"./locales/da-DK.json":()=>import("./locales/da-DK-5WZEPLOC.js"),"./locales/de-DE.json":()=>import("./locales/de-DE-XR44H4JA.js"),"./locales/el-GR.json":()=>import("./locales/el-GR-BZB4AONW.js"),"./locales/en.json":()=>import("./locales/en-45K2M6JH.js"),"./locales/es-ES.json":()=>import("./locales/es-ES-U4NZUMDT.js"),"./locales/eu-ES.json":()=>import("./locales/eu-ES-A7QVB2H4.js"),"./locales/fa-IR.json":()=>import("./locales/fa-IR-HGAKTJCU.js"),"./locales/fi-FI.json":()=>import("./locales/fi-FI-Z5N7JZ37.js"),"./locales/fr-FR.json":()=>import("./locales/fr-FR-RHASNOE6.js"),"./locales/gl-ES.json":()=>import("./locales/gl-ES-HMX3MZ6V.js"),"./locales/he-IL.json":()=>import("./locales/he-IL-6SHJWFNN.js"),"./locales/hi-IN.json":()=>import("./locales/hi-IN-IWLTKZ5I.js"),"./locales/hu-HU.json":()=>import("./locales/hu-HU-A5ZG7DT2.js"),"./locales/id-ID.json":()=>import("./locales/id-ID-SAP4L64H.js"),"./locales/it-IT.json":()=>import("./locales/it-IT-JPQ66NNP.js"),"./locales/ja-JP.json":()=>import("./locales/ja-JP-DBVTYXUO.js"),"./locales/kaa.json":()=>import("./locales/kaa-6HZHGXH3.js"),"./locales/kab-KAB.json":()=>import("./locales/kab-KAB-ZGHBKWFO.js"),"./locales/kk-KZ.json":()=>import("./locales/kk-KZ-P5N5QNE5.js"),"./locales/km-KH.json":()=>import("./locales/km-KH-HSX4SM5Z.js"),"./locales/ko-KR.json":()=>import("./locales/ko-KR-MTYHY66A.js"),"./locales/ku-TR.json":()=>import("./locales/ku-TR-6OUDTVRD.js"),"./locales/lt-LT.json":()=>import("./locales/lt-LT-XHIRWOB4.js"),"./locales/lv-LV.json":()=>import("./locales/lv-LV-5QDEKY6T.js"),"./locales/mr-IN.json":()=>import("./locales/mr-IN-CRQNXWMA.js"),"./locales/my-MM.json":()=>import("./locales/my-MM-5M5IBNSE.js"),"./locales/nb-NO.json":()=>import("./locales/nb-NO-T6EIAALU.js"),"./locales/nl-NL.json":()=>import("./locales/nl-NL-IS3SIHDZ.js"),"./locales/nn-NO.json":()=>import("./locales/nn-NO-6E72VCQL.js"),"./locales/oc-FR.json":()=>import("./locales/oc-FR-POXYY2M6.js"),"./locales/pa-IN.json":()=>import("./locales/pa-IN-N4M65BXN.js"),"./locales/percentages.json":()=>import("./locales/percentages-BXMCSKIN.js"),"./locales/pl-PL.json":()=>import("./locales/pl-PL-T2D74RX3.js"),"./locales/pt-BR.json":()=>import("./locales/pt-BR-5N22H2LF.js"),"./locales/pt-PT.json":()=>import("./locales/pt-PT-UZXXM6DQ.js"),"./locales/ro-RO.json":()=>import("./locales/ro-RO-JPDTUUEW.js"),"./locales/ru-RU.json":()=>import("./locales/ru-RU-B4JR7IUQ.js"),"./locales/si-LK.json":()=>import("./locales/si-LK-N5RQ5JYF.js"),"./locales/sk-SK.json":()=>import("./locales/sk-SK-C5VTKIMK.js"),"./locales/sl-SI.json":()=>import("./locales/sl-SI-NN7IZMDC.js"),"./locales/sv-SE.json":()=>import("./locales/sv-SE-XGPEYMSR.js"),"./locales/ta-IN.json":()=>import("./locales/ta-IN-2NMHFXQM.js"),"./locales/th-TH.json":()=>import("./locales/th-TH-HPSO5L25.js"),"./locales/tr-TR.json":()=>import("./locales/tr-TR-DEFEU3FU.js"),"./locales/uk-UA.json":()=>import("./locales/uk-UA-QMV73CPH.js"),"./locales/vi-VN.json":()=>import("./locales/vi-VN-M7AON7JQ.js"),"./locales/zh-CN.json":()=>import("./locales/zh-CN-WHMBMDLP.js"),"./locales/zh-HK.json":()=>import("./locales/zh-HK-E62DVLB3.js"),"./locales/zh-TW.json":()=>import("./locales/zh-TW-RAJ6MFWO.js")});var YC=85,vo={code:"en",label:"English"},Bn=[vo,...[{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=>x1[e.code]>=YC).sort((e,o)=>e.label>o.label?1:-1)],ps="__test__";UC()&&Bn.unshift({code:ps,label:"test language"},{code:`${ps}.rtl`,label:"\u202Atest language (rtl)\u202C",rtl:!0});var Nn=vo,ms={},us=async e=>{if(Nn=e,document.documentElement.dir=Nn.rtl?"rtl":"ltr",document.documentElement.lang=Nn.code,e.code.startsWith(ps))ms={};else try{ms=await GC(`./locales/${Nn.code}.json`)}catch(o){console.error(`Failed to load language ${e.code}:`,o.message),ms=_m}Ve.set(K1,e.code)},Ho=()=>Nn,X1=(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(Nn.code.startsWith(ps))return`\u202A[[${o?`${e}(${JSON.stringify(o).slice(1,-1)})`:e}]]\u202C`;let r=e.split("."),n=X1(ms,r)||X1(_m,r)||t;if(n===void 0){let i=`Can't find translation for ${e}`;if(T.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},K1=he(vo.code),We=()=>{let e=ds(K1);return{t:g,langCode:e}};import WC from"clsx";import VC from"open-color";import rt from"react";import{THEME as XC}from"@haoxin-web/excalidraw-common";import{Fragment as xe,jsx as h,jsxs as D}from"react/jsx-runtime";var io=e=>"var(--icon-fill-color)",$1=e=>e===XC.LIGHT?VC.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 h("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${t} ${r}`,className:WC({"rtl-mirror":n}),style:i,...a,children:typeof e=="string"?h("path",{fill:"currentColor",d:e}):e})},H={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},ee={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},iY=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("rect",{x:3,y:8,width:18,height:4,rx:1}),h("line",{x1:12,y1:8,x2:12,y2:21}),h("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),h("path",{d:"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5"})]}),H),Fn=A(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),h("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),h("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),h("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),h("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),H),Z1=A(D("svg",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),h("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),H),j1=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"1"}),h("circle",{cx:"12",cy:"19",r:"1"}),h("circle",{cx:"12",cy:"5",r:"1"})]}),H),q1=A(D("svg",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),h("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),h("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),H),Xm=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M6.5 9.5l3.5 -3"}),h("path",{d:"M14 5.5l3 1.5"}),h("path",{d:"M18.5 10l-2.5 7"}),h("path",{d:"M13.5 17.5l-7 -5"})]}),H),Qr=A(D("g",{children:[h("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z",stroke:"currentColor",strokeWidth:"1.25"}),h("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z",stroke:"currentColor",strokeWidth:"1.25"}),h("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:h("path",{stroke:"none",d:"M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481",fill:"#fff"})}),h("g",{mask:"url(#UnlockedIcon)",children:h("path",{stroke:"none",d:"M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z",fill:"currentColor"})})]}),ee),On=A(D("g",{strokeWidth:"1.25",children:[h("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z"}),h("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),h("path",{d:"M6.667 8.333V5.417C6.667 3.806 8.159 2.5 10 2.5c1.841 0 3.333 1.306 3.333 2.917v2.916"})]}),ee),J1=A(h("g",{fill:"currentColor",children:h("path",{d:"M12 2a5 5 0 0 1 5 5v3a3 3 0 0 1 3 3v6a3 3 0 0 1 -3 3h-10a3 3 0 0 1 -3 -3v-6a3 3 0 0 1 3 -3v-3a5 5 0 0 1 5 -5m0 12a2 2 0 0 0 -1.995 1.85l-.005 .15a2 2 0 1 0 2 -2m0 -10a3 3 0 0 0 -3 3v3h6v-3a3 3 0 0 0 -3 -3"})}),{width:24,height:24}),Q1=A(D(xe,{children:[h("path",{d:"M38.5 83.5c-14-2-17.833-10.473-21-22.5C14.333 48.984 12 22 12 12.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),h("path",{d:"M12.005 10.478c1.92 3.495 3.838 7 7.905 14.423m-7.905-14.423c3.11 5.683 6.23 11.368 7.905 14.423m0 0c-3.68.226-7.35.455-13.91.85m13.91-.85c-5.279.33-10.566.647-13.91.85m0 0c1.936-4.931 3.882-9.86 6.005-15.273M6 25.75c2.069-5.257 4.135-10.505 6.005-15.272",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:41,height:94,fill:"none"}),e0=A(D(xe,{children:[h("path",{d:"M18.026 1.232c-5.268 13.125-5.548 33.555 3.285 42.311 8.823 8.75 33.31 12.304 42.422 13.523",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),h("path",{d:"M72.181 59.247c-3.163-2.429-6.337-4.856-13.058-10m13.058 10c-5.145-3.936-10.292-7.882-13.058-10m0 0c-.78 3.603-1.563 7.196-2.948 13.62m2.948-13.62c-1.126 5.168-2.24 10.346-2.948 13.62m0 0c5.168-1.166 10.334-2.343 16.006-3.62m-16.006 3.62c5.51-1.248 11.01-2.495 16.006-3.62",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:85,height:71,fill:"none"}),t0=A(D(xe,{children:[h("path",{d:"M1 77c14-2 31.833-11.973 35-24 3.167-12.016-6-35-9.5-43.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),h("path",{d:"M24.165 1.093c-.522 3.953-1.037 7.916-2.132 16.309m2.131-16.309c-.835 6.424-1.68 12.854-2.13 16.308m0 0c3.51-1.125 7.013-2.243 13.27-4.257m-13.27 4.257c5.038-1.608 10.08-3.232 13.27-4.257m0 0c-3.595-3.892-7.197-7.777-11.14-12.05m11.14 12.05c-3.837-4.148-7.667-8.287-11.14-12.05",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:38,height:78,fill:"none"}),aY=A(h("g",{fill:"currentColor",children:h("path",{d:"M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z",fill:"currentColor"})}),{width:40,height:40,fill:"none"}),ga=A(D("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 6l4.153 11.793a0.365 .365 0 0 0 .331 .207a0.366 .366 0 0 0 .332 -.207l2.184 -4.793l4.787 -1.994a0.355 .355 0 0 0 .213 -.323a0.355 .355 0 0 0 -.213 -.323l-11.787 -4.36z"}),h("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),hs=A(D("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,children:[h("path",{d:"M4.028 13.252c-.657 -.972 -1.028 -2.078 -1.028 -3.252c0 -3.866 4.03 -7 9 -7s9 3.134 9 7s-4.03 7 -9 7c-1.913 0 -3.686 -.464 -5.144 -1.255"}),h("path",{d:"M5 15m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 17c0 1.42 .316 2.805 1 4"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),To=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),H),mr=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10.5 20.4l-6.9 -6.9c-.781 -.781 -.781 -2.219 0 -3l6.9 -6.9c.781 -.781 2.219 -.781 3 0l6.9 6.9c.781 .781 .781 2.219 0 3l-6.9 6.9c-.781 .781 -2.219 .781 -3 0z"})]}),H),pr=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"})]}),H),ur=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87L13.637 3.59a1.914 1.914 0 0 0 -3.274 0z"})]}),H),hr=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 3.5l2.472 4.81 5.313.773-3.843 3.746.907 5.292L12 15.9 7.151 18.12l.907-5.292L4.215 9.083l5.313-.773L12 3.5z"})]}),H),o0=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 6h12a3 3 0 0 1 3 3v5a3 3 0 0 1 -3 3h-6l-4 3v-3h-2a3 3 0 0 1 -3 -3v-5a3 3 0 0 1 3 -3z"})]}),H),r0=A(D("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{d:"M12 4l8 8-8 8",fill:"none"}),h("line",{x1:"4",y1:"12",x2:"20",y2:"12"})]}),ee),n0=A(D("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{d:"M12 4L4 12l8 8",fill:"none"}),h("path",{d:"M12 4l8 8-8 8",fill:"none"}),h("line",{x1:"4",y1:"12",x2:"20",y2:"12"})]}),ee),en=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),h("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),h("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),H),gs=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),h("line",{x1:"5",y1:"12",x2:"9",y2:"8"}),h("line",{x1:"5",y1:"12",x2:"9",y2:"16"}),h("line",{x1:"19",y1:"12",x2:"15",y2:"8"}),h("line",{x1:"19",y1:"12",x2:"15",y2:"16"})]}),H),ao=A(h("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),ee),i0=A(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),h("path",{d:"M16 7h4"}),h("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),H),Dt=A(D("g",{strokeWidth:"1.25",children:[h("path",{clipRule:"evenodd",d:"m7.643 15.69 7.774-7.773a2.357 2.357 0 1 0-3.334-3.334L4.31 12.357a3.333 3.333 0 0 0-.977 2.357v1.953h1.953c.884 0 1.732-.352 2.357-.977Z"}),h("path",{d:"m11.25 5.417 3.333 3.333"})]}),ee),fs=A(D("g",{strokeWidth:1.25,stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(0,-2)",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 15l4 4l8-8l-4-4l-8 8z"}),h("path",{d:"M13 7l3 3"}),h("path",{d:"M4 16l3 3"})]}),ee),Go=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),h("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),h("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),h("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),h("polyline",{points:"5 20 11 4 13 4 20 20"})]}),H),a0=A(D("g",{strokeWidth:"1.25",children:[h("path",{d:"M12.5 6.667h.01"}),h("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z"}),h("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),h("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),ee),fa=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3"}),h("path",{d:"M18 13.3l-6.3 -6.3"})]}),H),Km=A(h("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),ee),$m=A(h("path",{d:"M5 10h10",strokeWidth:"1.25"}),ee),l0=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M21 21l-6 -6"}),h("path",{d:"M3.268 12.043a7.017 7.017 0 0 0 6.634 4.957a7.012 7.012 0 0 0 7.043 -6.131a7 7 0 0 0 -5.314 -7.672a7.021 7.021 0 0 0 -8.241 4.403"}),h("path",{d:"M3 4v4h4"})]}),H),Rt=A(h("path",{strokeWidth:"1.25",d:"M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"}),ee),s0=A(D("g",{strokeWidth:"1.5",children:[h("polyline",{points:"12 16 18 10 12 4"}),h("polyline",{points:"8 4 2 10 8 16"})]}),ee),ba=A(D("g",{strokeWidth:"1.25",children:[h("path",{d:"M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"}),h("path",{clipRule:"evenodd",d:"M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"})]}),ee),xa=A(h("path",{clipRule:"evenodd",d:"M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z",stroke:"currentColor"}),ee),Ea=A(h("g",{stroke:"currentColor",strokeLinejoin:"round",children:h("path",{d:"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667"})}),{...ee,strokeWidth:1.5}),bs=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),h("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),h("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),H),tn=A(h("path",{strokeWidth:"1.25",d:"M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10"}),ee),zn=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"}),h("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),H),c0=A(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"}),h("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),H),Zm=A(h("path",{strokeWidth:"1.25",d:"M9.167 5.833H5.833c-1.254 0-2.5 1.282-2.5 2.5v5.834c0 1.283 1.252 2.5 2.5 2.5h5.834c1.251 0 2.5-1.25 2.5-2.5v-3.334M8.333 11.667l8.334-8.334M12.5 3.333h4.167V7.5"}),ee),xs=A(h("path",{d:"M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5",strokeWidth:"1.25"}),ee),d0=A(D("g",{strokeWidth:"1.25",children:[h("path",{d:"M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0"}),h("path",{d:"M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084"})]}),ee),m0=A(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 4l11.733 16h4.267l-11.733 -16z"}),h("path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"})]}),H),p0=A(h("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),ya=A(D("g",{strokeWidth:"1.25",children:[h("path",{d:"M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"}),h("path",{d:"M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"})]}),ee),u0=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}),h0=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}),Hn=A(h("path",{d:"m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z",strokeWidth:"1.25"}),ee),lY=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}),g0=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"),Es=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z"}),h("path",{d:"M13.737 9.737c2.299 -2.3 3.23 -5.095 2.081 -6.245c-1.15 -1.15 -3.945 -.217 -6.244 2.082c-2.3 2.299 -3.231 5.095 -2.082 6.244c1.15 1.15 3.946 .218 6.245 -2.081z"}),h("path",{d:"M7.492 11.818c.362 .362 .768 .676 1.208 .934l6.895 4.047c1.078 .557 2.255 -.075 3.692 -1.512c1.437 -1.437 2.07 -2.614 1.512 -3.692c-.372 -.718 -1.72 -3.017 -4.047 -6.895a6.015 6.015 0 0 0 -.934 -1.208"})]}),H),f0=A(h("g",{strokeWidth:1.5,children:h("path",{d:"M6 18l12 -12"})}),H),ys=A(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 8h.01"}),h("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),h("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),h("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),h("path",{d:"M19 16v6"}),h("path",{d:"M22 19l-3 3l-3 -3"})]}),H),b0=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}),sY=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}),cY=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}),x0=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"),dY=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"),jm=A(h("path",{d:"M7.5 10.833 4.167 7.5 7.5 4.167M4.167 7.5h9.166a3.333 3.333 0 0 1 0 6.667H12.5",strokeWidth:"1.25"}),ee),qm=A(h("path",{d:"M12.5 10.833 15.833 7.5 12.5 4.167M15.833 7.5H6.667a3.333 3.333 0 1 0 0 6.667H7.5",strokeWidth:"1.25"}),ee),E0=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}),y0=A(h("path",{d:"M5 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 17.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7.25 8.917l5.5-2.834M7.25 11.083l5.5 2.834",strokeWidth:"1.5"}),ee),mY=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"),pY=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}),uY=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 9h-1a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-8a2 2 0 0 0 -2 -2h-1"}),h("path",{d:"M12 14v-11"}),h("path",{d:"M9 6l3 -3l3 3"})]}),H),hY=A(D(xe,{children:[h("path",{fill:"currentColor",d:"M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z"}),h("path",{stroke:"currentColor",fill:"currentColor",d:"M0 36v20h48v-6.2c0-6 0-6.1-2-4.3-1.1 1-2 2.9-2 4.2V52H4V34c0-17.3-.1-18-2-18s-2 .7-2 20z"})]}),{width:64,height:64}),gY=A(h("path",{stroke:"currentColor",strokeWidth:"40",fill:"currentColor",d:"M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z"}),{width:1024}),w0=D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 10l0 10"}),h("path",{d:"M12 10l4 4"}),h("path",{d:"M12 10l-4 4"}),h("path",{d:"M4 4l16 0"})]}),v0=D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 5l0 14"}),h("path",{d:"M16 9l-4 -4"}),h("path",{d:"M8 9l4 -4"})]}),Jm=A(v0,H),Qm=A(v0,{...H,style:{transform:"rotate(180deg)"}}),ep=A(w0,H),tp=A(w0,{...H,style:{transform:"rotate(180deg)"}}),op=A(D(xe,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v7.083c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V8.125c0-.92-.746-1.667-1.666-1.667ZM6.875 6.458h-.417c-.92 0-1.666.747-1.666 1.667v3.75c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667v-3.75c0-.92-.747-1.667-1.667-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),rp=A(D(xe,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M6.875 3.125h-.417c-.92 0-1.666.746-1.666 1.667v7.083c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667V4.792c0-.92-.747-1.667-1.667-1.667ZM13.542 5.817h-.417c-.92 0-1.667.747-1.667 1.667v4.391c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V7.484c0-.92-.746-1.667-1.666-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),np=A(D(xe,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M15.208 4.792H8.125c-.92 0-1.667.746-1.667 1.666v.417c0 .92.747 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM12.516 11.458H8.125c-.92 0-1.667.746-1.667 1.667v.417c0 .92.747 1.666 1.667 1.666h4.391c.92 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.667-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),ip=A(D(xe,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M11.875 4.792H4.792c-.92 0-1.667.746-1.667 1.666v.417c0 .92.746 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM11.683 11.458H7.292c-.92 0-1.667.746-1.667 1.667v.417c0 .92.746 1.666 1.667 1.666h4.39c.921 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.666-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),T0=A(D(xe,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M14.375 10.208v-.416c0-.92-.746-1.667-1.667-1.667H7.292c-.92 0-1.667.746-1.667 1.667v.416c0 .92.746 1.667 1.667 1.667h5.416c.92 0 1.667-.746 1.667-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),I0=A(D(xe,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M10.208 5.625h-.416c-.92 0-1.667.746-1.667 1.667v5.416c0 .92.746 1.667 1.667 1.667h.416c.92 0 1.667-.746 1.667-1.667V7.292c0-.92-.746-1.667-1.667-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),ap=A(D("g",{stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),h("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M6.875 4.792h-.417c-.92 0-1.666.746-1.666 1.666v7.084c0 .92.746 1.666 1.666 1.666h.417c.92 0 1.667-.746 1.667-1.666V6.458c0-.92-.747-1.666-1.667-1.666ZM13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v3.75c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667v-3.75c0-.92-.746-1.667-1.666-1.667Z"})]}),ee),lp=A(D("g",{stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),h("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M4.792 13.125v.417c0 .92.746 1.666 1.666 1.666h7.084c.92 0 1.666-.746 1.666-1.666v-.417c0-.92-.746-1.667-1.666-1.667H6.458c-.92 0-1.666.746-1.666 1.667ZM6.458 6.458v.417c0 .92.747 1.667 1.667 1.667h3.75c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666h-3.75c-.92 0-1.667.746-1.667 1.666Z"})]}),ee),ws=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"9",cy:"7",r:"4"}),h("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),h("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),h("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),H),fY=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"),bY=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"),Wt=A(D(xe,{children:[h("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("path",{d:"M15 5 5 15M5 5l10 10"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),xY=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}),EY=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}),yY=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}),sp=rt.memo(({theme:e})=>A(D(xe,{children:[h("path",{d:"M25 26H111V111H25",fill:io(e)}),h("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:io(e),strokeWidth:"2"}),h("path",{d:"M100 100H160V160H100",fill:io(e)}),h("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:io(e),strokeWidth:"2"}),D("g",{fill:$1(e),stroke:io(e),strokeWidth:"6",children:[h("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),cp=rt.memo(({theme:e})=>A(D(xe,{children:[h("path",{d:"M25 26H111V111H25",fill:io(e)}),h("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:io(e),strokeWidth:"2"}),h("path",{d:"M100 100H160V160H100",fill:io(e)}),h("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:io(e),strokeWidth:"2"}),D("g",{fill:$1(e),stroke:io(e),strokeWidth:"6",children:[h("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),h("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),C0=A(h("g",{strokeWidth:1.25,children:h("path",{d:"M5.879 2.625h8.242a3.27 3.27 0 0 1 3.254 3.254v8.242a3.27 3.27 0 0 1-3.254 3.254H5.88a3.27 3.27 0 0 1-3.254-3.254V5.88A3.27 3.27 0 0 1 5.88 2.626l-.001-.001ZM4.518 16.118l7.608-12.83m.198 13.934 5.051-9.897M2.778 9.675l9.348-6.387m-7.608 12.83 12.857-8.793"})}),ee),vs=A(D(xe,{children:[h("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),h("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:h("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.25"})}),h("g",{mask:"url(#FillHachureIcon)",children:h("path",{d:"M2.258 15.156 15.156 2.258M7.324 20.222 20.222 7.325m-20.444 5.35L12.675-.222m-8.157 18.34L17.416 5.22",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})]}),ee),Ts=A(D(xe,{children:[D("g",{clipPath:"url(#a)",children:[h("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),h("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:h("path",{d:"M2.426 15.044 15.044 2.426M7.383 20 20 7.383M0 12.617 12.617 0m-7.98 17.941L17.256 5.324m-2.211 12.25L2.426 4.956M20 12.617 7.383 0m5.234 20L0 7.383m17.941 7.98L5.324 2.745",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("g",{mask:"url(#FillCrossHatchIcon)",children:h("path",{d:"M14.121 2H5.88A3.879 3.879 0 0 0 2 5.879v8.242A3.879 3.879 0 0 0 5.879 18h8.242A3.879 3.879 0 0 0 18 14.121V5.88A3.879 3.879 0 0 0 14.121 2Z",fill:"currentColor"})})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),Is=A(D(xe,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z",stroke:"currentColor",strokeWidth:"1.25"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),{...ee,fill:"currentColor"}),Gn=A(h(xe,{children:h("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),ee),wa=A(h("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),ee),va=A(h("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),ee),wY=rt.memo(({theme:e})=>A(h("path",{d:"M6 10H34",stroke:io(e),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})),S0=A(D("g",{strokeWidth:"2",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12h2"}),h("path",{d:"M17 12h2"}),h("path",{d:"M11 12h2"})]}),H),k0=A(D("g",{strokeWidth:"2",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 12v.01"}),h("path",{d:"M8 12v.01"}),h("path",{d:"M12 12v.01"}),h("path",{d:"M16 12v.01"}),h("path",{d:"M20 12v.01"})]}),H),M0=A(h("path",{d:"M2.5 12.038c1.655-.885 5.9-3.292 8.568-4.354 2.668-1.063.101 2.821 1.32 3.104 1.218.283 5.112-1.814 5.112-1.814",strokeWidth:"1.25"}),ee),L0=A(h("path",{d:"M2.5 12.563c1.655-.886 5.9-3.293 8.568-4.355 2.668-1.062.101 2.822 1.32 3.105 1.218.283 5.112-1.814 5.112-1.814m-13.469 2.23c2.963-1.586 6.13-5.62 7.468-4.998 1.338.623-1.153 4.11-.132 5.595 1.02 1.487 6.133-1.43 6.133-1.43",strokeWidth:"1.25"}),ee),P0=A(h("path",{d:"M2.5 11.936c1.737-.879 8.627-5.346 10.42-5.268 1.795.078-.418 5.138.345 5.736.763.598 3.53-1.789 4.235-2.147M2.929 9.788c1.164-.519 5.47-3.28 6.987-3.114 1.519.165 1 3.827 2.121 4.109 1.122.281 3.839-2.016 4.606-2.42",strokeWidth:"1.25"}),ee),A0=A(D("svg",{strokeWidth:"1.5",children:[h("path",{d:"M3.33334 9.99998V6.66665C3.33334 6.04326 3.33403 4.9332 3.33539 3.33646C4.95233 3.33436 6.06276 3.33331 6.66668 3.33331H10"}),h("path",{d:"M13.3333 3.33331V3.34331"}),h("path",{d:"M16.6667 3.33331V3.34331"}),h("path",{d:"M16.6667 6.66669V6.67669"}),h("path",{d:"M16.6667 10V10.01"}),h("path",{d:"M3.33334 13.3333V13.3433"}),h("path",{d:"M16.6667 13.3333V13.3433"}),h("path",{d:"M3.33334 16.6667V16.6767"}),h("path",{d:"M6.66666 16.6667V16.6767"}),h("path",{d:"M10 16.6667V16.6767"}),h("path",{d:"M13.3333 16.6667V16.6767"}),h("path",{d:"M16.6667 16.6667V16.6767"})]}),ee),_0=A(D("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),h("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),h("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),h("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),h("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),h("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),h("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),h("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),h("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),h("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),h("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),h("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),H),D0=A(D("g",{stroke:"currentColor",opacity:.3,strokeWidth:2,children:[h("path",{d:"M12 12l9 0"}),h("path",{d:"M3 9l6 6"}),h("path",{d:"M3 15l6 -6"})]}),H),R0=rt.memo(({flip:e=!1})=>A(D("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[h("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),h("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})),N0=rt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[h("path",{d:"M32 10L6 10",strokeWidth:2}),h("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),B0=rt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[h("path",{d:"M26 10L6 10"}),h("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),F0=rt.memo(({flip:e=!1})=>A(h("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",children:h("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})),O0=rt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[h("path",{d:"M32 10L6 10",strokeWidth:2}),h("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})),z0=rt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",children:[h("path",{d:"M6,9.5H27"}),h("path",{d:"M27,5L34,10L27,14Z",fill:"none"})]}),{width:40,height:20})),H0=rt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{d:"M6,9.5H20"}),h("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),G0=rt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{d:"M6,9.5H20"}),h("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),U0=rt.memo(({flip:e=!1})=>A(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),Y0=rt.memo(({flip:e=!1})=>A(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L15,15 L15,5"})}),{width:40,height:20})),W0=rt.memo(({flip:e=!1})=>A(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L15,16 L15,4 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),V0=A(D(xe,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M14.167 6.667a3.333 3.333 0 0 0-3.334-3.334H9.167a3.333 3.333 0 0 0 0 6.667h1.666a3.333 3.333 0 0 1 0 6.667H9.167a3.333 3.333 0 0 1-3.334-3.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),X0=A(D(xe,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),K0=A(D(xe,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),$0=A(h(xe,{children:h("path",{d:"m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),ee),on=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 7v-2h13v2"}),h("path",{d:"M10 5v14"}),h("path",{d:"M12 19h-4"}),h("path",{d:"M15 13v-1h6v1"}),h("path",{d:"M18 12v7"}),h("path",{d:"M17 19h2"})]}),H),Z0=A(h(xe,{children:D("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 12h10"}),h("path",{d:"M7 5v14"}),h("path",{d:"M17 5v14"}),h("path",{d:"M15 19h4"}),h("path",{d:"M15 5h4"}),h("path",{d:"M5 19h4"}),h("path",{d:"M5 5h4"})]})}),H),Ta=A(h(xe,{children:h("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("path",{d:"M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334"})})}),ee),Cs=A(D(xe,{children:[h("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("path",{d:"M5.833 6.667 2.5 10l3.333 3.333M14.167 6.667 17.5 10l-3.333 3.333M11.667 3.333 8.333 16.667"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),Ss=A(D("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),h("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),H),ks=A(D("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),h("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),H),Ms=A(D("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),h("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),H),j0=rt.memo(({theme:e})=>A(D("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),h("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),H)),q0=rt.memo(({theme:e})=>A(D("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),h("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),H)),J0=rt.memo(({theme:e})=>A(D("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),h("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),h("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),H)),Ls=A(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M21 19h-18l9 -15"}),h("path",{d:"M20.615 15.171h.015"}),h("path",{d:"M19.515 11.771h.015"}),h("path",{d:"M17.715 8.671h.015"}),h("path",{d:"M15.415 5.971h.015"})]}),H),Q0=A(h("path",{d:"M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z",fill:"currentColor"}),{width:640,height:512}),vY=A(h("path",{d:"M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z"})),Ps=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),h("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),h("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),h("path",{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"})]}),H),dp=A(D(xe,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),h("path",{d:"M7 11l5 5l5 -5"}),h("path",{d:"M12 4l0 12"})]}),H),Un=A(D(xe,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"}),h("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]}),H),eb=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("path",{d:"M9.15 14.85l8.85 -10.85"}),h("path",{d:"M6 4l8.85 10.85"})]}),H),tb=A(D(xe,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),h("path",{d:"M12 17l0 .01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),H),TY=A(D(xe,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 4v16l13 -8z"})]}),H),IY=A(D(xe,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z",strokeWidth:"0",fill:"currentColor"})]}),H),ob=A(D(xe,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12l5 5l10 -10"})]}),H),rb=A(D(xe,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z"}),h("path",{d:"M12 9v4"}),h("path",{d:"M12 17h.01"})]}),H),nb=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M11 7l6 6"}),h("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"})]}),H),ib=A(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 3l-4 7h8z"}),h("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("path",{d:"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"})]}),H),Yn=A(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 7l16 0"}),h("path",{d:"M4 17l16 0"}),h("path",{d:"M7 4l0 16"}),h("path",{d:"M17 4l0 16"})]}),H),ab=A(h("path",{fill:"currentColor",d:"M407.48,111.18C335.587,108.103 269.573,152.338 245.08,220C220.587,152.338 154.573,108.103 82.68,111.18C80.285,168.229 107.577,222.632 154.74,254.82C178.908,271.419 193.35,298.951 193.27,328.27L193.27,379.13L296.9,379.13L296.9,328.27C296.816,298.953 311.255,271.42 335.42,254.82C382.596,222.644 409.892,168.233 407.48,111.18Z"})),Wn=A(D("g",{strokeWidth:"1.25",children:[h("path",{d:"M4.16602 10H15.8327"}),h("path",{d:"M12.5 13.3333L15.8333 10"}),h("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),ee),lb=A(D("g",{strokeWidth:1.5,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{d:"M5 12h10"}),h("path",{d:"M11 8l4 4l-4 4"})]}),H),sb=A(D("g",{strokeWidth:1.5,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{d:"M5 12h14"}),h("path",{d:"M9 8l-4 4l4 4"}),h("path",{d:"M15 8l4 4l-4 4"})]}),H),Uo=A(D("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[h("path",{clipRule:"evenodd",d:"m9.644 13.69 7.774-7.773a2.357 2.357 0 0 0-3.334-3.334l-7.773 7.774L8 12l1.643 1.69Z"}),h("path",{d:"m13.25 3.417 3.333 3.333M10 10l2-2M5 15l3-3M2.156 17.894l1-1M5.453 19.029l-.144-1.407M2.377 11.887l.866 1.118M8.354 17.273l-1.194-.758M.953 14.652l1.408.13"})]}),20),cb=A(D("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[h("path",{clipRule:"evenodd",d:"m9.644 13.69 7.774-7.773a2.357 2.357 0 0 0-3.334-3.334l-7.773 7.774L8 12l1.643 1.69Z"}),h("path",{d:"m13.25 3.417 3.333 3.333M10 10l2-2M5 15l3-3M2.156 17.894l1-1M5.453 19.029l-.144-1.407M2.377 11.887l.866 1.118M8.354 17.273l-1.194-.758M.953 14.652l1.408.13"}),h("circle",{cx:"3",cy:"16",r:"0.8",fill:"currentColor",opacity:"0.7"}),h("circle",{cx:"5",cy:"18",r:"0.6",fill:"currentColor",opacity:"0.5"}),h("circle",{cx:"7.5",cy:"17",r:"0.8",fill:"currentColor",opacity:"0.6"}),h("circle",{cx:"10",cy:"19",r:"0.4",fill:"currentColor",opacity:"0.3"})]}),20),db=A(D("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z"}),h("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),h("path",{d:"M15 6l3 3"}),h("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),h("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),H),CY=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z"}),h("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),h("path",{d:"M15 6l3 3"}),h("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),h("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),H),SY=A(D("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35"}),h("path",{d:"M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946"}),h("path",{d:"M6 7.63c-1.391 -.236 -2.787 .395 -3.534 1.689a3.474 3.474 0 0 0 1.271 4.745l4.263 2.514l6 -3.348"}),h("path",{d:"M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45"}),h("path",{d:"M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946"}),h("path",{d:"M18 16.302c1.391 .236 2.787 -.395 3.534 -1.689a3.474 3.474 0 0 0 -1.271 -4.745l-4.308 -2.514l-5.955 3.42"})]}),H),mb=A(D("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),h("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),h("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),h("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"})]}),H),Vn=A(D("g",{stroke:"currentColor",fill:"none",strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"}),h("path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"})]}),H),pb=A(D("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"}),h("path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"}),h("path",{d:"M3 3l18 18"})]}),H),ub=A(D("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),h("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),h("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),h("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),h("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),h("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),H),hb=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),h("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),h("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),h("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),h("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),h("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),H),Nt=A(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),h("path",{d:"M21 21l-6 -6"})]}),H),gb=A(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M20.984 12.53a9 9 0 1 0 -7.552 8.355"}),h("path",{d:"M12 7v5l3 3"}),h("path",{d:"M19 16l-2 3h4l-2 3"})]}),H),fb=A(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M9 2m0 3a3 3 0 0 1 3 -3h0a3 3 0 0 1 3 3v5a3 3 0 0 1 -3 3h0a3 3 0 0 1 -3 -3z"}),h("path",{d:"M5 10a7 7 0 0 0 14 0"}),h("path",{d:"M8 21l8 0"}),h("path",{d:"M12 17l0 4"})]}),H),bb=A(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 3l18 18"}),h("path",{d:"M9 5a3 3 0 0 1 6 0v5a3 3 0 0 1 -.13 .874m-2 2a3 3 0 0 1 -3.87 -2.872v-1"}),h("path",{d:"M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85"}),h("path",{d:"M8 21l8 0"}),h("path",{d:"M12 17l0 4"})]}),H),Ia=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"})]}),H),xb=A(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 8m0 1a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1z"}),h("path",{d:"M12 20v.01"}),h("path",{d:"M16 20v.01"}),h("path",{d:"M8 20v.01"}),h("path",{d:"M4 20v.01"}),h("path",{d:"M4 16v.01"}),h("path",{d:"M4 12v.01"}),h("path",{d:"M4 8v.01"}),h("path",{d:"M4 4v.01"}),h("path",{d:"M8 4v.01"}),h("path",{d:"M12 4v.01"}),h("path",{d:"M16 4v.01"}),h("path",{d:"M20 4v.01"}),h("path",{d:"M20 8v.01"}),h("path",{d:"M20 12v.01"}),h("path",{d:"M20 16v.01"}),h("path",{d:"M20 20v.01"})]}),H),Eb=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 3v18"}),h("path",{d:"M19 21v-18"}),h("path",{d:"M5 7h14"}),h("path",{d:"M5 15h14"}),h("path",{d:"M8 13v4"}),h("path",{d:"M11 13v4"}),h("path",{d:"M16 13v4"}),h("path",{d:"M14 5v4"}),h("path",{d:"M11 5v4"}),h("path",{d:"M8 5v4"}),h("path",{d:"M3 21h18"})]}),H),yb=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 12l18 0"}),h("path",{d:"M7 16l10 0l-10 5l0 -5"}),h("path",{d:"M7 8l10 0l-10 -5l0 5"})]}),H),wb=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 3l0 18"}),h("path",{d:"M16 7l0 10l5 0l-5 -10"}),h("path",{d:"M8 7l0 10l-5 0l5 -10"})]}),H),mp=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"}),h("path",{d:"M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"}),h("path",{d:"M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"})]}),H),As=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"}),h("path",{d:"M22 22l-3 -3"}),h("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),h("path",{d:"M3 11v-1"}),h("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),h("path",{d:"M10 3h1"}),h("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"})]}),H),vb=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),h("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),h("path",{d:"M4 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"}),h("path",{d:"M10 15l2 6l2 -6"}),h("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"})]}),H),Tb=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),h("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),h("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"}),h("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"}),h("path",{d:"M11 21v-6l3 6v-6"})]}),H),Ib=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 13v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a2 2 0 0 0 6 0v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a8 8 0 0 1 -16 0"}),h("path",{d:"M4 8l5 0"}),h("path",{d:"M15 8l4 0"})]}),H),Cb=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 14c.83 .642 2.077 1.017 3.5 1c1.423 .017 2.67 -.358 3.5 -1c.83 -.642 2.077 -1.017 3.5 -1c1.423 -.017 2.67 .358 3.5 1"}),h("path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),h("path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),h("path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z"}),h("path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555"})]}),H),Sb=A(D("g",{stroke:"currentColor",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 5a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-16a1 1 0 0 1-1-1v-10zM7 20h10M9 16v4M15 16v4"})]}),{...H,strokeWidth:1.5}),kY=A(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"}),h("path",{d:"M21 12h-13l3 -3"}),h("path",{d:"M11 15l-3 -3"})]}),H),kb=A(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8z"}),h("path",{d:"M10 9l5 3l-5 3z"})]}),H),Mb=A(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 6h18"}),h("path",{d:"M3 12h18"}),h("path",{d:"M3 18h18"}),h("path",{d:"M6 3v18"}),h("path",{d:"M12 3v18"}),h("path",{d:"M18 3v18"})]}),H),Lb=A(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M17 3m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),h("path",{d:"M3 17m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),h("path",{d:"M17 5c-6.627 0 -12 5.373 -12 12"})]}),H),_s=A(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 18l12 -12"}),h("path",{d:"M18 10v-4h-4"})]}),H),Ds=A(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4,19L10,19C11.097,19 12,18.097 12,17L12,9C12,7.903 12.903,7 14,7L21,7"}),h("path",{d:"M18 4l3 3l-3 3"})]}),H),Rs=A(D("g",{children:[h("path",{d:"M16,12L20,9L16,6"}),h("path",{d:"M6 20c0 -6.075 4.925 -11 11 -11h3"})]}),H),Ns=A(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 9l6 6l6 -6"})]}),H),Pb=A(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 15l6 -6l6 6"})]}),H),Ab=A(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 15l6 -6l6 6"})]}),H),pp=A(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"}),h("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"})]}),H),Bs=A(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 7l0 10"}),h("path",{d:"M7 5l10 0"}),h("path",{d:"M7 19l10 0"}),h("path",{d:"M19 7l0 10"})]}),H);import _b from"clsx";import hp,{useEffect as ZC,useRef as Db,useState as jC}from"react";import{isPromiseLike as qC}from"@haoxin-web/excalidraw-common";import KC from"react";import{jsx as up}from"react/jsx-runtime";var $C=({size:e="1em",circleWidth:o=8,synchronized:t=!1,className:r=""})=>{let i=-(KC.useRef(Date.now()).current%1600);return up("div",{className:`Spinner ${r}`,children:up("svg",{viewBox:"0 0 100 100",style:{width:e,height:e,"--spinner-delay":t?`${i}ms`:0},children:up("circle",{cx:"50",cy:"50",r:50-o/2,strokeWidth:o,fill:"none",strokeMiterlimit:"10"})})})},nt=$C;import{jsx as Ca,jsxs as Sa}from"react/jsx-runtime";var z=hp.forwardRef(({size:e="medium",visible:o=!0,className:t="",...r},n)=>{let{id:i}=Xe(),a=hp.useRef(null);hp.useImperativeHandle(n,()=>a.current);let l=`ToolIcon_size_${e}`,[s,d]=jC(!1),c=Db(!0),m=async u=>{let f="onClick"in r&&r.onClick?.(u);if(qC(f))try{d(!0),await f}catch(b){if(b instanceof An)console.warn(b);else throw b}finally{c.current&&d(!1)}};ZC(()=>(c.current=!0,()=>{c.current=!1}),[]);let p=Db(null);if(r.type==="button"||r.type==="icon"||r.type==="submit"){let u=r.type==="icon"?"button":r.type;return Sa("button",{className:_b("ToolIcon_type_button",l,t,o&&!r.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!r.hidden,"ToolIcon--selected":r.selected,"ToolIcon--plain":r.type==="icon"}),style:r.style,"data-testid":r["data-testid"],hidden:r.hidden,title:r.title,"aria-label":r["aria-label"],type:u,onClick:m,ref:a,disabled:s||r.isLoading||!!r.disabled,children:[(r.icon||r.label)&&Sa("div",{className:"ToolIcon__icon","aria-hidden":"true","aria-disabled":!!r.disabled,children:[r.icon||r.label,r.keyBindingLabel&&Ca("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel}),r.isLoading&&Ca(nt,{})]}),r.showAriaLabel&&Sa("div",{className:"ToolIcon__label",children:[r["aria-label"]," ",s&&Ca(nt,{})]}),r.children]})}return Sa("label",{className:_b("ToolIcon",t),title:r.title,onPointerDown:u=>{p.current=u.pointerType||null,r.onPointerDown?.({pointerType:u.pointerType||null})},onPointerUp:()=>{requestAnimationFrame(()=>{p.current=null})},children:[Ca("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}),Sa("div",{className:"ToolIcon__icon",children:[r.icon,r.keyBindingLabel&&Ca("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel})]})]})});z.displayName="ToolButton";var Fs=[],F=e=>(Fs=Fs.concat(e),e);import{jsx as iS}from"react/jsx-runtime";var nS=(e,o,t)=>{let r=new Set(q(e.filter(c=>tS(c)),o).map(c=>c.id)),n={},i=t.scene.getNonDeletedElementsMap(),a=new Set;for(let c of r){let m=oS(e,c);for(let p of m)if(!a.has(p.id)){if(Os(p)){let u=Nb(p,i);u&&(n[u.id]=!0)}else n[p.id]=!0;a.add(p.id)}}let l=!0,s=e.map(c=>{if(o.selectedElementIds[c.id]){let m=Os(c)?Nb(c,i):null;return c.frameId&&r.has(c.frameId)?(l=!1,n[c.id]=!0,c):m?.frameId&&r.has(m?.frameId)?c:(c.boundElements&&c.boundElements.forEach(p=>{let u=t.scene.getNonDeletedElementsMap().get(p.id);u&&eS(u)&&t.scene.mutateElement(u,{startBinding:c.id===u.startBinding?.elementId?null:u.startBinding,endBinding:c.id===u.endBinding?.elementId?null:u.endBinding})}),Hs(c,{isDeleted:!0}))}return c.frameId&&r.has(c.frameId)?(l=!1,Os(c)||(n[c.id]=!0),Hs(c,{frameId:null})):Os(c)&&o.selectedElementIds[c.containerId]?Hs(c,{isDeleted:!0}):c}),d=o.editingGroupId;if(l&&o.editingGroupId){let c=bp(s,o.editingGroupId).filter(m=>!m.isDeleted);if(c.length>1)c[0]&&(n[c[0].id]=!0);else{d=null,c[0]&&(n[c[0].id]=!0);let m=c[0];if(m){let p=m.groupIds.findIndex(f=>f===o.editingGroupId),u=m.groupIds[p+1];if(u){let f=bp(s,u).filter(b=>!b.isDeleted);f.length>1&&(d=u,f.forEach(b=>{n[b.id]=!0}))}}}}return{elements:s,appState:{...o,...rS({selectedElementIds:n,editingGroupId:d},s,o,null)}}},Bb=(e,o)=>{if(e.editingGroupId){let t=bp(fp(o),e.editingGroupId);if(t.length)return{...e,selectedElementIds:{[t[0].id]:!0}}}return e},ka=F({name:"deleteSelectedElements",label:"labels.delete",icon:Rt,trackEvent:{category:"element",action:"delete"},perform:(e,o,t,r)=>{if(o.selectedLinearElement?.isEditing){let{elementId:a,selectedPointsIndices:l,startBindingElement:s,endBindingElement:d}=o.selectedLinearElement,c=r.scene.getNonDeletedElementsMap(),m=Rb.getElement(a,c);if(!m||l==null)return!1;if(l.length>=m.points.length){let u=e.map(b=>b.id===m.id?Hs(b,{isDeleted:!0}):b),f=Bb(o,u);return{elements:u,appState:{...f,selectedLinearElement:null},captureUpdate:zs.IMMEDIATELY}}let p={startBindingElement:l?.includes(0)?null:s,endBindingElement:l?.includes(m.points.length-1)?null:d};return Rb.deletePoints(m,r,l),{elements:e,appState:{...o,selectedLinearElement:{...o.selectedLinearElement,...p,selectedPointsIndices:l?.[0]>0?[l[0]-1]:[0]}},captureUpdate:zs.IMMEDIATELY}}let{elements:n,appState:i}=nS(e,o,r);return QC(n,n.filter(a=>a.isDeleted)),i=Bb(i,n),{elements:n,appState:{...i,activeTool:JC(o,{type:r.defaultSelectionTool}),multiElement:null,activeEmbeddable:null,selectedLinearElement:null},captureUpdate:ye(fp(e),o)?zs.IMMEDIATELY:zs.EVENTUALLY}},keyTest:(e,o,t)=>(e.key===gp.BACKSPACE||e.key===gp.DELETE)&&!e[gp.CTRL_OR_CMD],PanelComponent:({elements:e,appState:o,updateData:t})=>iS(z,{type:"button",icon:Rt,title:g("labels.delete"),"aria-label":g("labels.delete"),onClick:()=>t(null),visible:ye(fp(e),o)})});import{KEYS as Xn,CODES as Kn,getShortcutKey as $n,isDarwin as Gs}from"@haoxin-web/excalidraw-common";import{moveOneLeft as aS,moveOneRight as lS,moveAllLeft as sS,moveAllRight as cS}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as Us}from"@haoxin-web/excalidraw-element";import{jsx as Ys}from"react/jsx-runtime";var xp=F({name:"sendBackward",label:"labels.sendBackward",keywords:["move down","zindex","layer"],icon:Qm,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:aS(e,o,r.scene),appState:o,captureUpdate:Us.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[Xn.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Kn.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>Ys("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendBackward")} \u2014 ${$n("CtrlOrCmd+[")}`,children:Qm})}),Ep=F({name:"bringForward",label:"labels.bringForward",keywords:["move up","zindex","layer"],icon:Jm,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:lS(e,o,r.scene),appState:o,captureUpdate:Us.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[Xn.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Kn.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>Ys("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.bringForward")} \u2014 ${$n("CtrlOrCmd+]")}`,children:Jm})}),yp=F({name:"sendToBack",label:"labels.sendToBack",keywords:["move down","zindex","layer"],icon:tp,trackEvent:{category:"element"},perform:(e,o)=>({elements:sS(e,o),appState:o,captureUpdate:Us.IMMEDIATELY}),keyTest:e=>Gs?e[Xn.CTRL_OR_CMD]&&e.altKey&&e.code===Kn.BRACKET_LEFT:e[Xn.CTRL_OR_CMD]&&e.shiftKey&&e.code===Kn.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>Ys("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendToBack")} \u2014 ${Gs?$n("CtrlOrCmd+Alt+["):$n("CtrlOrCmd+Shift+[")}`,children:tp})}),wp=F({name:"bringToFront",label:"labels.bringToFront",keywords:["move up","zindex","layer"],icon:ep,trackEvent:{category:"element"},perform:(e,o)=>({elements:cS(e,o),appState:o,captureUpdate:Us.IMMEDIATELY}),keyTest:e=>Gs?e[Xn.CTRL_OR_CMD]&&e.altKey&&e.code===Kn.BRACKET_RIGHT:e[Xn.CTRL_OR_CMD]&&e.shiftKey&&e.code===Kn.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>Ys("button",{type:"button",className:"zIndexButton",onClick:t=>e(null),title:`${g("labels.bringToFront")} \u2014 ${Gs?$n("CtrlOrCmd+Alt+]"):$n("CtrlOrCmd+Shift+]")}`,children:ep})});import{getNonDeletedElements as dS}from"@haoxin-web/excalidraw-element";import{LinearElementEditor as mS}from"@haoxin-web/excalidraw-element";import{isLinearElement as pS,isTextElement as uS}from"@haoxin-web/excalidraw-element";import{arrayToMap as hS,KEYS as Fb}from"@haoxin-web/excalidraw-common";import{selectGroupsForSelectedElements as gS}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as fS}from"@haoxin-web/excalidraw-element";var vp=F({name:"selectAll",label:"labels.selectAll",icon:xb,trackEvent:{category:"canvas"},viewMode:!1,perform:(e,o,t,r)=>{if(o.selectedLinearElement?.isEditing)return!1;let n=e.filter(i=>!i.isDeleted&&!(uS(i)&&i.containerId)&&!i.locked).reduce((i,a)=>(i[a.id]=!0,i),{});return{appState:{...o,...gS({editingGroupId:null,selectedElementIds:n},dS(e),o,r),selectedLinearElement:Object.keys(n).length===1&&pS(e[0])?new mS(e[0],hS(e)):null},captureUpdate:fS.IMMEDIATELY}},keyTest:e=>e[Fb.CTRL_OR_CMD]&&e.key===Fb.A});import{DEFAULT_GRID_SIZE as Ob,KEYS as zb,arrayToMap as Hb,getShortcutKey as bS}from"@haoxin-web/excalidraw-common";import{getNonDeletedElements as Gb}from"@haoxin-web/excalidraw-element";import{LinearElementEditor as xS}from"@haoxin-web/excalidraw-element";import{getSelectedElements as ES,getSelectionStateForElements as yS}from"@haoxin-web/excalidraw-element";import{syncMovedIndices as wS}from"@haoxin-web/excalidraw-element";import{duplicateElements as vS}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as Ub}from"@haoxin-web/excalidraw-element";import{jsx as TS}from"react/jsx-runtime";var Tp=F({name:"duplicateSelection",label:"labels.duplicateSelection",icon:ba,trackEvent:{category:"element"},perform:(e,o,t,r)=>{if(o.selectedElementsAreBeingDragged)return!1;if(o.selectedLinearElement?.isEditing)try{let a=xS.duplicateSelectedPoints(o,r.scene);return{elements:e,appState:a,captureUpdate:Ub.IMMEDIATELY}}catch{return!1}let{duplicatedElements:n,elementsWithDuplicates:i}=vS({type:"in-place",elements:e,idsOfElementsToDuplicate:Hb(ES(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+Ob/2,y:a.y+Ob/2,frameId:s??a.frameId}}});if(r.props.onDuplicate&&i){let a=r.props.onDuplicate(i,e);a&&(i=a)}return{elements:wS(i,Hb(n)),appState:{...o,...yS(n,Gb(i),o)},captureUpdate:Ub.IMMEDIATELY}},keyTest:e=>e[zb.CTRL_OR_CMD]&&e.key===zb.D,PanelComponent:({elements:e,appState:o,updateData:t})=>TS(z,{type:"button",icon:ba,title:`${g("labels.duplicateSelection")} \u2014 ${bS("CtrlOrCmd+D")}`,"aria-label":g("labels.duplicateSelection"),onClick:()=>t(null),visible:ye(Gb(e),o)})});import{pointFrom as I4}from"@haoxin-web/excalidraw-math";import{useEffect as Vp,useMemo as C4,useRef as Xp,useState as S4}from"react";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE as k4,DEFAULT_ELEMENT_BACKGROUND_PICKS as M4,DEFAULT_ELEMENT_STROKE_COLOR_PALETTE as L4,DEFAULT_ELEMENT_STROKE_PICKS as P4,ARROW_TYPE as Wo,DEFAULT_FONT_FAMILY as A4,DEFAULT_FONT_SIZE as _4,FONT_FAMILY as D4,ROUNDNESS as ac,STROKE_WIDTH as Kp,VERTICAL_ALIGN as ic,KEYS as ii,randomInteger as R4,arrayToMap as jp,getFontFamilyString as N4,getShortcutKey as B4,getLineHeight as F4,isTransparent as O4,reduceToCommonValue as z4}from"@haoxin-web/excalidraw-common";import{canBecomePolygon as H4,getNonDeletedElements as Lx}from"@haoxin-web/excalidraw-element";import{bindLinearElement as Cx,calculateFixedPointForElbowArrowBinding as Sx,updateBoundElements as G4}from"@haoxin-web/excalidraw-element";import{LinearElementEditor as $p}from"@haoxin-web/excalidraw-element";import{newElementWith as Je}from"@haoxin-web/excalidraw-element";import{getBoundTextElement as Tr,redrawTextBoundingBox as Ba}from"@haoxin-web/excalidraw-element";import{isArrowElement as lc,isBoundToContainer as U4,isElbowArrow as Px,isLinearElement as Zp,isLineElement as kx,isTextElement as Ct,isUsingAdaptiveRadius as Y4}from"@haoxin-web/excalidraw-element";import{hasStrokeColor as W4}from"@haoxin-web/excalidraw-element";import{updateElbowArrowPoints as V4,CaptureUpdateAction as Qe,toggleLinePolygonState as X4}from"@haoxin-web/excalidraw-element";import{isDevEnv as IS}from"@haoxin-web/excalidraw-common";var CS=new Set(["command_palette","export"]),ie=(e,o,t,r)=>{try{if(typeof window>"u"||T.VITE_WORKER_ID||T.VITE_APP_ENABLE_TRACKING!=="true"||!CS.has(e)||IS())return;T.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 LS from"clsx";import SS from"clsx";import{forwardRef as kS}from"react";import{jsx as MS}from"react/jsx-runtime";var Zn=kS((e,o)=>{let{title:t,className:r,testId:n,active:i,standalone:a,icon:l,onClick:s}=e;return MS("button",{type:"button",ref:o,title:t,"data-testid":n,className:SS(r,{standalone:a,active:i}),onClick:s,style:e.style,children:l},t)});import{Fragment as AS,jsx as Ip,jsxs as PS}from"react/jsx-runtime";var Vt=e=>Ip(AS,{children:e.options.map(o=>e.type==="button"?Ip(Zn,{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):PS("label",{className:LS({active:e.value===o.value}),title:o.text,children:[Ip("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 js from"@radix-ui/react-popover";import P6 from"clsx";import{useRef as A6}from"react";import{COLOR_OUTLINE_CONTRAST_THRESHOLD as _6,COLOR_PALETTE as lx,isTransparent as D6}from"@haoxin-web/excalidraw-common";import{jsx as _S}from"react/jsx-runtime";var Ws=()=>_S("div",{style:{width:1,height:"1rem",backgroundColor:"var(--default-border-color)",margin:"0 auto"}});import{useEffect as FS,useRef as OS}from"react";import{createPortal as zS}from"react-dom";import{EVENT as fr,KEYS as HS,rgbToHex as GS}from"@haoxin-web/excalidraw-common";import Yb from"react";var Cp=Yb.createContext(null),be=()=>Yb.useContext(Cp);import{useState as DS,useLayoutEffect as Wb}from"react";import{THEME as RS}from"@haoxin-web/excalidraw-common";var Vs=e=>{let[o,t]=DS(null),r=pe(),{theme:n}=be(),{container:i}=Xe();return Wb(()=>{o&&(o.className="",o.classList.add("excalidraw",...e?.className?.split(/\s+/)||[]),o.classList.toggle("excalidraw--mobile",r.editor.isMobile),o.classList.toggle("theme--dark",n===RS.DARK))},[o,n,r.editor.isMobile,e?.className]),Wb(()=>{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 NS}from"react";import{EVENT as Xs}from"@haoxin-web/excalidraw-common";function jn(e,o,t){NS(()=>{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(Xs.POINTER_DOWN,r),document.addEventListener(Xs.TOUCH_START,r),()=>{document.removeEventListener(Xs.POINTER_DOWN,r),document.removeEventListener(Xs.TOUCH_START,r)}},[e,o,t])}import{useRef as BS}from"react";var gr=e=>{let o=BS(e);return Object.assign(o.current,e),o.current};import{jsx as US}from"react/jsx-runtime";var br=he(null),Vb=({onCancel:e,onChange:o,onSelect:t,colorPickerType:r})=>{let n=Vs({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),i=be(),a=xr(),l=Oe(),s=q(a,i),d=gr({app:l,onCancel:e,onChange:o,onSelect:t,selectedElements:s}),{container:c}=Xe();FS(()=>{let p=m.current;if(!p||!l.canvas||!n)return;let u=!1,f=l.canvas.getContext("2d"),b=({clientX:S,clientY:P})=>{let M=f.getImageData((S-i.offsetLeft)*window.devicePixelRatio,(P-i.offsetTop)*window.devicePixelRatio,1,1).data;return GS(M[0],M[1],M[2])},x=({clientX:S,clientY:P,altKey:M})=>{p.style.top=`${P+20}px`,p.style.left=`${S+20}px`;let R=b({clientX:S,clientY:P});u&&d.onChange(r,R,d.selectedElements,{altKey:M}),p.style.background=R},w=()=>{d.onCancel()},E=(S,P)=>{d.onSelect(S,P)},y=S=>{u=!0,S.stopImmediatePropagation()},v=S=>{u=!1,c?.focus(),S.stopImmediatePropagation(),S.preventDefault(),E(b(S),S)},I=S=>{S.key===HS.ESCAPE&&(S.preventDefault(),S.stopImmediatePropagation(),w())};return n.tabIndex=-1,n.focus(),x({clientX:d.app.lastViewportPosition.x,clientY:d.app.lastViewportPosition.y,altKey:!1}),n.addEventListener(fr.KEYDOWN,I),n.addEventListener(fr.POINTER_DOWN,y),n.addEventListener(fr.POINTER_UP,v),window.addEventListener("pointermove",x,{passive:!0}),window.addEventListener(fr.BLUR,w),()=>{u=!1,n.removeEventListener(fr.KEYDOWN,I),n.removeEventListener(fr.POINTER_DOWN,y),n.removeEventListener(fr.POINTER_UP,v),window.removeEventListener("pointermove",x),window.removeEventListener(fr.BLUR,w)}},[d,l.canvas,n,r,c,i.offsetLeft,i.offsetTop]);let m=OS(null);return jn(m,()=>{e()},p=>!!p.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")),n?zS(US("div",{ref:m,className:"excalidraw-eye-dropper-preview"}),n):null};import*as qn from"@radix-ui/react-popover";import XS from"clsx";import KS from"react";import{isInteractive as $S}from"@haoxin-web/excalidraw-common";import YS from"react";import WS from"clsx";import{jsx as VS}from"react/jsx-runtime";var De=YS.forwardRef(({children:e,padding:o,className:t,style:r},n)=>VS("div",{className:WS("Island",t),style:{"--padding":o,...r},ref:n,children:e}));import{jsx as Sp,jsxs as ZS}from"react/jsx-runtime";var Ks=KS.forwardRef(({className:e,container:o,children:t,style:r,onClose:n,onKeyDown:i,onFocusOutside:a,onPointerLeave:l,onPointerDownOutside:s},d)=>{let c=pe();return Sp(qn.Portal,{container:o,children:ZS(qn.Content,{ref:d,className:XS("focus-visible-none",e),"data-prevent-outside-click":!0,side:c.editor.isMobile&&!c.viewport.isLandscape?"bottom":"right",align:c.editor.isMobile&&!c.viewport.isLandscape?"center":"start",alignOffset:-16,sideOffset:20,style:{zIndex:"var(--zIndex-popup)"},onPointerLeave:l,onKeyDown:i,onFocusOutside:a,onPointerDownOutside:s,onCloseAutoFocus:m=>{m.stopPropagation(),m.preventDefault(),o&&!$S(document.activeElement)&&o.focus(),n()},children:[Sp(De,{padding:3,style:r,children:t}),Sp(qn.Arrow,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})});import qS from"clsx";import{useCallback as JS,useEffect as Mp,useRef as $b,useState as QS}from"react";import{KEYS as Lp,getShortcutKey as e6}from"@haoxin-web/excalidraw-common";import{MAX_CUSTOM_COLORS_USED_IN_CANVAS as jS}from"@haoxin-web/excalidraw-common";var Er=({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},Ma=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),kp=({color:e,palette:o})=>!Object.values(o).flat().includes(e),Kb=(e,o,t)=>{let r={elementBackground:"backgroundColor",elementStroke:"strokeColor"},n=e.filter(a=>{if(a.isDeleted)return!1;let l=a[r[o]];return kp({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,jS)},Xt=he(null),Xb=(e,o,t)=>(e*299+o*587+t*114)/1e3,Jn=(e,o=160)=>{if(!e)return!0;if(e==="transparent")return!1;if(!e.startsWith("#")){let i=document.createElement("div");if(i.style.color=e,i.style.color){i.style.position="absolute",i.style.visibility="hidden",i.style.width="0",i.style.height="0",document.body.appendChild(i);let a=getComputedStyle(i).color;document.body.removeChild(i);let l=a.replace(/^(rgb|rgba)\(/,"").replace(/\)$/,"").replace(/\s/g,"").split(","),s=parseInt(l[0]),d=parseInt(l[1]),c=parseInt(l[2]);return Xb(s,d,c)<o}return!0}let t=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),n=parseInt(e.slice(5,7),16);return Xb(t,r,n)<o};import{Fragment as t6,jsx as $s,jsxs as Zb}from"react/jsx-runtime";var jb=({color:e,onChange:o,label:t,colorPickerType:r,placeholder:n})=>{let i=pe(),[a,l]=QS(e),[s,d]=ce(Xt);Mp(()=>{l(e)},[e]);let c=JS(b=>{let x=b.toLowerCase(),w=qb(x);w&&o(w),l(x)},[o]),m=$b(null),p=$b(null);Mp(()=>{m.current&&m.current.focus()},[s]);let[u,f]=ce(br);return Mp(()=>()=>{f(null)},[f]),Zb("div",{className:"color-picker__input-label",children:[$s("div",{className:"color-picker__input-hash",children:"#"}),$s("input",{ref:s==="hex"?m:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":t,onChange:b=>{c(b.target.value)},value:(a||"").replace(/^#/,""),onBlur:()=>{l(e)},tabIndex:-1,onFocus:()=>d("hex"),onKeyDown:b=>{b.key!==Lp.TAB&&(b.key===Lp.ESCAPE&&p.current?.focus(),b.stopPropagation())},placeholder:n}),!i.editor.isMobile&&Zb(t6,{children:[$s("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),$s("div",{ref:p,className:qS("excalidraw-eye-dropper-trigger",{selected:u}),onClick:()=>f(b=>b?null:{keepOpenOnAlt:!1,onSelect:x=>o(x),colorPickerType:r}),title:`${g("labels.eyeDropper")} \u2014 ${Lp.I.toLocaleUpperCase()} or ${e6("Alt")} `,children:nb})]})]})};import Dp,{useEffect as Rp,useImperativeHandle as y6,useState as w6}from"react";import{EVENT as rx}from"@haoxin-web/excalidraw-common";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX as v6,DEFAULT_ELEMENT_STROKE_COLOR_INDEX as T6,KEYS as I6}from"@haoxin-web/excalidraw-common";import n6 from"clsx";import{useEffect as i6,useRef as a6}from"react";import{jsxs as r6}from"react/jsx-runtime";var o6=({color:e,keyLabel:o,isShade:t=!1})=>r6("div",{className:"color-picker__button__hotkey-label",style:{color:Jn(e)?"#fff":"#000"},children:[t&&"\u21E7",o]}),Qn=o6;import{jsx as Pp,jsxs as l6}from"react/jsx-runtime";var Jb=({colors:e,color:o,onChange:t,label:r})=>{let[n,i]=ce(Xt),a=a6(null);return i6(()=>{a.current&&a.current.focus()},[o,n]),Pp("div",{className:"color-picker-content--default",children:e.map((l,s)=>l6("button",{ref:o===l?a:void 0,tabIndex:-1,type:"button",className:n6("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:[Pp("div",{className:"color-picker__button-outline"}),Pp(Qn,{color:l,keyLabel:s+1})]},s))})};import s6 from"clsx";import{useEffect as c6,useRef as d6}from"react";import{jsx as Ap,jsxs as p6}from"react/jsx-runtime";var m6=({palette:e,color:o,onChange:t,activeShade:r})=>{let n=Er({color:o,palette:e}),[i,a]=ce(Xt),l=d6(null);return c6(()=>{l.current&&i==="baseColors"&&l.current.focus()},[n?.colorName,i]),Ap("div",{className:"color-picker-content--default",children:Object.entries(e).map(([s,d],c)=>{let m=(Array.isArray(d)?d[r]:d)||"transparent",p=Ma[c],u=g(`colors.${s.replace(/\d+/,"")}`,null,"");return p6("button",{ref:n?.colorName===s?l:void 0,tabIndex:-1,type:"button",className:s6("color-picker__button color-picker__button--large has-outline",{active:n?.colorName===s,"is-transparent":m==="transparent"||!m}),onClick:()=>{t(m),a("baseColors")},title:`${u}${m.startsWith("#")?` ${m}`:""} \u2014 ${p}`,"aria-label":`${u} \u2014 ${p}`,style:m?{"--swatch-color":m}:void 0,"data-testid":`color-${s}`,children:[Ap("div",{className:"color-picker__button-outline"}),Ap(Qn,{color:m,keyLabel:p})]},s)})})},Qb=m6;import{jsx as h6}from"react/jsx-runtime";var u6=({children:e})=>h6("div",{className:"color-picker__heading",children:e}),ei=u6;import g6 from"clsx";import{useEffect as f6,useRef as b6}from"react";import{jsx as La,jsxs as ex}from"react/jsx-runtime";var tx=({color:e,onChange:o,palette:t})=>{let r=Er({color:e||"transparent",palette:t}),[n,i]=ce(Xt),a=b6(null);if(f6(()=>{a.current&&n==="shades"&&a.current.focus()},[r,n]),r){let{colorName:l,shade:s}=r,d=t[l];if(Array.isArray(d))return La("div",{className:"color-picker-content--default shades",children:d.map((c,m)=>ex("button",{ref:m===s&&n==="shades"?a:void 0,tabIndex:-1,type:"button",className:g6("color-picker__button color-picker__button--large has-outline",{active:m===s}),"aria-label":"Shade",title:`${l} - ${m+1}`,style:c?{"--swatch-color":c}:void 0,onClick:()=>{o(c),i("shades")},children:[La("div",{className:"color-picker__button-outline"}),La(Qn,{color:c,keyLabel:m+1,isShade:!0})]},m))})}return ex("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[La("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),La("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")})]})};import{COLORS_PER_ROW as ti,COLOR_PALETTE as x6,KEYS as Pa}from"@haoxin-web/excalidraw-common";var _p=(e,o,t)=>{let r=Math.ceil(t/ti);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+ti;return n>=t?o%ti:n}case"ArrowUp":{let n=o-ti,i=n<0?ti*r+n:n;return i>=t?void 0:i}}},E6=({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(Ma.includes(e.key)){let l=Ma.indexOf(e.key),s=Object.keys(r)[l],d=r[s],c=Array.isArray(d)?d[a]:d;return t(c),i("baseColors"),!0}return!1},ox=({event:e,activeColorPickerSection:o,palette:t,color:r,onChange:n,customColors:i,setActiveColorPickerSection:a,updateData:l,activeShade:s,onEyeDropperToggle:d,onEscape:c})=>{if(e[Pa.CTRL_OR_CMD])return!1;if(e.key===Pa.ESCAPE)return c(e),!0;if(e.key===Pa.ALT)return d(!0),!0;if(e.key===Pa.I)return d(),!0;let m=Er({color:r,palette:t});if(e.key===Pa.TAB){let p={custom:!!i.length,baseColors:!0,shades:m?.shade!=null,hex:!0},u=Object.entries(p).reduce((E,[y,v])=>(v&&E.push(y),E),[]),f=u.indexOf(o),b=e.shiftKey?-1:1,x=f+b>u.length-1?0:f+b<0?u.length-1:f+b,w=u[x];return w&&a(w),w==="custom"?n(i[0]):w==="baseColors"&&(Object.entries(t).find(([y,v])=>Array.isArray(v)?v.includes(r):v===r?y:null)||n(x6.black)),e.preventDefault(),e.stopPropagation(),!0}if(E6({e,colorObj:m,onChange:n,palette:t,customColors:i,setActiveColorPickerSection:a,activeShade:s}))return!0;if(o==="shades"&&m){let{shade:p}=m,u=_p(e.key,p,ti);if(u!==void 0)return n(t[m.colorName][u]),!0}if(o==="baseColors"&&m){let{colorName:p}=m,u=Object.keys(t),f=u.indexOf(p),b=_p(e.key,f,u.length);if(b!==void 0){let x=u[b],w=t[x];return n(Array.isArray(w)?w[s]:w),!0}}if(o==="custom"){let p=r!=null?i.indexOf(r):0,u=_p(e.key,p,i.length);if(u!==void 0){let f=i[u];return n(f),!0}}return!1};import{jsx as rn,jsxs as Zs}from"react/jsx-runtime";var nx=Dp.forwardRef(({color:e,onChange:o,type:t,elements:r,palette:n,updateData:i,children:a,onEyeDropperToggle:l,onEscape:s},d)=>{let[c]=Dp.useState(()=>t==="canvasBackground"?[]:Kb(r,t,n)),[m,p]=ce(Xt),u=Er({color:e,palette:n});Rp(()=>{if(!m){let w=!!e&&kp({color:e,palette:n}),E=w&&!c.includes(e);p(E?null:w?"custom":u?.shade!=null?"shades":"baseColors")}},[m,e,n,p,u,c]);let[f,b]=w6(u?.shade??(t==="elementBackground"?v6:T6));Rp(()=>{u?.shade!=null&&b(u.shade);let w=E=>{E.key===I6.ALT&&l(!1)};return document.addEventListener(rx.KEYUP,w,{capture:!0}),()=>{document.removeEventListener(rx.KEYUP,w,{capture:!0})}},[u,l]);let x=Dp.useRef(null);return y6(d,()=>x.current),Rp(()=>{x?.current?.focus()},[]),rn("div",{role:"dialog","aria-modal":"true","aria-label":g("labels.colorPicker"),children:Zs("div",{ref:x,onKeyDown:w=>{ox({event:w,activeColorPickerSection:m,palette:n,color:e,onChange:o,onEyeDropperToggle:l,customColors:c,setActiveColorPickerSection:p,updateData:i,activeShade:f,onEscape:s})&&(w.preventDefault(),w.stopPropagation())},className:"color-picker-content properties-content",tabIndex:-1,children:[!!c.length&&Zs("div",{children:[rn(ei,{children:g("colorPicker.mostUsedCustomColors")}),rn(Jb,{colors:c,color:e,label:g("colorPicker.mostUsedCustomColors"),onChange:o})]}),Zs("div",{children:[rn(ei,{children:g("colorPicker.colors")}),rn(Qb,{color:e,palette:n,onChange:o,activeShade:f})]}),Zs("div",{children:[rn(ei,{children:g("colorPicker.shades")}),rn(tx,{color:e,onChange:o,palette:n})]}),a]})})});import C6 from"clsx";import{COLOR_OUTLINE_CONTRAST_THRESHOLD as S6,DEFAULT_CANVAS_BACKGROUND_PICKS as k6,DEFAULT_ELEMENT_BACKGROUND_PICKS as M6,DEFAULT_ELEMENT_STROKE_PICKS as L6}from"@haoxin-web/excalidraw-common";import{jsx as Np}from"react/jsx-runtime";var ix=({onChange:e,type:o,activeColor:t,topPicks:r})=>{let n;return o==="elementStroke"&&(n=L6),o==="elementBackground"&&(n=M6),o==="canvasBackground"&&(n=k6),r&&(n=r),n?Np("div",{className:"color-picker__top-picks",children:n.map(i=>Np("button",{className:C6("color-picker__button",{active:i===t,"is-transparent":i==="transparent"||!i,"has-outline":!Jn(i,S6)}),style:{"--swatch-color":i},type:"button",title:i,onClick:()=>e(i),"data-testid":`color-top-pick-${i}`,children:Np("div",{className:"color-picker__button-outline"})},i))}):(console.error("Invalid type for TopPicks"),null)};import{jsx as lo,jsxs as Bp}from"react/jsx-runtime";var ax=e=>{let o=new Option().style;return o.color=e,!!o.color},qb=e=>D6(e)?e:ax(`#${e}`)?`#${e}`:ax(e)?e:null,R6=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=lx,updateData:a})=>{let{container:l}=Xe(),[,s]=ce(Xt),[d,c]=ce(br),m=Bp("div",{children:[lo(ei,{children:g("colorPicker.hexCode")}),lo(jb,{color:o||"",label:r,onChange:f=>{t(f)},colorPickerType:e,placeholder:g("colorPicker.color")})]}),p=A6(null),u=()=>{p.current?.focus()};return lo(Ks,{container:l,style:{maxWidth:"13rem"},onFocusOutside:f=>{u(),f.preventDefault()},onPointerDownOutside:f=>{d&&f.preventDefault()},onClose:()=>{a({openPopup:null}),s(null)},children:i?lo(nx,{ref:p,palette:i,color:o,onChange:f=>{t(f)},onEyeDropperToggle:f=>{c(b=>f?(b=b||{keepOpenOnAlt:!0,onSelect:t,colorPickerType:e},b.keepOpenOnAlt=!0,b):f===!1||b?null:{keepOpenOnAlt:!1,onSelect:t,colorPickerType:e})},onEscape:f=>{d?c(null):a({openPopup:null})},type:e,elements:n,updateData:a,children:m}):m})},N6=({label:e,color:o,type:t})=>lo(js.Trigger,{type:"button",className:P6("color-picker__button active-color properties-trigger",{"is-transparent":!o||o==="transparent","has-outline":!o||!Jn(o,_6)}),"aria-label":e,style:o?{"--swatch-color":o}:void 0,title:t==="elementStroke"?g("labels.showStroke"):g("labels.showBackground"),children:lo("div",{className:"color-picker__button-outline",children:!o&&f0})}),yr=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=lx,topPicks:a,updateData:l,appState:s})=>lo("div",{children:Bp("div",{role:"dialog","aria-modal":"true",className:"color-picker-container",children:[lo(ix,{activeColor:o,onChange:t,type:e,topPicks:a}),lo(Ws,{}),Bp(js.Root,{open:s.openPopup===e,onOpenChange:d=>{l({openPopup:d?e:null})},children:[lo(N6,{color:o,label:r,type:e}),s.openPopup===e&&lo(R6,{type:e,color:o,onChange:t,label:r,elements:n,palette:i,updateData:l})]})]})});import*as bx from"@radix-ui/react-popover";import m4,{useCallback as p4,useMemo as u4}from"react";import{FONT_FAMILY as Gp}from"@haoxin-web/excalidraw-common";import t4,{useMemo as wr,useState as o4,useRef as r4,useEffect as n4,useCallback as i4}from"react";import{arrayToList as a4,debounce as l4,FONT_FAMILY as nn,getFontFamilyString as s4}from"@haoxin-web/excalidraw-common";import B6 from"clsx";import F6 from"react";import{jsx as O6,jsxs as z6}from"react/jsx-runtime";var qs=F6.forwardRef(({className:e,placeholder:o,onChange:t},r)=>z6("div",{className:B6("QuickSearch__wrapper",e),children:[Nt,O6("input",{ref:r,className:"QuickSearch__input",type:"text",placeholder:o,onChange:n=>t(n.target.value.trim().toLowerCase())})]}));import H6 from"clsx";import{Children as G6}from"react";import{jsx as sx}from"react/jsx-runtime";var Js=({className:e,placeholder:o,children:t})=>{let r=!G6.count(t);return sx("div",{className:H6("ScrollableList__wrapper",e),role:"menu",children:r?sx("div",{className:"empty",children:o}):t})};import{jsx as U6,jsxs as Y6}from"react/jsx-runtime";var cx=({children:e,className:o="",style:t,title:r})=>Y6("div",{className:`dropdown-menu-group ${o}`,style:t,children:[r&&U6("p",{className:"dropdown-menu-group-title",children:r}),e]}),Aa=cx;cx.displayName="DropdownMenuGroup";import{useEffect as J6,useRef as Q6}from"react";import{THEME as e4}from"@haoxin-web/excalidraw-common";import{jsx as W6}from"react/jsx-runtime";var _a=({children:e,...o})=>W6("span",{...o,style:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",...o.style},children:e});import{Fragment as X6,jsx as Qs,jsxs as K6}from"react/jsx-runtime";var V6=({textStyle:e,icon:o,shortcut:t,children:r})=>{let n=pe();return K6(X6,{children:[o&&Qs("div",{className:"dropdown-menu-item__icon",children:o}),Qs("div",{style:e,className:"dropdown-menu-item__text",children:Qs(_a,{children:r})}),t&&!n.editor.isMobile&&Qs("div",{className:"dropdown-menu-item__shortcut",children:t})]})},ec=V6;import $6,{useContext as Z6}from"react";import{EVENT as j6,composeEventHandlers as q6}from"@haoxin-web/excalidraw-common";var Fp=$6.createContext({}),tc=(e="",o=!1,t=!1)=>`dropdown-menu-item dropdown-menu-item-base ${e}
1
+ import{$ as N1,A as zm,B as T1,C as I1,D as C1,E as os,F as pa,G as rs,H as ns,I as S1,J as k1,K as ua,L as M1,M as L1,N as P1,O as A1,P as is,Q as Dn,R as _1,S as FC,T as Hm,U as OC,V as Rn,W as ha,Y as D1,_ as R1,a as E1,aa as as,b as Jr,ba as B1,c as wo,ca as Gm,d as y1,da as Um,e as ye,ea as ls,f as w1,fa as F1,g as q,ga as Ym,h as Ql,ha as zo,i as lr,ia as O1,j as Dm,ja as Wm,k as Rm,ka as z1,l as Pn,la as H1,m as Nm,ma as ss,n as An,na as Vm,o as v1,oa as G1,p as Bm,pa as U1,q as sr,qa as Y1,r as cr,ra as cs,s as It,t as Oo,u as _n,v as es,w as Fm,x as ma,y as ts,z as Om}from"./chunk-MGDE5ZMU.js";import{a as T}from"./chunk-UB3N3ODO.js";import{J as _m}from"./chunk-LUHP3LHA.js";import{c as x1}from"./chunk-Z3N5DIM6.js";import{b as f1,c as b1,d as C}from"./chunk-SRAX5OIU.js";import NU,{useEffect as BU}from"react";import{DEFAULT_UI_OPTIONS as LC,isShallowEqual as FU}from"@haoxin-web/excalidraw-common";import sI from"clsx";import gH from"lodash.throttle";import Fo,{useContext as jr}from"react";import{flushSync as na}from"react-dom";import fH from"roughjs/bin/rough";import{nanoid as bH}from"nanoid";import{clamp as cI,pointFrom as ae,pointDistance as Vr,vector as dI,pointRotateRads as wf,vectorScale as xH,vectorFromPoint as vf,vectorSubtract as mI,vectorDot as pI,vectorNormalize as uI}from"@haoxin-web/excalidraw-math";import{COLOR_PALETTE as EH,CODES as hI,shouldResizeFromCenter as gI,shouldMaintainAspectRatio as Nl,shouldRotateWithDiscreteAngle as Tf,isArrowKey as xm,KEYS as X,APP_NAME as yH,CURSOR_TYPE as Be,DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT as wH,DEFAULT_VERTICAL_ALIGN as fI,DRAGGING_THRESHOLD as vH,ELEMENT_SHIFT_TRANSLATE_AMOUNT as TH,ELEMENT_TRANSLATE_AMOUNT as bI,EVENT as oe,FRAME_STYLE as Xr,IMAGE_MIME_TYPES as IH,IMAGE_RENDER_TIMEOUT as CH,isBrave as SH,LINE_CONFIRM_THRESHOLD as If,MAX_ALLOWED_FILE_BYTES as xI,MIME_TYPES as rr,MQ_MAX_HEIGHT_LANDSCAPE as kH,MQ_MAX_WIDTH_LANDSCAPE as MH,MQ_MAX_WIDTH_PORTRAIT as LH,MQ_RIGHT_SIDEBAR_MIN_WIDTH as PH,POINTER_BUTTON as In,ROUNDNESS as Em,SCROLL_TIMEOUT as AH,TAP_TWICE_TIMEOUT as _H,TEXT_TO_CENTER_SNAP_THRESHOLD as DH,THEME as ym,THEME_FILTER as RH,TOUCH_CTX_MENU_TIMEOUT as NH,VERTICAL_ALIGN as BH,YOUTUBE_STATES as wm,ZOOM_STEP as FH,POINTER_EVENTS as ia,TOOL_TYPE as Bo,isIOS as OH,supportsResizeObserver as EI,DEFAULT_COLLISION_THRESHOLD as yI,DEFAULT_TEXT_ALIGN as zH,ARROW_TYPE as Kr,DEFAULT_REDUCED_GLOBAL_ALPHA as HH,isSafari as GH,isLocalLink as UH,normalizeLink as Cf,toValidURL as YH,getGridPoint as lt,getLineHeight as wI,debounce as vI,distance as aa,getFontString as Sf,getNearestScrollableContainer as WH,isInputLike as TI,isToolIcon as VH,isWritableElement as Bl,sceneCoordsToViewportCoords as vm,tupleToCoors as kf,viewportCoordsToSceneCoords as Ye,wrapEvent as XH,updateObject as Mf,updateActiveTool as nr,getShortcutKey as KH,isTransparent as $H,easeToValuesRAF as ZH,muteFSAbortError as jH,isTestEnv as qf,isDevEnv as lC,easeOut as qH,updateStable as Fl,addEventListener as Fe,normalizeEOL as JH,getDateTime as II,isShallowEqual as QH,arrayToMap as Tm,randomInteger as eG,CLASSES as tG,Emitter as Cn,isMobile as oG,MINIMUM_ARROW_SIZE as CI,DOUBLE_TAP_POSITION_THRESHOLD as rG}from"@haoxin-web/excalidraw-common";import{getObservedAppState as nG,getCommonBounds as la,maybeSuggestBindingsForLinearElementAtCoords as SI,getElementAbsoluteCoords as kI,bindOrUnbindLinearElements as MI,fixBindingsAfterDeletion as iG,getHoveredElementForBinding as Lf,isBindingEnabled as Pf,shouldEnableBindingForPointerEvent as aG,updateBoundElements as Af,getSuggestedBindingsForArrows as _f,LinearElementEditor as Le,newElementWith as $r,newFrameElement as lG,newFreeDrawElement as sG,newEmbeddableElement as LI,newMagicFrameElement as PI,newIframeElement as cG,newArrowElement as dG,newElement as mG,newImageElement as pG,newLinearElement as uG,newTextElement as AI,refreshTextDimensions as hG,deepCopyElement as _I,duplicateElements as DI,hasBoundTextElement as RI,isArrowElement as Df,isBindingElement as Rf,isBindingElementType as NI,isBoundToContainer as Nf,isFrameLikeElement as _t,isImageElement as Sn,isEmbeddableElement as ir,isInitializedImageElement as Ol,isLinearElement as oo,isLinearElementType as gG,isUsingAdaptiveRadius as fG,isIframeElement as sa,isIframeLikeElement as zl,isMagicFrameElement as Bf,isTextBindableContainer as BI,isElbowArrow as je,isFlowchartNodeElement as bG,isBindableElement as xG,isTextElement as yo,getLockedLinearCursorAlignSize as FI,getNormalizedDimensions as EG,isElementCompletelyInViewport as Ff,isElementInViewport as OI,isInvisiblySmallElement as zI,getCornerRadius as yG,isPathALoop as HI,createSrcDoc as GI,embeddableURLValidator as Of,maybeParseEmbedSrc as wG,getEmbedLink as Im,getInitializedImageElements as vG,normalizeSVG as UI,updateImageCache as TG,getBoundTextElement as zf,getContainerCenter as Hf,getContainerElement as YI,isValidTextContainer as IG,redrawTextBoundingBox as CG,shouldShowBoundingBox as SG,getFrameChildren as Gf,isCursorInFrame as WI,addElementsToFrame as Uf,replaceAllElementsInFrame as kG,removeElementsFromFrame as MG,getElementsInResizingFrame as Yf,getElementsInNewFrame as LG,getContainingFrame as Wf,elementOverlapsWithFrame as PG,updateFrameMembershipOfSelectedElements as VI,isElementInFrame as XI,getFrameLikeTitle as AG,getElementsOverlappingFrame as _G,filterElementsEligibleAsFrameChildren as DG,hitElementBoundText as RG,hitElementBoundingBoxOnly as NG,hitElementItself as Hl,getVisibleSceneBounds as BG,FlowChartCreator as FG,FlowChartNavigator as OG,getLinkDirectionFromKey as KI,cropElement as zG,wrapText as HG,isElementLink as Vf,parseElementLinkFromURL as GG,isMeasureTextSupported as UG,normalizeText as YG,measureText as $I,getLineHeightInPx as WG,getApproxMinLineWidth as VG,getApproxMinLineHeight as XG,getMinTextElementWidth as KG,ShapeCache as Gl,getRenderOpacity as $G,editGroupForSelectedElement as ZG,getElementsInGroup as kn,getSelectedGroupIdForElement as jG,getSelectedGroupIds as qG,isElementInGroup as ZI,isSelectedViaGroup as JG,selectGroupsForSelectedElements as ro,syncInvalidIndices as sC,syncMovedIndices as jI,excludeElementsInFramesFromSelection as QG,getSelectionStateForElements as eU,makeNextSelectedElementIds as ve,getResizeOffsetXY as tU,getResizeArrowDirection as oU,transformElements as rU,getCursorForResizingElement as qI,getElementWithTransformHandleType as JI,getTransformHandleTypeFromCoords as QI,dragNewElement as eC,dragSelectedElements as nU,getDragOffsetXY as iU,isNonDeletedElement as tC,Scene as oC,Store as aU,CaptureUpdateAction as Tt,hitElementBoundingBox as lU,isLineElement as Xf,isSimpleArrow as sU,StoreDelta as rC,positionElementsOnGrid as nC}from"@haoxin-web/excalidraw-element";import{KEYS as gp,updateActiveTool as JC}from"@haoxin-web/excalidraw-common";import{getNonDeletedElements as fp}from"@haoxin-web/excalidraw-element";import{fixBindingsAfterDeletion as QC}from"@haoxin-web/excalidraw-element";import{LinearElementEditor as Rb}from"@haoxin-web/excalidraw-element";import{newElementWith as Hs}from"@haoxin-web/excalidraw-element";import{getContainerElement as Nb}from"@haoxin-web/excalidraw-element";import{isBoundToContainer as Os,isElbowArrow as eS,isFrameLikeElement as tS}from"@haoxin-web/excalidraw-element";import{getFrameChildren as oS}from"@haoxin-web/excalidraw-element";import{getElementsInGroup as bp,selectGroupsForSelectedElements as rS}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as zs}from"@haoxin-web/excalidraw-element";import{isDevEnv as UC}from"@haoxin-web/excalidraw-common";import{atom as he,createStore as zC}from"jotai";import{createIsolation as HC}from"jotai-scope";var W1=HC();var{useAtom:ce,useSetAtom:dr,useAtomValue:ds,useStore:YU}=W1,V1=W1.Provider,Ve=zC();var GC=f1({"./locales/ar-SA.json":()=>import("./locales/ar-SA-G6X2FPQ2.js"),"./locales/az-AZ.json":()=>import("./locales/az-AZ-76LH7QW2.js"),"./locales/bg-BG.json":()=>import("./locales/bg-BG-XCXSNQG7.js"),"./locales/bn-BD.json":()=>import("./locales/bn-BD-2XOGV67Q.js"),"./locales/ca-ES.json":()=>import("./locales/ca-ES-6MX7JW3Y.js"),"./locales/cs-CZ.json":()=>import("./locales/cs-CZ-2BRQDIVT.js"),"./locales/da-DK.json":()=>import("./locales/da-DK-5WZEPLOC.js"),"./locales/de-DE.json":()=>import("./locales/de-DE-XR44H4JA.js"),"./locales/el-GR.json":()=>import("./locales/el-GR-BZB4AONW.js"),"./locales/en.json":()=>import("./locales/en-45K2M6JH.js"),"./locales/es-ES.json":()=>import("./locales/es-ES-U4NZUMDT.js"),"./locales/eu-ES.json":()=>import("./locales/eu-ES-A7QVB2H4.js"),"./locales/fa-IR.json":()=>import("./locales/fa-IR-HGAKTJCU.js"),"./locales/fi-FI.json":()=>import("./locales/fi-FI-Z5N7JZ37.js"),"./locales/fr-FR.json":()=>import("./locales/fr-FR-RHASNOE6.js"),"./locales/gl-ES.json":()=>import("./locales/gl-ES-HMX3MZ6V.js"),"./locales/he-IL.json":()=>import("./locales/he-IL-6SHJWFNN.js"),"./locales/hi-IN.json":()=>import("./locales/hi-IN-IWLTKZ5I.js"),"./locales/hu-HU.json":()=>import("./locales/hu-HU-A5ZG7DT2.js"),"./locales/id-ID.json":()=>import("./locales/id-ID-SAP4L64H.js"),"./locales/it-IT.json":()=>import("./locales/it-IT-JPQ66NNP.js"),"./locales/ja-JP.json":()=>import("./locales/ja-JP-DBVTYXUO.js"),"./locales/kaa.json":()=>import("./locales/kaa-6HZHGXH3.js"),"./locales/kab-KAB.json":()=>import("./locales/kab-KAB-ZGHBKWFO.js"),"./locales/kk-KZ.json":()=>import("./locales/kk-KZ-P5N5QNE5.js"),"./locales/km-KH.json":()=>import("./locales/km-KH-HSX4SM5Z.js"),"./locales/ko-KR.json":()=>import("./locales/ko-KR-MTYHY66A.js"),"./locales/ku-TR.json":()=>import("./locales/ku-TR-6OUDTVRD.js"),"./locales/lt-LT.json":()=>import("./locales/lt-LT-XHIRWOB4.js"),"./locales/lv-LV.json":()=>import("./locales/lv-LV-5QDEKY6T.js"),"./locales/mr-IN.json":()=>import("./locales/mr-IN-CRQNXWMA.js"),"./locales/my-MM.json":()=>import("./locales/my-MM-5M5IBNSE.js"),"./locales/nb-NO.json":()=>import("./locales/nb-NO-T6EIAALU.js"),"./locales/nl-NL.json":()=>import("./locales/nl-NL-IS3SIHDZ.js"),"./locales/nn-NO.json":()=>import("./locales/nn-NO-6E72VCQL.js"),"./locales/oc-FR.json":()=>import("./locales/oc-FR-POXYY2M6.js"),"./locales/pa-IN.json":()=>import("./locales/pa-IN-N4M65BXN.js"),"./locales/percentages.json":()=>import("./locales/percentages-BXMCSKIN.js"),"./locales/pl-PL.json":()=>import("./locales/pl-PL-T2D74RX3.js"),"./locales/pt-BR.json":()=>import("./locales/pt-BR-5N22H2LF.js"),"./locales/pt-PT.json":()=>import("./locales/pt-PT-UZXXM6DQ.js"),"./locales/ro-RO.json":()=>import("./locales/ro-RO-JPDTUUEW.js"),"./locales/ru-RU.json":()=>import("./locales/ru-RU-B4JR7IUQ.js"),"./locales/si-LK.json":()=>import("./locales/si-LK-N5RQ5JYF.js"),"./locales/sk-SK.json":()=>import("./locales/sk-SK-C5VTKIMK.js"),"./locales/sl-SI.json":()=>import("./locales/sl-SI-NN7IZMDC.js"),"./locales/sv-SE.json":()=>import("./locales/sv-SE-XGPEYMSR.js"),"./locales/ta-IN.json":()=>import("./locales/ta-IN-2NMHFXQM.js"),"./locales/th-TH.json":()=>import("./locales/th-TH-HPSO5L25.js"),"./locales/tr-TR.json":()=>import("./locales/tr-TR-DEFEU3FU.js"),"./locales/uk-UA.json":()=>import("./locales/uk-UA-QMV73CPH.js"),"./locales/vi-VN.json":()=>import("./locales/vi-VN-M7AON7JQ.js"),"./locales/zh-CN.json":()=>import("./locales/zh-CN-WHMBMDLP.js"),"./locales/zh-HK.json":()=>import("./locales/zh-HK-E62DVLB3.js"),"./locales/zh-TW.json":()=>import("./locales/zh-TW-RAJ6MFWO.js")});var YC=85,vo={code:"en",label:"English"},Bn=[vo,...[{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=>x1[e.code]>=YC).sort((e,o)=>e.label>o.label?1:-1)],ps="__test__";UC()&&Bn.unshift({code:ps,label:"test language"},{code:`${ps}.rtl`,label:"\u202Atest language (rtl)\u202C",rtl:!0});var Nn=vo,ms={},us=async e=>{if(Nn=e,document.documentElement.dir=Nn.rtl?"rtl":"ltr",document.documentElement.lang=Nn.code,e.code.startsWith(ps))ms={};else try{ms=await GC(`./locales/${Nn.code}.json`)}catch(o){console.error(`Failed to load language ${e.code}:`,o.message),ms=_m}Ve.set(K1,e.code)},Ho=()=>Nn,X1=(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(Nn.code.startsWith(ps))return`\u202A[[${o?`${e}(${JSON.stringify(o).slice(1,-1)})`:e}]]\u202C`;let r=e.split("."),n=X1(ms,r)||X1(_m,r)||t;if(n===void 0){let i=`Can't find translation for ${e}`;if(T.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},K1=he(vo.code),We=()=>{let e=ds(K1);return{t:g,langCode:e}};import WC from"clsx";import VC from"open-color";import rt from"react";import{THEME as XC}from"@haoxin-web/excalidraw-common";import{Fragment as xe,jsx as h,jsxs as D}from"react/jsx-runtime";var io=e=>"var(--icon-fill-color)",$1=e=>e===XC.LIGHT?VC.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 h("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${t} ${r}`,className:WC({"rtl-mirror":n}),style:i,...a,children:typeof e=="string"?h("path",{fill:"currentColor",d:e}):e})},H={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},ee={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},iY=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("rect",{x:3,y:8,width:18,height:4,rx:1}),h("line",{x1:12,y1:8,x2:12,y2:21}),h("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),h("path",{d:"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5"})]}),H),Fn=A(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),h("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),h("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),h("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),h("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),H),Z1=A(D("svg",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),h("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),H),j1=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"1"}),h("circle",{cx:"12",cy:"19",r:"1"}),h("circle",{cx:"12",cy:"5",r:"1"})]}),H),q1=A(D("svg",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),h("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),h("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),H),Xm=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M6.5 9.5l3.5 -3"}),h("path",{d:"M14 5.5l3 1.5"}),h("path",{d:"M18.5 10l-2.5 7"}),h("path",{d:"M13.5 17.5l-7 -5"})]}),H),Qr=A(D("g",{children:[h("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z",stroke:"currentColor",strokeWidth:"1.25"}),h("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z",stroke:"currentColor",strokeWidth:"1.25"}),h("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:h("path",{stroke:"none",d:"M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481",fill:"#fff"})}),h("g",{mask:"url(#UnlockedIcon)",children:h("path",{stroke:"none",d:"M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z",fill:"currentColor"})})]}),ee),On=A(D("g",{strokeWidth:"1.25",children:[h("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z"}),h("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),h("path",{d:"M6.667 8.333V5.417C6.667 3.806 8.159 2.5 10 2.5c1.841 0 3.333 1.306 3.333 2.917v2.916"})]}),ee),J1=A(h("g",{fill:"currentColor",children:h("path",{d:"M12 2a5 5 0 0 1 5 5v3a3 3 0 0 1 3 3v6a3 3 0 0 1 -3 3h-10a3 3 0 0 1 -3 -3v-6a3 3 0 0 1 3 -3v-3a5 5 0 0 1 5 -5m0 12a2 2 0 0 0 -1.995 1.85l-.005 .15a2 2 0 1 0 2 -2m0 -10a3 3 0 0 0 -3 3v3h6v-3a3 3 0 0 0 -3 -3"})}),{width:24,height:24}),Q1=A(D(xe,{children:[h("path",{d:"M38.5 83.5c-14-2-17.833-10.473-21-22.5C14.333 48.984 12 22 12 12.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),h("path",{d:"M12.005 10.478c1.92 3.495 3.838 7 7.905 14.423m-7.905-14.423c3.11 5.683 6.23 11.368 7.905 14.423m0 0c-3.68.226-7.35.455-13.91.85m13.91-.85c-5.279.33-10.566.647-13.91.85m0 0c1.936-4.931 3.882-9.86 6.005-15.273M6 25.75c2.069-5.257 4.135-10.505 6.005-15.272",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:41,height:94,fill:"none"}),e0=A(D(xe,{children:[h("path",{d:"M18.026 1.232c-5.268 13.125-5.548 33.555 3.285 42.311 8.823 8.75 33.31 12.304 42.422 13.523",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),h("path",{d:"M72.181 59.247c-3.163-2.429-6.337-4.856-13.058-10m13.058 10c-5.145-3.936-10.292-7.882-13.058-10m0 0c-.78 3.603-1.563 7.196-2.948 13.62m2.948-13.62c-1.126 5.168-2.24 10.346-2.948 13.62m0 0c5.168-1.166 10.334-2.343 16.006-3.62m-16.006 3.62c5.51-1.248 11.01-2.495 16.006-3.62",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:85,height:71,fill:"none"}),t0=A(D(xe,{children:[h("path",{d:"M1 77c14-2 31.833-11.973 35-24 3.167-12.016-6-35-9.5-43.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),h("path",{d:"M24.165 1.093c-.522 3.953-1.037 7.916-2.132 16.309m2.131-16.309c-.835 6.424-1.68 12.854-2.13 16.308m0 0c3.51-1.125 7.013-2.243 13.27-4.257m-13.27 4.257c5.038-1.608 10.08-3.232 13.27-4.257m0 0c-3.595-3.892-7.197-7.777-11.14-12.05m11.14 12.05c-3.837-4.148-7.667-8.287-11.14-12.05",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:38,height:78,fill:"none"}),aY=A(h("g",{fill:"currentColor",children:h("path",{d:"M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z",fill:"currentColor"})}),{width:40,height:40,fill:"none"}),ga=A(D("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 6l4.153 11.793a0.365 .365 0 0 0 .331 .207a0.366 .366 0 0 0 .332 -.207l2.184 -4.793l4.787 -1.994a0.355 .355 0 0 0 .213 -.323a0.355 .355 0 0 0 -.213 -.323l-11.787 -4.36z"}),h("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),hs=A(D("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,children:[h("path",{d:"M4.028 13.252c-.657 -.972 -1.028 -2.078 -1.028 -3.252c0 -3.866 4.03 -7 9 -7s9 3.134 9 7s-4.03 7 -9 7c-1.913 0 -3.686 -.464 -5.144 -1.255"}),h("path",{d:"M5 15m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 17c0 1.42 .316 2.805 1 4"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),To=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),H),mr=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10.5 20.4l-6.9 -6.9c-.781 -.781 -.781 -2.219 0 -3l6.9 -6.9c.781 -.781 2.219 -.781 3 0l6.9 6.9c.781 .781 .781 2.219 0 3l-6.9 6.9c-.781 .781 -2.219 .781 -3 0z"})]}),H),pr=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"})]}),H),ur=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87L13.637 3.59a1.914 1.914 0 0 0 -3.274 0z"})]}),H),hr=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 3.5l2.472 4.81 5.313.773-3.843 3.746.907 5.292L12 15.9 7.151 18.12l.907-5.292L4.215 9.083l5.313-.773L12 3.5z"})]}),H),o0=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 6h12a3 3 0 0 1 3 3v5a3 3 0 0 1 -3 3h-6l-4 3v-3h-2a3 3 0 0 1 -3 -3v-5a3 3 0 0 1 3 -3z"})]}),H),r0=A(D("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{d:"M12 4l8 8-8 8",fill:"none"}),h("line",{x1:"4",y1:"12",x2:"20",y2:"12"})]}),ee),n0=A(D("svg",{viewBox:"0 0 24 24",width:24,height:24,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{d:"M12 4L4 12l8 8",fill:"none"}),h("path",{d:"M12 4l8 8-8 8",fill:"none"}),h("line",{x1:"4",y1:"12",x2:"20",y2:"12"})]}),ee),en=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),h("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),h("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),H),gs=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),h("line",{x1:"5",y1:"12",x2:"9",y2:"8"}),h("line",{x1:"5",y1:"12",x2:"9",y2:"16"}),h("line",{x1:"19",y1:"12",x2:"15",y2:"8"}),h("line",{x1:"19",y1:"12",x2:"15",y2:"16"})]}),H),ao=A(h("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),ee),i0=A(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),h("path",{d:"M16 7h4"}),h("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),H),Dt=A(D("g",{strokeWidth:"1.25",children:[h("path",{clipRule:"evenodd",d:"m7.643 15.69 7.774-7.773a2.357 2.357 0 1 0-3.334-3.334L4.31 12.357a3.333 3.333 0 0 0-.977 2.357v1.953h1.953c.884 0 1.732-.352 2.357-.977Z"}),h("path",{d:"m11.25 5.417 3.333 3.333"})]}),ee),fs=A(D("g",{strokeWidth:1.25,stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(0,-2)",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 15l4 4l8-8l-4-4l-8 8z"}),h("path",{d:"M13 7l3 3"}),h("path",{d:"M4 16l3 3"})]}),ee),Go=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),h("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),h("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),h("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),h("polyline",{points:"5 20 11 4 13 4 20 20"})]}),H),a0=A(D("g",{strokeWidth:"1.25",children:[h("path",{d:"M12.5 6.667h.01"}),h("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z"}),h("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),h("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),ee),fa=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3"}),h("path",{d:"M18 13.3l-6.3 -6.3"})]}),H),Km=A(h("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),ee),$m=A(h("path",{d:"M5 10h10",strokeWidth:"1.25"}),ee),l0=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M21 21l-6 -6"}),h("path",{d:"M3.268 12.043a7.017 7.017 0 0 0 6.634 4.957a7.012 7.012 0 0 0 7.043 -6.131a7 7 0 0 0 -5.314 -7.672a7.021 7.021 0 0 0 -8.241 4.403"}),h("path",{d:"M3 4v4h4"})]}),H),Rt=A(h("path",{strokeWidth:"1.25",d:"M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"}),ee),s0=A(D("g",{strokeWidth:"1.5",children:[h("polyline",{points:"12 16 18 10 12 4"}),h("polyline",{points:"8 4 2 10 8 16"})]}),ee),ba=A(D("g",{strokeWidth:"1.25",children:[h("path",{d:"M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"}),h("path",{clipRule:"evenodd",d:"M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"})]}),ee),xa=A(h("path",{clipRule:"evenodd",d:"M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z",stroke:"currentColor"}),ee),Ea=A(h("g",{stroke:"currentColor",strokeLinejoin:"round",children:h("path",{d:"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667"})}),{...ee,strokeWidth:1.5}),bs=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),h("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),h("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),H),tn=A(h("path",{strokeWidth:"1.25",d:"M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10"}),ee),zn=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"}),h("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),H),c0=A(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"}),h("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),H),Zm=A(h("path",{strokeWidth:"1.25",d:"M9.167 5.833H5.833c-1.254 0-2.5 1.282-2.5 2.5v5.834c0 1.283 1.252 2.5 2.5 2.5h5.834c1.251 0 2.5-1.25 2.5-2.5v-3.334M8.333 11.667l8.334-8.334M12.5 3.333h4.167V7.5"}),ee),xs=A(h("path",{d:"M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5",strokeWidth:"1.25"}),ee),d0=A(D("g",{strokeWidth:"1.25",children:[h("path",{d:"M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0"}),h("path",{d:"M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084"})]}),ee),m0=A(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 4l11.733 16h4.267l-11.733 -16z"}),h("path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"})]}),H),p0=A(h("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),ya=A(D("g",{strokeWidth:"1.25",children:[h("path",{d:"M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"}),h("path",{d:"M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"})]}),ee),u0=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}),h0=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}),Hn=A(h("path",{d:"m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z",strokeWidth:"1.25"}),ee),lY=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}),g0=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"),Es=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z"}),h("path",{d:"M13.737 9.737c2.299 -2.3 3.23 -5.095 2.081 -6.245c-1.15 -1.15 -3.945 -.217 -6.244 2.082c-2.3 2.299 -3.231 5.095 -2.082 6.244c1.15 1.15 3.946 .218 6.245 -2.081z"}),h("path",{d:"M7.492 11.818c.362 .362 .768 .676 1.208 .934l6.895 4.047c1.078 .557 2.255 -.075 3.692 -1.512c1.437 -1.437 2.07 -2.614 1.512 -3.692c-.372 -.718 -1.72 -3.017 -4.047 -6.895a6.015 6.015 0 0 0 -.934 -1.208"})]}),H),f0=A(h("g",{strokeWidth:1.5,children:h("path",{d:"M6 18l12 -12"})}),H),ys=A(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 8h.01"}),h("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),h("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),h("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),h("path",{d:"M19 16v6"}),h("path",{d:"M22 19l-3 3l-3 -3"})]}),H),b0=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}),sY=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}),cY=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}),x0=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"),dY=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"),jm=A(h("path",{d:"M7.5 10.833 4.167 7.5 7.5 4.167M4.167 7.5h9.166a3.333 3.333 0 0 1 0 6.667H12.5",strokeWidth:"1.25"}),ee),qm=A(h("path",{d:"M12.5 10.833 15.833 7.5 12.5 4.167M15.833 7.5H6.667a3.333 3.333 0 1 0 0 6.667H7.5",strokeWidth:"1.25"}),ee),E0=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}),y0=A(h("path",{d:"M5 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 17.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7.25 8.917l5.5-2.834M7.25 11.083l5.5 2.834",strokeWidth:"1.5"}),ee),mY=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"),pY=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}),uY=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 9h-1a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-8a2 2 0 0 0 -2 -2h-1"}),h("path",{d:"M12 14v-11"}),h("path",{d:"M9 6l3 -3l3 3"})]}),H),hY=A(D(xe,{children:[h("path",{fill:"currentColor",d:"M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z"}),h("path",{stroke:"currentColor",fill:"currentColor",d:"M0 36v20h48v-6.2c0-6 0-6.1-2-4.3-1.1 1-2 2.9-2 4.2V52H4V34c0-17.3-.1-18-2-18s-2 .7-2 20z"})]}),{width:64,height:64}),gY=A(h("path",{stroke:"currentColor",strokeWidth:"40",fill:"currentColor",d:"M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z"}),{width:1024}),w0=D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 10l0 10"}),h("path",{d:"M12 10l4 4"}),h("path",{d:"M12 10l-4 4"}),h("path",{d:"M4 4l16 0"})]}),v0=D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 5l0 14"}),h("path",{d:"M16 9l-4 -4"}),h("path",{d:"M8 9l4 -4"})]}),Jm=A(v0,H),Qm=A(v0,{...H,style:{transform:"rotate(180deg)"}}),ep=A(w0,H),tp=A(w0,{...H,style:{transform:"rotate(180deg)"}}),op=A(D(xe,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v7.083c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V8.125c0-.92-.746-1.667-1.666-1.667ZM6.875 6.458h-.417c-.92 0-1.666.747-1.666 1.667v3.75c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667v-3.75c0-.92-.747-1.667-1.667-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),rp=A(D(xe,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M6.875 3.125h-.417c-.92 0-1.666.746-1.666 1.667v7.083c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667V4.792c0-.92-.747-1.667-1.667-1.667ZM13.542 5.817h-.417c-.92 0-1.667.747-1.667 1.667v4.391c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V7.484c0-.92-.746-1.667-1.666-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),np=A(D(xe,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M15.208 4.792H8.125c-.92 0-1.667.746-1.667 1.666v.417c0 .92.747 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM12.516 11.458H8.125c-.92 0-1.667.746-1.667 1.667v.417c0 .92.747 1.666 1.667 1.666h4.391c.92 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.667-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),ip=A(D(xe,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M11.875 4.792H4.792c-.92 0-1.667.746-1.667 1.666v.417c0 .92.746 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM11.683 11.458H7.292c-.92 0-1.667.746-1.667 1.667v.417c0 .92.746 1.666 1.667 1.666h4.39c.921 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.666-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),T0=A(D(xe,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M14.375 10.208v-.416c0-.92-.746-1.667-1.667-1.667H7.292c-.92 0-1.667.746-1.667 1.667v.416c0 .92.746 1.667 1.667 1.667h5.416c.92 0 1.667-.746 1.667-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),I0=A(D(xe,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M10.208 5.625h-.416c-.92 0-1.667.746-1.667 1.667v5.416c0 .92.746 1.667 1.667 1.667h.416c.92 0 1.667-.746 1.667-1.667V7.292c0-.92-.746-1.667-1.667-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),ap=A(D("g",{stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),h("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M6.875 4.792h-.417c-.92 0-1.666.746-1.666 1.666v7.084c0 .92.746 1.666 1.666 1.666h.417c.92 0 1.667-.746 1.667-1.666V6.458c0-.92-.747-1.666-1.667-1.666ZM13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v3.75c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667v-3.75c0-.92-.746-1.667-1.666-1.667Z"})]}),ee),lp=A(D("g",{stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),h("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M4.792 13.125v.417c0 .92.746 1.666 1.666 1.666h7.084c.92 0 1.666-.746 1.666-1.666v-.417c0-.92-.746-1.667-1.666-1.667H6.458c-.92 0-1.666.746-1.666 1.667ZM6.458 6.458v.417c0 .92.747 1.667 1.667 1.667h3.75c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666h-3.75c-.92 0-1.667.746-1.667 1.666Z"})]}),ee),ws=A(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"9",cy:"7",r:"4"}),h("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),h("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),h("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),H),fY=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"),bY=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"),Wt=A(D(xe,{children:[h("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("path",{d:"M15 5 5 15M5 5l10 10"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),xY=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}),EY=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}),yY=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}),sp=rt.memo(({theme:e})=>A(D(xe,{children:[h("path",{d:"M25 26H111V111H25",fill:io(e)}),h("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:io(e),strokeWidth:"2"}),h("path",{d:"M100 100H160V160H100",fill:io(e)}),h("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:io(e),strokeWidth:"2"}),D("g",{fill:$1(e),stroke:io(e),strokeWidth:"6",children:[h("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),cp=rt.memo(({theme:e})=>A(D(xe,{children:[h("path",{d:"M25 26H111V111H25",fill:io(e)}),h("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:io(e),strokeWidth:"2"}),h("path",{d:"M100 100H160V160H100",fill:io(e)}),h("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:io(e),strokeWidth:"2"}),D("g",{fill:$1(e),stroke:io(e),strokeWidth:"6",children:[h("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),h("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),C0=A(h("g",{strokeWidth:1.25,children:h("path",{d:"M5.879 2.625h8.242a3.27 3.27 0 0 1 3.254 3.254v8.242a3.27 3.27 0 0 1-3.254 3.254H5.88a3.27 3.27 0 0 1-3.254-3.254V5.88A3.27 3.27 0 0 1 5.88 2.626l-.001-.001ZM4.518 16.118l7.608-12.83m.198 13.934 5.051-9.897M2.778 9.675l9.348-6.387m-7.608 12.83 12.857-8.793"})}),ee),vs=A(D(xe,{children:[h("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),h("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:h("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.25"})}),h("g",{mask:"url(#FillHachureIcon)",children:h("path",{d:"M2.258 15.156 15.156 2.258M7.324 20.222 20.222 7.325m-20.444 5.35L12.675-.222m-8.157 18.34L17.416 5.22",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})]}),ee),Ts=A(D(xe,{children:[D("g",{clipPath:"url(#a)",children:[h("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),h("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:h("path",{d:"M2.426 15.044 15.044 2.426M7.383 20 20 7.383M0 12.617 12.617 0m-7.98 17.941L17.256 5.324m-2.211 12.25L2.426 4.956M20 12.617 7.383 0m5.234 20L0 7.383m17.941 7.98L5.324 2.745",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("g",{mask:"url(#FillCrossHatchIcon)",children:h("path",{d:"M14.121 2H5.88A3.879 3.879 0 0 0 2 5.879v8.242A3.879 3.879 0 0 0 5.879 18h8.242A3.879 3.879 0 0 0 18 14.121V5.88A3.879 3.879 0 0 0 14.121 2Z",fill:"currentColor"})})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),Is=A(D(xe,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z",stroke:"currentColor",strokeWidth:"1.25"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),{...ee,fill:"currentColor"}),Gn=A(h(xe,{children:h("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),ee),wa=A(h("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),ee),va=A(h("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),ee),wY=rt.memo(({theme:e})=>A(h("path",{d:"M6 10H34",stroke:io(e),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})),S0=A(D("g",{strokeWidth:"2",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12h2"}),h("path",{d:"M17 12h2"}),h("path",{d:"M11 12h2"})]}),H),k0=A(D("g",{strokeWidth:"2",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 12v.01"}),h("path",{d:"M8 12v.01"}),h("path",{d:"M12 12v.01"}),h("path",{d:"M16 12v.01"}),h("path",{d:"M20 12v.01"})]}),H),M0=A(h("path",{d:"M2.5 12.038c1.655-.885 5.9-3.292 8.568-4.354 2.668-1.063.101 2.821 1.32 3.104 1.218.283 5.112-1.814 5.112-1.814",strokeWidth:"1.25"}),ee),L0=A(h("path",{d:"M2.5 12.563c1.655-.886 5.9-3.293 8.568-4.355 2.668-1.062.101 2.822 1.32 3.105 1.218.283 5.112-1.814 5.112-1.814m-13.469 2.23c2.963-1.586 6.13-5.62 7.468-4.998 1.338.623-1.153 4.11-.132 5.595 1.02 1.487 6.133-1.43 6.133-1.43",strokeWidth:"1.25"}),ee),P0=A(h("path",{d:"M2.5 11.936c1.737-.879 8.627-5.346 10.42-5.268 1.795.078-.418 5.138.345 5.736.763.598 3.53-1.789 4.235-2.147M2.929 9.788c1.164-.519 5.47-3.28 6.987-3.114 1.519.165 1 3.827 2.121 4.109 1.122.281 3.839-2.016 4.606-2.42",strokeWidth:"1.25"}),ee),A0=A(D("svg",{strokeWidth:"1.5",children:[h("path",{d:"M3.33334 9.99998V6.66665C3.33334 6.04326 3.33403 4.9332 3.33539 3.33646C4.95233 3.33436 6.06276 3.33331 6.66668 3.33331H10"}),h("path",{d:"M13.3333 3.33331V3.34331"}),h("path",{d:"M16.6667 3.33331V3.34331"}),h("path",{d:"M16.6667 6.66669V6.67669"}),h("path",{d:"M16.6667 10V10.01"}),h("path",{d:"M3.33334 13.3333V13.3433"}),h("path",{d:"M16.6667 13.3333V13.3433"}),h("path",{d:"M3.33334 16.6667V16.6767"}),h("path",{d:"M6.66666 16.6667V16.6767"}),h("path",{d:"M10 16.6667V16.6767"}),h("path",{d:"M13.3333 16.6667V16.6767"}),h("path",{d:"M16.6667 16.6667V16.6767"})]}),ee),_0=A(D("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),h("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),h("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),h("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),h("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),h("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),h("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),h("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),h("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),h("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),h("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),h("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),H),D0=A(D("g",{stroke:"currentColor",opacity:.3,strokeWidth:2,children:[h("path",{d:"M12 12l9 0"}),h("path",{d:"M3 9l6 6"}),h("path",{d:"M3 15l6 -6"})]}),H),R0=rt.memo(({flip:e=!1})=>A(D("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[h("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),h("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})),N0=rt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[h("path",{d:"M32 10L6 10",strokeWidth:2}),h("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),B0=rt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[h("path",{d:"M26 10L6 10"}),h("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),F0=rt.memo(({flip:e=!1})=>A(h("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",children:h("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})),O0=rt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[h("path",{d:"M32 10L6 10",strokeWidth:2}),h("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})),z0=rt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",children:[h("path",{d:"M6,9.5H27"}),h("path",{d:"M27,5L34,10L27,14Z",fill:"none"})]}),{width:40,height:20})),H0=rt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{d:"M6,9.5H20"}),h("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),G0=rt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{d:"M6,9.5H20"}),h("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),U0=rt.memo(({flip:e=!1})=>A(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),Y0=rt.memo(({flip:e=!1})=>A(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L15,15 L15,5"})}),{width:40,height:20})),W0=rt.memo(({flip:e=!1})=>A(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L15,16 L15,4 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),V0=A(D(xe,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M14.167 6.667a3.333 3.333 0 0 0-3.334-3.334H9.167a3.333 3.333 0 0 0 0 6.667h1.666a3.333 3.333 0 0 1 0 6.667H9.167a3.333 3.333 0 0 1-3.334-3.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),X0=A(D(xe,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),K0=A(D(xe,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),$0=A(h(xe,{children:h("path",{d:"m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),ee),on=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 7v-2h13v2"}),h("path",{d:"M10 5v14"}),h("path",{d:"M12 19h-4"}),h("path",{d:"M15 13v-1h6v1"}),h("path",{d:"M18 12v7"}),h("path",{d:"M17 19h2"})]}),H),Z0=A(h(xe,{children:D("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 12h10"}),h("path",{d:"M7 5v14"}),h("path",{d:"M17 5v14"}),h("path",{d:"M15 19h4"}),h("path",{d:"M15 5h4"}),h("path",{d:"M5 19h4"}),h("path",{d:"M5 5h4"})]})}),H),Ta=A(h(xe,{children:h("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("path",{d:"M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334"})})}),ee),Cs=A(D(xe,{children:[h("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("path",{d:"M5.833 6.667 2.5 10l3.333 3.333M14.167 6.667 17.5 10l-3.333 3.333M11.667 3.333 8.333 16.667"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ee),Ss=A(D("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),h("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),H),ks=A(D("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),h("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),H),Ms=A(D("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),h("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),H),j0=rt.memo(({theme:e})=>A(D("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),h("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),H)),q0=rt.memo(({theme:e})=>A(D("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),h("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),H)),J0=rt.memo(({theme:e})=>A(D("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),h("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),h("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),H)),Ls=A(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M21 19h-18l9 -15"}),h("path",{d:"M20.615 15.171h.015"}),h("path",{d:"M19.515 11.771h.015"}),h("path",{d:"M17.715 8.671h.015"}),h("path",{d:"M15.415 5.971h.015"})]}),H),Q0=A(h("path",{d:"M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z",fill:"currentColor"}),{width:640,height:512}),vY=A(h("path",{d:"M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z"})),Ps=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),h("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),h("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),h("path",{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"})]}),H),dp=A(D(xe,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),h("path",{d:"M7 11l5 5l5 -5"}),h("path",{d:"M12 4l0 12"})]}),H),Un=A(D(xe,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"}),h("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]}),H),eb=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("path",{d:"M9.15 14.85l8.85 -10.85"}),h("path",{d:"M6 4l8.85 10.85"})]}),H),tb=A(D(xe,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),h("path",{d:"M12 17l0 .01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),H),TY=A(D(xe,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 4v16l13 -8z"})]}),H),IY=A(D(xe,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z",strokeWidth:"0",fill:"currentColor"})]}),H),ob=A(D(xe,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12l5 5l10 -10"})]}),H),rb=A(D(xe,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z"}),h("path",{d:"M12 9v4"}),h("path",{d:"M12 17h.01"})]}),H),nb=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M11 7l6 6"}),h("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"})]}),H),ib=A(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 3l-4 7h8z"}),h("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("path",{d:"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"})]}),H),Yn=A(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 7l16 0"}),h("path",{d:"M4 17l16 0"}),h("path",{d:"M7 4l0 16"}),h("path",{d:"M17 4l0 16"})]}),H),ab=A(h("path",{fill:"currentColor",d:"M407.48,111.18C335.587,108.103 269.573,152.338 245.08,220C220.587,152.338 154.573,108.103 82.68,111.18C80.285,168.229 107.577,222.632 154.74,254.82C178.908,271.419 193.35,298.951 193.27,328.27L193.27,379.13L296.9,379.13L296.9,328.27C296.816,298.953 311.255,271.42 335.42,254.82C382.596,222.644 409.892,168.233 407.48,111.18Z"})),Wn=A(D("g",{strokeWidth:"1.25",children:[h("path",{d:"M4.16602 10H15.8327"}),h("path",{d:"M12.5 13.3333L15.8333 10"}),h("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),ee),lb=A(D("g",{strokeWidth:1.5,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{d:"M5 12h10"}),h("path",{d:"M11 8l4 4l-4 4"})]}),H),sb=A(D("g",{strokeWidth:1.5,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{d:"M5 12h14"}),h("path",{d:"M9 8l-4 4l4 4"}),h("path",{d:"M15 8l4 4l-4 4"})]}),H),Uo=A(D("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[h("path",{clipRule:"evenodd",d:"m9.644 13.69 7.774-7.773a2.357 2.357 0 0 0-3.334-3.334l-7.773 7.774L8 12l1.643 1.69Z"}),h("path",{d:"m13.25 3.417 3.333 3.333M10 10l2-2M5 15l3-3M2.156 17.894l1-1M5.453 19.029l-.144-1.407M2.377 11.887l.866 1.118M8.354 17.273l-1.194-.758M.953 14.652l1.408.13"})]}),20),cb=A(D("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[h("path",{clipRule:"evenodd",d:"m9.644 13.69 7.774-7.773a2.357 2.357 0 0 0-3.334-3.334l-7.773 7.774L8 12l1.643 1.69Z"}),h("path",{d:"m13.25 3.417 3.333 3.333M10 10l2-2M5 15l3-3M2.156 17.894l1-1M5.453 19.029l-.144-1.407M2.377 11.887l.866 1.118M8.354 17.273l-1.194-.758M.953 14.652l1.408.13"}),h("circle",{cx:"3",cy:"16",r:"0.8",fill:"currentColor",opacity:"0.7"}),h("circle",{cx:"5",cy:"18",r:"0.6",fill:"currentColor",opacity:"0.5"}),h("circle",{cx:"7.5",cy:"17",r:"0.8",fill:"currentColor",opacity:"0.6"}),h("circle",{cx:"10",cy:"19",r:"0.4",fill:"currentColor",opacity:"0.3"})]}),20),db=A(D("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z"}),h("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),h("path",{d:"M15 6l3 3"}),h("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),h("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),H),CY=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z"}),h("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),h("path",{d:"M15 6l3 3"}),h("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),h("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),H),SY=A(D("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35"}),h("path",{d:"M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946"}),h("path",{d:"M6 7.63c-1.391 -.236 -2.787 .395 -3.534 1.689a3.474 3.474 0 0 0 1.271 4.745l4.263 2.514l6 -3.348"}),h("path",{d:"M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45"}),h("path",{d:"M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946"}),h("path",{d:"M18 16.302c1.391 .236 2.787 -.395 3.534 -1.689a3.474 3.474 0 0 0 -1.271 -4.745l-4.308 -2.514l-5.955 3.42"})]}),H),mb=A(D("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),h("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),h("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),h("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"})]}),H),Vn=A(D("g",{stroke:"currentColor",fill:"none",strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"}),h("path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"})]}),H),pb=A(D("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"}),h("path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"}),h("path",{d:"M3 3l18 18"})]}),H),ub=A(D("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),h("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),h("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),h("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),h("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),h("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),H),hb=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),h("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),h("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),h("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),h("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),h("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),H),Nt=A(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),h("path",{d:"M21 21l-6 -6"})]}),H),gb=A(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M20.984 12.53a9 9 0 1 0 -7.552 8.355"}),h("path",{d:"M12 7v5l3 3"}),h("path",{d:"M19 16l-2 3h4l-2 3"})]}),H),fb=A(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M9 2m0 3a3 3 0 0 1 3 -3h0a3 3 0 0 1 3 3v5a3 3 0 0 1 -3 3h0a3 3 0 0 1 -3 -3z"}),h("path",{d:"M5 10a7 7 0 0 0 14 0"}),h("path",{d:"M8 21l8 0"}),h("path",{d:"M12 17l0 4"})]}),H),bb=A(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 3l18 18"}),h("path",{d:"M9 5a3 3 0 0 1 6 0v5a3 3 0 0 1 -.13 .874m-2 2a3 3 0 0 1 -3.87 -2.872v-1"}),h("path",{d:"M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85"}),h("path",{d:"M8 21l8 0"}),h("path",{d:"M12 17l0 4"})]}),H),Ia=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"})]}),H),xb=A(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 8m0 1a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1z"}),h("path",{d:"M12 20v.01"}),h("path",{d:"M16 20v.01"}),h("path",{d:"M8 20v.01"}),h("path",{d:"M4 20v.01"}),h("path",{d:"M4 16v.01"}),h("path",{d:"M4 12v.01"}),h("path",{d:"M4 8v.01"}),h("path",{d:"M4 4v.01"}),h("path",{d:"M8 4v.01"}),h("path",{d:"M12 4v.01"}),h("path",{d:"M16 4v.01"}),h("path",{d:"M20 4v.01"}),h("path",{d:"M20 8v.01"}),h("path",{d:"M20 12v.01"}),h("path",{d:"M20 16v.01"}),h("path",{d:"M20 20v.01"})]}),H),Eb=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 3v18"}),h("path",{d:"M19 21v-18"}),h("path",{d:"M5 7h14"}),h("path",{d:"M5 15h14"}),h("path",{d:"M8 13v4"}),h("path",{d:"M11 13v4"}),h("path",{d:"M16 13v4"}),h("path",{d:"M14 5v4"}),h("path",{d:"M11 5v4"}),h("path",{d:"M8 5v4"}),h("path",{d:"M3 21h18"})]}),H),yb=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 12l18 0"}),h("path",{d:"M7 16l10 0l-10 5l0 -5"}),h("path",{d:"M7 8l10 0l-10 -5l0 5"})]}),H),wb=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 3l0 18"}),h("path",{d:"M16 7l0 10l5 0l-5 -10"}),h("path",{d:"M8 7l0 10l-5 0l5 -10"})]}),H),mp=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"}),h("path",{d:"M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"}),h("path",{d:"M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"})]}),H),As=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"}),h("path",{d:"M22 22l-3 -3"}),h("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),h("path",{d:"M3 11v-1"}),h("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),h("path",{d:"M10 3h1"}),h("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"})]}),H),vb=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),h("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),h("path",{d:"M4 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"}),h("path",{d:"M10 15l2 6l2 -6"}),h("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"})]}),H),Tb=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),h("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),h("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"}),h("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"}),h("path",{d:"M11 21v-6l3 6v-6"})]}),H),Ib=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 13v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a2 2 0 0 0 6 0v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a8 8 0 0 1 -16 0"}),h("path",{d:"M4 8l5 0"}),h("path",{d:"M15 8l4 0"})]}),H),Cb=A(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 14c.83 .642 2.077 1.017 3.5 1c1.423 .017 2.67 -.358 3.5 -1c.83 -.642 2.077 -1.017 3.5 -1c1.423 -.017 2.67 .358 3.5 1"}),h("path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),h("path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),h("path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z"}),h("path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555"})]}),H),Sb=A(D("g",{stroke:"currentColor",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 5a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-16a1 1 0 0 1-1-1v-10zM7 20h10M9 16v4M15 16v4"})]}),{...H,strokeWidth:1.5}),kY=A(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"}),h("path",{d:"M21 12h-13l3 -3"}),h("path",{d:"M11 15l-3 -3"})]}),H),kb=A(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8z"}),h("path",{d:"M10 9l5 3l-5 3z"})]}),H),Mb=A(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 6h18"}),h("path",{d:"M3 12h18"}),h("path",{d:"M3 18h18"}),h("path",{d:"M6 3v18"}),h("path",{d:"M12 3v18"}),h("path",{d:"M18 3v18"})]}),H),Lb=A(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M17 3m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),h("path",{d:"M3 17m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),h("path",{d:"M17 5c-6.627 0 -12 5.373 -12 12"})]}),H),_s=A(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 18l12 -12"}),h("path",{d:"M18 10v-4h-4"})]}),H),Ds=A(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4,19L10,19C11.097,19 12,18.097 12,17L12,9C12,7.903 12.903,7 14,7L21,7"}),h("path",{d:"M18 4l3 3l-3 3"})]}),H),Rs=A(D("g",{children:[h("path",{d:"M16,12L20,9L16,6"}),h("path",{d:"M6 20c0 -6.075 4.925 -11 11 -11h3"})]}),H),Ns=A(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 9l6 6l6 -6"})]}),H),Pb=A(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 15l6 -6l6 6"})]}),H),Ab=A(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 15l6 -6l6 6"})]}),H),pp=A(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"}),h("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"})]}),H),Bs=A(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 7l0 10"}),h("path",{d:"M7 5l10 0"}),h("path",{d:"M7 19l10 0"}),h("path",{d:"M19 7l0 10"})]}),H);import _b from"clsx";import hp,{useEffect as ZC,useRef as Db,useState as jC}from"react";import{isPromiseLike as qC}from"@haoxin-web/excalidraw-common";import KC from"react";import{jsx as up}from"react/jsx-runtime";var $C=({size:e="1em",circleWidth:o=8,synchronized:t=!1,className:r=""})=>{let i=-(KC.useRef(Date.now()).current%1600);return up("div",{className:`Spinner ${r}`,children:up("svg",{viewBox:"0 0 100 100",style:{width:e,height:e,"--spinner-delay":t?`${i}ms`:0},children:up("circle",{cx:"50",cy:"50",r:50-o/2,strokeWidth:o,fill:"none",strokeMiterlimit:"10"})})})},nt=$C;import{jsx as Ca,jsxs as Sa}from"react/jsx-runtime";var z=hp.forwardRef(({size:e="medium",visible:o=!0,className:t="",...r},n)=>{let{id:i}=Xe(),a=hp.useRef(null);hp.useImperativeHandle(n,()=>a.current);let l=`ToolIcon_size_${e}`,[s,d]=jC(!1),c=Db(!0),m=async u=>{let f="onClick"in r&&r.onClick?.(u);if(qC(f))try{d(!0),await f}catch(b){if(b instanceof An)console.warn(b);else throw b}finally{c.current&&d(!1)}};ZC(()=>(c.current=!0,()=>{c.current=!1}),[]);let p=Db(null);if(r.type==="button"||r.type==="icon"||r.type==="submit"){let u=r.type==="icon"?"button":r.type;return Sa("button",{className:_b("ToolIcon_type_button",l,t,o&&!r.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!r.hidden,"ToolIcon--selected":r.selected,"ToolIcon--plain":r.type==="icon"}),style:r.style,"data-testid":r["data-testid"],hidden:r.hidden,title:r.title,"aria-label":r["aria-label"],type:u,onClick:m,ref:a,disabled:s||r.isLoading||!!r.disabled,children:[(r.icon||r.label)&&Sa("div",{className:"ToolIcon__icon","aria-hidden":"true","aria-disabled":!!r.disabled,children:[r.icon||r.label,r.keyBindingLabel&&Ca("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel}),r.isLoading&&Ca(nt,{})]}),r.showAriaLabel&&Sa("div",{className:"ToolIcon__label",children:[r["aria-label"]," ",s&&Ca(nt,{})]}),r.children]})}return Sa("label",{className:_b("ToolIcon",t),title:r.title,onPointerDown:u=>{p.current=u.pointerType||null,r.onPointerDown?.({pointerType:u.pointerType||null})},onPointerUp:()=>{requestAnimationFrame(()=>{p.current=null})},children:[Ca("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}),Sa("div",{className:"ToolIcon__icon",children:[r.icon,r.keyBindingLabel&&Ca("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel})]})]})});z.displayName="ToolButton";var Fs=[],F=e=>(Fs=Fs.concat(e),e);import{jsx as iS}from"react/jsx-runtime";var nS=(e,o,t)=>{let r=new Set(q(e.filter(c=>tS(c)),o).map(c=>c.id)),n={},i=t.scene.getNonDeletedElementsMap(),a=new Set;for(let c of r){let m=oS(e,c);for(let p of m)if(!a.has(p.id)){if(Os(p)){let u=Nb(p,i);u&&(n[u.id]=!0)}else n[p.id]=!0;a.add(p.id)}}let l=!0,s=e.map(c=>{if(o.selectedElementIds[c.id]){let m=Os(c)?Nb(c,i):null;return c.frameId&&r.has(c.frameId)?(l=!1,n[c.id]=!0,c):m?.frameId&&r.has(m?.frameId)?c:(c.boundElements&&c.boundElements.forEach(p=>{let u=t.scene.getNonDeletedElementsMap().get(p.id);u&&eS(u)&&t.scene.mutateElement(u,{startBinding:c.id===u.startBinding?.elementId?null:u.startBinding,endBinding:c.id===u.endBinding?.elementId?null:u.endBinding})}),Hs(c,{isDeleted:!0}))}return c.frameId&&r.has(c.frameId)?(l=!1,Os(c)||(n[c.id]=!0),Hs(c,{frameId:null})):Os(c)&&o.selectedElementIds[c.containerId]?Hs(c,{isDeleted:!0}):c}),d=o.editingGroupId;if(l&&o.editingGroupId){let c=bp(s,o.editingGroupId).filter(m=>!m.isDeleted);if(c.length>1)c[0]&&(n[c[0].id]=!0);else{d=null,c[0]&&(n[c[0].id]=!0);let m=c[0];if(m){let p=m.groupIds.findIndex(f=>f===o.editingGroupId),u=m.groupIds[p+1];if(u){let f=bp(s,u).filter(b=>!b.isDeleted);f.length>1&&(d=u,f.forEach(b=>{n[b.id]=!0}))}}}}return{elements:s,appState:{...o,...rS({selectedElementIds:n,editingGroupId:d},s,o,null)}}},Bb=(e,o)=>{if(e.editingGroupId){let t=bp(fp(o),e.editingGroupId);if(t.length)return{...e,selectedElementIds:{[t[0].id]:!0}}}return e},ka=F({name:"deleteSelectedElements",label:"labels.delete",icon:Rt,trackEvent:{category:"element",action:"delete"},perform:(e,o,t,r)=>{if(o.selectedLinearElement?.isEditing){let{elementId:a,selectedPointsIndices:l,startBindingElement:s,endBindingElement:d}=o.selectedLinearElement,c=r.scene.getNonDeletedElementsMap(),m=Rb.getElement(a,c);if(!m||l==null)return!1;if(l.length>=m.points.length){let u=e.map(b=>b.id===m.id?Hs(b,{isDeleted:!0}):b),f=Bb(o,u);return{elements:u,appState:{...f,selectedLinearElement:null},captureUpdate:zs.IMMEDIATELY}}let p={startBindingElement:l?.includes(0)?null:s,endBindingElement:l?.includes(m.points.length-1)?null:d};return Rb.deletePoints(m,r,l),{elements:e,appState:{...o,selectedLinearElement:{...o.selectedLinearElement,...p,selectedPointsIndices:l?.[0]>0?[l[0]-1]:[0]}},captureUpdate:zs.IMMEDIATELY}}let{elements:n,appState:i}=nS(e,o,r);return QC(n,n.filter(a=>a.isDeleted)),i=Bb(i,n),{elements:n,appState:{...i,activeTool:JC(o,{type:r.defaultSelectionTool}),multiElement:null,activeEmbeddable:null,selectedLinearElement:null},captureUpdate:ye(fp(e),o)?zs.IMMEDIATELY:zs.EVENTUALLY}},keyTest:(e,o,t)=>(e.key===gp.BACKSPACE||e.key===gp.DELETE)&&!e[gp.CTRL_OR_CMD],PanelComponent:({elements:e,appState:o,updateData:t})=>iS(z,{type:"button",icon:Rt,title:g("labels.delete"),"aria-label":g("labels.delete"),onClick:()=>t(null),visible:ye(fp(e),o)})});import{KEYS as Xn,CODES as Kn,getShortcutKey as $n,isDarwin as Gs}from"@haoxin-web/excalidraw-common";import{moveOneLeft as aS,moveOneRight as lS,moveAllLeft as sS,moveAllRight as cS}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as Us}from"@haoxin-web/excalidraw-element";import{jsx as Ys}from"react/jsx-runtime";var xp=F({name:"sendBackward",label:"labels.sendBackward",keywords:["move down","zindex","layer"],icon:Qm,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:aS(e,o,r.scene),appState:o,captureUpdate:Us.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[Xn.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Kn.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>Ys("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendBackward")} \u2014 ${$n("CtrlOrCmd+[")}`,children:Qm})}),Ep=F({name:"bringForward",label:"labels.bringForward",keywords:["move up","zindex","layer"],icon:Jm,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:lS(e,o,r.scene),appState:o,captureUpdate:Us.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[Xn.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Kn.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>Ys("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.bringForward")} \u2014 ${$n("CtrlOrCmd+]")}`,children:Jm})}),yp=F({name:"sendToBack",label:"labels.sendToBack",keywords:["move down","zindex","layer"],icon:tp,trackEvent:{category:"element"},perform:(e,o)=>({elements:sS(e,o),appState:o,captureUpdate:Us.IMMEDIATELY}),keyTest:e=>Gs?e[Xn.CTRL_OR_CMD]&&e.altKey&&e.code===Kn.BRACKET_LEFT:e[Xn.CTRL_OR_CMD]&&e.shiftKey&&e.code===Kn.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>Ys("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendToBack")} \u2014 ${Gs?$n("CtrlOrCmd+Alt+["):$n("CtrlOrCmd+Shift+[")}`,children:tp})}),wp=F({name:"bringToFront",label:"labels.bringToFront",keywords:["move up","zindex","layer"],icon:ep,trackEvent:{category:"element"},perform:(e,o)=>({elements:cS(e,o),appState:o,captureUpdate:Us.IMMEDIATELY}),keyTest:e=>Gs?e[Xn.CTRL_OR_CMD]&&e.altKey&&e.code===Kn.BRACKET_RIGHT:e[Xn.CTRL_OR_CMD]&&e.shiftKey&&e.code===Kn.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>Ys("button",{type:"button",className:"zIndexButton",onClick:t=>e(null),title:`${g("labels.bringToFront")} \u2014 ${Gs?$n("CtrlOrCmd+Alt+]"):$n("CtrlOrCmd+Shift+]")}`,children:ep})});import{getNonDeletedElements as dS}from"@haoxin-web/excalidraw-element";import{LinearElementEditor as mS}from"@haoxin-web/excalidraw-element";import{isLinearElement as pS,isTextElement as uS}from"@haoxin-web/excalidraw-element";import{arrayToMap as hS,KEYS as Fb}from"@haoxin-web/excalidraw-common";import{selectGroupsForSelectedElements as gS}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as fS}from"@haoxin-web/excalidraw-element";var vp=F({name:"selectAll",label:"labels.selectAll",icon:xb,trackEvent:{category:"canvas"},viewMode:!1,perform:(e,o,t,r)=>{if(o.selectedLinearElement?.isEditing)return!1;let n=e.filter(i=>!i.isDeleted&&!(uS(i)&&i.containerId)&&!i.locked).reduce((i,a)=>(i[a.id]=!0,i),{});return{appState:{...o,...gS({editingGroupId:null,selectedElementIds:n},dS(e),o,r),selectedLinearElement:Object.keys(n).length===1&&pS(e[0])?new mS(e[0],hS(e)):null},captureUpdate:fS.IMMEDIATELY}},keyTest:e=>e[Fb.CTRL_OR_CMD]&&e.key===Fb.A});import{DEFAULT_GRID_SIZE as Ob,KEYS as zb,arrayToMap as Hb,getShortcutKey as bS}from"@haoxin-web/excalidraw-common";import{getNonDeletedElements as Gb}from"@haoxin-web/excalidraw-element";import{LinearElementEditor as xS}from"@haoxin-web/excalidraw-element";import{getSelectedElements as ES,getSelectionStateForElements as yS}from"@haoxin-web/excalidraw-element";import{syncMovedIndices as wS}from"@haoxin-web/excalidraw-element";import{duplicateElements as vS}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as Ub}from"@haoxin-web/excalidraw-element";import{jsx as TS}from"react/jsx-runtime";var Tp=F({name:"duplicateSelection",label:"labels.duplicateSelection",icon:ba,trackEvent:{category:"element"},perform:(e,o,t,r)=>{if(o.selectedElementsAreBeingDragged)return!1;if(o.selectedLinearElement?.isEditing)try{let a=xS.duplicateSelectedPoints(o,r.scene);return{elements:e,appState:a,captureUpdate:Ub.IMMEDIATELY}}catch{return!1}let{duplicatedElements:n,elementsWithDuplicates:i}=vS({type:"in-place",elements:e,idsOfElementsToDuplicate:Hb(ES(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+Ob/2,y:a.y+Ob/2,frameId:s??a.frameId}}});if(r.props.onDuplicate&&i){let a=r.props.onDuplicate(i,e);a&&(i=a)}return{elements:wS(i,Hb(n)),appState:{...o,...yS(n,Gb(i),o)},captureUpdate:Ub.IMMEDIATELY}},keyTest:e=>e[zb.CTRL_OR_CMD]&&e.key===zb.D,PanelComponent:({elements:e,appState:o,updateData:t})=>TS(z,{type:"button",icon:ba,title:`${g("labels.duplicateSelection")} \u2014 ${bS("CtrlOrCmd+D")}`,"aria-label":g("labels.duplicateSelection"),onClick:()=>t(null),visible:ye(Gb(e),o)})});import{pointFrom as I4}from"@haoxin-web/excalidraw-math";import{useEffect as Vp,useMemo as C4,useRef as Xp,useState as S4}from"react";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE as k4,DEFAULT_ELEMENT_BACKGROUND_PICKS as M4,DEFAULT_ELEMENT_STROKE_COLOR_PALETTE as L4,DEFAULT_ELEMENT_STROKE_PICKS as P4,ARROW_TYPE as Wo,DEFAULT_FONT_FAMILY as A4,DEFAULT_FONT_SIZE as _4,FONT_FAMILY as D4,ROUNDNESS as ac,STROKE_WIDTH as Kp,VERTICAL_ALIGN as ic,KEYS as ii,randomInteger as R4,arrayToMap as jp,getFontFamilyString as N4,getShortcutKey as B4,getLineHeight as F4,isTransparent as O4,reduceToCommonValue as z4}from"@haoxin-web/excalidraw-common";import{canBecomePolygon as H4,getNonDeletedElements as Lx}from"@haoxin-web/excalidraw-element";import{bindLinearElement as Cx,calculateFixedPointForElbowArrowBinding as Sx,updateBoundElements as G4}from"@haoxin-web/excalidraw-element";import{LinearElementEditor as $p}from"@haoxin-web/excalidraw-element";import{newElementWith as Je}from"@haoxin-web/excalidraw-element";import{getBoundTextElement as Tr,redrawTextBoundingBox as Ba}from"@haoxin-web/excalidraw-element";import{isArrowElement as lc,isBoundToContainer as U4,isElbowArrow as Px,isLinearElement as Zp,isLineElement as kx,isTextElement as Ct,isUsingAdaptiveRadius as Y4}from"@haoxin-web/excalidraw-element";import{hasStrokeColor as W4}from"@haoxin-web/excalidraw-element";import{updateElbowArrowPoints as V4,CaptureUpdateAction as Qe,toggleLinePolygonState as X4}from"@haoxin-web/excalidraw-element";import{isDevEnv as IS}from"@haoxin-web/excalidraw-common";var CS=new Set(["command_palette","export"]),ie=(e,o,t,r)=>{try{if(typeof window>"u"||T.VITE_WORKER_ID||T.VITE_APP_ENABLE_TRACKING!=="true"||!CS.has(e)||IS())return;T.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 LS from"clsx";import SS from"clsx";import{forwardRef as kS}from"react";import{jsx as MS}from"react/jsx-runtime";var Zn=kS((e,o)=>{let{title:t,className:r,testId:n,active:i,standalone:a,icon:l,onClick:s}=e;return MS("button",{type:"button",ref:o,title:t,"data-testid":n,className:SS(r,{standalone:a,active:i}),onClick:s,style:e.style,children:l},t)});import{Fragment as AS,jsx as Ip,jsxs as PS}from"react/jsx-runtime";var Vt=e=>Ip(AS,{children:e.options.map(o=>e.type==="button"?Ip(Zn,{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):PS("label",{className:LS({active:e.value===o.value}),title:o.text,children:[Ip("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 js from"@radix-ui/react-popover";import P6 from"clsx";import{useRef as A6}from"react";import{COLOR_OUTLINE_CONTRAST_THRESHOLD as _6,COLOR_PALETTE as lx,isTransparent as D6}from"@haoxin-web/excalidraw-common";import{jsx as _S}from"react/jsx-runtime";var Ws=()=>_S("div",{style:{width:1,height:"1rem",backgroundColor:"var(--default-border-color)",margin:"0 auto"}});import{useEffect as FS,useRef as OS}from"react";import{createPortal as zS}from"react-dom";import{EVENT as fr,KEYS as HS,rgbToHex as GS}from"@haoxin-web/excalidraw-common";import Yb from"react";var Cp=Yb.createContext(null),be=()=>Yb.useContext(Cp);import{useState as DS,useLayoutEffect as Wb}from"react";import{THEME as RS}from"@haoxin-web/excalidraw-common";var Vs=e=>{let[o,t]=DS(null),r=pe(),{theme:n}=be(),{container:i}=Xe();return Wb(()=>{o&&(o.className="",o.classList.add("excalidraw",...e?.className?.split(/\s+/)||[]),o.classList.toggle("excalidraw--mobile",r.editor.isMobile),o.classList.toggle("theme--dark",n===RS.DARK))},[o,n,r.editor.isMobile,e?.className]),Wb(()=>{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 NS}from"react";import{EVENT as Xs}from"@haoxin-web/excalidraw-common";function jn(e,o,t){NS(()=>{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(Xs.POINTER_DOWN,r),document.addEventListener(Xs.TOUCH_START,r),()=>{document.removeEventListener(Xs.POINTER_DOWN,r),document.removeEventListener(Xs.TOUCH_START,r)}},[e,o,t])}import{useRef as BS}from"react";var gr=e=>{let o=BS(e);return Object.assign(o.current,e),o.current};import{jsx as US}from"react/jsx-runtime";var br=he(null),Vb=({onCancel:e,onChange:o,onSelect:t,colorPickerType:r})=>{let n=Vs({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),i=be(),a=xr(),l=Oe(),s=q(a,i),d=gr({app:l,onCancel:e,onChange:o,onSelect:t,selectedElements:s}),{container:c}=Xe();FS(()=>{let p=m.current;if(!p||!l.canvas||!n)return;let u=!1,f=l.canvas.getContext("2d"),b=({clientX:S,clientY:P})=>{let M=f.getImageData((S-i.offsetLeft)*window.devicePixelRatio,(P-i.offsetTop)*window.devicePixelRatio,1,1).data;return GS(M[0],M[1],M[2])},x=({clientX:S,clientY:P,altKey:M})=>{p.style.top=`${P+20}px`,p.style.left=`${S+20}px`;let R=b({clientX:S,clientY:P});u&&d.onChange(r,R,d.selectedElements,{altKey:M}),p.style.background=R},w=()=>{d.onCancel()},E=(S,P)=>{d.onSelect(S,P)},y=S=>{u=!0,S.stopImmediatePropagation()},v=S=>{u=!1,c?.focus(),S.stopImmediatePropagation(),S.preventDefault(),E(b(S),S)},I=S=>{S.key===HS.ESCAPE&&(S.preventDefault(),S.stopImmediatePropagation(),w())};return n.tabIndex=-1,n.focus(),x({clientX:d.app.lastViewportPosition.x,clientY:d.app.lastViewportPosition.y,altKey:!1}),n.addEventListener(fr.KEYDOWN,I),n.addEventListener(fr.POINTER_DOWN,y),n.addEventListener(fr.POINTER_UP,v),window.addEventListener("pointermove",x,{passive:!0}),window.addEventListener(fr.BLUR,w),()=>{u=!1,n.removeEventListener(fr.KEYDOWN,I),n.removeEventListener(fr.POINTER_DOWN,y),n.removeEventListener(fr.POINTER_UP,v),window.removeEventListener("pointermove",x),window.removeEventListener(fr.BLUR,w)}},[d,l.canvas,n,r,c,i.offsetLeft,i.offsetTop]);let m=OS(null);return jn(m,()=>{e()},p=>!!p.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")),n?zS(US("div",{ref:m,className:"excalidraw-eye-dropper-preview"}),n):null};import*as qn from"@radix-ui/react-popover";import XS from"clsx";import KS from"react";import{isInteractive as $S}from"@haoxin-web/excalidraw-common";import YS from"react";import WS from"clsx";import{jsx as VS}from"react/jsx-runtime";var De=YS.forwardRef(({children:e,padding:o,className:t,style:r},n)=>VS("div",{className:WS("Island",t),style:{"--padding":o,...r},ref:n,children:e}));import{jsx as Sp,jsxs as ZS}from"react/jsx-runtime";var Ks=KS.forwardRef(({className:e,container:o,children:t,style:r,onClose:n,onKeyDown:i,onFocusOutside:a,onPointerLeave:l,onPointerDownOutside:s},d)=>{let c=pe();return Sp(qn.Portal,{container:o,children:ZS(qn.Content,{ref:d,className:XS("focus-visible-none",e),"data-prevent-outside-click":!0,side:c.editor.isMobile&&!c.viewport.isLandscape?"bottom":"right",align:c.editor.isMobile&&!c.viewport.isLandscape?"center":"start",alignOffset:-16,sideOffset:20,style:{zIndex:"var(--zIndex-popup)"},onPointerLeave:l,onKeyDown:i,onFocusOutside:a,onPointerDownOutside:s,onCloseAutoFocus:m=>{m.stopPropagation(),m.preventDefault(),o&&!$S(document.activeElement)&&o.focus(),n()},children:[Sp(De,{padding:3,style:r,children:t}),Sp(qn.Arrow,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})});import qS from"clsx";import{useCallback as JS,useEffect as Mp,useRef as $b,useState as QS}from"react";import{KEYS as Lp,getShortcutKey as e6}from"@haoxin-web/excalidraw-common";import{MAX_CUSTOM_COLORS_USED_IN_CANVAS as jS}from"@haoxin-web/excalidraw-common";var Er=({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},Ma=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),kp=({color:e,palette:o})=>!Object.values(o).flat().includes(e),Kb=(e,o,t)=>{let r={elementBackground:"backgroundColor",elementStroke:"strokeColor"},n=e.filter(a=>{if(a.isDeleted)return!1;let l=a[r[o]];return kp({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,jS)},Xt=he(null),Xb=(e,o,t)=>(e*299+o*587+t*114)/1e3,Jn=(e,o=160)=>{if(!e)return!0;if(e==="transparent")return!1;if(!e.startsWith("#")){let i=document.createElement("div");if(i.style.color=e,i.style.color){i.style.position="absolute",i.style.visibility="hidden",i.style.width="0",i.style.height="0",document.body.appendChild(i);let a=getComputedStyle(i).color;document.body.removeChild(i);let l=a.replace(/^(rgb|rgba)\(/,"").replace(/\)$/,"").replace(/\s/g,"").split(","),s=parseInt(l[0]),d=parseInt(l[1]),c=parseInt(l[2]);return Xb(s,d,c)<o}return!0}let t=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),n=parseInt(e.slice(5,7),16);return Xb(t,r,n)<o};import{Fragment as t6,jsx as $s,jsxs as Zb}from"react/jsx-runtime";var jb=({color:e,onChange:o,label:t,colorPickerType:r,placeholder:n})=>{let i=pe(),[a,l]=QS(e),[s,d]=ce(Xt);Mp(()=>{l(e)},[e]);let c=JS(b=>{let x=b.toLowerCase(),w=qb(x);w&&o(w),l(x)},[o]),m=$b(null),p=$b(null);Mp(()=>{m.current&&m.current.focus()},[s]);let[u,f]=ce(br);return Mp(()=>()=>{f(null)},[f]),Zb("div",{className:"color-picker__input-label",children:[$s("div",{className:"color-picker__input-hash",children:"#"}),$s("input",{ref:s==="hex"?m:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":t,onChange:b=>{c(b.target.value)},value:(a||"").replace(/^#/,""),onBlur:()=>{l(e)},tabIndex:-1,onFocus:()=>d("hex"),onKeyDown:b=>{b.key!==Lp.TAB&&(b.key===Lp.ESCAPE&&p.current?.focus(),b.stopPropagation())},placeholder:n}),!i.editor.isMobile&&Zb(t6,{children:[$s("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),$s("div",{ref:p,className:qS("excalidraw-eye-dropper-trigger",{selected:u}),onClick:()=>f(b=>b?null:{keepOpenOnAlt:!1,onSelect:x=>o(x),colorPickerType:r}),title:`${g("labels.eyeDropper")} \u2014 ${Lp.I.toLocaleUpperCase()} or ${e6("Alt")} `,children:nb})]})]})};import Dp,{useEffect as Rp,useImperativeHandle as y6,useState as w6}from"react";import{EVENT as rx}from"@haoxin-web/excalidraw-common";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX as v6,DEFAULT_ELEMENT_STROKE_COLOR_INDEX as T6,KEYS as I6}from"@haoxin-web/excalidraw-common";import n6 from"clsx";import{useEffect as i6,useRef as a6}from"react";import{jsxs as r6}from"react/jsx-runtime";var o6=({color:e,keyLabel:o,isShade:t=!1})=>r6("div",{className:"color-picker__button__hotkey-label",style:{color:Jn(e)?"#fff":"#000"},children:[t&&"\u21E7",o]}),Qn=o6;import{jsx as Pp,jsxs as l6}from"react/jsx-runtime";var Jb=({colors:e,color:o,onChange:t,label:r})=>{let[n,i]=ce(Xt),a=a6(null);return i6(()=>{a.current&&a.current.focus()},[o,n]),Pp("div",{className:"color-picker-content--default",children:e.map((l,s)=>l6("button",{ref:o===l?a:void 0,tabIndex:-1,type:"button",className:n6("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:[Pp("div",{className:"color-picker__button-outline"}),Pp(Qn,{color:l,keyLabel:s+1})]},s))})};import s6 from"clsx";import{useEffect as c6,useRef as d6}from"react";import{jsx as Ap,jsxs as p6}from"react/jsx-runtime";var m6=({palette:e,color:o,onChange:t,activeShade:r})=>{let n=Er({color:o,palette:e}),[i,a]=ce(Xt),l=d6(null);return c6(()=>{l.current&&i==="baseColors"&&l.current.focus()},[n?.colorName,i]),Ap("div",{className:"color-picker-content--default",children:Object.entries(e).map(([s,d],c)=>{let m=(Array.isArray(d)?d[r]:d)||"transparent",p=Ma[c],u=g(`colors.${s.replace(/\d+/,"")}`,null,"");return p6("button",{ref:n?.colorName===s?l:void 0,tabIndex:-1,type:"button",className:s6("color-picker__button color-picker__button--large has-outline",{active:n?.colorName===s,"is-transparent":m==="transparent"||!m}),onClick:()=>{t(m),a("baseColors")},title:`${u}${m.startsWith("#")?` ${m}`:""} \u2014 ${p}`,"aria-label":`${u} \u2014 ${p}`,style:m?{"--swatch-color":m}:void 0,"data-testid":`color-${s}`,children:[Ap("div",{className:"color-picker__button-outline"}),Ap(Qn,{color:m,keyLabel:p})]},s)})})},Qb=m6;import{jsx as h6}from"react/jsx-runtime";var u6=({children:e})=>h6("div",{className:"color-picker__heading",children:e}),ei=u6;import g6 from"clsx";import{useEffect as f6,useRef as b6}from"react";import{jsx as La,jsxs as ex}from"react/jsx-runtime";var tx=({color:e,onChange:o,palette:t})=>{let r=Er({color:e||"transparent",palette:t}),[n,i]=ce(Xt),a=b6(null);if(f6(()=>{a.current&&n==="shades"&&a.current.focus()},[r,n]),r){let{colorName:l,shade:s}=r,d=t[l];if(Array.isArray(d))return La("div",{className:"color-picker-content--default shades",children:d.map((c,m)=>ex("button",{ref:m===s&&n==="shades"?a:void 0,tabIndex:-1,type:"button",className:g6("color-picker__button color-picker__button--large has-outline",{active:m===s}),"aria-label":"Shade",title:`${l} - ${m+1}`,style:c?{"--swatch-color":c}:void 0,onClick:()=>{o(c),i("shades")},children:[La("div",{className:"color-picker__button-outline"}),La(Qn,{color:c,keyLabel:m+1,isShade:!0})]},m))})}return ex("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[La("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),La("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")})]})};import{COLORS_PER_ROW as ti,COLOR_PALETTE as x6,KEYS as Pa}from"@haoxin-web/excalidraw-common";var _p=(e,o,t)=>{let r=Math.ceil(t/ti);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+ti;return n>=t?o%ti:n}case"ArrowUp":{let n=o-ti,i=n<0?ti*r+n:n;return i>=t?void 0:i}}},E6=({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(Ma.includes(e.key)){let l=Ma.indexOf(e.key),s=Object.keys(r)[l],d=r[s],c=Array.isArray(d)?d[a]:d;return t(c),i("baseColors"),!0}return!1},ox=({event:e,activeColorPickerSection:o,palette:t,color:r,onChange:n,customColors:i,setActiveColorPickerSection:a,updateData:l,activeShade:s,onEyeDropperToggle:d,onEscape:c})=>{if(e[Pa.CTRL_OR_CMD])return!1;if(e.key===Pa.ESCAPE)return c(e),!0;if(e.key===Pa.ALT)return d(!0),!0;if(e.key===Pa.I)return d(),!0;let m=Er({color:r,palette:t});if(e.key===Pa.TAB){let p={custom:!!i.length,baseColors:!0,shades:m?.shade!=null,hex:!0},u=Object.entries(p).reduce((E,[y,v])=>(v&&E.push(y),E),[]),f=u.indexOf(o),b=e.shiftKey?-1:1,x=f+b>u.length-1?0:f+b<0?u.length-1:f+b,w=u[x];return w&&a(w),w==="custom"?n(i[0]):w==="baseColors"&&(Object.entries(t).find(([y,v])=>Array.isArray(v)?v.includes(r):v===r?y:null)||n(x6.black)),e.preventDefault(),e.stopPropagation(),!0}if(E6({e,colorObj:m,onChange:n,palette:t,customColors:i,setActiveColorPickerSection:a,activeShade:s}))return!0;if(o==="shades"&&m){let{shade:p}=m,u=_p(e.key,p,ti);if(u!==void 0)return n(t[m.colorName][u]),!0}if(o==="baseColors"&&m){let{colorName:p}=m,u=Object.keys(t),f=u.indexOf(p),b=_p(e.key,f,u.length);if(b!==void 0){let x=u[b],w=t[x];return n(Array.isArray(w)?w[s]:w),!0}}if(o==="custom"){let p=r!=null?i.indexOf(r):0,u=_p(e.key,p,i.length);if(u!==void 0){let f=i[u];return n(f),!0}}return!1};import{jsx as rn,jsxs as Zs}from"react/jsx-runtime";var nx=Dp.forwardRef(({color:e,onChange:o,type:t,elements:r,palette:n,updateData:i,children:a,onEyeDropperToggle:l,onEscape:s},d)=>{let[c]=Dp.useState(()=>t==="canvasBackground"?[]:Kb(r,t,n)),[m,p]=ce(Xt),u=Er({color:e,palette:n});Rp(()=>{if(!m){let w=!!e&&kp({color:e,palette:n}),E=w&&!c.includes(e);p(E?null:w?"custom":u?.shade!=null?"shades":"baseColors")}},[m,e,n,p,u,c]);let[f,b]=w6(u?.shade??(t==="elementBackground"?v6:T6));Rp(()=>{u?.shade!=null&&b(u.shade);let w=E=>{E.key===I6.ALT&&l(!1)};return document.addEventListener(rx.KEYUP,w,{capture:!0}),()=>{document.removeEventListener(rx.KEYUP,w,{capture:!0})}},[u,l]);let x=Dp.useRef(null);return y6(d,()=>x.current),Rp(()=>{x?.current?.focus()},[]),rn("div",{role:"dialog","aria-modal":"true","aria-label":g("labels.colorPicker"),children:Zs("div",{ref:x,onKeyDown:w=>{ox({event:w,activeColorPickerSection:m,palette:n,color:e,onChange:o,onEyeDropperToggle:l,customColors:c,setActiveColorPickerSection:p,updateData:i,activeShade:f,onEscape:s})&&(w.preventDefault(),w.stopPropagation())},className:"color-picker-content properties-content",tabIndex:-1,children:[!!c.length&&Zs("div",{children:[rn(ei,{children:g("colorPicker.mostUsedCustomColors")}),rn(Jb,{colors:c,color:e,label:g("colorPicker.mostUsedCustomColors"),onChange:o})]}),Zs("div",{children:[rn(ei,{children:g("colorPicker.colors")}),rn(Qb,{color:e,palette:n,onChange:o,activeShade:f})]}),Zs("div",{children:[rn(ei,{children:g("colorPicker.shades")}),rn(tx,{color:e,onChange:o,palette:n})]}),a]})})});import C6 from"clsx";import{COLOR_OUTLINE_CONTRAST_THRESHOLD as S6,DEFAULT_CANVAS_BACKGROUND_PICKS as k6,DEFAULT_ELEMENT_BACKGROUND_PICKS as M6,DEFAULT_ELEMENT_STROKE_PICKS as L6}from"@haoxin-web/excalidraw-common";import{jsx as Np}from"react/jsx-runtime";var ix=({onChange:e,type:o,activeColor:t,topPicks:r})=>{let n;return o==="elementStroke"&&(n=L6),o==="elementBackground"&&(n=M6),o==="canvasBackground"&&(n=k6),r&&(n=r),n?Np("div",{className:"color-picker__top-picks",children:n.map(i=>Np("button",{className:C6("color-picker__button",{active:i===t,"is-transparent":i==="transparent"||!i,"has-outline":!Jn(i,S6)}),style:{"--swatch-color":i},type:"button",title:i,onClick:()=>e(i),"data-testid":`color-top-pick-${i}`,children:Np("div",{className:"color-picker__button-outline"})},i))}):(console.error("Invalid type for TopPicks"),null)};import{jsx as lo,jsxs as Bp}from"react/jsx-runtime";var ax=e=>{let o=new Option().style;return o.color=e,!!o.color},qb=e=>D6(e)?e:ax(`#${e}`)?`#${e}`:ax(e)?e:null,R6=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=lx,updateData:a})=>{let{container:l}=Xe(),[,s]=ce(Xt),[d,c]=ce(br),m=Bp("div",{children:[lo(ei,{children:g("colorPicker.hexCode")}),lo(jb,{color:o||"",label:r,onChange:f=>{t(f)},colorPickerType:e,placeholder:g("colorPicker.color")})]}),p=A6(null),u=()=>{p.current?.focus()};return lo(Ks,{container:l,style:{maxWidth:"13rem"},onFocusOutside:f=>{u(),f.preventDefault()},onPointerDownOutside:f=>{d&&f.preventDefault()},onClose:()=>{a({openPopup:null}),s(null)},children:i?lo(nx,{ref:p,palette:i,color:o,onChange:f=>{t(f)},onEyeDropperToggle:f=>{c(b=>f?(b=b||{keepOpenOnAlt:!0,onSelect:t,colorPickerType:e},b.keepOpenOnAlt=!0,b):f===!1||b?null:{keepOpenOnAlt:!1,onSelect:t,colorPickerType:e})},onEscape:f=>{d?c(null):a({openPopup:null})},type:e,elements:n,updateData:a,children:m}):m})},N6=({label:e,color:o,type:t})=>lo(js.Trigger,{type:"button",className:P6("color-picker__button active-color properties-trigger",{"is-transparent":!o||o==="transparent","has-outline":!o||!Jn(o,_6)}),"aria-label":e,style:o?{"--swatch-color":o}:void 0,title:t==="elementStroke"?g("labels.showStroke"):g("labels.showBackground"),children:lo("div",{className:"color-picker__button-outline",children:!o&&f0})}),yr=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=lx,topPicks:a,updateData:l,appState:s})=>lo("div",{children:Bp("div",{role:"dialog","aria-modal":"true",className:"color-picker-container",children:[lo(ix,{activeColor:o,onChange:t,type:e,topPicks:a}),lo(Ws,{}),Bp(js.Root,{open:s.openPopup===e,onOpenChange:d=>{l({openPopup:d?e:null})},children:[lo(N6,{color:o,label:r,type:e}),s.openPopup===e&&lo(R6,{type:e,color:o,onChange:t,label:r,elements:n,palette:i,updateData:l})]})]})});import*as bx from"@radix-ui/react-popover";import m4,{useCallback as p4,useMemo as u4}from"react";import{FONT_FAMILY as Gp}from"@haoxin-web/excalidraw-common";import t4,{useMemo as wr,useState as o4,useRef as r4,useEffect as n4,useCallback as i4}from"react";import{arrayToList as a4,debounce as l4,FONT_FAMILY as nn,getFontFamilyString as s4}from"@haoxin-web/excalidraw-common";import B6 from"clsx";import F6 from"react";import{jsx as O6,jsxs as z6}from"react/jsx-runtime";var qs=F6.forwardRef(({className:e,placeholder:o,onChange:t},r)=>z6("div",{className:B6("QuickSearch__wrapper",e),children:[Nt,O6("input",{ref:r,className:"QuickSearch__input",type:"text",placeholder:o,onChange:n=>t(n.target.value.trim().toLowerCase())})]}));import H6 from"clsx";import{Children as G6}from"react";import{jsx as sx}from"react/jsx-runtime";var Js=({className:e,placeholder:o,children:t})=>{let r=!G6.count(t);return sx("div",{className:H6("ScrollableList__wrapper",e),role:"menu",children:r?sx("div",{className:"empty",children:o}):t})};import{jsx as U6,jsxs as Y6}from"react/jsx-runtime";var cx=({children:e,className:o="",style:t,title:r})=>Y6("div",{className:`dropdown-menu-group ${o}`,style:t,children:[r&&U6("p",{className:"dropdown-menu-group-title",children:r}),e]}),Aa=cx;cx.displayName="DropdownMenuGroup";import{useEffect as J6,useRef as Q6}from"react";import{THEME as e4}from"@haoxin-web/excalidraw-common";import{jsx as W6}from"react/jsx-runtime";var _a=({children:e,...o})=>W6("span",{...o,style:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",...o.style},children:e});import{Fragment as X6,jsx as Qs,jsxs as K6}from"react/jsx-runtime";var V6=({textStyle:e,icon:o,shortcut:t,children:r})=>{let n=pe();return K6(X6,{children:[o&&Qs("div",{className:"dropdown-menu-item__icon",children:o}),Qs("div",{style:e,className:"dropdown-menu-item__text",children:Qs(_a,{children:r})}),t&&!n.editor.isMobile&&Qs("div",{className:"dropdown-menu-item__shortcut",children:t})]})},ec=V6;import $6,{useContext as Z6}from"react";import{EVENT as j6,composeEventHandlers as q6}from"@haoxin-web/excalidraw-common";var Fp=$6.createContext({}),tc=(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(),oc=(e,o)=>{let t=Z6(Fp);return q6(e,r=>{let n=new CustomEvent(j6.MENU_ITEM_SELECT,{bubbles:!0,cancelable:!0});o?.(n),n.defaultPrevented||t.onSelect?.(n)})};import{jsx as Op}from"react/jsx-runtime";var zp=({icon:e,value:o,order:t,children:r,shortcut:n,className:i,hovered:a,selected:l,textStyle:s,onSelect:d,onClick:c,...m})=>{let p=oc(c,d),u=Q6(null);return J6(()=>{a&&(t===0?u.current?.scrollIntoView({block:"end"}):u.current?.scrollIntoView({block:"nearest"}))},[a,t]),Op("button",{...m,ref:u,value:o,onClick:p,className:tc(i,l,a),title:m.title??m["aria-label"],children:Op(ec,{textStyle:s,icon:e,shortcut:n,children:r})})};zp.displayName="DropdownMenuItem";var oi={GREEN:"green",RED:"red",BLUE:"blue"},rc=({type:e=oi.BLUE,children:o})=>{let{theme:t}=Io(),r={display:"inline-flex",marginLeft:"auto",padding:"2px 4px",borderRadius:6,fontSize:9,fontFamily:"Cascadia, monospace",border:t===e4.LIGHT?"1.5px solid white":"none"};switch(e){case oi.GREEN:Object.assign(r,{backgroundColor:"var(--background-color-badge)",color:"var(--color-badge)"});break;case oi.RED:Object.assign(r,{backgroundColor:"pink",color:"darkred"});break;case oi.BLUE:default:Object.assign(r,{background:"var(--color-promo)",color:"var(--color-surface-lowest)"})}return Op("div",{className:"DropDownMenuItemBadge",style:r,children:o})};rc.displayName="DropdownMenuItemBadge";zp.Badge=rc;var ft=zp;import{KEYS as ri}from"@haoxin-web/excalidraw-common";var dx=({event:e,inputRef:o,hoveredFont:t,filteredFonts:r,onClose:n,onSelect:i,onHover:a})=>{if(!e[ri.CTRL_OR_CMD]&&e.shiftKey&&e.key.toLowerCase()===ri.F)return o.current?.focus(),!0;if(e.key===ri.ESCAPE)return n(),!0;if(e.key===ri.ENTER)return t?.value&&i(t.value),!0;if(e.key===ri.ARROW_DOWN)return t?.next?a(t.next.value):r[0]?.value&&a(r[0].value),!0;if(e.key===ri.ARROW_UP)return t?.prev?a(t.prev.value):r[r.length-1]?.value&&a(r[r.length-1].value),!0};import{jsx as Da,jsxs as mx}from"react/jsx-runtime";var c4=e=>{switch(e){case nn.Excalifont:case nn.Virgil:return Dt;case nn.Nunito:case nn.Helvetica:return Ta;case nn["Lilita One"]:return Z0;case nn["Comic Shanns"]:case nn.Cascadia:return Cs;default:return Ta}},px=t4.memo(({selectedFontFamily:e,hoveredFontFamily:o,onSelect:t,onHover:r,onLeave:n,onOpen:i,onClose:a})=>{let{container:l}=Xe(),{fonts:s}=Oe(),{showDeprecatedFonts:d}=Co(),[c,m]=o4(""),p=r4(null),u=wr(()=>Array.from(sr.registered.entries()).filter(([M,{metadata:R}])=>!R.private&&!R.fallback).map(([M,{metadata:R,fontFaces:L}])=>{let k={value:M,icon:c4(M),text:L[0]?.fontFace?.family??"Unknown"};return R.deprecated&&Object.assign(k,{deprecated:R.deprecated,badge:{type:oi.RED,placeholder:g("fontList.badge.old")}}),k}).sort((M,R)=>M.text.toLowerCase()>R.text.toLowerCase()?1:-1),[]),f=wr(()=>new Set(s.getSceneFamilies()),[e]),b=wr(()=>u.filter(M=>f.has(M.value)),[u,f]),x=wr(()=>u.filter(M=>!f.has(M.value)&&(d||!M.deprecated)),[u,f,d]),w=wr(()=>a4([...b,...x].filter(M=>M.text?.toLowerCase().includes(c))),[b,x,c]),E=wr(()=>{let M;return o?M=w.find(R=>R.value===o):e&&(M=w.find(R=>R.value===e)),!M&&c&&(w[0]?.value?r(w[0].value):n()),M},[o,e,c,w,r,n]),y=i4(M=>{dx({event:M,inputRef:p,hoveredFont:E,filteredFonts:w,onSelect:t,onHover:r,onClose:a})&&(M.preventDefault(),M.stopPropagation())},[E,w,t,r,a]);n4(()=>(i(),()=>{a()}),[]);let v=wr(()=>w.filter(M=>f.has(M.value)),[w,f]),I=wr(()=>w.filter(M=>!f.has(M.value)),[w,f]),S=(M,R)=>mx(ft,{icon:M.icon,value:M.value,order:R,textStyle:{fontFamily:s4({fontFamily:M.value})},hovered:M.value===E?.value,selected:M.value===e,tabIndex:M.value===e?0:-1,onClick:L=>{t(Number(L.currentTarget.value))},onMouseMove:()=>{E?.value!==M.value&&r(M.value)},children:[M.text,M.badge&&Da(rc,{type:M.badge.type,children:M.badge.placeholder})]},M.value),P=[];return v.length&&P.push(Da(Aa,{title:g("fontList.sceneFonts"),children:v.map(S)},"group_1")),I.length&&P.push(Da(Aa,{title:g("fontList.availableFonts"),children:I.map((M,R)=>S(M,R+v.length))},"group_2")),mx(Ks,{className:"properties-content",container:l,style:{width:"15rem"},onClose:a,onPointerLeave:n,onKeyDown:y,children:[Da(qs,{ref:p,placeholder:g("quickSearch.placeholder"),onChange:l4(m,20)}),Da(Js,{className:"dropdown-menu fonts manual-hover",placeholder:g("fontList.empty"),children:P.length?P:null})]})},(e,o)=>e.selectedFontFamily===o.selectedFontFamily&&e.hoveredFontFamily===o.hoveredFontFamily);import*as ux from"@radix-ui/react-popover";import{useMemo as d4}from"react";import{jsx as Hp}from"react/jsx-runtime";var hx=({selectedFontFamily:e})=>{let o=d4(()=>!!(e&&!gx(e)),[e]);return Hp(ux.Trigger,{asChild:!0,children:Hp("div",{children:Hp(Zn,{standalone:!0,icon:Go,title:g("labels.showFonts"),className:"properties-trigger",testId:"font-family-show-fonts",active:o,onClick:()=>{}})})})};import{jsx as Ra,jsxs as fx}from"react/jsx-runtime";var xx=[{value:Gp.Excalifont,icon:Dt,text:g("labels.handDrawn"),testId:"font-family-hand-drawn"},{value:Gp.Nunito,icon:Ta,text:g("labels.normal"),testId:"font-family-normal"},{value:Gp["Comic Shanns"],icon:Cs,text:g("labels.code"),testId:"font-family-code"}],h4=new Set(xx.map(e=>e.value)),gx=e=>e?h4.has(e):!1,Ex=m4.memo(({isOpened:e,selectedFontFamily:o,hoveredFontFamily:t,onSelect:r,onHover:n,onLeave:i,onPopupChange:a})=>{let l=u4(()=>xx,[]),s=p4(d=>{d&&r(d)},[r]);return fx("div",{role:"dialog","aria-modal":"true",className:"FontPicker__container",children:[Ra("div",{className:"buttonList",children:Ra(Vt,{type:"button",options:l,value:o,onClick:s})}),Ra(Ws,{}),fx(bx.Root,{open:e,onOpenChange:a,children:[Ra(hx,{selectedFontFamily:o}),e&&Ra(px,{selectedFontFamily:o,hoveredFontFamily:t,onSelect:s,onHover:n,onLeave:i,onOpen:()=>a(!0),onClose:()=>a(!1)})]})]})},(e,o)=>e.isOpened===o.isOpened&&e.selectedFontFamily===o.selectedFontFamily&&e.hoveredFontFamily===o.hoveredFontFamily);import*as ni from"@radix-ui/react-popover";import x4 from"clsx";import nc,{useEffect as E4}from"react";import{isArrowKey as y4,KEYS as Yo}from"@haoxin-web/excalidraw-common";import{jsx as g4}from"react/jsx-runtime";var vr=({icon:e})=>g4("span",{style:{width:"1em",margin:"0 0.5ex 0 0.5ex",display:"inline-block",lineHeight:0,verticalAlign:"middle",flex:"0 0 auto"},children:e});import{Fragment as b4,jsx as yx,jsxs as wx}from"react/jsx-runtime";var f4=({label:e,open:o,openTrigger:t,children:r,className:n,showCollapsedIcon:i=!0})=>wx(b4,{children:[wx("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center"},className:n,onClick:t,children:[e,i&&yx(vr,{icon:o?Pb:Ns})]}),o&&yx("div",{style:{display:"flex",flexDirection:"column"},children:r})]}),Na=f4;import{jsx as an,jsxs as Up}from"react/jsx-runtime";var w4=he(!1);function v4({options:e,value:o,label:t,onChange:r,onClose:n,numberOfOptionsToAlwaysShow:i=e.length}){let a=pe(),l=u=>{let f=e.find(b=>b.keyBinding===u.key.toLowerCase());if(!(u.metaKey||u.altKey||u.ctrlKey)&&f)r(f.value),u.preventDefault();else if(u.key===Yo.TAB){let b=e.findIndex(w=>w.value===o),x=u.shiftKey?(e.length+b-1)%e.length:(b+1)%e.length;r(e[x].value)}else if(y4(u.key)){let b=Ho().rtl,x=e.findIndex(w=>w.value===o);if(x!==-1){let w=e.length,E=x;switch(u.key){case(b?Yo.ARROW_LEFT:Yo.ARROW_RIGHT):E=(x+1)%w;break;case(b?Yo.ARROW_RIGHT:Yo.ARROW_LEFT):E=(w+x-1)%w;break;case Yo.ARROW_DOWN:{E=(x+(i??1))%w;break}case Yo.ARROW_UP:{E=(w+x-(i??1))%w;break}}r(e[E].value)}u.preventDefault()}else(u.key===Yo.ESCAPE||u.key===Yo.ENTER)&&(u.preventDefault(),n());u.nativeEvent.stopImmediatePropagation(),u.stopPropagation()},[s,d]=ce(w4),c=nc.useMemo(()=>e.slice(0,i),[e,i]),m=nc.useMemo(()=>e.slice(i),[e,i]);E4(()=>{c.some(u=>u.value===o)||d(!0)},[o,c,d]);let p=u=>an("div",{className:"picker-content",children:u.map((f,b)=>Up("button",{type:"button",className:x4("picker-option",{active:o===f.value}),onClick:x=>{r(f.value)},title:`${f.text} ${f.keyBinding&&`\u2014 ${f.keyBinding.toUpperCase()}`}`,"aria-label":f.text||"none","aria-keyshortcuts":f.keyBinding||void 0,ref:x=>{o===f.value&&setTimeout(()=>{x?.focus()},0)},children:[f.icon,f.keyBinding&&an("span",{className:"picker-keybinding",children:f.keyBinding})]},f.text))});return an(ni.Content,{side:a.editor.isMobile&&!a.viewport.isLandscape?"top":"bottom",align:"start",sideOffset:12,style:{zIndex:"var(--zIndex-popup)"},onKeyDown:l,children:Up("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":t,children:[p(c),m.length>0&&an(Na,{label:g("labels.more_options"),open:s,openTrigger:()=>{d(u=>!u)},className:"picker-collapsible",children:p(m)})]})})}function Yp({value:e,label:o,options:t,onChange:r,group:n="",numberOfOptionsToAlwaysShow:i}){let[a,l]=nc.useState(!1),s=nc.useRef(null);return an("div",{children:Up(ni.Root,{open:a,onOpenChange:d=>l(d),children:[an(ni.Trigger,{name:n,type:"button","aria-label":o,onClick:()=>l(!a),ref:s,className:a?"active":"",children:t.find(d=>d.value===e)?.icon}),a&&an(v4,{options:t,value:e,label:o,onChange:r,onClose:()=>{l(!1)},numberOfOptionsToAlwaysShow:i})]})})}import vx,{useEffect as T4}from"react";import{jsx as Wp,jsxs as Tx}from"react/jsx-runtime";var Ix=({updateData:e,app:o,testId:t})=>{let r=vx.useRef(null),n=vx.useRef(null),i=o.scene.getSelectedElements(o.state),a=!0,l=i.at(0),d=i.reduce((c,m)=>(c!=null&&c!==m.opacity&&(a=!1),c==null||c>m.opacity?m.opacity:c),l?.opacity??null)??o.state.currentItemOpacity;return T4(()=>{if(r.current&&n.current){let c=r.current,m=n.current,p=c.offsetWidth,u=15,f=d/100*(p-u)+u/2;m.style.left=`${f}px`,c.style.background=`linear-gradient(to right, var(--color-slider-track) 0%, var(--color-slider-track) ${d}%, var(--button-bg) ${d}%, var(--button-bg) 100%)`}},[d]),Tx("label",{className:"control-label",children:[g("labels.opacity"),Tx("div",{className:"range-wrapper",children:[Wp("input",{style:{"--color-slider-track":a?void 0:"var(--button-bg)"},ref:r,type:"range",min:"0",max:"100",step:"10",onChange:c=>{e(+c.target.value)},value:d,className:"range-input","data-testid":t}),Wp("div",{className:"value-bubble",ref:n,children:d!==0?d:null}),Wp("div",{className:"zero-label",children:"0"})]})]})};import{Fragment as _x,jsx as te,jsxs as St}from"react/jsx-runtime";var Ax=.1,bt=(e,o,t,r=!1)=>{let n=jp(q(e,o,{includeBoundTextElement:r}));return e.map(i=>n.get(i.id)||i.id===o.editingTextElement?.id?t(i):i)},ze=function(e,o,t,r,n){let i=o.state.editingTextElement,a=Lx(e),l=null;if(i&&(l=t(i)),!l)if(ye(a,o.state)){let d=o.scene.getSelectedElements(o.state),c=r===!0?d:d.filter(m=>r(m));l=z4(c,t)??(typeof n=="function"?n(!0):n)}else l=typeof n=="function"?n(!1):n;return l},K4=(e,o,t)=>U4(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}),qp=(e,o,t,r,n)=>{let i=new Set,a=bt(e,o,l=>{if(Ct(l)){let s=r(l);i.add(s);let d=Je(l,{fontSize:s});return Ba(d,t.scene.getContainerElement(l),t.scene),d=K4(l,d,t.scene),d}return l},!0);return q(e,o,{includeBoundTextElement:!0}).forEach(l=>{Ct(l)&&G4(l,t.scene)}),{elements:a,appState:{...o,currentItemFontSize:i.size===1?[...i][0]:n??o.currentItemFontSize},captureUpdate:Qe.IMMEDIATELY}},sc=F({name:"changeStrokeColor",label:"labels.stroke",trackEvent:!1,perform:(e,o,t)=>({...t.currentItemStrokeColor&&{elements:bt(e,o,r=>W4(r.type)?Je(r,{strokeColor:t.currentItemStrokeColor}):r,!0)},appState:{...o,...t},captureUpdate:t.currentItemStrokeColor?Qe.IMMEDIATELY:Qe.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>St(_x,{children:[te("h3",{"aria-hidden":"true",children:g("labels.stroke")}),te(yr,{topPicks:P4,palette:L4,type:"elementStroke",label:g("labels.stroke"),color:ze(e,r,n=>n.strokeColor,!0,n=>n?null:o.currentItemStrokeColor),onChange:n=>t({currentItemStrokeColor:n}),elements:e,appState:o,updateData:t})]})}),cc=F({name:"changeBackgroundColor",label:"labels.changeBackground",trackEvent:!1,perform:(e,o,t,r)=>{if(!t.currentItemBackgroundColor)return{appState:{...o,...t},captureUpdate:Qe.EVENTUALLY};let n,i=r.scene.getSelectedElements(o);if(!O4(t.currentItemBackgroundColor)&&i.every(l=>kx(l)&&H4(l.points))){let l=jp(i);n=e.map(s=>l.has(s.id)&&kx(s)?Je(s,{backgroundColor:t.currentItemBackgroundColor,...X4(s,!0)}):s)}else n=bt(e,o,l=>Je(l,{backgroundColor:t.currentItemBackgroundColor}));return{elements:n,appState:{...o,...t},captureUpdate:Qe.IMMEDIATELY}},PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>St(_x,{children:[te("h3",{"aria-hidden":"true",children:g("labels.background")}),te(yr,{topPicks:M4,palette:k4,type:"elementBackground",label:g("labels.background"),color:ze(e,r,n=>n.backgroundColor,!0,n=>n?null:o.currentItemBackgroundColor),onChange:n=>t({currentItemBackgroundColor:n}),elements:e,appState:o,updateData:t})]})}),Fa=F({name:"changeFillStyle",label:"labels.fill",trackEvent:!1,perform:(e,o,t,r)=>(ie("element","changeFillStyle",`${t} (${r.device.editor.isMobile?"mobile":"desktop"})`),{elements:bt(e,o,n=>Je(n,{fillStyle:t})),appState:{...o,currentItemFillStyle:t},captureUpdate:Qe.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=q(e,o),i=n.length>0&&n.every(a=>a.fillStyle==="zigzag");return St("fieldset",{children:[te("legend",{children:g("labels.fill")}),te("div",{className:"buttonList",children:te(Vt,{type:"button",options:[{value:"hachure",text:`${i?g("labels.zigzag"):g("labels.hachure")} (${B4("Alt-Click")})`,icon:i?C0:vs,active:i?!0:void 0,testId:"fill-hachure"},{value:"cross-hatch",text:g("labels.crossHatch"),icon:Ts,testId:"fill-cross-hatch"},{value:"solid",text:g("labels.solid"),icon:Is,testId:"fill-solid"}],value:ze(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(d=>d.fillStyle==="hachure")?"zigzag":a;t(s)}})})]})}}),Vo=F({name:"changeStrokeWidth",label:"labels.strokeWidth",trackEvent:!1,perform:(e,o,t)=>({elements:bt(e,o,r=>Je(r,{strokeWidth:t})),appState:{...o,currentItemStrokeWidth:t},captureUpdate:Qe.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>St("fieldset",{children:[te("legend",{children:g("labels.strokeWidth")}),te("div",{className:"buttonList",children:te(Vt,{group:"stroke-width",options:[{value:Kp.thin,text:g("labels.thin"),icon:Gn,testId:"strokeWidth-thin"},{value:Kp.bold,text:g("labels.bold"),icon:wa,testId:"strokeWidth-bold"},{value:Kp.extraBold,text:g("labels.extraBold"),icon:va,testId:"strokeWidth-extraBold"}],value:ze(e,r,n=>n.strokeWidth,n=>n.hasOwnProperty("strokeWidth"),n=>n?null:o.currentItemStrokeWidth),onChange:n=>t(n)})})]})}),$4=F({name:"changeSloppiness",label:"labels.sloppiness",trackEvent:!1,perform:(e,o,t)=>({elements:bt(e,o,r=>Je(r,{seed:R4(),roughness:t})),appState:{...o,currentItemRoughness:t},captureUpdate:Qe.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>St("fieldset",{children:[te("legend",{children:g("labels.sloppiness")}),te("div",{className:"buttonList",children:te(Vt,{group:"sloppiness",options:[{value:0,text:g("labels.architect"),icon:M0},{value:1,text:g("labels.artist"),icon:L0},{value:2,text:g("labels.cartoonist"),icon:P0}],value:ze(e,r,n=>n.roughness,n=>n.hasOwnProperty("roughness"),n=>n?null:o.currentItemRoughness),onChange:n=>t(n)})})]})}),yj=F({name:"changeStrokeStyle",label:"labels.strokeStyle",trackEvent:!1,perform:(e,o,t)=>({elements:bt(e,o,r=>Je(r,{strokeStyle:t})),appState:{...o,currentItemStrokeStyle:t},captureUpdate:Qe.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>St("fieldset",{children:[te("legend",{children:g("labels.strokeStyle")}),te("div",{className:"buttonList",children:te(Vt,{group:"strokeStyle",options:[{value:"solid",text:g("labels.strokeStyle_solid"),icon:Gn},{value:"dashed",text:g("labels.strokeStyle_dashed"),icon:S0},{value:"dotted",text:g("labels.strokeStyle_dotted"),icon:k0}],value:ze(e,r,n=>n.strokeStyle,n=>n.hasOwnProperty("strokeStyle"),n=>n?null:o.currentItemStrokeStyle),onChange:n=>t(n)})})]})}),Z4=F({name:"changeOpacity",label:"labels.opacity",trackEvent:!1,perform:(e,o,t)=>({elements:bt(e,o,r=>Je(r,{opacity:t}),!0),appState:{...o,currentItemOpacity:t},captureUpdate:Qe.IMMEDIATELY}),PanelComponent:({app:e,updateData:o})=>te(Ix,{updateData:o,app:e,testId:"opacity"})}),Jp=F({name:"changeFontSize",label:"labels.fontSize",trackEvent:!1,perform:(e,o,t,r)=>qp(e,o,r,()=>t,t),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>St("fieldset",{children:[te("legend",{children:g("labels.fontSize")}),te("div",{className:"buttonList",children:te(Vt,{group:"font-size",options:[{value:16,text:g("labels.small"),icon:V0,testId:"fontSize-small"},{value:20,text:g("labels.medium"),icon:X0,testId:"fontSize-medium"},{value:28,text:g("labels.large"),icon:K0,testId:"fontSize-large"},{value:36,text:g("labels.veryLarge"),icon:$0,testId:"fontSize-veryLarge"}],value:ze(e,r,n=>{if(Ct(n))return n.fontSize;let i=Tr(n,r.scene.getNonDeletedElementsMap());return i?i.fontSize:null},n=>Ct(n)||Tr(n,r.scene.getNonDeletedElementsMap())!==null,n=>n?null:o.currentItemFontSize||_4),onChange:n=>t(n)})})]})}),Qp=F({name:"decreaseFontSize",label:"labels.decreaseFontSize",icon:on,trackEvent:!1,perform:(e,o,t,r)=>qp(e,o,r,n=>Math.round(1/(1+Ax)*n.fontSize)),keyTest:e=>e[ii.CTRL_OR_CMD]&&e.shiftKey&&(e.key===ii.CHEVRON_LEFT||e.key===ii.COMMA)}),eu=F({name:"increaseFontSize",label:"labels.increaseFontSize",icon:on,trackEvent:!1,perform:(e,o,t,r)=>qp(e,o,r,n=>Math.round(n.fontSize*(1+Ax))),keyTest:e=>e[ii.CTRL_OR_CMD]&&e.shiftKey&&(e.key===ii.CHEVRON_RIGHT||e.key===ii.PERIOD)}),j4=F({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:bt(e,o,b=>{let x=n?.get(b.id);return x?Je(b,{...x}):b},!0),appState:{...o,...l},captureUpdate:Qe.NEVER};let{currentItemFontFamily:s,currentHoveredFontFamily:d}=t,c=Qe.EVENTUALLY,m,p=!1;if(s)m=s,c=Qe.IMMEDIATELY;else if(d){m=d,c=Qe.EVENTUALLY;let f=q(e,o,{includeBoundTextElement:!0}).filter(b=>Ct(b));if(f.length>200)p=!0;else{let b=0,x=0;for(;b<f.length&&x<5e3;){let w=f[b];x+=w?.originalText.length||0,b++}x>5e3&&(p=!0)}}let u={appState:{...o,...l},captureUpdate:c};if(m&&!p){let f=new Map,b=new Set,x=!1,w=Array.from(sr.loadedFontsCache.values()),E=Object.entries(D4).find(([I,S])=>S===m)?.[0];d&&E&&w.some(I=>I.startsWith(E))&&(x=!0),Object.assign(u,{elements:bt(e,o,I=>{if(Ct(I)&&(I.fontFamily!==m||s)){let S=Je(I,{fontFamily:m,lineHeight:F4(m)}),P=n?.get(I.containerId||"")||{},M=r.scene.getContainerElement(I);return a&&M&&P&&r.scene.mutateElement(M,{...P}),x||(b=new Set([...b,...Array.from(S.originalText)])),f.set(S,M),S}return I},!0)});let y=`10px ${N4({fontFamily:m})}`,v=Array.from(b.values()).join();if(x||window.document.fonts.check(y,v))for(let[I,S]of f)Ba(I,S,r.scene);else window.document.fonts.load(y,v).then(I=>{for(let[S,P]of f){let M=r.scene.getElement(S.id),R=P?r.scene.getElement(P.id):null;M&&Ba(M,R,r.scene)}r.fonts.onLoaded(I)})}return u},PanelComponent:({elements:e,appState:o,app:t,updateData:r})=>{let n=Xp(new Map),i=Xp(null),[a,l]=S4({}),s=Xp(!0),d=C4(()=>{let c=(m,p)=>ze(m,t,u=>{if(Ct(u))return u.fontFamily;let f=Tr(u,p);return f?f.fontFamily:null},u=>Ct(u)||Tr(u,p)!==null,u=>u?null:o.currentItemFontFamily||A4);return a.openPopup==="fontFamily"&&o.openPopup==="fontFamily"?c(Array.from(n.current?.values()??[]),n.current):!a.openPopup&&o.openPopup!=="fontFamily"?c(e,t.scene.getNonDeletedElementsMap()):i.current},[a.openPopup,o,e,t]);return Vp(()=>{i.current=d},[d]),Vp(()=>{Object.keys(a).length&&(r(a),l({}))},[a]),Vp(()=>(s.current=!1,()=>{s.current=!0}),[]),St("fieldset",{children:[te("legend",{children:g("labels.fontFamily")}),te(Ex,{isOpened:o.openPopup==="fontFamily",selectedFontFamily:d,hoveredFontFamily:o.currentHoveredFontFamily,onSelect:c=>{l({openPopup:null,currentHoveredFontFamily:null,currentItemFontFamily:c}),n.current.clear()},onHover:c=>{l({currentHoveredFontFamily:c,cachedElements:new Map(n.current),resetContainers:!0})},onLeave:()=>{l({currentHoveredFontFamily:null,cachedElements:new Map(n.current),resetAll:!0})},onPopupChange:c=>{if(c){n.current.clear();let{editingTextElement:m}=o;if(m?.type==="text"){let p=t.scene.getElement(m.id);n.current.set(m.id,Je(p||m,{},!0))}else{let p=q(e,o,{includeBoundTextElement:!0});for(let u of p)n.current.set(u.id,Je(u,{},!0))}l({openPopup:"fontFamily"})}else{let m={openPopup:null,currentHoveredFontFamily:null,cachedElements:new Map(n.current),resetAll:!0};s.current?r({...a,...m}):l(m),n.current.clear()}}})]})}}),Oa=F({name:"changeTextAlign",label:"Change text alignment",trackEvent:!1,perform:(e,o,t,r)=>({elements:bt(e,o,n=>{if(Ct(n)){let i=Je(n,{textAlign:t});return Ba(i,r.scene.getContainerElement(n),r.scene),i}return n},!0),appState:{...o,currentItemTextAlign:t},captureUpdate:Qe.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=r.scene.getNonDeletedElementsMap();return St("fieldset",{children:[te("legend",{children:g("labels.textAlign")}),te("div",{className:"buttonList",children:te(Vt,{group:"text-align",options:[{value:"left",text:g("labels.left"),icon:Ss,testId:"align-left"},{value:"center",text:g("labels.center"),icon:ks,testId:"align-horizontal-center"},{value:"right",text:g("labels.right"),icon:Ms,testId:"align-right"}],value:ze(e,r,i=>{if(Ct(i))return i.textAlign;let a=Tr(i,n);return a?a.textAlign:null},i=>Ct(i)||Tr(i,n)!==null,i=>i?null:o.currentItemTextAlign),onChange:i=>t(i)})})]})}}),q4=F({name:"changeVerticalAlign",label:"Change vertical alignment",trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:bt(e,o,n=>{if(Ct(n)){let i=Je(n,{verticalAlign:t});return Ba(i,r.scene.getContainerElement(n),r.scene),i}return n},!0),appState:{...o},captureUpdate:Qe.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>te("fieldset",{children:te("div",{className:"buttonList",children:te(Vt,{group:"text-align",options:[{value:ic.TOP,text:g("labels.alignTop"),icon:te(j0,{theme:o.theme}),testId:"align-top"},{value:ic.MIDDLE,text:g("labels.centerVertically"),icon:te(J0,{theme:o.theme}),testId:"align-middle"},{value:ic.BOTTOM,text:g("labels.alignBottom"),icon:te(q0,{theme:o.theme}),testId:"align-bottom"}],value:ze(e,r,n=>{if(Ct(n)&&n.containerId)return n.verticalAlign;let i=Tr(n,r.scene.getNonDeletedElementsMap());return i?i.verticalAlign:null},n=>Ct(n)||Tr(n,r.scene.getNonDeletedElementsMap())!==null,n=>n?null:ic.MIDDLE),onChange:n=>t(n)})})})}),wj=F({name:"changeRoundness",label:"Change edge roundness",trackEvent:!1,perform:(e,o,t)=>({elements:bt(e,o,r=>Px(r)?r:Je(r,{roundness:t==="round"?{type:Y4(r.type)?ac.ADAPTIVE_RADIUS:ac.PROPORTIONAL_RADIUS}:null})),appState:{...o,currentItemRoundness:t},captureUpdate:Qe.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r,renderAction:n})=>{let a=Ql(Lx(e),o).some(l=>l.roundness?.type===ac.LEGACY);return St("fieldset",{children:[te("legend",{children:g("labels.edges")}),St("div",{className:"buttonList",children:[te(Vt,{group:"edges",options:[{value:"sharp",text:g("labels.sharp"),icon:A0},{value:"round",text:g("labels.round"),icon:_0}],value:ze(e,r,l=>a?null:l.roundness?"round":"sharp",l=>!lc(l)&&l.hasOwnProperty("roundness"),l=>l?null:o.currentItemRoundness),onChange:l=>t(l)}),n("togglePolygon")]})]})}}),Mx=e=>[{value:null,text:g("labels.arrowhead_none"),keyBinding:"q",icon:D0},{value:"arrow",text:g("labels.arrowhead_arrow"),keyBinding:"w",icon:te(R0,{flip:e})},{value:"triangle",text:g("labels.arrowhead_triangle"),icon:te(O0,{flip:e}),keyBinding:"e"},{value:"triangle_outline",text:g("labels.arrowhead_triangle_outline"),icon:te(z0,{flip:e}),keyBinding:"r"},{value:"circle",text:g("labels.arrowhead_circle"),keyBinding:"a",icon:te(N0,{flip:e})},{value:"circle_outline",text:g("labels.arrowhead_circle_outline"),keyBinding:"s",icon:te(B0,{flip:e})},{value:"diamond",text:g("labels.arrowhead_diamond"),icon:te(H0,{flip:e}),keyBinding:"d"},{value:"diamond_outline",text:g("labels.arrowhead_diamond_outline"),icon:te(G0,{flip:e}),keyBinding:"f"},{value:"bar",text:g("labels.arrowhead_bar"),keyBinding:"z",icon:te(F0,{flip:e})},{value:"crowfoot_one",text:g("labels.arrowhead_crowfoot_one"),icon:te(Y0,{flip:e}),keyBinding:"x"},{value:"crowfoot_many",text:g("labels.arrowhead_crowfoot_many"),icon:te(U0,{flip:e}),keyBinding:"c"},{value:"crowfoot_one_or_many",text:g("labels.arrowhead_crowfoot_one_or_many"),icon:te(W0,{flip:e}),keyBinding:"v"}],vj=F({name:"changeArrowhead",label:"Change arrowheads",trackEvent:!1,perform:(e,o,t)=>({elements:bt(e,o,r=>{if(Zp(r)){let{position:n,type:i}=t;if(n==="start")return Je(r,{startArrowhead:i});if(n==="end")return Je(r,{endArrowhead:i})}return r}),appState:{...o,[t.position==="start"?"currentItemStartArrowhead":"currentItemEndArrowhead"]:t.type},captureUpdate:Qe.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=Ho().rtl;return St("fieldset",{children:[te("legend",{children:g("labels.arrowheads")}),St("div",{className:"iconSelectList buttonList",children:[te(Yp,{label:"arrowhead_start",options:Mx(!n),value:ze(e,r,i=>Zp(i)&&Pn(i.type)?i.startArrowhead:o.currentItemStartArrowhead,!0,o.currentItemStartArrowhead),onChange:i=>t({position:"start",type:i}),numberOfOptionsToAlwaysShow:4}),te(Yp,{label:"arrowhead_end",group:"arrowheads",options:Mx(!!n),value:ze(e,r,i=>Zp(i)&&Pn(i.type)?i.endArrowhead:o.currentItemEndArrowhead,!0,o.currentItemEndArrowhead),onChange:i=>t({position:"end",type:i}),numberOfOptionsToAlwaysShow:4})]})]})}}),Tj=F({name:"changeArrowType",label:"Change arrow types",trackEvent:!1,perform:(e,o,t,r)=>{let n=bt(e,o,l=>{if(!lc(l))return l;let s=Je(l,{roundness:t===Wo.round?{type:ac.PROPORTIONAL_RADIUS}:null,elbowed:t===Wo.elbow,points:t===Wo.elbow||l.elbowed?[l.points[0],l.points[l.points.length-1]]:l.points});if(Px(s)){s.fixedSegments=null;let d=r.scene.getNonDeletedElementsMap();r.dismissLinearEditor();let c=$p.getPointAtIndexGlobalCoordinates(s,0,d),m=$p.getPointAtIndexGlobalCoordinates(s,-1,d),p=s.startBinding&&d.get(s.startBinding.elementId),u=s.endBinding&&d.get(s.endBinding.elementId),f=p&&s.startBinding?{...s.startBinding,...Sx(s,p,"start",d)}:null,b=u&&s.endBinding?{...s.endBinding,...Sx(s,u,"end",d)}:null;s={...s,startBinding:f,endBinding:b,...V4(s,d,{points:[c,m].map(x=>I4(x[0]-s.x,x[1]-s.y)),startBinding:f,endBinding:b,fixedSegments:null})}}else{let d=r.scene.getNonDeletedElementsMap();if(s.startBinding){let c=d.get(s.startBinding.elementId);c&&Cx(s,c,"start",r.scene)}if(s.endBinding){let c=d.get(s.endBinding.elementId);c&&Cx(s,c,"end",r.scene)}}return s}),i={...o,currentItemArrowType:t},a=o.selectedLinearElement?.elementId;if(a){let l=n.find(s=>s.id===a);l&&(i.selectedLinearElement=new $p(l,jp(e)))}return{elements:n,appState:i,captureUpdate:Qe.IMMEDIATELY}},PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>St("fieldset",{children:[te("legend",{children:g("labels.arrowtypes")}),te("div",{className:"buttonList",children:te(Vt,{group:"arrowtypes",options:[{value:Wo.sharp,text:g("labels.arrowtype_sharp"),icon:_s,testId:"sharp-arrow"},{value:Wo.round,text:g("labels.arrowtype_round"),icon:Rs,testId:"round-arrow"},{value:Wo.elbow,text:g("labels.arrowtype_elbowed"),icon:Ds,testId:"elbow-arrow"}],value:ze(e,r,n=>lc(n)?n.elbowed?Wo.elbow:n.roundness?Wo.round:Wo.sharp:null,n=>lc(n),n=>n?null:o.currentItemArrowType),onChange:n=>t(n)})})]})});import{clamp as iu,roundToStep as nk}from"@haoxin-web/excalidraw-math";import{DEFAULT_CANVAS_BACKGROUND_PICKS as ik,CURSOR_TYPE as Fx,MAX_ZOOM as Ox,MIN_ZOOM as zx,THEME as za,ZOOM_STEP as au,getShortcutKey as Hx,updateActiveTool as li,CODES as ko,KEYS as Ko}from"@haoxin-web/excalidraw-common";import{getNonDeletedElements as ak}from"@haoxin-web/excalidraw-element";import{newElementWith as lk}from"@haoxin-web/excalidraw-element";import{getCommonBounds as sk}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as co}from"@haoxin-web/excalidraw-element";import{useEffect as J4}from"react";import{jsx as ek}from"react/jsx-runtime";var ai=()=>{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},tu=(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`})},Q4=(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();tu(o,n)},so=({children:e,label:o,long:t=!1,style:r,disabled:n})=>(J4(()=>()=>ai().classList.remove("excalidraw-tooltip--visible"),[]),n?null:ek("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:i=>Q4(i.currentTarget,ai(),o,t),onPointerLeave:()=>ai().classList.remove("excalidraw-tooltip--visible"),style:r,children:e}));import dc from"open-color";import{CURSOR_TYPE as ou,MIME_TYPES as ru,THEME as Rx}from"@haoxin-web/excalidraw-common";var Nx='<svg viewBox="0 0 24 24" stroke-width="1" width="28" height="28" xmlns="http://www.w3.org/2000/svg">',tk='<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"/>',Bx='<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"/>',ok=`data:${ru.svg},${encodeURIComponent(`${Nx}${Bx}</svg>`)}`,rk=`data:${ru.svg},${encodeURIComponent(`${Nx}${tk}${Bx}</svg>`)}`,Kt=e=>{e&&(e.style.cursor="")},Ee=(e,o)=>{e&&(e.style.cursor=o)},So,Dx,nu=(e,o)=>{let r=()=>{let n=o===Rx.DARK;So=document.createElement("canvas"),So.theme=o,So.height=20,So.width=20;let i=So.getContext("2d");i.lineWidth=1,i.beginPath(),i.arc(So.width/2,So.height/2,5,0,2*Math.PI),i.fillStyle=n?dc.black:dc.white,i.fill(),i.strokeStyle=n?dc.white:dc.black,i.stroke(),Dx=So.toDataURL(ru.svg)};(!So||So.theme!==o)&&r(),Ee(e,`url(${Dx}) ${20/2} ${20/2}, auto`)},Bt=(e,o)=>{if(e)if(o.activeTool.type==="selection")Kt(e);else if(Oo(o))e.style.cursor=ou.GRAB;else if(It(o))nu(e,o.theme);else if(o.activeTool.type==="laser"){let t=o.theme===Rx.LIGHT?ok:rk;e.style.cursor=`url(${t}), auto`}else if(o.activeTool.type==="laserTrail"){let t=`url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><circle cx="9" cy="9" r="5" fill="orange" opacity="0.5"/><circle cx="9" cy="9" r="3" fill="red" opacity="0.8"/><circle cx="9" cy="9" r="1.5" fill="white"/></svg>') 9 9, auto`;e.style.cursor=t}else["image","custom"].includes(o.activeTool.type)?o.activeTool.type!=="image"&&(e.style.cursor=ou.AUTO):e.style.cursor=ou.CROSSHAIR};var Xo=({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),d=-(n-n/t),c=-(i-i/t);return{scrollX:l+d,scrollY:s+c,zoom:{value:t}}};import{jsx as gc,jsxs as mk}from"react/jsx-runtime";var mc=F({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?co.IMMEDIATELY:co.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t,appProps:r})=>gc(yr,{palette:null,topPicks:ik,label:g("labels.canvasBackground"),type:"canvasBackground",color:o.viewBackgroundColor,onChange:n=>t({viewBackgroundColor:n}),"data-testid":"canvas-background-picker",elements:e,appState:o,updateData:t})}),$o=F({name:"clearCanvas",label:"labels.clearCanvas",icon:Rt,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=>lk(n,{isDeleted:!0})),appState:{...cr(),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.defaultSelectionTool}:o.activeTool},captureUpdate:co.IMMEDIATELY})}),pc=F({name:"zoomIn",label:"buttons.zoomIn",viewMode:!0,icon:Km,trackEvent:{category:"canvas"},predicate:(e,o,t)=>t.showZoomActions!==!1,perform:(e,o,t,r)=>({appState:{...o,...Xo({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:wo(o.zoom.value+au)},o),userToFollow:null},captureUpdate:co.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>gc(z,{type:"button",className:"zoom-in-button zoom-button",icon:Km,title:`${g("buttons.zoomIn")} \u2014 ${Hx("CtrlOrCmd++")}`,"aria-label":g("buttons.zoomIn"),disabled:o.zoom.value>=Ox,onClick:()=>{e(null)}}),keyTest:(e,o,t,r)=>r.props.showZoomActions!==!1&&(e.code===ko.EQUAL||e.code===ko.NUM_ADD)&&(e[Ko.CTRL_OR_CMD]||e.shiftKey)}),uc=F({name:"zoomOut",label:"buttons.zoomOut",icon:$m,viewMode:!0,trackEvent:{category:"canvas"},predicate:(e,o,t)=>t.showZoomActions!==!1,perform:(e,o,t,r)=>({appState:{...o,...Xo({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:wo(o.zoom.value-au)},o),userToFollow:null},captureUpdate:co.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>gc(z,{type:"button",className:"zoom-out-button zoom-button",icon:$m,title:`${g("buttons.zoomOut")} \u2014 ${Hx("CtrlOrCmd+-")}`,"aria-label":g("buttons.zoomOut"),disabled:o.zoom.value<=zx,onClick:()=>{e(null)}}),keyTest:(e,o,t,r)=>r.props.showZoomActions!==!1&&(e.code===ko.MINUS||e.code===ko.NUM_SUBTRACT)&&(e[Ko.CTRL_OR_CMD]||e.shiftKey)}),hc=F({name:"resetZoom",label:"buttons.resetZoom",icon:l0,viewMode:!0,trackEvent:{category:"canvas"},predicate:(e,o,t)=>t.showZoomActions!==!1,perform:(e,o,t,r)=>({appState:{...o,...Xo({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:wo(1)},o),userToFollow:null},captureUpdate:co.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>gc(so,{label:g("buttons.resetZoom"),style:{height:"100%"},children:mk(z,{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,o,t,r)=>r.props.showZoomActions!==!1&&(e.code===ko.ZERO||e.code===ko.NUM_ZERO)&&(e[Ko.CTRL_OR_CMD]||e.shiftKey)}),ck=(e,o,t=1)=>{let[r,n,i,a]=e,l=i-r,s=o.width/l,d=a-n,c=o.height/d,p=Math.min(s,c)*iu(t,.1,1);return Math.min(p,1)},Gx=({bounds:e,appState:o,canvasOffsets:t,fitToViewport:r=!1,viewportZoomFactor:n=1,minZoom:i=-1/0,maxZoom:a=1/0})=>{n=iu(n,zx,Ox);let[l,s,d,c]=e,m=(l+d)/2,p=(s+c)/2,u=t?.left??0,f=t?.top??0,b=t?.right??0,x=t?.bottom??0,w=o.width-u-b,E=o.height-f-x,y;if(r){let S=d-l,P=c-s;y=Math.min(w/S,E/P)*n}else y=ck(e,{width:w,height:E},n);let v=wo(iu(nk(y,au,"floor"),i,a)),I=E1({scenePoint:{x:m,y:p},viewportDimensions:{width:o.width,height:o.height},offsets:t,zoom:{value:v}});return{appState:{...o,scrollX:I.scrollX,scrollY:I.scrollY,zoom:{value:v}},captureUpdate:co.EVENTUALLY}},si=({canvasOffsets:e,targetElements:o,appState:t,fitToViewport:r,viewportZoomFactor:n,minZoom:i,maxZoom:a})=>{let l=sk(ak(o));return Gx({canvasOffsets:e,bounds:l,appState:t,fitToViewport:r,viewportZoomFactor:n,minZoom:i,maxZoom:a})},iq=F({name:"zoomToFitSelectionInViewport",label:"labels.zoomToFitViewport",icon:As,trackEvent:{category:"canvas"},predicate:(e,o,t)=>t.showZoomActions!==!1,perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);return si({targetElements:n.length?n:e,appState:{...o,userToFollow:null},fitToViewport:!1,canvasOffsets:r.getEditorUIOffsets()})},keyTest:(e,o,t,r)=>r.props.showZoomActions!==!1&&e.code===ko.TWO&&e.shiftKey&&!e.altKey&&!e[Ko.CTRL_OR_CMD]}),aq=F({name:"zoomToFitSelection",label:"helpDialog.zoomToSelection",icon:As,trackEvent:{category:"canvas"},predicate:(e,o,t)=>t.showZoomActions!==!1,perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);return si({targetElements:n.length?n:e,appState:{...o,userToFollow:null},fitToViewport:!0,canvasOffsets:r.getEditorUIOffsets()})},keyTest:(e,o,t,r)=>r.props.showZoomActions!==!1&&e.code===ko.THREE&&e.shiftKey&&!e.altKey&&!e[Ko.CTRL_OR_CMD]}),dk=F({name:"zoomToFit",label:"helpDialog.zoomToFit",icon:As,viewMode:!0,trackEvent:{category:"canvas"},predicate:(e,o,t)=>t.showZoomActions!==!1,perform:(e,o,t,r)=>si({targetElements:e,appState:{...o,userToFollow:null},fitToViewport:!1,canvasOffsets:r.getEditorUIOffsets()}),keyTest:(e,o,t,r)=>r.props.showZoomActions!==!1&&e.code===ko.ONE&&e.shiftKey&&!e.altKey&&!e[Ko.CTRL_OR_CMD]}),ln=F({name:"toggleTheme",label:(e,o)=>o.theme===za.DARK?"buttons.lightMode":"buttons.darkMode",keywords:["toggle","dark","light","mode","theme"],icon:e=>e.theme===za.LIGHT?xa:Ea,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t)=>({appState:{...o,theme:t||(o.theme===za.LIGHT?za.DARK:za.LIGHT)},captureUpdate:co.EVENTUALLY}),keyTest:e=>e.altKey&&e.shiftKey&&e.code===ko.D,predicate:(e,o,t,r)=>!!r.props.UIOptions.canvasActions.toggleTheme}),lq=F({name:"toggleEraserTool",label:"toolBar.eraser",trackEvent:{category:"toolbar"},perform:(e,o,t,r)=>{let n;return It(o)?n=li(o,{...o.activeTool.lastActiveTool||{type:r.defaultSelectionTool},lastActiveToolBeforeEraser:null}):n=li(o,{type:"eraser",lastActiveToolBeforeEraser:o.activeTool}),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n},captureUpdate:co.IMMEDIATELY}},keyTest:e=>e.key===Ko.E}),sq=F({name:"toggleLassoTool",label:"toolBar.lasso",icon:hs,trackEvent:{category:"toolbar"},predicate:(e,o,t,r)=>r.defaultSelectionTool!=="lasso",perform:(e,o,t,r)=>{let n;return o.activeTool.type!=="lasso"?(n=li(o,{type:"lasso",fromSelection:!1}),Ee(r.interactiveCanvas,Fx.CROSSHAIR)):n=li(o,{type:"selection"}),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n},captureUpdate:co.NEVER}}}),Ux=F({name:"toggleHandTool",label:"toolBar.hand",trackEvent:{category:"toolbar"},icon:Ps,viewMode:!1,predicate:(e,o,t)=>t.showPanActions!==!1,perform:(e,o,t,r)=>{let n;return Oo(o)?n=li(o,{...o.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):(n=li(o,{type:"hand",lastActiveToolBeforeEraser:o.activeTool}),Ee(r.interactiveCanvas,Fx.GRAB)),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n},captureUpdate:co.IMMEDIATELY}},keyTest:(e,o,t,r)=>r.props.showPanActions!==!1&&!e.altKey&&!e[Ko.CTRL_OR_CMD]&&e.key===Ko.H});import{updateActiveTool as Yx}from"@haoxin-web/excalidraw-common";import{CaptureUpdateAction as pk}from"@haoxin-web/excalidraw-element";var uk=F({name:"setEmbeddableAsActiveTool",trackEvent:{category:"toolbar"},target:"Tool",label:"toolBar.embeddable",perform:(e,o,t,r)=>{let n=Yx(o,{type:"embeddable"});return Bt(r.canvas,{...o,activeTool:n}),{elements:e,appState:{...o,activeTool:Yx(o,{type:"embeddable"})},captureUpdate:pk.EVENTUALLY}}});import{pointFrom as hk}from"@haoxin-web/excalidraw-math";import{maybeBindLinearElement as gk,bindOrUnbindLinearElement as Wx,isBindingEnabled as fk}from"@haoxin-web/excalidraw-element/binding";import{isValidPolygon as Vx,LinearElementEditor as Ha,newElementWith as lu}from"@haoxin-web/excalidraw-element";import{isBindingElement as fc,isFreeDrawElement as Xx,isLinearElement as Kx,isLineElement as bc}from"@haoxin-web/excalidraw-element";import{KEYS as su,arrayToMap as cu,tupleToCoors as bk,updateActiveTool as $x}from"@haoxin-web/excalidraw-common";import{isPathALoop as xk}from"@haoxin-web/excalidraw-element";import{isInvisiblySmallElement as du}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as mu}from"@haoxin-web/excalidraw-element";import{jsx as Ek}from"react/jsx-runtime";var Ft=F({name:"finalize",label:"",trackEvent:!1,perform:(e,o,t,r)=>{let{interactiveCanvas:n,focusContainer:i,scene:a}=r,{event:l,sceneCoords:s}=t??{},d=a.getNonDeletedElementsMap();if(l&&o.selectedLinearElement){let u=Ha.handlePointerUp(l,o.selectedLinearElement,o,r.scene),{startBindingElement:f,endBindingElement:b}=u,x=r.scene.getElement(u.elementId);if(fc(x)&&Wx(x,f,b,r.scene),u!==o.selectedLinearElement){let w=e;return x&&du(x)&&(w=w.map(E=>E.id===x.id?lu(E,{isDeleted:!0}):E)),{elements:w,appState:{selectedLinearElement:{...u,selectedPointsIndices:null},suggestedBindings:[]},captureUpdate:mu.IMMEDIATELY}}}if(o.selectedLinearElement?.isEditing){let{elementId:u,startBindingElement:f,endBindingElement:b}=o.selectedLinearElement,x=Ha.getElement(u,d);if(x)return fc(x)&&Wx(x,f,b,a),bc(x)&&!Vx(x.points)&&a.mutateElement(x,{polygon:!1}),{elements:x.points.length<2||du(x)?e.map(w=>w.id===x.id?lu(w,{isDeleted:!0}):w):void 0,appState:{...o,cursorButton:"up",selectedLinearElement:new Ha(x,cu(d),!1)},captureUpdate:mu.IMMEDIATELY}}let c=e;window.document.activeElement instanceof HTMLElement&&i();let m=null;if(o.multiElement)m=o.multiElement;else if(o.newElement?.type==="freedraw"||fc(o.newElement))m=o.newElement;else if(Object.keys(o.selectedElementIds).length===1){let u=d.get(Object.keys(o.selectedElementIds)[0]);u&&(m=u)}if(m){if(o.multiElement&&m.type!=="freedraw"){let{points:u,lastCommittedPoint:f}=m;(!f||u[u.length-1]!==f)&&a.mutateElement(m,{points:m.points.slice(0,-1)})}if(m&&du(m)&&(c=c.map(u=>u.id===m?.id?lu(u,{isDeleted:!0}):u)),Kx(m)||Xx(m)){let u=xk(m.points,o.zoom.value);if(u&&(bc(m)||Xx(m))){let f=m.points,b=f[0],x=f.map((w,E)=>E===f.length-1?hk(b[0],b[1]):w);bc(m)?a.mutateElement(m,{points:x,polygon:!0}):a.mutateElement(m,{points:x})}if(bc(m)&&!Vx(m.points)&&a.mutateElement(m,{polygon:!1}),fc(m)&&!u&&m.points.length>1&&fk(o)){let f=s??bk(Ha.getPointAtIndexGlobalCoordinates(m,-1,cu(e)));gk(m,o,f,a)}}}(!o.activeTool.locked&&o.activeTool.type!=="freedraw"||!m)&&Kt(n);let p;return o.activeTool.type==="eraser"?p=$x(o,{...o.activeTool.lastActiveTool||{type:r.defaultSelectionTool},lastActiveToolBeforeEraser:null}):p=$x(o,{type:r.defaultSelectionTool}),{elements:c,appState:{...o,cursorButton:"up",activeTool:(o.activeTool.locked||o.activeTool.type==="freedraw"||o.activeTool.type==="line"||o.activeTool.type==="arrow")&&m?o.activeTool:p,activeEmbeddable:null,newElement:null,selectionElement:null,multiElement:null,editingTextElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:m&&!o.activeTool.locked&&o.activeTool.type!=="freedraw"?{...o.selectedElementIds,[m.id]:!0}:o.selectedElementIds,selectedLinearElement:m&&Kx(m)?new Ha(m,cu(c)):o.selectedLinearElement},captureUpdate:mu.IMMEDIATELY}},keyTest:(e,o)=>e.key===su.ESCAPE&&(o.selectedLinearElement?.isEditing||!o.newElement&&o.multiElement===null)||(e.key===su.ESCAPE||e.key===su.ENTER)&&o.multiElement!==null,PanelComponent:({appState:e,updateData:o,data:t})=>Ek(z,{type:"button",icon:x0,title:g("buttons.done"),"aria-label":g("buttons.done"),onClick:o,visible:e.multiElement!=null,size:t?.size||"medium",style:{pointerEvents:"all"}})});import{KEYS as mi,DEFAULT_EXPORT_PADDING as cM,EXPORT_SCALES as dM,THEME as hu}from"@haoxin-web/excalidraw-common";import{getNonDeletedElements as mM}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as ho}from"@haoxin-web/excalidraw-element";import yk from"clsx";import{jsx as Zx,jsxs as wk}from"react/jsx-runtime";var Ga=({children:e,checked:o,onChange:t,className:r})=>wk("div",{className:yk("Checkbox",r,{"is-checked":o}),onClick:n=>{t(!o,n),n.currentTarget.querySelector(".Checkbox-box").focus()},children:[Zx("button",{type:"button",className:"Checkbox-box",role:"checkbox","aria-checked":o,children:p0}),Zx("div",{className:"Checkbox-label",children:e})]});import{THEME as Ua}from"@haoxin-web/excalidraw-common";import{jsx as Ya}from"react/jsx-runtime";var qx=e=>{let o=e.title||(e.value===Ua.DARK?g("buttons.lightMode"):g("buttons.darkMode"));return Ya(z,{type:"icon",icon:e.value===Ua.LIGHT?jx.MOON:jx.SUN,title:o,"aria-label":o,onClick:()=>e.onChange(e.value===Ua.DARK?Ua.LIGHT:Ua.DARK),"data-testid":"toggle-dark-mode"})},jx={SUN:Ya("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:Ya("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:Ya("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:Ya("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 vk}from"react";import{focusNearestParent as Tk,KEYS as Ik}from"@haoxin-web/excalidraw-common";import{jsx as Jx,jsxs as Ck}from"react/jsx-runtime";var Qx=e=>{let{id:o}=Xe(),[t,r]=vk(e.value),n=a=>{e.ignoreFocus||Tk(a.target);let l=a.target.value;l!==e.value&&e.onChange(l)},i=a=>{if(a.key===Ik.ENTER){if(a.preventDefault(),a.nativeEvent.isComposing||a.keyCode===229)return;a.currentTarget.blur()}};return Ck("div",{className:"ProjectName",children:[Jx("label",{className:"ProjectName-label",htmlFor:"filename",children:`${e.label}:`}),Jx("input",{type:"text",className:"TextInput",onBlur:n,onKeyDown:i,id:`${o}-filename`,value:t,onChange:a=>r(a.target.value)})]})};import{DEFAULT_EXPORT_PADDING as eM,DEFAULT_FILENAME as tM,IMAGE_MIME_TYPES as gE,isFirefox as oM,MIME_TYPES as rM,cloneJSON as nM,SVG_DOCUMENT_PREAMBLE as iM}from"@haoxin-web/excalidraw-common";import{getNonDeletedElements as aM}from"@haoxin-web/excalidraw-element";import{isFrameLikeElement as lM}from"@haoxin-web/excalidraw-element";import{getElementsOverlappingFrame as sM}from"@haoxin-web/excalidraw-element";import{ALLOWED_PASTE_MIME_TYPES as Bk,EXPORT_DATA_TYPES as Xa,MIME_TYPES as po,arrayToMap as Fk,isMemberOf as Ok,isPromiseLike as zk,EVENT as yc}from"@haoxin-web/excalidraw-common";import{mutateElement as Hk}from"@haoxin-web/excalidraw-element";import{deepCopyElement as Gk}from"@haoxin-web/excalidraw-element";import{isFrameLikeElement as Uk,isInitializedImageElement as Yk}from"@haoxin-web/excalidraw-element";import{getContainingFrame as dE}from"@haoxin-web/excalidraw-element";import{pointFrom as Ir}from"@haoxin-web/excalidraw-math";import{COLOR_PALETTE as tE,DEFAULT_CHART_COLOR_INDEX as Sk,getAllColorsSpecificShade as kk,DEFAULT_FONT_FAMILY as Mk,DEFAULT_FONT_SIZE as oE,VERTICAL_ALIGN as Lk,randomId as rE,isDevEnv as nE}from"@haoxin-web/excalidraw-common";import{newTextElement as xc,newLinearElement as Va,newElement as uu}from"@haoxin-web/excalidraw-element";var mo=32,Te=12,Cr=256,iE=50,sn="NOT_SPREADSHEET",ci="VALID_SPREADSHEET",Wa=e=>{let o=/^([-+]?)[$€£¥₩]?([-+]?)([\d.,]+)[%]?$/.exec(e);return o?parseFloat(`${(o[1]||o[2])+o[3]}`.replace(/,/g,"")):null},pu=(e,o)=>e.slice(1).every(t=>Wa(t[o])!==null),eE=e=>{let o=e[0].length;if(o>2)return{type:sn,reason:"More than 2 columns"};if(o===1){if(!pu(e,0))return{type:sn,reason:"Value is not numeric"};let s=Wa(e[0][0])===null,d=(s?e.slice(1):e).map(c=>Wa(c[0]));return d.length<2?{type:sn,reason:"Less than two rows"}:{type:ci,spreadsheet:{title:s?e[0][0]:null,labels:null,values:d}}}let t=pu(e,0),r=pu(e,1);if(!t&&!r)return{type:sn,reason:"Value is not numeric"};let[n,i]=r?[0,1]:[1,0],a=Wa(e[0][i])===null,l=a?e.slice(1):e;return l.length<2?{type:sn,reason:"Less than 2 rows"}:{type:ci,spreadsheet:{title:a?e[0][i]:null,labels:l.map(s=>s[n]),values:l.map(s=>Wa(s[i]))}}},Pk=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},aE=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:sn,reason:"No values"};let t=o[0].length;if(!o.every(i=>i.length===t))return{type:sn,reason:"All rows don't have same number of columns"};let n=eE(o);if(n.type!==ci){let i=eE(Pk(o));if(i.type===ci)return i}return n},Ec=kk(Sk),$t={fillStyle:"hachure",fontFamily:Mk,fontSize:oE,opacity:100,roughness:1,strokeColor:tE.black,roundness:null,strokeStyle:"solid",strokeWidth:1,verticalAlign:Lk.MIDDLE,locked:!1},lE=e=>{let o=(mo+Te)*e.values.length+Te,t=Cr+Te*2;return{chartWidth:o,chartHeight:t}},Ak=(e,o,t,r,n)=>e.labels?.map((i,a)=>xc({groupIds:[r],backgroundColor:n,...$t,text:i.length>8?`${i.slice(0,5)}...`:i,x:o+a*(mo+Te)+Te*2,y:t+Te/2,width:mo,angle:5.87,fontSize:16,textAlign:"center",verticalAlign:"top"}))||[],_k=(e,o,t,r,n)=>{let i=xc({groupIds:[r],backgroundColor:n,...$t,x:o-Te,y:t-Te,text:"0",textAlign:"right"}),a=xc({groupIds:[r],backgroundColor:n,...$t,x:o-Te,y:t-Cr-i.height/2,text:Math.max(...e.values).toLocaleString(),textAlign:"right"});return[i,a]},Dk=(e,o,t,r,n)=>{let{chartWidth:i,chartHeight:a}=lE(e),l=Va({backgroundColor:n,groupIds:[r],...$t,type:"line",x:o,y:t,width:i,points:[Ir(0,0),Ir(i,0)]}),s=Va({backgroundColor:n,groupIds:[r],...$t,type:"line",x:o,y:t,height:a,points:[Ir(0,0),Ir(0,-a)]}),d=Va({backgroundColor:n,groupIds:[r],...$t,type:"line",x:o,y:t-Cr-Te,strokeStyle:"dotted",width:i,opacity:iE,points:[Ir(0,0),Ir(i,0)]});return[l,s,d]},sE=(e,o,t,r,n,i)=>{let{chartWidth:a,chartHeight:l}=lE(e),s=e.title?xc({backgroundColor:n,groupIds:[r],...$t,text:e.title,x:o+a/2,y:t-Cr-Te*2-oE,roundness:null,textAlign:"center"}):null,d=i?uu({backgroundColor:n,groupIds:[r],...$t,type:"rectangle",x:o,y:t-l,width:a,height:l,strokeColor:tE.black,fillStyle:"solid",opacity:6}):null;return[...d?[d]:[],...s?[s]:[],...Ak(e,o,t,r,n),..._k(e,o,t,r,n),...Dk(e,o,t,r,n)]},Rk=(e,o,t)=>{let r=Math.max(...e.values),n=rE(),i=Ec[Math.floor(Math.random()*Ec.length)];return[...e.values.map((l,s)=>{let d=l/r*Cr;return uu({backgroundColor:i,groupIds:[n],...$t,type:"rectangle",x:o+s*(mo+Te)+Te,y:t-d-Te,width:mo,height:d})}),...sE(e,o,t,n,i,nE())]},Nk=(e,o,t)=>{let r=Math.max(...e.values),n=rE(),i=Ec[Math.floor(Math.random()*Ec.length)],a=0,l=[];for(let b of e.values){let x=a*(mo+Te),w=-(b/r)*Cr;l.push([x,w]),a++}let s=Math.max(...l.map(b=>b[0])),d=Math.max(...l.map(b=>b[1])),c=Math.min(...l.map(b=>b[0])),m=Math.min(...l.map(b=>b[1])),p=Va({backgroundColor:i,groupIds:[n],...$t,type:"line",x:o+Te+mo/2,y:t-Te,height:d-m,width:s-c,strokeWidth:2,points:l}),u=e.values.map((b,x)=>{let w=x*(mo+Te)+Te/2,E=-(b/r)*Cr+Te/2;return uu({backgroundColor:i,groupIds:[n],...$t,fillStyle:"solid",strokeWidth:2,type:"ellipse",x:o+w+mo/2,y:t+E-Te*2,width:Te,height:Te})}),f=e.values.map((b,x)=>{let w=x*(mo+Te)+Te/2,E=b/r*Cr+Te/2+Te;return Va({backgroundColor:i,groupIds:[n],...$t,type:"line",x:o+w+mo/2+Te/2,y:t-E,height:E,strokeStyle:"dotted",opacity:iE,points:[Ir(0,0),Ir(0,E)]})});return[...sE(e,o,t,n,i,nE()),p,...f,...u]},cE=(e,o,t,r)=>e==="line"?Nk(o,t,r):Rk(o,t,r);var wJ="clipboard"in navigator&&"readText"in navigator.clipboard,wc="clipboard"in navigator&&"writeText"in navigator.clipboard,di="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,Wk=e=>!!([Xa.excalidraw,Xa.excalidrawClipboard,Xa.excalidrawClipboardWithAPI].includes(e?.type)&&Array.isArray(e.elements)),mE=({types:e,files:o})=>{!e&&!o&&console.warn("createPasteEvent: no types or files provided");let t=new ClipboardEvent(yc.PASTE,{clipboardData:new DataTransfer});if(e)for(let[r,n]of Object.entries(e)){if(typeof n!="string"){o=o||[],o.push(n),t.clipboardData?.items.add(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},Vk=({elements:e,files:o})=>{let t=Fk(e),r=new Set(e.filter(l=>Uk(l))),n=!1,i=e.reduce((l,s)=>(Yk(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:Xa.excalidrawClipboard,elements:e.map(l=>{if(dE(l,t)&&!r.has(dE(l,t))){let s=Gk(l);return Hk(s,t,{frameId:null}),s}return l}),files:o?i:void 0};return JSON.stringify(a)},vc=async(e,o,t)=>{await uo(Vk({elements:e,files:o}),t)},Xk=e=>{let o=aE(e);return o.type===ci?{spreadsheet:o.spreadsheet}:null};function pE(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(pE(t));return o}var Kk=e=>{let o=e.value;try{let t=new DOMParser().parseFromString(o,po.html),r=pE(t.body);if(r.length)return{type:"mixedContent",value:r}}catch(t){console.error(`error in parseHTMLFromPaste: ${t.message}`)}return null},uE=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{[po.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(Ok(Bk,r))try{if(r===po.text||r===po.html)e[r]=await(await t.getType(r)).text();else if(B1(r)){let n=await t.getType(r),i=Y1(n,r,void 0);e[r]=i}else throw new Bm(`Unsupported clipboard type: ${r}`)}catch(n){console.warn(n instanceof Bm?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},$k=async(e,o=!1)=>{try{let t=e.findByType(po.html),r=!o&&t&&Kk(t);return r?r.value.every(n=>n.type==="text")?{type:"text",value:e.getData(po.text)??r.value.map(n=>n.value).join(`
5
- `).trim()}:r:{type:"text",value:(e.getData(po.text)||"").trim()}}catch{return{type:"text",value:""}}},Zk=function(e){return this.find(o=>o.type===e)||null},jk=function(e){return this.find(t=>t.type===e)?.value??null},qk=function(){return this.filter(e=>e.kind==="file")},Ka=async e=>{let o;Qk(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 U1(r);return{type:n.type,kind:"file",file:await cs(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:Zk,getData:jk,getFiles:qk})},hE=async(e,o=!1)=>{let t=await $k(e,o);if(t.type==="mixedContent")return{mixedContent:t.value};try{let r=!o&&Xk(t.value);if(r)return r}catch(r){console.error(r)}try{let r=JSON.parse(t.value),n=r.type===Xa.excalidrawClipboardWithAPI;if(Wk(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}},Tc=async e=>{try{await navigator.clipboard.write([new window.ClipboardItem({[po.png]:e})])}catch(o){if(zk(e))await navigator.clipboard.write([new window.ClipboardItem({[po.png]:await e})]);else throw o}},uo=async(e,o)=>{if(wc)try{await navigator.clipboard.writeText(e||"");return}catch(t){console.error(t)}try{if(o){if(o.clipboardData?.setData(po.text,e||""),o.clipboardData?.getData(po.text)!==e)throw new Error("Failed to setData on clipboardEvent");return}}catch(t){console.error(t)}if(!Jk(e))throw new Error("Error copying to clipboard.")},Jk=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},Qk=e=>e.type===yc.PASTE||e.type===yc.COPY||e.type===yc.CUT;var cn=(e,{selectedElementIds:o},t)=>{e=aM(e);let r=t&&ye(e,{selectedElementIds:o}),n=null,i=r?q(e,{selectedElementIds:o},{includeBoundTextElement:!0}):e;return r&&(i.length===1&&lM(i[0])?(n=i[0],i=sM(e,n)):i.length>1&&(i=q(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}))),{exportingFrame:n,exportedElements:nM(i)}},dn=async(e,o,t,r,{exportBackground:n,exportPadding:i=eM,viewBackgroundColor:a,name:l=t.name||tM,fileHandle:s=null,exportingFrame:d=null})=>{if(o.length===0)throw new Error(g("alerts.cannotExportEmptyCanvas"));if(e==="svg"||e==="clipboard-svg"){let m=Dn(o,{exportBackground:n,exportWithDarkMode:t.exportWithDarkMode,viewBackgroundColor:a,exportPadding:i,exportScale:t.exportScale,exportEmbedScene:t.exportEmbedScene&&e==="svg"},r,{exportingFrame:d});if(e==="svg")return Fm(m.then(p=>new Blob([iM+p.outerHTML],{type:rM.svg})),{description:"Export to SVG",name:l,extension:t.exportEmbedScene?"excalidraw.svg":"svg",mimeTypes:[gE.svg],fileHandle:s});if(e==="clipboard-svg"){let p=await m.then(u=>u.outerHTML);try{await uo(p)}catch{throw new Error(g("errors.copyToSystemClipboardFailed"))}return}}let c=is(o,t,r,{exportBackground:n,viewBackgroundColor:a,exportPadding:i,exportingFrame:d});if(e==="png"){let m=zo(c);return t.exportEmbedScene&&(m=m.then(p=>import("./data/image-C6AOHNJE.js").then(({encodePngMetadata:u})=>u({blob:p,metadata:ma(o,t,r,"local")})))),Fm(m,{description:"Export to PNG",name:l,extension:t.exportEmbedScene?"excalidraw.png":"png",mimeTypes:[gE.png],fileHandle:s})}else if(e==="clipboard")try{let m=zo(c);await Tc(m)}catch(m){throw console.warn(m),m.name==="CANVAS_POSSIBLY_TOO_BIG"?new Error(g("canvasError.canvasTooBig")):oM&&m.name==="TypeError"?new Error(`${g("alerts.couldNotCopyToClipboard")}
5
+ `).trim()}:r:{type:"text",value:(e.getData(po.text)||"").trim()}}catch{return{type:"text",value:""}}},Zk=function(e){return this.find(o=>o.type===e)||null},jk=function(e){return this.find(t=>t.type===e)?.value??null},qk=function(){return this.filter(e=>e.kind==="file")},Ka=async e=>{let o;Qk(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 U1(r);return{type:n.type,kind:"file",file:await cs(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:Zk,getData:jk,getFiles:qk})},hE=async(e,o=!1)=>{let t=await $k(e,o);if(t.type==="mixedContent")return{mixedContent:t.value};try{let r=!o&&Xk(t.value);if(r)return r}catch(r){console.error(r)}try{let r=JSON.parse(t.value),n=r.type===Xa.excalidrawClipboardWithAPI;if(Wk(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}},Tc=async e=>{try{await navigator.clipboard.write([new window.ClipboardItem({[po.png]:e})])}catch(o){if(zk(e))await navigator.clipboard.write([new window.ClipboardItem({[po.png]:await e})]);else throw o}},uo=async(e,o)=>{if(wc)try{await navigator.clipboard.writeText(e||"");return}catch(t){console.error(t)}try{if(o){if(o.clipboardData?.setData(po.text,e||""),o.clipboardData?.getData(po.text)!==e)throw new Error("Failed to setData on clipboardEvent");return}}catch(t){console.error(t)}if(!Jk(e))throw new Error("Error copying to clipboard.")},Jk=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},Qk=e=>e.type===yc.PASTE||e.type===yc.COPY||e.type===yc.CUT;var cn=(e,{selectedElementIds:o},t)=>{e=aM(e);let r=t&&ye(e,{selectedElementIds:o}),n=null,i=r?q(e,{selectedElementIds:o},{includeBoundTextElement:!0}):e;return r&&(i.length===1&&lM(i[0])?(n=i[0],i=sM(e,n)):i.length>1&&(i=q(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}))),{exportingFrame:n,exportedElements:nM(i)}},dn=async(e,o,t,r,{exportBackground:n,exportPadding:i=eM,viewBackgroundColor:a,name:l=t.name||tM,fileHandle:s=null,exportingFrame:d=null})=>{if(o.length===0)throw new Error(g("alerts.cannotExportEmptyCanvas"));if(e==="svg"||e==="clipboard-svg"){let m=Dn(o,{exportBackground:n,exportWithDarkMode:t.exportWithDarkMode,viewBackgroundColor:a,exportPadding:i,exportScale:t.exportScale,exportEmbedScene:t.exportEmbedScene&&e==="svg"},r,{exportingFrame:d});if(e==="svg")return Fm(m.then(p=>new Blob([iM+p.outerHTML],{type:rM.svg})),{description:"Export to SVG",name:l,extension:t.exportEmbedScene?"excalidraw.svg":"svg",mimeTypes:[gE.svg],fileHandle:s});if(e==="clipboard-svg"){let p=await m.then(u=>u.outerHTML);try{await uo(p)}catch{throw new Error(g("errors.copyToSystemClipboardFailed"))}return}}let c=is(o,t,r,{exportBackground:n,viewBackgroundColor:a,exportPadding:i,exportingFrame:d});if(e==="png"){let m=zo(c);return t.exportEmbedScene&&(m=m.then(p=>import("./data/image-SVXFZHEK.js").then(({encodePngMetadata:u})=>u({blob:p,metadata:ma(o,t,r,"local")})))),Fm(m,{description:"Export to PNG",name:l,extension:t.exportEmbedScene?"excalidraw.png":"png",mimeTypes:[gE.png],fileHandle:s})}else if(e==="clipboard")try{let m=zo(c);await Tc(m)}catch(m){throw console.warn(m),m.name==="CANVAS_POSSIBLY_TOO_BIG"?new Error(g("canvasError.canvasTooBig")):oM&&m.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 fE=async(e,o,t,r)=>{let{exportBackground:n,viewBackgroundColor:i,fileHandle:a}=o,l=R1(a);if(!a||!N1(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:d}=cn(e,o,!1);return await dn(l,s,o,t,{exportBackground:n,viewBackgroundColor:i,name:r,fileHandle:a,exportingFrame:d}),{fileHandle:a}};import{Fragment as pM,jsx as Zo,jsxs as uM}from"react/jsx-runtime";var gu=F({name:"changeProjectName",label:"labels.fileTitle",trackEvent:!1,perform:(e,o,t)=>({appState:{...o,name:t},captureUpdate:ho.EVENTUALLY}),PanelComponent:({appState:e,updateData:o,appProps:t,data:r,app:n})=>Zo(Qx,{label:g("labels.fileTitle"),value:n.getName(),onChange:i=>o(i),ignoreFocus:r?.ignoreFocus??!1})}),bE=F({name:"changeExportScale",label:"imageExportDialog.scale",trackEvent:{category:"export",action:"scale"},perform:(e,o,t)=>({appState:{...o,exportScale:t},captureUpdate:ho.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t})=>{let r=mM(e),i=ye(r,o)?q(r,o):r;return Zo(pM,{children:dM.map(a=>{let[l,s]=_1(i,cM,a),d=`${g("imageExportDialog.label.scale")} ${a}x (${l}x${s})`;return Zo(z,{size:"small",type:"radio",icon:`${a}x`,name:"export-canvas-scale",title:d,"aria-label":d,id:"export-canvas-scale",checked:a===o.exportScale,onChange:()=>t(a)},a)})})}}),fu=F({name:"changeExportBackground",label:"imageExportDialog.label.withBackground",trackEvent:{category:"export",action:"toggleBackground"},perform:(e,o,t)=>({appState:{...o,exportBackground:t},captureUpdate:ho.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>Zo(Ga,{checked:e.exportBackground,onChange:t=>o(t),children:g("imageExportDialog.label.withBackground")})}),Ic=F({name:"changeExportEmbedScene",label:"imageExportDialog.tooltip.embedScene",trackEvent:{category:"export",action:"embedScene"},perform:(e,o,t)=>({appState:{...o,exportEmbedScene:t},captureUpdate:ho.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>uM(Ga,{checked:e.exportEmbedScene,onChange:t=>o(t),children:[g("imageExportDialog.label.embedScene"),Zo(so,{label:g("imageExportDialog.tooltip.embedScene"),long:!0,children:Zo("div",{className:"excalidraw-tooltip-icon",children:E0})})]})}),mn=F({name:"saveToActiveFile",label:"buttons.save",icon:tn,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}=as(o.fileHandle)?await fE(e,o,r.files,r.getName()):await ts(e,o,r.files,r.getName());return{captureUpdate:ho.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:ho.EVENTUALLY}}},keyTest:e=>e.key===mi.S&&e[mi.CTRL_OR_CMD]&&!e.shiftKey}),$a=F({name:"saveFileToDisk",label:"exportDialog.disk_title",icon:tn,viewMode:!0,trackEvent:{category:"export"},perform:async(e,o,t,r)=>{try{let{fileHandle:n}=await ts(e,{...o,fileHandle:null},r.files,r.getName());return{captureUpdate:ho.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:ho.EVENTUALLY}}},keyTest:e=>e.key===mi.S&&e.shiftKey&&e[mi.CTRL_OR_CMD],PanelComponent:({updateData:e})=>Zo(z,{type:"button",icon:h0,title:g("buttons.saveAs"),"aria-label":g("buttons.saveAs"),showAriaLabel:pe().editor.isMobile,hidden:!_n,onClick:()=>e(null),"data-testid":"save-as-button"})}),pi=F({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 Om(o,e);return{elements:n,appState:i,files:a,captureUpdate:ho.IMMEDIATELY}}catch(n){return n?.name==="AbortError"?(console.warn(n),!1):{elements:e,appState:{...o,errorMessage:n.message},files:r.files,captureUpdate:ho.EVENTUALLY}}},keyTest:e=>e[mi.CTRL_OR_CMD]&&e.key===mi.O}),xE=F({name:"exportWithDarkMode",label:"imageExportDialog.label.darkMode",trackEvent:{category:"export",action:"toggleTheme"},perform:(e,o,t)=>({appState:{...o,exportWithDarkMode:t},captureUpdate:ho.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>Zo("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"-45px",marginBottom:"10px"},children:Zo(qx,{value:e.exportWithDarkMode?hu.DARK:hu.LIGHT,onChange:t=>{o(t===hu.DARK)},title:g("imageExportDialog.label.darkMode")})})});import{DEFAULT_FONT_SIZE as hM,DEFAULT_FONT_FAMILY as gM,DEFAULT_TEXT_ALIGN as fM,CODES as EE,KEYS as yE,getLineHeight as bM}from"@haoxin-web/excalidraw-common";import{newElementWith as Cc}from"@haoxin-web/excalidraw-element";import{hasBoundTextElement as xM,canApplyRoundnessTypeToElement as EM,getDefaultRoundnessTypeForElement as yM,isFrameLikeElement as wM,isArrowElement as vM,isExcalidrawElement as TM,isTextElement as bu}from"@haoxin-web/excalidraw-element";import{getBoundTextElement as IM,redrawTextBoundingBox as CM}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as xu}from"@haoxin-web/excalidraw-element";var wE="{}",Eu=F({name:"copyStyles",label:"labels.copyStyles",icon:mp,trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=[],i=e.find(a=>o.selectedElementIds[a.id]);if(n.push(i),i&&xM(i)){let a=IM(i,r.scene.getNonDeletedElementsMap());n.push(a)}return i&&(wE=JSON.stringify(n)),{appState:{...o,toast:{message:g("toast.copyStyles")}},captureUpdate:xu.EVENTUALLY}},keyTest:e=>e[yE.CTRL_OR_CMD]&&e.altKey&&e.code===EE.C}),yu=F({name:"pasteStyles",label:"labels.pasteStyles",icon:mp,trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=JSON.parse(wE),i=n[0],a=n[1];if(!TM(i))return{elements:e,captureUpdate:xu.EVENTUALLY};let l=q(e,o,{includeBoundTextElement:!0}),s=l.map(d=>d.id);return{elements:e.map(d=>{if(s.includes(d.id)){let c=i;if(bu(d)&&d.containerId&&(c=a),!c)return d;let m=Cc(d,{backgroundColor:c?.backgroundColor,strokeWidth:c?.strokeWidth,strokeColor:c?.strokeColor,strokeStyle:c?.strokeStyle,fillStyle:c?.fillStyle,opacity:c?.opacity,roughness:c?.roughness,roundness:c.roundness?EM(c.roundness.type,d)?c.roundness:yM(d):null});if(bu(m)){let p=c.fontSize||hM,u=c.fontFamily||gM;m=Cc(m,{fontSize:p,fontFamily:u,textAlign:c.textAlign||fM,lineHeight:c.lineHeight||bM(u)});let f=null;m.containerId&&(f=l.find(b=>bu(m)&&b.id===m.containerId)||null),CM(m,f,r.scene)}return m.type==="arrow"&&vM(c)&&(m=Cc(m,{startArrowhead:c.startArrowhead,endArrowhead:c.endArrowhead})),wM(d)&&(m=Cc(m,{roundness:null,backgroundColor:"transparent"})),m}return d}),captureUpdate:xu.IMMEDIATELY}},keyTest:e=>e[yE.CTRL_OR_CMD]&&e.altKey&&e.code===EE.V});import{KEYS as SM}from"@haoxin-web/excalidraw-common";import{getNonDeletedElements as kM}from"@haoxin-web/excalidraw-element";import{showSelectedShapeActions as MM}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as wu}from"@haoxin-web/excalidraw-element";import{jsx as vE}from"react/jsx-runtime";var LM=F({name:"toggleCanvasMenu",label:"buttons.menu",trackEvent:{category:"menu"},perform:(e,o)=>({appState:{...o,openMenu:o.openMenu==="canvas"?null:"canvas"},captureUpdate:wu.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>vE(z,{type:"button",icon:bs,"aria-label":g("buttons.menu"),onClick:o,selected:e.openMenu==="canvas"})}),PM=F({name:"toggleEditMenu",label:"buttons.edit",trackEvent:{category:"menu"},perform:(e,o)=>({appState:{...o,openMenu:o.openMenu==="shape"?null:"shape"},captureUpdate:wu.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t})=>vE(z,{visible:MM(o,kM(e)),type:"button",icon:g0,"aria-label":g("buttons.edit"),onClick:t,selected:o.openMenu==="shape"})}),pn=F({name:"toggleShortcuts",label:"welcomeScreen.defaults.helpHint",icon:c0,viewMode:!0,trackEvent:{category:"menu",action:"toggleHelpDialog"},perform:(e,o,t,{focusContainer:r})=>(o.openDialog?.name==="help"&&r(),{appState:{...o,openDialog:o.openDialog?.name==="help"?null:{name:"help"}},captureUpdate:wu.EVENTUALLY}),keyTest:e=>e.key===SM.QUESTION_MARK});import{getNonDeletedElements as kc}from"@haoxin-web/excalidraw-element";import{newElementWith as CE}from"@haoxin-web/excalidraw-element";import{isBoundToContainer as AM}from"@haoxin-web/excalidraw-element";import{frameAndChildrenSelectedTogether as _M,getElementsInResizingFrame as DM,getFrameLikeElements as RM,getRootElements as NM,groupByFrameLikes as BM,removeElementsFromFrame as FM,replaceAllElementsInFrame as OM}from"@haoxin-web/excalidraw-element";import{KEYS as Mc,randomId as zM,arrayToMap as vu,getShortcutKey as SE}from"@haoxin-web/excalidraw-common";import{getSelectedGroupIds as Sc,selectGroup as HM,selectGroupsForSelectedElements as GM,getElementsInGroup as TE,addToGroup as UM,removeFromSelectedGroups as YM,isElementInGroup as kE}from"@haoxin-web/excalidraw-element";import{syncMovedIndices as WM}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as Za}from"@haoxin-web/excalidraw-element";import{jsx as ui}from"react/jsx-runtime";var VM=e=>{if(e.length>=2){let o=e[0].groupIds;for(let t of o)if(e.reduce((r,n)=>r&&kE(n,t),!0))return!0}return!1},IE=(e,o,t)=>{let r=t.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0});return r.length>=2&&!VM(r)&&!_M(r)},Tu=F({name:"group",label:"labels.group",icon:e=>ui(sp,{theme:e.theme}),trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=NM(r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0}));if(n.length<2)return{appState:o,elements:e,captureUpdate:Za.EVENTUALLY};let i=Sc(o);if(i.length===1){let x=i[0],w=new Set(TE(e,x).map(v=>v.id)),E=new Set(n.map(v=>v.id));if(new Set([...Array.from(w),...Array.from(E)]).size===w.size)return{appState:o,elements:e,captureUpdate:Za.EVENTUALLY}}let a=[...e];new Set(n.map(x=>x.frameId)).size>1&&BM(n).forEach((w,E)=>{FM(w,r.scene.getNonDeletedElementsMap())});let s=zM(),d=vu(n);a=a.map(x=>d.get(x.id)?CE(x,{groupIds:UM(x.groupIds,s,o.editingGroupId)}):x);let c=TE(a,s),m=c[c.length-1],p=a.lastIndexOf(m),u=a.slice(p+1),f=a.slice(0,p).filter(x=>!kE(x,s)),b=WM([...f,...c,...u],vu(c));return{appState:{...o,...HM(s,{...o,selectedGroupIds:{}},kc(a))},elements:b,captureUpdate:Za.IMMEDIATELY}},predicate:(e,o,t,r)=>IE(e,o,r),keyTest:e=>!e.shiftKey&&e[Mc.CTRL_OR_CMD]&&e.key===Mc.G,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>ui(z,{hidden:!IE(e,o,r),type:"button",icon:ui(sp,{theme:o.theme}),onClick:()=>t(null),title:`${g("labels.group")} \u2014 ${SE("CtrlOrCmd+G")}`,"aria-label":g("labels.group"),visible:ye(kc(e),o)})}),Iu=F({name:"ungroup",label:"labels.ungroup",icon:e=>ui(cp,{theme:e.theme}),trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=Sc(o),i=vu(e);if(n.length===0)return{appState:o,elements:e,captureUpdate:Za.EVENTUALLY};let a=[...e],l=[];a=a.map(p=>{AM(p)&&l.push(p.id);let u=YM(p.groupIds,o.selectedGroupIds);return u.length===p.groupIds.length?p:CE(p,{groupIds:u})});let s=GM(o,kc(a),o,null),d=r.scene.getSelectedElements(o),c=new Set(d.filter(p=>p.frameId).map(p=>p.frameId));return RM(e).filter(p=>c.has(p.id)).forEach(p=>{p&&(a=OM(a,DM(a,p,o,i),p,r))}),s.selectedElementIds=Object.entries(s.selectedElementIds).reduce((p,[u,f])=>(f&&!l.includes(u)&&(p[u]=!0),p),{}),{appState:{...o,...s},elements:a,captureUpdate:Za.IMMEDIATELY}},keyTest:e=>e.shiftKey&&e[Mc.CTRL_OR_CMD]&&e.key===Mc.G.toUpperCase(),predicate:(e,o)=>Sc(o).length>0,PanelComponent:({elements:e,appState:o,updateData:t})=>ui(z,{type:"button",hidden:Sc(o).length===0,icon:ui(cp,{theme:o.theme}),onClick:()=>t(null),title:`${g("labels.ungroup")} \u2014 ${SE("CtrlOrCmd+Shift+G")}`,"aria-label":g("labels.ungroup"),visible:ye(kc(e),o)})});import JM from"clsx";import{CaptureUpdateAction as _E}from"@haoxin-web/excalidraw-element";import{COLOR_CHARCOAL_BLACK as XM,COLOR_VOICE_CALL as KM,COLOR_WHITE as Pc,THEME as $M,UserIdleState as ME}from"@haoxin-web/excalidraw-common";var Lc=(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 ZM(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 un=(e,o)=>`hsl(${Math.abs(ZM(o?.id||e))%37*10}, 100%, 83%)`,LE=e=>{let o=e?.trim()?.codePointAt(0);return(o?String.fromCodePoint(o):"?").toUpperCase()},PE=({context:e,renderConfig:o,appState:t,normalizedWidth:r,normalizedHeight:n})=>{for(let[i,a]of o.remotePointerViewportCoords){let{x:l,y:s}=a,d=t.collaborators.get(i);l-=t.offsetLeft,s-=t.offsetTop;let c=11,m=14,p=l<0||l>r-c||s<0||s>n-m;l=Math.max(l,0),l=Math.min(l,r-c),s=Math.max(s,0),s=Math.min(s,n-m);let u=un(i,d);e.save(),e.strokeStyle=u,e.fillStyle=u;let f=o.remotePointerUserStates.get(i),b=p||f===ME.IDLE||f===ME.AWAY;b&&(e.globalAlpha=.3),o.remotePointerButton.get(i)==="down"&&(e.beginPath(),e.arc(l,s,15,0,2*Math.PI,!1),e.lineWidth=3,e.strokeStyle="#ffffff88",e.stroke(),e.closePath(),e.beginPath(),e.arc(l,s,15,0,2*Math.PI,!1),e.lineWidth=1,e.strokeStyle=u,e.stroke(),e.closePath());let x=t.theme===$M.DARK?"#2f6330":KM,w=d?.isSpeaking;w&&(e.fillStyle=x,e.strokeStyle=x,e.lineWidth=10,e.lineJoin="round",e.beginPath(),e.moveTo(l,s),e.lineTo(l+0,s+14),e.lineTo(l+4,s+9),e.lineTo(l+11,s+8),e.closePath(),e.stroke(),e.fill()),e.fillStyle=Pc,e.strokeStyle=Pc,e.lineWidth=6,e.lineJoin="round",e.beginPath(),e.moveTo(l,s),e.lineTo(l+0,s+14),e.lineTo(l+4,s+9),e.lineTo(l+11,s+8),e.closePath(),e.stroke(),e.fill(),e.fillStyle=u,e.strokeStyle=u,e.lineWidth=2,e.lineJoin="round",e.beginPath(),b?(e.moveTo(l-1,s-1),e.lineTo(l-1,s+15),e.lineTo(l+5,s+10),e.lineTo(l+12,s+9),e.closePath(),e.fill()):(e.moveTo(l,s),e.lineTo(l+0,s+14),e.lineTo(l+4,s+9),e.lineTo(l+11,s+8),e.closePath(),e.fill(),e.stroke());let E=o.remotePointerUsernames.get(i)||"";if(!p&&E){e.font="600 12px sans-serif";let y=(w?l+0:l)+c/2,v=(w?s+0:s)+m+2,I=5,S=3,P=e.measureText(E),M=P.actualBoundingBoxDescent+P.actualBoundingBoxAscent,R=Math.max(M,12),L=y-1,k=v-1,N=P.width+2+I*2+2,O=R+2+S*2+2;if(e.roundRect?(e.beginPath(),e.roundRect(L,k,N,O,8),e.fillStyle=u,e.fill(),e.strokeStyle=Pc,e.stroke(),w&&(e.beginPath(),e.roundRect(L-2,k-2,N+4,O+4,8),e.strokeStyle=x,e.stroke())):Lc(e,L,k,N,O,8,Pc),e.fillStyle=XM,e.fillText(E,y+I+1,v+S+P.actualBoundingBoxAscent+Math.floor((R-M)/2)+2),w){e.fillStyle=x;let G=8,_=8,B=5;e.fillRect(L+N+_,k+(O/2-G/2),2,G),e.fillRect(L+N+_+B,k+(O/2-G*2/2),2,G*2),e.fillRect(L+N+_+B*2,k+(O/2-G/2),2,G)}}e.restore(),e.closePath()}};import jM from"clsx";import{useState as qM}from"react";import{jsx as AE}from"react/jsx-runtime";var Cu=({color:e,onClick:o,name:t,src:r,className:n})=>{let i=LE(t),[a,l]=qM(!1),s=!a&&r,d=s?void 0:{background:e};return AE("div",{className:jM("Avatar",n),style:d,onClick:o,children:s?AE("img",{className:"Avatar-img",src:r,alt:i,referrerPolicy:"no-referrer",onError:()=>l(!0)}):i})};import{jsx as Mo,jsxs as Ac}from"react/jsx-runtime";var QM=F({name:"goToCollaborator",label:"Go to a collaborator",viewMode:!0,trackEvent:{category:"collab"},perform:(e,o,t)=>!t.socketId||o.userToFollow?.socketId===t.socketId||t.isCurrentUser?{appState:{...o,userToFollow:null},captureUpdate:_E.EVENTUALLY}:{appState:{...o,userToFollow:{socketId:t.socketId,username:t.username||""},openMenu:o.openMenu==="canvas"?null:o.openMenu},captureUpdate:_E.EVENTUALLY},PanelComponent:({updateData:e,data:o,appState:t})=>{let{socketId:r,collaborator:n,withName:i,isBeingFollowed:a}=o,l=un(r,n),s=JM({"is-followed":a,"is-current-user":n.isCurrentUser===!0,"is-speaking":n.isSpeaking,"is-in-call":n.isInCall,"is-muted":n.isMuted}),d=n.isInCall?n.isSpeaking?Ac("div",{className:"UserList__collaborator-status-icon-speaking-indicator",title:g("userList.hint.isSpeaking"),children:[Mo("div",{}),Mo("div",{}),Mo("div",{})]}):n.isMuted?Mo("div",{className:"UserList__collaborator-status-icon-microphone-muted",title:g("userList.hint.micMuted"),children:bb}):Mo("div",{title:g("userList.hint.inCall"),children:fb}):null;return i?Ac("div",{className:`dropdown-menu-item dropdown-menu-item-base UserList__collaborator ${s}`,style:{"--avatar-size":"1.5rem"},onClick:()=>e(n),children:[Mo(Cu,{color:l,onClick:()=>{},name:n.username||"",src:n.avatarUrl,className:s}),Mo("div",{className:"UserList__collaborator-name",children:n.username}),Ac("div",{className:"UserList__collaborator-status-icons","aria-hidden":!0,children:[a&&Mo("div",{className:"UserList__collaborator-status-icon-is-followed",title:g("userList.hint.followStatus"),children:Vn}),d]})]}):Ac("div",{className:`UserList__collaborator UserList__collaborator--avatar-only ${s}`,children:[Mo(Cu,{color:l,onClick:()=>{e(n)},name:n.username||"",src:n.avatarUrl,className:s}),d&&Mo("div",{className:"UserList__collaborator-status-icon",children:d})]})}});import{LIBRARY_DISABLED_TYPES as eL,randomId as tL}from"@haoxin-web/excalidraw-common";import{deepCopyElement as oL}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as Su}from"@haoxin-web/excalidraw-element";var ku=F({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 eL)if(n.some(a=>a.type===i))return{captureUpdate:Su.EVENTUALLY,appState:{...o,errorMessage:g(`errors.libraryElementTypeError.${i}`)}};return r.library.getLatestLibrary().then(i=>r.library.setLibrary([{id:tL(),status:"unpublished",elements:n.map(oL),created:Date.now()},...i])).then(()=>({captureUpdate:Su.EVENTUALLY,appState:{...o,toast:{message:g("toast.addedToLibrary")}}})).catch(i=>({captureUpdate:Su.EVENTUALLY,appState:{...o,errorMessage:i.message}}))},label:"labels.addToLibrary"});import{getNonDeletedElements as hi}from"@haoxin-web/excalidraw-element";import{isFrameLikeElement as rL}from"@haoxin-web/excalidraw-element";import{updateFrameMembershipOfSelectedElements as nL}from"@haoxin-web/excalidraw-element";import{KEYS as Sr,arrayToMap as iL,getShortcutKey as _c}from"@haoxin-web/excalidraw-common";import{alignElements as aL}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as gi}from"@haoxin-web/excalidraw-element";import{getSelectedElementsByGroup as lL}from"@haoxin-web/excalidraw-element";import{jsx as bi}from"react/jsx-runtime";var kt=(e,o)=>{let t=o.scene.getSelectedElements(e);return lL(t,o.scene.getNonDeletedElementsMap(),e).length>1&&!t.some(r=>rL(r))},fi=(e,o,t,r)=>{let n=t.scene.getSelectedElements(o),i=aL(n,r,t.scene,o),a=iL(i);return nL(e.map(l=>a.get(l.id)||l),o,t)},sL=F({name:"alignTop",label:"labels.alignTop",icon:op,trackEvent:{category:"element"},predicate:(e,o,t,r)=>kt(o,r),perform:(e,o,t,r)=>({appState:o,elements:fi(e,o,r,{position:"start",axis:"y"}),captureUpdate:gi.IMMEDIATELY}),keyTest:e=>e[Sr.CTRL_OR_CMD]&&e.shiftKey&&e.key===Sr.ARROW_UP,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>bi(z,{hidden:!kt(o,r),type:"button",icon:op,onClick:()=>t(null),title:`${g("labels.alignTop")} \u2014 ${_c("CtrlOrCmd+Shift+Up")}`,"aria-label":g("labels.alignTop"),visible:ye(hi(e),o)})}),cL=F({name:"alignBottom",label:"labels.alignBottom",icon:rp,trackEvent:{category:"element"},predicate:(e,o,t,r)=>kt(o,r),perform:(e,o,t,r)=>({appState:o,elements:fi(e,o,r,{position:"end",axis:"y"}),captureUpdate:gi.IMMEDIATELY}),keyTest:e=>e[Sr.CTRL_OR_CMD]&&e.shiftKey&&e.key===Sr.ARROW_DOWN,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>bi(z,{hidden:!kt(o,r),type:"button",icon:rp,onClick:()=>t(null),title:`${g("labels.alignBottom")} \u2014 ${_c("CtrlOrCmd+Shift+Down")}`,"aria-label":g("labels.alignBottom"),visible:ye(hi(e),o)})}),dL=F({name:"alignLeft",label:"labels.alignLeft",icon:np,trackEvent:{category:"element"},predicate:(e,o,t,r)=>kt(o,r),perform:(e,o,t,r)=>({appState:o,elements:fi(e,o,r,{position:"start",axis:"x"}),captureUpdate:gi.IMMEDIATELY}),keyTest:e=>e[Sr.CTRL_OR_CMD]&&e.shiftKey&&e.key===Sr.ARROW_LEFT,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>bi(z,{hidden:!kt(o,r),type:"button",icon:np,onClick:()=>t(null),title:`${g("labels.alignLeft")} \u2014 ${_c("CtrlOrCmd+Shift+Left")}`,"aria-label":g("labels.alignLeft"),visible:ye(hi(e),o)})}),mL=F({name:"alignRight",label:"labels.alignRight",icon:ip,trackEvent:{category:"element"},predicate:(e,o,t,r)=>kt(o,r),perform:(e,o,t,r)=>({appState:o,elements:fi(e,o,r,{position:"end",axis:"x"}),captureUpdate:gi.IMMEDIATELY}),keyTest:e=>e[Sr.CTRL_OR_CMD]&&e.shiftKey&&e.key===Sr.ARROW_RIGHT,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>bi(z,{hidden:!kt(o,r),type:"button",icon:ip,onClick:()=>t(null),title:`${g("labels.alignRight")} \u2014 ${_c("CtrlOrCmd+Shift+Right")}`,"aria-label":g("labels.alignRight"),visible:ye(hi(e),o)})}),pL=F({name:"alignVerticallyCentered",label:"labels.centerVertically",icon:ap,trackEvent:{category:"element"},predicate:(e,o,t,r)=>kt(o,r),perform:(e,o,t,r)=>({appState:o,elements:fi(e,o,r,{position:"center",axis:"y"}),captureUpdate:gi.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>bi(z,{hidden:!kt(o,r),type:"button",icon:ap,onClick:()=>t(null),title:g("labels.centerVertically"),"aria-label":g("labels.centerVertically"),visible:ye(hi(e),o)})}),uL=F({name:"alignHorizontallyCentered",label:"labels.centerHorizontally",icon:lp,trackEvent:{category:"element"},predicate:(e,o,t,r)=>kt(o,r),perform:(e,o,t,r)=>({appState:o,elements:fi(e,o,r,{position:"center",axis:"x"}),captureUpdate:gi.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>bi(z,{hidden:!kt(o,r),type:"button",icon:lp,onClick:()=>t(null),title:g("labels.centerHorizontally"),"aria-label":g("labels.centerHorizontally"),visible:ye(hi(e),o)})});import{getNonDeletedElements as DE}from"@haoxin-web/excalidraw-element";import{isFrameLikeElement as hL}from"@haoxin-web/excalidraw-element";import{CODES as RE,KEYS as NE,arrayToMap as gL,getShortcutKey as BE}from"@haoxin-web/excalidraw-common";import{updateFrameMembershipOfSelectedElements as fL}from"@haoxin-web/excalidraw-element";import{distributeElements as bL}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as FE}from"@haoxin-web/excalidraw-element";import{getSelectedElementsByGroup as xL}from"@haoxin-web/excalidraw-element";import{jsx as HE}from"react/jsx-runtime";var OE=(e,o)=>{let t=o.scene.getSelectedElements(e);return xL(t,o.scene.getNonDeletedElementsMap(),e).length>2&&!t.some(r=>hL(r))},zE=(e,o,t,r)=>{let n=t.scene.getSelectedElements(o),i=bL(n,t.scene.getNonDeletedElementsMap(),r,o),a=gL(i);return fL(e.map(l=>a.get(l.id)||l),o,t)},EL=F({name:"distributeHorizontally",label:"labels.distributeHorizontally",trackEvent:{category:"element"},perform:(e,o,t,r)=>({appState:o,elements:zE(e,o,r,{space:"between",axis:"x"}),captureUpdate:FE.IMMEDIATELY}),keyTest:e=>!e[NE.CTRL_OR_CMD]&&e.altKey&&e.code===RE.H,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>HE(z,{hidden:!OE(o,r),type:"button",icon:T0,onClick:()=>t(null),title:`${g("labels.distributeHorizontally")} \u2014 ${BE("Alt+H")}`,"aria-label":g("labels.distributeHorizontally"),visible:ye(DE(e),o)})}),yL=F({name:"distributeVertically",label:"labels.distributeVertically",trackEvent:{category:"element"},perform:(e,o,t,r)=>({appState:o,elements:zE(e,o,r,{space:"between",axis:"y"}),captureUpdate:FE.IMMEDIATELY}),keyTest:e=>!e[NE.CTRL_OR_CMD]&&e.altKey&&e.code===RE.V,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>HE(z,{hidden:!OE(o,r),type:"button",icon:I0,onClick:()=>t(null),title:`${g("labels.distributeVertically")} \u2014 ${BE("Alt+V")}`,"aria-label":g("labels.distributeVertically"),visible:ye(DE(e),o)})});import{getNonDeletedElements as wL}from"@haoxin-web/excalidraw-element";import{bindOrUnbindLinearElements as vL,isBindingEnabled as TL}from"@haoxin-web/excalidraw-element";import{getCommonBoundingBox as GE}from"@haoxin-web/excalidraw-element";import{newElementWith as IL}from"@haoxin-web/excalidraw-element";import{deepCopyElement as CL}from"@haoxin-web/excalidraw-element";import{resizeMultipleElements as SL}from"@haoxin-web/excalidraw-element";import{isArrowElement as kL,isElbowArrow as ML,isLinearElement as LL}from"@haoxin-web/excalidraw-element";import{updateFrameMembershipOfSelectedElements as UE}from"@haoxin-web/excalidraw-element";import{CODES as YE,KEYS as PL,arrayToMap as AL}from"@haoxin-web/excalidraw-common";import{CaptureUpdateAction as WE}from"@haoxin-web/excalidraw-element";var Mu=F({name:"flipHorizontal",label:"labels.flipHorizontal",icon:wb,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:UE(VE(e,r.scene.getNonDeletedElementsMap(),o,"horizontal",r),o,r),appState:o,captureUpdate:WE.IMMEDIATELY}),keyTest:e=>e.shiftKey&&e.code===YE.H}),Lu=F({name:"flipVertical",label:"labels.flipVertical",icon:yb,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:UE(VE(e,r.scene.getNonDeletedElementsMap(),o,"vertical",r),o,r),appState:o,captureUpdate:WE.IMMEDIATELY}),keyTest:e=>e.shiftKey&&e.code===YE.V&&!e[PL.CTRL_OR_CMD]}),VE=(e,o,t,r,n)=>{let i=q(wL(e),t,{includeBoundTextElement:!0,includeElementsInFrames:!0}),a=_L(i,o,t,r,n),l=AL(a);return e.map(s=>l.get(s.id)||s)},_L=(e,o,t,r,n)=>{if(e.every(u=>kL(u)&&(u.startBinding||u.endBinding)))return e.map(u=>{let f=u;return IL(f,{startArrowhead:f.endArrowhead,endArrowhead:f.startArrowhead})});let{midX:i,midY:a}=GE(e);SL(e,o,"nw",n.scene,new Map(Array.from(o.values()).map(u=>[u.id,CL(u)])),{flipByX:r==="horizontal",flipByY:r==="vertical",shouldResizeFromCenter:!0,shouldMaintainAspectRatio:!0}),vL(e.filter(LL),TL(t),[],n.scene,t.zoom);let{elbowArrows:l,otherElements:s}=e.reduce((u,f)=>ML(f)?{...u,elbowArrows:u.elbowArrows.concat(f)}:{...u,otherElements:u.otherElements.concat(f)},{elbowArrows:[],otherElements:[]}),{midX:d,midY:c}=GE(e),[m,p]=[i-d,a-c];return s.forEach(u=>n.scene.mutateElement(u,{x:u.x+m,y:u.y+p})),l.forEach(u=>n.scene.mutateElement(u,{x:u.x+m,y:u.y+p})),e};import{isTextElement as DL}from"@haoxin-web/excalidraw-element";import{getTextFromElements as RL}from"@haoxin-web/excalidraw-element";import{CODES as NL,KEYS as XE,isFirefox as BL}from"@haoxin-web/excalidraw-common";import{CaptureUpdateAction as Ot}from"@haoxin-web/excalidraw-element";var xi=F({name:"copy",label:"labels.copy",icon:ba,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});try{await vc(n,r.files,t)}catch(i){return{captureUpdate:Ot.EVENTUALLY,appState:{...o,errorMessage:i.message}}}return{captureUpdate:Ot.EVENTUALLY}},keyTest:void 0}),Pu=F({name:"paste",label:"labels.paste",trackEvent:{category:"element"},perform:async(e,o,t,r)=>{let n;try{n=await uE()}catch(i){return i.name==="AbortError"||i.name==="NotAllowedError"?!1:(console.error(`actionPaste ${i.name}: ${i.message}`),BL?{captureUpdate:Ot.EVENTUALLY,appState:{...o,errorMessage:g("hints.firefox_clipboard_write")}}:{captureUpdate:Ot.EVENTUALLY,appState:{...o,errorMessage:g("errors.asyncPasteFailedOnRead")}})}try{r.pasteFromClipboard(mE({types:n}))}catch(i){return console.error(i),{captureUpdate:Ot.EVENTUALLY,appState:{...o,errorMessage:g("errors.asyncPasteFailedOnParse")}}}return{captureUpdate:Ot.EVENTUALLY}},keyTest:void 0}),Dc=F({name:"cut",label:"labels.cut",icon:eb,trackEvent:{category:"element"},perform:(e,o,t,r)=>(xi.perform(e,o,t,r),ka.perform(e,o,null,r)),keyTest:e=>e[XE.CTRL_OR_CMD]&&e.key===XE.X}),Rc=F({name:"copyAsSvg",label:"labels.copyAsSvg",icon:vb,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{if(!r.canvas)return{captureUpdate:Ot.EVENTUALLY};let{exportedElements:n,exportingFrame:i}=cn(e,o,!0);try{await dn("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:Ot.EVENTUALLY}}catch(a){return console.error(a),{appState:{errorMessage:a.message},captureUpdate:Ot.EVENTUALLY}}},predicate:e=>wc&&e.length>0,keywords:["svg","clipboard","copy"]}),Nc=F({name:"copyAsPng",label:"labels.copyAsPng",icon:Tb,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{if(!r.canvas)return{captureUpdate:Ot.EVENTUALLY};let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),{exportedElements:i,exportingFrame:a}=cn(e,o,!0);try{return await dn("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:Ot.EVENTUALLY}}catch(l){return console.error(l),{appState:{...o,errorMessage:l.message},captureUpdate:Ot.EVENTUALLY}}},predicate:e=>di&&e.length>0,keyTest:e=>e.code===NL.C&&e.altKey&&e.shiftKey,keywords:["png","clipboard","copy"]}),Bc=F({name:"copyText",label:"labels.copyText",trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0});try{uo(RL(n))}catch{throw new Error(g("errors.copyToSystemClipboardFailed"))}return{captureUpdate:Ot.EVENTUALLY}},predicate:(e,o,t,r)=>wc&&r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0}).some(DL),keywords:["text","clipboard","copy"]});import{CODES as FL,KEYS as OL}from"@haoxin-web/excalidraw-common";import{CaptureUpdateAction as zL}from"@haoxin-web/excalidraw-element";var Fc=F({name:"gridMode",icon:Mb,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:zL.EVENTUALLY}},checked:e=>e.gridModeEnabled,predicate:(e,o,t)=>t.gridModeEnabled===void 0,keyTest:e=>e[OL.CTRL_OR_CMD]&&e.code===FL.QUOTE});import{CODES as HL,KEYS as GL}from"@haoxin-web/excalidraw-common";import{CaptureUpdateAction as UL}from"@haoxin-web/excalidraw-element";var Ei=F({name:"zenMode",label:"buttons.zenMode",icon:Cb,viewMode:!0,trackEvent:{category:"canvas",predicate:e=>!e.zenModeEnabled},perform(e,o){return{appState:{...o,zenModeEnabled:!this.checked(o)},captureUpdate:UL.EVENTUALLY}},checked:e=>e.zenModeEnabled,predicate:(e,o,t)=>typeof t.zenModeEnabled>"u",keyTest:e=>!e[GL.CTRL_OR_CMD]&&e.altKey&&e.code===HL.Z});import{CODES as YL,KEYS as WL}from"@haoxin-web/excalidraw-common";import{CaptureUpdateAction as VL}from"@haoxin-web/excalidraw-element";var Au=F({name:"objectsSnapMode",label:"buttons.objectsSnapMode",icon:Ib,viewMode:!1,trackEvent:{category:"canvas",predicate:e=>!e.objectsSnapModeEnabled},perform(e,o){return{appState:{...o,objectsSnapModeEnabled:!this.checked(o),gridModeEnabled:!1},captureUpdate:VL.EVENTUALLY}},checked:e=>e.objectsSnapModeEnabled,predicate:(e,o,t)=>typeof t.objectsSnapModeEnabled>"u",keyTest:e=>!e[WL.CTRL_OR_CMD]&&e.altKey&&e.code===YL.S});import{CODES as XL,KEYS as KL}from"@haoxin-web/excalidraw-common";import{CaptureUpdateAction as $L}from"@haoxin-web/excalidraw-element";var yi=F({name:"stats",label:"stats.fullTitle",icon:Eb,viewMode:!0,trackEvent:{category:"menu"},keywords:["edit","attributes","customize"],perform(e,o){return{appState:{...o,stats:{...o.stats,open:!this.checked(o)}},captureUpdate:$L.EVENTUALLY}},checked:e=>e.stats.open,keyTest:e=>!e[KL.CTRL_OR_CMD]&&e.altKey&&e.code===XL.SLASH});import{BOUND_TEXT_PADDING as KE,ROUNDNESS as $E,TEXT_ALIGN as jE,VERTICAL_ALIGN as qE,arrayToMap as JE,getFontString as ZL}from"@haoxin-web/excalidraw-common";import{getOriginalContainerHeightFromCache as jL,resetOriginalContainerCache as qL,updateOriginalContainerCache as JL}from"@haoxin-web/excalidraw-element";import{computeBoundTextPosition as QL,computeContainerDimensionForBoundText as ZE,getBoundTextElement as QE,redrawTextBoundingBox as ey}from"@haoxin-web/excalidraw-element";import{hasBoundTextElement as eP,isArrowElement as tP,isTextBindableContainer as _u,isTextElement as ja,isUsingAdaptiveRadius as oP}from"@haoxin-web/excalidraw-element";import{measureText as rP}from"@haoxin-web/excalidraw-element";import{syncMovedIndices as ty}from"@haoxin-web/excalidraw-element";import{newElement as nP}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as Du}from"@haoxin-web/excalidraw-element";var Ru=F({name:"unbindText",label:"labels.unbindText",trackEvent:{category:"element"},predicate:(e,o,t,r)=>r.scene.getSelectedElements(o).some(i=>eP(i)),perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o),i=r.scene.getNonDeletedElementsMap();return n.forEach(a=>{let l=QE(a,i);if(l){let{width:s,height:d}=rP(l.originalText,ZL(l),l.lineHeight),c=jL(a.id);qL(a.id);let{x:m,y:p}=QL(a,l,i);r.scene.mutateElement(l,{containerId:null,width:s,height:d,text:l.originalText,x:m,y:p}),r.scene.mutateElement(a,{boundElements:a.boundElements?.filter(u=>u.id!==l.id),height:c||a.height})}}),{elements:e,appState:o,captureUpdate:Du.IMMEDIATELY}}}),Nu=F({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=ja(n[0])||ja(n[1]),a;if(_u(n[0])?a=n[0]:_u(n[1])&&(a=n[1]),i&&a&&QE(a,r.scene.getNonDeletedElementsMap())===null)return!0}return!1},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o),i,a;ja(n[0])&&_u(n[1])?(i=n[0],a=n[1]):(i=n[1],a=n[0]),r.scene.mutateElement(i,{containerId:a.id,verticalAlign:qE.MIDDLE,textAlign:jE.CENTER,autoResize:!0,angle:tP(a)?0:a?.angle??0}),r.scene.mutateElement(a,{boundElements:(a.boundElements||[]).concat({type:"text",id:i.id})});let l=a.height;return ey(i,a,r.scene),JL(a.id,l),{elements:iP(e,a,i),appState:{...o,selectedElementIds:{[a.id]:!0}},captureUpdate:Du.IMMEDIATELY}}}),iP=(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),ty(r,JE([o,t])),r},aP=(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),ty(r,JE([o,t])),r},oy=F({name:"wrapTextInContainer",label:"labels.createContainerFromText",trackEvent:{category:"element"},predicate:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o),i=n.some(a=>ja(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(ja(l)){let s=nP({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:oP("rectangle")?$E.ADAPTIVE_RADIUS:$E.PROPORTIONAL_RADIUS}:null,opacity:100,locked:!1,x:l.x-KE,y:l.y-KE,width:ZE(l.width,"rectangle"),height:ZE(l.height,"rectangle"),groupIds:l.groupIds,frameId:l.frameId});if(l.boundElements?.length){let d=l.boundElements.filter(m=>m.type==="arrow").map(m=>m.id);i.filter(m=>d.includes(m.id)).forEach(m=>{let p=m.startBinding,u=m.endBinding;p?.elementId===l.id&&(p={...p,elementId:s.id}),u?.elementId===l.id&&(u={...u,elementId:s.id}),(p||u)&&r.scene.mutateElement(m,{startBinding:p,endBinding:u})})}r.scene.mutateElement(l,{containerId:s.id,verticalAlign:qE.MIDDLE,boundElements:null,textAlign:jE.CENTER,autoResize:!0}),ey(l,s,r.scene),i=aP([...i,s],s,l),a[s.id]=!0}return{elements:i,appState:{...o,selectedElementIds:a},captureUpdate:Du.IMMEDIATELY}}});import{isEmbeddableElement as TP}from"@haoxin-web/excalidraw-element";import{KEYS as py,getShortcutKey as IP}from"@haoxin-web/excalidraw-common";import{CaptureUpdateAction as CP}from"@haoxin-web/excalidraw-element";import{pointFrom as ay}from"@haoxin-web/excalidraw-math";import lP from"clsx";import{useCallback as ry,useEffect as ny,useLayoutEffect as sP,useRef as cP,useState as dP}from"react";import{EVENT as Bu,HYPERLINK_TOOLTIP_DELAY as mP,KEYS as Oc}from"@haoxin-web/excalidraw-common";import{getElementAbsoluteCoords as Gu}from"@haoxin-web/excalidraw-element";import{hitElementBoundingBox as pP}from"@haoxin-web/excalidraw-element";import{isElementLink as uP}from"@haoxin-web/excalidraw-element";import{getEmbedLink as hP,embeddableURLValidator as gP}from"@haoxin-web/excalidraw-element";import{sceneCoordsToViewportCoords as ly,viewportCoordsToSceneCoords as fP,wrapEvent as bP,isLocalLink as xP,normalizeLink as Fu}from"@haoxin-web/excalidraw-common";import{isEmbeddableElement as Ou}from"@haoxin-web/excalidraw-element";import{jsx as wi,jsxs as iy}from"react/jsx-runtime";var Uu=380,EP=42,zu=5,sy=85,yP=500,Hu=!1,zc=new Map,cy=({element:e,scene:o,setAppState:t,onLinkOpen:r,setToast:n,updateEmbedValidationStatus:i})=>{let a=o.getNonDeletedElementsMap(),l=Io(),s=Co(),d=pe(),c=e.link||"",[m,p]=dP(c),u=cP(null),f=l.showHyperlinkPopup==="editor",b=ry(()=>{if(!u.current)return;let v=Fu(u.current.value)||null;if(!e.link&&v&&ie("hyperlink","create"),Ou(e)){if(l.activeEmbeddable?.element===e&&t({activeEmbeddable:null}),!v){o.mutateElement(e,{link:null}),i(e,!1);return}if(!gP(v,s.validateEmbeddable))v&&n({message:g("toast.unableToEmbed"),closable:!0}),e.link&&zc.set(e.id,e.link),o.mutateElement(e,{link:v}),i(e,!1);else{let{width:I,height:S}=e,P=hP(v);P?.error instanceof URIError&&n({message:g("toast.unrecognizedLinkFormat"),closable:!0});let M=P?P.intrinsicSize.w/P.intrinsicSize.h:1,R=zc.get(e.id)!==e.link;o.mutateElement(e,{...R?{width:P?.type==="video"?I>S?I:S*M:I,height:P?.type==="video"&&I>S?I/M:S}:{},link:v}),i(e,!0),zc.has(e.id)&&zc.delete(e.id)}}else o.mutateElement(e,{link:v})},[e,o,n,s.validateEmbeddable,l.activeEmbeddable,t,i]);sP(()=>()=>{b()},[b]),ny(()=>{f&&u?.current&&!(d.viewport.isMobile||d.isTouchScreen)&&u.current.select()},[f,d.viewport.isMobile,d.isTouchScreen]),ny(()=>{let v=null,I=S=>{if(f)return;v&&clearTimeout(v),vP(e,a,l,ay(S.clientX,S.clientY))&&(v=window.setTimeout(()=>{t({showHyperlinkPopup:!1})},yP))};return window.addEventListener(Bu.POINTER_MOVE,I,!1),()=>{window.removeEventListener(Bu.POINTER_MOVE,I,!1),v&&clearTimeout(v)}},[l,e,f,t,a]);let x=ry(()=>{ie("hyperlink","delete"),o.mutateElement(e,{link:null}),t({showHyperlinkPopup:!1})},[t,e,o]),w=()=>{ie("hyperlink","edit","popup-ui"),t({showHyperlinkPopup:"editor"})},{x:E,y}=dy(e,l,a);return l.contextMenu||l.selectedElementsAreBeingDragged||l.resizingElement||l.isRotating||l.openMenu||l.viewModeEnabled?null:iy("div",{className:"excalidraw-hyperlinkContainer",style:{top:`${y}px`,left:`${E}px`,width:Uu,padding:zu},children:[f?wi("input",{className:lP("excalidraw-hyperlinkContainer-input"),placeholder:g("labels.link.hint"),ref:u,value:m,onChange:v=>p(v.target.value),autoFocus:!0,onKeyDown:v=>{v.stopPropagation(),v[Oc.CTRL_OR_CMD]&&v.key===Oc.K&&v.preventDefault(),(v.key===Oc.ENTER||v.key===Oc.ESCAPE)&&(b(),t({showHyperlinkPopup:"info"}))}}):e.link?wi("a",{href:Fu(e.link||""),className:"excalidraw-hyperlinkContainer-link",target:xP(e.link)?"_self":"_blank",onClick:v=>{if(e.link&&r){let I=bP(Bu.EXCALIDRAW_LINK,v.nativeEvent);r({...e,link:Fu(e.link)},I),I.defaultPrevented&&v.preventDefault()}},rel:"noopener noreferrer",children:e.link}):wi("div",{className:"excalidraw-hyperlinkContainer-link",children:g("labels.link.empty")}),iy("div",{className:"excalidraw-hyperlinkContainer__buttons",children:[!f&&wi(z,{type:"button",title:g("buttons.edit"),"aria-label":g("buttons.edit"),label:g("buttons.edit"),onClick:w,className:"excalidraw-hyperlinkContainer--edit",icon:Dt}),wi(z,{type:"button",title:g("labels.linkToElement"),"aria-label":g("labels.linkToElement"),label:g("labels.linkToElement"),onClick:()=>{t({openDialog:{name:"elementLinkSelector",sourceElementId:e.id}})},icon:Bs}),c&&!Ou(e)&&wi(z,{type:"button",title:g("buttons.remove"),"aria-label":g("buttons.remove"),label:g("buttons.remove"),onClick:x,className:"excalidraw-hyperlinkContainer--remove",icon:Rt})]})]})},dy=(e,o,t)=>{let[r,n]=Gu(e,t),{x:i,y:a}=ly({sceneX:r+e.width/2,sceneY:n},o),l=i-o.offsetLeft-Uu/2,s=a-o.offsetTop-sy;return{x:l,y:s}},Yu=(e,o)=>{let t=q(e,o);return Ou(t[0])?"labels.link.editEmbed":t[0]?.link?"labels.link.edit":"labels.link.create"},qa=null,my=(e,o,t)=>{qa&&clearTimeout(qa),qa=window.setTimeout(()=>wP(e,o,t),mP)},wP=(e,o,t)=>{if(!e.link)return;let r=ai();r.classList.add("excalidraw-tooltip--visible"),r.style.maxWidth="20rem",r.textContent=uP(e.link)?g("labels.link.goToElement"):e.link;let[n,i,a,l]=Gu(e,t),[s,d,c,m]=I1([n,i,a,l],e.angle,o),p=ly({sceneX:s,sceneY:d},o);tu(r,{left:p.x,top:p.y,width:c,height:m},"top"),ie("hyperlink","tooltip","link-icon"),Hu=!0},Wu=()=>{qa&&clearTimeout(qa),Hu&&(Hu=!1,ai().classList.remove("excalidraw-tooltip--visible"))},vP=(e,o,t,[r,n])=>{let{x:i,y:a}=fP({clientX:r,clientY:n},t),l=15/t.zoom.value;if(pP(ay(i,a),e,o))return!1;let[s,d,c]=Gu(e,o);if(i>=s&&i<=c&&a>=d-sy&&a<=d)return!1;let{x:m,y:p}=dy(e,t,o);return!(r>=m-l&&r<=m+Uu+zu*2+l&&n>=p-l&&n<=p+l+zu*2+EP)};import{jsx as SP}from"react/jsx-runtime";var Ja=F({name:"hyperlink",label:(e,o)=>Yu(e,o),icon:ya,perform:(e,o)=>o.showHyperlinkPopup==="editor"?!1:{elements:e,appState:{...o,showHyperlinkPopup:"editor",openMenu:null},captureUpdate:CP.IMMEDIATELY},trackEvent:{category:"hyperlink",action:"click"},keyTest:e=>e[py.CTRL_OR_CMD]&&e.key===py.K,predicate:(e,o)=>q(e,o).length===1,PanelComponent:({elements:e,appState:o,updateData:t})=>{let r=q(e,o);return SP(z,{type:"button",icon:ya,"aria-label":g(Yu(e,o)),title:`${TP(e[0])?g("labels.link.labelEmbed"):g("labels.link.label")} - ${IP("CtrlOrCmd+K")}`,onClick:()=>t(null),selected:r.length===1&&!!r[0].link})}});import{KEYS as uy,arrayToMap as Xu,randomId as kP}from"@haoxin-web/excalidraw-common";import{elementsAreInSameGroup as MP,newElementWith as hy,selectGroupsFromGivenElements as gy}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as fy}from"@haoxin-web/excalidraw-element";var Vu=e=>e.every(o=>!o.locked),Qa=F({name:"toggleElementLock",label:(e,o,t)=>{let r=t.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!1});return Vu(r)?"labels.elementLock.lock":"labels.elementLock.unlock"},icon:(e,o)=>{let t=q(o,e);return Vu(t)?On:Qr},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=Vu(n),a=Xu(n),l=n.length>1&&MP(n),d=n.length===1||l?null:kP(),c={...o.lockedMultiSelections};if(i)c={...o.lockedMultiSelections,...d?{[d]:!0}:{}};else if(l){let w=n[0].groupIds.at(-1);delete c[w]}let m=e.map(w=>{if(!a.has(w.id))return w;let E=w.groupIds;return i?d&&(E=[...E,d]):E=E.filter(y=>!o.lockedMultiSelections[y]),hy(w,{locked:i,groupIds:E.length!==w.groupIds.length?E:w.groupIds})}),p=Xu(m),u=i?{}:Object.fromEntries(n.map(w=>[w.id,!0])),f=n.map(w=>p.get(w.id)||w),b=i?{}:gy(f,o),x=i?d||(l?n[0].groupIds.at(-1):n[0].id):null;return{elements:m,appState:{...o,selectedElementIds:u,selectedGroupIds:b,selectedLinearElement:i?null:o.selectedLinearElement,lockedMultiSelections:c,activeLockedId:x},captureUpdate:fy.IMMEDIATELY}},keyTest:(e,o,t,r)=>e.key.toLocaleLowerCase()===uy.L&&e[uy.CTRL_OR_CMD]&&e.shiftKey&&r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!1}).length>0}),by=F({name:"unlockAllElements",trackEvent:{category:"canvas"},viewMode:!1,icon:Qr,predicate:(e,o)=>q(e,o).length===0&&e.some(r=>r.locked),perform:(e,o)=>{let t=e.filter(a=>a.locked),r=e.map(a=>{if(a.locked){let l=a.groupIds.filter(s=>!o.lockedMultiSelections[s]);return hy(a,{locked:!1,groupIds:a.groupIds.length!==l.length?l:a.groupIds})}return a}),n=Xu(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:gy(i,o),lockedMultiSelections:{},activeLockedId:null},captureUpdate:fy.IMMEDIATELY}},label:"labels.elementLock.unlockAll"});import{isElbowArrow as W_,isLinearElement as V_,isLineElement as Hi}from"@haoxin-web/excalidraw-element";import{arrayToMap as X_,invariant as Zh}from"@haoxin-web/excalidraw-common";import{toggleLinePolygonState as K_,CaptureUpdateAction as E2}from"@haoxin-web/excalidraw-element";import Ww from"clsx";import z7 from"fuzzy";import{useEffect as cd,useRef as H7,useState as sd}from"react";import{DEFAULT_SIDEBAR as Uw,EVENT as md,KEYS as fo,capitalizeString as G7,getShortcutKey as U7,isWritableElement as Y7}from"@haoxin-web/excalidraw-common";import{CaptureUpdateAction as dA}from"@haoxin-web/excalidraw-element";import{useEffect as ol,useMemo as xy,useRef as ju,useState as LP}from"react";import{getLinearElementSubType as Ii,updateElbowArrowPoints as PP}from"@haoxin-web/excalidraw-element";import{pointFrom as Gc,pointRotateRads as AP}from"@haoxin-web/excalidraw-math";import{hasBoundTextElement as _P,isArrowBoundToElement as DP,isArrowElement as RP,isElbowArrow as NP,isLinearElement as eh,isUsingAdaptiveRadius as BP}from"@haoxin-web/excalidraw-element";import{getCommonBoundingBox as FP,getElementAbsoluteCoords as OP}from"@haoxin-web/excalidraw-element";import{getBoundTextElement as Ty,getBoundTextMaxHeight as zP,getBoundTextMaxWidth as HP,redrawTextBoundingBox as GP}from"@haoxin-web/excalidraw-element";import{wrapText as UP}from"@haoxin-web/excalidraw-element";import{assertNever as YP,CLASSES as WP,getFontString as Ku,isProdEnv as VP,mapFind as XP,reduceToCommonValue as KP,updateActiveTool as Ey}from"@haoxin-web/excalidraw-common";import{measureText as yy}from"@haoxin-web/excalidraw-element";import{LinearElementEditor as $P}from"@haoxin-web/excalidraw-element";import{newArrowElement as $u,newElement as ZP,newLinearElement as jP}from"@haoxin-web/excalidraw-element";import{ShapeCache as qP}from"@haoxin-web/excalidraw-element";import{updateBindings as JP}from"@haoxin-web/excalidraw-element";import{jsx as Qu}from"react/jsx-runtime";var QP=8,eA=10,el=["rectangle","diamond","ellipse","triangle","pentagon"],tl=["line","sharpArrow","curvedArrow","elbowArrow"],tA=new Set(el),oA=new Set(tl),Ci=e=>tA.has(e),Yc=e=>e==="arrow"||oA.has(e),go=he(null),rl=new Map,nl=new Map,rA=({app:e})=>{let o=e.scene.getSelectedElements(e.state),t=ju(null);return ol(()=>{if(o.length===0){e.updateEditorAtom(go,null);return}let r=Si(o);r&&!t.current?t.current=r:(t.current&&!r||t.current&&r!==t.current)&&(e.updateEditorAtom(go,null),t.current=null)},[o,e]),ol(()=>()=>{rl.clear(),nl.clear()},[]),Qu(nA,{app:e,elements:o})},nA=({app:e,elements:o})=>{let t=Si(o),r=xy(()=>t==="generic"?Cy(o):[],[t,o]),n=xy(()=>t==="linear"?Ju(o):[],[t,o]),i=t==="generic"?r.every(m=>m.type===r[0].type):t==="linear"?n.every(m=>Ii(m)===Ii(n[0])):!1,[a,l]=LP({x:0,y:0}),s=ju(""),d=ju(null);ol(()=>{let m=[...r,...n].sort((x,w)=>x.id.localeCompare(w.id)),p=`
8
8
  ${e.state.scrollX}${e.state.scrollY}${e.state.offsetTop}${e.state.offsetLeft}${e.state.zoom.value}${m.map(x=>x.id).join(",")}`;if(p===s.current)return;s.current=p;let u;if(m.length===1){let[x,,,w,E,y]=OP(m[0],e.scene.getNonDeletedElementsMap());u=AP(Gc(x,w),Gc(E,y),m[0].angle)}else{let{minX:x,maxY:w}=FP(m);u=Gc(x,w)}let{x:f,y:b}=ky({sceneX:u[0],sceneY:u[1]},e.state);l({x:f,y:b})},[r,n,e.scene,e.state]),ol(()=>{for(let m of n){let p=qu(m.id,cA(m));nl.has(p)||nl.set(p,m)}},[n]),ol(()=>{for(let m of r)if(!rl.has(m.id)){let p=Ty(m,e.scene.getNonDeletedElementsMap());p&&rl.set(m.id,{fontSize:p.fontSize})}},[r,e.scene]);let c=t==="linear"?[["line",ao],["sharpArrow",_s],["curvedArrow",Rs],["elbowArrow",Ds]]:t==="generic"?[["rectangle",To],["diamond",mr],["ellipse",pr],["triangle",ur],["pentagon",hr]]:[];return Qu("div",{ref:d,tabIndex:-1,style:{position:"absolute",top:`${a.y+(eA+8)*e.state.zoom.value-e.state.offsetTop}px`,left:`${a.x-e.state.offsetLeft-QP}px`,zIndex:2},className:WP.CONVERT_ELEMENT_TYPE_POPUP,children:c.map(([m,p])=>{let u=i&&(t==="generic"&&r[0].type===m||t==="linear"&&Ii(n[0])===m);return Qu(z,{className:"Shape",type:"radio",icon:p,checked:u,name:"convertElementType-option",title:m,keyBindingLabel:"","aria-label":m,"data-testid":`toolbar-${m}`,onChange:()=>{e.state.activeTool.type!==m&&ie("convertElementType",m,"ui"),th(e,{conversionType:t,nextType:m}),d.current?.focus()}},`${o[0].id}${o[0].version}_${m}`)})})},iA=(e,o,t)=>{let r=HP(e,o),n=zP(e,o),i=UP(o.text,Ku(o),r),a=yy(i,Ku(o),o.lineHeight),l=o.fontSize;for(;(a.width>r||a.height>n)&&l>0;){l-=1;let s={...o,fontSize:l};a=yy(o.text,Ku(s),o.lineHeight)}Wc(o,t.getNonDeletedElementsMap(),{fontSize:l,width:a.width,height:a.height}),GP(o,e,t)},th=(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=Cy(n),d=l.every(c=>c.type===l[0].type)?el.indexOf(l[0].type):-1;if(t=t??el[(d+el.length+a)%el.length],t&&Ci(t)){let c={};for(let p of l){let u=vy(p,t,e);c[u.id]=u}let m=[];for(let p of e.scene.getElementsIncludingDeleted())c[p.id]?m.push(c[p.id]):m.push(p);e.scene.replaceAllElements(m);for(let p of Object.values(c)){let u=Ty(p,e.scene.getNonDeletedElementsMap());u&&(rl.get(p.id)&&Wc(u,e.scene.getNonDeletedElementsMap(),{fontSize:rl.get(p.id)?.fontSize??u.fontSize}),iA(p,u,e.scene))}e.setState(p=>({selectedElementIds:i,activeTool:Ey(p,{type:"selection"})}))}}if(o==="linear"){let l=Ju(n);if(!t){let d=KP(l,Ii),c=d?tl.indexOf(d):-1;t=tl[(c+tl.length+a)%tl.length]}if(Yc(t)){let d=[],c=e.scene.getElementsMapIncludingDeleted();for(let m of l){let p=nl.get(qu(m.id,t));if(p&&Ii(p)===t)c.set(p.id,p),d.push(p);else{let u=vy(m,t,e);c.set(u.id,u),d.push(u)}}e.scene.replaceAllElements(c);for(let m of d)if(eh(m))if(NP(m)){let p=aA(m);if(p.length<2)continue;let u=[];for(let b=1;b<p.length-2;b++)u.push({start:p[b],end:p[b+1],index:b+1});let f=PP(m,e.scene.getNonDeletedElementsMap(),{points:p,fixedSegments:u});Wc(m,e.scene.getNonDeletedElementsMap(),{...f,endArrowhead:"arrow"})}else{let p=XP(["line","sharpArrow","curvedArrow"],u=>nl.get(qu(m.id,u)));if(p){let u=p.points;e.scene.mutateElement(m,{points:u})}}}let s=Ju(e.scene.getSelectedElements(e.state));e.setState(d=>({selectedElementIds:i,selectedLinearElement:s.length===1?new $P(s[0],e.scene.getNonDeletedElementsMap()):null,activeTool:Ey(d,{type:"selection"})}))}return!0},Si=e=>{if(e.length===0)return null;let o=!1;for(let t of e){if(Ci(t.type))return"generic";Iy(t)&&(o=!0)}return o?"linear":null},Iy=e=>eh(e)&&(!RP(e)||!DP(e)&&!_P(e)),qu=(e,o)=>`${e}:${o}`,Cy=e=>e.filter(o=>Ci(o.type)),Ju=e=>e.filter(o=>Iy(o)),Hc=20,vi=(e,o)=>e[0]===o[0],Zu=(e,o)=>e[1]===o[1],wy=(e,o)=>vi(e,o)?Math.abs(e[1]-o[1]):Math.abs(e[0]-o[0]),aA=e=>{let o=[e.points[0]],t=lA(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])<Hc?l[0]=a[0]:Math.abs(l[1]-a[1])<Hc&&(l[1]=a[1]),vi(a,l)||Zu(a,l)||o.push(Gc(a[0],l[1])),o.push(l)}let r=[o[0]];for(let i=1;i<o.length-1;++i)vi(o[i-1],o[i])&&vi(o[i],o[i+1])||Zu(o[i-1],o[i])&&Zu(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],d=vi(a,l),c=vi(l,s);if(d!==c){let m=wy(a,l),p=wy(l,s);if(m<Hc||p<Hc){if(p<m)d?s[0]=a[0]:s[1]=a[1];else if(c)for(let u=n.length-1;u>=0&&n[u][0]===a[0];--u)n[u][0]=l[0];else for(let u=n.length-1;u>=0&&n[u][1]===a[1];--u)n[u][1]=l[1];continue}}n.push(l)}return n.push(r[r.length-1]),n},lA=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},vy=(e,o,t)=>{if(!sA(e.type,o)){if(!VP())throw Error(`Invalid conversion from ${e.type} to ${o}.`);return e}if(e.type===o)return e;if(qP.delete(e),Ci(o)){let r=Ti(ZP({...e,type:o,roundness:o==="diamond"&&e.roundness?{type:BP(o)?Uc.ADAPTIVE_RADIUS:Uc.PROPORTIONAL_RADIUS}:e.roundness}));return JP(r,t.scene),r}if(Yc(o))switch(o){case"line":return Ti(jP({...e,type:"line"}));case"sharpArrow":return Ti($u({...e,type:"arrow",elbowed:!1,roundness:null,startArrowhead:t.state.currentItemStartArrowhead,endArrowhead:t.state.currentItemEndArrowhead}));case"curvedArrow":return Ti($u({...e,type:"arrow",elbowed:!1,roundness:{type:Uc.PROPORTIONAL_RADIUS},startArrowhead:t.state.currentItemStartArrowhead,endArrowhead:t.state.currentItemEndArrowhead}));case"elbowArrow":return Ti($u({...e,type:"arrow",elbowed:!0,fixedSegments:null,roundness:null}))}return YP(o,`unhandled conversion type: ${o}`),e},sA=(e,o)=>!!(Ci(e)&&Ci(o)||Yc(e)&&Yc(o)),cA=e=>eh(e)?Ii(e):e.type,Sy=rA;var My=F({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 Ve.set(go,{type:"panel"}),{captureUpdate:dA.NEVER}},checked:e=>e.gridModeEnabled,predicate:(e,o,t)=>Si(e)!==null});import{canCreateLinkFromElements as oh,defaultGetElementLinkFromSelection as mA,getLinkIdAndTypeFromSelection as pA}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as il}from"@haoxin-web/excalidraw-element";var Vc=F({name:"copyElementLink",label:"labels.copyElementLink",icon:Un,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{let n=q(e,o);try{if(window.location){let i=pA(n,o);return i?(await uo(r.props.generateLinkForSelection?r.props.generateLinkForSelection(i.id,i.type):mA(i.id,i.type)),{appState:{toast:{message:g("toast.elementLinkCopied"),closable:!0}},captureUpdate:il.EVENTUALLY}):{appState:o,elements:e,app:r,captureUpdate:il.EVENTUALLY}}}catch(i){console.error(i)}return{appState:o,elements:e,app:r,captureUpdate:il.EVENTUALLY}},predicate:(e,o)=>oh(q(e,o))}),Ly=F({name:"linkToElement",label:"labels.linkToElement",icon:Bs,perform:(e,o,t,r)=>{let n=q(e,o);return n.length!==1||!oh(n)?{elements:e,appState:o,app:r,captureUpdate:il.EVENTUALLY}:{appState:{...o,openDialog:{name:"elementLinkSelector",sourceElementId:q(e,o)[0].id}},captureUpdate:il.IMMEDIATELY}},predicate:(e,o,t,r)=>{let n=q(e,o);return o.openDialog?.name!=="elementLinkSelector"&&n.length===1&&oh(n)},trackEvent:!1});import{isDarwin as Py,getShortcutKey as re}from"@haoxin-web/excalidraw-common";var uA={toggleTheme:[re("Shift+Alt+D")],saveScene:[re("CtrlOrCmd+S")],loadScene:[re("CtrlOrCmd+O")],clearCanvas:[re("CtrlOrCmd+Delete")],imageExport:[re("CtrlOrCmd+Shift+E")],commandPalette:[re("CtrlOrCmd+/"),re("CtrlOrCmd+Shift+P")],cut:[re("CtrlOrCmd+X")],copy:[re("CtrlOrCmd+C")],paste:[re("CtrlOrCmd+V")],copyStyles:[re("CtrlOrCmd+Alt+C")],pasteStyles:[re("CtrlOrCmd+Alt+V")],selectAll:[re("CtrlOrCmd+A")],deleteSelectedElements:[re("Delete")],duplicateSelection:[re("CtrlOrCmd+D"),re(`Alt+${g("helpDialog.drag")}`)],sendBackward:[re("CtrlOrCmd+[")],bringForward:[re("CtrlOrCmd+]")],sendToBack:[Py?re("CtrlOrCmd+Alt+["):re("CtrlOrCmd+Shift+[")],bringToFront:[Py?re("CtrlOrCmd+Alt+]"):re("CtrlOrCmd+Shift+]")],copyAsPng:[re("Shift+Alt+C")],group:[re("CtrlOrCmd+G")],ungroup:[re("CtrlOrCmd+Shift+G")],gridMode:[re("CtrlOrCmd+'")],zenMode:[re("Alt+Z")],objectsSnapMode:[re("Alt+S")],stats:[re("Alt+/")],addToLibrary:[],flipHorizontal:[re("Shift+H")],flipVertical:[re("Shift+V")],viewMode:[re("Alt+R")],hyperlink:[re("CtrlOrCmd+K")],toggleElementLock:[re("CtrlOrCmd+Shift+L")],resetZoom:[re("CtrlOrCmd+0")],zoomOut:[re("CtrlOrCmd+-")],zoomIn:[re("CtrlOrCmd++")],zoomToFitSelection:[re("Shift+3")],zoomToFit:[re("Shift+1")],zoomToFitSelectionInViewport:[re("Shift+2")],toggleEraserTool:[re("E")],toggleHandTool:[re("H")],setFrameAsActiveTool:[re("F")],saveFileToDisk:[re("CtrlOrCmd+S")],saveToActiveFile:[re("CtrlOrCmd+S")],toggleShortcuts:[re("?")],searchMenu:[re("CtrlOrCmd+F")],wrapSelectionInFrame:[]},He=(e,o=0)=>{let t=uA[e];return t&&t.length>0?t[o]||t[0]:""};var hA="\\u0300-\\u036f",gA="\\ufe20-\\ufe2f",fA="\\u20d0-\\u20ff",bA=hA+gA+fA,xA=`[${bA}]`,EA=RegExp(xA,"g"),yA=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,wA={\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"},rh=e=>e.replace(yA,o=>wA[o]||o).replace(EA,"");import d7 from"clsx";import{useEffect as m7,useState as p7}from"react";import{KEYS as u7,queryFocusableElements as Mw}from"@haoxin-web/excalidraw-common";import{useCallback as vA,useState as TA}from"react";var Ay=()=>{let[e,o]=TA(null),t=vA(r=>o(r),[]);return[e,t]};import{useState as vw,useCallback as Eh,useMemo as Tw,useEffect as Ew,memo as Iw,useRef as Q8}from"react";import{LIBRARY_DISABLED_TYPES as e7,randomId as t7,isShallowEqual as o7}from"@haoxin-web/excalidraw-common";import{useEffect as Ny,useRef as By}from"react";import{URL_HASH_KEYS as ah,URL_QUERY_KEYS as lh,APP_NAME as Fy,EVENT as Kc,DEFAULT_SIDEBAR as MA,LIBRARY_SIDEBAR_TAB as LA,arrayToMap as sh,cloneJSON as PA,preventUnload as AA,promiseTry as Oy,resolvablePromise as _A,toValidURL as DA,Queue as RA,Emitter as NA}from"@haoxin-web/excalidraw-common";import{hashElementsVersion as BA,hashString as FA}from"@haoxin-web/excalidraw-element";import{getCommonBoundingBox as ih}from"@haoxin-web/excalidraw-element";import{MIME_TYPES as hn}from"@haoxin-web/excalidraw-common";var kr=({elements:e,appState:o,files:t,maxWidthOrHeight:r,getDimensions:n,exportPadding:i,exportingFrame:a})=>{let{elements:l,appState:s}=Rn({elements:e,appState:o},null,null,{deleteInvisibleElements:!0}),{exportBackground:d,viewBackgroundColor:c}=s;return is(l,{...s,offsetTop:0,offsetLeft:0,width:0,height:0},t||{},{exportBackground:d,exportPadding:i,viewBackgroundColor:c,exportingFrame:a},(m,p)=>{let u=document.createElement("canvas");if(r){typeof n=="function"&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");let b=Math.max(m,p),x=r<b?r/b:o?.exportScale??1;return u.width=m*x,u.height=p*x,{canvas:u,scale:x}}let f=n?.(m,p)||{width:m,height:p};return u.width=f.width,u.height=f.height,{canvas:u,scale:f.scale??1}})},_y=async e=>{let{mimeType:o=hn.png,quality:t}=e;o===hn.png&&typeof t=="number"&&console.warn(`"quality" will be ignored for "${hn.png}" mimeType`),o==="image/jpg"&&(o=hn.jpg),o===hn.jpg&&!e.appState?.exportBackground&&(console.warn(`Defaulting "exportBackground" to "true" for "${hn.jpg}" mimeType`),e={...e,appState:{...e.appState,exportBackground:!0}});let r=await kr(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===hn.png&&e.appState?.exportEmbedScene&&(a=await D1({blob:a,metadata:ma(e.elements,e.appState,e.files||{},"local")})),n(a)},o,t)})},ki=async({elements:e,appState:o=cr(),files:t={},exportPadding:r,renderEmbeddables:n,exportingFrame:i,skipInliningFonts:a,reuseImages:l})=>{let{elements:s,appState:d}=Rn({elements:e,appState:o},null,null,{deleteInvisibleElements:!0}),c={...d,exportPadding:r};return Dn(s,c,t,{exportingFrame:i,renderEmbeddables:n,skipInliningFonts:a,reuseImages:l})},IA=async e=>{if(e.type==="svg"){let o=await ki(e);await uo(o.outerHTML)}else if(e.type==="png")await Tc(_y(e));else if(e.type==="json")await vc(e.elements,e.files);else throw new Error("Invalid export type")};import{useEffect as CA,useState as SA}from"react";import{COLOR_PALETTE as kA}from"@haoxin-web/excalidraw-common";var nh=he(new Map),Dy=async e=>await ki({elements:e,appState:{exportBackground:!1,viewBackgroundColor:kA.white},files:null,renderEmbeddables:!1,skipInliningFonts:!0}),Ry=(e,o,t)=>{let[r,n]=SA();return CA(()=>{if(o)if(e){let i=t.get(e);i?n(i):(async()=>{let a=await Dy(o);a.querySelector(".style-fonts")?.remove(),a&&(t.set(e,a),n(a))})()}else(async()=>{let i=await Dy(o);n(i)})()},[e,o,t,n]),r},Xc=()=>{let[e]=ce(nh);return{clearLibraryCache:()=>e.clear(),deleteItemsFromLibraryCache:r=>{r.forEach(n=>e.delete(n))},svgCache:e}};var OA=["excalidraw.com","raw.githubusercontent.com/excalidraw/excalidraw-libraries"],Hy=new NA,gn=he({status:"loaded",isInitialized:!1,libraryItems:[]}),al=e=>PA(e),zA=(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)),Gy=(e,o)=>{let t=[];for(let r of o)zA(e,r)&&t.push(r);return[...t,...e]},Uy=(e,o)=>{let t=sh(o),r={deletedItems:new Map,addedItems:new Map};for(let i of e)t.has(i.id)||r.deletedItems.set(i.id,i);let n=sh(e);for(let i of o)n.has(i.id)||r.addedItems.set(i.id,i);return r},ch=class{constructor(o){C(this,"currLibraryItems",[]);C(this,"prevLibraryItems",al(this.currLibraryItems));C(this,"app");C(this,"updateQueue",[]);C(this,"getLastUpdateTask",()=>this.updateQueue[this.updateQueue.length-1]);C(this,"notifyListeners",()=>{if(this.updateQueue.length>0)Ve.set(gn,o=>({status:"loading",libraryItems:this.currLibraryItems,isInitialized:o.isInitialized}));else{Ve.set(gn,{status:"loaded",libraryItems:this.currLibraryItems,isInitialized:!0});try{let o=this.prevLibraryItems;this.prevLibraryItems=al(this.currLibraryItems);let t=al(this.currLibraryItems);this.app.props.onLibraryChange?.(t),Hy.trigger(Uy(o,t),t)}catch(o){console.error(o)}}});C(this,"destroy",()=>{this.updateQueue=[],this.currLibraryItems=[],Ve.set(nh,new Map)});C(this,"resetLibrary",()=>this.setLibrary([]));C(this,"getLatestLibrary",()=>new Promise(async o=>{try{let t=await(this.getLastUpdateTask()||this.currLibraryItems);this.updateQueue.length>0?o(this.getLatestLibrary()):o(al(t))}catch{return o(this.currLibraryItems)}}));C(this,"updateLibrary",async({libraryItems:o,prompt:t=!1,merge:r=!1,openLibraryMenu:n=!1,defaultStatus:i="unpublished"})=>(n&&this.app.setState({openSidebar:{name:MA.name,tab:LA}}),this.setLibrary(()=>new Promise(async(a,l)=>{try{let s=await(typeof o=="function"&&!(o instanceof Blob)?o(this.currLibraryItems):o),d;s instanceof Blob?d=await Ym(s,i):d=ha(s,i),!t||window.confirm(g("alerts.confirmAddLibrary",{numShapes:d.length}))?(t&&this.app.focusContainer(),a(r?Gy(this.currLibraryItems,d):d)):l(new An)}catch(s){l(s)}}))));C(this,"setLibrary",o=>{let t=new Promise(async(r,n)=>{try{await this.getLastUpdateTask(),typeof o=="function"&&(o=o(this.currLibraryItems)),this.currLibraryItems=al(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}},Yy=ch,jc=e=>{let t=Math.ceil(Math.sqrt(e.length)),r=[],n=u=>e.slice(u*t,u*t+t).reduce((b,x)=>{let{height:w}=ih(x.elements);return Math.max(b,w)},0),i=u=>{let f=0,b=0,x=0;for(let w of e){if(f%t===0&&(b=0),b===u){let{width:E}=ih(w.elements);x=Math.max(x,E)}f++,b++}return x},a=0,l=0,s=0,d=0,c=0,m=0,p=0;for(let u of e){c&&c%t===0&&(l+=s+50,a=0,m=0,p++),m===0&&(s=n(p)),d=i(m);let{minX:f,minY:b,width:x,height:w}=ih(u.elements),E=(d-x)/2,y=(s-w)/2;r.push(...u.elements.map(v=>({...v,x:v.x+a+E-f,y:v.y+l+y-b}))),a+=d+50,c++,m++}return r},HA=(e,o=OA)=>{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}"`)},dh=()=>{let e=new URLSearchParams(window.location.hash.slice(1)).get(ah.addLibrary)||new URLSearchParams(window.location.search).get(lh.addLibrary),o=e?new URLSearchParams(window.location.hash.slice(1)).get("token"):null;return e?{libraryUrl:e,idToken:o}:null},Mr=class Mr{constructor(o){C(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(ha(l?.libraryItems||[],"published"))}catch(l){a(l)}});return r?Mr.queue.push(n):n()}getLibraryItems(o){return Mr.getLibraryItems(this.adapter,o,!1)}};C(Mr,"queue",new RA),C(Mr,"run",async(o,t)=>{let r=new Mr(o);return Mr.queue.push(()=>t(r))});var Mi=Mr,ll=0,$c=0,Zc=e=>FA(e.map(o=>`${o.id}:${BA(o.elements)}`).sort().join()),zy=async(e,o)=>{try{return $c++,await Mi.run(e,async t=>{let r=sh(await t.getLibraryItems("save"));for(let[l]of o.deletedItems)r.delete(l);let n=[];for(let[l,s]of o.addedItems)r.has(l)?r.set(l,s):n.push(s);let i=n.concat(Array.from(r.values())),a=Zc(i);return a!==ll&&await e.save({libraryItems:i}),ll=a,i})}finally{$c--}},GA=e=>{let{excalidrawAPI:o}=e,t=By(e);t.current=e;let r=By(!1);Ny(()=>{if(!o)return;r.current=!1;let n=async({libraryUrl:l,idToken:s})=>{let d=new Promise(async(m,p)=>{try{l=decodeURIComponent(l),l=DA(l),HA(l,t.current.validateLibraryUrl);let f=await(await fetch(l)).blob();m(f)}catch(u){p(u)}}),c=s!==o.id;await(c&&document.hidden?new Promise(m=>{window.addEventListener("focus",()=>m(),{once:!0})}):null);try{await o.updateLibrary({libraryItems:d,prompt:c,merge:!0,defaultStatus:"published",openLibraryMenu:!0})}catch(m){throw o.updateScene({appState:{errorMessage:m.message}}),m}finally{if(window.location.hash.includes(ah.addLibrary)){let m=new URLSearchParams(window.location.hash.slice(1));m.delete(ah.addLibrary),window.history.replaceState({},Fy,`#${m.toString()}`)}else if(window.location.search.includes(lh.addLibrary)){let m=new URLSearchParams(window.location.search);m.delete(lh.addLibrary),window.history.replaceState({},Fy,`?${m.toString()}`)}}},i=l=>{l.preventDefault();let s=dh();s&&(l.stopImmediatePropagation(),window.history.replaceState({},"",l.oldURL),n(s))},a=dh();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,d=_A();s?d.resolve(Oy(s.load).then(async c=>{let m=null;try{if(!c)return Mi.getLibraryItems(l,"load");m=ha(c.libraryItems||[],"published");let p=await zy(l,Uy([],m));try{await s.clear()}catch(u){console.error(`couldn't delete legacy library data: ${u.message}`)}return p}catch(p){return console.error(`couldn't migrate legacy library data: ${p.message}`),m}}).catch(c=>(console.error(`error during library migration: ${c.message}`),Mi.getLibraryItems(l,"load")))):d.resolve(Oy(Mi.getLibraryItems,l,"load")),o.updateLibrary({libraryItems:d.then(c=>{let m=c||[];return ll=Zc(m),m}),merge:!0}).finally(()=>{r.current=!0})}return window.addEventListener(Kc.HASHCHANGE,i),()=>{window.removeEventListener(Kc.HASHCHANGE,i)}},[o]),Ny(()=>{let n=Hy.on(async(a,l)=>{let s=r.current,d="adapter"in t.current&&t.current.adapter||null;try{d&&ll!==Zc(l)&&await zy(d,a)}catch(c){console.error(`couldn't persist library update: ${c.message}`,a),s&&t.current.excalidrawAPI&&t.current.excalidrawAPI.updateScene({appState:{errorMessage:g("errors.saveLibraryError")}})}}),i=a=>{$c&&AA(a)};return window.addEventListener(Kc.BEFORE_UNLOAD,i),()=>{window.removeEventListener(Kc.BEFORE_UNLOAD,i),n(),ll=0,$c=0}},[])};import VA from"clsx";import{VERSIONS as UA}from"@haoxin-web/excalidraw-common";import{jsx as WA}from"react/jsx-runtime";var YA=({theme:e,id:o,libraryReturnUrl:t})=>{let r=t||window.location.origin+window.location.pathname;return WA("a",{className:"library-menu-browse-button",href:`${T.VITE_APP_LIBRARY_URL}?target=${window.name||"_blank"}&referrer=${r}&useHash=true&token=${o}&theme=${e}&version=${UA.excalidrawLibrary}`,target:"_excalidraw_libraries",children:g("labels.libraries")})},Wy=YA;import{jsx as XA,jsxs as KA}from"react/jsx-runtime";var qc=({libraryReturnUrl:e,theme:o,id:t,style:r,children:n,className:i})=>KA("div",{className:VA("library-menu-control-buttons",i),style:r,children:[XA(Wy,{id:t,libraryReturnUrl:e,theme:o}),n]});import{useCallback as Ai,useEffect as V8,useMemo as bw,useRef as X8,useState as K8}from"react";import{MIME_TYPES as $8,arrayToMap as Z8}from"@haoxin-web/excalidraw-common";import{duplicateElements as j8}from"@haoxin-web/excalidraw-element";import $A from"lodash.throttle";import{useEffect as ZA}from"react";var jA=he(0),Vy=e=>{let[o,t]=ce(jA);return ZA(()=>{let{current:r}=e;if(!r)return;let n=$A(()=>{let{scrollTop:i}=r;t(i)},200);return r.addEventListener("scroll",n),()=>{n.cancel(),r.removeEventListener("scroll",n)}},[e,t]),o};import M8 from"clsx";import{useCallback as L8,useState as hh}from"react";import{muteFSAbortError as P8}from"@haoxin-web/excalidraw-common";import{flushSync as Xy}from"react-dom";import qA from"clsx";import{jsx as Jc,jsxs as QA}from"react/jsx-runtime";var JA=({label:e,onClick:o,className:t,children:r,actionType:n,type:i="button",isLoading:a,...l})=>{let s=n?`Dialog__action-button--${n}`:"";return QA("button",{className:qA("Dialog__action-button",s,t),type:i,"aria-label":e,onClick:o,...l,children:[r&&Jc("div",{style:a?{visibility:"hidden"}:{},children:r}),Jc("div",{style:a?{visibility:"hidden"}:{},children:e}),a&&Jc("div",{style:{position:"absolute",inset:0},children:Jc(nt,{})})]})},jo=JA;import{jsx as Ky,jsxs as $y}from"react/jsx-runtime";var e8=e=>{let{onConfirm:o,onCancel:t,children:r,confirmText:n=g("buttons.confirm"),cancelText:i=g("buttons.cancel"),className:a="",...l}=e,s=me(),d=dr(Li),{container:c}=Xe();return $y(Ge,{onCloseRequest:t,size:"small",...l,className:`confirm-dialog ${a}`,children:[r,$y("div",{className:"confirm-dialog-buttons",children:[Ky(jo,{label:i,onClick:()=>{s({openMenu:null}),d(!1),Xy(()=>{t()}),c?.focus()}}),Ky(jo,{label:n,onClick:()=>{s({openMenu:null}),d(!1),Xy(()=>{o()}),c?.focus()},actionType:"danger"})]})]})},Qc=e8;import td from"open-color";import{useCallback as l8,useEffect as uh,useRef as Zy,useState as mh}from"react";import{EDITOR_LS_KEYS as ph,EXPORT_DATA_TYPES as s8,MIME_TYPES as jy,VERSIONS as c8,chunk as d8,getExportSource as m8}from"@haoxin-web/excalidraw-common";var Zt=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}}};C(Zt,"set",(o,t)=>{try{return window.localStorage.setItem(o,JSON.stringify(t)),!0}catch(r){return console.warn(`localStorage.setItem error: ${r.message}`),!1}}),C(Zt,"delete",o=>{try{window.localStorage.removeItem(o)}catch(t){console.warn(`localStorage.removeItem error: ${t.message}`)}});import ed from"react";var t8=/({{[\w-]+}})|(<[\w-]+>)|(<\/[\w-]+>)/g,o8=/{{([\w-]+)}}/,r8=/<([\w-]+)>/,n8=/<\/([\w-]+)>/,i8=(e,o)=>{let t=[{name:"",children:[]}];return e.split(t8).filter(Boolean).forEach(r=>{let n=r.match(r8),i=r.match(n8),a=r.match(o8);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(),d=ed.createElement(ed.Fragment,{},...s.children),c=o[s.name];typeof c=="function"&&t[t.length-1].children.push(c(d))}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},a8=({i18nKey:e,children:o,...t})=>{let{t:r}=We();return ed.createElement(ed.Fragment,{},...i8(r(e),t))},xt=a8;import{jsx as de,jsxs as st}from"react/jsx-runtime";var p8=async e=>{let r=Math.round(8),n=Math.max(Math.round(128/64),2),i=d8(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=td.white,l.fillRect(0,0,a.width,a.height);for(let[s,d]of e.entries()){let c=await kr({elements:d.elements,files:null,maxWidthOrHeight:128}),{width:m,height:p}=c,u=Math.floor(s/6)*(128+r*2),f=s%6*(128+r*2);l.drawImage(c,f+(128-m)/2+r,u+(128-p)/2+r),l.lineWidth=n,l.strokeStyle=td.gray[4],l.strokeRect(f+r/2,u+r/2,128+r,128+r)}return await ss(new File([await zo(a)],"preview",{type:jy.png}),{outputType:jy.jpg,maxWidthOrHeight:5e3})},u8=({libItem:e,appState:o,index:t,onChange:r,onRemove:n})=>{let i=Zy(null),a=Zy(null);return uh(()=>{let l=i.current;l&&(async()=>{let s=await ki({elements:e.elements,appState:{...o,viewBackgroundColor:td.white,exportBackground:!0},files:null,skipInliningFonts:!0});l.innerHTML=s.outerHTML})()},[e.elements,o]),st("div",{className:"single-library-item",children:[e.status==="published"&&de("span",{className:"single-library-item-status",children:g("labels.statusPublished")}),de("div",{ref:i,className:"single-library-item__svg"}),de(z,{"aria-label":g("buttons.remove"),type:"button",icon:Wt,className:"single-library-item--remove",onClick:n.bind(null,e.id),title:g("buttons.remove")}),st("div",{style:{display:"flex",margin:"0.8rem 0",width:"100%",fontSize:"14px",fontWeight:500,flexDirection:"column"},children:[st("label",{style:{display:"flex",justifyContent:"space-between",flexDirection:"column"},children:[st("div",{style:{padding:"0.5em 0"},children:[de("span",{style:{fontWeight:500,color:td.gray[6]},children:g("publishDialog.itemName")}),de("span",{"aria-hidden":"true",className:"required",children:"*"})]}),de("input",{type:"text",ref:a,style:{width:"80%",padding:"0.2rem"},defaultValue:e.name,placeholder:"Item name",onChange:l=>{r(l.target.value,t)}})]}),de("span",{className:"error",children:e.error})]})]})},h8=({onClose:e,libraryItems:o,appState:t,onSuccess:r,onError:n,updateItemsInStorage:i,onRemove:a})=>{let[l,s]=mh({authorName:"",githubHandle:"",name:"",description:"",twitterHandle:"",website:""}),[d,c]=mh(!1);uh(()=>{let y=Zt.get(ph.PUBLISH_LIBRARY);y&&s(y)},[]);let[m,p]=mh(o.slice());uh(()=>{p(o.slice())},[o]);let u=y=>{s({...l,[y.target.name]:y.target.value})},f=async y=>{y.preventDefault(),c(!0);let v=[],I=!1;if(m.forEach(k=>{let N="";k.name||(N=g("publishDialog.errors.required"),I=!0),v.push({...k,error:N})}),I){p(v),c(!1);return}let S=await p8(m),P={type:s8.excalidrawLibrary,version:c8.excalidrawLibrary,source:m8(),libraryItems:m},M=JSON.stringify(P,null,2),R=new Blob([M],{type:"application/json"}),L=new FormData;L.append("excalidrawLib",R),L.append("previewImage",S),L.append("previewImageType",S.type),L.append("title",l.name),L.append("authorName",l.authorName),L.append("githubHandle",l.githubHandle),L.append("name",l.name),L.append("description",l.description),L.append("twitterHandle",l.twitterHandle),L.append("website",l.website),fetch(`${T.VITE_APP_LIBRARY_BACKEND}/submit`,{method:"post",body:L}).then(k=>k.ok?k.json().then(({url:N})=>{Zt.delete(ph.PUBLISH_LIBRARY),r({url:N,authorName:l.authorName,items:m})}):k.json().catch(()=>{throw new Error(k.statusText||"something went wrong")}).then(N=>{throw new Error(N.message||k.statusText||"something went wrong")}),k=>{console.error(k),n(k),c(!1)}).catch(k=>{console.error(k),n(k),c(!1)})},b=()=>{let y=[];return m.forEach((v,I)=>{y.push(de("div",{className:"single-library-item-wrapper",children:de(u8,{libItem:v,appState:t,index:I,onChange:(S,P)=>{let M=m.slice();M[P].name=S,p(M)},onRemove:a})},I))}),de("div",{className:"selected-library-items",children:y})},x=l8(()=>{i(m),Zt.set(ph.PUBLISH_LIBRARY,l),e()},[m,e,i,l]),w=!!o.length,E=o.some(y=>y.status==="published");return de(Ge,{onCloseRequest:x,title:g("publishDialog.title"),className:"publish-library",children:w?st("form",{onSubmit:f,children:[de("div",{className:"publish-library-note",children:de(xt,{i18nKey:"publishDialog.noteDescription",link:y=>de("a",{href:"https://libraries.excalidraw.com",target:"_blank",rel:"noopener",children:y})})}),de("span",{className:"publish-library-note",children:de(xt,{i18nKey:"publishDialog.noteGuidelines",link:y=>de("a",{href:"https://github.com/excalidraw/excalidraw-libraries#guidelines",target:"_blank",rel:"noopener noreferrer",children:y})})}),de("div",{className:"publish-library-note",children:g("publishDialog.noteItems")}),E&&de("span",{className:"publish-library-note publish-library-warning",children:g("publishDialog.republishWarning")}),b(),st("div",{className:"publish-library__fields",children:[st("label",{children:[st("div",{children:[de("span",{children:g("publishDialog.libraryName")}),de("span",{"aria-hidden":"true",className:"required",children:"*"})]}),de("input",{type:"text",name:"name",required:!0,value:l.name,onChange:u,placeholder:g("publishDialog.placeholder.libraryName")})]}),st("label",{style:{alignItems:"flex-start"},children:[st("div",{children:[de("span",{children:g("publishDialog.libraryDesc")}),de("span",{"aria-hidden":"true",className:"required",children:"*"})]}),de("textarea",{name:"description",rows:4,required:!0,value:l.description,onChange:u,placeholder:g("publishDialog.placeholder.libraryDesc")})]}),st("label",{children:[st("div",{children:[de("span",{children:g("publishDialog.authorName")}),de("span",{"aria-hidden":"true",className:"required",children:"*"})]}),de("input",{type:"text",name:"authorName",required:!0,value:l.authorName,onChange:u,placeholder:g("publishDialog.placeholder.authorName")})]}),st("label",{children:[de("span",{children:g("publishDialog.githubUsername")}),de("input",{type:"text",name:"githubHandle",value:l.githubHandle,onChange:u,placeholder:g("publishDialog.placeholder.githubHandle")})]}),st("label",{children:[de("span",{children:g("publishDialog.twitterUsername")}),de("input",{type:"text",name:"twitterHandle",value:l.twitterHandle,onChange:u,placeholder:g("publishDialog.placeholder.twitterHandle")})]}),st("label",{children:[de("span",{children:g("publishDialog.website")}),de("input",{type:"text",name:"website",pattern:"https?://.+",title:g("publishDialog.errors.website"),value:l.website,onChange:u,placeholder:g("publishDialog.placeholder.website")})]}),de("span",{className:"publish-library-note",children:de(xt,{i18nKey:"publishDialog.noteLicense",link:y=>de("a",{href:"https://github.com/excalidraw/excalidraw-libraries/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",children:y})})})]}),st("div",{className:"publish-library__buttons",children:[de(jo,{label:g("buttons.cancel"),onClick:x,"data-testid":"cancel-clear-canvas-button"}),de(jo,{type:"submit",label:g("buttons.submit"),actionType:"primary",isLoading:d})]})]}):de("p",{style:{padding:"1em",textAlign:"center",fontWeight:500},children:g("publishDialog.atleastOneLibItem")})})},qy=h8;import b8 from"clsx";import{useEffect as x8,useRef as E8}from"react";import{EVENT as tw,KEYS as y8}from"@haoxin-web/excalidraw-common";import{forwardRef as Jy}from"react";import Qy from"clsx";import{jsx as ew}from"react/jsx-runtime";var g8=Jy(({children:e,gap:o,align:t,justifyContent:r,className:n,style:i},a)=>ew("div",{className:Qy("Stack Stack_horizontal",n),style:{"--gap":o,alignItems:t,justifyContent:r,...i},ref:a,children:e})),f8=Jy(({children:e,gap:o,align:t,justifyContent:r,className:n,style:i},a)=>ew("div",{className:Qy("Stack Stack_vertical",n),style:{"--gap":1,justifyItems:t,justifyContent:"flex-start",...i},ref:a,children:e})),Ue={Row:g8,Col:f8};import{jsx as od}from"react/jsx-runtime";var ow=({children:e,onClickOutside:o,className:t="",onSelect:r,style:n})=>{let i=pe(),a=E8(null),l=gr({onClickOutside:o});jn(a,()=>{l.onClickOutside?.()}),x8(()=>{let d=m=>{m.key===y8.ESCAPE&&(m.stopImmediatePropagation(),l.onClickOutside?.())},c={capture:!0};return document.addEventListener(tw.KEYDOWN,d,c),()=>{document.removeEventListener(tw.KEYDOWN,d,c)}},[l]);let s=b8(`dropdown-menu ${t}`,{"dropdown-menu--mobile":i.editor.isMobile}).trim();return od(Fp.Provider,{value:{onSelect:r},children:od("div",{ref:a,className:s,style:n,"data-testid":"dropdown-menu",children:i.editor.isMobile?od(Ue.Col,{className:"dropdown-menu-container",children:e}):od(De,{className:"dropdown-menu-container",padding:2,style:{zIndex:2},children:e})})})};ow.displayName="DropdownMenuContent";var rw=ow;import{jsx as v8}from"react/jsx-runtime";var w8=({children:e,className:o="",selected:t,...r})=>v8("div",{...r,className:`dropdown-menu-item-base dropdown-menu-item-custom ${o} ${t?"dropdown-menu-item--selected":""}`.trim(),children:e}),nw=w8;import{jsx as iw}from"react/jsx-runtime";var aw=({icon:e,shortcut:o,href:t,children:r,onSelect:n,className:i="",selected:a,rel:l="noopener",...s})=>{let d=oc(s.onClick,n);return iw("a",{...s,href:t,target:"_blank",rel:l||"noopener",className:tc(i,a),title:s.title??s["aria-label"],onClick:d,children:iw(ec,{icon:e,shortcut:o,children:r})})},Pi=aw;aw.displayName="DropdownMenuItemLink";import{jsx as T8}from"react/jsx-runtime";var lw=()=>T8("div",{style:{height:"1px",backgroundColor:"var(--default-border-color)",margin:".5rem 0"}}),sw=lw;lw.displayName="DropdownMenuSeparator";import I8 from"clsx";import{jsx as C8}from"react/jsx-runtime";var cw=({className:e="",children:o,onToggle:t,title:r,...n})=>{let i=pe(),a=I8(`dropdown-menu-button ${e}`,"zen-mode-transition",{"dropdown-menu-button--mobile":i.editor.isMobile}).trim();return C8("button",{"data-prevent-outside-click":!0,className:a,onClick:t,type:"button","data-testid":"dropdown-menu-button",title:r,...n,children:o})},dw=cw;cw.displayName="DropdownMenuTrigger";import rd from"react";var mw=e=>{let o=rd.Children.toArray(e).find(t=>rd.isValidElement(t)&&typeof t.type!="string"&&t?.type.displayName&&t.type.displayName==="DropdownMenuTrigger");return o||null},pw=e=>{let o=rd.Children.toArray(e).find(t=>rd.isValidElement(t)&&typeof t.type!="string"&&t?.type.displayName&&t.type.displayName==="DropdownMenuContent");return o||null};import{Fragment as S8,jsxs as k8}from"react/jsx-runtime";var qo=({children:e,open:o})=>{let t=mw(e),r=pw(e);return k8(S8,{children:[t,o&&r]})};qo.Trigger=dw;qo.Content=rw;qo.Item=ft;qo.ItemLink=Pi;qo.ItemCustom=nw;qo.Group=Aa;qo.Separator=sw;var Ie=qo;qo.displayName="DropdownMenu";import{jsx as Mt,jsxs as nd}from"react/jsx-runtime";var A8=(e,o)=>e.filter(t=>o.includes(t.id)),_8=({setAppState:e,selectedItems:o,library:t,onRemoveFromLibrary:r,resetLibrary:n,onSelectItems:i,appState:a,className:l})=>{let[s]=ce(gn),[d,c]=ce(Li),m=()=>{let L=o.length?g("alerts.removeItemsFromsLibrary",{count:o.length}):g("alerts.resetLibrary"),k=o.length?g("confirmDialog.removeItemsFromLib"):g("confirmDialog.resetLibrary");return Mt(Qc,{onConfirm:()=>{o.length?r():n(),u(!1)},onCancel:()=>{u(!1)},title:k,children:Mt("p",{children:L})})},[p,u]=hh(!1),f=!!o.length,b=f?s.libraryItems.filter(L=>o.includes(L.id)):s.libraryItems,x=f?g("buttons.remove"):g("buttons.resetLibrary"),[w,E]=hh(!1),[y,v]=hh(null),I=L8(()=>nd(Ge,{onCloseRequest:()=>v(null),title:g("publishSuccessDialog.title"),className:"publish-library-success",size:"small",children:[Mt("p",{children:Mt(xt,{i18nKey:"publishSuccessDialog.content",authorName:y.authorName,link:L=>Mt("a",{href:y?.url,target:"_blank",rel:"noopener noreferrer",children:L})})}),Mt(z,{type:"button",title:g("buttons.close"),"aria-label":g("buttons.close"),label:g("buttons.close"),onClick:()=>v(null),"data-testid":"publish-library-success-close",className:"publish-library-success-close"})]}),[v,y]),S=(L,k)=>{E(!1),v({url:L.url,authorName:L.authorName});let N=k.slice();N.forEach(O=>{o.includes(O.id)&&(O.status="published")}),t.setLibrary(N)},P=async()=>{try{await t.updateLibrary({libraryItems:es({description:"Excalidraw library files"}),merge:!0,openLibraryMenu:!0})}catch(L){if(L?.name==="AbortError"){console.warn(L);return}e({errorMessage:g("errors.importLibraryError")})}},M=async()=>{let L=f?b:await t.getLatestLibrary();T1(L).catch(P8).catch(k=>{e({errorMessage:k.message})})},R=()=>nd(Ie,{open:d,children:[Mt(Ie.Trigger,{onToggle:()=>c(!d),children:j1}),nd(Ie.Content,{onClickOutside:()=>c(!1),onSelect:()=>c(!1),className:"library-menu",children:[!f&&Mt(Ie.Item,{onSelect:P,icon:Hn,"data-testid":"lib-dropdown--load",children:g("buttons.load")}),!!b.length&&Mt(Ie.Item,{onSelect:M,icon:tn,"data-testid":"lib-dropdown--export",children:g("buttons.export")}),!!b.length&&Mt(Ie.Item,{onSelect:()=>u(!0),icon:Rt,children:x}),f&&Mt(Ie.Item,{icon:Q0,onSelect:()=>E(!0),"data-testid":"lib-dropdown--remove",children:g("buttons.publishLibrary")})]})]});return nd("div",{className:M8("library-menu-dropdown-container",l),children:[R(),o.length>0&&Mt("div",{className:"library-actions-counter",children:o.length}),p&&m(),w&&Mt(qy,{onClose:()=>E(!1),libraryItems:A8(s.libraryItems,o),appState:a,onSuccess:L=>S(L,s.libraryItems),onError:L=>window.alert(L),updateItemsInStorage:()=>t.setLibrary(s.libraryItems),onRemove:L=>i(o.filter(k=>k!==L))}),y&&I()]})},gh=({selectedItems:e,onSelectItems:o,className:t})=>{let{library:r}=Oe(),{clearLibraryCache:n,deleteItemsFromLibraryCache:i}=Xc(),a=be(),l=me(),[s]=ce(gn),d=async m=>{let p=m.filter(u=>!e.includes(u.id));r.setLibrary(p).catch(()=>{l({errorMessage:g("alerts.errorRemovingFromLibrary")})}),i(e),o([])};return Mt(_8,{appState:a,setAppState:l,selectedItems:e,onSelectItems:o,library:r,onRemoveFromLibrary:()=>d(s.libraryItems),resetLibrary:()=>{r.resetLibrary(),n()},className:t})};import{memo as G8,useEffect as U8,useState as Y8}from"react";import D8,{useCallback as R8}from"react";function N8(){return[!1,R8(o=>o(),[])]}var uw=D8.useTransition||N8;import hw from"clsx";import{memo as B8,useEffect as F8,useRef as O8,useState as z8}from"react";import{jsx as id,jsxs as H8}from"react/jsx-runtime";var gw=B8(({id:e,elements:o,isPending:t,onClick:r,selected:n,onToggle:i,onDrag:a,svgCache:l})=>{let s=O8(null),d=Ry(e,o,l);F8(()=>{let f=s.current;if(f)return d&&(f.innerHTML=d.outerHTML),()=>{f.innerHTML=""}},[d]);let[c,m]=z8(!1),p=pe().editor.isMobile,u=t&&id("div",{className:"library-unit__adder",children:Z1});return H8("div",{className:hw("library-unit",{"library-unit__active":o,"library-unit--hover":o&&c,"library-unit--selected":n,"library-unit--skeleton":!d}),onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),children:[id("div",{className:hw("library-unit__dragger",{"library-unit__pulse":!!t}),ref:s,draggable:!!o,onClick:o||t?f=>{e&&f.shiftKey?i(e,f):r(e)}:void 0,onDragStart:f=>{if(!e){f.preventDefault();return}m(!1),a(e,f)}}),u,e&&o&&(c||p||n)&&id(Ga,{checked:n,onChange:(f,b)=>i(e,b),className:"library-unit__checkbox"})]})}),fw=()=>id("div",{className:"library-unit library-unit--skeleton"});import{Fragment as W8,jsx as ad}from"react/jsx-runtime";var fh=({children:e})=>ad("div",{className:"library-menu-items-container__grid",children:e}),ld=G8(({items:e,onItemSelectToggle:o,onItemDrag:t,isItemSelected:r,onClick:n,svgCache:i,itemsRenderedPerBatch:a})=>{let[,l]=uw(),[s,d]=Y8(0);return U8(()=>{s<e.length&&l(()=>{d(s+a)})},[s,e.length,l,a]),ad(W8,{children:e.map((c,m)=>m<s?ad(gw,{elements:c?.elements,isPending:!c?.id&&!!c?.elements,onClick:n,svgCache:i,id:c?.id,selected:r(c.id),onToggle:o,onDrag:t},c?.id??m):ad(fw,{},m))})});import{Fragment as xw,jsx as Lt,jsxs as _i}from"react/jsx-runtime";var q8=17,J8=64;function bh({isLoading:e,libraryItems:o,onAddToLibrary:t,onInsertLibraryItems:r,pendingElements:n,theme:i,id:a,libraryReturnUrl:l,onSelectItems:s,selectedItems:d}){let c=X8(null),m=Vy(c);V8(()=>{m>0&&c.current?.scrollTo(0,m)},[]);let{svgCache:p}=Xc(),u=bw(()=>o.filter(L=>L.status!=="published"),[o]),f=bw(()=>o.filter(L=>L.status==="published"),[o]),b=!o.length&&!n.length,x=!n.length&&!u.length&&!f.length,[w,E]=K8(null),y=Ai((L,k)=>{let N=!d.includes(L),O=[...u,...f];if(N){if(k.shiftKey&&w){let G=O.findIndex(j=>j.id===w),_=O.findIndex(j=>j.id===L);if(G===-1||_===-1){s([...d,L]);return}let B=Z8(d),K=O.reduce((j,Y,ne)=>((ne>=G&&ne<=_||B.has(Y.id))&&j.push(Y.id),j),[]);s(K)}else s([...d,L]);E(L)}else E(null),s(d.filter(G=>G!==L))},[w,s,f,d,u]),v=Ai(L=>{let k;return d.includes(L)?k=o.filter(N=>d.includes(N.id)):k=o.filter(N=>N.id===L),k.map(N=>({...N,elements:j8({type:"everything",elements:N.elements,randomizeSeed:!0}).duplicatedElements}))},[o,d]),I=Ai((L,k)=>{k.dataTransfer.setData($8.excalidrawlib,zm(v(L)))},[v]),S=Ai(L=>L?d.includes(L):!1,[d]),P=Ai(()=>{t(n)},[n,t]),M=Ai(L=>{L&&r(v(L))},[v,r]),R=p.size>=o.length?J8:q8;return _i("div",{className:"library-menu-items-container",style:n.length||u.length||f.length?{justifyContent:"flex-start"}:{borderBottom:0},children:[!x&&Lt(gh,{selectedItems:d,onSelectItems:s,className:"library-menu-dropdown-container--in-heading"}),_i(Ue.Col,{className:"library-menu-items-container__items",align:"start",gap:1,style:{flex:f.length>0?1:"0 1 auto",marginBottom:0},ref:c,children:[_i(xw,{children:[!x&&Lt("div",{className:"library-menu-items-container__header",children:g("labels.personalLib")}),e&&Lt("div",{style:{position:"absolute",top:"var(--container-padding-y)",right:"var(--container-padding-x)",transform:"translateY(50%)"},children:Lt(nt,{})}),!n.length&&!u.length?_i("div",{className:"library-menu-items__no-items",children:[Lt("div",{className:"library-menu-items__no-items__label",children:g("library.noItems")}),Lt("div",{className:"library-menu-items__no-items__hint",children:f.length>0?g("library.hint_emptyPrivateLibrary"):g("library.hint_emptyLibrary")})]}):_i(fh,{children:[n.length>0&&Lt(ld,{itemsRenderedPerBatch:R,items:[{id:null,elements:n}],onItemSelectToggle:y,onItemDrag:I,onClick:P,isItemSelected:S,svgCache:p}),Lt(ld,{itemsRenderedPerBatch:R,items:u,onItemSelectToggle:y,onItemDrag:I,onClick:M,isItemSelected:S,svgCache:p})]})]}),_i(xw,{children:[(f.length>0||n.length>0||u.length>0)&&Lt("div",{className:"library-menu-items-container__header library-menu-items-container__header--excal",children:g("labels.excalidrawLib")}),f.length>0?Lt(fh,{children:Lt(ld,{itemsRenderedPerBatch:R,items:f,onItemSelectToggle:y,onItemDrag:I,onClick:M,isItemSelected:S,svgCache:p})}):u.length>0?Lt("div",{style:{margin:"1rem 0",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",fontSize:".9rem"},children:g("library.noItems")}):null]}),b&&Lt(qc,{style:{padding:"16px 0",width:"100%"},id:a,libraryReturnUrl:l,theme:i,children:Lt(gh,{selectedItems:d,onSelectItems:s})})]})]})}import{jsx as Lr,jsxs as ww}from"react/jsx-runtime";var Li=he(!1),yw=({children:e})=>Lr("div",{className:"layer-ui__library",children:e}),r7=Iw(({onInsertLibraryItems:e,pendingElements:o,onAddToLibrary:t,setAppState:r,libraryReturnUrl:n,library:i,id:a,theme:l,selectedItems:s,onSelectItems:d})=>{let[c]=ce(gn),m=Eh(f=>{(async(x,w)=>{ie("element","addToLibrary","ui");for(let y of e7)if(x.some(v=>v.type===y))return r({errorMessage:g(`errors.libraryElementTypeError.${y}`)});let E=[{status:"unpublished",elements:x,id:t7(),created:Date.now()},...w];t(),i.setLibrary(E).catch(()=>{r({errorMessage:g("alerts.errorAddingToLibrary")})})})(f,c.libraryItems)},[t,i,r,c.libraryItems]),p=Tw(()=>c.libraryItems,[c]);if(c.status==="loading"&&!c.isInitialized)return Lr(yw,{children:Lr("div",{className:"layer-ui__library-message",children:ww("div",{children:[Lr(nt,{size:"2em"}),Lr("span",{children:g("labels.libraryLoadingMessage")})]})})});let u=c.libraryItems.length>0||o.length>0;return ww(yw,{children:[Lr(bh,{isLoading:c.status==="loading",libraryItems:p,onAddToLibrary:m,onInsertLibraryItems:e,pendingElements:o,id:a,libraryReturnUrl:n,theme:l,onSelectItems:d,selectedItems:s}),u&&Lr(qc,{className:"library-menu-control-buttons--at-bottom",style:{padding:"16px 12px 0 12px"},id:a,libraryReturnUrl:n,theme:l})]})}),xh=(e,o)=>({elements:e,pending:q(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}),selectedElementIds:o}),n7=(e,o)=>{let t=xr(),[r,n]=vw(()=>xh(t,e.selectedElementIds)),i=Q8(new Map);return Ew(()=>{for(let a of r.pending)i.current.set(a.id,a.version)},[r.pending]),Ew(()=>{o.state.cursorButton==="up"&&o.state.activeTool.type==="selection"&&n(a=>{if(!o7(a.selectedElementIds,e.selectedElementIds))return i.current.clear(),xh(t,e.selectedElementIds);let l=o.scene.getNonDeletedElementsMap();for(let s of Object.keys(e.selectedElementIds)){let d=l.get(s)?.version;if(d&&d!==i.current.get(s))return xh(t,e.selectedElementIds)}return a})},[o,o.state.cursorButton,o.state.activeTool.type,e.selectedElementIds,t]),r.pending},Cw=Iw(()=>{let e=Oe(),{onInsertElements:o}=e,t=Co(),r=be(),n=me(),[i,a]=vw([]),l=Tw(()=>e.library,[e.library]),s=n7(r,e),d=Eh(m=>{o(jc(m))},[o]),c=Eh(()=>{n({selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null})},[n]);return Lr(r7,{pendingElements:s,onInsertLibraryItems:d,onAddToLibrary:c,setAppState:n,libraryReturnUrl:t.libraryReturnUrl,library:l,id:e.id,theme:r.theme,selectedItems:i,onSelectItems:a})});import i7 from"clsx";import{useRef as a7}from"react";import{createPortal as l7}from"react-dom";import{KEYS as s7}from"@haoxin-web/excalidraw-common";import{jsx as Sw,jsxs as c7}from"react/jsx-runtime";var kw=e=>{let{closeOnClickOutside:o=!0}=e,t=Vs({className:"excalidraw-modal-container"}),r=a7(document.body.classList.contains("excalidraw-animations-disabled"));if(!t)return null;let n=i=>{i.key===s7.ESCAPE&&(i.nativeEvent.stopImmediatePropagation(),i.stopPropagation(),e.onCloseRequest())};return l7(c7("div",{className:i7("Modal",e.className,{"animations-disabled":r.current}),role:"dialog","aria-modal":"true",onKeyDown:n,"aria-labelledby":e.labelledBy,"data-prevent-outside-click":!0,children:[Sw("div",{className:"Modal__background",onClick:o?e.onCloseRequest:void 0}),Sw("div",{className:"Modal__content",style:{"--max-width":`${e.maxWidth}px`},tabIndex:0,children:e.children})]}),t)};import{jsx as sl,jsxs as g7}from"react/jsx-runtime";function h7(e){if(e&&typeof e=="number")return e;switch(e){case"small":return 550;case"wide":return 1024;case"regular":default:return 800}}var Ge=e=>{let[o,t]=Ay(),[r]=p7(document.activeElement),{id:n}=Xe(),i=pe().viewport.isMobile;m7(()=>{if(!o)return;let d=Mw(o);setTimeout(()=>{d.length>0&&e.autofocus!==!1&&(d[1]||d[0]).focus()});let c=m=>{if(m.key===u7.TAB){let p=Mw(o),{activeElement:u}=document,f=p.findIndex(b=>b===u);f===0&&m.shiftKey?(p[p.length-1].focus(),m.preventDefault()):f===p.length-1&&!m.shiftKey&&(p[0].focus(),m.preventDefault())}};return o.addEventListener("keydown",c),()=>o.removeEventListener("keydown",c)},[o,e.autofocus]);let a=me(),l=dr(Li),s=()=>{a({openMenu:null}),l(!1),r.focus(),e.onCloseRequest()};return sl(kw,{className:d7("Dialog",e.className,{"Dialog--fullscreen":i}),labelledBy:"dialog-title",maxWidth:h7(e.size),onCloseRequest:s,closeOnClickOutside:e.closeOnClickOutside,children:g7(De,{ref:t,children:[e.title&&sl("h2",{id:`${n}-dialog-title`,className:"Dialog__title",children:sl("span",{className:"Dialog__titleContent",children:e.title})}),i&&sl("button",{className:"Dialog__close",onClick:s,title:g("buttons.close"),"aria-label":g("buttons.close"),type:"button",children:Wt}),sl("div",{className:"Dialog__content",children:e.children})]})})};import yh from"clsx";import{forwardRef as E7,useRef as y7,useImperativeHandle as w7,useLayoutEffect as v7,useState as T7}from"react";import f7 from"clsx";import{composeEventHandlers as b7}from"@haoxin-web/excalidraw-common";import{jsx as x7}from"react/jsx-runtime";var zt=({type:e="button",onSelect:o,selected:t,children:r,className:n="",...i})=>x7("button",{onClick:b7(i.onClick,a=>{o()}),type:e,className:f7("excalidraw-button",n,{selected:t}),...i,children:r});import{jsx as wh,jsxs as Lw}from"react/jsx-runtime";var Di=E7(({onChange:e,label:o,fullWidth:t,placeholder:r,readonly:n,selectOnRender:i,onKeyDown:a,isRedacted:l=!1,icon:s,className:d,...c},m)=>{let p=y7(null);w7(m,()=>p.current),v7(()=>{i&&(p.current?.focus(),p.current?.select())},[i]);let[u,f]=T7(!1);return Lw("div",{className:yh("ExcTextField",d,{"ExcTextField--fullWidth":t,"ExcTextField--hasIcon":!!s}),onClick:()=>{p.current?.focus()},children:[s,o&&wh("div",{className:"ExcTextField__label",children:o}),Lw("div",{className:yh("ExcTextField__input",{"ExcTextField__input--readonly":n}),children:[wh("input",{className:yh({"is-redacted":"value"in c&&c.value&&l&&!u}),readOnly:n,value:"value"in c?c.value:void 0,defaultValue:"defaultValue"in c?c.defaultValue:void 0,placeholder:r,ref:p,onChange:b=>e?.(b.target.value),onKeyDown:a}),l&&wh(zt,{onSelect:()=>f(!u),style:{border:0,userSelect:"none"},children:u?pb:Vn})]})]})});import{KEYS as Ce}from"@haoxin-web/excalidraw-common";var Pw=[{icon:ga,value:"selection",key:Ce.V,numericKey:Ce[1],fillable:!0},{icon:To,value:"rectangle",key:Ce.R,numericKey:Ce[2],fillable:!0},{icon:mr,value:"diamond",key:Ce.D,numericKey:Ce[3],fillable:!0},{icon:pr,value:"ellipse",key:Ce.O,numericKey:Ce[4],fillable:!0},{icon:ur,value:"triangle",key:null,numericKey:Ce[5],fillable:!0},{icon:hr,value:"pentagon",key:null,numericKey:Ce[6],fillable:!0},{icon:en,value:"arrow",key:Ce.A,numericKey:Ce[7],fillable:!0},{icon:ao,value:"line",key:Ce.L,numericKey:Ce[8],fillable:!0},{icon:Dt,value:"freedraw",key:[Ce.P,Ce.X],numericKey:Ce[9],fillable:!1},{icon:Go,value:"text",key:Ce.T,numericKey:null,fillable:!1},{icon:a0,value:"image",key:null,numericKey:null,fillable:!1},{icon:fa,value:"eraser",key:Ce.E,numericKey:null,fillable:!1},{icon:Uo,value:"laser",key:null,numericKey:null,fillable:!1},{icon:cb,value:"laserTrail",key:null,numericKey:null,fillable:!1}],vh=e=>[{icon:ga,value:"selection",key:Ce.V,numericKey:null,fillable:!0},{icon:Dt,value:"freedraw",key:[Ce.P,Ce.X],numericKey:null,fillable:!1},{icon:ao,value:"line",key:Ce.L,numericKey:null,fillable:!0},{icon:To,value:"rectangle",key:Ce.R,numericKey:null,fillable:!0},{icon:Go,value:"text",key:Ce.T,numericKey:null,fillable:!1},{icon:fa,value:"eraser",key:Ce.E,numericKey:null,fillable:!1}],Aw=(e,o)=>vh(o).find((r,n)=>r.numericKey!=null&&e===String(r.numericKey)||r.key&&(typeof r.key=="string"?r.key===e:r.key.includes(e)))?.value||null;import Sh from"clsx";import{useState as S7}from"react";import{CLASSES as k7,KEYS as M7,capitalizeString as Ch,isTransparent as Dw}from"@haoxin-web/excalidraw-common";import{shouldAllowVerticalAlign as L7,suppportsHorizontalAlign as P7}from"@haoxin-web/excalidraw-element";import{hasBoundTextElement as Rw,isElbowArrow as A7,isImageElement as _7,isLinearElement as D7,isTextElement as R7}from"@haoxin-web/excalidraw-element";import{hasStrokeColor as Nw,toolIsArrow as Bw}from"@haoxin-web/excalidraw-element";import{createIsolation as I7}from"jotai-scope";import Th from"react";import Lo from"tunnel-rat";var Ih=Th.createContext(null),Se=()=>Th.useContext(Ih),C7=I7(),_w=()=>Th.useMemo(()=>({MainMenuTunnel:Lo(),WelcomeScreenMenuHintTunnel:Lo(),WelcomeScreenToolbarHintTunnel:Lo(),WelcomeScreenHelpHintTunnel:Lo(),WelcomeScreenCenterTunnel:Lo(),FooterCenterTunnel:Lo(),DefaultSidebarTriggerTunnel:Lo(),DefaultSidebarTabTriggersTunnel:Lo(),OverwriteConfirmDialogTunnel:Lo(),TTDDialogTriggerTunnel:Lo(),tunnelsJotai:C7}),[]);import{Fragment as Pr,jsx as ct,jsxs as Et}from"react/jsx-runtime";var kh=(e,o)=>{let t=o[0]?.type||null;for(let r of o)if(r.type!==t){t=null;break}return Nw(e.activeTool.type)&&t!=="image"&&t!=="frame"&&t!=="magicframe"||o.some(r=>Nw(r.type))},Mh=(e,o)=>lr(e.activeTool.type)||o.some(t=>lr(t.type)),Fw=({appState:e,elementsMap:o,renderAction:t,app:r})=>{let n=Ql(o,e),i=!1;n.length===2&&(Rw(n[0])||Rw(n[1]))&&(i=!0);let a=!!(e.editingTextElement||e.newElement),l=pe(),s=document.documentElement.getAttribute("dir")==="rtl",d=lr(e.activeTool.type)&&!Dw(e.currentItemBackgroundColor)||n.some(f=>lr(f.type)&&!Dw(f.backgroundColor)),c=n.length===1||i,m=!e.selectedLinearElement?.isEditing&&n.length===1&&D7(n[0])&&!A7(n[0]),p=!e.croppingElementId&&n.length===1&&_7(n[0]),u=!i&&kt(e,r);return Et("div",{className:"selected-shape-actions",children:[ct("div",{children:kh(e,n)&&t("changeStrokeColor")}),Mh(e,n)&&ct("div",{children:t("changeBackgroundColor")}),d&&t("changeFillStyle"),(Dm(e.activeTool.type)||n.some(f=>Dm(f.type)))&&t("changeStrokeWidth"),(e.activeTool.type==="freedraw"||n.some(f=>f.type==="freedraw"))&&t("changeStrokeShape"),(Rm(e.activeTool.type)||n.some(f=>Rm(f.type)))&&Et(Pr,{children:[t("changeStrokeStyle"),t("changeSloppiness")]}),(Nm(e.activeTool.type)||n.some(f=>Nm(f.type)))&&ct(Pr,{children:t("changeRoundness")}),(Bw(e.activeTool.type)||n.some(f=>Bw(f.type)))&&ct(Pr,{children:t("changeArrowType")}),(e.activeTool.type==="text"||n.some(R7))&&Et(Pr,{children:[t("changeFontFamily"),t("changeFontSize"),(e.activeTool.type==="text"||P7(n,o))&&t("changeTextAlign")]}),L7(n,o)&&t("changeVerticalAlign"),(Pn(e.activeTool.type)||n.some(f=>Pn(f.type)))&&ct(Pr,{children:t("changeArrowhead")}),t("changeOpacity"),Et("fieldset",{children:[ct("legend",{children:g("labels.layers")}),Et("div",{className:"buttonList",children:[t("sendToBack"),t("sendBackward"),t("bringForward"),t("bringToFront")]})]}),u&&!i&&Et("fieldset",{children:[ct("legend",{children:g("labels.align")}),Et("div",{className:"buttonList",children:[s?Et(Pr,{children:[t("alignRight"),t("alignHorizontallyCentered"),t("alignLeft")]}):Et(Pr,{children:[t("alignLeft"),t("alignHorizontallyCentered"),t("alignRight")]}),n.length>2&&t("distributeHorizontally"),ct("div",{style:{flexBasis:"100%",height:0}}),Et("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&&Et("fieldset",{children:[ct("legend",{children:g("labels.actions")}),Et("div",{className:"buttonList",children:[!l.editor.isMobile&&t("duplicateSelection"),!l.editor.isMobile&&t("deleteSelectedElements"),t("group"),t("ungroup"),c&&t("hyperlink"),p&&t("cropEditor"),m&&t("toggleLinearEditor")]})]})]})},Ow=({activeTool:e,appState:o,app:t,UIOptions:r})=>{let[n,i]=S7(!1),a=e.type==="frame",l=e.type==="laser",s=e.type==="laserTrail",d=e.type==="lasso"&&t.defaultSelectionTool!=="lasso",c=e.type==="embeddable",{TTDDialogTriggerTunnel:m}=Se();return Et(Pr,{children:[vh(t).map(({value:p,icon:u,key:f,numericKey:b,fillable:x},w)=>{if(r.tools?.[p]===!1)return null;let E=g(`toolBar.${p}`),y=f&&Ch(typeof f=="string"?f:f[0]),v=y?`${y} ${g("helpDialog.or")} ${b}`:`${b}`;return ct(z,{className:Sh("Shape",{fillable:x}),type:"radio",icon:u,checked:e.type===p,name:"editor-current-shape",title:`${Ch(E)} \u2014 ${v}`,keyBindingLabel:b||y,"aria-label":Ch(E),"aria-keyshortcuts":v,"data-testid":`toolbar-${p}`,onPointerDown:({pointerType:I})=>{!o.penDetected&&I==="pen"&&t.togglePenMode(!0),p==="freedraw"?window.dispatchEvent(new CustomEvent("leftflyout:toggle",{detail:{group:"freedraw"}})):p==="line"?window.dispatchEvent(new CustomEvent("leftflyout:toggle",{detail:{group:"line"}})):p==="rectangle"?window.dispatchEvent(new CustomEvent("leftflyout:toggle",{detail:{group:"shapes"}})):p==="text"&&window.dispatchEvent(new CustomEvent("leftflyout:toggle",{detail:{group:"text"}})),p==="selection"&&(o.activeTool.type==="selection"?t.setActiveTool({type:"lasso"}):t.setActiveTool({type:"selection"}))},onChange:({pointerType:I})=>{o.activeTool.type!==p&&ie("toolbar",p,"ui"),p==="image"?t.setActiveTool({type:p}):t.setActiveTool({type:p})}},p)}),ct("div",{className:"App-toolbar__divider"}),Et(Ie,{open:n,children:[ct(Ie.Trigger,{className:Sh("App-toolbar__extra-tools-trigger",{"App-toolbar__extra-tools-trigger--selected":a||c||d||l&&!t.props.isCollaborating}),onToggle:()=>i(!n),title:g("toolBar.extraTools"),children:a?Yn:c?s0:l&&!t.props.isCollaborating?Uo:d?hs:ib}),ct(Ie.Content,{onClickOutside:()=>i(!1),onSelect:()=>i(!1),className:"App-toolbar__extra-tools-dropdown",children:ct(Ie.Item,{onSelect:()=>t.setActiveTool({type:"laser"}),icon:Uo,"data-testid":"toolbar-laser",selected:l,shortcut:M7.K.toLocaleUpperCase(),children:g("toolBar.laser")})})]})]})},zw=({renderAction:e,zoom:o,visible:t=!0})=>t?ct(Ue.Col,{gap:1,className:k7.ZOOM_ACTIONS,children:Et(Ue.Row,{align:"center",children:[e("zoomOut"),e("resetZoom"),e("zoomIn")]})}):null;var Hw=({actionManager:e,showExitZenModeBtn:o})=>ct("button",{type:"button",className:Sh("disable-zen-mode",{"disable-zen-mode--visible":o}),onClick:()=>e.executeAction(Ei),children:g("buttons.exitZenMode")});import{useRef as N7}from"react";var Lh=e=>{let o=N7({userFn:e});return o.current.userFn=e,o.current.stableFn||(o.current.stableFn=(...t)=>o.current.userFn(...t)),o.current.stableFn};import{jsx as F7,jsxs as B7}from"react/jsx-runtime";var fn=he(null),Gw=()=>{let[e,o]=ce(fn),t=Ke();return e&&e==="clearCanvas"?F7(Qc,{onConfirm:()=>{t.executeAction($o),o(null)},onCancel:()=>o(null),title:g("clearCanvasDialog.title"),children:B7("p",{className:"clear-canvas__content",children:[" ",g("alerts.clearReset")]})}):null};var Ph={};b1(Ph,{toggleTheme:()=>O7});var O7={...ln,category:"App",label:"Toggle theme",perform:({actionManager:e})=>{e.executeAction(ln,"commandPalette")}};import{jsx as dt,jsxs as Po}from"react/jsx-runtime";var W7=he(null),Pe={app:"App",export:"Export",tools:"Tools",editor:"Editor",elements:"Elements",links:"Links"},V7=e=>{switch(e){case Pe.app:return 1;case Pe.export:return 2;case Pe.editor:return 3;case Pe.tools:return 4;case Pe.elements:return 5;case Pe.links:return 6;default:return 10}},dd=({shortcut:e,className:o,children:t})=>{let r=e.replace("++","+$").split("+");return Po("div",{className:Ww("shortcut",o),children:[r.map((n,i)=>dt("div",{className:"shortcut-wrapper",children:dt("div",{className:"shortcut-key",children:n==="$"?"+":n})},n)),dt("div",{className:"shortcut-desc",children:t})]})},Vw=e=>!e.altKey&&e[fo.CTRL_OR_CMD]&&(e.shiftKey&&e.key.toLowerCase()===fo.P||e.key===fo.SLASH),vde=Object.assign(e=>{let o=be(),t=me();return cd(()=>{let r=n=>{Vw(n)&&(n.preventDefault(),n.stopPropagation(),t(i=>{let a=i.openDialog?.name==="commandPalette"?null:{name:"commandPalette"};return a&&ie("command_palette","open","shortcut"),{openDialog:a}}))};return window.addEventListener(md.KEYDOWN,r,{capture:!0}),()=>window.removeEventListener(md.KEYDOWN,r,{capture:!0})},[t]),o.openDialog?.name!=="commandPalette"?null:dt(X7,{...e})},{defaultItems:Ph});function X7({customCommandPaletteItems:e}){let o=Oe(),t=be(),r=me(),n=Co(),i=Ke(),[a,l]=ce(W7),[s,d]=sd(null),c=H7(null),m=gr({uiAppState:t,customCommandPaletteItems:e,appProps:n});cd(()=>{let{uiAppState:S,customCommandPaletteItems:P,appProps:M}=m,R=O=>{let G="";return O.label&&(typeof O.label=="function"?G=g(O.label(o.scene.getNonDeletedElements(),S,o)):G=g(O.label)),G},L=O=>typeof O.icon=="function"?O.icon(S,o.scene.getNonDeletedElements()):O.icon,k=[],N=(O,G,_)=>{let B={label:R(O),icon:L(O),category:G,shortcut:He(O.name),keywords:O.keywords,predicate:O.predicate,viewMode:O.viewMode,perform:()=>{i.executeAction(O,"commandPalette")}};return _?_(B,O):B};if(S&&o.scene&&i){let O=[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,Ja,Vc,Ly].map(Y=>N(Y,Pe.elements,(ne,le)=>({...ne,predicate:le.predicate?le.predicate:(se,we,ue,Yt)=>q(se,we).length>0}))),G=[i.actions.toggleHandTool,i.actions.setFrameAsActiveTool,i.actions.toggleLassoTool].map(Y=>N(Y,Pe.tools)),_=[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(Y=>N(Y,Pe.editor)),B=[i.actions.saveToActiveFile,i.actions.saveFileToDisk,i.actions.copyAsPng,i.actions.copyAsSvg].map(Y=>N(Y,Pe.export));k=[...O,..._,{label:R($o),icon:L($o),shortcut:He($o.name),category:Pe.editor,keywords:["delete","destroy"],viewMode:!1,perform:()=>{Ve.set(fn,"clearCanvas")}},{label:g("buttons.exportImage"),category:Pe.export,icon:ys,shortcut:He("imageExport"),keywords:["export","image","png","jpeg","svg","clipboard","picture"],perform:()=>{r({openDialog:{name:"imageExport"}})}},...B];let K=[{label:g("toolBar.library"),category:Pe.app,icon:Fn,viewMode:!1,perform:()=>{S.openSidebar?r({openSidebar:null}):r({openSidebar:{name:Uw.name,tab:Uw.defaultTab}})}},{label:g("search.title"),category:Pe.app,icon:Nt,viewMode:!0,perform:()=>{i.executeAction(cl)}},{label:g("labels.shapeSwitch"),category:Pe.elements,icon:Ia,perform:()=>{i.executeAction(My)}},{label:g("labels.changeStroke"),keywords:["color","outline"],category:Pe.elements,icon:Es,viewMode:!1,predicate:(Y,ne)=>{let le=q(Y,ne);return le.length>0&&kh(ne,le)},perform:()=>{r(Y=>({openMenu:Y.openMenu==="shape"?null:"shape",openPopup:"elementStroke"}))}},{label:g("labels.changeBackground"),keywords:["color","fill"],icon:Es,category:Pe.elements,viewMode:!1,predicate:(Y,ne)=>{let le=q(Y,ne);return le.length>0&&Mh(ne,le)},perform:()=>{r(Y=>({openMenu:Y.openMenu==="shape"?null:"shape",openPopup:"elementBackground"}))}},{label:g("labels.canvasBackground"),keywords:["color"],icon:Es,category:Pe.editor,viewMode:!1,perform:()=>{r(Y=>({openMenu:Y.openMenu==="canvas"?null:"canvas",openPopup:"canvasBackground"}))}},...Pw.reduce((Y,ne)=>{let{value:le,icon:se,key:we,numericKey:ue}=ne;if(M.UIOptions.tools?.[le]===!1)return Y;let Ln=we&&G7(typeof we=="string"?we:we[0])||ue,jl={label:g(`toolBar.${le}`),category:Pe.tools,shortcut:Ln||void 0,icon:se,keywords:["toolbar"],viewMode:!1,perform:({event:Pm})=>{le==="image"?o.setActiveTool({type:le}):o.setActiveTool({type:le})}};return Y.push(jl),Y},[]),...G,{label:g("toolBar.lock"),category:Pe.tools,icon:S.activeTool.locked?On:Qr,shortcut:fo.Q.toLocaleUpperCase(),viewMode:!1,perform:()=>{o.toggleLock()}},{label:`${g("labels.textToDiagram")}...`,category:Pe.tools,icon:hb,viewMode:!1,predicate:M.aiEnabled,perform:()=>{r(Y=>({...Y,openDialog:{name:"ttd",tab:"text-to-diagram"}}))}},{label:`${g("toolBar.mermaidToExcalidraw")}...`,category:Pe.tools,icon:ab,viewMode:!1,predicate:M.aiEnabled,perform:()=>{r(Y=>({...Y,openDialog:{name:"ttd",tab:"mermaid"}}))}}],j=[...k,...K,...P||[]].map(Y=>({...Y,icon:Y.icon||Ia,order:Y.order??V7(Y.category),haystack:`${rh(Y.label.toLocaleLowerCase())} ${Y.keywords?.join(" ")||""}`}));d(j),l(j.find(Y=>Y.label===a?.label)??null)}},[m,o,i,d,a?.label,l,r]);let[p,u]=sd(""),[f,b]=sd(null),[x,w]=sd({}),E=S=>{r({openDialog:null},S),u("")},y=(S,P)=>{t.openDialog?.name==="commandPalette"&&(P.stopPropagation(),P.preventDefault(),document.body.classList.add("excalidraw-animations-disabled"),E(()=>{S.perform({actionManager:i,event:P}),l(S),requestAnimationFrame(()=>{document.body.classList.remove("excalidraw-animations-disabled")})}))},v=Lh(S=>S.viewMode===!1&&t.viewModeEnabled?!1:typeof S.predicate=="function"?S.predicate(o.scene.getNonDeletedElements(),t,n,o):S.predicate===void 0||S.predicate),I=Lh(S=>{let P=Y7(S.target)||Vw(S)||S.key===fo.ESCAPE;if(P&&S.key!==fo.ARROW_UP&&S.key!==fo.ARROW_DOWN&&S.key!==fo.ENTER)return;let M=Object.values(x).flat(),R=a&&!p&&v(a);if(S.key===fo.ARROW_UP){S.preventDefault();let L=M.findIndex(O=>O.label===f?.label);if(R){if(L===0){b(a);return}if(f===a){let O=M[M.length-1];O&&b(O);return}}let k;L===-1?k=M.length-1:k=L===0?M.length-1:(L-1)%M.length;let N=M[k];N&&b(N);return}if(S.key===fo.ARROW_DOWN){S.preventDefault();let L=M.findIndex(O=>O.label===f?.label);if(R){if(!f||L===M.length-1){b(a);return}if(f===a){let O=M[0];O&&b(O);return}}let k=(L+1)%M.length,N=M[k];N&&b(N);return}if(S.key===fo.ENTER&&f&&setTimeout(()=>{y(f,S)}),!P){if(S.stopPropagation(),/^[a-zA-Z0-9]$/.test(S.key)){c?.current?.focus();return}S.preventDefault()}});return cd(()=>(window.addEventListener(md.KEYDOWN,I,{capture:!0}),()=>window.removeEventListener(md.KEYDOWN,I,{capture:!0})),[I]),cd(()=>{if(!s)return;let S=L=>{let k={};for(let N of L)k[N.category]?k[N.category].push(N):k[N.category]=[N];return k},P=s.filter(v).sort((L,k)=>L.order-k.order),M=!p&&a&&v(a);if(!p){w(S(M?P.filter(L=>L.label!==a?.label):P)),b(M?a:P[0]||null);return}let R=rh(p.toLocaleLowerCase().replace(/[<>_| -]/g,""));P=z7.filter(R,P,{extract:L=>L.haystack}).sort((L,k)=>k.score-L.score).map(L=>L.original),w(S(P)),b(P[0]??null)},[p,s,v,a]),Po(Ge,{onCloseRequest:()=>E(),closeOnClickOutside:!0,title:!1,size:720,autofocus:!0,className:"command-palette-dialog",children:[dt(Di,{value:p,placeholder:g("commandPalette.search.placeholder"),onChange:S=>{u(S)},selectOnRender:!0,ref:c}),!o.device.viewport.isMobile&&Po("div",{className:"shortcuts-wrapper",children:[dt(dd,{shortcut:"\u2191\u2193",children:g("commandPalette.shortcuts.select")}),dt(dd,{shortcut:"\u21B5",children:g("commandPalette.shortcuts.confirm")}),dt(dd,{shortcut:U7("Esc"),children:g("commandPalette.shortcuts.close")})]}),Po("div",{className:"commands",children:[a&&!p&&Po("div",{className:"command-category",children:[Po("div",{className:"command-category-title",children:[g("commandPalette.recents"),dt("div",{className:"icon",style:{marginLeft:"6px"},children:gb})]}),dt(Yw,{command:a,isSelected:a.label===f?.label,onClick:S=>y(a,S),disabled:!v(a),onMouseMove:()=>b(a),showShortcut:!o.device.viewport.isMobile,appState:t})]}),Object.keys(x).length>0?Object.keys(x).map((S,P)=>Po("div",{className:"command-category",children:[dt("div",{className:"command-category-title",children:S}),x[S].map(M=>dt(Yw,{command:M,isSelected:M.label===f?.label,onClick:R=>y(M,R),onMouseMove:()=>b(M),showShortcut:!o.device.viewport.isMobile,appState:t},M.label))]},S)):s?Po("div",{className:"no-match",children:[dt("div",{className:"icon",children:Nt})," ",g("commandPalette.search.noMatch")]}):null]})]})}var Yw=({command:e,isSelected:o,disabled:t,onMouseMove:r,onClick:n,showShortcut:i,appState:a})=>{let l=()=>{};return Po("div",{className:Ww("command-item",{"item-selected":o,"item-disabled":t}),ref:s=>{o&&!t&&s?.scrollIntoView?.({block:"nearest"})},onClick:t?l:n,onMouseMove:t?l:r,title:t?g("commandPalette.itemNotAvailable"):"",children:[Po("div",{className:"name",children:[e.icon&&dt(vr,{icon:typeof e.icon=="function"?e.icon(a):e.icon}),dt(_a,{children:e.label})]}),i&&e.shortcut&&dt(dd,{shortcut:e.shortcut})]})};import{getSizeFromPoints as h0e,randomInteger as U_,getUpdatedTimestamp as Y_}from"@haoxin-web/excalidraw-common";import{simplify as __}from"points-on-curve";import{pointsOnBezierCurves as kde}from"points-on-curve";import{invariant as Lde}from"@haoxin-web/excalidraw-common";import{curve as Ade,lineSegment as _de,pointFrom as Dde,pointDistance as Rde,pointFromArray as Nde,pointFromVector as Bde,pointRotateRads as Fde,polygon as Ode,polygonFromPoints as zde,PRECISION as Hde,segmentsIntersectAt as Gde,vector as Ude,vectorAdd as Yde,vectorFromPoint as Wde,vectorScale as Vde}from"@haoxin-web/excalidraw-math";import{getElementAbsoluteCoords as Kde}from"@haoxin-web/excalidraw-element";var Ah=e=>{if(!e)return[];for(let o of e.sets)if(o.type==="path")return o.ops;return e.sets[0].ops};import{pointFrom as D_,pointDistance as g2,pointRotateRads as J1e}from"@haoxin-web/excalidraw-math";import{ROUGHNESS as R_,isTransparent as ul,assertNever as N_,COLOR_PALETTE as B_,LINE_POLYGON_POINT_MERGE_DISTANCE as e0e}from"@haoxin-web/excalidraw-common";import{RoughGenerator as F_}from"roughjs/bin/generator";import g1e from"roughjs/bin/rough";import{getStroke as C_}from"perfect-freehand";import{isRightAngleRads as x1e}from"@haoxin-web/excalidraw-math";import{BOUND_TEXT_PADDING as y1e,DEFAULT_REDUCED_GLOBAL_ALPHA as w1e,ELEMENT_READY_TO_ERASE_OPACITY as v1e,FRAME_STYLE as T1e,MIME_TYPES as m2,THEME as I1e,distance as C1e,getFontString as S1e,isRTL as k1e,getVerticalOffset as M1e}from"@haoxin-web/excalidraw-common";import kge from"roughjs/bin/rough";import{arrayToMap as Lge,invariant as t2,rescalePoints as Pge,sizeOf as Age}from"@haoxin-web/excalidraw-common";import{degreesToRadians as Yh,lineSegment as Dge,pointDistance as Rge,pointFrom as it,pointFromArray as c_,pointRotateRads as zi}from"@haoxin-web/excalidraw-math";import{pointsOnBezierCurves as Fge}from"points-on-curve";import{pointCenter as Vhe,pointFrom as Xhe,pointRotateRads as Khe,pointsEqual as $he,pointDistance as Zhe,vectorFromPoint as jhe,curveLength as qhe,curvePointAtLength as Jhe}from"@haoxin-web/excalidraw-math";import{DRAGGING_THRESHOLD as tge,KEYS as oge,shouldRotateWithDiscreteAngle as rge,getGridPoint as nge,invariant as ige,tupleToCoors as age,viewportCoordsToSceneCoords as lge}from"@haoxin-web/excalidraw-common";import{deconstructLinearOrFreeDrawElement as cge,isPathALoop as dge}from"@haoxin-web/excalidraw-element";import{KEYS as Wue,arrayToMap as Vue,isBindingFallthroughEnabled as Xue,tupleToCoors as Kue,invariant as $ue,isDevEnv as Zue,isTestEnv as jue}from"@haoxin-web/excalidraw-common";import{lineSegment as Jue,pointFrom as Que,pointRotateRads as ehe,vectorFromPoint as the,pointDistanceSq as ohe,clamp as rhe,pointDistance as nhe,pointFromVector as ihe,vectorScale as ahe,vectorNormalize as lhe,vectorCross as she,pointsEqual as che,lineSegmentIntersectionPoints as dhe,PRECISION as mhe}from"@haoxin-web/excalidraw-math";import{isTransparent as ype}from"@haoxin-web/excalidraw-common";import{curveIntersectLineSegment as vpe,isPointWithinBounds as Tpe,lineSegment as Ipe,lineSegmentIntersectionPoints as Cpe,pointFrom as Spe,pointFromVector as kpe,pointRotateRads as Mpe,pointsEqual as Lpe,vectorFromPoint as Ppe,vectorNormalize as Ape,vectorScale as _pe}from"@haoxin-web/excalidraw-math";import{ellipse as Rpe,ellipseSegmentInterceptPoints as Npe}from"@haoxin-web/excalidraw-math/ellipse";import{DEFAULT_ADAPTIVE_RADIUS as K7,DEFAULT_PROPORTIONAL_RADIUS as _h,LINE_CONFIRM_THRESHOLD as $7,ROUNDNESS as Dh}from"@haoxin-web/excalidraw-common";import{curve as Jde,curveCatmullRomCubicApproxPoints as Qde,curveOffsetPoints as eme,lineSegment as tme,pointDistance as Z7,pointFrom as ome,pointFromArray as rme,rectangle as nme}from"@haoxin-web/excalidraw-math";var pd=(e,o=1)=>{if(e.length>=3){let[t,r]=[e[0],e[e.length-1]];return Z7(t,r)<=$7/o}return!1},Ri=(e,o)=>{if(o.roundness?.type===Dh.PROPORTIONAL_RADIUS||o.roundness?.type===Dh.LEGACY)return e*_h;if(o.roundness?.type===Dh.ADAPTIVE_RADIUS){let t=o.roundness?.value??K7,r=t/_h;return e<=r?e*_h:t}return 0};import{ROUNDNESS as mme}from"@haoxin-web/excalidraw-common";import{pointsEqual as hme}from"@haoxin-web/excalidraw-math";var Xw=e=>!!e&&e.type==="embeddable",Kw=e=>!!e&&e.type==="iframe",Nh=e=>!!e&&(e.type==="iframe"||e.type==="embeddable"),bn=e=>e!=null&&e.type==="text";var ud=e=>e!=null&&(e.type==="frame"||e.type==="magicframe");var Ar=e=>e!=null&&j7(e.type);var Ni=e=>e!=null&&e.type==="arrow",dl=e=>Ni(e)&&e.elbowed;var j7=e=>e==="arrow"||e==="line";var Bi=e=>e!==null&&"containerId"in e&&e.containerId!==null&&bn(e);import{ARROW_LABEL_FONT_SIZE_TO_MIN_WIDTH_RATIO as Yme,ARROW_LABEL_WIDTH_FRACTION as Wme,BOUND_TEXT_PADDING as Vme,DEFAULT_FONT_SIZE as Xme,TEXT_ALIGN as Kme,VERTICAL_ALIGN as $me,getFontString as Zme,isProdEnv as jme,invariant as qme}from"@haoxin-web/excalidraw-common";import{pointFrom as Qme,pointRotateRads as epe}from"@haoxin-web/excalidraw-math";import{BOUND_TEXT_PADDING as yme,DEFAULT_FONT_SIZE as wme,DEFAULT_FONT_FAMILY as vme,getFontString as Tme,isTestEnv as Ime,normalizeEOL as Cme}from"@haoxin-web/excalidraw-common";var Sme="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".toLocaleUpperCase();import{isDevEnv as Dme,isTestEnv as Rme}from"@haoxin-web/excalidraw-common";import{curvePointDistance as cpe,distanceToLineSegment as dpe,pointRotateRads as mpe}from"@haoxin-web/excalidraw-math";import{ellipse as upe,ellipseDistanceFromPoint as hpe}from"@haoxin-web/excalidraw-math/ellipse";import{invariant as Kpe,isDevEnv as $pe,isTestEnv as Zpe}from"@haoxin-web/excalidraw-common";import{pointFrom as qpe,pointFromVector as Jpe,pointRotateRads as Qpe,pointScaleFromOrigin as eue,pointsEqual as tue,triangleIncludesPoint as oue,vectorCross as rue,vectorFromPoint as t_,vectorScale as nue}from"@haoxin-web/excalidraw-math";var Gh=[1,0],qw=[0,1],Uh=[-1,0],Jw=[0,-1],hd=e=>{let[o,t]=e,r=Math.abs(o),n=Math.abs(t);return o>n?Gh:o<=-n?Uh:t>r?qw:Jw},Qw=(e,o)=>hd(t_(e,o)),gd=(e,o)=>fd(Qw(e,o)),Hh=(e,o)=>e[0]===o[0]&&e[1]===o[1],fd=e=>Hh(e,Gh)||Hh(e,Uh);import{clamp as due,pointDistance as mue,pointFrom as pue,pointScaleFromOrigin as uue,pointsEqual as hue,pointTranslate as gue,vector as fue,vectorCross as bue,vectorFromPoint as xue,vectorScale as Eue}from"@haoxin-web/excalidraw-math";import{BinaryHeap as wue,invariant as vue,isAnyTrue as Tue,tupleToCoors as Iue,getSizeFromPoints as Cue,isDevEnv as Sue,arrayToMap as kue}from"@haoxin-web/excalidraw-common";import{SHIFT_LOCKING_ANGLE as She,viewportCoordsToSceneCoords as khe}from"@haoxin-web/excalidraw-common";import{normalizeRadians as Lhe,radiansBetweenAngles as Phe,radiansDifference as Ahe}from"@haoxin-web/excalidraw-math";import{pointsEqual as Dhe}from"@haoxin-web/excalidraw-math";var Rh=e=>{let o=Math.floor(e.width/2)+1,t=0,r=e.width,n=Math.floor(e.height/2)+1,i=o,a=e.height;return[o,t,r,n,i,a,0,n]},r2=e=>{let t=e.width/2,r=0,n=0,i=e.height,a=e.width,l=e.height;return[t,r,a,l,n,i]},n2=e=>{let o=e.width/2,t=e.height/2,r=Math.min(e.width,e.height)/2,n=r*.4,i=[];for(let a=0;a<10;a++){let l=(a*36-90)*(Math.PI/180),s=a%2===0?r:n,d=o+s*Math.cos(l),c=t+s*Math.sin(l);i.push(d,c)}return i};var d_=e=>{switch(e){case"arrow":return 25;case"diamond":case"diamond_outline":return 12;case"crowfoot_many":case"crowfoot_one":case"crowfoot_one_or_many":return 20;default:return 15}},m_=e=>{switch(e){case"bar":return 90;case"arrow":return 20;default:return 25}},Wh=(e,o,t,r)=>{if(o.length<1)return null;let n=Ah(o[0]);if(n.length<1)return null;let i=t==="start"?1:n.length-1,a=n[i].data;t2(a.length===6,"Op data length is not 6");let l=it(a[4],a[5]),s=it(a[2],a[3]),d=it(a[0],a[1]),c=n[i-1],m=it(0,0);if(c.op==="move"){let _=c_(c.data);t2(_!=null,"Op data is not a point"),m=_}else c.op==="bcurveTo"&&(m=it(c.data[4],c.data[5]));let p=(_,B)=>Math.pow(1-_,3)*l[B]+3*_*Math.pow(1-_,2)*s[B]+3*Math.pow(_,2)*(1-_)*d[B]+m[B]*Math.pow(_,3),[u,f]=t==="start"?m:l,[b,x]=[p(.3,0),p(.3,1)],w=Math.hypot(u-b,f-x),E=(u-b)/w,y=(f-x)/w,v=d_(r),I=0;{let[_,B]=t==="end"?e.points[e.points.length-1]:e.points[0],[K,j]=e.points.length>1?t==="end"?e.points[e.points.length-2]:e.points[1]:[0,0];I=Math.hypot(_-K,B-j)}let P=Math.min(v,I*(r==="diamond"||r==="diamond_outline"?.25:.5)),M=u-E*P,R=f-y*P;if(r==="dot"||r==="circle"||r==="circle_outline"){let _=Math.hypot(R-f,M-u)+e.strokeWidth-2;return[u,f,_]}let L=m_(r);if(r==="crowfoot_many"||r==="crowfoot_one_or_many"){let[_,B]=zi(it(u,f),it(M,R),Yh(-L)),[K,j]=zi(it(u,f),it(M,R),Yh(L));return[M,R,_,B,K,j]}let[k,N]=zi(it(M,R),it(u,f),-L*Math.PI/180),[O,G]=zi(it(M,R),it(u,f),Yh(L));if(r==="diamond"||r==="diamond_outline"){let _,B;if(t==="start"){let[K,j]=e.points.length>1?e.points[1]:[0,0];[_,B]=zi(it(u+P*2,f),it(u,f),Math.atan2(j-f,K-u))}else{let[K,j]=e.points.length>1?e.points[e.points.length-2]:[0,0];[_,B]=zi(it(u-P*2,f),it(u,f),Math.atan2(f-j,u-K))}return[u,f,k,N,_,B,O,G]}return[u,f,k,N,O,G]};import{pointFrom as qge,pointCenter as Jge,pointRotateRads as Qge,vectorFromPoint as efe,vectorNormalize as tfe,vectorSubtract as ofe,vectorAdd as rfe,vectorScale as nfe,pointFromVector as ife,clamp as afe,isCloseTo as lfe}from"@haoxin-web/excalidraw-math";import{arrayToMap as Kfe}from"@haoxin-web/excalidraw-common";import{isPointWithinBounds as Zfe,pointFrom as jfe}from"@haoxin-web/excalidraw-math";import{vectorCross as pfe,vectorFromPoint as ufe}from"@haoxin-web/excalidraw-math";import{arrayToMap as p_}from"@haoxin-web/excalidraw-common";import{getElementBounds as u_}from"@haoxin-web/excalidraw-element";import{isArrowElement as h_,isExcalidrawElement as g_,isFreeDrawElement as f_,isLinearElement as b_,isTextElement as x_}from"@haoxin-web/excalidraw-element";import{rangeIncludesValue as bd,pointFrom as Jo,pointRotateRads as E_,rangeInclusive as xd}from"@haoxin-web/excalidraw-math";var y_=e=>e.type==="diamond"?[Jo(e.width/2,0),Jo(e.width,e.height/2),Jo(e.width/2,e.height),Jo(0,e.height/2)]:[Jo(0,0),Jo(0+e.width,0),Jo(0+e.width,e.height),Jo(0,e.height)],w_=e=>b_(e)||f_(e)?e.points:y_(e),i2=e=>{let o=e.reduce((t,[r,n])=>(t.minY=Math.min(t.minY,n),t.minX=Math.min(t.minX,r),t.maxX=Math.max(t.maxX,r),t.maxY=Math.max(t.maxY,n),t),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0,cx:0,cy:0});return o.cx=(o.maxX+o.minX)/2,o.cy=(o.maxY+o.minY)/2,o},a2=e=>{let o=w_(e),{cx:t,cy:r}=i2(o),n=Jo(t,r),i=o.map(c=>E_(c,n,e.angle)),{minX:a,minY:l,maxX:s,maxY:d}=i2(i);return[a+e.x,l+e.y,s+e.x,d+e.y]},Vh=(e,o,t=!1)=>{let r=a2(e),n=o[0]<=r[0]&&o[2]>=r[2]&&o[1]<=r[1]&&o[3]>=r[3];return t?n?!0:r[0]<=o[0]&&r[2]>=o[2]&&r[1]<=o[1]&&r[3]>=o[3]:n},l2=(e,o)=>{let t=a2(e);return(bd(t[0],xd(o[0],o[2]))||bd(o[0],xd(t[0],t[2])))&&(bd(t[1],xd(o[1],o[3]))||bd(o[1],xd(t[1],t[3])))},s2=({elements:e,bounds:o,type:t,errorMargin:r=0})=>{g_(o)&&(o=u_(o,p_(e)));let n=[o[0]-r,o[1]-r,o[2]+r,o[3]+r],i=new Set;for(let a of e){if(i.has(a.id))continue;if(t==="overlap"?l2(a,n):t==="inside"?Vh(a,n):Vh(a,n,!0)){if(i.add(a.id),a.boundElements)for(let s of a.boundElements)i.add(s.id);x_(a)&&a.containerId&&i.add(a.containerId),h_(a)&&(a.startBinding&&i.add(a.startBinding.elementId),a.endBinding&&i.add(a.endBinding?.elementId))}}return e.filter(a=>i.has(a.id))};import{arrayToMap as Lfe,isShallowEqual as T_}from"@haoxin-web/excalidraw-common";var v_=function(){let e=null,o=null,t=null,r=(i,a,l,s)=>{if(t!==void 0&&a===o&&i===e&&l.editingGroupId===t?.editingGroupId)return t;let d={};for(let p of i){let u=p.groupIds;if(l.editingGroupId){let f=u.indexOf(l.editingGroupId);f>-1&&(u=u.slice(0,f))}if(u.length>0){let f=u[u.length-1];d[f]=!0}}let c={},m=a.reduce((p,u)=>{if(u.isDeleted)return p;let f=u.groupIds.find(b=>d[b]);return f&&(p[u.id]=!0,Array.isArray(c[f])?c[f].push(u.id):c[f]=[u.id]),p},{});for(let p of Object.keys(c))c[p].length<2&&d[p]&&(d[p]=!1);return o=a,e=i,t={editingGroupId:l.editingGroupId,selectedGroupIds:d,selectedElementIds:Xh({...l.selectedElementIds,...m},s)},t},n=(i,a,l,s)=>{let d=s?s.scene.getSelectedElements({selectedElementIds:i.selectedElementIds,elements:a}):Kh(a,i);return d.length?r(d,a,i,l):{selectedGroupIds:{},editingGroupId:null,selectedElementIds:Xh(i.selectedElementIds,l)}};return n.clearCache=()=>{o=null,e=null,t=null},n}();var Bfe=function(){let e=null,o=null,t=null,r=(n,i)=>(t!=null&&n===e&&i.selectedElementIds===o||(t=n.some(a=>i.selectedElementIds[a.id]),e=n,o=i.selectedElementIds),t);return r.clearCache=()=>{e=null,o=null,t=null},r}(),Kh=(e,o,t)=>{let r=new Set,n=[];for(let i of e.values()){if(o.selectedElementIds[i.id]){n.push(i),r.add(i.id);continue}if(t?.includeBoundTextElement&&Bi(i)&&o.selectedElementIds[i?.containerId]){n.push(i),r.add(i.id);continue}}if(t?.includeElementsInFrames){let i=[];return n.forEach(a=>{ud(a)&&c2(e,a.id).forEach(l=>!r.has(l.id)&&i.push(l)),i.push(a)}),i}return n};var Xh=(e,o)=>T_(o.selectedElementIds,e)?o.selectedElementIds:e;var c2=(e,o)=>{let t=[];for(let r of e.values())r.frameId===o&&t.push(r);return t};var S_=typeof document<"u"?document.createElement("img"):{src:""};S_.src=`data:${m2.svg},${encodeURIComponent('<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="image" class="svg-inline--fa fa-image fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#888" d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"></path></svg>')}`;var k_=typeof document<"u"?document.createElement("img"):{src:""};k_.src=`data:${m2.svg},${encodeURIComponent('<svg viewBox="0 0 668 668" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48ZM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56ZM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48Z" style="fill:#888;fill-rule:nonzero" transform="matrix(.81709 0 0 .81709 124.825 145.825)"/><path d="M256 8C119.034 8 8 119.033 8 256c0 136.967 111.034 248 248 248s248-111.034 248-248S392.967 8 256 8Zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676ZM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676Z" style="fill:#888;fill-rule:nonzero" transform="matrix(.30366 0 0 .30366 506.822 60.065)"/></svg>')}`;var p2=new WeakMap;var M_=new WeakMap([]);function u2(e){let o=L_(e),t=new Path2D(o);return M_.set(e,t),t}function L_(e){let o=e.simulatePressure?e.points:e.points.length?e.points.map(([r,n],i)=>[r,n,e.pressures[i]]):[[0,0,.5]],t={simulatePressure:e.simulatePressure,size:e.strokeWidth*4.25,thinning:.6,smoothing:.5,streamline:.5,easing:r=>Math.sin(r*Math.PI/2),last:!!e.lastCommittedPoint};return A_(C_(o,t))}function d2(e,o){return[(e[0]+o[0])/2,(e[1]+o[1])/2]}var P_=/(\s?[A-Z]?,?-?[0-9]*\.[0-9]{0,2})(([0-9]|e|-)*)/g;function A_(e){if(!e.length)return"";let o=e.length-1;return e.reduce((t,r,n,i)=>(n===o?t.push(r,d2(r,i[0]),"L",i[0],"Z"):t.push(r,d2(r,i[n+1])),t),["M",e[0],"Q"]).join(" ").replace(P_,"$1")}var h2=e=>e==="rectangle"||e==="iframe"||e==="embeddable"||e==="line"||e==="diamond"||e==="triangle"||e==="pentagon"||e==="image";var pt=class pt{};C(pt,"rg",new F_),C(pt,"cache",new WeakMap),C(pt,"get",o=>pt.cache.get(o)),C(pt,"set",(o,t)=>pt.cache.set(o,t)),C(pt,"delete",o=>pt.cache.delete(o)),C(pt,"destroy",()=>{pt.cache=new WeakMap}),C(pt,"generateElementShape",(o,t)=>{let r=t?.isExporting?void 0:pt.get(o);if(r!==void 0)return r;p2.delete(o);let n=H_(o,pt.rg,t||{isExporting:!1,canvasBackgroundColor:B_.white,embedsValidationStatus:null});return pt.cache.set(o,n),n});var Oi=pt,O_=e=>[8,8+e],b2=e=>[1.5,6+e];function z_(e){let o=e.roughness,t=Math.max(e.width,e.height),r=Math.min(e.width,e.height);return r>=20&&t>=50||r>=15&&e.roundness&&h2(e.type)||Ar(e)&&t>=50?o:Math.min(o/(t<10?3:2),2.5)}var mt=(e,o=!1)=>{let t={seed:e.seed,strokeLineDash:e.strokeStyle==="dashed"?O_(e.strokeWidth):e.strokeStyle==="dotted"?b2(e.strokeWidth):void 0,disableMultiStroke:e.strokeStyle!=="solid",strokeWidth:e.strokeStyle!=="solid"?e.strokeWidth+.5:e.strokeWidth,fillWeight:e.strokeWidth/2,hachureGap:e.strokeWidth*4,roughness:z_(e),stroke:e.strokeColor,preserveVertices:o||e.roughness<R_.cartoonist};switch(e.type){case"rectangle":case"iframe":case"embeddable":case"diamond":case"triangle":case"pentagon":case"callout":case"ellipse":return t.fillStyle=e.fillStyle,t.fill=ul(e.backgroundColor)?void 0:e.backgroundColor,e.type==="ellipse"&&(t.curveFitting=1),t;case"hollow_arrow":case"hollow_double_arrow":return t.fill=void 0,t.fillStyle=void 0,t;case"line":case"freedraw":return pd(e.points)&&(t.fillStyle=e.fillStyle,t.fill=e.backgroundColor==="transparent"?void 0:e.backgroundColor),t;case"arrow":return t;default:throw new Error(`Unimplemented type ${e.type}`)}},$h=(e,o,t)=>Nh(e)&&(o||Xw(e)&&t?.get(e.id)!==!0)&&ul(e.backgroundColor)&&ul(e.strokeColor)?{...e,roughness:0,backgroundColor:"#d3d3d3",fillStyle:"solid"}:Kw(e)?{...e,strokeColor:ul(e.strokeColor)?"#000000":e.strokeColor,backgroundColor:ul(e.backgroundColor)?"#f4f4f6":e.backgroundColor}:e,f2=(e,o,t,r,n,i,a)=>{let l=Wh(e,o,t,r);if(l===null)return[];let s=(d,c)=>{if(d===null)return[];let[,,m,p,u,f]=d;return[n.line(m,p,u,f,c)]};switch(r){case"dot":case"circle":case"circle_outline":{let[d,c,m]=l;return delete i.strokeLineDash,[n.circle(d,c,m,{...i,fill:r==="circle_outline"?void 0:e.strokeColor,fillStyle:r==="circle_outline"?void 0:"solid",stroke:e.strokeColor,roughness:Math.min(.5,i.roughness||0)})]}case"triangle":case"triangle_outline":{let[d,c,m,p,u,f]=l;return delete i.strokeLineDash,[n.polygon([[d,c],[m,p],[u,f],[d,c]],{...i,fill:r==="triangle_outline"?void 0:e.strokeColor,fillStyle:r==="triangle_outline"?void 0:"solid",roughness:Math.min(1,i.roughness||0)})]}case"diamond":case"diamond_outline":{let[d,c,m,p,u,f,b,x]=l;return delete i.strokeLineDash,[n.polygon([[d,c],[m,p],[u,f],[b,x],[d,c]],{...i,fill:r==="diamond_outline"?void 0:e.strokeColor,fillStyle:r==="diamond_outline"?void 0:"solid",roughness:Math.min(1,i.roughness||0)})]}case"crowfoot_one":return s(l,i);case"bar":case"arrow":case"crowfoot_many":case"crowfoot_one_or_many":default:{let[d,c,m,p,u,f]=l;if(e.strokeStyle==="dotted"){let b=b2(e.strokeWidth-1);i.strokeLineDash=[b[0],b[1]-1]}else delete i.strokeLineDash;return i.roughness=Math.min(1,i.roughness||0),[n.line(m,p,d,c,i),n.line(u,f,d,c,i),...r==="crowfoot_one_or_many"?s(Wh(e,o,t,"crowfoot_one"),i):[]]}}};var H_=(e,o,{isExporting:t,canvasBackgroundColor:r,embedsValidationStatus:n})=>{switch(e.type){case"rectangle":case"iframe":case"embeddable":case"callout":{let i;if(e.roundness){let a=e.width,l=e.height,s=Ri(Math.min(a,l),e);i=o.path(`M ${s} 0 L ${a-s} 0 Q ${a} 0, ${a} ${s} L ${a} ${l-s} Q ${a} ${l}, ${a-s} ${l} L ${s} ${l} Q 0 ${l}, 0 ${l-s} L 0 ${s} Q 0 0, ${s} 0`,mt($h(e,t,n),!0))}else if(e.type==="callout"){let a=e.width,l=e.height,s=a*.34,d=a*.22,c=a*.12,m=l+l*.18,p=mt($h(e,t,n),!1);p.disableMultiStroke=!0,p.disableMultiStrokeFill=!0;let u=`M 0 0 L ${a} 0 L ${a} ${l} L ${s} ${l} L ${c} ${m} L ${d} ${l} L 0 ${l} L 0 0 Z`;i=o.path(u,p)}else i=o.rectangle(0,0,e.width,e.height,mt($h(e,t,n),!1));return i}case"diamond":{let i,[a,l,s,d,c,m,p,u]=Rh(e);if(e.roundness){let f=Ri(Math.abs(a-p),e),b=Ri(Math.abs(d-l),e);i=o.path(`M ${a+f} ${l+b} L ${s-f} ${d-b}