@haoxin-web/excalidraw 1.0.24 → 1.0.25

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 U1,A as Xm,B as P1,C as A1,D as _1,E as as,F as ha,G as ls,H as ss,I as D1,J as R1,K as ga,L as N1,M as B1,N as F1,O as O1,P as cs,Q as Nn,R as z1,S as HC,T as Km,U as GC,V as Bn,W as fa,Y as H1,_ as G1,a as S1,aa as ds,b as tn,ba as W1,c as Co,ca as Zm,d as k1,da as $m,e as we,ea as ms,f as M1,fa as Y1,g as J,ga as jm,h as rs,ha as Go,i as cr,ia as V1,j as Hm,ja as qm,k as Gm,ka as X1,l as _n,la as K1,m as Um,ma as ps,n as Dn,na as Jm,o as L1,oa as Z1,p as Wm,pa as $1,q as dr,qa as j1,r as mr,ra as us,s as St,t as lo,u as Rn,v as ns,w as Ym,x as ua,y as is,z as Vm}from"./chunk-JEWZWCYT.js";import{a as T}from"./chunk-WBFOTHBE.js";import{J as zm}from"./chunk-LUHP3LHA.js";import{c as C1}from"./chunk-Z3N5DIM6.js";import{b as T1,c as I1,d as I}from"./chunk-SRAX5OIU.js";import UU,{useEffect as WU}from"react";import{DEFAULT_UI_OPTIONS as _C,isShallowEqual as YU}from"@haoxin-web/excalidraw-common";import m5 from"clsx";import xH from"lodash.throttle";import Ho,{useContext as Qr}from"react";import{flushSync as aa}from"react-dom";import EH from"roughjs/bin/rough";import{nanoid as yH}from"nanoid";import{clamp as p5,pointFrom as le,pointDistance as Zr,vector as u5,pointRotateRads as Mf,vectorScale as wH,vectorFromPoint as Lf,vectorSubtract as h5,vectorDot as g5,vectorNormalize as f5}from"@haoxin-web/excalidraw-math";import{COLOR_PALETTE as vH,CODES as b5,shouldResizeFromCenter as x5,shouldMaintainAspectRatio as Ol,shouldRotateWithDiscreteAngle as Pf,isArrowKey as Cm,KEYS as V,APP_NAME as TH,CURSOR_TYPE as Be,DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT as IH,DEFAULT_VERTICAL_ALIGN as E5,DRAGGING_THRESHOLD as CH,ELEMENT_SHIFT_TRANSLATE_AMOUNT as SH,ELEMENT_TRANSLATE_AMOUNT as y5,EVENT as oe,FRAME_STYLE as $r,IMAGE_MIME_TYPES as kH,IMAGE_RENDER_TIMEOUT as MH,isBrave as LH,LINE_CONFIRM_THRESHOLD as Af,MAX_ALLOWED_FILE_BYTES as w5,MIME_TYPES as ir,MQ_MAX_HEIGHT_LANDSCAPE as PH,MQ_MAX_WIDTH_LANDSCAPE as AH,MQ_MAX_WIDTH_PORTRAIT as _H,MQ_RIGHT_SIDEBAR_MIN_WIDTH as DH,POINTER_BUTTON as Sn,ROUNDNESS as Sm,SCROLL_TIMEOUT as RH,TAP_TWICE_TIMEOUT as NH,TEXT_TO_CENTER_SNAP_THRESHOLD as BH,THEME as km,THEME_FILTER as FH,TOUCH_CTX_MENU_TIMEOUT as OH,VERTICAL_ALIGN as zH,YOUTUBE_STATES as Mm,ZOOM_STEP as HH,POINTER_EVENTS as la,TOOL_TYPE as bt,isIOS as GH,supportsResizeObserver as v5,DEFAULT_COLLISION_THRESHOLD as T5,DEFAULT_TEXT_ALIGN as UH,ARROW_TYPE as jr,DEFAULT_REDUCED_GLOBAL_ALPHA as WH,isSafari as YH,isLocalLink as VH,normalizeLink as _f,toValidURL as XH,getGridPoint as st,getLineHeight as I5,debounce as C5,distance as sa,getFontString as Df,getNearestScrollableContainer as KH,isInputLike as S5,isToolIcon as ZH,isWritableElement as zl,sceneCoordsToViewportCoords as Lm,tupleToCoors as Rf,viewportCoordsToSceneCoords as We,wrapEvent as $H,updateObject as Nf,updateActiveTool as ar,getShortcutKey as jH,isTransparent as qH,easeToValuesRAF as JH,muteFSAbortError as QH,isTestEnv as n1,isDevEnv as dC,easeOut as eG,updateStable as Hl,addEventListener as Fe,normalizeEOL as tG,getDateTime as k5,isShallowEqual as oG,arrayToMap as Pm,randomInteger as rG,CLASSES as nG,Emitter as kn,isMobile as iG,MINIMUM_ARROW_SIZE as M5,DOUBLE_TAP_POSITION_THRESHOLD as aG}from"@haoxin-web/excalidraw-common";import{getObservedAppState as lG,getCommonBounds as ca,maybeSuggestBindingsForLinearElementAtCoords as L5,getElementAbsoluteCoords as P5,bindOrUnbindLinearElements as A5,fixBindingsAfterDeletion as sG,getHoveredElementForBinding as Bf,isBindingEnabled as Ff,shouldEnableBindingForPointerEvent as cG,updateBoundElements as Of,getSuggestedBindingsForArrows as zf,LinearElementEditor as Le,newElementWith as qr,newFrameElement as dG,newFreeDrawElement as mG,newEmbeddableElement as _5,newMagicFrameElement as D5,newIframeElement as pG,newArrowElement as uG,newElement as hG,newImageElement as gG,newLinearElement as fG,newTextElement as R5,refreshTextDimensions as bG,deepCopyElement as N5,duplicateElements as B5,hasBoundTextElement as F5,isArrowElement as Hf,isBindingElement as Gf,isBindingElementType as O5,isBoundToContainer as Uf,isFrameLikeElement as Rt,isImageElement as Mn,isEmbeddableElement as lr,isInitializedImageElement as Gl,isLinearElement as ro,isLinearElementType as xG,isUsingAdaptiveRadius as EG,isIframeElement as da,isIframeLikeElement as Ul,isMagicFrameElement as Wf,isTextBindableContainer as z5,isElbowArrow as je,isFlowchartNodeElement as yG,isBindableElement as wG,isTextElement as To,getLockedLinearCursorAlignSize as H5,getNormalizedDimensions as vG,isElementCompletelyInViewport as Yf,isElementInViewport as G5,isInvisiblySmallElement as U5,getCornerRadius as TG,isPathALoop as W5,createSrcDoc as Y5,embeddableURLValidator as Vf,maybeParseEmbedSrc as IG,getEmbedLink as Am,getInitializedImageElements as CG,normalizeSVG as V5,updateImageCache as SG,getBoundTextElement as Xf,getContainerCenter as Kf,getContainerElement as X5,isValidTextContainer as kG,redrawTextBoundingBox as MG,shouldShowBoundingBox as LG,getFrameChildren as Zf,isCursorInFrame as K5,addElementsToFrame as $f,replaceAllElementsInFrame as PG,removeElementsFromFrame as AG,getElementsInResizingFrame as jf,getElementsInNewFrame as _G,getContainingFrame as qf,elementOverlapsWithFrame as DG,updateFrameMembershipOfSelectedElements as Z5,isElementInFrame as $5,getFrameLikeTitle as RG,getElementsOverlappingFrame as NG,filterElementsEligibleAsFrameChildren as BG,hitElementBoundText as FG,hitElementBoundingBoxOnly as OG,hitElementItself as Wl,getVisibleSceneBounds as zG,FlowChartCreator as HG,FlowChartNavigator as GG,getLinkDirectionFromKey as j5,cropElement as UG,wrapText as WG,isElementLink as Jf,parseElementLinkFromURL as YG,isMeasureTextSupported as VG,normalizeText as XG,measureText as q5,getLineHeightInPx as KG,getApproxMinLineWidth as ZG,getApproxMinLineHeight as $G,getMinTextElementWidth as jG,ShapeCache as Yl,getRenderOpacity as qG,editGroupForSelectedElement as JG,getElementsInGroup as Ln,getSelectedGroupIdForElement as QG,getSelectedGroupIds as eU,isElementInGroup as J5,isSelectedViaGroup as tU,selectGroupsForSelectedElements as no,syncInvalidIndices as mC,syncMovedIndices as Q5,excludeElementsInFramesFromSelection as oU,getSelectionStateForElements as rU,makeNextSelectedElementIds as ve,getResizeOffsetXY as nU,getResizeArrowDirection as iU,transformElements as aU,getCursorForResizingElement as eC,getElementWithTransformHandleType as tC,getTransformHandleTypeFromCoords as oC,dragNewElement as rC,dragSelectedElements as lU,getDragOffsetXY as sU,isNonDeletedElement as nC,Scene as iC,Store as cU,CaptureUpdateAction as Ct,hitElementBoundingBox as dU,isLineElement as Qf,isSimpleArrow as mU,StoreDelta as aC,positionElementsOnGrid as lC}from"@haoxin-web/excalidraw-element";import{KEYS as vp,updateActiveTool as tS}from"@haoxin-web/excalidraw-common";import{getNonDeletedElements as Tp}from"@haoxin-web/excalidraw-element";import{fixBindingsAfterDeletion as oS}from"@haoxin-web/excalidraw-element";import{LinearElementEditor as O0}from"@haoxin-web/excalidraw-element";import{newElementWith as Ks}from"@haoxin-web/excalidraw-element";import{getContainerElement as z0}from"@haoxin-web/excalidraw-element";import{isBoundToContainer as Vs,isElbowArrow as rS,isFrameLikeElement as nS}from"@haoxin-web/excalidraw-element";import{getFrameChildren as iS}from"@haoxin-web/excalidraw-element";import{getElementsInGroup as Ip,selectGroupsForSelectedElements as aS}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as Xs}from"@haoxin-web/excalidraw-element";import{isDevEnv as VC}from"@haoxin-web/excalidraw-common";import{atom as he,createStore as UC}from"jotai";import{createIsolation as WC}from"jotai-scope";var q1=WC();var{useAtom:ce,useSetAtom:pr,useAtomValue:hs,useStore:jU}=q1,J1=q1.Provider,Ve=UC();var YC=T1({"./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 XC=85,So={code:"en",label:"English"},On=[So,...[{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=>C1[e.code]>=XC).sort((e,o)=>e.label>o.label?1:-1)],fs="__test__";VC()&&On.unshift({code:fs,label:"test language"},{code:`${fs}.rtl`,label:"\u202Atest language (rtl)\u202C",rtl:!0});var Fn=So,gs={},bs=async e=>{if(Fn=e,document.documentElement.dir=Fn.rtl?"rtl":"ltr",document.documentElement.lang=Fn.code,e.code.startsWith(fs))gs={};else try{gs=await YC(`./locales/${Fn.code}.json`)}catch(o){console.error(`Failed to load language ${e.code}:`,o.message),gs=zm}Ve.set(eb,e.code)},Uo=()=>Fn,Q1=(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},h=(e,o,t)=>{if(Fn.code.startsWith(fs))return`\u202A[[${o?`${e}(${JSON.stringify(o).slice(1,-1)})`:e}]]\u202C`;let r=e.split("."),n=Q1(gs,r)||Q1(zm,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},eb=he(So.code),Ye=()=>{let e=hs(eb);return{t:h,langCode:e}};import KC from"clsx";import ZC from"open-color";import nt from"react";import{THEME as $C}from"@haoxin-web/excalidraw-common";import{Fragment as Ee,jsx as g,jsxs as D}from"react/jsx-runtime";var so=e=>"var(--icon-fill-color)",tb=e=>e===$C.LIGHT?ZC.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 g("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${t} ${r}`,className:KC({"rtl-mirror":n}),style:i,...a,children:typeof e=="string"?g("path",{fill:"currentColor",d:e}):e})},H={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},re={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},pW=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("rect",{x:3,y:8,width:18,height:4,rx:1}),g("line",{x1:12,y1:8,x2:12,y2:21}),g("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),g("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),zn=A(D("g",{strokeWidth:"1.25",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),g("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),g("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),g("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),g("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),H),ob=A(D("svg",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),g("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),H),rb=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("circle",{cx:"12",cy:"12",r:"1"}),g("circle",{cx:"12",cy:"19",r:"1"}),g("circle",{cx:"12",cy:"5",r:"1"})]}),H),nb=A(D("svg",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),g("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),g("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),H),Qm=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),g("path",{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),g("path",{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),g("path",{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),g("path",{d:"M6.5 9.5l3.5 -3"}),g("path",{d:"M14 5.5l3 1.5"}),g("path",{d:"M18.5 10l-2.5 7"}),g("path",{d:"M13.5 17.5l-7 -5"})]}),H),on=A(D("g",{children:[g("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"}),g("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"}),g("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:g("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"})}),g("g",{mask:"url(#UnlockedIcon)",children:g("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"})})]}),re),Hn=A(D("g",{strokeWidth:"1.25",children:[g("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"}),g("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),g("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"})]}),re),ib=A(g("g",{fill:"currentColor",children:g("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}),ab=A(D(Ee,{children:[g("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"}),g("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),g("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"}),lb=A(D(Ee,{children:[g("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"}),g("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),g("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"}),sb=A(D(Ee,{children:[g("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"}),g("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),g("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"}),uW=A(g("g",{fill:"currentColor",children:g("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"}),ba=A(D("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),xs=A(D("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,children:[g("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"}),g("path",{d:"M5 15m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),g("path",{d:"M5 17c0 1.42 .316 2.805 1 4"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),ko=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),H),ur=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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),hr=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("circle",{cx:"12",cy:"12",r:"9"})]}),H),gr=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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),fr=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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),Es=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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),ys=A(D("g",{fill:"none",stroke:"currentColor",children:[g("path",{d:"M6 8 L6 16 L18 16 L18 18 L22 12 L18 6 L18 8 L6 8 Z",strokeWidth:"1.5",fill:"none"}),g("path",{d:"M7 8.5 L7 15.5 L17 15.5 L17 17 L21 12 L17 7 L17 8.5 L7 8.5 Z",strokeWidth:"0.5",opacity:"0.3",fill:"none"})]}),H),ws=A(D("g",{fill:"none",stroke:"currentColor",children:[g("path",{d:"M8 8 L8 16 L4 12 L8 8 Z",fill:"none",strokeWidth:"1.5"}),g("path",{d:"M8 10 L16 10 M8 14 L16 14",fill:"none",strokeLinecap:"round",strokeWidth:"1.5"}),g("path",{d:"M16 8 L16 16 L20 12 L16 8 Z",strokeWidth:"1.5",fill:"none"})]}),H),rn=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),g("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),g("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),H),vs=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),g("line",{x1:"5",y1:"12",x2:"9",y2:"8"}),g("line",{x1:"5",y1:"12",x2:"9",y2:"16"}),g("line",{x1:"19",y1:"12",x2:"15",y2:"8"}),g("line",{x1:"19",y1:"12",x2:"15",y2:"16"})]}),H),co=A(g("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),re),cb=A(D("g",{strokeWidth:"1.25",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),g("path",{d:"M16 7h4"}),g("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),H),Nt=A(D("g",{strokeWidth:"1.25",children:[g("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"}),g("path",{d:"m11.25 5.417 3.333 3.333"})]}),re),Ts=A(D("g",{strokeWidth:1.25,stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(0,-2)",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M5 15l4 4l8-8l-4-4l-8 8z"}),g("path",{d:"M13 7l3 3"}),g("path",{d:"M4 16l3 3"})]}),re),Wo=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),g("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),g("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),g("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),g("polyline",{points:"5 20 11 4 13 4 20 20"})]}),H),db=A(D("g",{strokeWidth:"1.25",children:[g("path",{d:"M12.5 6.667h.01"}),g("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"}),g("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),g("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),re),xa=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M18 13.3l-6.3 -6.3"})]}),H),ep=A(g("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),re),tp=A(g("path",{d:"M5 10h10",strokeWidth:"1.25"}),re),mb=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M21 21l-6 -6"}),g("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"}),g("path",{d:"M3 4v4h4"})]}),H),Bt=A(g("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"}),re),pb=A(D("g",{strokeWidth:"1.5",children:[g("polyline",{points:"12 16 18 10 12 4"}),g("polyline",{points:"8 4 2 10 8 16"})]}),re),Ea=A(D("g",{strokeWidth:"1.25",children:[g("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"}),g("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"})]}),re),ya=A(g("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"}),re),wa=A(g("g",{stroke:"currentColor",strokeLinejoin:"round",children:g("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"})}),{...re,strokeWidth:1.5}),Is=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),g("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),g("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),H),nn=A(g("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"}),re),Gn=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("circle",{cx:"12",cy:"12",r:"9"}),g("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),g("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),H),ub=A(D("g",{strokeWidth:"1.25",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("circle",{cx:"12",cy:"12",r:"9"}),g("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),g("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),H),op=A(g("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"}),re),Cs=A(g("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"}),re),hb=A(D("g",{strokeWidth:"1.25",children:[g("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"}),g("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"})]}),re),gb=A(D("g",{strokeWidth:"1.25",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M4 4l11.733 16h4.267l-11.733 -16z"}),g("path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"})]}),H),fb=A(g("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),va=A(D("g",{strokeWidth:"1.25",children:[g("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"}),g("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"})]}),re),bb=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}),xb=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}),Un=A(g("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"}),re),hW=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}),Eb=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"),Ss=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z"}),g("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"}),g("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),yb=A(g("g",{strokeWidth:1.5,children:g("path",{d:"M6 18l12 -12"})}),H),ks=A(D("g",{strokeWidth:"1.25",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M15 8h.01"}),g("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),g("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),g("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),g("path",{d:"M19 16v6"}),g("path",{d:"M22 19l-3 3l-3 -3"})]}),H),wb=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}),gW=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}),fW=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}),vb=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"),bW=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"),rp=A(g("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"}),re),np=A(g("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"}),re),Tb=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}),Ib=A(g("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"}),re),xW=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"),EW=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}),yW=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M12 14v-11"}),g("path",{d:"M9 6l3 -3l3 3"})]}),H),wW=A(D(Ee,{children:[g("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"}),g("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}),vW=A(g("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}),Cb=D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M12 10l0 10"}),g("path",{d:"M12 10l4 4"}),g("path",{d:"M12 10l-4 4"}),g("path",{d:"M4 4l16 0"})]}),Sb=D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M12 5l0 14"}),g("path",{d:"M16 9l-4 -4"}),g("path",{d:"M8 9l4 -4"})]}),ip=A(Sb,H),ap=A(Sb,{...H,style:{transform:"rotate(180deg)"}}),lp=A(Cb,H),sp=A(Cb,{...H,style:{transform:"rotate(180deg)"}}),cp=A(D(Ee,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[g("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),g("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"})]}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),dp=A(D(Ee,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[g("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),g("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"})]}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),mp=A(D(Ee,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[g("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),g("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"})]}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),pp=A(D(Ee,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[g("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),g("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"})]}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),kb=A(D(Ee,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[g("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),g("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"})]}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),Mb=A(D(Ee,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[g("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),g("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"})]}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),up=A(D("g",{stroke:"currentColor",strokeWidth:"1.25",children:[g("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),g("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),g("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),g("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"})]}),re),hp=A(D("g",{stroke:"currentColor",strokeWidth:"1.25",children:[g("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),g("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),g("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),g("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"})]}),re),Ms=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("circle",{cx:"9",cy:"7",r:"4"}),g("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),g("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),g("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),H),TW=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"),IW=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"),Vt=A(D(Ee,{children:[g("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:g("path",{d:"M15 5 5 15M5 5l10 10"})}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),CW=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}),SW=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}),kW=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}),gp=nt.memo(({theme:e})=>A(D(Ee,{children:[g("path",{d:"M25 26H111V111H25",fill:so(e)}),g("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:so(e),strokeWidth:"2"}),g("path",{d:"M100 100H160V160H100",fill:so(e)}),g("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:so(e),strokeWidth:"2"}),D("g",{fill:tb(e),stroke:so(e),strokeWidth:"6",children:[g("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),g("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),g("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),g("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),fp=nt.memo(({theme:e})=>A(D(Ee,{children:[g("path",{d:"M25 26H111V111H25",fill:so(e)}),g("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:so(e),strokeWidth:"2"}),g("path",{d:"M100 100H160V160H100",fill:so(e)}),g("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:so(e),strokeWidth:"2"}),D("g",{fill:tb(e),stroke:so(e),strokeWidth:"6",children:[g("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),g("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),g("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),g("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),g("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),g("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),Lb=A(g("g",{strokeWidth:1.25,children:g("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"})}),re),Ls=A(D(Ee,{children:[g("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"}),g("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:g("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"})}),g("g",{mask:"url(#FillHachureIcon)",children:g("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"})})]}),re),Ps=A(D(Ee,{children:[D("g",{clipPath:"url(#a)",children:[g("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"}),g("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:g("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"})}),g("g",{mask:"url(#FillCrossHatchIcon)",children:g("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"})})]}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),As=A(D(Ee,{children:[g("g",{clipPath:"url(#a)",children:g("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"})}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),{...re,fill:"currentColor"}),Wn=A(g(Ee,{children:g("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),re),Ta=A(g("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),re),Ia=A(g("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),re),MW=nt.memo(({theme:e})=>A(g("path",{d:"M6 10H34",stroke:so(e),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})),Pb=A(D("g",{strokeWidth:"2",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M5 12h2"}),g("path",{d:"M17 12h2"}),g("path",{d:"M11 12h2"})]}),H),Ab=A(D("g",{strokeWidth:"2",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M4 12v.01"}),g("path",{d:"M8 12v.01"}),g("path",{d:"M12 12v.01"}),g("path",{d:"M16 12v.01"}),g("path",{d:"M20 12v.01"})]}),H),_b=A(g("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"}),re),Db=A(g("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"}),re),Rb=A(g("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"}),re),Nb=A(D("svg",{strokeWidth:"1.5",children:[g("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"}),g("path",{d:"M13.3333 3.33331V3.34331"}),g("path",{d:"M16.6667 3.33331V3.34331"}),g("path",{d:"M16.6667 6.66669V6.67669"}),g("path",{d:"M16.6667 10V10.01"}),g("path",{d:"M3.33334 13.3333V13.3433"}),g("path",{d:"M16.6667 13.3333V13.3433"}),g("path",{d:"M3.33334 16.6667V16.6767"}),g("path",{d:"M6.66666 16.6667V16.6767"}),g("path",{d:"M10 16.6667V16.6767"}),g("path",{d:"M13.3333 16.6667V16.6767"}),g("path",{d:"M16.6667 16.6667V16.6767"})]}),re),Bb=A(D("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),g("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),g("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),g("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),g("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),g("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),g("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),g("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),g("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),g("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),g("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),g("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),H),Fb=A(D("g",{stroke:"currentColor",opacity:.3,strokeWidth:2,children:[g("path",{d:"M12 12l9 0"}),g("path",{d:"M3 9l6 6"}),g("path",{d:"M3 15l6 -6"})]}),H),Ob=nt.memo(({flip:e=!1})=>A(D("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[g("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),g("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})),zb=nt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[g("path",{d:"M32 10L6 10",strokeWidth:2}),g("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),Hb=nt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[g("path",{d:"M26 10L6 10"}),g("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),Gb=nt.memo(({flip:e=!1})=>A(g("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",children:g("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})),Ub=nt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[g("path",{d:"M32 10L6 10",strokeWidth:2}),g("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})),Wb=nt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",children:[g("path",{d:"M6,9.5H27"}),g("path",{d:"M27,5L34,10L27,14Z",fill:"none"})]}),{width:40,height:20})),Yb=nt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[g("path",{d:"M6,9.5H20"}),g("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),Vb=nt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[g("path",{d:"M6,9.5H20"}),g("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),Xb=nt.memo(({flip:e=!1})=>A(g("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:g("path",{d:"M34,10 H6 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),Kb=nt.memo(({flip:e=!1})=>A(g("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:g("path",{d:"M34,10 H6 M15,10 L15,15 L15,5"})}),{width:40,height:20})),Zb=nt.memo(({flip:e=!1})=>A(g("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:g("path",{d:"M34,10 H6 M15,10 L15,16 L15,4 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),$b=A(D(Ee,{children:[g("g",{clipPath:"url(#a)",children:g("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"})}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),jb=A(D(Ee,{children:[g("g",{clipPath:"url(#a)",children:g("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),qb=A(D(Ee,{children:[g("g",{clipPath:"url(#a)",children:g("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),Jb=A(g(Ee,{children:g("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"})}),re),an=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M3 7v-2h13v2"}),g("path",{d:"M10 5v14"}),g("path",{d:"M12 19h-4"}),g("path",{d:"M15 13v-1h6v1"}),g("path",{d:"M18 12v7"}),g("path",{d:"M17 19h2"})]}),H),Qb=A(g(Ee,{children:D("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M7 12h10"}),g("path",{d:"M7 5v14"}),g("path",{d:"M17 5v14"}),g("path",{d:"M15 19h4"}),g("path",{d:"M15 5h4"}),g("path",{d:"M5 19h4"}),g("path",{d:"M5 5h4"})]})}),H),Ca=A(g(Ee,{children:g("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:g("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"})})}),re),_s=A(D(Ee,{children:[g("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:g("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"})}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),Ds=A(D("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),g("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),g("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),H),Rs=A(D("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),g("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),g("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),H),Ns=A(D("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),g("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),g("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),H),e0=nt.memo(({theme:e})=>A(D("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),g("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),H)),t0=nt.memo(({theme:e})=>A(D("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),g("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),H)),o0=nt.memo(({theme:e})=>A(D("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),g("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),g("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),H)),Bs=A(D("g",{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M21 19h-18l9 -15"}),g("path",{d:"M20.615 15.171h.015"}),g("path",{d:"M19.515 11.771h.015"}),g("path",{d:"M17.715 8.671h.015"}),g("path",{d:"M15.415 5.971h.015"})]}),H),r0=A(g("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}),LW=A(g("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"})),Fs=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),g("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),g("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),g("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),bp=A(D(Ee,{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),g("path",{d:"M7 11l5 5l5 -5"}),g("path",{d:"M12 4l0 12"})]}),H),Yn=A(D(Ee,{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("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),n0=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),g("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),g("path",{d:"M9.15 14.85l8.85 -10.85"}),g("path",{d:"M6 4l8.85 10.85"})]}),H),i0=A(D(Ee,{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),g("path",{d:"M12 17l0 .01"}),g("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),H),PW=A(D(Ee,{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M7 4v16l13 -8z"})]}),H),AW=A(D(Ee,{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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),a0=A(D(Ee,{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M5 12l5 5l10 -10"})]}),H),l0=A(D(Ee,{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M12 9v4"}),g("path",{d:"M12 17h.01"})]}),H),s0=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M11 7l6 6"}),g("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),c0=A(D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M12 3l-4 7h8z"}),g("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),g("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),Vn=A(D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M4 7l16 0"}),g("path",{d:"M4 17l16 0"}),g("path",{d:"M7 4l0 16"}),g("path",{d:"M17 4l0 16"})]}),H),d0=A(g("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"})),Xn=A(D("g",{strokeWidth:"1.25",children:[g("path",{d:"M4.16602 10H15.8327"}),g("path",{d:"M12.5 13.3333L15.8333 10"}),g("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),re),m0=A(D("g",{strokeWidth:1.5,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[g("path",{d:"M5 12h10"}),g("path",{d:"M11 8l4 4l-4 4"})]}),H),p0=A(D("g",{strokeWidth:1.5,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[g("path",{d:"M5 12h14"}),g("path",{d:"M9 8l-4 4l4 4"}),g("path",{d:"M15 8l4 4l-4 4"})]}),H),Yo=A(D("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[g("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"}),g("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),u0=A(D("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[g("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"}),g("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"}),g("circle",{cx:"3",cy:"16",r:"0.8",fill:"currentColor",opacity:"0.7"}),g("circle",{cx:"5",cy:"18",r:"0.6",fill:"currentColor",opacity:"0.5"}),g("circle",{cx:"7.5",cy:"17",r:"0.8",fill:"currentColor",opacity:"0.6"}),g("circle",{cx:"10",cy:"19",r:"0.4",fill:"currentColor",opacity:"0.3"})]}),20),h0=A(D("g",{stroke:"currentColor",fill:"none",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z"}),g("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),g("path",{d:"M15 6l3 3"}),g("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"}),g("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),_W=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z"}),g("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),g("path",{d:"M15 6l3 3"}),g("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"}),g("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),DW=A(D("g",{stroke:"currentColor",fill:"none",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35"}),g("path",{d:"M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946"}),g("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"}),g("path",{d:"M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45"}),g("path",{d:"M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946"}),g("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),g0=A(D("g",{stroke:"currentColor",fill:"none",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),g("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),g("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),g("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"})]}),H),Kn=A(D("g",{stroke:"currentColor",fill:"none",strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"}),g("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),f0=A(D("g",{stroke:"currentColor",fill:"none",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"}),g("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"}),g("path",{d:"M3 3l18 18"})]}),H),b0=A(D("g",{stroke:"currentColor",fill:"none",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("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"}),g("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),g("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),g("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),g("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),H),x0=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("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"}),g("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),g("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),g("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),g("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),H),Ft=A(D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),g("path",{d:"M21 21l-6 -6"})]}),H),E0=A(D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M20.984 12.53a9 9 0 1 0 -7.552 8.355"}),g("path",{d:"M12 7v5l3 3"}),g("path",{d:"M19 16l-2 3h4l-2 3"})]}),H),y0=A(D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M5 10a7 7 0 0 0 14 0"}),g("path",{d:"M8 21l8 0"}),g("path",{d:"M12 17l0 4"})]}),H),w0=A(D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M3 3l18 18"}),g("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"}),g("path",{d:"M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85"}),g("path",{d:"M8 21l8 0"}),g("path",{d:"M12 17l0 4"})]}),H),Sa=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"})]}),H),v0=A(D("g",{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M12 20v.01"}),g("path",{d:"M16 20v.01"}),g("path",{d:"M8 20v.01"}),g("path",{d:"M4 20v.01"}),g("path",{d:"M4 16v.01"}),g("path",{d:"M4 12v.01"}),g("path",{d:"M4 8v.01"}),g("path",{d:"M4 4v.01"}),g("path",{d:"M8 4v.01"}),g("path",{d:"M12 4v.01"}),g("path",{d:"M16 4v.01"}),g("path",{d:"M20 4v.01"}),g("path",{d:"M20 8v.01"}),g("path",{d:"M20 12v.01"}),g("path",{d:"M20 16v.01"}),g("path",{d:"M20 20v.01"})]}),H),T0=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M5 3v18"}),g("path",{d:"M19 21v-18"}),g("path",{d:"M5 7h14"}),g("path",{d:"M5 15h14"}),g("path",{d:"M8 13v4"}),g("path",{d:"M11 13v4"}),g("path",{d:"M16 13v4"}),g("path",{d:"M14 5v4"}),g("path",{d:"M11 5v4"}),g("path",{d:"M8 5v4"}),g("path",{d:"M3 21h18"})]}),H),I0=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M3 12l18 0"}),g("path",{d:"M7 16l10 0l-10 5l0 -5"}),g("path",{d:"M7 8l10 0l-10 -5l0 5"})]}),H),C0=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M12 3l0 18"}),g("path",{d:"M16 7l0 10l5 0l-5 -10"}),g("path",{d:"M8 7l0 10l-5 0l5 -10"})]}),H),xp=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"}),g("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),Os=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"}),g("path",{d:"M22 22l-3 -3"}),g("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),g("path",{d:"M3 11v-1"}),g("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),g("path",{d:"M10 3h1"}),g("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"})]}),H),S0=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),g("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),g("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"}),g("path",{d:"M10 15l2 6l2 -6"}),g("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"})]}),H),k0=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),g("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),g("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"}),g("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"}),g("path",{d:"M11 21v-6l3 6v-6"})]}),H),M0=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M4 8l5 0"}),g("path",{d:"M15 8l4 0"})]}),H),L0=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),g("path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),g("path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z"}),g("path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555"})]}),H),P0=A(D("g",{stroke:"currentColor",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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}),RW=A(D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M21 12h-13l3 -3"}),g("path",{d:"M11 15l-3 -3"})]}),H),A0=A(D("g",{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M10 9l5 3l-5 3z"})]}),H),_0=A(D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M3 6h18"}),g("path",{d:"M3 12h18"}),g("path",{d:"M3 18h18"}),g("path",{d:"M6 3v18"}),g("path",{d:"M12 3v18"}),g("path",{d:"M18 3v18"})]}),H),D0=A(D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("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"}),g("path",{d:"M17 5c-6.627 0 -12 5.373 -12 12"})]}),H),zs=A(D("g",{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M6 18l12 -12"}),g("path",{d:"M18 10v-4h-4"})]}),H),Hs=A(D("g",{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M4,19L10,19C11.097,19 12,18.097 12,17L12,9C12,7.903 12.903,7 14,7L21,7"}),g("path",{d:"M18 4l3 3l-3 3"})]}),H),Gs=A(D("g",{children:[g("path",{d:"M16,12L20,9L16,6"}),g("path",{d:"M6 20c0 -6.075 4.925 -11 11 -11h3"})]}),H),Us=A(D("g",{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M6 9l6 6l6 -6"})]}),H),R0=A(D("g",{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M6 15l6 -6l6 6"})]}),H),N0=A(D("g",{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M6 15l6 -6l6 6"})]}),H),Ep=A(D("g",{strokeWidth:"1.25",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"}),g("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"})]}),H),Ws=A(D("g",{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M5 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),g("path",{d:"M19 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),g("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),g("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),g("path",{d:"M5 7l0 10"}),g("path",{d:"M7 5l10 0"}),g("path",{d:"M7 19l10 0"}),g("path",{d:"M19 7l0 10"})]}),H);import B0 from"clsx";import wp,{useEffect as JC,useRef as F0,useState as QC}from"react";import{isPromiseLike as eS}from"@haoxin-web/excalidraw-common";import jC from"react";import{jsx as yp}from"react/jsx-runtime";var qC=({size:e="1em",circleWidth:o=8,synchronized:t=!1,className:r=""})=>{let i=-(jC.useRef(Date.now()).current%1600);return yp("div",{className:`Spinner ${r}`,children:yp("svg",{viewBox:"0 0 100 100",style:{width:e,height:e,"--spinner-delay":t?`${i}ms`:0},children:yp("circle",{cx:"50",cy:"50",r:50-o/2,strokeWidth:o,fill:"none",strokeMiterlimit:"10"})})})},it=qC;import{jsx as ka,jsxs as Ma}from"react/jsx-runtime";var z=wp.forwardRef(({size:e="medium",visible:o=!0,className:t="",...r},n)=>{let{id:i}=Xe(),a=wp.useRef(null);wp.useImperativeHandle(n,()=>a.current);let l=`ToolIcon_size_${e}`,[s,m]=QC(!1),c=F0(!0),d=async u=>{let f="onClick"in r&&r.onClick?.(u);if(eS(f))try{m(!0),await f}catch(b){if(b instanceof Dn)console.warn(b);else throw b}finally{c.current&&m(!1)}};JC(()=>(c.current=!0,()=>{c.current=!1}),[]);let p=F0(null);if(r.type==="button"||r.type==="icon"||r.type==="submit"){let u=r.type==="icon"?"button":r.type;return Ma("button",{className:B0("ToolIcon_type_button",l,t,o&&!r.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!r.hidden,"ToolIcon--selected":r.selected,"ToolIcon--plain":r.type==="icon"}),style:r.style,"data-testid":r["data-testid"],hidden:r.hidden,title:r.title,"aria-label":r["aria-label"],type:u,onClick:d,ref:a,disabled:s||r.isLoading||!!r.disabled,children:[(r.icon||r.label)&&Ma("div",{className:"ToolIcon__icon","aria-hidden":"true","aria-disabled":!!r.disabled,children:[r.icon||r.label,r.keyBindingLabel&&ka("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel}),r.isLoading&&ka(it,{})]}),r.showAriaLabel&&Ma("div",{className:"ToolIcon__label",children:[r["aria-label"]," ",s&&ka(it,{})]}),r.children]})}return Ma("label",{className:B0("ToolIcon",t),title:r.title,onPointerDown:u=>{p.current=u.pointerType||null,r.onPointerDown?.({pointerType:u.pointerType||null})},onPointerUp:()=>{requestAnimationFrame(()=>{p.current=null})},children:[ka("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}),Ma("div",{className:"ToolIcon__icon",children:[r.icon,r.keyBindingLabel&&ka("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel})]})]})});z.displayName="ToolButton";var Ys=[],F=e=>(Ys=Ys.concat(e),e);import{jsx as sS}from"react/jsx-runtime";var lS=(e,o,t)=>{let r=new Set(J(e.filter(c=>nS(c)),o).map(c=>c.id)),n={},i=t.scene.getNonDeletedElementsMap(),a=new Set;for(let c of r){let d=iS(e,c);for(let p of d)if(!a.has(p.id)){if(Vs(p)){let u=z0(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 d=Vs(c)?z0(c,i):null;return c.frameId&&r.has(c.frameId)?(l=!1,n[c.id]=!0,c):d?.frameId&&r.has(d?.frameId)?c:(c.boundElements&&c.boundElements.forEach(p=>{let u=t.scene.getNonDeletedElementsMap().get(p.id);u&&rS(u)&&t.scene.mutateElement(u,{startBinding:c.id===u.startBinding?.elementId?null:u.startBinding,endBinding:c.id===u.endBinding?.elementId?null:u.endBinding})}),Ks(c,{isDeleted:!0}))}return c.frameId&&r.has(c.frameId)?(l=!1,Vs(c)||(n[c.id]=!0),Ks(c,{frameId:null})):Vs(c)&&o.selectedElementIds[c.containerId]?Ks(c,{isDeleted:!0}):c}),m=o.editingGroupId;if(l&&o.editingGroupId){let c=Ip(s,o.editingGroupId).filter(d=>!d.isDeleted);if(c.length>1)c[0]&&(n[c[0].id]=!0);else{m=null,c[0]&&(n[c[0].id]=!0);let d=c[0];if(d){let p=d.groupIds.findIndex(f=>f===o.editingGroupId),u=d.groupIds[p+1];if(u){let f=Ip(s,u).filter(b=>!b.isDeleted);f.length>1&&(m=u,f.forEach(b=>{n[b.id]=!0}))}}}}return{elements:s,appState:{...o,...aS({selectedElementIds:n,editingGroupId:m},s,o,null)}}},H0=(e,o)=>{if(e.editingGroupId){let t=Ip(Tp(o),e.editingGroupId);if(t.length)return{...e,selectedElementIds:{[t[0].id]:!0}}}return e},La=F({name:"deleteSelectedElements",label:"labels.delete",icon:Bt,trackEvent:{category:"element",action:"delete"},perform:(e,o,t,r)=>{if(o.selectedLinearElement?.isEditing){let{elementId:a,selectedPointsIndices:l,startBindingElement:s,endBindingElement:m}=o.selectedLinearElement,c=r.scene.getNonDeletedElementsMap(),d=O0.getElement(a,c);if(!d||l==null)return!1;if(l.length>=d.points.length){let u=e.map(b=>b.id===d.id?Ks(b,{isDeleted:!0}):b),f=H0(o,u);return{elements:u,appState:{...f,selectedLinearElement:null},captureUpdate:Xs.IMMEDIATELY}}let p={startBindingElement:l?.includes(0)?null:s,endBindingElement:l?.includes(d.points.length-1)?null:m};return O0.deletePoints(d,r,l),{elements:e,appState:{...o,selectedLinearElement:{...o.selectedLinearElement,...p,selectedPointsIndices:l?.[0]>0?[l[0]-1]:[0]}},captureUpdate:Xs.IMMEDIATELY}}let{elements:n,appState:i}=lS(e,o,r);return oS(n,n.filter(a=>a.isDeleted)),i=H0(i,n),{elements:n,appState:{...i,activeTool:tS(o,{type:r.defaultSelectionTool}),multiElement:null,activeEmbeddable:null,selectedLinearElement:null},captureUpdate:we(Tp(e),o)?Xs.IMMEDIATELY:Xs.EVENTUALLY}},keyTest:(e,o,t)=>(e.key===vp.BACKSPACE||e.key===vp.DELETE)&&!e[vp.CTRL_OR_CMD],PanelComponent:({elements:e,appState:o,updateData:t})=>sS(z,{type:"button",icon:Bt,title:h("labels.delete"),"aria-label":h("labels.delete"),onClick:()=>t(null),visible:we(Tp(e),o)})});import{KEYS as Zn,CODES as $n,getShortcutKey as jn,isDarwin as Zs}from"@haoxin-web/excalidraw-common";import{moveOneLeft as cS,moveOneRight as dS,moveAllLeft as mS,moveAllRight as pS}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as $s}from"@haoxin-web/excalidraw-element";import{jsx as js}from"react/jsx-runtime";var Cp=F({name:"sendBackward",label:"labels.sendBackward",keywords:["move down","zindex","layer"],icon:ap,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:cS(e,o,r.scene),appState:o,captureUpdate:$s.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[Zn.CTRL_OR_CMD]&&!e.shiftKey&&e.code===$n.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>js("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${h("labels.sendBackward")} \u2014 ${jn("CtrlOrCmd+[")}`,children:ap})}),Sp=F({name:"bringForward",label:"labels.bringForward",keywords:["move up","zindex","layer"],icon:ip,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:dS(e,o,r.scene),appState:o,captureUpdate:$s.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[Zn.CTRL_OR_CMD]&&!e.shiftKey&&e.code===$n.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>js("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${h("labels.bringForward")} \u2014 ${jn("CtrlOrCmd+]")}`,children:ip})}),kp=F({name:"sendToBack",label:"labels.sendToBack",keywords:["move down","zindex","layer"],icon:sp,trackEvent:{category:"element"},perform:(e,o)=>({elements:mS(e,o),appState:o,captureUpdate:$s.IMMEDIATELY}),keyTest:e=>Zs?e[Zn.CTRL_OR_CMD]&&e.altKey&&e.code===$n.BRACKET_LEFT:e[Zn.CTRL_OR_CMD]&&e.shiftKey&&e.code===$n.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>js("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${h("labels.sendToBack")} \u2014 ${Zs?jn("CtrlOrCmd+Alt+["):jn("CtrlOrCmd+Shift+[")}`,children:sp})}),Mp=F({name:"bringToFront",label:"labels.bringToFront",keywords:["move up","zindex","layer"],icon:lp,trackEvent:{category:"element"},perform:(e,o)=>({elements:pS(e,o),appState:o,captureUpdate:$s.IMMEDIATELY}),keyTest:e=>Zs?e[Zn.CTRL_OR_CMD]&&e.altKey&&e.code===$n.BRACKET_RIGHT:e[Zn.CTRL_OR_CMD]&&e.shiftKey&&e.code===$n.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>js("button",{type:"button",className:"zIndexButton",onClick:t=>e(null),title:`${h("labels.bringToFront")} \u2014 ${Zs?jn("CtrlOrCmd+Alt+]"):jn("CtrlOrCmd+Shift+]")}`,children:lp})});import{getNonDeletedElements as uS}from"@haoxin-web/excalidraw-element";import{LinearElementEditor as hS}from"@haoxin-web/excalidraw-element";import{isLinearElement as gS,isTextElement as fS}from"@haoxin-web/excalidraw-element";import{arrayToMap as bS,KEYS as G0}from"@haoxin-web/excalidraw-common";import{selectGroupsForSelectedElements as xS}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as ES}from"@haoxin-web/excalidraw-element";var Lp=F({name:"selectAll",label:"labels.selectAll",icon:v0,trackEvent:{category:"canvas"},viewMode:!1,perform:(e,o,t,r)=>{if(o.selectedLinearElement?.isEditing)return!1;let n=e.filter(i=>!i.isDeleted&&!(fS(i)&&i.containerId)&&!i.locked).reduce((i,a)=>(i[a.id]=!0,i),{});return{appState:{...o,...xS({editingGroupId:null,selectedElementIds:n},uS(e),o,r),selectedLinearElement:Object.keys(n).length===1&&gS(e[0])?new hS(e[0],bS(e)):null},captureUpdate:ES.IMMEDIATELY}},keyTest:e=>e[G0.CTRL_OR_CMD]&&e.key===G0.A});import{DEFAULT_GRID_SIZE as U0,KEYS as W0,arrayToMap as Y0,getShortcutKey as yS}from"@haoxin-web/excalidraw-common";import{getNonDeletedElements as V0}from"@haoxin-web/excalidraw-element";import{LinearElementEditor as wS}from"@haoxin-web/excalidraw-element";import{getSelectedElements as vS,getSelectionStateForElements as TS}from"@haoxin-web/excalidraw-element";import{syncMovedIndices as IS}from"@haoxin-web/excalidraw-element";import{duplicateElements as CS}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as X0}from"@haoxin-web/excalidraw-element";import{jsx as SS}from"react/jsx-runtime";var Pp=F({name:"duplicateSelection",label:"labels.duplicateSelection",icon:Ea,trackEvent:{category:"element"},perform:(e,o,t,r)=>{if(o.selectedElementsAreBeingDragged)return!1;if(o.selectedLinearElement?.isEditing)try{let a=wS.duplicateSelectedPoints(o,r.scene);return{elements:e,appState:a,captureUpdate:X0.IMMEDIATELY}}catch{return!1}let{duplicatedElements:n,elementsWithDuplicates:i}=CS({type:"in-place",elements:e,idsOfElementsToDuplicate:Y0(vS(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+U0/2,y:a.y+U0/2,frameId:s??a.frameId}}});if(r.props.onDuplicate&&i){let a=r.props.onDuplicate(i,e);a&&(i=a)}return{elements:IS(i,Y0(n)),appState:{...o,...TS(n,V0(i),o)},captureUpdate:X0.IMMEDIATELY}},keyTest:e=>e[W0.CTRL_OR_CMD]&&e.key===W0.D,PanelComponent:({elements:e,appState:o,updateData:t})=>SS(z,{type:"button",icon:Ea,title:`${h("labels.duplicateSelection")} \u2014 ${yS("CtrlOrCmd+D")}`,"aria-label":h("labels.duplicateSelection"),onClick:()=>t(null),visible:we(V0(e),o)})});import{pointFrom as kk}from"@haoxin-web/excalidraw-math";import{useEffect as Jp,useMemo as Mk,useRef as Qp,useState as Lk}from"react";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE as Pk,DEFAULT_ELEMENT_BACKGROUND_PICKS as Ak,DEFAULT_ELEMENT_STROKE_COLOR_PALETTE as _k,DEFAULT_ELEMENT_STROKE_PICKS as Dk,ARROW_TYPE as Xo,DEFAULT_FONT_FAMILY as Rk,DEFAULT_FONT_SIZE as Nk,FONT_FAMILY as Bk,ROUNDNESS as uc,STROKE_WIDTH as eu,VERTICAL_ALIGN as pc,KEYS as li,randomInteger as Fk,arrayToMap as ru,getFontFamilyString as Ok,getShortcutKey as zk,getLineHeight as Hk,isTransparent as Gk,reduceToCommonValue as Uk}from"@haoxin-web/excalidraw-common";import{canBecomePolygon as Wk,getNonDeletedElements as Dx}from"@haoxin-web/excalidraw-element";import{bindLinearElement as Lx,calculateFixedPointForElbowArrowBinding as Px,updateBoundElements as Yk}from"@haoxin-web/excalidraw-element";import{LinearElementEditor as tu}from"@haoxin-web/excalidraw-element";import{newElementWith as Qe}from"@haoxin-web/excalidraw-element";import{getBoundTextElement as Cr,redrawTextBoundingBox as Oa}from"@haoxin-web/excalidraw-element";import{isArrowElement as hc,isBoundToContainer as Vk,isElbowArrow as Rx,isLinearElement as ou,isLineElement as Ax,isTextElement as kt,isUsingAdaptiveRadius as Xk}from"@haoxin-web/excalidraw-element";import{hasStrokeColor as Kk}from"@haoxin-web/excalidraw-element";import{updateElbowArrowPoints as Zk,CaptureUpdateAction as et,toggleLinePolygonState as $k}from"@haoxin-web/excalidraw-element";import{isDevEnv as kS}from"@haoxin-web/excalidraw-common";var MS=new Set(["command_palette","export"]),ae=(e,o,t,r)=>{try{if(typeof window>"u"||T.VITE_WORKER_ID||T.VITE_APP_ENABLE_TRACKING!=="true"||!MS.has(e)||kS())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 _S from"clsx";import LS from"clsx";import{forwardRef as PS}from"react";import{jsx as AS}from"react/jsx-runtime";var qn=PS((e,o)=>{let{title:t,className:r,testId:n,active:i,standalone:a,icon:l,onClick:s}=e;return AS("button",{type:"button",ref:o,title:t,"data-testid":n,className:LS(r,{standalone:a,active:i}),onClick:s,style:e.style,children:l},t)});import{Fragment as RS,jsx as Ap,jsxs as DS}from"react/jsx-runtime";var Xt=e=>Ap(RS,{children:e.options.map(o=>e.type==="button"?Ap(qn,{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):DS("label",{className:_S({active:e.value===o.value}),title:o.text,children:[Ap("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 rc from"@radix-ui/react-popover";import D6 from"clsx";import{useRef as R6}from"react";import{COLOR_OUTLINE_CONTRAST_THRESHOLD as N6,COLOR_PALETTE as mx,isTransparent as B6}from"@haoxin-web/excalidraw-common";import{jsx as NS}from"react/jsx-runtime";var qs=()=>NS("div",{style:{width:1,height:"1rem",backgroundColor:"var(--default-border-color)",margin:"0 auto"}});import{useEffect as HS,useRef as GS}from"react";import{createPortal as US}from"react-dom";import{EVENT as xr,KEYS as WS,rgbToHex as YS}from"@haoxin-web/excalidraw-common";import K0 from"react";var _p=K0.createContext(null),xe=()=>K0.useContext(_p);import{useState as BS,useLayoutEffect as Z0}from"react";import{THEME as FS}from"@haoxin-web/excalidraw-common";var Js=e=>{let[o,t]=BS(null),r=pe(),{theme:n}=xe(),{container:i}=Xe();return Z0(()=>{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===FS.DARK))},[o,n,r.editor.isMobile,e?.className]),Z0(()=>{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 OS}from"react";import{EVENT as Qs}from"@haoxin-web/excalidraw-common";function Jn(e,o,t){OS(()=>{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(Qs.POINTER_DOWN,r),document.addEventListener(Qs.TOUCH_START,r),()=>{document.removeEventListener(Qs.POINTER_DOWN,r),document.removeEventListener(Qs.TOUCH_START,r)}},[e,o,t])}import{useRef as zS}from"react";var br=e=>{let o=zS(e);return Object.assign(o.current,e),o.current};import{jsx as VS}from"react/jsx-runtime";var Er=he(null),$0=({onCancel:e,onChange:o,onSelect:t,colorPickerType:r})=>{let n=Js({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),i=xe(),a=yr(),l=Oe(),s=J(a,i),m=br({app:l,onCancel:e,onChange:o,onSelect:t,selectedElements:s}),{container:c}=Xe();HS(()=>{let p=d.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 YS(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&&m.onChange(r,R,m.selectedElements,{altKey:M}),p.style.background=R},w=()=>{m.onCancel()},E=(S,P)=>{m.onSelect(S,P)},y=S=>{u=!0,S.stopImmediatePropagation()},v=S=>{u=!1,c?.focus(),S.stopImmediatePropagation(),S.preventDefault(),E(b(S),S)},C=S=>{S.key===WS.ESCAPE&&(S.preventDefault(),S.stopImmediatePropagation(),w())};return n.tabIndex=-1,n.focus(),x({clientX:m.app.lastViewportPosition.x,clientY:m.app.lastViewportPosition.y,altKey:!1}),n.addEventListener(xr.KEYDOWN,C),n.addEventListener(xr.POINTER_DOWN,y),n.addEventListener(xr.POINTER_UP,v),window.addEventListener("pointermove",x,{passive:!0}),window.addEventListener(xr.BLUR,w),()=>{u=!1,n.removeEventListener(xr.KEYDOWN,C),n.removeEventListener(xr.POINTER_DOWN,y),n.removeEventListener(xr.POINTER_UP,v),window.removeEventListener("pointermove",x),window.removeEventListener(xr.BLUR,w)}},[m,l.canvas,n,r,c,i.offsetLeft,i.offsetTop]);let d=GS(null);return Jn(d,()=>{e()},p=>!!p.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")),n?US(VS("div",{ref:d,className:"excalidraw-eye-dropper-preview"}),n):null};import*as Qn from"@radix-ui/react-popover";import $S from"clsx";import jS from"react";import{isInteractive as qS}from"@haoxin-web/excalidraw-common";import XS from"react";import KS from"clsx";import{jsx as ZS}from"react/jsx-runtime";var De=XS.forwardRef(({children:e,padding:o,className:t,style:r},n)=>ZS("div",{className:KS("Island",t),style:{"--padding":o,...r},ref:n,children:e}));import{jsx as Dp,jsxs as JS}from"react/jsx-runtime";var ec=jS.forwardRef(({className:e,container:o,children:t,style:r,onClose:n,onKeyDown:i,onFocusOutside:a,onPointerLeave:l,onPointerDownOutside:s},m)=>{let c=pe();return Dp(Qn.Portal,{container:o,children:JS(Qn.Content,{ref:m,className:$S("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:d=>{d.stopPropagation(),d.preventDefault(),o&&!qS(document.activeElement)&&o.focus(),n()},children:[Dp(De,{padding:3,style:r,children:t}),Dp(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 e6 from"clsx";import{useCallback as t6,useEffect as Np,useRef as J0,useState as o6}from"react";import{KEYS as Bp,getShortcutKey as r6}from"@haoxin-web/excalidraw-common";import{MAX_CUSTOM_COLORS_USED_IN_CANVAS as QS}from"@haoxin-web/excalidraw-common";var wr=({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},Pa=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),Rp=({color:e,palette:o})=>!Object.values(o).flat().includes(e),q0=(e,o,t)=>{let r={elementBackground:"backgroundColor",elementStroke:"strokeColor"},n=e.filter(a=>{if(a.isDeleted)return!1;let l=a[r[o]];return Rp({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,QS)},Kt=he(null),j0=(e,o,t)=>(e*299+o*587+t*114)/1e3,ei=(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]),m=parseInt(l[1]),c=parseInt(l[2]);return j0(s,m,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 j0(t,r,n)<o};import{Fragment as n6,jsx as tc,jsxs as Q0}from"react/jsx-runtime";var ex=({color:e,onChange:o,label:t,colorPickerType:r,placeholder:n})=>{let i=pe(),[a,l]=o6(e),[s,m]=ce(Kt);Np(()=>{l(e)},[e]);let c=t6(b=>{let x=b.toLowerCase(),w=tx(x);w&&o(w),l(x)},[o]),d=J0(null),p=J0(null);Np(()=>{d.current&&d.current.focus()},[s]);let[u,f]=ce(Er);return Np(()=>()=>{f(null)},[f]),Q0("div",{className:"color-picker__input-label",children:[tc("div",{className:"color-picker__input-hash",children:"#"}),tc("input",{ref:s==="hex"?d: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:()=>m("hex"),onKeyDown:b=>{b.key!==Bp.TAB&&(b.key===Bp.ESCAPE&&p.current?.focus(),b.stopPropagation())},placeholder:n}),!i.editor.isMobile&&Q0(n6,{children:[tc("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),tc("div",{ref:p,className:e6("excalidraw-eye-dropper-trigger",{selected:u}),onClick:()=>f(b=>b?null:{keepOpenOnAlt:!1,onSelect:x=>o(x),colorPickerType:r}),title:`${h("labels.eyeDropper")} \u2014 ${Bp.I.toLocaleUpperCase()} or ${r6("Alt")} `,children:s0})]})]})};import Hp,{useEffect as Gp,useImperativeHandle as T6,useState as I6}from"react";import{EVENT as lx}from"@haoxin-web/excalidraw-common";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX as C6,DEFAULT_ELEMENT_STROKE_COLOR_INDEX as S6,KEYS as k6}from"@haoxin-web/excalidraw-common";import l6 from"clsx";import{useEffect as s6,useRef as c6}from"react";import{jsxs as a6}from"react/jsx-runtime";var i6=({color:e,keyLabel:o,isShade:t=!1})=>a6("div",{className:"color-picker__button__hotkey-label",style:{color:ei(e)?"#fff":"#000"},children:[t&&"\u21E7",o]}),ti=i6;import{jsx as Fp,jsxs as d6}from"react/jsx-runtime";var ox=({colors:e,color:o,onChange:t,label:r})=>{let[n,i]=ce(Kt),a=c6(null);return s6(()=>{a.current&&a.current.focus()},[o,n]),Fp("div",{className:"color-picker-content--default",children:e.map((l,s)=>d6("button",{ref:o===l?a:void 0,tabIndex:-1,type:"button",className:l6("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:[Fp("div",{className:"color-picker__button-outline"}),Fp(ti,{color:l,keyLabel:s+1})]},s))})};import m6 from"clsx";import{useEffect as p6,useRef as u6}from"react";import{jsx as Op,jsxs as g6}from"react/jsx-runtime";var h6=({palette:e,color:o,onChange:t,activeShade:r})=>{let n=wr({color:o,palette:e}),[i,a]=ce(Kt),l=u6(null);return p6(()=>{l.current&&i==="baseColors"&&l.current.focus()},[n?.colorName,i]),Op("div",{className:"color-picker-content--default",children:Object.entries(e).map(([s,m],c)=>{let d=(Array.isArray(m)?m[r]:m)||"transparent",p=Pa[c],u=h(`colors.${s.replace(/\d+/,"")}`,null,"");return g6("button",{ref:n?.colorName===s?l:void 0,tabIndex:-1,type:"button",className:m6("color-picker__button color-picker__button--large has-outline",{active:n?.colorName===s,"is-transparent":d==="transparent"||!d}),onClick:()=>{t(d),a("baseColors")},title:`${u}${d.startsWith("#")?` ${d}`:""} \u2014 ${p}`,"aria-label":`${u} \u2014 ${p}`,style:d?{"--swatch-color":d}:void 0,"data-testid":`color-${s}`,children:[Op("div",{className:"color-picker__button-outline"}),Op(ti,{color:d,keyLabel:p})]},s)})})},rx=h6;import{jsx as b6}from"react/jsx-runtime";var f6=({children:e})=>b6("div",{className:"color-picker__heading",children:e}),oi=f6;import x6 from"clsx";import{useEffect as E6,useRef as y6}from"react";import{jsx as Aa,jsxs as nx}from"react/jsx-runtime";var ix=({color:e,onChange:o,palette:t})=>{let r=wr({color:e||"transparent",palette:t}),[n,i]=ce(Kt),a=y6(null);if(E6(()=>{a.current&&n==="shades"&&a.current.focus()},[r,n]),r){let{colorName:l,shade:s}=r,m=t[l];if(Array.isArray(m))return Aa("div",{className:"color-picker-content--default shades",children:m.map((c,d)=>nx("button",{ref:d===s&&n==="shades"?a:void 0,tabIndex:-1,type:"button",className:x6("color-picker__button color-picker__button--large has-outline",{active:d===s}),"aria-label":"Shade",title:`${l} - ${d+1}`,style:c?{"--swatch-color":c}:void 0,onClick:()=>{o(c),i("shades")},children:[Aa("div",{className:"color-picker__button-outline"}),Aa(ti,{color:c,keyLabel:d+1,isShade:!0})]},d))})}return nx("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[Aa("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),Aa("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:h("colorPicker.noShades")})]})};import{COLORS_PER_ROW as ri,COLOR_PALETTE as w6,KEYS as _a}from"@haoxin-web/excalidraw-common";var zp=(e,o,t)=>{let r=Math.ceil(t/ri);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+ri;return n>=t?o%ri:n}case"ArrowUp":{let n=o-ri,i=n<0?ri*r+n:n;return i>=t?void 0:i}}},v6=({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(Pa.includes(e.key)){let l=Pa.indexOf(e.key),s=Object.keys(r)[l],m=r[s],c=Array.isArray(m)?m[a]:m;return t(c),i("baseColors"),!0}return!1},ax=({event:e,activeColorPickerSection:o,palette:t,color:r,onChange:n,customColors:i,setActiveColorPickerSection:a,updateData:l,activeShade:s,onEyeDropperToggle:m,onEscape:c})=>{if(e[_a.CTRL_OR_CMD])return!1;if(e.key===_a.ESCAPE)return c(e),!0;if(e.key===_a.ALT)return m(!0),!0;if(e.key===_a.I)return m(),!0;let d=wr({color:r,palette:t});if(e.key===_a.TAB){let p={custom:!!i.length,baseColors:!0,shades:d?.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(w6.black)),e.preventDefault(),e.stopPropagation(),!0}if(v6({e,colorObj:d,onChange:n,palette:t,customColors:i,setActiveColorPickerSection:a,activeShade:s}))return!0;if(o==="shades"&&d){let{shade:p}=d,u=zp(e.key,p,ri);if(u!==void 0)return n(t[d.colorName][u]),!0}if(o==="baseColors"&&d){let{colorName:p}=d,u=Object.keys(t),f=u.indexOf(p),b=zp(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=zp(e.key,p,i.length);if(u!==void 0){let f=i[u];return n(f),!0}}return!1};import{jsx as ln,jsxs as oc}from"react/jsx-runtime";var sx=Hp.forwardRef(({color:e,onChange:o,type:t,elements:r,palette:n,updateData:i,children:a,onEyeDropperToggle:l,onEscape:s},m)=>{let[c]=Hp.useState(()=>t==="canvasBackground"?[]:q0(r,t,n)),[d,p]=ce(Kt),u=wr({color:e,palette:n});Gp(()=>{if(!d){let w=!!e&&Rp({color:e,palette:n}),E=w&&!c.includes(e);p(E?null:w?"custom":u?.shade!=null?"shades":"baseColors")}},[d,e,n,p,u,c]);let[f,b]=I6(u?.shade??(t==="elementBackground"?C6:S6));Gp(()=>{u?.shade!=null&&b(u.shade);let w=E=>{E.key===k6.ALT&&l(!1)};return document.addEventListener(lx.KEYUP,w,{capture:!0}),()=>{document.removeEventListener(lx.KEYUP,w,{capture:!0})}},[u,l]);let x=Hp.useRef(null);return T6(m,()=>x.current),Gp(()=>{x?.current?.focus()},[]),ln("div",{role:"dialog","aria-modal":"true","aria-label":h("labels.colorPicker"),children:oc("div",{ref:x,onKeyDown:w=>{ax({event:w,activeColorPickerSection:d,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&&oc("div",{children:[ln(oi,{children:h("colorPicker.mostUsedCustomColors")}),ln(ox,{colors:c,color:e,label:h("colorPicker.mostUsedCustomColors"),onChange:o})]}),oc("div",{children:[ln(oi,{children:h("colorPicker.colors")}),ln(rx,{color:e,palette:n,onChange:o,activeShade:f})]}),oc("div",{children:[ln(oi,{children:h("colorPicker.shades")}),ln(ix,{color:e,onChange:o,palette:n})]}),a]})})});import M6 from"clsx";import{COLOR_OUTLINE_CONTRAST_THRESHOLD as L6,DEFAULT_CANVAS_BACKGROUND_PICKS as P6,DEFAULT_ELEMENT_BACKGROUND_PICKS as A6,DEFAULT_ELEMENT_STROKE_PICKS as _6}from"@haoxin-web/excalidraw-common";import{jsx as Up}from"react/jsx-runtime";var cx=({onChange:e,type:o,activeColor:t,topPicks:r})=>{let n;return o==="elementStroke"&&(n=_6),o==="elementBackground"&&(n=A6),o==="canvasBackground"&&(n=P6),r&&(n=r),n?Up("div",{className:"color-picker__top-picks",children:n.map(i=>Up("button",{className:M6("color-picker__button",{active:i===t,"is-transparent":i==="transparent"||!i,"has-outline":!ei(i,L6)}),style:{"--swatch-color":i},type:"button",title:i,onClick:()=>e(i),"data-testid":`color-top-pick-${i}`,children:Up("div",{className:"color-picker__button-outline"})},i))}):(console.error("Invalid type for TopPicks"),null)};import{jsx as mo,jsxs as Wp}from"react/jsx-runtime";var dx=e=>{let o=new Option().style;return o.color=e,!!o.color},tx=e=>B6(e)?e:dx(`#${e}`)?`#${e}`:dx(e)?e:null,F6=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=mx,updateData:a})=>{let{container:l}=Xe(),[,s]=ce(Kt),[m,c]=ce(Er),d=Wp("div",{children:[mo(oi,{children:h("colorPicker.hexCode")}),mo(ex,{color:o||"",label:r,onChange:f=>{t(f)},colorPickerType:e,placeholder:h("colorPicker.color")})]}),p=R6(null),u=()=>{p.current?.focus()};return mo(ec,{container:l,style:{maxWidth:"13rem"},onFocusOutside:f=>{u(),f.preventDefault()},onPointerDownOutside:f=>{m&&f.preventDefault()},onClose:()=>{a({openPopup:null}),s(null)},children:i?mo(sx,{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=>{m?c(null):a({openPopup:null})},type:e,elements:n,updateData:a,children:d}):d})},O6=({label:e,color:o,type:t})=>mo(rc.Trigger,{type:"button",className:D6("color-picker__button active-color properties-trigger",{"is-transparent":!o||o==="transparent","has-outline":!o||!ei(o,N6)}),"aria-label":e,style:o?{"--swatch-color":o}:void 0,title:t==="elementStroke"?h("labels.showStroke"):h("labels.showBackground"),children:mo("div",{className:"color-picker__button-outline",children:!o&&yb})}),vr=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=mx,topPicks:a,updateData:l,appState:s})=>mo("div",{children:Wp("div",{role:"dialog","aria-modal":"true",className:"color-picker-container",children:[mo(cx,{activeColor:o,onChange:t,type:e,topPicks:a}),mo(qs,{}),Wp(rc.Root,{open:s.openPopup===e,onOpenChange:m=>{l({openPopup:m?e:null})},children:[mo(O6,{color:o,label:r,type:e}),s.openPopup===e&&mo(F6,{type:e,color:o,onChange:t,label:r,elements:n,palette:i,updateData:l})]})]})});import*as wx from"@radix-ui/react-popover";import hk,{useCallback as gk,useMemo as fk}from"react";import{FONT_FAMILY as Zp}from"@haoxin-web/excalidraw-common";import nk,{useMemo as Tr,useState as ik,useRef as ak,useEffect as lk,useCallback as sk}from"react";import{arrayToList as ck,debounce as dk,FONT_FAMILY as sn,getFontFamilyString as mk}from"@haoxin-web/excalidraw-common";import z6 from"clsx";import H6 from"react";import{jsx as G6,jsxs as U6}from"react/jsx-runtime";var nc=H6.forwardRef(({className:e,placeholder:o,onChange:t},r)=>U6("div",{className:z6("QuickSearch__wrapper",e),children:[Ft,G6("input",{ref:r,className:"QuickSearch__input",type:"text",placeholder:o,onChange:n=>t(n.target.value.trim().toLowerCase())})]}));import W6 from"clsx";import{Children as Y6}from"react";import{jsx as px}from"react/jsx-runtime";var ic=({className:e,placeholder:o,children:t})=>{let r=!Y6.count(t);return px("div",{className:W6("ScrollableList__wrapper",e),role:"menu",children:r?px("div",{className:"empty",children:o}):t})};import{jsx as V6,jsxs as X6}from"react/jsx-runtime";var ux=({children:e,className:o="",style:t,title:r})=>X6("div",{className:`dropdown-menu-group ${o}`,style:t,children:[r&&V6("p",{className:"dropdown-menu-group-title",children:r}),e]}),Da=ux;ux.displayName="DropdownMenuGroup";import{useEffect as tk,useRef as ok}from"react";import{THEME as rk}from"@haoxin-web/excalidraw-common";import{jsx as K6}from"react/jsx-runtime";var Ra=({children:e,...o})=>K6("span",{...o,style:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",...o.style},children:e});import{Fragment as $6,jsx as ac,jsxs as j6}from"react/jsx-runtime";var Z6=({textStyle:e,icon:o,shortcut:t,children:r})=>{let n=pe();return j6($6,{children:[o&&ac("div",{className:"dropdown-menu-item__icon",children:o}),ac("div",{style:e,className:"dropdown-menu-item__text",children:ac(Ra,{children:r})}),t&&!n.editor.isMobile&&ac("div",{className:"dropdown-menu-item__shortcut",children:t})]})},lc=Z6;import q6,{useContext as J6}from"react";import{EVENT as Q6,composeEventHandlers as ek}from"@haoxin-web/excalidraw-common";var Yp=q6.createContext({}),sc=(e="",o=!1,t=!1)=>`dropdown-menu-item dropdown-menu-item-base ${e}
1
+ import{$ as U1,A as Xm,B as P1,C as A1,D as _1,E as as,F as ha,G as ls,H as ss,I as D1,J as R1,K as ga,L as N1,M as B1,N as F1,O as O1,P as cs,Q as Nn,R as z1,S as HC,T as Km,U as GC,V as Bn,W as fa,Y as H1,_ as G1,a as S1,aa as ds,b as tn,ba as W1,c as Co,ca as Zm,d as k1,da as $m,e as we,ea as ms,f as M1,fa as Y1,g as J,ga as jm,h as rs,ha as Go,i as cr,ia as V1,j as Hm,ja as qm,k as Gm,ka as X1,l as _n,la as K1,m as Um,ma as ps,n as Dn,na as Jm,o as L1,oa as Z1,p as Wm,pa as $1,q as dr,qa as j1,r as mr,ra as us,s as St,t as lo,u as Rn,v as ns,w as Ym,x as ua,y as is,z as Vm}from"./chunk-K64QT3UR.js";import{a as T}from"./chunk-2BESCJKB.js";import{J as zm}from"./chunk-LUHP3LHA.js";import{c as C1}from"./chunk-Z3N5DIM6.js";import{b as T1,c as I1,d as I}from"./chunk-SRAX5OIU.js";import UU,{useEffect as WU}from"react";import{DEFAULT_UI_OPTIONS as _C,isShallowEqual as YU}from"@haoxin-web/excalidraw-common";import m5 from"clsx";import xH from"lodash.throttle";import Ho,{useContext as Qr}from"react";import{flushSync as aa}from"react-dom";import EH from"roughjs/bin/rough";import{nanoid as yH}from"nanoid";import{clamp as p5,pointFrom as le,pointDistance as Zr,vector as u5,pointRotateRads as Mf,vectorScale as wH,vectorFromPoint as Lf,vectorSubtract as h5,vectorDot as g5,vectorNormalize as f5}from"@haoxin-web/excalidraw-math";import{COLOR_PALETTE as vH,CODES as b5,shouldResizeFromCenter as x5,shouldMaintainAspectRatio as Ol,shouldRotateWithDiscreteAngle as Pf,isArrowKey as Cm,KEYS as V,APP_NAME as TH,CURSOR_TYPE as Be,DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT as IH,DEFAULT_VERTICAL_ALIGN as E5,DRAGGING_THRESHOLD as CH,ELEMENT_SHIFT_TRANSLATE_AMOUNT as SH,ELEMENT_TRANSLATE_AMOUNT as y5,EVENT as oe,FRAME_STYLE as $r,IMAGE_MIME_TYPES as kH,IMAGE_RENDER_TIMEOUT as MH,isBrave as LH,LINE_CONFIRM_THRESHOLD as Af,MAX_ALLOWED_FILE_BYTES as w5,MIME_TYPES as ir,MQ_MAX_HEIGHT_LANDSCAPE as PH,MQ_MAX_WIDTH_LANDSCAPE as AH,MQ_MAX_WIDTH_PORTRAIT as _H,MQ_RIGHT_SIDEBAR_MIN_WIDTH as DH,POINTER_BUTTON as Sn,ROUNDNESS as Sm,SCROLL_TIMEOUT as RH,TAP_TWICE_TIMEOUT as NH,TEXT_TO_CENTER_SNAP_THRESHOLD as BH,THEME as km,THEME_FILTER as FH,TOUCH_CTX_MENU_TIMEOUT as OH,VERTICAL_ALIGN as zH,YOUTUBE_STATES as Mm,ZOOM_STEP as HH,POINTER_EVENTS as la,TOOL_TYPE as bt,isIOS as GH,supportsResizeObserver as v5,DEFAULT_COLLISION_THRESHOLD as T5,DEFAULT_TEXT_ALIGN as UH,ARROW_TYPE as jr,DEFAULT_REDUCED_GLOBAL_ALPHA as WH,isSafari as YH,isLocalLink as VH,normalizeLink as _f,toValidURL as XH,getGridPoint as st,getLineHeight as I5,debounce as C5,distance as sa,getFontString as Df,getNearestScrollableContainer as KH,isInputLike as S5,isToolIcon as ZH,isWritableElement as zl,sceneCoordsToViewportCoords as Lm,tupleToCoors as Rf,viewportCoordsToSceneCoords as We,wrapEvent as $H,updateObject as Nf,updateActiveTool as ar,getShortcutKey as jH,isTransparent as qH,easeToValuesRAF as JH,muteFSAbortError as QH,isTestEnv as n1,isDevEnv as dC,easeOut as eG,updateStable as Hl,addEventListener as Fe,normalizeEOL as tG,getDateTime as k5,isShallowEqual as oG,arrayToMap as Pm,randomInteger as rG,CLASSES as nG,Emitter as kn,isMobile as iG,MINIMUM_ARROW_SIZE as M5,DOUBLE_TAP_POSITION_THRESHOLD as aG}from"@haoxin-web/excalidraw-common";import{getObservedAppState as lG,getCommonBounds as ca,maybeSuggestBindingsForLinearElementAtCoords as L5,getElementAbsoluteCoords as P5,bindOrUnbindLinearElements as A5,fixBindingsAfterDeletion as sG,getHoveredElementForBinding as Bf,isBindingEnabled as Ff,shouldEnableBindingForPointerEvent as cG,updateBoundElements as Of,getSuggestedBindingsForArrows as zf,LinearElementEditor as Le,newElementWith as qr,newFrameElement as dG,newFreeDrawElement as mG,newEmbeddableElement as _5,newMagicFrameElement as D5,newIframeElement as pG,newArrowElement as uG,newElement as hG,newImageElement as gG,newLinearElement as fG,newTextElement as R5,refreshTextDimensions as bG,deepCopyElement as N5,duplicateElements as B5,hasBoundTextElement as F5,isArrowElement as Hf,isBindingElement as Gf,isBindingElementType as O5,isBoundToContainer as Uf,isFrameLikeElement as Rt,isImageElement as Mn,isEmbeddableElement as lr,isInitializedImageElement as Gl,isLinearElement as ro,isLinearElementType as xG,isUsingAdaptiveRadius as EG,isIframeElement as da,isIframeLikeElement as Ul,isMagicFrameElement as Wf,isTextBindableContainer as z5,isElbowArrow as je,isFlowchartNodeElement as yG,isBindableElement as wG,isTextElement as To,getLockedLinearCursorAlignSize as H5,getNormalizedDimensions as vG,isElementCompletelyInViewport as Yf,isElementInViewport as G5,isInvisiblySmallElement as U5,getCornerRadius as TG,isPathALoop as W5,createSrcDoc as Y5,embeddableURLValidator as Vf,maybeParseEmbedSrc as IG,getEmbedLink as Am,getInitializedImageElements as CG,normalizeSVG as V5,updateImageCache as SG,getBoundTextElement as Xf,getContainerCenter as Kf,getContainerElement as X5,isValidTextContainer as kG,redrawTextBoundingBox as MG,shouldShowBoundingBox as LG,getFrameChildren as Zf,isCursorInFrame as K5,addElementsToFrame as $f,replaceAllElementsInFrame as PG,removeElementsFromFrame as AG,getElementsInResizingFrame as jf,getElementsInNewFrame as _G,getContainingFrame as qf,elementOverlapsWithFrame as DG,updateFrameMembershipOfSelectedElements as Z5,isElementInFrame as $5,getFrameLikeTitle as RG,getElementsOverlappingFrame as NG,filterElementsEligibleAsFrameChildren as BG,hitElementBoundText as FG,hitElementBoundingBoxOnly as OG,hitElementItself as Wl,getVisibleSceneBounds as zG,FlowChartCreator as HG,FlowChartNavigator as GG,getLinkDirectionFromKey as j5,cropElement as UG,wrapText as WG,isElementLink as Jf,parseElementLinkFromURL as YG,isMeasureTextSupported as VG,normalizeText as XG,measureText as q5,getLineHeightInPx as KG,getApproxMinLineWidth as ZG,getApproxMinLineHeight as $G,getMinTextElementWidth as jG,ShapeCache as Yl,getRenderOpacity as qG,editGroupForSelectedElement as JG,getElementsInGroup as Ln,getSelectedGroupIdForElement as QG,getSelectedGroupIds as eU,isElementInGroup as J5,isSelectedViaGroup as tU,selectGroupsForSelectedElements as no,syncInvalidIndices as mC,syncMovedIndices as Q5,excludeElementsInFramesFromSelection as oU,getSelectionStateForElements as rU,makeNextSelectedElementIds as ve,getResizeOffsetXY as nU,getResizeArrowDirection as iU,transformElements as aU,getCursorForResizingElement as eC,getElementWithTransformHandleType as tC,getTransformHandleTypeFromCoords as oC,dragNewElement as rC,dragSelectedElements as lU,getDragOffsetXY as sU,isNonDeletedElement as nC,Scene as iC,Store as cU,CaptureUpdateAction as Ct,hitElementBoundingBox as dU,isLineElement as Qf,isSimpleArrow as mU,StoreDelta as aC,positionElementsOnGrid as lC}from"@haoxin-web/excalidraw-element";import{KEYS as vp,updateActiveTool as tS}from"@haoxin-web/excalidraw-common";import{getNonDeletedElements as Tp}from"@haoxin-web/excalidraw-element";import{fixBindingsAfterDeletion as oS}from"@haoxin-web/excalidraw-element";import{LinearElementEditor as O0}from"@haoxin-web/excalidraw-element";import{newElementWith as Ks}from"@haoxin-web/excalidraw-element";import{getContainerElement as z0}from"@haoxin-web/excalidraw-element";import{isBoundToContainer as Vs,isElbowArrow as rS,isFrameLikeElement as nS}from"@haoxin-web/excalidraw-element";import{getFrameChildren as iS}from"@haoxin-web/excalidraw-element";import{getElementsInGroup as Ip,selectGroupsForSelectedElements as aS}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as Xs}from"@haoxin-web/excalidraw-element";import{isDevEnv as VC}from"@haoxin-web/excalidraw-common";import{atom as he,createStore as UC}from"jotai";import{createIsolation as WC}from"jotai-scope";var q1=WC();var{useAtom:ce,useSetAtom:pr,useAtomValue:hs,useStore:jU}=q1,J1=q1.Provider,Ve=UC();var YC=T1({"./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 XC=85,So={code:"en",label:"English"},On=[So,...[{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=>C1[e.code]>=XC).sort((e,o)=>e.label>o.label?1:-1)],fs="__test__";VC()&&On.unshift({code:fs,label:"test language"},{code:`${fs}.rtl`,label:"\u202Atest language (rtl)\u202C",rtl:!0});var Fn=So,gs={},bs=async e=>{if(Fn=e,document.documentElement.dir=Fn.rtl?"rtl":"ltr",document.documentElement.lang=Fn.code,e.code.startsWith(fs))gs={};else try{gs=await YC(`./locales/${Fn.code}.json`)}catch(o){console.error(`Failed to load language ${e.code}:`,o.message),gs=zm}Ve.set(eb,e.code)},Uo=()=>Fn,Q1=(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},h=(e,o,t)=>{if(Fn.code.startsWith(fs))return`\u202A[[${o?`${e}(${JSON.stringify(o).slice(1,-1)})`:e}]]\u202C`;let r=e.split("."),n=Q1(gs,r)||Q1(zm,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},eb=he(So.code),Ye=()=>{let e=hs(eb);return{t:h,langCode:e}};import KC from"clsx";import ZC from"open-color";import nt from"react";import{THEME as $C}from"@haoxin-web/excalidraw-common";import{Fragment as Ee,jsx as g,jsxs as D}from"react/jsx-runtime";var so=e=>"var(--icon-fill-color)",tb=e=>e===$C.LIGHT?ZC.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 g("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${t} ${r}`,className:KC({"rtl-mirror":n}),style:i,...a,children:typeof e=="string"?g("path",{fill:"currentColor",d:e}):e})},H={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},re={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},pW=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("rect",{x:3,y:8,width:18,height:4,rx:1}),g("line",{x1:12,y1:8,x2:12,y2:21}),g("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),g("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),zn=A(D("g",{strokeWidth:"1.25",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),g("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),g("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),g("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),g("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),H),ob=A(D("svg",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),g("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),H),rb=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("circle",{cx:"12",cy:"12",r:"1"}),g("circle",{cx:"12",cy:"19",r:"1"}),g("circle",{cx:"12",cy:"5",r:"1"})]}),H),nb=A(D("svg",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),g("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),g("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),H),Qm=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),g("path",{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),g("path",{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),g("path",{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),g("path",{d:"M6.5 9.5l3.5 -3"}),g("path",{d:"M14 5.5l3 1.5"}),g("path",{d:"M18.5 10l-2.5 7"}),g("path",{d:"M13.5 17.5l-7 -5"})]}),H),on=A(D("g",{children:[g("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"}),g("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"}),g("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:g("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"})}),g("g",{mask:"url(#UnlockedIcon)",children:g("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"})})]}),re),Hn=A(D("g",{strokeWidth:"1.25",children:[g("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"}),g("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),g("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"})]}),re),ib=A(g("g",{fill:"currentColor",children:g("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}),ab=A(D(Ee,{children:[g("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"}),g("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),g("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"}),lb=A(D(Ee,{children:[g("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"}),g("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),g("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"}),sb=A(D(Ee,{children:[g("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"}),g("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),g("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"}),uW=A(g("g",{fill:"currentColor",children:g("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"}),ba=A(D("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),xs=A(D("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,children:[g("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"}),g("path",{d:"M5 15m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),g("path",{d:"M5 17c0 1.42 .316 2.805 1 4"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),ko=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),H),ur=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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),hr=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("circle",{cx:"12",cy:"12",r:"9"})]}),H),gr=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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),fr=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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),Es=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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),ys=A(D("g",{fill:"none",stroke:"currentColor",children:[g("path",{d:"M6 8 L6 16 L18 16 L18 18 L22 12 L18 6 L18 8 L6 8 Z",strokeWidth:"1.5",fill:"none"}),g("path",{d:"M7 8.5 L7 15.5 L17 15.5 L17 17 L21 12 L17 7 L17 8.5 L7 8.5 Z",strokeWidth:"0.5",opacity:"0.3",fill:"none"})]}),H),ws=A(D("g",{fill:"none",stroke:"currentColor",children:[g("path",{d:"M8 8 L8 16 L4 12 L8 8 Z",fill:"none",strokeWidth:"1.5"}),g("path",{d:"M8 10 L16 10 M8 14 L16 14",fill:"none",strokeLinecap:"round",strokeWidth:"1.5"}),g("path",{d:"M16 8 L16 16 L20 12 L16 8 Z",strokeWidth:"1.5",fill:"none"})]}),H),rn=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),g("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),g("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),H),vs=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),g("line",{x1:"5",y1:"12",x2:"9",y2:"8"}),g("line",{x1:"5",y1:"12",x2:"9",y2:"16"}),g("line",{x1:"19",y1:"12",x2:"15",y2:"8"}),g("line",{x1:"19",y1:"12",x2:"15",y2:"16"})]}),H),co=A(g("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),re),cb=A(D("g",{strokeWidth:"1.25",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),g("path",{d:"M16 7h4"}),g("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),H),Nt=A(D("g",{strokeWidth:"1.25",children:[g("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"}),g("path",{d:"m11.25 5.417 3.333 3.333"})]}),re),Ts=A(D("g",{strokeWidth:1.25,stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(0,-2)",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M5 15l4 4l8-8l-4-4l-8 8z"}),g("path",{d:"M13 7l3 3"}),g("path",{d:"M4 16l3 3"})]}),re),Wo=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),g("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),g("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),g("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),g("polyline",{points:"5 20 11 4 13 4 20 20"})]}),H),db=A(D("g",{strokeWidth:"1.25",children:[g("path",{d:"M12.5 6.667h.01"}),g("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"}),g("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),g("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),re),xa=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M18 13.3l-6.3 -6.3"})]}),H),ep=A(g("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),re),tp=A(g("path",{d:"M5 10h10",strokeWidth:"1.25"}),re),mb=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M21 21l-6 -6"}),g("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"}),g("path",{d:"M3 4v4h4"})]}),H),Bt=A(g("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"}),re),pb=A(D("g",{strokeWidth:"1.5",children:[g("polyline",{points:"12 16 18 10 12 4"}),g("polyline",{points:"8 4 2 10 8 16"})]}),re),Ea=A(D("g",{strokeWidth:"1.25",children:[g("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"}),g("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"})]}),re),ya=A(g("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"}),re),wa=A(g("g",{stroke:"currentColor",strokeLinejoin:"round",children:g("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"})}),{...re,strokeWidth:1.5}),Is=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),g("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),g("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),H),nn=A(g("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"}),re),Gn=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("circle",{cx:"12",cy:"12",r:"9"}),g("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),g("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),H),ub=A(D("g",{strokeWidth:"1.25",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("circle",{cx:"12",cy:"12",r:"9"}),g("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),g("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),H),op=A(g("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"}),re),Cs=A(g("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"}),re),hb=A(D("g",{strokeWidth:"1.25",children:[g("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"}),g("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"})]}),re),gb=A(D("g",{strokeWidth:"1.25",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M4 4l11.733 16h4.267l-11.733 -16z"}),g("path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"})]}),H),fb=A(g("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),va=A(D("g",{strokeWidth:"1.25",children:[g("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"}),g("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"})]}),re),bb=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}),xb=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}),Un=A(g("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"}),re),hW=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}),Eb=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"),Ss=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z"}),g("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"}),g("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),yb=A(g("g",{strokeWidth:1.5,children:g("path",{d:"M6 18l12 -12"})}),H),ks=A(D("g",{strokeWidth:"1.25",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M15 8h.01"}),g("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),g("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),g("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),g("path",{d:"M19 16v6"}),g("path",{d:"M22 19l-3 3l-3 -3"})]}),H),wb=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}),gW=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}),fW=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}),vb=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"),bW=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"),rp=A(g("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"}),re),np=A(g("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"}),re),Tb=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}),Ib=A(g("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"}),re),xW=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"),EW=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}),yW=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M12 14v-11"}),g("path",{d:"M9 6l3 -3l3 3"})]}),H),wW=A(D(Ee,{children:[g("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"}),g("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}),vW=A(g("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}),Cb=D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M12 10l0 10"}),g("path",{d:"M12 10l4 4"}),g("path",{d:"M12 10l-4 4"}),g("path",{d:"M4 4l16 0"})]}),Sb=D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M12 5l0 14"}),g("path",{d:"M16 9l-4 -4"}),g("path",{d:"M8 9l4 -4"})]}),ip=A(Sb,H),ap=A(Sb,{...H,style:{transform:"rotate(180deg)"}}),lp=A(Cb,H),sp=A(Cb,{...H,style:{transform:"rotate(180deg)"}}),cp=A(D(Ee,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[g("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),g("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"})]}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),dp=A(D(Ee,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[g("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),g("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"})]}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),mp=A(D(Ee,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[g("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),g("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"})]}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),pp=A(D(Ee,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[g("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),g("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"})]}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),kb=A(D(Ee,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[g("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),g("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"})]}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),Mb=A(D(Ee,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[g("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),g("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"})]}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),up=A(D("g",{stroke:"currentColor",strokeWidth:"1.25",children:[g("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),g("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),g("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),g("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"})]}),re),hp=A(D("g",{stroke:"currentColor",strokeWidth:"1.25",children:[g("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),g("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),g("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),g("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"})]}),re),Ms=A(D("g",{strokeWidth:"1.5",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("circle",{cx:"9",cy:"7",r:"4"}),g("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),g("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),g("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),H),TW=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"),IW=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"),Vt=A(D(Ee,{children:[g("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:g("path",{d:"M15 5 5 15M5 5l10 10"})}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),CW=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}),SW=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}),kW=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}),gp=nt.memo(({theme:e})=>A(D(Ee,{children:[g("path",{d:"M25 26H111V111H25",fill:so(e)}),g("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:so(e),strokeWidth:"2"}),g("path",{d:"M100 100H160V160H100",fill:so(e)}),g("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:so(e),strokeWidth:"2"}),D("g",{fill:tb(e),stroke:so(e),strokeWidth:"6",children:[g("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),g("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),g("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),g("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),fp=nt.memo(({theme:e})=>A(D(Ee,{children:[g("path",{d:"M25 26H111V111H25",fill:so(e)}),g("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:so(e),strokeWidth:"2"}),g("path",{d:"M100 100H160V160H100",fill:so(e)}),g("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:so(e),strokeWidth:"2"}),D("g",{fill:tb(e),stroke:so(e),strokeWidth:"6",children:[g("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),g("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),g("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),g("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),g("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),g("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),Lb=A(g("g",{strokeWidth:1.25,children:g("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"})}),re),Ls=A(D(Ee,{children:[g("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"}),g("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:g("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"})}),g("g",{mask:"url(#FillHachureIcon)",children:g("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"})})]}),re),Ps=A(D(Ee,{children:[D("g",{clipPath:"url(#a)",children:[g("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"}),g("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:g("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"})}),g("g",{mask:"url(#FillCrossHatchIcon)",children:g("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"})})]}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),As=A(D(Ee,{children:[g("g",{clipPath:"url(#a)",children:g("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"})}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),{...re,fill:"currentColor"}),Wn=A(g(Ee,{children:g("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),re),Ta=A(g("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),re),Ia=A(g("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),re),MW=nt.memo(({theme:e})=>A(g("path",{d:"M6 10H34",stroke:so(e),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})),Pb=A(D("g",{strokeWidth:"2",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M5 12h2"}),g("path",{d:"M17 12h2"}),g("path",{d:"M11 12h2"})]}),H),Ab=A(D("g",{strokeWidth:"2",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M4 12v.01"}),g("path",{d:"M8 12v.01"}),g("path",{d:"M12 12v.01"}),g("path",{d:"M16 12v.01"}),g("path",{d:"M20 12v.01"})]}),H),_b=A(g("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"}),re),Db=A(g("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"}),re),Rb=A(g("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"}),re),Nb=A(D("svg",{strokeWidth:"1.5",children:[g("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"}),g("path",{d:"M13.3333 3.33331V3.34331"}),g("path",{d:"M16.6667 3.33331V3.34331"}),g("path",{d:"M16.6667 6.66669V6.67669"}),g("path",{d:"M16.6667 10V10.01"}),g("path",{d:"M3.33334 13.3333V13.3433"}),g("path",{d:"M16.6667 13.3333V13.3433"}),g("path",{d:"M3.33334 16.6667V16.6767"}),g("path",{d:"M6.66666 16.6667V16.6767"}),g("path",{d:"M10 16.6667V16.6767"}),g("path",{d:"M13.3333 16.6667V16.6767"}),g("path",{d:"M16.6667 16.6667V16.6767"})]}),re),Bb=A(D("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),g("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),g("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),g("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),g("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),g("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),g("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),g("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),g("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),g("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),g("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),g("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),H),Fb=A(D("g",{stroke:"currentColor",opacity:.3,strokeWidth:2,children:[g("path",{d:"M12 12l9 0"}),g("path",{d:"M3 9l6 6"}),g("path",{d:"M3 15l6 -6"})]}),H),Ob=nt.memo(({flip:e=!1})=>A(D("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[g("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),g("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})),zb=nt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[g("path",{d:"M32 10L6 10",strokeWidth:2}),g("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),Hb=nt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[g("path",{d:"M26 10L6 10"}),g("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),Gb=nt.memo(({flip:e=!1})=>A(g("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",children:g("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})),Ub=nt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[g("path",{d:"M32 10L6 10",strokeWidth:2}),g("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})),Wb=nt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",children:[g("path",{d:"M6,9.5H27"}),g("path",{d:"M27,5L34,10L27,14Z",fill:"none"})]}),{width:40,height:20})),Yb=nt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[g("path",{d:"M6,9.5H20"}),g("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),Vb=nt.memo(({flip:e=!1})=>A(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[g("path",{d:"M6,9.5H20"}),g("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),Xb=nt.memo(({flip:e=!1})=>A(g("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:g("path",{d:"M34,10 H6 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),Kb=nt.memo(({flip:e=!1})=>A(g("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:g("path",{d:"M34,10 H6 M15,10 L15,15 L15,5"})}),{width:40,height:20})),Zb=nt.memo(({flip:e=!1})=>A(g("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:g("path",{d:"M34,10 H6 M15,10 L15,16 L15,4 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),$b=A(D(Ee,{children:[g("g",{clipPath:"url(#a)",children:g("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"})}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),jb=A(D(Ee,{children:[g("g",{clipPath:"url(#a)",children:g("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),qb=A(D(Ee,{children:[g("g",{clipPath:"url(#a)",children:g("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),Jb=A(g(Ee,{children:g("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"})}),re),an=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M3 7v-2h13v2"}),g("path",{d:"M10 5v14"}),g("path",{d:"M12 19h-4"}),g("path",{d:"M15 13v-1h6v1"}),g("path",{d:"M18 12v7"}),g("path",{d:"M17 19h2"})]}),H),Qb=A(g(Ee,{children:D("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M7 12h10"}),g("path",{d:"M7 5v14"}),g("path",{d:"M17 5v14"}),g("path",{d:"M15 19h4"}),g("path",{d:"M15 5h4"}),g("path",{d:"M5 19h4"}),g("path",{d:"M5 5h4"})]})}),H),Ca=A(g(Ee,{children:g("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:g("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"})})}),re),_s=A(D(Ee,{children:[g("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:g("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"})}),g("defs",{children:g("clipPath",{id:"a",children:g("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),re),Ds=A(D("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),g("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),g("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),H),Rs=A(D("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),g("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),g("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),H),Ns=A(D("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),g("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),g("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),H),e0=nt.memo(({theme:e})=>A(D("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),g("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),H)),t0=nt.memo(({theme:e})=>A(D("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),g("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),H)),o0=nt.memo(({theme:e})=>A(D("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),g("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),g("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),H)),Bs=A(D("g",{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M21 19h-18l9 -15"}),g("path",{d:"M20.615 15.171h.015"}),g("path",{d:"M19.515 11.771h.015"}),g("path",{d:"M17.715 8.671h.015"}),g("path",{d:"M15.415 5.971h.015"})]}),H),r0=A(g("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}),LW=A(g("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"})),Fs=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),g("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),g("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),g("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),bp=A(D(Ee,{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),g("path",{d:"M7 11l5 5l5 -5"}),g("path",{d:"M12 4l0 12"})]}),H),Yn=A(D(Ee,{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("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),n0=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),g("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),g("path",{d:"M9.15 14.85l8.85 -10.85"}),g("path",{d:"M6 4l8.85 10.85"})]}),H),i0=A(D(Ee,{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),g("path",{d:"M12 17l0 .01"}),g("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),H),PW=A(D(Ee,{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M7 4v16l13 -8z"})]}),H),AW=A(D(Ee,{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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),a0=A(D(Ee,{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M5 12l5 5l10 -10"})]}),H),l0=A(D(Ee,{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M12 9v4"}),g("path",{d:"M12 17h.01"})]}),H),s0=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M11 7l6 6"}),g("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),c0=A(D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M12 3l-4 7h8z"}),g("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),g("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),Vn=A(D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M4 7l16 0"}),g("path",{d:"M4 17l16 0"}),g("path",{d:"M7 4l0 16"}),g("path",{d:"M17 4l0 16"})]}),H),d0=A(g("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"})),Xn=A(D("g",{strokeWidth:"1.25",children:[g("path",{d:"M4.16602 10H15.8327"}),g("path",{d:"M12.5 13.3333L15.8333 10"}),g("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),re),m0=A(D("g",{strokeWidth:1.5,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[g("path",{d:"M5 12h10"}),g("path",{d:"M11 8l4 4l-4 4"})]}),H),p0=A(D("g",{strokeWidth:1.5,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[g("path",{d:"M5 12h14"}),g("path",{d:"M9 8l-4 4l4 4"}),g("path",{d:"M15 8l4 4l-4 4"})]}),H),Yo=A(D("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[g("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"}),g("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),u0=A(D("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[g("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"}),g("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"}),g("circle",{cx:"3",cy:"16",r:"0.8",fill:"currentColor",opacity:"0.7"}),g("circle",{cx:"5",cy:"18",r:"0.6",fill:"currentColor",opacity:"0.5"}),g("circle",{cx:"7.5",cy:"17",r:"0.8",fill:"currentColor",opacity:"0.6"}),g("circle",{cx:"10",cy:"19",r:"0.4",fill:"currentColor",opacity:"0.3"})]}),20),h0=A(D("g",{stroke:"currentColor",fill:"none",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z"}),g("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),g("path",{d:"M15 6l3 3"}),g("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"}),g("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),_W=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z"}),g("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),g("path",{d:"M15 6l3 3"}),g("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"}),g("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),DW=A(D("g",{stroke:"currentColor",fill:"none",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35"}),g("path",{d:"M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946"}),g("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"}),g("path",{d:"M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45"}),g("path",{d:"M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946"}),g("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),g0=A(D("g",{stroke:"currentColor",fill:"none",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),g("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),g("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),g("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"})]}),H),Kn=A(D("g",{stroke:"currentColor",fill:"none",strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"}),g("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),f0=A(D("g",{stroke:"currentColor",fill:"none",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"}),g("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"}),g("path",{d:"M3 3l18 18"})]}),H),b0=A(D("g",{stroke:"currentColor",fill:"none",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("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"}),g("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),g("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),g("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),g("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),H),x0=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("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"}),g("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),g("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),g("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),g("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),H),Ft=A(D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),g("path",{d:"M21 21l-6 -6"})]}),H),E0=A(D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M20.984 12.53a9 9 0 1 0 -7.552 8.355"}),g("path",{d:"M12 7v5l3 3"}),g("path",{d:"M19 16l-2 3h4l-2 3"})]}),H),y0=A(D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M5 10a7 7 0 0 0 14 0"}),g("path",{d:"M8 21l8 0"}),g("path",{d:"M12 17l0 4"})]}),H),w0=A(D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M3 3l18 18"}),g("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"}),g("path",{d:"M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85"}),g("path",{d:"M8 21l8 0"}),g("path",{d:"M12 17l0 4"})]}),H),Sa=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"})]}),H),v0=A(D("g",{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M12 20v.01"}),g("path",{d:"M16 20v.01"}),g("path",{d:"M8 20v.01"}),g("path",{d:"M4 20v.01"}),g("path",{d:"M4 16v.01"}),g("path",{d:"M4 12v.01"}),g("path",{d:"M4 8v.01"}),g("path",{d:"M4 4v.01"}),g("path",{d:"M8 4v.01"}),g("path",{d:"M12 4v.01"}),g("path",{d:"M16 4v.01"}),g("path",{d:"M20 4v.01"}),g("path",{d:"M20 8v.01"}),g("path",{d:"M20 12v.01"}),g("path",{d:"M20 16v.01"}),g("path",{d:"M20 20v.01"})]}),H),T0=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M5 3v18"}),g("path",{d:"M19 21v-18"}),g("path",{d:"M5 7h14"}),g("path",{d:"M5 15h14"}),g("path",{d:"M8 13v4"}),g("path",{d:"M11 13v4"}),g("path",{d:"M16 13v4"}),g("path",{d:"M14 5v4"}),g("path",{d:"M11 5v4"}),g("path",{d:"M8 5v4"}),g("path",{d:"M3 21h18"})]}),H),I0=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M3 12l18 0"}),g("path",{d:"M7 16l10 0l-10 5l0 -5"}),g("path",{d:"M7 8l10 0l-10 -5l0 5"})]}),H),C0=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M12 3l0 18"}),g("path",{d:"M16 7l0 10l5 0l-5 -10"}),g("path",{d:"M8 7l0 10l-5 0l5 -10"})]}),H),xp=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"}),g("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),Os=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"}),g("path",{d:"M22 22l-3 -3"}),g("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),g("path",{d:"M3 11v-1"}),g("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),g("path",{d:"M10 3h1"}),g("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"})]}),H),S0=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),g("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),g("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"}),g("path",{d:"M10 15l2 6l2 -6"}),g("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"})]}),H),k0=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),g("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),g("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"}),g("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"}),g("path",{d:"M11 21v-6l3 6v-6"})]}),H),M0=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M4 8l5 0"}),g("path",{d:"M15 8l4 0"})]}),H),L0=A(D("g",{strokeWidth:1.25,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),g("path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),g("path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z"}),g("path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555"})]}),H),P0=A(D("g",{stroke:"currentColor",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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}),RW=A(D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M21 12h-13l3 -3"}),g("path",{d:"M11 15l-3 -3"})]}),H),A0=A(D("g",{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("path",{d:"M10 9l5 3l-5 3z"})]}),H),_0=A(D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M3 6h18"}),g("path",{d:"M3 12h18"}),g("path",{d:"M3 18h18"}),g("path",{d:"M6 3v18"}),g("path",{d:"M12 3v18"}),g("path",{d:"M18 3v18"})]}),H),D0=A(D("g",{strokeWidth:1.5,children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("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"}),g("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"}),g("path",{d:"M17 5c-6.627 0 -12 5.373 -12 12"})]}),H),zs=A(D("g",{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M6 18l12 -12"}),g("path",{d:"M18 10v-4h-4"})]}),H),Hs=A(D("g",{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M4,19L10,19C11.097,19 12,18.097 12,17L12,9C12,7.903 12.903,7 14,7L21,7"}),g("path",{d:"M18 4l3 3l-3 3"})]}),H),Gs=A(D("g",{children:[g("path",{d:"M16,12L20,9L16,6"}),g("path",{d:"M6 20c0 -6.075 4.925 -11 11 -11h3"})]}),H),Us=A(D("g",{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M6 9l6 6l6 -6"})]}),H),R0=A(D("g",{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M6 15l6 -6l6 6"})]}),H),N0=A(D("g",{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M6 15l6 -6l6 6"})]}),H),Ep=A(D("g",{strokeWidth:"1.25",children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"}),g("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"})]}),H),Ws=A(D("g",{children:[g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g("path",{d:"M5 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),g("path",{d:"M19 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),g("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),g("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),g("path",{d:"M5 7l0 10"}),g("path",{d:"M7 5l10 0"}),g("path",{d:"M7 19l10 0"}),g("path",{d:"M19 7l0 10"})]}),H);import B0 from"clsx";import wp,{useEffect as JC,useRef as F0,useState as QC}from"react";import{isPromiseLike as eS}from"@haoxin-web/excalidraw-common";import jC from"react";import{jsx as yp}from"react/jsx-runtime";var qC=({size:e="1em",circleWidth:o=8,synchronized:t=!1,className:r=""})=>{let i=-(jC.useRef(Date.now()).current%1600);return yp("div",{className:`Spinner ${r}`,children:yp("svg",{viewBox:"0 0 100 100",style:{width:e,height:e,"--spinner-delay":t?`${i}ms`:0},children:yp("circle",{cx:"50",cy:"50",r:50-o/2,strokeWidth:o,fill:"none",strokeMiterlimit:"10"})})})},it=qC;import{jsx as ka,jsxs as Ma}from"react/jsx-runtime";var z=wp.forwardRef(({size:e="medium",visible:o=!0,className:t="",...r},n)=>{let{id:i}=Xe(),a=wp.useRef(null);wp.useImperativeHandle(n,()=>a.current);let l=`ToolIcon_size_${e}`,[s,m]=QC(!1),c=F0(!0),d=async u=>{let f="onClick"in r&&r.onClick?.(u);if(eS(f))try{m(!0),await f}catch(b){if(b instanceof Dn)console.warn(b);else throw b}finally{c.current&&m(!1)}};JC(()=>(c.current=!0,()=>{c.current=!1}),[]);let p=F0(null);if(r.type==="button"||r.type==="icon"||r.type==="submit"){let u=r.type==="icon"?"button":r.type;return Ma("button",{className:B0("ToolIcon_type_button",l,t,o&&!r.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!r.hidden,"ToolIcon--selected":r.selected,"ToolIcon--plain":r.type==="icon"}),style:r.style,"data-testid":r["data-testid"],hidden:r.hidden,title:r.title,"aria-label":r["aria-label"],type:u,onClick:d,ref:a,disabled:s||r.isLoading||!!r.disabled,children:[(r.icon||r.label)&&Ma("div",{className:"ToolIcon__icon","aria-hidden":"true","aria-disabled":!!r.disabled,children:[r.icon||r.label,r.keyBindingLabel&&ka("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel}),r.isLoading&&ka(it,{})]}),r.showAriaLabel&&Ma("div",{className:"ToolIcon__label",children:[r["aria-label"]," ",s&&ka(it,{})]}),r.children]})}return Ma("label",{className:B0("ToolIcon",t),title:r.title,onPointerDown:u=>{p.current=u.pointerType||null,r.onPointerDown?.({pointerType:u.pointerType||null})},onPointerUp:()=>{requestAnimationFrame(()=>{p.current=null})},children:[ka("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}),Ma("div",{className:"ToolIcon__icon",children:[r.icon,r.keyBindingLabel&&ka("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel})]})]})});z.displayName="ToolButton";var Ys=[],F=e=>(Ys=Ys.concat(e),e);import{jsx as sS}from"react/jsx-runtime";var lS=(e,o,t)=>{let r=new Set(J(e.filter(c=>nS(c)),o).map(c=>c.id)),n={},i=t.scene.getNonDeletedElementsMap(),a=new Set;for(let c of r){let d=iS(e,c);for(let p of d)if(!a.has(p.id)){if(Vs(p)){let u=z0(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 d=Vs(c)?z0(c,i):null;return c.frameId&&r.has(c.frameId)?(l=!1,n[c.id]=!0,c):d?.frameId&&r.has(d?.frameId)?c:(c.boundElements&&c.boundElements.forEach(p=>{let u=t.scene.getNonDeletedElementsMap().get(p.id);u&&rS(u)&&t.scene.mutateElement(u,{startBinding:c.id===u.startBinding?.elementId?null:u.startBinding,endBinding:c.id===u.endBinding?.elementId?null:u.endBinding})}),Ks(c,{isDeleted:!0}))}return c.frameId&&r.has(c.frameId)?(l=!1,Vs(c)||(n[c.id]=!0),Ks(c,{frameId:null})):Vs(c)&&o.selectedElementIds[c.containerId]?Ks(c,{isDeleted:!0}):c}),m=o.editingGroupId;if(l&&o.editingGroupId){let c=Ip(s,o.editingGroupId).filter(d=>!d.isDeleted);if(c.length>1)c[0]&&(n[c[0].id]=!0);else{m=null,c[0]&&(n[c[0].id]=!0);let d=c[0];if(d){let p=d.groupIds.findIndex(f=>f===o.editingGroupId),u=d.groupIds[p+1];if(u){let f=Ip(s,u).filter(b=>!b.isDeleted);f.length>1&&(m=u,f.forEach(b=>{n[b.id]=!0}))}}}}return{elements:s,appState:{...o,...aS({selectedElementIds:n,editingGroupId:m},s,o,null)}}},H0=(e,o)=>{if(e.editingGroupId){let t=Ip(Tp(o),e.editingGroupId);if(t.length)return{...e,selectedElementIds:{[t[0].id]:!0}}}return e},La=F({name:"deleteSelectedElements",label:"labels.delete",icon:Bt,trackEvent:{category:"element",action:"delete"},perform:(e,o,t,r)=>{if(o.selectedLinearElement?.isEditing){let{elementId:a,selectedPointsIndices:l,startBindingElement:s,endBindingElement:m}=o.selectedLinearElement,c=r.scene.getNonDeletedElementsMap(),d=O0.getElement(a,c);if(!d||l==null)return!1;if(l.length>=d.points.length){let u=e.map(b=>b.id===d.id?Ks(b,{isDeleted:!0}):b),f=H0(o,u);return{elements:u,appState:{...f,selectedLinearElement:null},captureUpdate:Xs.IMMEDIATELY}}let p={startBindingElement:l?.includes(0)?null:s,endBindingElement:l?.includes(d.points.length-1)?null:m};return O0.deletePoints(d,r,l),{elements:e,appState:{...o,selectedLinearElement:{...o.selectedLinearElement,...p,selectedPointsIndices:l?.[0]>0?[l[0]-1]:[0]}},captureUpdate:Xs.IMMEDIATELY}}let{elements:n,appState:i}=lS(e,o,r);return oS(n,n.filter(a=>a.isDeleted)),i=H0(i,n),{elements:n,appState:{...i,activeTool:tS(o,{type:r.defaultSelectionTool}),multiElement:null,activeEmbeddable:null,selectedLinearElement:null},captureUpdate:we(Tp(e),o)?Xs.IMMEDIATELY:Xs.EVENTUALLY}},keyTest:(e,o,t)=>(e.key===vp.BACKSPACE||e.key===vp.DELETE)&&!e[vp.CTRL_OR_CMD],PanelComponent:({elements:e,appState:o,updateData:t})=>sS(z,{type:"button",icon:Bt,title:h("labels.delete"),"aria-label":h("labels.delete"),onClick:()=>t(null),visible:we(Tp(e),o)})});import{KEYS as Zn,CODES as $n,getShortcutKey as jn,isDarwin as Zs}from"@haoxin-web/excalidraw-common";import{moveOneLeft as cS,moveOneRight as dS,moveAllLeft as mS,moveAllRight as pS}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as $s}from"@haoxin-web/excalidraw-element";import{jsx as js}from"react/jsx-runtime";var Cp=F({name:"sendBackward",label:"labels.sendBackward",keywords:["move down","zindex","layer"],icon:ap,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:cS(e,o,r.scene),appState:o,captureUpdate:$s.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[Zn.CTRL_OR_CMD]&&!e.shiftKey&&e.code===$n.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>js("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${h("labels.sendBackward")} \u2014 ${jn("CtrlOrCmd+[")}`,children:ap})}),Sp=F({name:"bringForward",label:"labels.bringForward",keywords:["move up","zindex","layer"],icon:ip,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:dS(e,o,r.scene),appState:o,captureUpdate:$s.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[Zn.CTRL_OR_CMD]&&!e.shiftKey&&e.code===$n.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>js("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${h("labels.bringForward")} \u2014 ${jn("CtrlOrCmd+]")}`,children:ip})}),kp=F({name:"sendToBack",label:"labels.sendToBack",keywords:["move down","zindex","layer"],icon:sp,trackEvent:{category:"element"},perform:(e,o)=>({elements:mS(e,o),appState:o,captureUpdate:$s.IMMEDIATELY}),keyTest:e=>Zs?e[Zn.CTRL_OR_CMD]&&e.altKey&&e.code===$n.BRACKET_LEFT:e[Zn.CTRL_OR_CMD]&&e.shiftKey&&e.code===$n.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>js("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${h("labels.sendToBack")} \u2014 ${Zs?jn("CtrlOrCmd+Alt+["):jn("CtrlOrCmd+Shift+[")}`,children:sp})}),Mp=F({name:"bringToFront",label:"labels.bringToFront",keywords:["move up","zindex","layer"],icon:lp,trackEvent:{category:"element"},perform:(e,o)=>({elements:pS(e,o),appState:o,captureUpdate:$s.IMMEDIATELY}),keyTest:e=>Zs?e[Zn.CTRL_OR_CMD]&&e.altKey&&e.code===$n.BRACKET_RIGHT:e[Zn.CTRL_OR_CMD]&&e.shiftKey&&e.code===$n.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>js("button",{type:"button",className:"zIndexButton",onClick:t=>e(null),title:`${h("labels.bringToFront")} \u2014 ${Zs?jn("CtrlOrCmd+Alt+]"):jn("CtrlOrCmd+Shift+]")}`,children:lp})});import{getNonDeletedElements as uS}from"@haoxin-web/excalidraw-element";import{LinearElementEditor as hS}from"@haoxin-web/excalidraw-element";import{isLinearElement as gS,isTextElement as fS}from"@haoxin-web/excalidraw-element";import{arrayToMap as bS,KEYS as G0}from"@haoxin-web/excalidraw-common";import{selectGroupsForSelectedElements as xS}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as ES}from"@haoxin-web/excalidraw-element";var Lp=F({name:"selectAll",label:"labels.selectAll",icon:v0,trackEvent:{category:"canvas"},viewMode:!1,perform:(e,o,t,r)=>{if(o.selectedLinearElement?.isEditing)return!1;let n=e.filter(i=>!i.isDeleted&&!(fS(i)&&i.containerId)&&!i.locked).reduce((i,a)=>(i[a.id]=!0,i),{});return{appState:{...o,...xS({editingGroupId:null,selectedElementIds:n},uS(e),o,r),selectedLinearElement:Object.keys(n).length===1&&gS(e[0])?new hS(e[0],bS(e)):null},captureUpdate:ES.IMMEDIATELY}},keyTest:e=>e[G0.CTRL_OR_CMD]&&e.key===G0.A});import{DEFAULT_GRID_SIZE as U0,KEYS as W0,arrayToMap as Y0,getShortcutKey as yS}from"@haoxin-web/excalidraw-common";import{getNonDeletedElements as V0}from"@haoxin-web/excalidraw-element";import{LinearElementEditor as wS}from"@haoxin-web/excalidraw-element";import{getSelectedElements as vS,getSelectionStateForElements as TS}from"@haoxin-web/excalidraw-element";import{syncMovedIndices as IS}from"@haoxin-web/excalidraw-element";import{duplicateElements as CS}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as X0}from"@haoxin-web/excalidraw-element";import{jsx as SS}from"react/jsx-runtime";var Pp=F({name:"duplicateSelection",label:"labels.duplicateSelection",icon:Ea,trackEvent:{category:"element"},perform:(e,o,t,r)=>{if(o.selectedElementsAreBeingDragged)return!1;if(o.selectedLinearElement?.isEditing)try{let a=wS.duplicateSelectedPoints(o,r.scene);return{elements:e,appState:a,captureUpdate:X0.IMMEDIATELY}}catch{return!1}let{duplicatedElements:n,elementsWithDuplicates:i}=CS({type:"in-place",elements:e,idsOfElementsToDuplicate:Y0(vS(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+U0/2,y:a.y+U0/2,frameId:s??a.frameId}}});if(r.props.onDuplicate&&i){let a=r.props.onDuplicate(i,e);a&&(i=a)}return{elements:IS(i,Y0(n)),appState:{...o,...TS(n,V0(i),o)},captureUpdate:X0.IMMEDIATELY}},keyTest:e=>e[W0.CTRL_OR_CMD]&&e.key===W0.D,PanelComponent:({elements:e,appState:o,updateData:t})=>SS(z,{type:"button",icon:Ea,title:`${h("labels.duplicateSelection")} \u2014 ${yS("CtrlOrCmd+D")}`,"aria-label":h("labels.duplicateSelection"),onClick:()=>t(null),visible:we(V0(e),o)})});import{pointFrom as kk}from"@haoxin-web/excalidraw-math";import{useEffect as Jp,useMemo as Mk,useRef as Qp,useState as Lk}from"react";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE as Pk,DEFAULT_ELEMENT_BACKGROUND_PICKS as Ak,DEFAULT_ELEMENT_STROKE_COLOR_PALETTE as _k,DEFAULT_ELEMENT_STROKE_PICKS as Dk,ARROW_TYPE as Xo,DEFAULT_FONT_FAMILY as Rk,DEFAULT_FONT_SIZE as Nk,FONT_FAMILY as Bk,ROUNDNESS as uc,STROKE_WIDTH as eu,VERTICAL_ALIGN as pc,KEYS as li,randomInteger as Fk,arrayToMap as ru,getFontFamilyString as Ok,getShortcutKey as zk,getLineHeight as Hk,isTransparent as Gk,reduceToCommonValue as Uk}from"@haoxin-web/excalidraw-common";import{canBecomePolygon as Wk,getNonDeletedElements as Dx}from"@haoxin-web/excalidraw-element";import{bindLinearElement as Lx,calculateFixedPointForElbowArrowBinding as Px,updateBoundElements as Yk}from"@haoxin-web/excalidraw-element";import{LinearElementEditor as tu}from"@haoxin-web/excalidraw-element";import{newElementWith as Qe}from"@haoxin-web/excalidraw-element";import{getBoundTextElement as Cr,redrawTextBoundingBox as Oa}from"@haoxin-web/excalidraw-element";import{isArrowElement as hc,isBoundToContainer as Vk,isElbowArrow as Rx,isLinearElement as ou,isLineElement as Ax,isTextElement as kt,isUsingAdaptiveRadius as Xk}from"@haoxin-web/excalidraw-element";import{hasStrokeColor as Kk}from"@haoxin-web/excalidraw-element";import{updateElbowArrowPoints as Zk,CaptureUpdateAction as et,toggleLinePolygonState as $k}from"@haoxin-web/excalidraw-element";import{isDevEnv as kS}from"@haoxin-web/excalidraw-common";var MS=new Set(["command_palette","export"]),ae=(e,o,t,r)=>{try{if(typeof window>"u"||T.VITE_WORKER_ID||T.VITE_APP_ENABLE_TRACKING!=="true"||!MS.has(e)||kS())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 _S from"clsx";import LS from"clsx";import{forwardRef as PS}from"react";import{jsx as AS}from"react/jsx-runtime";var qn=PS((e,o)=>{let{title:t,className:r,testId:n,active:i,standalone:a,icon:l,onClick:s}=e;return AS("button",{type:"button",ref:o,title:t,"data-testid":n,className:LS(r,{standalone:a,active:i}),onClick:s,style:e.style,children:l},t)});import{Fragment as RS,jsx as Ap,jsxs as DS}from"react/jsx-runtime";var Xt=e=>Ap(RS,{children:e.options.map(o=>e.type==="button"?Ap(qn,{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):DS("label",{className:_S({active:e.value===o.value}),title:o.text,children:[Ap("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 rc from"@radix-ui/react-popover";import D6 from"clsx";import{useRef as R6}from"react";import{COLOR_OUTLINE_CONTRAST_THRESHOLD as N6,COLOR_PALETTE as mx,isTransparent as B6}from"@haoxin-web/excalidraw-common";import{jsx as NS}from"react/jsx-runtime";var qs=()=>NS("div",{style:{width:1,height:"1rem",backgroundColor:"var(--default-border-color)",margin:"0 auto"}});import{useEffect as HS,useRef as GS}from"react";import{createPortal as US}from"react-dom";import{EVENT as xr,KEYS as WS,rgbToHex as YS}from"@haoxin-web/excalidraw-common";import K0 from"react";var _p=K0.createContext(null),xe=()=>K0.useContext(_p);import{useState as BS,useLayoutEffect as Z0}from"react";import{THEME as FS}from"@haoxin-web/excalidraw-common";var Js=e=>{let[o,t]=BS(null),r=pe(),{theme:n}=xe(),{container:i}=Xe();return Z0(()=>{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===FS.DARK))},[o,n,r.editor.isMobile,e?.className]),Z0(()=>{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 OS}from"react";import{EVENT as Qs}from"@haoxin-web/excalidraw-common";function Jn(e,o,t){OS(()=>{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(Qs.POINTER_DOWN,r),document.addEventListener(Qs.TOUCH_START,r),()=>{document.removeEventListener(Qs.POINTER_DOWN,r),document.removeEventListener(Qs.TOUCH_START,r)}},[e,o,t])}import{useRef as zS}from"react";var br=e=>{let o=zS(e);return Object.assign(o.current,e),o.current};import{jsx as VS}from"react/jsx-runtime";var Er=he(null),$0=({onCancel:e,onChange:o,onSelect:t,colorPickerType:r})=>{let n=Js({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),i=xe(),a=yr(),l=Oe(),s=J(a,i),m=br({app:l,onCancel:e,onChange:o,onSelect:t,selectedElements:s}),{container:c}=Xe();HS(()=>{let p=d.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 YS(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&&m.onChange(r,R,m.selectedElements,{altKey:M}),p.style.background=R},w=()=>{m.onCancel()},E=(S,P)=>{m.onSelect(S,P)},y=S=>{u=!0,S.stopImmediatePropagation()},v=S=>{u=!1,c?.focus(),S.stopImmediatePropagation(),S.preventDefault(),E(b(S),S)},C=S=>{S.key===WS.ESCAPE&&(S.preventDefault(),S.stopImmediatePropagation(),w())};return n.tabIndex=-1,n.focus(),x({clientX:m.app.lastViewportPosition.x,clientY:m.app.lastViewportPosition.y,altKey:!1}),n.addEventListener(xr.KEYDOWN,C),n.addEventListener(xr.POINTER_DOWN,y),n.addEventListener(xr.POINTER_UP,v),window.addEventListener("pointermove",x,{passive:!0}),window.addEventListener(xr.BLUR,w),()=>{u=!1,n.removeEventListener(xr.KEYDOWN,C),n.removeEventListener(xr.POINTER_DOWN,y),n.removeEventListener(xr.POINTER_UP,v),window.removeEventListener("pointermove",x),window.removeEventListener(xr.BLUR,w)}},[m,l.canvas,n,r,c,i.offsetLeft,i.offsetTop]);let d=GS(null);return Jn(d,()=>{e()},p=>!!p.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")),n?US(VS("div",{ref:d,className:"excalidraw-eye-dropper-preview"}),n):null};import*as Qn from"@radix-ui/react-popover";import $S from"clsx";import jS from"react";import{isInteractive as qS}from"@haoxin-web/excalidraw-common";import XS from"react";import KS from"clsx";import{jsx as ZS}from"react/jsx-runtime";var De=XS.forwardRef(({children:e,padding:o,className:t,style:r},n)=>ZS("div",{className:KS("Island",t),style:{"--padding":o,...r},ref:n,children:e}));import{jsx as Dp,jsxs as JS}from"react/jsx-runtime";var ec=jS.forwardRef(({className:e,container:o,children:t,style:r,onClose:n,onKeyDown:i,onFocusOutside:a,onPointerLeave:l,onPointerDownOutside:s},m)=>{let c=pe();return Dp(Qn.Portal,{container:o,children:JS(Qn.Content,{ref:m,className:$S("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:d=>{d.stopPropagation(),d.preventDefault(),o&&!qS(document.activeElement)&&o.focus(),n()},children:[Dp(De,{padding:3,style:r,children:t}),Dp(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 e6 from"clsx";import{useCallback as t6,useEffect as Np,useRef as J0,useState as o6}from"react";import{KEYS as Bp,getShortcutKey as r6}from"@haoxin-web/excalidraw-common";import{MAX_CUSTOM_COLORS_USED_IN_CANVAS as QS}from"@haoxin-web/excalidraw-common";var wr=({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},Pa=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),Rp=({color:e,palette:o})=>!Object.values(o).flat().includes(e),q0=(e,o,t)=>{let r={elementBackground:"backgroundColor",elementStroke:"strokeColor"},n=e.filter(a=>{if(a.isDeleted)return!1;let l=a[r[o]];return Rp({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,QS)},Kt=he(null),j0=(e,o,t)=>(e*299+o*587+t*114)/1e3,ei=(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]),m=parseInt(l[1]),c=parseInt(l[2]);return j0(s,m,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 j0(t,r,n)<o};import{Fragment as n6,jsx as tc,jsxs as Q0}from"react/jsx-runtime";var ex=({color:e,onChange:o,label:t,colorPickerType:r,placeholder:n})=>{let i=pe(),[a,l]=o6(e),[s,m]=ce(Kt);Np(()=>{l(e)},[e]);let c=t6(b=>{let x=b.toLowerCase(),w=tx(x);w&&o(w),l(x)},[o]),d=J0(null),p=J0(null);Np(()=>{d.current&&d.current.focus()},[s]);let[u,f]=ce(Er);return Np(()=>()=>{f(null)},[f]),Q0("div",{className:"color-picker__input-label",children:[tc("div",{className:"color-picker__input-hash",children:"#"}),tc("input",{ref:s==="hex"?d: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:()=>m("hex"),onKeyDown:b=>{b.key!==Bp.TAB&&(b.key===Bp.ESCAPE&&p.current?.focus(),b.stopPropagation())},placeholder:n}),!i.editor.isMobile&&Q0(n6,{children:[tc("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),tc("div",{ref:p,className:e6("excalidraw-eye-dropper-trigger",{selected:u}),onClick:()=>f(b=>b?null:{keepOpenOnAlt:!1,onSelect:x=>o(x),colorPickerType:r}),title:`${h("labels.eyeDropper")} \u2014 ${Bp.I.toLocaleUpperCase()} or ${r6("Alt")} `,children:s0})]})]})};import Hp,{useEffect as Gp,useImperativeHandle as T6,useState as I6}from"react";import{EVENT as lx}from"@haoxin-web/excalidraw-common";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX as C6,DEFAULT_ELEMENT_STROKE_COLOR_INDEX as S6,KEYS as k6}from"@haoxin-web/excalidraw-common";import l6 from"clsx";import{useEffect as s6,useRef as c6}from"react";import{jsxs as a6}from"react/jsx-runtime";var i6=({color:e,keyLabel:o,isShade:t=!1})=>a6("div",{className:"color-picker__button__hotkey-label",style:{color:ei(e)?"#fff":"#000"},children:[t&&"\u21E7",o]}),ti=i6;import{jsx as Fp,jsxs as d6}from"react/jsx-runtime";var ox=({colors:e,color:o,onChange:t,label:r})=>{let[n,i]=ce(Kt),a=c6(null);return s6(()=>{a.current&&a.current.focus()},[o,n]),Fp("div",{className:"color-picker-content--default",children:e.map((l,s)=>d6("button",{ref:o===l?a:void 0,tabIndex:-1,type:"button",className:l6("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:[Fp("div",{className:"color-picker__button-outline"}),Fp(ti,{color:l,keyLabel:s+1})]},s))})};import m6 from"clsx";import{useEffect as p6,useRef as u6}from"react";import{jsx as Op,jsxs as g6}from"react/jsx-runtime";var h6=({palette:e,color:o,onChange:t,activeShade:r})=>{let n=wr({color:o,palette:e}),[i,a]=ce(Kt),l=u6(null);return p6(()=>{l.current&&i==="baseColors"&&l.current.focus()},[n?.colorName,i]),Op("div",{className:"color-picker-content--default",children:Object.entries(e).map(([s,m],c)=>{let d=(Array.isArray(m)?m[r]:m)||"transparent",p=Pa[c],u=h(`colors.${s.replace(/\d+/,"")}`,null,"");return g6("button",{ref:n?.colorName===s?l:void 0,tabIndex:-1,type:"button",className:m6("color-picker__button color-picker__button--large has-outline",{active:n?.colorName===s,"is-transparent":d==="transparent"||!d}),onClick:()=>{t(d),a("baseColors")},title:`${u}${d.startsWith("#")?` ${d}`:""} \u2014 ${p}`,"aria-label":`${u} \u2014 ${p}`,style:d?{"--swatch-color":d}:void 0,"data-testid":`color-${s}`,children:[Op("div",{className:"color-picker__button-outline"}),Op(ti,{color:d,keyLabel:p})]},s)})})},rx=h6;import{jsx as b6}from"react/jsx-runtime";var f6=({children:e})=>b6("div",{className:"color-picker__heading",children:e}),oi=f6;import x6 from"clsx";import{useEffect as E6,useRef as y6}from"react";import{jsx as Aa,jsxs as nx}from"react/jsx-runtime";var ix=({color:e,onChange:o,palette:t})=>{let r=wr({color:e||"transparent",palette:t}),[n,i]=ce(Kt),a=y6(null);if(E6(()=>{a.current&&n==="shades"&&a.current.focus()},[r,n]),r){let{colorName:l,shade:s}=r,m=t[l];if(Array.isArray(m))return Aa("div",{className:"color-picker-content--default shades",children:m.map((c,d)=>nx("button",{ref:d===s&&n==="shades"?a:void 0,tabIndex:-1,type:"button",className:x6("color-picker__button color-picker__button--large has-outline",{active:d===s}),"aria-label":"Shade",title:`${l} - ${d+1}`,style:c?{"--swatch-color":c}:void 0,onClick:()=>{o(c),i("shades")},children:[Aa("div",{className:"color-picker__button-outline"}),Aa(ti,{color:c,keyLabel:d+1,isShade:!0})]},d))})}return nx("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[Aa("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),Aa("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:h("colorPicker.noShades")})]})};import{COLORS_PER_ROW as ri,COLOR_PALETTE as w6,KEYS as _a}from"@haoxin-web/excalidraw-common";var zp=(e,o,t)=>{let r=Math.ceil(t/ri);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+ri;return n>=t?o%ri:n}case"ArrowUp":{let n=o-ri,i=n<0?ri*r+n:n;return i>=t?void 0:i}}},v6=({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(Pa.includes(e.key)){let l=Pa.indexOf(e.key),s=Object.keys(r)[l],m=r[s],c=Array.isArray(m)?m[a]:m;return t(c),i("baseColors"),!0}return!1},ax=({event:e,activeColorPickerSection:o,palette:t,color:r,onChange:n,customColors:i,setActiveColorPickerSection:a,updateData:l,activeShade:s,onEyeDropperToggle:m,onEscape:c})=>{if(e[_a.CTRL_OR_CMD])return!1;if(e.key===_a.ESCAPE)return c(e),!0;if(e.key===_a.ALT)return m(!0),!0;if(e.key===_a.I)return m(),!0;let d=wr({color:r,palette:t});if(e.key===_a.TAB){let p={custom:!!i.length,baseColors:!0,shades:d?.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(w6.black)),e.preventDefault(),e.stopPropagation(),!0}if(v6({e,colorObj:d,onChange:n,palette:t,customColors:i,setActiveColorPickerSection:a,activeShade:s}))return!0;if(o==="shades"&&d){let{shade:p}=d,u=zp(e.key,p,ri);if(u!==void 0)return n(t[d.colorName][u]),!0}if(o==="baseColors"&&d){let{colorName:p}=d,u=Object.keys(t),f=u.indexOf(p),b=zp(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=zp(e.key,p,i.length);if(u!==void 0){let f=i[u];return n(f),!0}}return!1};import{jsx as ln,jsxs as oc}from"react/jsx-runtime";var sx=Hp.forwardRef(({color:e,onChange:o,type:t,elements:r,palette:n,updateData:i,children:a,onEyeDropperToggle:l,onEscape:s},m)=>{let[c]=Hp.useState(()=>t==="canvasBackground"?[]:q0(r,t,n)),[d,p]=ce(Kt),u=wr({color:e,palette:n});Gp(()=>{if(!d){let w=!!e&&Rp({color:e,palette:n}),E=w&&!c.includes(e);p(E?null:w?"custom":u?.shade!=null?"shades":"baseColors")}},[d,e,n,p,u,c]);let[f,b]=I6(u?.shade??(t==="elementBackground"?C6:S6));Gp(()=>{u?.shade!=null&&b(u.shade);let w=E=>{E.key===k6.ALT&&l(!1)};return document.addEventListener(lx.KEYUP,w,{capture:!0}),()=>{document.removeEventListener(lx.KEYUP,w,{capture:!0})}},[u,l]);let x=Hp.useRef(null);return T6(m,()=>x.current),Gp(()=>{x?.current?.focus()},[]),ln("div",{role:"dialog","aria-modal":"true","aria-label":h("labels.colorPicker"),children:oc("div",{ref:x,onKeyDown:w=>{ax({event:w,activeColorPickerSection:d,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&&oc("div",{children:[ln(oi,{children:h("colorPicker.mostUsedCustomColors")}),ln(ox,{colors:c,color:e,label:h("colorPicker.mostUsedCustomColors"),onChange:o})]}),oc("div",{children:[ln(oi,{children:h("colorPicker.colors")}),ln(rx,{color:e,palette:n,onChange:o,activeShade:f})]}),oc("div",{children:[ln(oi,{children:h("colorPicker.shades")}),ln(ix,{color:e,onChange:o,palette:n})]}),a]})})});import M6 from"clsx";import{COLOR_OUTLINE_CONTRAST_THRESHOLD as L6,DEFAULT_CANVAS_BACKGROUND_PICKS as P6,DEFAULT_ELEMENT_BACKGROUND_PICKS as A6,DEFAULT_ELEMENT_STROKE_PICKS as _6}from"@haoxin-web/excalidraw-common";import{jsx as Up}from"react/jsx-runtime";var cx=({onChange:e,type:o,activeColor:t,topPicks:r})=>{let n;return o==="elementStroke"&&(n=_6),o==="elementBackground"&&(n=A6),o==="canvasBackground"&&(n=P6),r&&(n=r),n?Up("div",{className:"color-picker__top-picks",children:n.map(i=>Up("button",{className:M6("color-picker__button",{active:i===t,"is-transparent":i==="transparent"||!i,"has-outline":!ei(i,L6)}),style:{"--swatch-color":i},type:"button",title:i,onClick:()=>e(i),"data-testid":`color-top-pick-${i}`,children:Up("div",{className:"color-picker__button-outline"})},i))}):(console.error("Invalid type for TopPicks"),null)};import{jsx as mo,jsxs as Wp}from"react/jsx-runtime";var dx=e=>{let o=new Option().style;return o.color=e,!!o.color},tx=e=>B6(e)?e:dx(`#${e}`)?`#${e}`:dx(e)?e:null,F6=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=mx,updateData:a})=>{let{container:l}=Xe(),[,s]=ce(Kt),[m,c]=ce(Er),d=Wp("div",{children:[mo(oi,{children:h("colorPicker.hexCode")}),mo(ex,{color:o||"",label:r,onChange:f=>{t(f)},colorPickerType:e,placeholder:h("colorPicker.color")})]}),p=R6(null),u=()=>{p.current?.focus()};return mo(ec,{container:l,style:{maxWidth:"13rem"},onFocusOutside:f=>{u(),f.preventDefault()},onPointerDownOutside:f=>{m&&f.preventDefault()},onClose:()=>{a({openPopup:null}),s(null)},children:i?mo(sx,{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=>{m?c(null):a({openPopup:null})},type:e,elements:n,updateData:a,children:d}):d})},O6=({label:e,color:o,type:t})=>mo(rc.Trigger,{type:"button",className:D6("color-picker__button active-color properties-trigger",{"is-transparent":!o||o==="transparent","has-outline":!o||!ei(o,N6)}),"aria-label":e,style:o?{"--swatch-color":o}:void 0,title:t==="elementStroke"?h("labels.showStroke"):h("labels.showBackground"),children:mo("div",{className:"color-picker__button-outline",children:!o&&yb})}),vr=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=mx,topPicks:a,updateData:l,appState:s})=>mo("div",{children:Wp("div",{role:"dialog","aria-modal":"true",className:"color-picker-container",children:[mo(cx,{activeColor:o,onChange:t,type:e,topPicks:a}),mo(qs,{}),Wp(rc.Root,{open:s.openPopup===e,onOpenChange:m=>{l({openPopup:m?e:null})},children:[mo(O6,{color:o,label:r,type:e}),s.openPopup===e&&mo(F6,{type:e,color:o,onChange:t,label:r,elements:n,palette:i,updateData:l})]})]})});import*as wx from"@radix-ui/react-popover";import hk,{useCallback as gk,useMemo as fk}from"react";import{FONT_FAMILY as Zp}from"@haoxin-web/excalidraw-common";import nk,{useMemo as Tr,useState as ik,useRef as ak,useEffect as lk,useCallback as sk}from"react";import{arrayToList as ck,debounce as dk,FONT_FAMILY as sn,getFontFamilyString as mk}from"@haoxin-web/excalidraw-common";import z6 from"clsx";import H6 from"react";import{jsx as G6,jsxs as U6}from"react/jsx-runtime";var nc=H6.forwardRef(({className:e,placeholder:o,onChange:t},r)=>U6("div",{className:z6("QuickSearch__wrapper",e),children:[Ft,G6("input",{ref:r,className:"QuickSearch__input",type:"text",placeholder:o,onChange:n=>t(n.target.value.trim().toLowerCase())})]}));import W6 from"clsx";import{Children as Y6}from"react";import{jsx as px}from"react/jsx-runtime";var ic=({className:e,placeholder:o,children:t})=>{let r=!Y6.count(t);return px("div",{className:W6("ScrollableList__wrapper",e),role:"menu",children:r?px("div",{className:"empty",children:o}):t})};import{jsx as V6,jsxs as X6}from"react/jsx-runtime";var ux=({children:e,className:o="",style:t,title:r})=>X6("div",{className:`dropdown-menu-group ${o}`,style:t,children:[r&&V6("p",{className:"dropdown-menu-group-title",children:r}),e]}),Da=ux;ux.displayName="DropdownMenuGroup";import{useEffect as tk,useRef as ok}from"react";import{THEME as rk}from"@haoxin-web/excalidraw-common";import{jsx as K6}from"react/jsx-runtime";var Ra=({children:e,...o})=>K6("span",{...o,style:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",...o.style},children:e});import{Fragment as $6,jsx as ac,jsxs as j6}from"react/jsx-runtime";var Z6=({textStyle:e,icon:o,shortcut:t,children:r})=>{let n=pe();return j6($6,{children:[o&&ac("div",{className:"dropdown-menu-item__icon",children:o}),ac("div",{style:e,className:"dropdown-menu-item__text",children:ac(Ra,{children:r})}),t&&!n.editor.isMobile&&ac("div",{className:"dropdown-menu-item__shortcut",children:t})]})},lc=Z6;import q6,{useContext as J6}from"react";import{EVENT as Q6,composeEventHandlers as ek}from"@haoxin-web/excalidraw-common";var Yp=q6.createContext({}),sc=(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(),cc=(e,o)=>{let t=J6(Yp);return ek(e,r=>{let n=new CustomEvent(Q6.MENU_ITEM_SELECT,{bubbles:!0,cancelable:!0});o?.(n),n.defaultPrevented||t.onSelect?.(n)})};import{jsx as Vp}from"react/jsx-runtime";var Xp=({icon:e,value:o,order:t,children:r,shortcut:n,className:i,hovered:a,selected:l,textStyle:s,onSelect:m,onClick:c,...d})=>{let p=cc(c,m),u=ok(null);return tk(()=>{a&&(t===0?u.current?.scrollIntoView({block:"end"}):u.current?.scrollIntoView({block:"nearest"}))},[a,t]),Vp("button",{...d,ref:u,value:o,onClick:p,className:sc(i,l,a),title:d.title??d["aria-label"],children:Vp(lc,{textStyle:s,icon:e,shortcut:n,children:r})})};Xp.displayName="DropdownMenuItem";var ni={GREEN:"green",RED:"red",BLUE:"blue"},dc=({type:e=ni.BLUE,children:o})=>{let{theme:t}=Mo(),r={display:"inline-flex",marginLeft:"auto",padding:"2px 4px",borderRadius:6,fontSize:9,fontFamily:"Cascadia, monospace",border:t===rk.LIGHT?"1.5px solid white":"none"};switch(e){case ni.GREEN:Object.assign(r,{backgroundColor:"var(--background-color-badge)",color:"var(--color-badge)"});break;case ni.RED:Object.assign(r,{backgroundColor:"pink",color:"darkred"});break;case ni.BLUE:default:Object.assign(r,{background:"var(--color-promo)",color:"var(--color-surface-lowest)"})}return Vp("div",{className:"DropDownMenuItemBadge",style:r,children:o})};dc.displayName="DropdownMenuItemBadge";Xp.Badge=dc;var xt=Xp;import{KEYS as ii}from"@haoxin-web/excalidraw-common";var hx=({event:e,inputRef:o,hoveredFont:t,filteredFonts:r,onClose:n,onSelect:i,onHover:a})=>{if(!e[ii.CTRL_OR_CMD]&&e.shiftKey&&e.key.toLowerCase()===ii.F)return o.current?.focus(),!0;if(e.key===ii.ESCAPE)return n(),!0;if(e.key===ii.ENTER)return t?.value&&i(t.value),!0;if(e.key===ii.ARROW_DOWN)return t?.next?a(t.next.value):r[0]?.value&&a(r[0].value),!0;if(e.key===ii.ARROW_UP)return t?.prev?a(t.prev.value):r[r.length-1]?.value&&a(r[r.length-1].value),!0};import{jsx as Na,jsxs as gx}from"react/jsx-runtime";var pk=e=>{switch(e){case sn.Excalifont:case sn.Virgil:return Nt;case sn.Nunito:case sn.Helvetica:return Ca;case sn["Lilita One"]:return Qb;case sn["Comic Shanns"]:case sn.Cascadia:return _s;default:return Ca}},fx=nk.memo(({selectedFontFamily:e,hoveredFontFamily:o,onSelect:t,onHover:r,onLeave:n,onOpen:i,onClose:a})=>{let{container:l}=Xe(),{fonts:s}=Oe(),{showDeprecatedFonts:m}=Lo(),[c,d]=ik(""),p=ak(null),u=Tr(()=>Array.from(dr.registered.entries()).filter(([M,{metadata:R}])=>!R.private&&!R.fallback).map(([M,{metadata:R,fontFaces:L}])=>{let k={value:M,icon:pk(M),text:L[0]?.fontFace?.family??"Unknown"};return R.deprecated&&Object.assign(k,{deprecated:R.deprecated,badge:{type:ni.RED,placeholder:h("fontList.badge.old")}}),k}).sort((M,R)=>M.text.toLowerCase()>R.text.toLowerCase()?1:-1),[]),f=Tr(()=>new Set(s.getSceneFamilies()),[e]),b=Tr(()=>u.filter(M=>f.has(M.value)),[u,f]),x=Tr(()=>u.filter(M=>!f.has(M.value)&&(m||!M.deprecated)),[u,f,m]),w=Tr(()=>ck([...b,...x].filter(M=>M.text?.toLowerCase().includes(c))),[b,x,c]),E=Tr(()=>{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=sk(M=>{hx({event:M,inputRef:p,hoveredFont:E,filteredFonts:w,onSelect:t,onHover:r,onClose:a})&&(M.preventDefault(),M.stopPropagation())},[E,w,t,r,a]);lk(()=>(i(),()=>{a()}),[]);let v=Tr(()=>w.filter(M=>f.has(M.value)),[w,f]),C=Tr(()=>w.filter(M=>!f.has(M.value)),[w,f]),S=(M,R)=>gx(xt,{icon:M.icon,value:M.value,order:R,textStyle:{fontFamily:mk({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&&Na(dc,{type:M.badge.type,children:M.badge.placeholder})]},M.value),P=[];return v.length&&P.push(Na(Da,{title:h("fontList.sceneFonts"),children:v.map(S)},"group_1")),C.length&&P.push(Na(Da,{title:h("fontList.availableFonts"),children:C.map((M,R)=>S(M,R+v.length))},"group_2")),gx(ec,{className:"properties-content",container:l,style:{width:"15rem"},onClose:a,onPointerLeave:n,onKeyDown:y,children:[Na(nc,{ref:p,placeholder:h("quickSearch.placeholder"),onChange:dk(d,20)}),Na(ic,{className:"dropdown-menu fonts manual-hover",placeholder:h("fontList.empty"),children:P.length?P:null})]})},(e,o)=>e.selectedFontFamily===o.selectedFontFamily&&e.hoveredFontFamily===o.hoveredFontFamily);import*as bx from"@radix-ui/react-popover";import{useMemo as uk}from"react";import{jsx as Kp}from"react/jsx-runtime";var xx=({selectedFontFamily:e})=>{let o=uk(()=>!!(e&&!Ex(e)),[e]);return Kp(bx.Trigger,{asChild:!0,children:Kp("div",{children:Kp(qn,{standalone:!0,icon:Wo,title:h("labels.showFonts"),className:"properties-trigger",testId:"font-family-show-fonts",active:o,onClick:()=>{}})})})};import{jsx as Ba,jsxs as yx}from"react/jsx-runtime";var vx=[{value:Zp.Excalifont,icon:Nt,text:h("labels.handDrawn"),testId:"font-family-hand-drawn"},{value:Zp.Nunito,icon:Ca,text:h("labels.normal"),testId:"font-family-normal"},{value:Zp["Comic Shanns"],icon:_s,text:h("labels.code"),testId:"font-family-code"}],bk=new Set(vx.map(e=>e.value)),Ex=e=>e?bk.has(e):!1,Tx=hk.memo(({isOpened:e,selectedFontFamily:o,hoveredFontFamily:t,onSelect:r,onHover:n,onLeave:i,onPopupChange:a})=>{let l=fk(()=>vx,[]),s=gk(m=>{m&&r(m)},[r]);return yx("div",{role:"dialog","aria-modal":"true",className:"FontPicker__container",children:[Ba("div",{className:"buttonList",children:Ba(Xt,{type:"button",options:l,value:o,onClick:s})}),Ba(qs,{}),yx(wx.Root,{open:e,onOpenChange:a,children:[Ba(xx,{selectedFontFamily:o}),e&&Ba(fx,{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 ai from"@radix-ui/react-popover";import wk from"clsx";import mc,{useEffect as vk}from"react";import{isArrowKey as Tk,KEYS as Vo}from"@haoxin-web/excalidraw-common";import{jsx as xk}from"react/jsx-runtime";var Ir=({icon:e})=>xk("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 yk,jsx as Ix,jsxs as Cx}from"react/jsx-runtime";var Ek=({label:e,open:o,openTrigger:t,children:r,className:n,showCollapsedIcon:i=!0})=>Cx(yk,{children:[Cx("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center"},className:n,onClick:t,children:[e,i&&Ix(Ir,{icon:o?R0:Us})]}),o&&Ix("div",{style:{display:"flex",flexDirection:"column"},children:r})]}),Fa=Ek;import{jsx as cn,jsxs as $p}from"react/jsx-runtime";var Ik=he(!1);function Ck({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===Vo.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(Tk(u.key)){let b=Uo().rtl,x=e.findIndex(w=>w.value===o);if(x!==-1){let w=e.length,E=x;switch(u.key){case(b?Vo.ARROW_LEFT:Vo.ARROW_RIGHT):E=(x+1)%w;break;case(b?Vo.ARROW_RIGHT:Vo.ARROW_LEFT):E=(w+x-1)%w;break;case Vo.ARROW_DOWN:{E=(x+(i??1))%w;break}case Vo.ARROW_UP:{E=(w+x-(i??1))%w;break}}r(e[E].value)}u.preventDefault()}else(u.key===Vo.ESCAPE||u.key===Vo.ENTER)&&(u.preventDefault(),n());u.nativeEvent.stopImmediatePropagation(),u.stopPropagation()},[s,m]=ce(Ik),c=mc.useMemo(()=>e.slice(0,i),[e,i]),d=mc.useMemo(()=>e.slice(i),[e,i]);vk(()=>{c.some(u=>u.value===o)||m(!0)},[o,c,m]);let p=u=>cn("div",{className:"picker-content",children:u.map((f,b)=>$p("button",{type:"button",className:wk("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&&cn("span",{className:"picker-keybinding",children:f.keyBinding})]},f.text))});return cn(ai.Content,{side:a.editor.isMobile&&!a.viewport.isLandscape?"top":"bottom",align:"start",sideOffset:12,style:{zIndex:"var(--zIndex-popup)"},onKeyDown:l,children:$p("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":t,children:[p(c),d.length>0&&cn(Fa,{label:h("labels.more_options"),open:s,openTrigger:()=>{m(u=>!u)},className:"picker-collapsible",children:p(d)})]})})}function jp({value:e,label:o,options:t,onChange:r,group:n="",numberOfOptionsToAlwaysShow:i}){let[a,l]=mc.useState(!1),s=mc.useRef(null);return cn("div",{children:$p(ai.Root,{open:a,onOpenChange:m=>l(m),children:[cn(ai.Trigger,{name:n,type:"button","aria-label":o,onClick:()=>l(!a),ref:s,className:a?"active":"",children:t.find(m=>m.value===e)?.icon}),a&&cn(Ck,{options:t,value:e,label:o,onChange:r,onClose:()=>{l(!1)},numberOfOptionsToAlwaysShow:i})]})})}import Sx,{useEffect as Sk}from"react";import{jsx as qp,jsxs as kx}from"react/jsx-runtime";var Mx=({updateData:e,app:o,testId:t})=>{let r=Sx.useRef(null),n=Sx.useRef(null),i=o.scene.getSelectedElements(o.state),a=!0,l=i.at(0),m=i.reduce((c,d)=>(c!=null&&c!==d.opacity&&(a=!1),c==null||c>d.opacity?d.opacity:c),l?.opacity??null)??o.state.currentItemOpacity;return Sk(()=>{if(r.current&&n.current){let c=r.current,d=n.current,p=c.offsetWidth,u=15,f=m/100*(p-u)+u/2;d.style.left=`${f}px`,c.style.background=`linear-gradient(to right, var(--color-slider-track) 0%, var(--color-slider-track) ${m}%, var(--button-bg) ${m}%, var(--button-bg) 100%)`}},[m]),kx("label",{className:"control-label",children:[h("labels.opacity"),kx("div",{className:"range-wrapper",children:[qp("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:m,className:"range-input","data-testid":t}),qp("div",{className:"value-bubble",ref:n,children:m!==0?m:null}),qp("div",{className:"zero-label",children:"0"})]})]})};import{Fragment as Bx,jsx as te,jsxs as Mt}from"react/jsx-runtime";var Nx=.1,Et=(e,o,t,r=!1)=>{let n=ru(J(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=Dx(e),l=null;if(i&&(l=t(i)),!l)if(we(a,o.state)){let m=o.scene.getSelectedElements(o.state),c=r===!0?m:m.filter(d=>r(d));l=Uk(c,t)??(typeof n=="function"?n(!0):n)}else l=typeof n=="function"?n(!1):n;return l},jk=(e,o,t)=>Vk(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}),nu=(e,o,t,r,n)=>{let i=new Set,a=Et(e,o,l=>{if(kt(l)){let s=r(l);i.add(s);let m=Qe(l,{fontSize:s});return Oa(m,t.scene.getContainerElement(l),t.scene),m=jk(l,m,t.scene),m}return l},!0);return J(e,o,{includeBoundTextElement:!0}).forEach(l=>{kt(l)&&Yk(l,t.scene)}),{elements:a,appState:{...o,currentItemFontSize:i.size===1?[...i][0]:n??o.currentItemFontSize},captureUpdate:et.IMMEDIATELY}},gc=F({name:"changeStrokeColor",label:"labels.stroke",trackEvent:!1,perform:(e,o,t)=>({...t.currentItemStrokeColor&&{elements:Et(e,o,r=>Kk(r.type)?Qe(r,{strokeColor:t.currentItemStrokeColor}):r,!0)},appState:{...o,...t},captureUpdate:t.currentItemStrokeColor?et.IMMEDIATELY:et.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Mt(Bx,{children:[te("h3",{"aria-hidden":"true",children:h("labels.stroke")}),te(vr,{topPicks:Dk,palette:_k,type:"elementStroke",label:h("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})]})}),fc=F({name:"changeBackgroundColor",label:"labels.changeBackground",trackEvent:!1,perform:(e,o,t,r)=>{if(!t.currentItemBackgroundColor)return{appState:{...o,...t},captureUpdate:et.EVENTUALLY};let n,i=r.scene.getSelectedElements(o);if(!Gk(t.currentItemBackgroundColor)&&i.every(l=>Ax(l)&&Wk(l.points))){let l=ru(i);n=e.map(s=>l.has(s.id)&&Ax(s)?Qe(s,{backgroundColor:t.currentItemBackgroundColor,...$k(s,!0)}):s)}else n=Et(e,o,l=>Qe(l,{backgroundColor:t.currentItemBackgroundColor}));return{elements:n,appState:{...o,...t},captureUpdate:et.IMMEDIATELY}},PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Mt(Bx,{children:[te("h3",{"aria-hidden":"true",children:h("labels.background")}),te(vr,{topPicks:Ak,palette:Pk,type:"elementBackground",label:h("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})]})}),za=F({name:"changeFillStyle",label:"labels.fill",trackEvent:!1,perform:(e,o,t,r)=>(ae("element","changeFillStyle",`${t} (${r.device.editor.isMobile?"mobile":"desktop"})`),{elements:Et(e,o,n=>Qe(n,{fillStyle:t})),appState:{...o,currentItemFillStyle:t},captureUpdate:et.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=J(e,o),i=n.length>0&&n.every(a=>a.fillStyle==="zigzag");return Mt("fieldset",{children:[te("legend",{children:h("labels.fill")}),te("div",{className:"buttonList",children:te(Xt,{type:"button",options:[{value:"hachure",text:`${i?h("labels.zigzag"):h("labels.hachure")} (${zk("Alt-Click")})`,icon:i?Lb:Ls,active:i?!0:void 0,testId:"fill-hachure"},{value:"cross-hatch",text:h("labels.crossHatch"),icon:Ps,testId:"fill-cross-hatch"},{value:"solid",text:h("labels.solid"),icon:As,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(m=>m.fillStyle==="hachure")?"zigzag":a;t(s)}})})]})}}),Ko=F({name:"changeStrokeWidth",label:"labels.strokeWidth",trackEvent:!1,perform:(e,o,t)=>({elements:Et(e,o,r=>Qe(r,{strokeWidth:t})),appState:{...o,currentItemStrokeWidth:t},captureUpdate:et.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Mt("fieldset",{children:[te("legend",{children:h("labels.strokeWidth")}),te("div",{className:"buttonList",children:te(Xt,{group:"stroke-width",options:[{value:eu.thin,text:h("labels.thin"),icon:Wn,testId:"strokeWidth-thin"},{value:eu.bold,text:h("labels.bold"),icon:Ta,testId:"strokeWidth-bold"},{value:eu.extraBold,text:h("labels.extraBold"),icon:Ia,testId:"strokeWidth-extraBold"}],value:ze(e,r,n=>n.strokeWidth,n=>n.hasOwnProperty("strokeWidth"),n=>n?null:o.currentItemStrokeWidth),onChange:n=>t(n)})})]})}),qk=F({name:"changeSloppiness",label:"labels.sloppiness",trackEvent:!1,perform:(e,o,t)=>({elements:Et(e,o,r=>Qe(r,{seed:Fk(),roughness:t})),appState:{...o,currentItemRoughness:t},captureUpdate:et.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Mt("fieldset",{children:[te("legend",{children:h("labels.sloppiness")}),te("div",{className:"buttonList",children:te(Xt,{group:"sloppiness",options:[{value:0,text:h("labels.architect"),icon:_b},{value:1,text:h("labels.artist"),icon:Db},{value:2,text:h("labels.cartoonist"),icon:Rb}],value:ze(e,r,n=>n.roughness,n=>n.hasOwnProperty("roughness"),n=>n?null:o.currentItemRoughness),onChange:n=>t(n)})})]})}),kj=F({name:"changeStrokeStyle",label:"labels.strokeStyle",trackEvent:!1,perform:(e,o,t)=>({elements:Et(e,o,r=>Qe(r,{strokeStyle:t})),appState:{...o,currentItemStrokeStyle:t},captureUpdate:et.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Mt("fieldset",{children:[te("legend",{children:h("labels.strokeStyle")}),te("div",{className:"buttonList",children:te(Xt,{group:"strokeStyle",options:[{value:"solid",text:h("labels.strokeStyle_solid"),icon:Wn},{value:"dashed",text:h("labels.strokeStyle_dashed"),icon:Pb},{value:"dotted",text:h("labels.strokeStyle_dotted"),icon:Ab}],value:ze(e,r,n=>n.strokeStyle,n=>n.hasOwnProperty("strokeStyle"),n=>n?null:o.currentItemStrokeStyle),onChange:n=>t(n)})})]})}),Jk=F({name:"changeOpacity",label:"labels.opacity",trackEvent:!1,perform:(e,o,t)=>({elements:Et(e,o,r=>Qe(r,{opacity:t}),!0),appState:{...o,currentItemOpacity:t},captureUpdate:et.IMMEDIATELY}),PanelComponent:({app:e,updateData:o})=>te(Mx,{updateData:o,app:e,testId:"opacity"})}),iu=F({name:"changeFontSize",label:"labels.fontSize",trackEvent:!1,perform:(e,o,t,r)=>nu(e,o,r,()=>t,t),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Mt("fieldset",{children:[te("legend",{children:h("labels.fontSize")}),te("div",{className:"buttonList",children:te(Xt,{group:"font-size",options:[{value:16,text:h("labels.small"),icon:$b,testId:"fontSize-small"},{value:20,text:h("labels.medium"),icon:jb,testId:"fontSize-medium"},{value:28,text:h("labels.large"),icon:qb,testId:"fontSize-large"},{value:36,text:h("labels.veryLarge"),icon:Jb,testId:"fontSize-veryLarge"}],value:ze(e,r,n=>{if(kt(n))return n.fontSize;let i=Cr(n,r.scene.getNonDeletedElementsMap());return i?i.fontSize:null},n=>kt(n)||Cr(n,r.scene.getNonDeletedElementsMap())!==null,n=>n?null:o.currentItemFontSize||Nk),onChange:n=>t(n)})})]})}),au=F({name:"decreaseFontSize",label:"labels.decreaseFontSize",icon:an,trackEvent:!1,perform:(e,o,t,r)=>nu(e,o,r,n=>Math.round(1/(1+Nx)*n.fontSize)),keyTest:e=>e[li.CTRL_OR_CMD]&&e.shiftKey&&(e.key===li.CHEVRON_LEFT||e.key===li.COMMA)}),lu=F({name:"increaseFontSize",label:"labels.increaseFontSize",icon:an,trackEvent:!1,perform:(e,o,t,r)=>nu(e,o,r,n=>Math.round(n.fontSize*(1+Nx))),keyTest:e=>e[li.CTRL_OR_CMD]&&e.shiftKey&&(e.key===li.CHEVRON_RIGHT||e.key===li.PERIOD)}),Qk=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:Et(e,o,b=>{let x=n?.get(b.id);return x?Qe(b,{...x}):b},!0),appState:{...o,...l},captureUpdate:et.NEVER};let{currentItemFontFamily:s,currentHoveredFontFamily:m}=t,c=et.EVENTUALLY,d,p=!1;if(s)d=s,c=et.IMMEDIATELY;else if(m){d=m,c=et.EVENTUALLY;let f=J(e,o,{includeBoundTextElement:!0}).filter(b=>kt(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(d&&!p){let f=new Map,b=new Set,x=!1,w=Array.from(dr.loadedFontsCache.values()),E=Object.entries(Bk).find(([C,S])=>S===d)?.[0];m&&E&&w.some(C=>C.startsWith(E))&&(x=!0),Object.assign(u,{elements:Et(e,o,C=>{if(kt(C)&&(C.fontFamily!==d||s)){let S=Qe(C,{fontFamily:d,lineHeight:Hk(d)}),P=n?.get(C.containerId||"")||{},M=r.scene.getContainerElement(C);return a&&M&&P&&r.scene.mutateElement(M,{...P}),x||(b=new Set([...b,...Array.from(S.originalText)])),f.set(S,M),S}return C},!0)});let y=`10px ${Ok({fontFamily:d})}`,v=Array.from(b.values()).join();if(x||window.document.fonts.check(y,v))for(let[C,S]of f)Oa(C,S,r.scene);else window.document.fonts.load(y,v).then(C=>{for(let[S,P]of f){let M=r.scene.getElement(S.id),R=P?r.scene.getElement(P.id):null;M&&Oa(M,R,r.scene)}r.fonts.onLoaded(C)})}return u},PanelComponent:({elements:e,appState:o,app:t,updateData:r})=>{let n=Qp(new Map),i=Qp(null),[a,l]=Lk({}),s=Qp(!0),m=Mk(()=>{let c=(d,p)=>ze(d,t,u=>{if(kt(u))return u.fontFamily;let f=Cr(u,p);return f?f.fontFamily:null},u=>kt(u)||Cr(u,p)!==null,u=>u?null:o.currentItemFontFamily||Rk);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 Jp(()=>{i.current=m},[m]),Jp(()=>{Object.keys(a).length&&(r(a),l({}))},[a]),Jp(()=>(s.current=!1,()=>{s.current=!0}),[]),Mt("fieldset",{children:[te("legend",{children:h("labels.fontFamily")}),te(Tx,{isOpened:o.openPopup==="fontFamily",selectedFontFamily:m,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:d}=o;if(d?.type==="text"){let p=t.scene.getElement(d.id);n.current.set(d.id,Qe(p||d,{},!0))}else{let p=J(e,o,{includeBoundTextElement:!0});for(let u of p)n.current.set(u.id,Qe(u,{},!0))}l({openPopup:"fontFamily"})}else{let d={openPopup:null,currentHoveredFontFamily:null,cachedElements:new Map(n.current),resetAll:!0};s.current?r({...a,...d}):l(d),n.current.clear()}}})]})}}),Ha=F({name:"changeTextAlign",label:"Change text alignment",trackEvent:!1,perform:(e,o,t,r)=>({elements:Et(e,o,n=>{if(kt(n)){let i=Qe(n,{textAlign:t});return Oa(i,r.scene.getContainerElement(n),r.scene),i}return n},!0),appState:{...o,currentItemTextAlign:t},captureUpdate:et.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=r.scene.getNonDeletedElementsMap();return Mt("fieldset",{children:[te("legend",{children:h("labels.textAlign")}),te("div",{className:"buttonList",children:te(Xt,{group:"text-align",options:[{value:"left",text:h("labels.left"),icon:Ds,testId:"align-left"},{value:"center",text:h("labels.center"),icon:Rs,testId:"align-horizontal-center"},{value:"right",text:h("labels.right"),icon:Ns,testId:"align-right"}],value:ze(e,r,i=>{if(kt(i))return i.textAlign;let a=Cr(i,n);return a?a.textAlign:null},i=>kt(i)||Cr(i,n)!==null,i=>i?null:o.currentItemTextAlign),onChange:i=>t(i)})})]})}}),e4=F({name:"changeVerticalAlign",label:"Change vertical alignment",trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:Et(e,o,n=>{if(kt(n)){let i=Qe(n,{verticalAlign:t});return Oa(i,r.scene.getContainerElement(n),r.scene),i}return n},!0),appState:{...o},captureUpdate:et.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>te("fieldset",{children:te("div",{className:"buttonList",children:te(Xt,{group:"text-align",options:[{value:pc.TOP,text:h("labels.alignTop"),icon:te(e0,{theme:o.theme}),testId:"align-top"},{value:pc.MIDDLE,text:h("labels.centerVertically"),icon:te(o0,{theme:o.theme}),testId:"align-middle"},{value:pc.BOTTOM,text:h("labels.alignBottom"),icon:te(t0,{theme:o.theme}),testId:"align-bottom"}],value:ze(e,r,n=>{if(kt(n)&&n.containerId)return n.verticalAlign;let i=Cr(n,r.scene.getNonDeletedElementsMap());return i?i.verticalAlign:null},n=>kt(n)||Cr(n,r.scene.getNonDeletedElementsMap())!==null,n=>n?null:pc.MIDDLE),onChange:n=>t(n)})})})}),Mj=F({name:"changeRoundness",label:"Change edge roundness",trackEvent:!1,perform:(e,o,t)=>({elements:Et(e,o,r=>Rx(r)?r:Qe(r,{roundness:t==="round"?{type:Xk(r.type)?uc.ADAPTIVE_RADIUS:uc.PROPORTIONAL_RADIUS}:null})),appState:{...o,currentItemRoundness:t},captureUpdate:et.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r,renderAction:n})=>{let a=rs(Dx(e),o).some(l=>l.roundness?.type===uc.LEGACY);return Mt("fieldset",{children:[te("legend",{children:h("labels.edges")}),Mt("div",{className:"buttonList",children:[te(Xt,{group:"edges",options:[{value:"sharp",text:h("labels.sharp"),icon:Nb},{value:"round",text:h("labels.round"),icon:Bb}],value:ze(e,r,l=>a?null:l.roundness?"round":"sharp",l=>!hc(l)&&l.hasOwnProperty("roundness"),l=>l?null:o.currentItemRoundness),onChange:l=>t(l)}),n("togglePolygon")]})]})}}),_x=e=>[{value:null,text:h("labels.arrowhead_none"),keyBinding:"q",icon:Fb},{value:"arrow",text:h("labels.arrowhead_arrow"),keyBinding:"w",icon:te(Ob,{flip:e})},{value:"triangle",text:h("labels.arrowhead_triangle"),icon:te(Ub,{flip:e}),keyBinding:"e"},{value:"triangle_outline",text:h("labels.arrowhead_triangle_outline"),icon:te(Wb,{flip:e}),keyBinding:"r"},{value:"circle",text:h("labels.arrowhead_circle"),keyBinding:"a",icon:te(zb,{flip:e})},{value:"circle_outline",text:h("labels.arrowhead_circle_outline"),keyBinding:"s",icon:te(Hb,{flip:e})},{value:"diamond",text:h("labels.arrowhead_diamond"),icon:te(Yb,{flip:e}),keyBinding:"d"},{value:"diamond_outline",text:h("labels.arrowhead_diamond_outline"),icon:te(Vb,{flip:e}),keyBinding:"f"},{value:"bar",text:h("labels.arrowhead_bar"),keyBinding:"z",icon:te(Gb,{flip:e})},{value:"crowfoot_one",text:h("labels.arrowhead_crowfoot_one"),icon:te(Kb,{flip:e}),keyBinding:"x"},{value:"crowfoot_many",text:h("labels.arrowhead_crowfoot_many"),icon:te(Xb,{flip:e}),keyBinding:"c"},{value:"crowfoot_one_or_many",text:h("labels.arrowhead_crowfoot_one_or_many"),icon:te(Zb,{flip:e}),keyBinding:"v"}],Lj=F({name:"changeArrowhead",label:"Change arrowheads",trackEvent:!1,perform:(e,o,t)=>({elements:Et(e,o,r=>{if(ou(r)){let{position:n,type:i}=t;if(n==="start")return Qe(r,{startArrowhead:i});if(n==="end")return Qe(r,{endArrowhead:i})}return r}),appState:{...o,[t.position==="start"?"currentItemStartArrowhead":"currentItemEndArrowhead"]:t.type},captureUpdate:et.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=Uo().rtl;return Mt("fieldset",{children:[te("legend",{children:h("labels.arrowheads")}),Mt("div",{className:"iconSelectList buttonList",children:[te(jp,{label:"arrowhead_start",options:_x(!n),value:ze(e,r,i=>ou(i)&&_n(i.type)?i.startArrowhead:o.currentItemStartArrowhead,!0,o.currentItemStartArrowhead),onChange:i=>t({position:"start",type:i}),numberOfOptionsToAlwaysShow:4}),te(jp,{label:"arrowhead_end",group:"arrowheads",options:_x(!!n),value:ze(e,r,i=>ou(i)&&_n(i.type)?i.endArrowhead:o.currentItemEndArrowhead,!0,o.currentItemEndArrowhead),onChange:i=>t({position:"end",type:i}),numberOfOptionsToAlwaysShow:4})]})]})}}),Pj=F({name:"changeArrowType",label:"Change arrow types",trackEvent:!1,perform:(e,o,t,r)=>{let n=Et(e,o,l=>{if(!hc(l))return l;let s=Qe(l,{roundness:t===Xo.round?{type:uc.PROPORTIONAL_RADIUS}:null,elbowed:t===Xo.elbow,points:t===Xo.elbow||l.elbowed?[l.points[0],l.points[l.points.length-1]]:l.points});if(Rx(s)){s.fixedSegments=null;let m=r.scene.getNonDeletedElementsMap();r.dismissLinearEditor();let c=tu.getPointAtIndexGlobalCoordinates(s,0,m),d=tu.getPointAtIndexGlobalCoordinates(s,-1,m),p=s.startBinding&&m.get(s.startBinding.elementId),u=s.endBinding&&m.get(s.endBinding.elementId),f=p&&s.startBinding?{...s.startBinding,...Px(s,p,"start",m)}:null,b=u&&s.endBinding?{...s.endBinding,...Px(s,u,"end",m)}:null;s={...s,startBinding:f,endBinding:b,...Zk(s,m,{points:[c,d].map(x=>kk(x[0]-s.x,x[1]-s.y)),startBinding:f,endBinding:b,fixedSegments:null})}}else{let m=r.scene.getNonDeletedElementsMap();if(s.startBinding){let c=m.get(s.startBinding.elementId);c&&Lx(s,c,"start",r.scene)}if(s.endBinding){let c=m.get(s.endBinding.elementId);c&&Lx(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 tu(l,ru(e)))}return{elements:n,appState:i,captureUpdate:et.IMMEDIATELY}},PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Mt("fieldset",{children:[te("legend",{children:h("labels.arrowtypes")}),te("div",{className:"buttonList",children:te(Xt,{group:"arrowtypes",options:[{value:Xo.sharp,text:h("labels.arrowtype_sharp"),icon:zs,testId:"sharp-arrow"},{value:Xo.round,text:h("labels.arrowtype_round"),icon:Gs,testId:"round-arrow"},{value:Xo.elbow,text:h("labels.arrowtype_elbowed"),icon:Hs,testId:"elbow-arrow"}],value:ze(e,r,n=>hc(n)?n.elbowed?Xo.elbow:n.roundness?Xo.round:Xo.sharp:null,n=>hc(n),n=>n?null:o.currentItemArrowType),onChange:n=>t(n)})})]})});import{clamp as pu,roundToStep as l4}from"@haoxin-web/excalidraw-math";import{DEFAULT_CANVAS_BACKGROUND_PICKS as s4,CURSOR_TYPE as Gx,MAX_ZOOM as Ux,MIN_ZOOM as Wx,THEME as Ga,ZOOM_STEP as uu,getShortcutKey as Yx,updateActiveTool as ci,CODES as Ao,KEYS as $o}from"@haoxin-web/excalidraw-common";import{getNonDeletedElements as c4}from"@haoxin-web/excalidraw-element";import{newElementWith as d4}from"@haoxin-web/excalidraw-element";import{getCommonBounds as m4}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as uo}from"@haoxin-web/excalidraw-element";import{useEffect as t4}from"react";import{jsx as r4}from"react/jsx-runtime";var si=()=>{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},su=(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`})},o4=(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();su(o,n)},po=({children:e,label:o,long:t=!1,style:r,disabled:n})=>(t4(()=>()=>si().classList.remove("excalidraw-tooltip--visible"),[]),n?null:r4("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:i=>o4(i.currentTarget,si(),o,t),onPointerLeave:()=>si().classList.remove("excalidraw-tooltip--visible"),style:r,children:e}));import bc from"open-color";import{CURSOR_TYPE as cu,MIME_TYPES as du,THEME as Ox}from"@haoxin-web/excalidraw-common";var zx='<svg viewBox="0 0 24 24" stroke-width="1" width="28" height="28" xmlns="http://www.w3.org/2000/svg">',n4='<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"/>',Hx='<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"/>',i4=`data:${du.svg},${encodeURIComponent(`${zx}${Hx}</svg>`)}`,a4=`data:${du.svg},${encodeURIComponent(`${zx}${n4}${Hx}</svg>`)}`,Zt=e=>{e&&(e.style.cursor="")},ye=(e,o)=>{e&&(e.style.cursor=o)},Po,Fx,mu=(e,o)=>{let r=()=>{let n=o===Ox.DARK;Po=document.createElement("canvas"),Po.theme=o,Po.height=20,Po.width=20;let i=Po.getContext("2d");i.lineWidth=1,i.beginPath(),i.arc(Po.width/2,Po.height/2,5,0,2*Math.PI),i.fillStyle=n?bc.black:bc.white,i.fill(),i.strokeStyle=n?bc.white:bc.black,i.stroke(),Fx=Po.toDataURL(du.svg)};(!Po||Po.theme!==o)&&r(),ye(e,`url(${Fx}) ${20/2} ${20/2}, auto`)},Ot=(e,o)=>{if(e)if(o.activeTool.type==="selection")Zt(e);else if(lo(o))e.style.cursor=cu.GRAB;else if(St(o))mu(e,o.theme);else if(o.activeTool.type==="laser"){let t=o.theme===Ox.LIGHT?i4:a4;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=cu.AUTO):e.style.cursor=cu.CROSSHAIR};var Zo=({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),m=-(n-n/t),c=-(i-i/t);return{scrollX:l+m,scrollY:s+c,zoom:{value:t}}};import{jsx as vc,jsxs as h4}from"react/jsx-runtime";var xc=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?uo.IMMEDIATELY:uo.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t,appProps:r})=>vc(vr,{palette:null,topPicks:s4,label:h("labels.canvasBackground"),type:"canvasBackground",color:o.viewBackgroundColor,onChange:n=>t({viewBackgroundColor:n}),"data-testid":"canvas-background-picker",elements:e,appState:o,updateData:t})}),jo=F({name:"clearCanvas",label:"labels.clearCanvas",icon:Bt,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=>d4(n,{isDeleted:!0})),appState:{...mr(),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:uo.IMMEDIATELY})}),Ec=F({name:"zoomIn",label:"buttons.zoomIn",viewMode:!0,icon:ep,trackEvent:{category:"canvas"},predicate:(e,o,t)=>t.showZoomActions!==!1,perform:(e,o,t,r)=>({appState:{...o,...Zo({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:Co(o.zoom.value+uu)},o),userToFollow:null},captureUpdate:uo.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>vc(z,{type:"button",className:"zoom-in-button zoom-button",icon:ep,title:`${h("buttons.zoomIn")} \u2014 ${Yx("CtrlOrCmd++")}`,"aria-label":h("buttons.zoomIn"),disabled:o.zoom.value>=Ux,onClick:()=>{e(null)}}),keyTest:(e,o,t,r)=>r.props.showZoomActions!==!1&&(e.code===Ao.EQUAL||e.code===Ao.NUM_ADD)&&(e[$o.CTRL_OR_CMD]||e.shiftKey)}),yc=F({name:"zoomOut",label:"buttons.zoomOut",icon:tp,viewMode:!0,trackEvent:{category:"canvas"},predicate:(e,o,t)=>t.showZoomActions!==!1,perform:(e,o,t,r)=>({appState:{...o,...Zo({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:Co(o.zoom.value-uu)},o),userToFollow:null},captureUpdate:uo.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>vc(z,{type:"button",className:"zoom-out-button zoom-button",icon:tp,title:`${h("buttons.zoomOut")} \u2014 ${Yx("CtrlOrCmd+-")}`,"aria-label":h("buttons.zoomOut"),disabled:o.zoom.value<=Wx,onClick:()=>{e(null)}}),keyTest:(e,o,t,r)=>r.props.showZoomActions!==!1&&(e.code===Ao.MINUS||e.code===Ao.NUM_SUBTRACT)&&(e[$o.CTRL_OR_CMD]||e.shiftKey)}),wc=F({name:"resetZoom",label:"buttons.resetZoom",icon:mb,viewMode:!0,trackEvent:{category:"canvas"},predicate:(e,o,t)=>t.showZoomActions!==!1,perform:(e,o,t,r)=>({appState:{...o,...Zo({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:Co(1)},o),userToFollow:null},captureUpdate:uo.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>vc(po,{label:h("buttons.resetZoom"),style:{height:"100%"},children:h4(z,{type:"button",className:"reset-zoom-button zoom-button",title:h("buttons.resetZoom"),"aria-label":h("buttons.resetZoom"),onClick:()=>{e(null)},children:[(o.zoom.value*100).toFixed(0),"%"]})}),keyTest:(e,o,t,r)=>r.props.showZoomActions!==!1&&(e.code===Ao.ZERO||e.code===Ao.NUM_ZERO)&&(e[$o.CTRL_OR_CMD]||e.shiftKey)}),p4=(e,o,t=1)=>{let[r,n,i,a]=e,l=i-r,s=o.width/l,m=a-n,c=o.height/m,p=Math.min(s,c)*pu(t,.1,1);return Math.min(p,1)},Vx=({bounds:e,appState:o,canvasOffsets:t,fitToViewport:r=!1,viewportZoomFactor:n=1,minZoom:i=-1/0,maxZoom:a=1/0})=>{n=pu(n,Wx,Ux);let[l,s,m,c]=e,d=(l+m)/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=m-l,P=c-s;y=Math.min(w/S,E/P)*n}else y=p4(e,{width:w,height:E},n);let v=Co(pu(l4(y,uu,"floor"),i,a)),C=S1({scenePoint:{x:d,y:p},viewportDimensions:{width:o.width,height:o.height},offsets:t,zoom:{value:v}});return{appState:{...o,scrollX:C.scrollX,scrollY:C.scrollY,zoom:{value:v}},captureUpdate:uo.EVENTUALLY}},di=({canvasOffsets:e,targetElements:o,appState:t,fitToViewport:r,viewportZoomFactor:n,minZoom:i,maxZoom:a})=>{let l=m4(c4(o));return Vx({canvasOffsets:e,bounds:l,appState:t,fitToViewport:r,viewportZoomFactor:n,minZoom:i,maxZoom:a})},pq=F({name:"zoomToFitSelectionInViewport",label:"labels.zoomToFitViewport",icon:Os,trackEvent:{category:"canvas"},predicate:(e,o,t)=>t.showZoomActions!==!1,perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);return di({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===Ao.TWO&&e.shiftKey&&!e.altKey&&!e[$o.CTRL_OR_CMD]}),uq=F({name:"zoomToFitSelection",label:"helpDialog.zoomToSelection",icon:Os,trackEvent:{category:"canvas"},predicate:(e,o,t)=>t.showZoomActions!==!1,perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);return di({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===Ao.THREE&&e.shiftKey&&!e.altKey&&!e[$o.CTRL_OR_CMD]}),u4=F({name:"zoomToFit",label:"helpDialog.zoomToFit",icon:Os,viewMode:!0,trackEvent:{category:"canvas"},predicate:(e,o,t)=>t.showZoomActions!==!1,perform:(e,o,t,r)=>di({targetElements:e,appState:{...o,userToFollow:null},fitToViewport:!1,canvasOffsets:r.getEditorUIOffsets()}),keyTest:(e,o,t,r)=>r.props.showZoomActions!==!1&&e.code===Ao.ONE&&e.shiftKey&&!e.altKey&&!e[$o.CTRL_OR_CMD]}),dn=F({name:"toggleTheme",label:(e,o)=>o.theme===Ga.DARK?"buttons.lightMode":"buttons.darkMode",keywords:["toggle","dark","light","mode","theme"],icon:e=>e.theme===Ga.LIGHT?ya:wa,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t)=>({appState:{...o,theme:t||(o.theme===Ga.LIGHT?Ga.DARK:Ga.LIGHT)},captureUpdate:uo.EVENTUALLY}),keyTest:e=>e.altKey&&e.shiftKey&&e.code===Ao.D,predicate:(e,o,t,r)=>!!r.props.UIOptions.canvasActions.toggleTheme}),hq=F({name:"toggleEraserTool",label:"toolBar.eraser",trackEvent:{category:"toolbar"},perform:(e,o,t,r)=>{let n;return St(o)?n=ci(o,{...o.activeTool.lastActiveTool||{type:r.defaultSelectionTool},lastActiveToolBeforeEraser:null}):n=ci(o,{type:"eraser",lastActiveToolBeforeEraser:o.activeTool}),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n},captureUpdate:uo.IMMEDIATELY}},keyTest:e=>e.key===$o.E}),gq=F({name:"toggleLassoTool",label:"toolBar.lasso",icon:xs,trackEvent:{category:"toolbar"},predicate:(e,o,t,r)=>r.defaultSelectionTool!=="lasso",perform:(e,o,t,r)=>{let n;return o.activeTool.type!=="lasso"?(n=ci(o,{type:"lasso",fromSelection:!1}),ye(r.interactiveCanvas,Gx.CROSSHAIR)):n=ci(o,{type:"selection"}),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n},captureUpdate:uo.NEVER}}}),Xx=F({name:"toggleHandTool",label:"toolBar.hand",trackEvent:{category:"toolbar"},icon:Fs,viewMode:!1,predicate:(e,o,t)=>t.showPanActions!==!1,perform:(e,o,t,r)=>{let n;return lo(o)?n=ci(o,{...o.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):(n=ci(o,{type:"hand",lastActiveToolBeforeEraser:o.activeTool}),ye(r.interactiveCanvas,Gx.GRAB)),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n},captureUpdate:uo.IMMEDIATELY}},keyTest:(e,o,t,r)=>r.props.showPanActions!==!1&&!e.altKey&&!e[$o.CTRL_OR_CMD]&&e.key===$o.H});import{updateActiveTool as Kx}from"@haoxin-web/excalidraw-common";import{CaptureUpdateAction as g4}from"@haoxin-web/excalidraw-element";var f4=F({name:"setEmbeddableAsActiveTool",trackEvent:{category:"toolbar"},target:"Tool",label:"toolBar.embeddable",perform:(e,o,t,r)=>{let n=Kx(o,{type:"embeddable"});return Ot(r.canvas,{...o,activeTool:n}),{elements:e,appState:{...o,activeTool:Kx(o,{type:"embeddable"})},captureUpdate:g4.EVENTUALLY}}});import{pointFrom as b4}from"@haoxin-web/excalidraw-math";import{maybeBindLinearElement as x4,bindOrUnbindLinearElement as Zx,isBindingEnabled as E4}from"@haoxin-web/excalidraw-element/binding";import{isValidPolygon as $x,LinearElementEditor as Ua,newElementWith as hu}from"@haoxin-web/excalidraw-element";import{isBindingElement as Tc,isFreeDrawElement as jx,isLinearElement as qx,isLineElement as Ic}from"@haoxin-web/excalidraw-element";import{KEYS as gu,arrayToMap as fu,tupleToCoors as y4,updateActiveTool as Jx}from"@haoxin-web/excalidraw-common";import{isPathALoop as w4}from"@haoxin-web/excalidraw-element";import{isInvisiblySmallElement as bu}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as xu}from"@haoxin-web/excalidraw-element";import{jsx as v4}from"react/jsx-runtime";var zt=F({name:"finalize",label:"",trackEvent:!1,perform:(e,o,t,r)=>{let{interactiveCanvas:n,focusContainer:i,scene:a}=r,{event:l,sceneCoords:s}=t??{},m=a.getNonDeletedElementsMap();if(l&&o.selectedLinearElement){let u=Ua.handlePointerUp(l,o.selectedLinearElement,o,r.scene),{startBindingElement:f,endBindingElement:b}=u,x=r.scene.getElement(u.elementId);if(Tc(x)&&Zx(x,f,b,r.scene),u!==o.selectedLinearElement){let w=e;return x&&bu(x)&&(w=w.map(E=>E.id===x.id?hu(E,{isDeleted:!0}):E)),{elements:w,appState:{selectedLinearElement:{...u,selectedPointsIndices:null},suggestedBindings:[]},captureUpdate:xu.IMMEDIATELY}}}if(o.selectedLinearElement?.isEditing){let{elementId:u,startBindingElement:f,endBindingElement:b}=o.selectedLinearElement,x=Ua.getElement(u,m);if(x)return Tc(x)&&Zx(x,f,b,a),Ic(x)&&!$x(x.points)&&a.mutateElement(x,{polygon:!1}),{elements:x.points.length<2||bu(x)?e.map(w=>w.id===x.id?hu(w,{isDeleted:!0}):w):void 0,appState:{...o,cursorButton:"up",selectedLinearElement:new Ua(x,fu(m),!1)},captureUpdate:xu.IMMEDIATELY}}let c=e;window.document.activeElement instanceof HTMLElement&&i();let d=null;if(o.multiElement)d=o.multiElement;else if(o.newElement?.type==="freedraw"||Tc(o.newElement))d=o.newElement;else if(Object.keys(o.selectedElementIds).length===1){let u=m.get(Object.keys(o.selectedElementIds)[0]);u&&(d=u)}if(d){if(o.multiElement&&d.type!=="freedraw"){let{points:u,lastCommittedPoint:f}=d;(!f||u[u.length-1]!==f)&&a.mutateElement(d,{points:d.points.slice(0,-1)})}if(d&&bu(d)&&(c=c.map(u=>u.id===d?.id?hu(u,{isDeleted:!0}):u)),qx(d)||jx(d)){let u=w4(d.points,o.zoom.value);if(u&&(Ic(d)||jx(d))){let f=d.points,b=f[0],x=f.map((w,E)=>E===f.length-1?b4(b[0],b[1]):w);Ic(d)?a.mutateElement(d,{points:x,polygon:!0}):a.mutateElement(d,{points:x})}if(Ic(d)&&!$x(d.points)&&a.mutateElement(d,{polygon:!1}),Tc(d)&&!u&&d.points.length>1&&E4(o)){let f=s??y4(Ua.getPointAtIndexGlobalCoordinates(d,-1,fu(e)));x4(d,o,f,a)}}}(!o.activeTool.locked&&o.activeTool.type!=="freedraw"||!d)&&Zt(n);let p;return o.activeTool.type==="eraser"?p=Jx(o,{...o.activeTool.lastActiveTool||{type:r.defaultSelectionTool},lastActiveToolBeforeEraser:null}):p=Jx(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")&&d?o.activeTool:p,activeEmbeddable:null,newElement:null,selectionElement:null,multiElement:null,editingTextElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:d&&!o.activeTool.locked&&o.activeTool.type!=="freedraw"?{...o.selectedElementIds,[d.id]:!0}:o.selectedElementIds,selectedLinearElement:d&&qx(d)?new Ua(d,fu(c)):o.selectedLinearElement},captureUpdate:xu.IMMEDIATELY}},keyTest:(e,o)=>e.key===gu.ESCAPE&&(o.selectedLinearElement?.isEditing||!o.newElement&&o.multiElement===null)||(e.key===gu.ESCAPE||e.key===gu.ENTER)&&o.multiElement!==null,PanelComponent:({appState:e,updateData:o,data:t})=>v4(z,{type:"button",icon:vb,title:h("buttons.done"),"aria-label":h("buttons.done"),onClick:o,visible:e.multiElement!=null,size:t?.size||"medium",style:{pointerEvents:"all"}})});import{KEYS as ui,DEFAULT_EXPORT_PADDING as pM,EXPORT_SCALES as uM,THEME as wu}from"@haoxin-web/excalidraw-common";import{getNonDeletedElements as hM}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as bo}from"@haoxin-web/excalidraw-element";import T4 from"clsx";import{jsx as Qx,jsxs as I4}from"react/jsx-runtime";var Wa=({children:e,checked:o,onChange:t,className:r})=>I4("div",{className:T4("Checkbox",r,{"is-checked":o}),onClick:n=>{t(!o,n),n.currentTarget.querySelector(".Checkbox-box").focus()},children:[Qx("button",{type:"button",className:"Checkbox-box",role:"checkbox","aria-checked":o,children:fb}),Qx("div",{className:"Checkbox-label",children:e})]});import{THEME as Ya}from"@haoxin-web/excalidraw-common";import{jsx as Va}from"react/jsx-runtime";var tE=e=>{let o=e.title||(e.value===Ya.DARK?h("buttons.lightMode"):h("buttons.darkMode"));return Va(z,{type:"icon",icon:e.value===Ya.LIGHT?eE.MOON:eE.SUN,title:o,"aria-label":o,onClick:()=>e.onChange(e.value===Ya.DARK?Ya.LIGHT:Ya.DARK),"data-testid":"toggle-dark-mode"})},eE={SUN:Va("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:Va("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:Va("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:Va("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 C4}from"react";import{focusNearestParent as S4,KEYS as k4}from"@haoxin-web/excalidraw-common";import{jsx as oE,jsxs as M4}from"react/jsx-runtime";var rE=e=>{let{id:o}=Xe(),[t,r]=C4(e.value),n=a=>{e.ignoreFocus||S4(a.target);let l=a.target.value;l!==e.value&&e.onChange(l)},i=a=>{if(a.key===k4.ENTER){if(a.preventDefault(),a.nativeEvent.isComposing||a.keyCode===229)return;a.currentTarget.blur()}};return M4("div",{className:"ProjectName",children:[oE("label",{className:"ProjectName-label",htmlFor:"filename",children:`${e.label}:`}),oE("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 rM,DEFAULT_FILENAME as nM,IMAGE_MIME_TYPES as EE,isFirefox as iM,MIME_TYPES as aM,cloneJSON as lM,SVG_DOCUMENT_PREAMBLE as sM}from"@haoxin-web/excalidraw-common";import{getNonDeletedElements as cM}from"@haoxin-web/excalidraw-element";import{isFrameLikeElement as dM}from"@haoxin-web/excalidraw-element";import{getElementsOverlappingFrame as mM}from"@haoxin-web/excalidraw-element";import{ALLOWED_PASTE_MIME_TYPES as z4,EXPORT_DATA_TYPES as Za,MIME_TYPES as go,arrayToMap as H4,isMemberOf as G4,isPromiseLike as U4,EVENT as kc}from"@haoxin-web/excalidraw-common";import{mutateElement as W4}from"@haoxin-web/excalidraw-element";import{deepCopyElement as Y4}from"@haoxin-web/excalidraw-element";import{isFrameLikeElement as V4,isInitializedImageElement as X4}from"@haoxin-web/excalidraw-element";import{getContainingFrame as hE}from"@haoxin-web/excalidraw-element";import{pointFrom as Sr}from"@haoxin-web/excalidraw-math";import{COLOR_PALETTE as iE,DEFAULT_CHART_COLOR_INDEX as L4,getAllColorsSpecificShade as P4,DEFAULT_FONT_FAMILY as A4,DEFAULT_FONT_SIZE as aE,VERTICAL_ALIGN as _4,randomId as lE,isDevEnv as sE}from"@haoxin-web/excalidraw-common";import{newTextElement as Cc,newLinearElement as Ka,newElement as yu}from"@haoxin-web/excalidraw-element";var ho=32,Te=12,kr=256,cE=50,mn="NOT_SPREADSHEET",mi="VALID_SPREADSHEET",Xa=e=>{let o=/^([-+]?)[$€£¥₩]?([-+]?)([\d.,]+)[%]?$/.exec(e);return o?parseFloat(`${(o[1]||o[2])+o[3]}`.replace(/,/g,"")):null},Eu=(e,o)=>e.slice(1).every(t=>Xa(t[o])!==null),nE=e=>{let o=e[0].length;if(o>2)return{type:mn,reason:"More than 2 columns"};if(o===1){if(!Eu(e,0))return{type:mn,reason:"Value is not numeric"};let s=Xa(e[0][0])===null,m=(s?e.slice(1):e).map(c=>Xa(c[0]));return m.length<2?{type:mn,reason:"Less than two rows"}:{type:mi,spreadsheet:{title:s?e[0][0]:null,labels:null,values:m}}}let t=Eu(e,0),r=Eu(e,1);if(!t&&!r)return{type:mn,reason:"Value is not numeric"};let[n,i]=r?[0,1]:[1,0],a=Xa(e[0][i])===null,l=a?e.slice(1):e;return l.length<2?{type:mn,reason:"Less than 2 rows"}:{type:mi,spreadsheet:{title:a?e[0][i]:null,labels:l.map(s=>s[n]),values:l.map(s=>Xa(s[i]))}}},D4=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},dE=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:mn,reason:"No values"};let t=o[0].length;if(!o.every(i=>i.length===t))return{type:mn,reason:"All rows don't have same number of columns"};let n=nE(o);if(n.type!==mi){let i=nE(D4(o));if(i.type===mi)return i}return n},Sc=P4(L4),$t={fillStyle:"hachure",fontFamily:A4,fontSize:aE,opacity:100,roughness:1,strokeColor:iE.black,roundness:null,strokeStyle:"solid",strokeWidth:1,verticalAlign:_4.MIDDLE,locked:!1},mE=e=>{let o=(ho+Te)*e.values.length+Te,t=kr+Te*2;return{chartWidth:o,chartHeight:t}},R4=(e,o,t,r,n)=>e.labels?.map((i,a)=>Cc({groupIds:[r],backgroundColor:n,...$t,text:i.length>8?`${i.slice(0,5)}...`:i,x:o+a*(ho+Te)+Te*2,y:t+Te/2,width:ho,angle:5.87,fontSize:16,textAlign:"center",verticalAlign:"top"}))||[],N4=(e,o,t,r,n)=>{let i=Cc({groupIds:[r],backgroundColor:n,...$t,x:o-Te,y:t-Te,text:"0",textAlign:"right"}),a=Cc({groupIds:[r],backgroundColor:n,...$t,x:o-Te,y:t-kr-i.height/2,text:Math.max(...e.values).toLocaleString(),textAlign:"right"});return[i,a]},B4=(e,o,t,r,n)=>{let{chartWidth:i,chartHeight:a}=mE(e),l=Ka({backgroundColor:n,groupIds:[r],...$t,type:"line",x:o,y:t,width:i,points:[Sr(0,0),Sr(i,0)]}),s=Ka({backgroundColor:n,groupIds:[r],...$t,type:"line",x:o,y:t,height:a,points:[Sr(0,0),Sr(0,-a)]}),m=Ka({backgroundColor:n,groupIds:[r],...$t,type:"line",x:o,y:t-kr-Te,strokeStyle:"dotted",width:i,opacity:cE,points:[Sr(0,0),Sr(i,0)]});return[l,s,m]},pE=(e,o,t,r,n,i)=>{let{chartWidth:a,chartHeight:l}=mE(e),s=e.title?Cc({backgroundColor:n,groupIds:[r],...$t,text:e.title,x:o+a/2,y:t-kr-Te*2-aE,roundness:null,textAlign:"center"}):null,m=i?yu({backgroundColor:n,groupIds:[r],...$t,type:"rectangle",x:o,y:t-l,width:a,height:l,strokeColor:iE.black,fillStyle:"solid",opacity:6}):null;return[...m?[m]:[],...s?[s]:[],...R4(e,o,t,r,n),...N4(e,o,t,r,n),...B4(e,o,t,r,n)]},F4=(e,o,t)=>{let r=Math.max(...e.values),n=lE(),i=Sc[Math.floor(Math.random()*Sc.length)];return[...e.values.map((l,s)=>{let m=l/r*kr;return yu({backgroundColor:i,groupIds:[n],...$t,type:"rectangle",x:o+s*(ho+Te)+Te,y:t-m-Te,width:ho,height:m})}),...pE(e,o,t,n,i,sE())]},O4=(e,o,t)=>{let r=Math.max(...e.values),n=lE(),i=Sc[Math.floor(Math.random()*Sc.length)],a=0,l=[];for(let b of e.values){let x=a*(ho+Te),w=-(b/r)*kr;l.push([x,w]),a++}let s=Math.max(...l.map(b=>b[0])),m=Math.max(...l.map(b=>b[1])),c=Math.min(...l.map(b=>b[0])),d=Math.min(...l.map(b=>b[1])),p=Ka({backgroundColor:i,groupIds:[n],...$t,type:"line",x:o+Te+ho/2,y:t-Te,height:m-d,width:s-c,strokeWidth:2,points:l}),u=e.values.map((b,x)=>{let w=x*(ho+Te)+Te/2,E=-(b/r)*kr+Te/2;return yu({backgroundColor:i,groupIds:[n],...$t,fillStyle:"solid",strokeWidth:2,type:"ellipse",x:o+w+ho/2,y:t+E-Te*2,width:Te,height:Te})}),f=e.values.map((b,x)=>{let w=x*(ho+Te)+Te/2,E=b/r*kr+Te/2+Te;return Ka({backgroundColor:i,groupIds:[n],...$t,type:"line",x:o+w+ho/2+Te/2,y:t-E,height:E,strokeStyle:"dotted",opacity:cE,points:[Sr(0,0),Sr(0,E)]})});return[...pE(e,o,t,n,i,sE()),p,...f,...u]},uE=(e,o,t,r)=>e==="line"?O4(o,t,r):F4(o,t,r);var MJ="clipboard"in navigator&&"readText"in navigator.clipboard,Mc="clipboard"in navigator&&"writeText"in navigator.clipboard,pi="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,K4=e=>!!([Za.excalidraw,Za.excalidrawClipboard,Za.excalidrawClipboardWithAPI].includes(e?.type)&&Array.isArray(e.elements)),gE=({types:e,files:o})=>{!e&&!o&&console.warn("createPasteEvent: no types or files provided");let t=new ClipboardEvent(kc.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},Z4=({elements:e,files:o})=>{let t=H4(e),r=new Set(e.filter(l=>V4(l))),n=!1,i=e.reduce((l,s)=>(X4(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:Za.excalidrawClipboard,elements:e.map(l=>{if(hE(l,t)&&!r.has(hE(l,t))){let s=Y4(l);return W4(s,t,{frameId:null}),s}return l}),files:o?i:void 0};return JSON.stringify(a)},Lc=async(e,o,t)=>{await fo(Z4({elements:e,files:o}),t)},$4=e=>{let o=dE(e);return o.type===mi?{spreadsheet:o.spreadsheet}:null};function fE(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(fE(t));return o}var j4=e=>{let o=e.value;try{let t=new DOMParser().parseFromString(o,go.html),r=fE(t.body);if(r.length)return{type:"mixedContent",value:r}}catch(t){console.error(`error in parseHTMLFromPaste: ${t.message}`)}return null},bE=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{[go.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(G4(z4,r))try{if(r===go.text||r===go.html)e[r]=await(await t.getType(r)).text();else if(W1(r)){let n=await t.getType(r),i=j1(n,r,void 0);e[r]=i}else throw new Wm(`Unsupported clipboard type: ${r}`)}catch(n){console.warn(n instanceof Wm?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},q4=async(e,o=!1)=>{try{let t=e.findByType(go.html),r=!o&&t&&j4(t);return r?r.value.every(n=>n.type==="text")?{type:"text",value:e.getData(go.text)??r.value.map(n=>n.value).join(`
5
- `).trim()}:r:{type:"text",value:(e.getData(go.text)||"").trim()}}catch{return{type:"text",value:""}}},J4=function(e){return this.find(o=>o.type===e)||null},Q4=function(e){return this.find(t=>t.type===e)?.value??null},eM=function(){return this.filter(e=>e.kind==="file")},$a=async e=>{let o;oM(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 $1(r);return{type:n.type,kind:"file",file:await us(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:J4,getData:Q4,getFiles:eM})},xE=async(e,o=!1)=>{let t=await q4(e,o);if(t.type==="mixedContent")return{mixedContent:t.value};try{let r=!o&&$4(t.value);if(r)return r}catch(r){console.error(r)}try{let r=JSON.parse(t.value),n=r.type===Za.excalidrawClipboardWithAPI;if(K4(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}},Pc=async e=>{try{await navigator.clipboard.write([new window.ClipboardItem({[go.png]:e})])}catch(o){if(U4(e))await navigator.clipboard.write([new window.ClipboardItem({[go.png]:await e})]);else throw o}},fo=async(e,o)=>{if(Mc)try{await navigator.clipboard.writeText(e||"");return}catch(t){console.error(t)}try{if(o){if(o.clipboardData?.setData(go.text,e||""),o.clipboardData?.getData(go.text)!==e)throw new Error("Failed to setData on clipboardEvent");return}}catch(t){console.error(t)}if(!tM(e))throw new Error("Error copying to clipboard.")},tM=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},oM=e=>e.type===kc.PASTE||e.type===kc.COPY||e.type===kc.CUT;var pn=(e,{selectedElementIds:o},t)=>{e=cM(e);let r=t&&we(e,{selectedElementIds:o}),n=null,i=r?J(e,{selectedElementIds:o},{includeBoundTextElement:!0}):e;return r&&(i.length===1&&dM(i[0])?(n=i[0],i=mM(e,n)):i.length>1&&(i=J(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}))),{exportingFrame:n,exportedElements:lM(i)}},un=async(e,o,t,r,{exportBackground:n,exportPadding:i=rM,viewBackgroundColor:a,name:l=t.name||nM,fileHandle:s=null,exportingFrame:m=null})=>{if(o.length===0)throw new Error(h("alerts.cannotExportEmptyCanvas"));if(e==="svg"||e==="clipboard-svg"){let d=Nn(o,{exportBackground:n,exportWithDarkMode:t.exportWithDarkMode,viewBackgroundColor:a,exportPadding:i,exportScale:t.exportScale,exportEmbedScene:t.exportEmbedScene&&e==="svg"},r,{exportingFrame:m});if(e==="svg")return Ym(d.then(p=>new Blob([sM+p.outerHTML],{type:aM.svg})),{description:"Export to SVG",name:l,extension:t.exportEmbedScene?"excalidraw.svg":"svg",mimeTypes:[EE.svg],fileHandle:s});if(e==="clipboard-svg"){let p=await d.then(u=>u.outerHTML);try{await fo(p)}catch{throw new Error(h("errors.copyToSystemClipboardFailed"))}return}}let c=cs(o,t,r,{exportBackground:n,viewBackgroundColor:a,exportPadding:i,exportingFrame:m});if(e==="png"){let d=Go(c);return t.exportEmbedScene&&(d=d.then(p=>import("./data/image-TM3Q4VTO.js").then(({encodePngMetadata:u})=>u({blob:p,metadata:ua(o,t,r,"local")})))),Ym(d,{description:"Export to PNG",name:l,extension:t.exportEmbedScene?"excalidraw.png":"png",mimeTypes:[EE.png],fileHandle:s})}else if(e==="clipboard")try{let d=Go(c);await Pc(d)}catch(d){throw console.warn(d),d.name==="CANVAS_POSSIBLY_TOO_BIG"?new Error(h("canvasError.canvasTooBig")):iM&&d.name==="TypeError"?new Error(`${h("alerts.couldNotCopyToClipboard")}
5
+ `).trim()}:r:{type:"text",value:(e.getData(go.text)||"").trim()}}catch{return{type:"text",value:""}}},J4=function(e){return this.find(o=>o.type===e)||null},Q4=function(e){return this.find(t=>t.type===e)?.value??null},eM=function(){return this.filter(e=>e.kind==="file")},$a=async e=>{let o;oM(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 $1(r);return{type:n.type,kind:"file",file:await us(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:J4,getData:Q4,getFiles:eM})},xE=async(e,o=!1)=>{let t=await q4(e,o);if(t.type==="mixedContent")return{mixedContent:t.value};try{let r=!o&&$4(t.value);if(r)return r}catch(r){console.error(r)}try{let r=JSON.parse(t.value),n=r.type===Za.excalidrawClipboardWithAPI;if(K4(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}},Pc=async e=>{try{await navigator.clipboard.write([new window.ClipboardItem({[go.png]:e})])}catch(o){if(U4(e))await navigator.clipboard.write([new window.ClipboardItem({[go.png]:await e})]);else throw o}},fo=async(e,o)=>{if(Mc)try{await navigator.clipboard.writeText(e||"");return}catch(t){console.error(t)}try{if(o){if(o.clipboardData?.setData(go.text,e||""),o.clipboardData?.getData(go.text)!==e)throw new Error("Failed to setData on clipboardEvent");return}}catch(t){console.error(t)}if(!tM(e))throw new Error("Error copying to clipboard.")},tM=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},oM=e=>e.type===kc.PASTE||e.type===kc.COPY||e.type===kc.CUT;var pn=(e,{selectedElementIds:o},t)=>{e=cM(e);let r=t&&we(e,{selectedElementIds:o}),n=null,i=r?J(e,{selectedElementIds:o},{includeBoundTextElement:!0}):e;return r&&(i.length===1&&dM(i[0])?(n=i[0],i=mM(e,n)):i.length>1&&(i=J(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}))),{exportingFrame:n,exportedElements:lM(i)}},un=async(e,o,t,r,{exportBackground:n,exportPadding:i=rM,viewBackgroundColor:a,name:l=t.name||nM,fileHandle:s=null,exportingFrame:m=null})=>{if(o.length===0)throw new Error(h("alerts.cannotExportEmptyCanvas"));if(e==="svg"||e==="clipboard-svg"){let d=Nn(o,{exportBackground:n,exportWithDarkMode:t.exportWithDarkMode,viewBackgroundColor:a,exportPadding:i,exportScale:t.exportScale,exportEmbedScene:t.exportEmbedScene&&e==="svg"},r,{exportingFrame:m});if(e==="svg")return Ym(d.then(p=>new Blob([sM+p.outerHTML],{type:aM.svg})),{description:"Export to SVG",name:l,extension:t.exportEmbedScene?"excalidraw.svg":"svg",mimeTypes:[EE.svg],fileHandle:s});if(e==="clipboard-svg"){let p=await d.then(u=>u.outerHTML);try{await fo(p)}catch{throw new Error(h("errors.copyToSystemClipboardFailed"))}return}}let c=cs(o,t,r,{exportBackground:n,viewBackgroundColor:a,exportPadding:i,exportingFrame:m});if(e==="png"){let d=Go(c);return t.exportEmbedScene&&(d=d.then(p=>import("./data/image-B72PYFWW.js").then(({encodePngMetadata:u})=>u({blob:p,metadata:ua(o,t,r,"local")})))),Ym(d,{description:"Export to PNG",name:l,extension:t.exportEmbedScene?"excalidraw.png":"png",mimeTypes:[EE.png],fileHandle:s})}else if(e==="clipboard")try{let d=Go(c);await Pc(d)}catch(d){throw console.warn(d),d.name==="CANVAS_POSSIBLY_TOO_BIG"?new Error(h("canvasError.canvasTooBig")):iM&&d.name==="TypeError"?new Error(`${h("alerts.couldNotCopyToClipboard")}
6
6
 
7
7
  ${h("hints.firefox_clipboard_write")}`):new Error(h("alerts.couldNotCopyToClipboard"))}else throw new Error("Unsupported export type")};var yE=async(e,o,t,r)=>{let{exportBackground:n,viewBackgroundColor:i,fileHandle:a}=o,l=G1(a);if(!a||!U1(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:m}=pn(e,o,!1);return await un(l,s,o,t,{exportBackground:n,viewBackgroundColor:i,name:r,fileHandle:a,exportingFrame:m}),{fileHandle:a}};import{Fragment as gM,jsx as qo,jsxs as fM}from"react/jsx-runtime";var vu=F({name:"changeProjectName",label:"labels.fileTitle",trackEvent:!1,perform:(e,o,t)=>({appState:{...o,name:t},captureUpdate:bo.EVENTUALLY}),PanelComponent:({appState:e,updateData:o,appProps:t,data:r,app:n})=>qo(rE,{label:h("labels.fileTitle"),value:n.getName(),onChange:i=>o(i),ignoreFocus:r?.ignoreFocus??!1})}),wE=F({name:"changeExportScale",label:"imageExportDialog.scale",trackEvent:{category:"export",action:"scale"},perform:(e,o,t)=>({appState:{...o,exportScale:t},captureUpdate:bo.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t})=>{let r=hM(e),i=we(r,o)?J(r,o):r;return qo(gM,{children:uM.map(a=>{let[l,s]=z1(i,pM,a),m=`${h("imageExportDialog.label.scale")} ${a}x (${l}x${s})`;return qo(z,{size:"small",type:"radio",icon:`${a}x`,name:"export-canvas-scale",title:m,"aria-label":m,id:"export-canvas-scale",checked:a===o.exportScale,onChange:()=>t(a)},a)})})}}),Tu=F({name:"changeExportBackground",label:"imageExportDialog.label.withBackground",trackEvent:{category:"export",action:"toggleBackground"},perform:(e,o,t)=>({appState:{...o,exportBackground:t},captureUpdate:bo.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>qo(Wa,{checked:e.exportBackground,onChange:t=>o(t),children:h("imageExportDialog.label.withBackground")})}),Ac=F({name:"changeExportEmbedScene",label:"imageExportDialog.tooltip.embedScene",trackEvent:{category:"export",action:"embedScene"},perform:(e,o,t)=>({appState:{...o,exportEmbedScene:t},captureUpdate:bo.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>fM(Wa,{checked:e.exportEmbedScene,onChange:t=>o(t),children:[h("imageExportDialog.label.embedScene"),qo(po,{label:h("imageExportDialog.tooltip.embedScene"),long:!0,children:qo("div",{className:"excalidraw-tooltip-icon",children:Tb})})]})}),hn=F({name:"saveToActiveFile",label:"buttons.save",icon:nn,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}=ds(o.fileHandle)?await yE(e,o,r.files,r.getName()):await is(e,o,r.files,r.getName());return{captureUpdate:bo.EVENTUALLY,appState:{...o,fileHandle:i,toast:n?{message:i?.name?h("toast.fileSavedToFilename").replace("{filename}",`"${i.name}"`):h("toast.fileSaved")}:null}}}catch(i){return i?.name!=="AbortError"?console.error(i):console.warn(i),{captureUpdate:bo.EVENTUALLY}}},keyTest:e=>e.key===ui.S&&e[ui.CTRL_OR_CMD]&&!e.shiftKey}),ja=F({name:"saveFileToDisk",label:"exportDialog.disk_title",icon:nn,viewMode:!0,trackEvent:{category:"export"},perform:async(e,o,t,r)=>{try{let{fileHandle:n}=await is(e,{...o,fileHandle:null},r.files,r.getName());return{captureUpdate:bo.EVENTUALLY,appState:{...o,openDialog:null,fileHandle:n,toast:{message:h("toast.fileSaved")}}}}catch(n){return n?.name!=="AbortError"?console.error(n):console.warn(n),{captureUpdate:bo.EVENTUALLY}}},keyTest:e=>e.key===ui.S&&e.shiftKey&&e[ui.CTRL_OR_CMD],PanelComponent:({updateData:e})=>qo(z,{type:"button",icon:xb,title:h("buttons.saveAs"),"aria-label":h("buttons.saveAs"),showAriaLabel:pe().editor.isMobile,hidden:!Rn,onClick:()=>e(null),"data-testid":"save-as-button"})}),hi=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 Vm(o,e);return{elements:n,appState:i,files:a,captureUpdate:bo.IMMEDIATELY}}catch(n){return n?.name==="AbortError"?(console.warn(n),!1):{elements:e,appState:{...o,errorMessage:n.message},files:r.files,captureUpdate:bo.EVENTUALLY}}},keyTest:e=>e[ui.CTRL_OR_CMD]&&e.key===ui.O}),vE=F({name:"exportWithDarkMode",label:"imageExportDialog.label.darkMode",trackEvent:{category:"export",action:"toggleTheme"},perform:(e,o,t)=>({appState:{...o,exportWithDarkMode:t},captureUpdate:bo.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>qo("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"-45px",marginBottom:"10px"},children:qo(tE,{value:e.exportWithDarkMode?wu.DARK:wu.LIGHT,onChange:t=>{o(t===wu.DARK)},title:h("imageExportDialog.label.darkMode")})})});import{DEFAULT_FONT_SIZE as bM,DEFAULT_FONT_FAMILY as xM,DEFAULT_TEXT_ALIGN as EM,CODES as TE,KEYS as IE,getLineHeight as yM}from"@haoxin-web/excalidraw-common";import{newElementWith as _c}from"@haoxin-web/excalidraw-element";import{hasBoundTextElement as wM,canApplyRoundnessTypeToElement as vM,getDefaultRoundnessTypeForElement as TM,isFrameLikeElement as IM,isArrowElement as CM,isExcalidrawElement as SM,isTextElement as Iu}from"@haoxin-web/excalidraw-element";import{getBoundTextElement as kM,redrawTextBoundingBox as MM}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as Cu}from"@haoxin-web/excalidraw-element";var CE="{}",Su=F({name:"copyStyles",label:"labels.copyStyles",icon:xp,trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=[],i=e.find(a=>o.selectedElementIds[a.id]);if(n.push(i),i&&wM(i)){let a=kM(i,r.scene.getNonDeletedElementsMap());n.push(a)}return i&&(CE=JSON.stringify(n)),{appState:{...o,toast:{message:h("toast.copyStyles")}},captureUpdate:Cu.EVENTUALLY}},keyTest:e=>e[IE.CTRL_OR_CMD]&&e.altKey&&e.code===TE.C}),ku=F({name:"pasteStyles",label:"labels.pasteStyles",icon:xp,trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=JSON.parse(CE),i=n[0],a=n[1];if(!SM(i))return{elements:e,captureUpdate:Cu.EVENTUALLY};let l=J(e,o,{includeBoundTextElement:!0}),s=l.map(m=>m.id);return{elements:e.map(m=>{if(s.includes(m.id)){let c=i;if(Iu(m)&&m.containerId&&(c=a),!c)return m;let d=_c(m,{backgroundColor:c?.backgroundColor,strokeWidth:c?.strokeWidth,strokeColor:c?.strokeColor,strokeStyle:c?.strokeStyle,fillStyle:c?.fillStyle,opacity:c?.opacity,roughness:c?.roughness,roundness:c.roundness?vM(c.roundness.type,m)?c.roundness:TM(m):null});if(Iu(d)){let p=c.fontSize||bM,u=c.fontFamily||xM;d=_c(d,{fontSize:p,fontFamily:u,textAlign:c.textAlign||EM,lineHeight:c.lineHeight||yM(u)});let f=null;d.containerId&&(f=l.find(b=>Iu(d)&&b.id===d.containerId)||null),MM(d,f,r.scene)}return d.type==="arrow"&&CM(c)&&(d=_c(d,{startArrowhead:c.startArrowhead,endArrowhead:c.endArrowhead})),IM(m)&&(d=_c(d,{roundness:null,backgroundColor:"transparent"})),d}return m}),captureUpdate:Cu.IMMEDIATELY}},keyTest:e=>e[IE.CTRL_OR_CMD]&&e.altKey&&e.code===TE.V});import{KEYS as LM}from"@haoxin-web/excalidraw-common";import{getNonDeletedElements as PM}from"@haoxin-web/excalidraw-element";import{showSelectedShapeActions as AM}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as Mu}from"@haoxin-web/excalidraw-element";import{jsx as SE}from"react/jsx-runtime";var _M=F({name:"toggleCanvasMenu",label:"buttons.menu",trackEvent:{category:"menu"},perform:(e,o)=>({appState:{...o,openMenu:o.openMenu==="canvas"?null:"canvas"},captureUpdate:Mu.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>SE(z,{type:"button",icon:Is,"aria-label":h("buttons.menu"),onClick:o,selected:e.openMenu==="canvas"})}),DM=F({name:"toggleEditMenu",label:"buttons.edit",trackEvent:{category:"menu"},perform:(e,o)=>({appState:{...o,openMenu:o.openMenu==="shape"?null:"shape"},captureUpdate:Mu.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t})=>SE(z,{visible:AM(o,PM(e)),type:"button",icon:Eb,"aria-label":h("buttons.edit"),onClick:t,selected:o.openMenu==="shape"})}),gn=F({name:"toggleShortcuts",label:"welcomeScreen.defaults.helpHint",icon:ub,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:Mu.EVENTUALLY}),keyTest:e=>e.key===LM.QUESTION_MARK});import{getNonDeletedElements as Rc}from"@haoxin-web/excalidraw-element";import{newElementWith as LE}from"@haoxin-web/excalidraw-element";import{isBoundToContainer as RM}from"@haoxin-web/excalidraw-element";import{frameAndChildrenSelectedTogether as NM,getElementsInResizingFrame as BM,getFrameLikeElements as FM,getRootElements as OM,groupByFrameLikes as zM,removeElementsFromFrame as HM,replaceAllElementsInFrame as GM}from"@haoxin-web/excalidraw-element";import{KEYS as Nc,randomId as UM,arrayToMap as Lu,getShortcutKey as PE}from"@haoxin-web/excalidraw-common";import{getSelectedGroupIds as Dc,selectGroup as WM,selectGroupsForSelectedElements as YM,getElementsInGroup as kE,addToGroup as VM,removeFromSelectedGroups as XM,isElementInGroup as AE}from"@haoxin-web/excalidraw-element";import{syncMovedIndices as KM}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as qa}from"@haoxin-web/excalidraw-element";import{jsx as gi}from"react/jsx-runtime";var ZM=e=>{if(e.length>=2){let o=e[0].groupIds;for(let t of o)if(e.reduce((r,n)=>r&&AE(n,t),!0))return!0}return!1},ME=(e,o,t)=>{let r=t.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0});return r.length>=2&&!ZM(r)&&!NM(r)},Pu=F({name:"group",label:"labels.group",icon:e=>gi(gp,{theme:e.theme}),trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=OM(r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0}));if(n.length<2)return{appState:o,elements:e,captureUpdate:qa.EVENTUALLY};let i=Dc(o);if(i.length===1){let x=i[0],w=new Set(kE(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:qa.EVENTUALLY}}let a=[...e];new Set(n.map(x=>x.frameId)).size>1&&zM(n).forEach((w,E)=>{HM(w,r.scene.getNonDeletedElementsMap())});let s=UM(),m=Lu(n);a=a.map(x=>m.get(x.id)?LE(x,{groupIds:VM(x.groupIds,s,o.editingGroupId)}):x);let c=kE(a,s),d=c[c.length-1],p=a.lastIndexOf(d),u=a.slice(p+1),f=a.slice(0,p).filter(x=>!AE(x,s)),b=KM([...f,...c,...u],Lu(c));return{appState:{...o,...WM(s,{...o,selectedGroupIds:{}},Rc(a))},elements:b,captureUpdate:qa.IMMEDIATELY}},predicate:(e,o,t,r)=>ME(e,o,r),keyTest:e=>!e.shiftKey&&e[Nc.CTRL_OR_CMD]&&e.key===Nc.G,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>gi(z,{hidden:!ME(e,o,r),type:"button",icon:gi(gp,{theme:o.theme}),onClick:()=>t(null),title:`${h("labels.group")} \u2014 ${PE("CtrlOrCmd+G")}`,"aria-label":h("labels.group"),visible:we(Rc(e),o)})}),Au=F({name:"ungroup",label:"labels.ungroup",icon:e=>gi(fp,{theme:e.theme}),trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=Dc(o),i=Lu(e);if(n.length===0)return{appState:o,elements:e,captureUpdate:qa.EVENTUALLY};let a=[...e],l=[];a=a.map(p=>{RM(p)&&l.push(p.id);let u=XM(p.groupIds,o.selectedGroupIds);return u.length===p.groupIds.length?p:LE(p,{groupIds:u})});let s=YM(o,Rc(a),o,null),m=r.scene.getSelectedElements(o),c=new Set(m.filter(p=>p.frameId).map(p=>p.frameId));return FM(e).filter(p=>c.has(p.id)).forEach(p=>{p&&(a=GM(a,BM(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:qa.IMMEDIATELY}},keyTest:e=>e.shiftKey&&e[Nc.CTRL_OR_CMD]&&e.key===Nc.G.toUpperCase(),predicate:(e,o)=>Dc(o).length>0,PanelComponent:({elements:e,appState:o,updateData:t})=>gi(z,{type:"button",hidden:Dc(o).length===0,icon:gi(fp,{theme:o.theme}),onClick:()=>t(null),title:`${h("labels.ungroup")} \u2014 ${PE("CtrlOrCmd+Shift+G")}`,"aria-label":h("labels.ungroup"),visible:we(Rc(e),o)})});import tL from"clsx";import{CaptureUpdateAction as BE}from"@haoxin-web/excalidraw-element";import{COLOR_CHARCOAL_BLACK as $M,COLOR_VOICE_CALL as jM,COLOR_WHITE as Fc,THEME as qM,UserIdleState as _E}from"@haoxin-web/excalidraw-common";var Bc=(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 JM(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 fn=(e,o)=>`hsl(${Math.abs(JM(o?.id||e))%37*10}, 100%, 83%)`,DE=e=>{let o=e?.trim()?.codePointAt(0);return(o?String.fromCodePoint(o):"?").toUpperCase()},RE=({context:e,renderConfig:o,appState:t,normalizedWidth:r,normalizedHeight:n})=>{for(let[i,a]of o.remotePointerViewportCoords){let{x:l,y:s}=a,m=t.collaborators.get(i);l-=t.offsetLeft,s-=t.offsetTop;let c=11,d=14,p=l<0||l>r-c||s<0||s>n-d;l=Math.max(l,0),l=Math.min(l,r-c),s=Math.max(s,0),s=Math.min(s,n-d);let u=fn(i,m);e.save(),e.strokeStyle=u,e.fillStyle=u;let f=o.remotePointerUserStates.get(i),b=p||f===_E.IDLE||f===_E.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===qM.DARK?"#2f6330":jM,w=m?.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=Fc,e.strokeStyle=Fc,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)+d+2,C=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+C*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=Fc,e.stroke(),w&&(e.beginPath(),e.roundRect(L-2,k-2,N+4,O+4,8),e.strokeStyle=x,e.stroke())):Bc(e,L,k,N,O,8,Fc),e.fillStyle=$M,e.fillText(E,y+C+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 QM from"clsx";import{useState as eL}from"react";import{jsx as NE}from"react/jsx-runtime";var _u=({color:e,onClick:o,name:t,src:r,className:n})=>{let i=DE(t),[a,l]=eL(!1),s=!a&&r,m=s?void 0:{background:e};return NE("div",{className:QM("Avatar",n),style:m,onClick:o,children:s?NE("img",{className:"Avatar-img",src:r,alt:i,referrerPolicy:"no-referrer",onError:()=>l(!0)}):i})};import{jsx as _o,jsxs as Oc}from"react/jsx-runtime";var oL=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:BE.EVENTUALLY}:{appState:{...o,userToFollow:{socketId:t.socketId,username:t.username||""},openMenu:o.openMenu==="canvas"?null:o.openMenu},captureUpdate:BE.EVENTUALLY},PanelComponent:({updateData:e,data:o,appState:t})=>{let{socketId:r,collaborator:n,withName:i,isBeingFollowed:a}=o,l=fn(r,n),s=tL({"is-followed":a,"is-current-user":n.isCurrentUser===!0,"is-speaking":n.isSpeaking,"is-in-call":n.isInCall,"is-muted":n.isMuted}),m=n.isInCall?n.isSpeaking?Oc("div",{className:"UserList__collaborator-status-icon-speaking-indicator",title:h("userList.hint.isSpeaking"),children:[_o("div",{}),_o("div",{}),_o("div",{})]}):n.isMuted?_o("div",{className:"UserList__collaborator-status-icon-microphone-muted",title:h("userList.hint.micMuted"),children:w0}):_o("div",{title:h("userList.hint.inCall"),children:y0}):null;return i?Oc("div",{className:`dropdown-menu-item dropdown-menu-item-base UserList__collaborator ${s}`,style:{"--avatar-size":"1.5rem"},onClick:()=>e(n),children:[_o(_u,{color:l,onClick:()=>{},name:n.username||"",src:n.avatarUrl,className:s}),_o("div",{className:"UserList__collaborator-name",children:n.username}),Oc("div",{className:"UserList__collaborator-status-icons","aria-hidden":!0,children:[a&&_o("div",{className:"UserList__collaborator-status-icon-is-followed",title:h("userList.hint.followStatus"),children:Kn}),m]})]}):Oc("div",{className:`UserList__collaborator UserList__collaborator--avatar-only ${s}`,children:[_o(_u,{color:l,onClick:()=>{e(n)},name:n.username||"",src:n.avatarUrl,className:s}),m&&_o("div",{className:"UserList__collaborator-status-icon",children:m})]})}});import{LIBRARY_DISABLED_TYPES as rL,randomId as nL}from"@haoxin-web/excalidraw-common";import{deepCopyElement as iL}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as Du}from"@haoxin-web/excalidraw-element";var Ru=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 rL)if(n.some(a=>a.type===i))return{captureUpdate:Du.EVENTUALLY,appState:{...o,errorMessage:h(`errors.libraryElementTypeError.${i}`)}};return r.library.getLatestLibrary().then(i=>r.library.setLibrary([{id:nL(),status:"unpublished",elements:n.map(iL),created:Date.now()},...i])).then(()=>({captureUpdate:Du.EVENTUALLY,appState:{...o,toast:{message:h("toast.addedToLibrary")}}})).catch(i=>({captureUpdate:Du.EVENTUALLY,appState:{...o,errorMessage:i.message}}))},label:"labels.addToLibrary"});import{getNonDeletedElements as fi}from"@haoxin-web/excalidraw-element";import{isFrameLikeElement as aL}from"@haoxin-web/excalidraw-element";import{updateFrameMembershipOfSelectedElements as lL}from"@haoxin-web/excalidraw-element";import{KEYS as Mr,arrayToMap as sL,getShortcutKey as zc}from"@haoxin-web/excalidraw-common";import{alignElements as cL}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as bi}from"@haoxin-web/excalidraw-element";import{getSelectedElementsByGroup as dL}from"@haoxin-web/excalidraw-element";import{jsx as Ei}from"react/jsx-runtime";var Lt=(e,o)=>{let t=o.scene.getSelectedElements(e);return dL(t,o.scene.getNonDeletedElementsMap(),e).length>1&&!t.some(r=>aL(r))},xi=(e,o,t,r)=>{let n=t.scene.getSelectedElements(o),i=cL(n,r,t.scene,o),a=sL(i);return lL(e.map(l=>a.get(l.id)||l),o,t)},mL=F({name:"alignTop",label:"labels.alignTop",icon:cp,trackEvent:{category:"element"},predicate:(e,o,t,r)=>Lt(o,r),perform:(e,o,t,r)=>({appState:o,elements:xi(e,o,r,{position:"start",axis:"y"}),captureUpdate:bi.IMMEDIATELY}),keyTest:e=>e[Mr.CTRL_OR_CMD]&&e.shiftKey&&e.key===Mr.ARROW_UP,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Ei(z,{hidden:!Lt(o,r),type:"button",icon:cp,onClick:()=>t(null),title:`${h("labels.alignTop")} \u2014 ${zc("CtrlOrCmd+Shift+Up")}`,"aria-label":h("labels.alignTop"),visible:we(fi(e),o)})}),pL=F({name:"alignBottom",label:"labels.alignBottom",icon:dp,trackEvent:{category:"element"},predicate:(e,o,t,r)=>Lt(o,r),perform:(e,o,t,r)=>({appState:o,elements:xi(e,o,r,{position:"end",axis:"y"}),captureUpdate:bi.IMMEDIATELY}),keyTest:e=>e[Mr.CTRL_OR_CMD]&&e.shiftKey&&e.key===Mr.ARROW_DOWN,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Ei(z,{hidden:!Lt(o,r),type:"button",icon:dp,onClick:()=>t(null),title:`${h("labels.alignBottom")} \u2014 ${zc("CtrlOrCmd+Shift+Down")}`,"aria-label":h("labels.alignBottom"),visible:we(fi(e),o)})}),uL=F({name:"alignLeft",label:"labels.alignLeft",icon:mp,trackEvent:{category:"element"},predicate:(e,o,t,r)=>Lt(o,r),perform:(e,o,t,r)=>({appState:o,elements:xi(e,o,r,{position:"start",axis:"x"}),captureUpdate:bi.IMMEDIATELY}),keyTest:e=>e[Mr.CTRL_OR_CMD]&&e.shiftKey&&e.key===Mr.ARROW_LEFT,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Ei(z,{hidden:!Lt(o,r),type:"button",icon:mp,onClick:()=>t(null),title:`${h("labels.alignLeft")} \u2014 ${zc("CtrlOrCmd+Shift+Left")}`,"aria-label":h("labels.alignLeft"),visible:we(fi(e),o)})}),hL=F({name:"alignRight",label:"labels.alignRight",icon:pp,trackEvent:{category:"element"},predicate:(e,o,t,r)=>Lt(o,r),perform:(e,o,t,r)=>({appState:o,elements:xi(e,o,r,{position:"end",axis:"x"}),captureUpdate:bi.IMMEDIATELY}),keyTest:e=>e[Mr.CTRL_OR_CMD]&&e.shiftKey&&e.key===Mr.ARROW_RIGHT,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Ei(z,{hidden:!Lt(o,r),type:"button",icon:pp,onClick:()=>t(null),title:`${h("labels.alignRight")} \u2014 ${zc("CtrlOrCmd+Shift+Right")}`,"aria-label":h("labels.alignRight"),visible:we(fi(e),o)})}),gL=F({name:"alignVerticallyCentered",label:"labels.centerVertically",icon:up,trackEvent:{category:"element"},predicate:(e,o,t,r)=>Lt(o,r),perform:(e,o,t,r)=>({appState:o,elements:xi(e,o,r,{position:"center",axis:"y"}),captureUpdate:bi.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Ei(z,{hidden:!Lt(o,r),type:"button",icon:up,onClick:()=>t(null),title:h("labels.centerVertically"),"aria-label":h("labels.centerVertically"),visible:we(fi(e),o)})}),fL=F({name:"alignHorizontallyCentered",label:"labels.centerHorizontally",icon:hp,trackEvent:{category:"element"},predicate:(e,o,t,r)=>Lt(o,r),perform:(e,o,t,r)=>({appState:o,elements:xi(e,o,r,{position:"center",axis:"x"}),captureUpdate:bi.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Ei(z,{hidden:!Lt(o,r),type:"button",icon:hp,onClick:()=>t(null),title:h("labels.centerHorizontally"),"aria-label":h("labels.centerHorizontally"),visible:we(fi(e),o)})});import{getNonDeletedElements as FE}from"@haoxin-web/excalidraw-element";import{isFrameLikeElement as bL}from"@haoxin-web/excalidraw-element";import{CODES as OE,KEYS as zE,arrayToMap as xL,getShortcutKey as HE}from"@haoxin-web/excalidraw-common";import{updateFrameMembershipOfSelectedElements as EL}from"@haoxin-web/excalidraw-element";import{distributeElements as yL}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as GE}from"@haoxin-web/excalidraw-element";import{getSelectedElementsByGroup as wL}from"@haoxin-web/excalidraw-element";import{jsx as YE}from"react/jsx-runtime";var UE=(e,o)=>{let t=o.scene.getSelectedElements(e);return wL(t,o.scene.getNonDeletedElementsMap(),e).length>2&&!t.some(r=>bL(r))},WE=(e,o,t,r)=>{let n=t.scene.getSelectedElements(o),i=yL(n,t.scene.getNonDeletedElementsMap(),r,o),a=xL(i);return EL(e.map(l=>a.get(l.id)||l),o,t)},vL=F({name:"distributeHorizontally",label:"labels.distributeHorizontally",trackEvent:{category:"element"},perform:(e,o,t,r)=>({appState:o,elements:WE(e,o,r,{space:"between",axis:"x"}),captureUpdate:GE.IMMEDIATELY}),keyTest:e=>!e[zE.CTRL_OR_CMD]&&e.altKey&&e.code===OE.H,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>YE(z,{hidden:!UE(o,r),type:"button",icon:kb,onClick:()=>t(null),title:`${h("labels.distributeHorizontally")} \u2014 ${HE("Alt+H")}`,"aria-label":h("labels.distributeHorizontally"),visible:we(FE(e),o)})}),TL=F({name:"distributeVertically",label:"labels.distributeVertically",trackEvent:{category:"element"},perform:(e,o,t,r)=>({appState:o,elements:WE(e,o,r,{space:"between",axis:"y"}),captureUpdate:GE.IMMEDIATELY}),keyTest:e=>!e[zE.CTRL_OR_CMD]&&e.altKey&&e.code===OE.V,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>YE(z,{hidden:!UE(o,r),type:"button",icon:Mb,onClick:()=>t(null),title:`${h("labels.distributeVertically")} \u2014 ${HE("Alt+V")}`,"aria-label":h("labels.distributeVertically"),visible:we(FE(e),o)})});import{getNonDeletedElements as IL}from"@haoxin-web/excalidraw-element";import{bindOrUnbindLinearElements as CL,isBindingEnabled as SL}from"@haoxin-web/excalidraw-element";import{getCommonBoundingBox as VE}from"@haoxin-web/excalidraw-element";import{newElementWith as kL}from"@haoxin-web/excalidraw-element";import{deepCopyElement as ML}from"@haoxin-web/excalidraw-element";import{resizeMultipleElements as LL}from"@haoxin-web/excalidraw-element";import{isArrowElement as PL,isElbowArrow as AL,isLinearElement as _L}from"@haoxin-web/excalidraw-element";import{updateFrameMembershipOfSelectedElements as XE}from"@haoxin-web/excalidraw-element";import{CODES as KE,KEYS as DL,arrayToMap as RL}from"@haoxin-web/excalidraw-common";import{CaptureUpdateAction as ZE}from"@haoxin-web/excalidraw-element";var Nu=F({name:"flipHorizontal",label:"labels.flipHorizontal",icon:C0,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:XE($E(e,r.scene.getNonDeletedElementsMap(),o,"horizontal",r),o,r),appState:o,captureUpdate:ZE.IMMEDIATELY}),keyTest:e=>e.shiftKey&&e.code===KE.H}),Bu=F({name:"flipVertical",label:"labels.flipVertical",icon:I0,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:XE($E(e,r.scene.getNonDeletedElementsMap(),o,"vertical",r),o,r),appState:o,captureUpdate:ZE.IMMEDIATELY}),keyTest:e=>e.shiftKey&&e.code===KE.V&&!e[DL.CTRL_OR_CMD]}),$E=(e,o,t,r,n)=>{let i=J(IL(e),t,{includeBoundTextElement:!0,includeElementsInFrames:!0}),a=NL(i,o,t,r,n),l=RL(a);return e.map(s=>l.get(s.id)||s)},NL=(e,o,t,r,n)=>{if(e.every(u=>PL(u)&&(u.startBinding||u.endBinding)))return e.map(u=>{let f=u;return kL(f,{startArrowhead:f.endArrowhead,endArrowhead:f.startArrowhead})});let{midX:i,midY:a}=VE(e);LL(e,o,"nw",n.scene,new Map(Array.from(o.values()).map(u=>[u.id,ML(u)])),{flipByX:r==="horizontal",flipByY:r==="vertical",shouldResizeFromCenter:!0,shouldMaintainAspectRatio:!0}),CL(e.filter(_L),SL(t),[],n.scene,t.zoom);let{elbowArrows:l,otherElements:s}=e.reduce((u,f)=>AL(f)?{...u,elbowArrows:u.elbowArrows.concat(f)}:{...u,otherElements:u.otherElements.concat(f)},{elbowArrows:[],otherElements:[]}),{midX:m,midY:c}=VE(e),[d,p]=[i-m,a-c];return s.forEach(u=>n.scene.mutateElement(u,{x:u.x+d,y:u.y+p})),l.forEach(u=>n.scene.mutateElement(u,{x:u.x+d,y:u.y+p})),e};import{isTextElement as BL}from"@haoxin-web/excalidraw-element";import{getTextFromElements as FL}from"@haoxin-web/excalidraw-element";import{CODES as OL,KEYS as jE,isFirefox as zL}from"@haoxin-web/excalidraw-common";import{CaptureUpdateAction as Ht}from"@haoxin-web/excalidraw-element";var yi=F({name:"copy",label:"labels.copy",icon:Ea,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});try{await Lc(n,r.files,t)}catch(i){return{captureUpdate:Ht.EVENTUALLY,appState:{...o,errorMessage:i.message}}}return{captureUpdate:Ht.EVENTUALLY}},keyTest:void 0}),Fu=F({name:"paste",label:"labels.paste",trackEvent:{category:"element"},perform:async(e,o,t,r)=>{let n;try{n=await bE()}catch(i){return i.name==="AbortError"||i.name==="NotAllowedError"?!1:(console.error(`actionPaste ${i.name}: ${i.message}`),zL?{captureUpdate:Ht.EVENTUALLY,appState:{...o,errorMessage:h("hints.firefox_clipboard_write")}}:{captureUpdate:Ht.EVENTUALLY,appState:{...o,errorMessage:h("errors.asyncPasteFailedOnRead")}})}try{r.pasteFromClipboard(gE({types:n}))}catch(i){return console.error(i),{captureUpdate:Ht.EVENTUALLY,appState:{...o,errorMessage:h("errors.asyncPasteFailedOnParse")}}}return{captureUpdate:Ht.EVENTUALLY}},keyTest:void 0}),Hc=F({name:"cut",label:"labels.cut",icon:n0,trackEvent:{category:"element"},perform:(e,o,t,r)=>(yi.perform(e,o,t,r),La.perform(e,o,null,r)),keyTest:e=>e[jE.CTRL_OR_CMD]&&e.key===jE.X}),Gc=F({name:"copyAsSvg",label:"labels.copyAsSvg",icon:S0,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{if(!r.canvas)return{captureUpdate:Ht.EVENTUALLY};let{exportedElements:n,exportingFrame:i}=pn(e,o,!0);try{await un("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:h("toast.copyToClipboardAsSvg",{exportSelection:a.length?h("toast.selection"):h("toast.canvas"),exportColorScheme:o.exportWithDarkMode?h("buttons.darkMode"):h("buttons.lightMode")})}},captureUpdate:Ht.EVENTUALLY}}catch(a){return console.error(a),{appState:{errorMessage:a.message},captureUpdate:Ht.EVENTUALLY}}},predicate:e=>Mc&&e.length>0,keywords:["svg","clipboard","copy"]}),Uc=F({name:"copyAsPng",label:"labels.copyAsPng",icon:k0,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{if(!r.canvas)return{captureUpdate:Ht.EVENTUALLY};let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),{exportedElements:i,exportingFrame:a}=pn(e,o,!0);try{return await un("clipboard",i,o,r.files,{...o,exportingFrame:a,name:r.getName()}),{appState:{...o,toast:{message:h("toast.copyToClipboardAsPng",{exportSelection:n.length?h("toast.selection"):h("toast.canvas"),exportColorScheme:o.exportWithDarkMode?h("buttons.darkMode"):h("buttons.lightMode")})}},captureUpdate:Ht.EVENTUALLY}}catch(l){return console.error(l),{appState:{...o,errorMessage:l.message},captureUpdate:Ht.EVENTUALLY}}},predicate:e=>pi&&e.length>0,keyTest:e=>e.code===OL.C&&e.altKey&&e.shiftKey,keywords:["png","clipboard","copy"]}),Wc=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{fo(FL(n))}catch{throw new Error(h("errors.copyToSystemClipboardFailed"))}return{captureUpdate:Ht.EVENTUALLY}},predicate:(e,o,t,r)=>Mc&&r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0}).some(BL),keywords:["text","clipboard","copy"]});import{CODES as HL,KEYS as GL}from"@haoxin-web/excalidraw-common";import{CaptureUpdateAction as UL}from"@haoxin-web/excalidraw-element";var Yc=F({name:"gridMode",icon:_0,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:UL.EVENTUALLY}},checked:e=>e.gridModeEnabled,predicate:(e,o,t)=>t.gridModeEnabled===void 0,keyTest:e=>e[GL.CTRL_OR_CMD]&&e.code===HL.QUOTE});import{CODES as WL,KEYS as YL}from"@haoxin-web/excalidraw-common";import{CaptureUpdateAction as VL}from"@haoxin-web/excalidraw-element";var wi=F({name:"zenMode",label:"buttons.zenMode",icon:L0,viewMode:!0,trackEvent:{category:"canvas",predicate:e=>!e.zenModeEnabled},perform(e,o){return{appState:{...o,zenModeEnabled:!this.checked(o)},captureUpdate:VL.EVENTUALLY}},checked:e=>e.zenModeEnabled,predicate:(e,o,t)=>typeof t.zenModeEnabled>"u",keyTest:e=>!e[YL.CTRL_OR_CMD]&&e.altKey&&e.code===WL.Z});import{CODES as XL,KEYS as KL}from"@haoxin-web/excalidraw-common";import{CaptureUpdateAction as ZL}from"@haoxin-web/excalidraw-element";var Ou=F({name:"objectsSnapMode",label:"buttons.objectsSnapMode",icon:M0,viewMode:!1,trackEvent:{category:"canvas",predicate:e=>!e.objectsSnapModeEnabled},perform(e,o){return{appState:{...o,objectsSnapModeEnabled:!this.checked(o),gridModeEnabled:!1},captureUpdate:ZL.EVENTUALLY}},checked:e=>e.objectsSnapModeEnabled,predicate:(e,o,t)=>typeof t.objectsSnapModeEnabled>"u",keyTest:e=>!e[KL.CTRL_OR_CMD]&&e.altKey&&e.code===XL.S});import{CODES as $L,KEYS as jL}from"@haoxin-web/excalidraw-common";import{CaptureUpdateAction as qL}from"@haoxin-web/excalidraw-element";var vi=F({name:"stats",label:"stats.fullTitle",icon:T0,viewMode:!0,trackEvent:{category:"menu"},keywords:["edit","attributes","customize"],perform(e,o){return{appState:{...o,stats:{...o.stats,open:!this.checked(o)}},captureUpdate:qL.EVENTUALLY}},checked:e=>e.stats.open,keyTest:e=>!e[jL.CTRL_OR_CMD]&&e.altKey&&e.code===$L.SLASH});import{BOUND_TEXT_PADDING as qE,ROUNDNESS as JE,TEXT_ALIGN as ey,VERTICAL_ALIGN as ty,arrayToMap as oy,getFontString as JL}from"@haoxin-web/excalidraw-common";import{getOriginalContainerHeightFromCache as QL,resetOriginalContainerCache as eP,updateOriginalContainerCache as tP}from"@haoxin-web/excalidraw-element";import{computeBoundTextPosition as oP,computeContainerDimensionForBoundText as QE,getBoundTextElement as ry,redrawTextBoundingBox as ny}from"@haoxin-web/excalidraw-element";import{hasBoundTextElement as rP,isArrowElement as nP,isTextBindableContainer as zu,isTextElement as Ja,isUsingAdaptiveRadius as iP}from"@haoxin-web/excalidraw-element";import{measureText as aP}from"@haoxin-web/excalidraw-element";import{syncMovedIndices as iy}from"@haoxin-web/excalidraw-element";import{newElement as lP}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as Hu}from"@haoxin-web/excalidraw-element";var Gu=F({name:"unbindText",label:"labels.unbindText",trackEvent:{category:"element"},predicate:(e,o,t,r)=>r.scene.getSelectedElements(o).some(i=>rP(i)),perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o),i=r.scene.getNonDeletedElementsMap();return n.forEach(a=>{let l=ry(a,i);if(l){let{width:s,height:m}=aP(l.originalText,JL(l),l.lineHeight),c=QL(a.id);eP(a.id);let{x:d,y:p}=oP(a,l,i);r.scene.mutateElement(l,{containerId:null,width:s,height:m,text:l.originalText,x:d,y:p}),r.scene.mutateElement(a,{boundElements:a.boundElements?.filter(u=>u.id!==l.id),height:c||a.height})}}),{elements:e,appState:o,captureUpdate:Hu.IMMEDIATELY}}}),Uu=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(zu(n[0])?a=n[0]:zu(n[1])&&(a=n[1]),i&&a&&ry(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])&&zu(n[1])?(i=n[0],a=n[1]):(i=n[1],a=n[0]),r.scene.mutateElement(i,{containerId:a.id,verticalAlign:ty.MIDDLE,textAlign:ey.CENTER,autoResize:!0,angle:nP(a)?0:a?.angle??0}),r.scene.mutateElement(a,{boundElements:(a.boundElements||[]).concat({type:"text",id:i.id})});let l=a.height;return ny(i,a,r.scene),tP(a.id,l),{elements:sP(e,a,i),appState:{...o,selectedElementIds:{[a.id]:!0}},captureUpdate:Hu.IMMEDIATELY}}}),sP=(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),iy(r,oy([o,t])),r},cP=(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),iy(r,oy([o,t])),r},ay=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=lP({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:iP("rectangle")?JE.ADAPTIVE_RADIUS:JE.PROPORTIONAL_RADIUS}:null,opacity:100,locked:!1,x:l.x-qE,y:l.y-qE,width:QE(l.width,"rectangle"),height:QE(l.height,"rectangle"),groupIds:l.groupIds,frameId:l.frameId});if(l.boundElements?.length){let m=l.boundElements.filter(d=>d.type==="arrow").map(d=>d.id);i.filter(d=>m.includes(d.id)).forEach(d=>{let p=d.startBinding,u=d.endBinding;p?.elementId===l.id&&(p={...p,elementId:s.id}),u?.elementId===l.id&&(u={...u,elementId:s.id}),(p||u)&&r.scene.mutateElement(d,{startBinding:p,endBinding:u})})}r.scene.mutateElement(l,{containerId:s.id,verticalAlign:ty.MIDDLE,boundElements:null,textAlign:ey.CENTER,autoResize:!0}),ny(l,s,r.scene),i=cP([...i,s],s,l),a[s.id]=!0}return{elements:i,appState:{...o,selectedElementIds:a},captureUpdate:Hu.IMMEDIATELY}}});import{isEmbeddableElement as SP}from"@haoxin-web/excalidraw-element";import{KEYS as fy,getShortcutKey as kP}from"@haoxin-web/excalidraw-common";import{CaptureUpdateAction as MP}from"@haoxin-web/excalidraw-element";import{pointFrom as dy}from"@haoxin-web/excalidraw-math";import dP from"clsx";import{useCallback as ly,useEffect as sy,useLayoutEffect as mP,useRef as pP,useState as uP}from"react";import{EVENT as Wu,HYPERLINK_TOOLTIP_DELAY as hP,KEYS as Vc}from"@haoxin-web/excalidraw-common";import{getElementAbsoluteCoords as Zu}from"@haoxin-web/excalidraw-element";import{hitElementBoundingBox as gP}from"@haoxin-web/excalidraw-element";import{isElementLink as fP}from"@haoxin-web/excalidraw-element";import{getEmbedLink as bP,embeddableURLValidator as xP}from"@haoxin-web/excalidraw-element";import{sceneCoordsToViewportCoords as my,viewportCoordsToSceneCoords as EP,wrapEvent as yP,isLocalLink as wP,normalizeLink as Yu}from"@haoxin-web/excalidraw-common";import{isEmbeddableElement as Vu}from"@haoxin-web/excalidraw-element";import{jsx as Ti,jsxs as cy}from"react/jsx-runtime";var $u=380,vP=42,Xu=5,py=85,TP=500,Ku=!1,Xc=new Map,uy=({element:e,scene:o,setAppState:t,onLinkOpen:r,setToast:n,updateEmbedValidationStatus:i})=>{let a=o.getNonDeletedElementsMap(),l=Mo(),s=Lo(),m=pe(),c=e.link||"",[d,p]=uP(c),u=pP(null),f=l.showHyperlinkPopup==="editor",b=ly(()=>{if(!u.current)return;let v=Yu(u.current.value)||null;if(!e.link&&v&&ae("hyperlink","create"),Vu(e)){if(l.activeEmbeddable?.element===e&&t({activeEmbeddable:null}),!v){o.mutateElement(e,{link:null}),i(e,!1);return}if(!xP(v,s.validateEmbeddable))v&&n({message:h("toast.unableToEmbed"),closable:!0}),e.link&&Xc.set(e.id,e.link),o.mutateElement(e,{link:v}),i(e,!1);else{let{width:C,height:S}=e,P=bP(v);P?.error instanceof URIError&&n({message:h("toast.unrecognizedLinkFormat"),closable:!0});let M=P?P.intrinsicSize.w/P.intrinsicSize.h:1,R=Xc.get(e.id)!==e.link;o.mutateElement(e,{...R?{width:P?.type==="video"?C>S?C:S*M:C,height:P?.type==="video"&&C>S?C/M:S}:{},link:v}),i(e,!0),Xc.has(e.id)&&Xc.delete(e.id)}}else o.mutateElement(e,{link:v})},[e,o,n,s.validateEmbeddable,l.activeEmbeddable,t,i]);mP(()=>()=>{b()},[b]),sy(()=>{f&&u?.current&&!(m.viewport.isMobile||m.isTouchScreen)&&u.current.select()},[f,m.viewport.isMobile,m.isTouchScreen]),sy(()=>{let v=null,C=S=>{if(f)return;v&&clearTimeout(v),CP(e,a,l,dy(S.clientX,S.clientY))&&(v=window.setTimeout(()=>{t({showHyperlinkPopup:!1})},TP))};return window.addEventListener(Wu.POINTER_MOVE,C,!1),()=>{window.removeEventListener(Wu.POINTER_MOVE,C,!1),v&&clearTimeout(v)}},[l,e,f,t,a]);let x=ly(()=>{ae("hyperlink","delete"),o.mutateElement(e,{link:null}),t({showHyperlinkPopup:!1})},[t,e,o]),w=()=>{ae("hyperlink","edit","popup-ui"),t({showHyperlinkPopup:"editor"})},{x:E,y}=hy(e,l,a);return l.contextMenu||l.selectedElementsAreBeingDragged||l.resizingElement||l.isRotating||l.openMenu||l.viewModeEnabled?null:cy("div",{className:"excalidraw-hyperlinkContainer",style:{top:`${y}px`,left:`${E}px`,width:$u,padding:Xu},children:[f?Ti("input",{className:dP("excalidraw-hyperlinkContainer-input"),placeholder:h("labels.link.hint"),ref:u,value:d,onChange:v=>p(v.target.value),autoFocus:!0,onKeyDown:v=>{v.stopPropagation(),v[Vc.CTRL_OR_CMD]&&v.key===Vc.K&&v.preventDefault(),(v.key===Vc.ENTER||v.key===Vc.ESCAPE)&&(b(),t({showHyperlinkPopup:"info"}))}}):e.link?Ti("a",{href:Yu(e.link||""),className:"excalidraw-hyperlinkContainer-link",target:wP(e.link)?"_self":"_blank",onClick:v=>{if(e.link&&r){let C=yP(Wu.EXCALIDRAW_LINK,v.nativeEvent);r({...e,link:Yu(e.link)},C),C.defaultPrevented&&v.preventDefault()}},rel:"noopener noreferrer",children:e.link}):Ti("div",{className:"excalidraw-hyperlinkContainer-link",children:h("labels.link.empty")}),cy("div",{className:"excalidraw-hyperlinkContainer__buttons",children:[!f&&Ti(z,{type:"button",title:h("buttons.edit"),"aria-label":h("buttons.edit"),label:h("buttons.edit"),onClick:w,className:"excalidraw-hyperlinkContainer--edit",icon:Nt}),Ti(z,{type:"button",title:h("labels.linkToElement"),"aria-label":h("labels.linkToElement"),label:h("labels.linkToElement"),onClick:()=>{t({openDialog:{name:"elementLinkSelector",sourceElementId:e.id}})},icon:Ws}),c&&!Vu(e)&&Ti(z,{type:"button",title:h("buttons.remove"),"aria-label":h("buttons.remove"),label:h("buttons.remove"),onClick:x,className:"excalidraw-hyperlinkContainer--remove",icon:Bt})]})]})},hy=(e,o,t)=>{let[r,n]=Zu(e,t),{x:i,y:a}=my({sceneX:r+e.width/2,sceneY:n},o),l=i-o.offsetLeft-$u/2,s=a-o.offsetTop-py;return{x:l,y:s}},ju=(e,o)=>{let t=J(e,o);return Vu(t[0])?"labels.link.editEmbed":t[0]?.link?"labels.link.edit":"labels.link.create"},Qa=null,gy=(e,o,t)=>{Qa&&clearTimeout(Qa),Qa=window.setTimeout(()=>IP(e,o,t),hP)},IP=(e,o,t)=>{if(!e.link)return;let r=si();r.classList.add("excalidraw-tooltip--visible"),r.style.maxWidth="20rem",r.textContent=fP(e.link)?h("labels.link.goToElement"):e.link;let[n,i,a,l]=Zu(e,t),[s,m,c,d]=A1([n,i,a,l],e.angle,o),p=my({sceneX:s,sceneY:m},o);su(r,{left:p.x,top:p.y,width:c,height:d},"top"),ae("hyperlink","tooltip","link-icon"),Ku=!0},qu=()=>{Qa&&clearTimeout(Qa),Ku&&(Ku=!1,si().classList.remove("excalidraw-tooltip--visible"))},CP=(e,o,t,[r,n])=>{let{x:i,y:a}=EP({clientX:r,clientY:n},t),l=15/t.zoom.value;if(gP(dy(i,a),e,o))return!1;let[s,m,c]=Zu(e,o);if(i>=s&&i<=c&&a>=m-py&&a<=m)return!1;let{x:d,y:p}=hy(e,t,o);return!(r>=d-l&&r<=d+$u+Xu*2+l&&n>=p-l&&n<=p+l+Xu*2+vP)};import{jsx as LP}from"react/jsx-runtime";var el=F({name:"hyperlink",label:(e,o)=>ju(e,o),icon:va,perform:(e,o)=>o.showHyperlinkPopup==="editor"?!1:{elements:e,appState:{...o,showHyperlinkPopup:"editor",openMenu:null},captureUpdate:MP.IMMEDIATELY},trackEvent:{category:"hyperlink",action:"click"},keyTest:e=>e[fy.CTRL_OR_CMD]&&e.key===fy.K,predicate:(e,o)=>J(e,o).length===1,PanelComponent:({elements:e,appState:o,updateData:t})=>{let r=J(e,o);return LP(z,{type:"button",icon:va,"aria-label":h(ju(e,o)),title:`${SP(e[0])?h("labels.link.labelEmbed"):h("labels.link.label")} - ${kP("CtrlOrCmd+K")}`,onClick:()=>t(null),selected:r.length===1&&!!r[0].link})}});import{KEYS as by,arrayToMap as Qu,randomId as PP}from"@haoxin-web/excalidraw-common";import{elementsAreInSameGroup as AP,newElementWith as xy,selectGroupsFromGivenElements as Ey}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as yy}from"@haoxin-web/excalidraw-element";var Ju=e=>e.every(o=>!o.locked),tl=F({name:"toggleElementLock",label:(e,o,t)=>{let r=t.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!1});return Ju(r)?"labels.elementLock.lock":"labels.elementLock.unlock"},icon:(e,o)=>{let t=J(o,e);return Ju(t)?Hn:on},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=Ju(n),a=Qu(n),l=n.length>1&&AP(n),m=n.length===1||l?null:PP(),c={...o.lockedMultiSelections};if(i)c={...o.lockedMultiSelections,...m?{[m]:!0}:{}};else if(l){let w=n[0].groupIds.at(-1);delete c[w]}let d=e.map(w=>{if(!a.has(w.id))return w;let E=w.groupIds;return i?m&&(E=[...E,m]):E=E.filter(y=>!o.lockedMultiSelections[y]),xy(w,{locked:i,groupIds:E.length!==w.groupIds.length?E:w.groupIds})}),p=Qu(d),u=i?{}:Object.fromEntries(n.map(w=>[w.id,!0])),f=n.map(w=>p.get(w.id)||w),b=i?{}:Ey(f,o),x=i?m||(l?n[0].groupIds.at(-1):n[0].id):null;return{elements:d,appState:{...o,selectedElementIds:u,selectedGroupIds:b,selectedLinearElement:i?null:o.selectedLinearElement,lockedMultiSelections:c,activeLockedId:x},captureUpdate:yy.IMMEDIATELY}},keyTest:(e,o,t,r)=>e.key.toLocaleLowerCase()===by.L&&e[by.CTRL_OR_CMD]&&e.shiftKey&&r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!1}).length>0}),wy=F({name:"unlockAllElements",trackEvent:{category:"canvas"},viewMode:!1,icon:on,predicate:(e,o)=>J(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 xy(a,{locked:!1,groupIds:a.groupIds.length!==l.length?l:a.groupIds})}return a}),n=Qu(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:Ey(i,o),lockedMultiSelections:{},activeLockedId:null},captureUpdate:yy.IMMEDIATELY}},label:"labels.elementLock.unlockAll"});import{isElbowArrow as K_,isLinearElement as Z_,isLineElement as Ui}from"@haoxin-web/excalidraw-element";import{arrayToMap as $_,invariant as og}from"@haoxin-web/excalidraw-common";import{toggleLinePolygonState as j_,CaptureUpdateAction as T2}from"@haoxin-web/excalidraw-element";import Zw from"clsx";import U7 from"fuzzy";import{useEffect as fd,useRef as W7,useState as gd}from"react";import{DEFAULT_SIDEBAR as Xw,EVENT as xd,KEYS as Eo,capitalizeString as Y7,getShortcutKey as V7,isWritableElement as X7}from"@haoxin-web/excalidraw-common";import{CaptureUpdateAction as uA}from"@haoxin-web/excalidraw-element";import{useEffect as nl,useMemo as vy,useRef as rh,useState as _P}from"react";import{getLinearElementSubType as Si,updateElbowArrowPoints as DP}from"@haoxin-web/excalidraw-element";import{pointFrom as Zc,pointRotateRads as RP}from"@haoxin-web/excalidraw-math";import{hasBoundTextElement as NP,isArrowBoundToElement as BP,isArrowElement as FP,isElbowArrow as OP,isLinearElement as lh,isUsingAdaptiveRadius as zP}from"@haoxin-web/excalidraw-element";import{getCommonBoundingBox as HP,getElementAbsoluteCoords as GP}from"@haoxin-web/excalidraw-element";import{getBoundTextElement as ky,getBoundTextMaxHeight as UP,getBoundTextMaxWidth as WP,redrawTextBoundingBox as YP}from"@haoxin-web/excalidraw-element";import{wrapText as VP}from"@haoxin-web/excalidraw-element";import{assertNever as XP,CLASSES as KP,getFontString as eh,isProdEnv as ZP,mapFind as $P,reduceToCommonValue as jP,updateActiveTool as Ty}from"@haoxin-web/excalidraw-common";import{measureText as Iy}from"@haoxin-web/excalidraw-element";import{LinearElementEditor as qP}from"@haoxin-web/excalidraw-element";import{newArrowElement as th,newElement as JP,newLinearElement as QP}from"@haoxin-web/excalidraw-element";import{ShapeCache as eA}from"@haoxin-web/excalidraw-element";import{updateBindings as tA}from"@haoxin-web/excalidraw-element";import{jsx as ah}from"react/jsx-runtime";var oA=8,rA=10,ol=["rectangle","diamond","ellipse","triangle","pentagon"],rl=["line","sharpArrow","curvedArrow","elbowArrow"],nA=new Set(ol),iA=new Set(rl),ki=e=>nA.has(e),jc=e=>e==="arrow"||iA.has(e),xo=he(null),il=new Map,al=new Map,aA=({app:e})=>{let o=e.scene.getSelectedElements(e.state),t=rh(null);return nl(()=>{if(o.length===0){e.updateEditorAtom(xo,null);return}let r=Mi(o);r&&!t.current?t.current=r:(t.current&&!r||t.current&&r!==t.current)&&(e.updateEditorAtom(xo,null),t.current=null)},[o,e]),nl(()=>()=>{il.clear(),al.clear()},[]),ah(lA,{app:e,elements:o})},lA=({app:e,elements:o})=>{let t=Mi(o),r=vy(()=>t==="generic"?Ly(o):[],[t,o]),n=vy(()=>t==="linear"?ih(o):[],[t,o]),i=t==="generic"?r.every(d=>d.type===r[0].type):t==="linear"?n.every(d=>Si(d)===Si(n[0])):!1,[a,l]=_P({x:0,y:0}),s=rh(""),m=rh(null);nl(()=>{let d=[...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}${d.map(x=>x.id).join(",")}`;if(p===s.current)return;s.current=p;let u;if(d.length===1){let[x,,,w,E,y]=GP(d[0],e.scene.getNonDeletedElementsMap());u=RP(Zc(x,w),Zc(E,y),d[0].angle)}else{let{minX:x,maxY:w}=HP(d);u=Zc(x,w)}let{x:f,y:b}=Ay({sceneX:u[0],sceneY:u[1]},e.state);l({x:f,y:b})},[r,n,e.scene,e.state]),nl(()=>{for(let d of n){let p=nh(d.id,pA(d));al.has(p)||al.set(p,d)}},[n]),nl(()=>{for(let d of r)if(!il.has(d.id)){let p=ky(d,e.scene.getNonDeletedElementsMap());p&&il.set(d.id,{fontSize:p.fontSize})}},[r,e.scene]);let c=t==="linear"?[["line",co],["sharpArrow",zs],["curvedArrow",Gs],["elbowArrow",Hs]]:t==="generic"?[["rectangle",ko],["diamond",ur],["ellipse",hr],["triangle",gr],["pentagon",fr]]:[];return ah("div",{ref:m,tabIndex:-1,style:{position:"absolute",top:`${a.y+(rA+8)*e.state.zoom.value-e.state.offsetTop}px`,left:`${a.x-e.state.offsetLeft-oA}px`,zIndex:2},className:KP.CONVERT_ELEMENT_TYPE_POPUP,children:c.map(([d,p])=>{let u=i&&(t==="generic"&&r[0].type===d||t==="linear"&&Si(n[0])===d);return ah(z,{className:"Shape",type:"radio",icon:p,checked:u,name:"convertElementType-option",title:d,keyBindingLabel:"","aria-label":d,"data-testid":`toolbar-${d}`,onChange:()=>{e.state.activeTool.type!==d&&ae("convertElementType",d,"ui"),sh(e,{conversionType:t,nextType:d}),m.current?.focus()}},`${o[0].id}${o[0].version}_${d}`)})})},sA=(e,o,t)=>{let r=WP(e,o),n=UP(e,o),i=VP(o.text,eh(o),r),a=Iy(i,eh(o),o.lineHeight),l=o.fontSize;for(;(a.width>r||a.height>n)&&l>0;){l-=1;let s={...o,fontSize:l};a=Iy(o.text,eh(s),o.lineHeight)}qc(o,t.getNonDeletedElementsMap(),{fontSize:l,width:a.width,height:a.height}),YP(o,e,t)},sh=(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=Ly(n),m=l.every(c=>c.type===l[0].type)?ol.indexOf(l[0].type):-1;if(t=t??ol[(m+ol.length+a)%ol.length],t&&ki(t)){let c={};for(let p of l){let u=Sy(p,t,e);c[u.id]=u}let d=[];for(let p of e.scene.getElementsIncludingDeleted())c[p.id]?d.push(c[p.id]):d.push(p);e.scene.replaceAllElements(d);for(let p of Object.values(c)){let u=ky(p,e.scene.getNonDeletedElementsMap());u&&(il.get(p.id)&&qc(u,e.scene.getNonDeletedElementsMap(),{fontSize:il.get(p.id)?.fontSize??u.fontSize}),sA(p,u,e.scene))}e.setState(p=>({selectedElementIds:i,activeTool:Ty(p,{type:"selection"})}))}}if(o==="linear"){let l=ih(n);if(!t){let m=jP(l,Si),c=m?rl.indexOf(m):-1;t=rl[(c+rl.length+a)%rl.length]}if(jc(t)){let m=[],c=e.scene.getElementsMapIncludingDeleted();for(let d of l){let p=al.get(nh(d.id,t));if(p&&Si(p)===t)c.set(p.id,p),m.push(p);else{let u=Sy(d,t,e);c.set(u.id,u),m.push(u)}}e.scene.replaceAllElements(c);for(let d of m)if(lh(d))if(OP(d)){let p=cA(d);if(p.length<2)continue;let u=[];for(let b=1;b<p.length-2;b++)u.push({start:p[b],end:p[b+1],index:b+1});let f=DP(d,e.scene.getNonDeletedElementsMap(),{points:p,fixedSegments:u});qc(d,e.scene.getNonDeletedElementsMap(),{...f,endArrowhead:"arrow"})}else{let p=$P(["line","sharpArrow","curvedArrow"],u=>al.get(nh(d.id,u)));if(p){let u=p.points;e.scene.mutateElement(d,{points:u})}}}let s=ih(e.scene.getSelectedElements(e.state));e.setState(m=>({selectedElementIds:i,selectedLinearElement:s.length===1?new qP(s[0],e.scene.getNonDeletedElementsMap()):null,activeTool:Ty(m,{type:"selection"})}))}return!0},Mi=e=>{if(e.length===0)return null;let o=!1;for(let t of e){if(ki(t.type))return"generic";My(t)&&(o=!0)}return o?"linear":null},My=e=>lh(e)&&(!FP(e)||!BP(e)&&!NP(e)),nh=(e,o)=>`${e}:${o}`,Ly=e=>e.filter(o=>ki(o.type)),ih=e=>e.filter(o=>My(o)),Kc=20,Ii=(e,o)=>e[0]===o[0],oh=(e,o)=>e[1]===o[1],Cy=(e,o)=>Ii(e,o)?Math.abs(e[1]-o[1]):Math.abs(e[0]-o[0]),cA=e=>{let o=[e.points[0]],t=dA(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])<Kc?l[0]=a[0]:Math.abs(l[1]-a[1])<Kc&&(l[1]=a[1]),Ii(a,l)||oh(a,l)||o.push(Zc(a[0],l[1])),o.push(l)}let r=[o[0]];for(let i=1;i<o.length-1;++i)Ii(o[i-1],o[i])&&Ii(o[i],o[i+1])||oh(o[i-1],o[i])&&oh(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],m=Ii(a,l),c=Ii(l,s);if(m!==c){let d=Cy(a,l),p=Cy(l,s);if(d<Kc||p<Kc){if(p<d)m?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},dA=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},Sy=(e,o,t)=>{if(!mA(e.type,o)){if(!ZP())throw Error(`Invalid conversion from ${e.type} to ${o}.`);return e}if(e.type===o)return e;if(eA.delete(e),ki(o)){let r=Ci(JP({...e,type:o,roundness:o==="diamond"&&e.roundness?{type:zP(o)?$c.ADAPTIVE_RADIUS:$c.PROPORTIONAL_RADIUS}:e.roundness}));return tA(r,t.scene),r}if(jc(o))switch(o){case"line":return Ci(QP({...e,type:"line"}));case"sharpArrow":return Ci(th({...e,type:"arrow",elbowed:!1,roundness:null,startArrowhead:t.state.currentItemStartArrowhead,endArrowhead:t.state.currentItemEndArrowhead}));case"curvedArrow":return Ci(th({...e,type:"arrow",elbowed:!1,roundness:{type:$c.PROPORTIONAL_RADIUS},startArrowhead:t.state.currentItemStartArrowhead,endArrowhead:t.state.currentItemEndArrowhead}));case"elbowArrow":return Ci(th({...e,type:"arrow",elbowed:!0,fixedSegments:null,roundness:null}))}return XP(o,`unhandled conversion type: ${o}`),e},mA=(e,o)=>!!(ki(e)&&ki(o)||jc(e)&&jc(o)),pA=e=>lh(e)?Si(e):e.type,Py=aA;var _y=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(xo,{type:"panel"}),{captureUpdate:uA.NEVER}},checked:e=>e.gridModeEnabled,predicate:(e,o,t)=>Mi(e)!==null});import{canCreateLinkFromElements as ch,defaultGetElementLinkFromSelection as hA,getLinkIdAndTypeFromSelection as gA}from"@haoxin-web/excalidraw-element";import{CaptureUpdateAction as ll}from"@haoxin-web/excalidraw-element";var Jc=F({name:"copyElementLink",label:"labels.copyElementLink",icon:Yn,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{let n=J(e,o);try{if(window.location){let i=gA(n,o);return i?(await fo(r.props.generateLinkForSelection?r.props.generateLinkForSelection(i.id,i.type):hA(i.id,i.type)),{appState:{toast:{message:h("toast.elementLinkCopied"),closable:!0}},captureUpdate:ll.EVENTUALLY}):{appState:o,elements:e,app:r,captureUpdate:ll.EVENTUALLY}}}catch(i){console.error(i)}return{appState:o,elements:e,app:r,captureUpdate:ll.EVENTUALLY}},predicate:(e,o)=>ch(J(e,o))}),Dy=F({name:"linkToElement",label:"labels.linkToElement",icon:Ws,perform:(e,o,t,r)=>{let n=J(e,o);return n.length!==1||!ch(n)?{elements:e,appState:o,app:r,captureUpdate:ll.EVENTUALLY}:{appState:{...o,openDialog:{name:"elementLinkSelector",sourceElementId:J(e,o)[0].id}},captureUpdate:ll.IMMEDIATELY}},predicate:(e,o,t,r)=>{let n=J(e,o);return o.openDialog?.name!=="elementLinkSelector"&&n.length===1&&ch(n)},trackEvent:!1});import{isDarwin as Ry,getShortcutKey as ne}from"@haoxin-web/excalidraw-common";var fA={toggleTheme:[ne("Shift+Alt+D")],saveScene:[ne("CtrlOrCmd+S")],loadScene:[ne("CtrlOrCmd+O")],clearCanvas:[ne("CtrlOrCmd+Delete")],imageExport:[ne("CtrlOrCmd+Shift+E")],commandPalette:[ne("CtrlOrCmd+/"),ne("CtrlOrCmd+Shift+P")],cut:[ne("CtrlOrCmd+X")],copy:[ne("CtrlOrCmd+C")],paste:[ne("CtrlOrCmd+V")],copyStyles:[ne("CtrlOrCmd+Alt+C")],pasteStyles:[ne("CtrlOrCmd+Alt+V")],selectAll:[ne("CtrlOrCmd+A")],deleteSelectedElements:[ne("Delete")],duplicateSelection:[ne("CtrlOrCmd+D"),ne(`Alt+${h("helpDialog.drag")}`)],sendBackward:[ne("CtrlOrCmd+[")],bringForward:[ne("CtrlOrCmd+]")],sendToBack:[Ry?ne("CtrlOrCmd+Alt+["):ne("CtrlOrCmd+Shift+[")],bringToFront:[Ry?ne("CtrlOrCmd+Alt+]"):ne("CtrlOrCmd+Shift+]")],copyAsPng:[ne("Shift+Alt+C")],group:[ne("CtrlOrCmd+G")],ungroup:[ne("CtrlOrCmd+Shift+G")],gridMode:[ne("CtrlOrCmd+'")],zenMode:[ne("Alt+Z")],objectsSnapMode:[ne("Alt+S")],stats:[ne("Alt+/")],addToLibrary:[],flipHorizontal:[ne("Shift+H")],flipVertical:[ne("Shift+V")],viewMode:[ne("Alt+R")],hyperlink:[ne("CtrlOrCmd+K")],toggleElementLock:[ne("CtrlOrCmd+Shift+L")],resetZoom:[ne("CtrlOrCmd+0")],zoomOut:[ne("CtrlOrCmd+-")],zoomIn:[ne("CtrlOrCmd++")],zoomToFitSelection:[ne("Shift+3")],zoomToFit:[ne("Shift+1")],zoomToFitSelectionInViewport:[ne("Shift+2")],toggleEraserTool:[ne("E")],toggleHandTool:[ne("H")],setFrameAsActiveTool:[ne("F")],saveFileToDisk:[ne("CtrlOrCmd+S")],saveToActiveFile:[ne("CtrlOrCmd+S")],toggleShortcuts:[ne("?")],searchMenu:[ne("CtrlOrCmd+F")],wrapSelectionInFrame:[]},He=(e,o=0)=>{let t=fA[e];return t&&t.length>0?t[o]||t[0]:""};var bA="\\u0300-\\u036f",xA="\\ufe20-\\ufe2f",EA="\\u20d0-\\u20ff",yA=bA+xA+EA,wA=`[${yA}]`,vA=RegExp(wA,"g"),TA=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,IA={\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"},dh=e=>e.replace(TA,o=>IA[o]||o).replace(vA,"");import u7 from"clsx";import{useEffect as h7,useState as g7}from"react";import{KEYS as f7,queryFocusableElements as _w}from"@haoxin-web/excalidraw-common";import{useCallback as CA,useState as SA}from"react";var Ny=()=>{let[e,o]=SA(null),t=CA(r=>o(r),[]);return[e,t]};import{useState as Sw,useCallback as Sh,useMemo as kw,useEffect as Tw,memo as Mw,useRef as o7}from"react";import{LIBRARY_DISABLED_TYPES as r7,randomId as n7,isShallowEqual as i7}from"@haoxin-web/excalidraw-common";import{useEffect as zy,useRef as Hy}from"react";import{URL_HASH_KEYS as uh,URL_QUERY_KEYS as hh,APP_NAME as Gy,EVENT as ed,DEFAULT_SIDEBAR as AA,LIBRARY_SIDEBAR_TAB as _A,arrayToMap as gh,cloneJSON as DA,preventUnload as RA,promiseTry as Uy,resolvablePromise as NA,toValidURL as BA,Queue as FA,Emitter as OA}from"@haoxin-web/excalidraw-common";import{hashElementsVersion as zA,hashString as HA}from"@haoxin-web/excalidraw-element";import{getCommonBoundingBox as ph}from"@haoxin-web/excalidraw-element";import{MIME_TYPES as bn}from"@haoxin-web/excalidraw-common";var Lr=({elements:e,appState:o,files:t,maxWidthOrHeight:r,getDimensions:n,exportPadding:i,exportingFrame:a})=>{let{elements:l,appState:s}=Bn({elements:e,appState:o},null,null,{deleteInvisibleElements:!0}),{exportBackground:m,viewBackgroundColor:c}=s;return cs(l,{...s,offsetTop:0,offsetLeft:0,width:0,height:0},t||{},{exportBackground:m,exportPadding:i,viewBackgroundColor:c,exportingFrame:a},(d,p)=>{let u=document.createElement("canvas");if(r){typeof n=="function"&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");let b=Math.max(d,p),x=r<b?r/b:o?.exportScale??1;return u.width=d*x,u.height=p*x,{canvas:u,scale:x}}let f=n?.(d,p)||{width:d,height:p};return u.width=f.width,u.height=f.height,{canvas:u,scale:f.scale??1}})},By=async e=>{let{mimeType:o=bn.png,quality:t}=e;o===bn.png&&typeof t=="number"&&console.warn(`"quality" will be ignored for "${bn.png}" mimeType`),o==="image/jpg"&&(o=bn.jpg),o===bn.jpg&&!e.appState?.exportBackground&&(console.warn(`Defaulting "exportBackground" to "true" for "${bn.jpg}" mimeType`),e={...e,appState:{...e.appState,exportBackground:!0}});let r=await Lr(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===bn.png&&e.appState?.exportEmbedScene&&(a=await H1({blob:a,metadata:ua(e.elements,e.appState,e.files||{},"local")})),n(a)},o,t)})},Li=async({elements:e,appState:o=mr(),files:t={},exportPadding:r,renderEmbeddables:n,exportingFrame:i,skipInliningFonts:a,reuseImages:l})=>{let{elements:s,appState:m}=Bn({elements:e,appState:o},null,null,{deleteInvisibleElements:!0}),c={...m,exportPadding:r};return Nn(s,c,t,{exportingFrame:i,renderEmbeddables:n,skipInliningFonts:a,reuseImages:l})},kA=async e=>{if(e.type==="svg"){let o=await Li(e);await fo(o.outerHTML)}else if(e.type==="png")await Pc(By(e));else if(e.type==="json")await Lc(e.elements,e.files);else throw new Error("Invalid export type")};import{useEffect as MA,useState as LA}from"react";import{COLOR_PALETTE as PA}from"@haoxin-web/excalidraw-common";var mh=he(new Map),Fy=async e=>await Li({elements:e,appState:{exportBackground:!1,viewBackgroundColor:PA.white},files:null,renderEmbeddables:!1,skipInliningFonts:!0}),Oy=(e,o,t)=>{let[r,n]=LA();return MA(()=>{if(o)if(e){let i=t.get(e);i?n(i):(async()=>{let a=await Fy(o);a.querySelector(".style-fonts")?.remove(),a&&(t.set(e,a),n(a))})()}else(async()=>{let i=await Fy(o);n(i)})()},[e,o,t,n]),r},Qc=()=>{let[e]=ce(mh);return{clearLibraryCache:()=>e.clear(),deleteItemsFromLibraryCache:r=>{r.forEach(n=>e.delete(n))},svgCache:e}};var GA=["excalidraw.com","raw.githubusercontent.com/excalidraw/excalidraw-libraries"],Yy=new OA,xn=he({status:"loaded",isInitialized:!1,libraryItems:[]}),sl=e=>DA(e),UA=(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)),Vy=(e,o)=>{let t=[];for(let r of o)UA(e,r)&&t.push(r);return[...t,...e]},Xy=(e,o)=>{let t=gh(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=gh(e);for(let i of o)n.has(i.id)||r.addedItems.set(i.id,i);return r},fh=class{constructor(o){I(this,"currLibraryItems",[]);I(this,"prevLibraryItems",sl(this.currLibraryItems));I(this,"app");I(this,"updateQueue",[]);I(this,"getLastUpdateTask",()=>this.updateQueue[this.updateQueue.length-1]);I(this,"notifyListeners",()=>{if(this.updateQueue.length>0)Ve.set(xn,o=>({status:"loading",libraryItems:this.currLibraryItems,isInitialized:o.isInitialized}));else{Ve.set(xn,{status:"loaded",libraryItems:this.currLibraryItems,isInitialized:!0});try{let o=this.prevLibraryItems;this.prevLibraryItems=sl(this.currLibraryItems);let t=sl(this.currLibraryItems);this.app.props.onLibraryChange?.(t),Yy.trigger(Xy(o,t),t)}catch(o){console.error(o)}}});I(this,"destroy",()=>{this.updateQueue=[],this.currLibraryItems=[],Ve.set(mh,new Map)});I(this,"resetLibrary",()=>this.setLibrary([]));I(this,"getLatestLibrary",()=>new Promise(async o=>{try{let t=await(this.getLastUpdateTask()||this.currLibraryItems);this.updateQueue.length>0?o(this.getLatestLibrary()):o(sl(t))}catch{return o(this.currLibraryItems)}}));I(this,"updateLibrary",async({libraryItems:o,prompt:t=!1,merge:r=!1,openLibraryMenu:n=!1,defaultStatus:i="unpublished"})=>(n&&this.app.setState({openSidebar:{name:AA.name,tab:_A}}),this.setLibrary(()=>new Promise(async(a,l)=>{try{let s=await(typeof o=="function"&&!(o instanceof Blob)?o(this.currLibraryItems):o),m;s instanceof Blob?m=await jm(s,i):m=fa(s,i),!t||window.confirm(h("alerts.confirmAddLibrary",{numShapes:m.length}))?(t&&this.app.focusContainer(),a(r?Vy(this.currLibraryItems,m):m)):l(new Dn)}catch(s){l(s)}}))));I(this,"setLibrary",o=>{let t=new Promise(async(r,n)=>{try{await this.getLastUpdateTask(),typeof o=="function"&&(o=o(this.currLibraryItems)),this.currLibraryItems=sl(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}},Ky=fh,rd=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}=ph(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}=ph(w.elements);x=Math.max(x,E)}f++,b++}return x},a=0,l=0,s=0,m=0,c=0,d=0,p=0;for(let u of e){c&&c%t===0&&(l+=s+50,a=0,d=0,p++),d===0&&(s=n(p)),m=i(d);let{minX:f,minY:b,width:x,height:w}=ph(u.elements),E=(m-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+=m+50,c++,d++}return r},WA=(e,o=GA)=>{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}"`)},bh=()=>{let e=new URLSearchParams(window.location.hash.slice(1)).get(uh.addLibrary)||new URLSearchParams(window.location.search).get(hh.addLibrary),o=e?new URLSearchParams(window.location.hash.slice(1)).get("token"):null;return e?{libraryUrl:e,idToken:o}:null},Pr=class Pr{constructor(o){I(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(fa(l?.libraryItems||[],"published"))}catch(l){a(l)}});return r?Pr.queue.push(n):n()}getLibraryItems(o){return Pr.getLibraryItems(this.adapter,o,!1)}};I(Pr,"queue",new FA),I(Pr,"run",async(o,t)=>{let r=new Pr(o);return Pr.queue.push(()=>t(r))});var Pi=Pr,cl=0,td=0,od=e=>HA(e.map(o=>`${o.id}:${zA(o.elements)}`).sort().join()),Wy=async(e,o)=>{try{return td++,await Pi.run(e,async t=>{let r=gh(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=od(i);return a!==cl&&await e.save({libraryItems:i}),cl=a,i})}finally{td--}},YA=e=>{let{excalidrawAPI:o}=e,t=Hy(e);t.current=e;let r=Hy(!1);zy(()=>{if(!o)return;r.current=!1;let n=async({libraryUrl:l,idToken:s})=>{let m=new Promise(async(d,p)=>{try{l=decodeURIComponent(l),l=BA(l),WA(l,t.current.validateLibraryUrl);let f=await(await fetch(l)).blob();d(f)}catch(u){p(u)}}),c=s!==o.id;await(c&&document.hidden?new Promise(d=>{window.addEventListener("focus",()=>d(),{once:!0})}):null);try{await o.updateLibrary({libraryItems:m,prompt:c,merge:!0,defaultStatus:"published",openLibraryMenu:!0})}catch(d){throw o.updateScene({appState:{errorMessage:d.message}}),d}finally{if(window.location.hash.includes(uh.addLibrary)){let d=new URLSearchParams(window.location.hash.slice(1));d.delete(uh.addLibrary),window.history.replaceState({},Gy,`#${d.toString()}`)}else if(window.location.search.includes(hh.addLibrary)){let d=new URLSearchParams(window.location.search);d.delete(hh.addLibrary),window.history.replaceState({},Gy,`?${d.toString()}`)}}},i=l=>{l.preventDefault();let s=bh();s&&(l.stopImmediatePropagation(),window.history.replaceState({},"",l.oldURL),n(s))},a=bh();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,m=NA();s?m.resolve(Uy(s.load).then(async c=>{let d=null;try{if(!c)return Pi.getLibraryItems(l,"load");d=fa(c.libraryItems||[],"published");let p=await Wy(l,Xy([],d));try{await s.clear()}catch(u){console.error(`couldn't delete legacy library data: ${u.message}`)}return p}catch(p){return console.error(`couldn't migrate legacy library data: ${p.message}`),d}}).catch(c=>(console.error(`error during library migration: ${c.message}`),Pi.getLibraryItems(l,"load")))):m.resolve(Uy(Pi.getLibraryItems,l,"load")),o.updateLibrary({libraryItems:m.then(c=>{let d=c||[];return cl=od(d),d}),merge:!0}).finally(()=>{r.current=!0})}return window.addEventListener(ed.HASHCHANGE,i),()=>{window.removeEventListener(ed.HASHCHANGE,i)}},[o]),zy(()=>{let n=Yy.on(async(a,l)=>{let s=r.current,m="adapter"in t.current&&t.current.adapter||null;try{m&&cl!==od(l)&&await Wy(m,a)}catch(c){console.error(`couldn't persist library update: ${c.message}`,a),s&&t.current.excalidrawAPI&&t.current.excalidrawAPI.updateScene({appState:{errorMessage:h("errors.saveLibraryError")}})}}),i=a=>{td&&RA(a)};return window.addEventListener(ed.BEFORE_UNLOAD,i),()=>{window.removeEventListener(ed.BEFORE_UNLOAD,i),n(),cl=0,td=0}},[])};import ZA from"clsx";import{VERSIONS as VA}from"@haoxin-web/excalidraw-common";import{jsx as KA}from"react/jsx-runtime";var XA=({theme:e,id:o,libraryReturnUrl:t})=>{let r=t||window.location.origin+window.location.pathname;return KA("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=${VA.excalidrawLibrary}`,target:"_excalidraw_libraries",children:h("labels.libraries")})},Zy=XA;import{jsx as $A,jsxs as jA}from"react/jsx-runtime";var nd=({libraryReturnUrl:e,theme:o,id:t,style:r,children:n,className:i})=>jA("div",{className:ZA("library-menu-control-buttons",i),style:r,children:[$A(Zy,{id:t,libraryReturnUrl:e,theme:o}),n]});import{useCallback as Di,useEffect as Z8,useMemo as ww,useRef as $8,useState as j8}from"react";import{MIME_TYPES as q8,arrayToMap as J8}from"@haoxin-web/excalidraw-common";import{duplicateElements as Q8}from"@haoxin-web/excalidraw-element";import qA from"lodash.throttle";import{useEffect as JA}from"react";var QA=he(0),$y=e=>{let[o,t]=ce(QA);return JA(()=>{let{current:r}=e;if(!r)return;let n=qA(()=>{let{scrollTop:i}=r;t(i)},200);return r.addEventListener("scroll",n),()=>{n.cancel(),r.removeEventListener("scroll",n)}},[e,t]),o};import A8 from"clsx";import{useCallback as _8,useState as wh}from"react";import{muteFSAbortError as D8}from"@haoxin-web/excalidraw-common";import{flushSync as jy}from"react-dom";import e8 from"clsx";import{jsx as id,jsxs as o8}from"react/jsx-runtime";var t8=({label:e,onClick:o,className:t,children:r,actionType:n,type:i="button",isLoading:a,...l})=>{let s=n?`Dialog__action-button--${n}`:"";return o8("button",{className:e8("Dialog__action-button",s,t),type:i,"aria-label":e,onClick:o,...l,children:[r&&id("div",{style:a?{visibility:"hidden"}:{},children:r}),id("div",{style:a?{visibility:"hidden"}:{},children:e}),a&&id("div",{style:{position:"absolute",inset:0},children:id(it,{})})]})},Jo=t8;import{jsx as qy,jsxs as Jy}from"react/jsx-runtime";var r8=e=>{let{onConfirm:o,onCancel:t,children:r,confirmText:n=h("buttons.confirm"),cancelText:i=h("buttons.cancel"),className:a="",...l}=e,s=me(),m=pr(Ai),{container:c}=Xe();return Jy(Ge,{onCloseRequest:t,size:"small",...l,className:`confirm-dialog ${a}`,children:[r,Jy("div",{className:"confirm-dialog-buttons",children:[qy(Jo,{label:i,onClick:()=>{s({openMenu:null}),m(!1),jy(()=>{t()}),c?.focus()}}),qy(Jo,{label:n,onClick:()=>{s({openMenu:null}),m(!1),jy(()=>{o()}),c?.focus()},actionType:"danger"})]})]})},ad=r8;import sd from"open-color";import{useCallback as d8,useEffect as yh,useRef as Qy,useState as xh}from"react";import{EDITOR_LS_KEYS as Eh,EXPORT_DATA_TYPES as m8,MIME_TYPES as ew,VERSIONS as p8,chunk as u8,getExportSource as h8}from"@haoxin-web/excalidraw-common";var jt=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}}};I(jt,"set",(o,t)=>{try{return window.localStorage.setItem(o,JSON.stringify(t)),!0}catch(r){return console.warn(`localStorage.setItem error: ${r.message}`),!1}}),I(jt,"delete",o=>{try{window.localStorage.removeItem(o)}catch(t){console.warn(`localStorage.removeItem error: ${t.message}`)}});import ld from"react";var n8=/({{[\w-]+}})|(<[\w-]+>)|(<\/[\w-]+>)/g,i8=/{{([\w-]+)}}/,a8=/<([\w-]+)>/,l8=/<\/([\w-]+)>/,s8=(e,o)=>{let t=[{name:"",children:[]}];return e.split(n8).filter(Boolean).forEach(r=>{let n=r.match(a8),i=r.match(l8),a=r.match(i8);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(),m=ld.createElement(ld.Fragment,{},...s.children),c=o[s.name];typeof c=="function"&&t[t.length-1].children.push(c(m))}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},c8=({i18nKey:e,children:o,...t})=>{let{t:r}=Ye();return ld.createElement(ld.Fragment,{},...s8(r(e),t))},yt=c8;import{jsx as de,jsxs as ct}from"react/jsx-runtime";var g8=async e=>{let r=Math.round(8),n=Math.max(Math.round(128/64),2),i=u8(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=sd.white,l.fillRect(0,0,a.width,a.height);for(let[s,m]of e.entries()){let c=await Lr({elements:m.elements,files:null,maxWidthOrHeight:128}),{width:d,height:p}=c,u=Math.floor(s/6)*(128+r*2),f=s%6*(128+r*2);l.drawImage(c,f+(128-d)/2+r,u+(128-p)/2+r),l.lineWidth=n,l.strokeStyle=sd.gray[4],l.strokeRect(f+r/2,u+r/2,128+r,128+r)}return await ps(new File([await Go(a)],"preview",{type:ew.png}),{outputType:ew.jpg,maxWidthOrHeight:5e3})},f8=({libItem:e,appState:o,index:t,onChange:r,onRemove:n})=>{let i=Qy(null),a=Qy(null);return yh(()=>{let l=i.current;l&&(async()=>{let s=await Li({elements:e.elements,appState:{...o,viewBackgroundColor:sd.white,exportBackground:!0},files:null,skipInliningFonts:!0});l.innerHTML=s.outerHTML})()},[e.elements,o]),ct("div",{className:"single-library-item",children:[e.status==="published"&&de("span",{className:"single-library-item-status",children:h("labels.statusPublished")}),de("div",{ref:i,className:"single-library-item__svg"}),de(z,{"aria-label":h("buttons.remove"),type:"button",icon:Vt,className:"single-library-item--remove",onClick:n.bind(null,e.id),title:h("buttons.remove")}),ct("div",{style:{display:"flex",margin:"0.8rem 0",width:"100%",fontSize:"14px",fontWeight:500,flexDirection:"column"},children:[ct("label",{style:{display:"flex",justifyContent:"space-between",flexDirection:"column"},children:[ct("div",{style:{padding:"0.5em 0"},children:[de("span",{style:{fontWeight:500,color:sd.gray[6]},children:h("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})]})]})},b8=({onClose:e,libraryItems:o,appState:t,onSuccess:r,onError:n,updateItemsInStorage:i,onRemove:a})=>{let[l,s]=xh({authorName:"",githubHandle:"",name:"",description:"",twitterHandle:"",website:""}),[m,c]=xh(!1);yh(()=>{let y=jt.get(Eh.PUBLISH_LIBRARY);y&&s(y)},[]);let[d,p]=xh(o.slice());yh(()=>{p(o.slice())},[o]);let u=y=>{s({...l,[y.target.name]:y.target.value})},f=async y=>{y.preventDefault(),c(!0);let v=[],C=!1;if(d.forEach(k=>{let N="";k.name||(N=h("publishDialog.errors.required"),C=!0),v.push({...k,error:N})}),C){p(v),c(!1);return}let S=await g8(d),P={type:m8.excalidrawLibrary,version:p8.excalidrawLibrary,source:h8(),libraryItems:d},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})=>{jt.delete(Eh.PUBLISH_LIBRARY),r({url:N,authorName:l.authorName,items:d})}):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 d.forEach((v,C)=>{y.push(de("div",{className:"single-library-item-wrapper",children:de(f8,{libItem:v,appState:t,index:C,onChange:(S,P)=>{let M=d.slice();M[P].name=S,p(M)},onRemove:a})},C))}),de("div",{className:"selected-library-items",children:y})},x=d8(()=>{i(d),jt.set(Eh.PUBLISH_LIBRARY,l),e()},[d,e,i,l]),w=!!o.length,E=o.some(y=>y.status==="published");return de(Ge,{onCloseRequest:x,title:h("publishDialog.title"),className:"publish-library",children:w?ct("form",{onSubmit:f,children:[de("div",{className:"publish-library-note",children:de(yt,{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(yt,{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:h("publishDialog.noteItems")}),E&&de("span",{className:"publish-library-note publish-library-warning",children:h("publishDialog.republishWarning")}),b(),ct("div",{className:"publish-library__fields",children:[ct("label",{children:[ct("div",{children:[de("span",{children:h("publishDialog.libraryName")}),de("span",{"aria-hidden":"true",className:"required",children:"*"})]}),de("input",{type:"text",name:"name",required:!0,value:l.name,onChange:u,placeholder:h("publishDialog.placeholder.libraryName")})]}),ct("label",{style:{alignItems:"flex-start"},children:[ct("div",{children:[de("span",{children:h("publishDialog.libraryDesc")}),de("span",{"aria-hidden":"true",className:"required",children:"*"})]}),de("textarea",{name:"description",rows:4,required:!0,value:l.description,onChange:u,placeholder:h("publishDialog.placeholder.libraryDesc")})]}),ct("label",{children:[ct("div",{children:[de("span",{children:h("publishDialog.authorName")}),de("span",{"aria-hidden":"true",className:"required",children:"*"})]}),de("input",{type:"text",name:"authorName",required:!0,value:l.authorName,onChange:u,placeholder:h("publishDialog.placeholder.authorName")})]}),ct("label",{children:[de("span",{children:h("publishDialog.githubUsername")}),de("input",{type:"text",name:"githubHandle",value:l.githubHandle,onChange:u,placeholder:h("publishDialog.placeholder.githubHandle")})]}),ct("label",{children:[de("span",{children:h("publishDialog.twitterUsername")}),de("input",{type:"text",name:"twitterHandle",value:l.twitterHandle,onChange:u,placeholder:h("publishDialog.placeholder.twitterHandle")})]}),ct("label",{children:[de("span",{children:h("publishDialog.website")}),de("input",{type:"text",name:"website",pattern:"https?://.+",title:h("publishDialog.errors.website"),value:l.website,onChange:u,placeholder:h("publishDialog.placeholder.website")})]}),de("span",{className:"publish-library-note",children:de(yt,{i18nKey:"publishDialog.noteLicense",link:y=>de("a",{href:"https://github.com/excalidraw/excalidraw-libraries/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",children:y})})})]}),ct("div",{className:"publish-library__buttons",children:[de(Jo,{label:h("buttons.cancel"),onClick:x,"data-testid":"cancel-clear-canvas-button"}),de(Jo,{type:"submit",label:h("buttons.submit"),actionType:"primary",isLoading:m})]})]}):de("p",{style:{padding:"1em",textAlign:"center",fontWeight:500},children:h("publishDialog.atleastOneLibItem")})})},tw=b8;import y8 from"clsx";import{useEffect as w8,useRef as v8}from"react";import{EVENT as iw,KEYS as T8}from"@haoxin-web/excalidraw-common";import{forwardRef as ow}from"react";import rw from"clsx";import{jsx as nw}from"react/jsx-runtime";var x8=ow(({children:e,gap:o,align:t,justifyContent:r,className:n,style:i},a)=>nw("div",{className:rw("Stack Stack_horizontal",n),style:{"--gap":o,alignItems:t,justifyContent:r,...i},ref:a,children:e})),E8=ow(({children:e,gap:o,align:t,justifyContent:r,className:n,style:i},a)=>nw("div",{className:rw("Stack Stack_vertical",n),style:{"--gap":1,justifyItems:t,justifyContent:"flex-start",...i},ref:a,children:e})),Ue={Row:x8,Col:E8};import{jsx as cd}from"react/jsx-runtime";var aw=({children:e,onClickOutside:o,className:t="",onSelect:r,style:n})=>{let i=pe(),a=v8(null),l=br({onClickOutside:o});Jn(a,()=>{l.onClickOutside?.()}),w8(()=>{let m=d=>{d.key===T8.ESCAPE&&(d.stopImmediatePropagation(),l.onClickOutside?.())},c={capture:!0};return document.addEventListener(iw.KEYDOWN,m,c),()=>{document.removeEventListener(iw.KEYDOWN,m,c)}},[l]);let s=y8(`dropdown-menu ${t}`,{"dropdown-menu--mobile":i.editor.isMobile}).trim();return cd(Yp.Provider,{value:{onSelect:r},children:cd("div",{ref:a,className:s,style:n,"data-testid":"dropdown-menu",children:i.editor.isMobile?cd(Ue.Col,{className:"dropdown-menu-container",children:e}):cd(De,{className:"dropdown-menu-container",padding:2,style:{zIndex:2},children:e})})})};aw.displayName="DropdownMenuContent";var lw=aw;import{jsx as C8}from"react/jsx-runtime";var I8=({children:e,className:o="",selected:t,...r})=>C8("div",{...r,className:`dropdown-menu-item-base dropdown-menu-item-custom ${o} ${t?"dropdown-menu-item--selected":""}`.trim(),children:e}),sw=I8;import{jsx as cw}from"react/jsx-runtime";var dw=({icon:e,shortcut:o,href:t,children:r,onSelect:n,className:i="",selected:a,rel:l="noopener",...s})=>{let m=cc(s.onClick,n);return cw("a",{...s,href:t,target:"_blank",rel:l||"noopener",className:sc(i,a),title:s.title??s["aria-label"],onClick:m,children:cw(lc,{icon:e,shortcut:o,children:r})})},_i=dw;dw.displayName="DropdownMenuItemLink";import{jsx as S8}from"react/jsx-runtime";var mw=()=>S8("div",{style:{height:"1px",backgroundColor:"var(--default-border-color)",margin:".5rem 0"}}),pw=mw;mw.displayName="DropdownMenuSeparator";import k8 from"clsx";import{jsx as M8}from"react/jsx-runtime";var uw=({className:e="",children:o,onToggle:t,title:r,...n})=>{let i=pe(),a=k8(`dropdown-menu-button ${e}`,"zen-mode-transition",{"dropdown-menu-button--mobile":i.editor.isMobile}).trim();return M8("button",{"data-prevent-outside-click":!0,className:a,onClick:t,type:"button","data-testid":"dropdown-menu-button",title:r,...n,children:o})},hw=uw;uw.displayName="DropdownMenuTrigger";import dd from"react";var gw=e=>{let o=dd.Children.toArray(e).find(t=>dd.isValidElement(t)&&typeof t.type!="string"&&t?.type.displayName&&t.type.displayName==="DropdownMenuTrigger");return o||null},fw=e=>{let o=dd.Children.toArray(e).find(t=>dd.isValidElement(t)&&typeof t.type!="string"&&t?.type.displayName&&t.type.displayName==="DropdownMenuContent");return o||null};import{Fragment as L8,jsxs as P8}from"react/jsx-runtime";var Qo=({children:e,open:o})=>{let t=gw(e),r=fw(e);return P8(L8,{children:[t,o&&r]})};Qo.Trigger=hw;Qo.Content=lw;Qo.Item=xt;Qo.ItemLink=_i;Qo.ItemCustom=sw;Qo.Group=Da;Qo.Separator=pw;var Ie=Qo;Qo.displayName="DropdownMenu";import{jsx as Pt,jsxs as md}from"react/jsx-runtime";var R8=(e,o)=>e.filter(t=>o.includes(t.id)),N8=({setAppState:e,selectedItems:o,library:t,onRemoveFromLibrary:r,resetLibrary:n,onSelectItems:i,appState:a,className:l})=>{let[s]=ce(xn),[m,c]=ce(Ai),d=()=>{let L=o.length?h("alerts.removeItemsFromsLibrary",{count:o.length}):h("alerts.resetLibrary"),k=o.length?h("confirmDialog.removeItemsFromLib"):h("confirmDialog.resetLibrary");return Pt(ad,{onConfirm:()=>{o.length?r():n(),u(!1)},onCancel:()=>{u(!1)},title:k,children:Pt("p",{children:L})})},[p,u]=wh(!1),f=!!o.length,b=f?s.libraryItems.filter(L=>o.includes(L.id)):s.libraryItems,x=f?h("buttons.remove"):h("buttons.resetLibrary"),[w,E]=wh(!1),[y,v]=wh(null),C=_8(()=>md(Ge,{onCloseRequest:()=>v(null),title:h("publishSuccessDialog.title"),className:"publish-library-success",size:"small",children:[Pt("p",{children:Pt(yt,{i18nKey:"publishSuccessDialog.content",authorName:y.authorName,link:L=>Pt("a",{href:y?.url,target:"_blank",rel:"noopener noreferrer",children:L})})}),Pt(z,{type:"button",title:h("buttons.close"),"aria-label":h("buttons.close"),label:h("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:ns({description:"Excalidraw library files"}),merge:!0,openLibraryMenu:!0})}catch(L){if(L?.name==="AbortError"){console.warn(L);return}e({errorMessage:h("errors.importLibraryError")})}},M=async()=>{let L=f?b:await t.getLatestLibrary();P1(L).catch(D8).catch(k=>{e({errorMessage:k.message})})},R=()=>md(Ie,{open:m,children:[Pt(Ie.Trigger,{onToggle:()=>c(!m),children:rb}),md(Ie.Content,{onClickOutside:()=>c(!1),onSelect:()=>c(!1),className:"library-menu",children:[!f&&Pt(Ie.Item,{onSelect:P,icon:Un,"data-testid":"lib-dropdown--load",children:h("buttons.load")}),!!b.length&&Pt(Ie.Item,{onSelect:M,icon:nn,"data-testid":"lib-dropdown--export",children:h("buttons.export")}),!!b.length&&Pt(Ie.Item,{onSelect:()=>u(!0),icon:Bt,children:x}),f&&Pt(Ie.Item,{icon:r0,onSelect:()=>E(!0),"data-testid":"lib-dropdown--remove",children:h("buttons.publishLibrary")})]})]});return md("div",{className:A8("library-menu-dropdown-container",l),children:[R(),o.length>0&&Pt("div",{className:"library-actions-counter",children:o.length}),p&&d(),w&&Pt(tw,{onClose:()=>E(!1),libraryItems:R8(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&&C()]})},vh=({selectedItems:e,onSelectItems:o,className:t})=>{let{library:r}=Oe(),{clearLibraryCache:n,deleteItemsFromLibraryCache:i}=Qc(),a=xe(),l=me(),[s]=ce(xn),m=async d=>{let p=d.filter(u=>!e.includes(u.id));r.setLibrary(p).catch(()=>{l({errorMessage:h("alerts.errorRemovingFromLibrary")})}),i(e),o([])};return Pt(N8,{appState:a,setAppState:l,selectedItems:e,onSelectItems:o,library:r,onRemoveFromLibrary:()=>m(s.libraryItems),resetLibrary:()=>{r.resetLibrary(),n()},className:t})};import{memo as Y8,useEffect as V8,useState as X8}from"react";import B8,{useCallback as F8}from"react";function O8(){return[!1,F8(o=>o(),[])]}var bw=B8.useTransition||O8;import xw from"clsx";import{memo as z8,useEffect as H8,useRef as G8,useState as U8}from"react";import{jsx as pd,jsxs as W8}from"react/jsx-runtime";var Ew=z8(({id:e,elements:o,isPending:t,onClick:r,selected:n,onToggle:i,onDrag:a,svgCache:l})=>{let s=G8(null),m=Oy(e,o,l);H8(()=>{let f=s.current;if(f)return m&&(f.innerHTML=m.outerHTML),()=>{f.innerHTML=""}},[m]);let[c,d]=U8(!1),p=pe().editor.isMobile,u=t&&pd("div",{className:"library-unit__adder",children:ob});return W8("div",{className:xw("library-unit",{"library-unit__active":o,"library-unit--hover":o&&c,"library-unit--selected":n,"library-unit--skeleton":!m}),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),children:[pd("div",{className:xw("library-unit__dragger",{"library-unit__pulse":!!t}),ref:s,draggable:!!o,onClick:o||t?f=>{e&&f.shiftKey?i(e,f):r(e)}:void 0,onDragStart:f=>{if(!e){f.preventDefault();return}d(!1),a(e,f)}}),u,e&&o&&(c||p||n)&&pd(Wa,{checked:n,onChange:(f,b)=>i(e,b),className:"library-unit__checkbox"})]})}),yw=()=>pd("div",{className:"library-unit library-unit--skeleton"});import{Fragment as K8,jsx as ud}from"react/jsx-runtime";var Th=({children:e})=>ud("div",{className:"library-menu-items-container__grid",children:e}),hd=Y8(({items:e,onItemSelectToggle:o,onItemDrag:t,isItemSelected:r,onClick:n,svgCache:i,itemsRenderedPerBatch:a})=>{let[,l]=bw(),[s,m]=X8(0);return V8(()=>{s<e.length&&l(()=>{m(s+a)})},[s,e.length,l,a]),ud(K8,{children:e.map((c,d)=>d<s?ud(Ew,{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??d):ud(yw,{},d))})});import{Fragment as vw,jsx as At,jsxs as Ri}from"react/jsx-runtime";var e7=17,t7=64;function Ih({isLoading:e,libraryItems:o,onAddToLibrary:t,onInsertLibraryItems:r,pendingElements:n,theme:i,id:a,libraryReturnUrl:l,onSelectItems:s,selectedItems:m}){let c=$8(null),d=$y(c);Z8(()=>{d>0&&c.current?.scrollTo(0,d)},[]);let{svgCache:p}=Qc(),u=ww(()=>o.filter(L=>L.status!=="published"),[o]),f=ww(()=>o.filter(L=>L.status==="published"),[o]),b=!o.length&&!n.length,x=!n.length&&!u.length&&!f.length,[w,E]=j8(null),y=Di((L,k)=>{let N=!m.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([...m,L]);return}let B=J8(m),K=O.reduce((j,X,q)=>((q>=G&&q<=_||B.has(X.id))&&j.push(X.id),j),[]);s(K)}else s([...m,L]);E(L)}else E(null),s(m.filter(G=>G!==L))},[w,s,f,m,u]),v=Di(L=>{let k;return m.includes(L)?k=o.filter(N=>m.includes(N.id)):k=o.filter(N=>N.id===L),k.map(N=>({...N,elements:Q8({type:"everything",elements:N.elements,randomizeSeed:!0}).duplicatedElements}))},[o,m]),C=Di((L,k)=>{k.dataTransfer.setData(q8.excalidrawlib,Xm(v(L)))},[v]),S=Di(L=>L?m.includes(L):!1,[m]),P=Di(()=>{t(n)},[n,t]),M=Di(L=>{L&&r(v(L))},[v,r]),R=p.size>=o.length?t7:e7;return Ri("div",{className:"library-menu-items-container",style:n.length||u.length||f.length?{justifyContent:"flex-start"}:{borderBottom:0},children:[!x&&At(vh,{selectedItems:m,onSelectItems:s,className:"library-menu-dropdown-container--in-heading"}),Ri(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:[Ri(vw,{children:[!x&&At("div",{className:"library-menu-items-container__header",children:h("labels.personalLib")}),e&&At("div",{style:{position:"absolute",top:"var(--container-padding-y)",right:"var(--container-padding-x)",transform:"translateY(50%)"},children:At(it,{})}),!n.length&&!u.length?Ri("div",{className:"library-menu-items__no-items",children:[At("div",{className:"library-menu-items__no-items__label",children:h("library.noItems")}),At("div",{className:"library-menu-items__no-items__hint",children:f.length>0?h("library.hint_emptyPrivateLibrary"):h("library.hint_emptyLibrary")})]}):Ri(Th,{children:[n.length>0&&At(hd,{itemsRenderedPerBatch:R,items:[{id:null,elements:n}],onItemSelectToggle:y,onItemDrag:C,onClick:P,isItemSelected:S,svgCache:p}),At(hd,{itemsRenderedPerBatch:R,items:u,onItemSelectToggle:y,onItemDrag:C,onClick:M,isItemSelected:S,svgCache:p})]})]}),Ri(vw,{children:[(f.length>0||n.length>0||u.length>0)&&At("div",{className:"library-menu-items-container__header library-menu-items-container__header--excal",children:h("labels.excalidrawLib")}),f.length>0?At(Th,{children:At(hd,{itemsRenderedPerBatch:R,items:f,onItemSelectToggle:y,onItemDrag:C,onClick:M,isItemSelected:S,svgCache:p})}):u.length>0?At("div",{style:{margin:"1rem 0",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",fontSize:".9rem"},children:h("library.noItems")}):null]}),b&&At(nd,{style:{padding:"16px 0",width:"100%"},id:a,libraryReturnUrl:l,theme:i,children:At(vh,{selectedItems:m,onSelectItems:s})})]})]})}import{jsx as Ar,jsxs as Cw}from"react/jsx-runtime";var Ai=he(!1),Iw=({children:e})=>Ar("div",{className:"layer-ui__library",children:e}),a7=Mw(({onInsertLibraryItems:e,pendingElements:o,onAddToLibrary:t,setAppState:r,libraryReturnUrl:n,library:i,id:a,theme:l,selectedItems:s,onSelectItems:m})=>{let[c]=ce(xn),d=Sh(f=>{(async(x,w)=>{ae("element","addToLibrary","ui");for(let y of r7)if(x.some(v=>v.type===y))return r({errorMessage:h(`errors.libraryElementTypeError.${y}`)});let E=[{status:"unpublished",elements:x,id:n7(),created:Date.now()},...w];t(),i.setLibrary(E).catch(()=>{r({errorMessage:h("alerts.errorAddingToLibrary")})})})(f,c.libraryItems)},[t,i,r,c.libraryItems]),p=kw(()=>c.libraryItems,[c]);if(c.status==="loading"&&!c.isInitialized)return Ar(Iw,{children:Ar("div",{className:"layer-ui__library-message",children:Cw("div",{children:[Ar(it,{size:"2em"}),Ar("span",{children:h("labels.libraryLoadingMessage")})]})})});let u=c.libraryItems.length>0||o.length>0;return Cw(Iw,{children:[Ar(Ih,{isLoading:c.status==="loading",libraryItems:p,onAddToLibrary:d,onInsertLibraryItems:e,pendingElements:o,id:a,libraryReturnUrl:n,theme:l,onSelectItems:m,selectedItems:s}),u&&Ar(nd,{className:"library-menu-control-buttons--at-bottom",style:{padding:"16px 12px 0 12px"},id:a,libraryReturnUrl:n,theme:l})]})}),Ch=(e,o)=>({elements:e,pending:J(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}),selectedElementIds:o}),l7=(e,o)=>{let t=yr(),[r,n]=Sw(()=>Ch(t,e.selectedElementIds)),i=o7(new Map);return Tw(()=>{for(let a of r.pending)i.current.set(a.id,a.version)},[r.pending]),Tw(()=>{o.state.cursorButton==="up"&&o.state.activeTool.type==="selection"&&n(a=>{if(!i7(a.selectedElementIds,e.selectedElementIds))return i.current.clear(),Ch(t,e.selectedElementIds);let l=o.scene.getNonDeletedElementsMap();for(let s of Object.keys(e.selectedElementIds)){let m=l.get(s)?.version;if(m&&m!==i.current.get(s))return Ch(t,e.selectedElementIds)}return a})},[o,o.state.cursorButton,o.state.activeTool.type,e.selectedElementIds,t]),r.pending},Lw=Mw(()=>{let e=Oe(),{onInsertElements:o}=e,t=Lo(),r=xe(),n=me(),[i,a]=Sw([]),l=kw(()=>e.library,[e.library]),s=l7(r,e),m=Sh(d=>{o(rd(d))},[o]),c=Sh(()=>{n({selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null})},[n]);return Ar(a7,{pendingElements:s,onInsertLibraryItems:m,onAddToLibrary:c,setAppState:n,libraryReturnUrl:t.libraryReturnUrl,library:l,id:e.id,theme:r.theme,selectedItems:i,onSelectItems:a})});import s7 from"clsx";import{useRef as c7}from"react";import{createPortal as d7}from"react-dom";import{KEYS as m7}from"@haoxin-web/excalidraw-common";import{jsx as Pw,jsxs as p7}from"react/jsx-runtime";var Aw=e=>{let{closeOnClickOutside:o=!0}=e,t=Js({className:"excalidraw-modal-container"}),r=c7(document.body.classList.contains("excalidraw-animations-disabled"));if(!t)return null;let n=i=>{i.key===m7.ESCAPE&&(i.nativeEvent.stopImmediatePropagation(),i.stopPropagation(),e.onCloseRequest())};return d7(p7("div",{className:s7("Modal",e.className,{"animations-disabled":r.current}),role:"dialog","aria-modal":"true",onKeyDown:n,"aria-labelledby":e.labelledBy,"data-prevent-outside-click":!0,children:[Pw("div",{className:"Modal__background",onClick:o?e.onCloseRequest:void 0}),Pw("div",{className:"Modal__content",style:{"--max-width":`${e.maxWidth}px`},tabIndex:0,children:e.children})]}),t)};import{jsx as dl,jsxs as x7}from"react/jsx-runtime";function b7(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]=Ny(),[r]=g7(document.activeElement),{id:n}=Xe(),i=pe().viewport.isMobile;h7(()=>{if(!o)return;let m=_w(o);setTimeout(()=>{m.length>0&&e.autofocus!==!1&&(m[1]||m[0]).focus()});let c=d=>{if(d.key===f7.TAB){let p=_w(o),{activeElement:u}=document,f=p.findIndex(b=>b===u);f===0&&d.shiftKey?(p[p.length-1].focus(),d.preventDefault()):f===p.length-1&&!d.shiftKey&&(p[0].focus(),d.preventDefault())}};return o.addEventListener("keydown",c),()=>o.removeEventListener("keydown",c)},[o,e.autofocus]);let a=me(),l=pr(Ai),s=()=>{a({openMenu:null}),l(!1),r.focus(),e.onCloseRequest()};return dl(Aw,{className:u7("Dialog",e.className,{"Dialog--fullscreen":i}),labelledBy:"dialog-title",maxWidth:b7(e.size),onCloseRequest:s,closeOnClickOutside:e.closeOnClickOutside,children:x7(De,{ref:t,children:[e.title&&dl("h2",{id:`${n}-dialog-title`,className:"Dialog__title",children:dl("span",{className:"Dialog__titleContent",children:e.title})}),i&&dl("button",{className:"Dialog__close",onClick:s,title:h("buttons.close"),"aria-label":h("buttons.close"),type:"button",children:Vt}),dl("div",{className:"Dialog__content",children:e.children})]})})};import kh from"clsx";import{forwardRef as v7,useRef as T7,useImperativeHandle as I7,useLayoutEffect as C7,useState as S7}from"react";import E7 from"clsx";import{composeEventHandlers as y7}from"@haoxin-web/excalidraw-common";import{jsx as w7}from"react/jsx-runtime";var Gt=({type:e="button",onSelect:o,selected:t,children:r,className:n="",...i})=>w7("button",{onClick:y7(i.onClick,a=>{o()}),type:e,className:E7("excalidraw-button",n,{selected:t}),...i,children:r});import{jsx as Mh,jsxs as Dw}from"react/jsx-runtime";var Ni=v7(({onChange:e,label:o,fullWidth:t,placeholder:r,readonly:n,selectOnRender:i,onKeyDown:a,isRedacted:l=!1,icon:s,className:m,...c},d)=>{let p=T7(null);I7(d,()=>p.current),C7(()=>{i&&(p.current?.focus(),p.current?.select())},[i]);let[u,f]=S7(!1);return Dw("div",{className:kh("ExcTextField",m,{"ExcTextField--fullWidth":t,"ExcTextField--hasIcon":!!s}),onClick:()=>{p.current?.focus()},children:[s,o&&Mh("div",{className:"ExcTextField__label",children:o}),Dw("div",{className:kh("ExcTextField__input",{"ExcTextField__input--readonly":n}),children:[Mh("input",{className:kh({"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&&Mh(Gt,{onSelect:()=>f(!u),style:{border:0,userSelect:"none"},children:u?f0:Kn})]})]})});import{KEYS as Ce}from"@haoxin-web/excalidraw-common";var Rw=[{icon:ba,value:"selection",key:Ce.V,numericKey:Ce[1],fillable:!0},{icon:ko,value:"rectangle",key:Ce.R,numericKey:Ce[2],fillable:!0},{icon:ur,value:"diamond",key:Ce.D,numericKey:Ce[3],fillable:!0},{icon:hr,value:"ellipse",key:Ce.O,numericKey:Ce[4],fillable:!0},{icon:gr,value:"triangle",key:null,numericKey:Ce[5],fillable:!0},{icon:fr,value:"pentagon",key:null,numericKey:Ce[6],fillable:!0},{icon:rn,value:"arrow",key:Ce.A,numericKey:Ce[7],fillable:!0},{icon:co,value:"line",key:Ce.L,numericKey:Ce[8],fillable:!0},{icon:Nt,value:"freedraw",key:[Ce.P,Ce.X],numericKey:Ce[9],fillable:!1},{icon:Wo,value:"text",key:Ce.T,numericKey:null,fillable:!1},{icon:db,value:"image",key:null,numericKey:null,fillable:!1},{icon:xa,value:"eraser",key:Ce.E,numericKey:null,fillable:!1},{icon:Yo,value:"laser",key:null,numericKey:null,fillable:!1},{icon:u0,value:"laserTrail",key:null,numericKey:null,fillable:!1}],Lh=e=>[{icon:ba,value:"selection",key:Ce.V,numericKey:null,fillable:!0},{icon:Nt,value:"freedraw",key:[Ce.P,Ce.X],numericKey:null,fillable:!1},{icon:co,value:"line",key:Ce.L,numericKey:null,fillable:!0},{icon:ko,value:"rectangle",key:Ce.R,numericKey:null,fillable:!0},{icon:Wo,value:"text",key:Ce.T,numericKey:null,fillable:!1},{icon:xa,value:"eraser",key:Ce.E,numericKey:null,fillable:!1}],Nw=(e,o)=>Lh(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 Dh from"clsx";import{useState as L7}from"react";import{CLASSES as P7,KEYS as A7,capitalizeString as _h,isTransparent as Fw}from"@haoxin-web/excalidraw-common";import{shouldAllowVerticalAlign as _7,suppportsHorizontalAlign as D7}from"@haoxin-web/excalidraw-element";import{hasBoundTextElement as Ow,isElbowArrow as R7,isImageElement as N7,isLinearElement as B7,isTextElement as F7}from"@haoxin-web/excalidraw-element";import{hasStrokeColor as zw,toolIsArrow as Hw}from"@haoxin-web/excalidraw-element";import{createIsolation as k7}from"jotai-scope";import Ph from"react";import Do from"tunnel-rat";var Ah=Ph.createContext(null),Se=()=>Ph.useContext(Ah),M7=k7(),Bw=()=>Ph.useMemo(()=>({MainMenuTunnel:Do(),WelcomeScreenMenuHintTunnel:Do(),WelcomeScreenToolbarHintTunnel:Do(),WelcomeScreenHelpHintTunnel:Do(),WelcomeScreenCenterTunnel:Do(),FooterCenterTunnel:Do(),DefaultSidebarTriggerTunnel:Do(),DefaultSidebarTabTriggersTunnel:Do(),OverwriteConfirmDialogTunnel:Do(),TTDDialogTriggerTunnel:Do(),tunnelsJotai:M7}),[]);import{Fragment as _r,jsx as dt,jsxs as wt}from"react/jsx-runtime";var Rh=(e,o)=>{let t=o[0]?.type||null;for(let r of o)if(r.type!==t){t=null;break}return zw(e.activeTool.type)&&t!=="image"&&t!=="frame"&&t!=="magicframe"||o.some(r=>zw(r.type))},Nh=(e,o)=>cr(e.activeTool.type)||o.some(t=>cr(t.type)),Gw=({appState:e,elementsMap:o,renderAction:t,app:r})=>{let n=rs(o,e),i=!1;n.length===2&&(Ow(n[0])||Ow(n[1]))&&(i=!0);let a=!!(e.editingTextElement||e.newElement),l=pe(),s=document.documentElement.getAttribute("dir")==="rtl",m=cr(e.activeTool.type)&&!Fw(e.currentItemBackgroundColor)||n.some(f=>cr(f.type)&&!Fw(f.backgroundColor)),c=n.length===1||i,d=!e.selectedLinearElement?.isEditing&&n.length===1&&B7(n[0])&&!R7(n[0]),p=!e.croppingElementId&&n.length===1&&N7(n[0]),u=!i&&Lt(e,r);return wt("div",{className:"selected-shape-actions",children:[dt("div",{children:Rh(e,n)&&t("changeStrokeColor")}),Nh(e,n)&&dt("div",{children:t("changeBackgroundColor")}),m&&t("changeFillStyle"),(Hm(e.activeTool.type)||n.some(f=>Hm(f.type)))&&t("changeStrokeWidth"),(e.activeTool.type==="freedraw"||n.some(f=>f.type==="freedraw"))&&t("changeStrokeShape"),(Gm(e.activeTool.type)||n.some(f=>Gm(f.type)))&&wt(_r,{children:[t("changeStrokeStyle"),t("changeSloppiness")]}),(Um(e.activeTool.type)||n.some(f=>Um(f.type)))&&dt(_r,{children:t("changeRoundness")}),(Hw(e.activeTool.type)||n.some(f=>Hw(f.type)))&&dt(_r,{children:t("changeArrowType")}),(e.activeTool.type==="text"||n.some(F7))&&wt(_r,{children:[t("changeFontFamily"),t("changeFontSize"),(e.activeTool.type==="text"||D7(n,o))&&t("changeTextAlign")]}),_7(n,o)&&t("changeVerticalAlign"),(_n(e.activeTool.type)||n.some(f=>_n(f.type)))&&dt(_r,{children:t("changeArrowhead")}),t("changeOpacity"),wt("fieldset",{children:[dt("legend",{children:h("labels.layers")}),wt("div",{className:"buttonList",children:[t("sendToBack"),t("sendBackward"),t("bringForward"),t("bringToFront")]})]}),u&&!i&&wt("fieldset",{children:[dt("legend",{children:h("labels.align")}),wt("div",{className:"buttonList",children:[s?wt(_r,{children:[t("alignRight"),t("alignHorizontallyCentered"),t("alignLeft")]}):wt(_r,{children:[t("alignLeft"),t("alignHorizontallyCentered"),t("alignRight")]}),n.length>2&&t("distributeHorizontally"),dt("div",{style:{flexBasis:"100%",height:0}}),wt("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&&wt("fieldset",{children:[dt("legend",{children:h("labels.actions")}),wt("div",{className:"buttonList",children:[!l.editor.isMobile&&t("duplicateSelection"),!l.editor.isMobile&&t("deleteSelectedElements"),t("group"),t("ungroup"),c&&t("hyperlink"),p&&t("cropEditor"),d&&t("toggleLinearEditor")]})]})]})},Uw=({activeTool:e,appState:o,app:t,UIOptions:r})=>{let[n,i]=L7(!1),a=e.type==="frame",l=e.type==="laser",s=e.type==="laserTrail",m=e.type==="lasso"&&t.defaultSelectionTool!=="lasso",c=e.type==="embeddable",{TTDDialogTriggerTunnel:d}=Se();return wt(_r,{children:[Lh(t).map(({value:p,icon:u,key:f,numericKey:b,fillable:x},w)=>{if(r.tools?.[p]===!1)return null;let E=h(`toolBar.${p}`),y=f&&_h(typeof f=="string"?f:f[0]),v=y?`${y} ${h("helpDialog.or")} ${b}`:`${b}`;return dt(z,{className:Dh("Shape",{fillable:x}),type:"radio",icon:u,checked:e.type===p,name:"editor-current-shape",title:`${_h(E)} \u2014 ${v}`,keyBindingLabel:b||y,"aria-label":_h(E),"aria-keyshortcuts":v,"data-testid":`toolbar-${p}`,onPointerDown:({pointerType:C})=>{!o.penDetected&&C==="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:C})=>{o.activeTool.type!==p&&ae("toolbar",p,"ui"),p==="image"?t.setActiveTool({type:p}):t.setActiveTool({type:p})}},p)}),dt("div",{className:"App-toolbar__divider"}),wt(Ie,{open:n,children:[dt(Ie.Trigger,{className:Dh("App-toolbar__extra-tools-trigger",{"App-toolbar__extra-tools-trigger--selected":a||c||m||l&&!t.props.isCollaborating}),onToggle:()=>i(!n),title:h("toolBar.extraTools"),children:a?Vn:c?pb:l&&!t.props.isCollaborating?Yo:m?xs:c0}),dt(Ie.Content,{onClickOutside:()=>i(!1),onSelect:()=>i(!1),className:"App-toolbar__extra-tools-dropdown",children:dt(Ie.Item,{onSelect:()=>t.setActiveTool({type:"laser"}),icon:Yo,"data-testid":"toolbar-laser",selected:l,shortcut:A7.K.toLocaleUpperCase(),children:h("toolBar.laser")})})]})]})},Ww=({renderAction:e,zoom:o,visible:t=!0})=>t?dt(Ue.Col,{gap:1,className:P7.ZOOM_ACTIONS,children:wt(Ue.Row,{align:"center",children:[e("zoomOut"),e("resetZoom"),e("zoomIn")]})}):null;var Yw=({actionManager:e,showExitZenModeBtn:o})=>dt("button",{type:"button",className:Dh("disable-zen-mode",{"disable-zen-mode--visible":o}),onClick:()=>e.executeAction(wi),children:h("buttons.exitZenMode")});import{useRef as O7}from"react";var Bh=e=>{let o=O7({userFn:e});return o.current.userFn=e,o.current.stableFn||(o.current.stableFn=(...t)=>o.current.userFn(...t)),o.current.stableFn};import{jsx as H7,jsxs as z7}from"react/jsx-runtime";var En=he(null),Vw=()=>{let[e,o]=ce(En),t=Ke();return e&&e==="clearCanvas"?H7(ad,{onConfirm:()=>{t.executeAction(jo),o(null)},onCancel:()=>o(null),title:h("clearCanvasDialog.title"),children:z7("p",{className:"clear-canvas__content",children:[" ",h("alerts.clearReset")]})}):null};var Fh={};I1(Fh,{toggleTheme:()=>G7});var G7={...dn,category:"App",label:"Toggle theme",perform:({actionManager:e})=>{e.executeAction(dn,"commandPalette")}};import{jsx as mt,jsxs as Ro}from"react/jsx-runtime";var K7=he(null),Pe={app:"App",export:"Export",tools:"Tools",editor:"Editor",elements:"Elements",links:"Links"},Z7=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}},bd=({shortcut:e,className:o,children:t})=>{let r=e.replace("++","+$").split("+");return Ro("div",{className:Zw("shortcut",o),children:[r.map((n,i)=>mt("div",{className:"shortcut-wrapper",children:mt("div",{className:"shortcut-key",children:n==="$"?"+":n})},n)),mt("div",{className:"shortcut-desc",children:t})]})},$w=e=>!e.altKey&&e[Eo.CTRL_OR_CMD]&&(e.shiftKey&&e.key.toLowerCase()===Eo.P||e.key===Eo.SLASH),Lde=Object.assign(e=>{let o=xe(),t=me();return fd(()=>{let r=n=>{$w(n)&&(n.preventDefault(),n.stopPropagation(),t(i=>{let a=i.openDialog?.name==="commandPalette"?null:{name:"commandPalette"};return a&&ae("command_palette","open","shortcut"),{openDialog:a}}))};return window.addEventListener(xd.KEYDOWN,r,{capture:!0}),()=>window.removeEventListener(xd.KEYDOWN,r,{capture:!0})},[t]),o.openDialog?.name!=="commandPalette"?null:mt($7,{...e})},{defaultItems:Fh});function $7({customCommandPaletteItems:e}){let o=Oe(),t=xe(),r=me(),n=Lo(),i=Ke(),[a,l]=ce(K7),[s,m]=gd(null),c=W7(null),d=br({uiAppState:t,customCommandPaletteItems:e,appProps:n});fd(()=>{let{uiAppState:S,customCommandPaletteItems:P,appProps:M}=d,R=O=>{let G="";return O.label&&(typeof O.label=="function"?G=h(O.label(o.scene.getNonDeletedElements(),S,o)):G=h(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,el,Jc,Dy].map(X=>N(X,Pe.elements,(q,se)=>({...q,predicate:se.predicate?se.predicate:(ie,be,ue,ao)=>J(ie,be).length>0}))),G=[i.actions.toggleHandTool,i.actions.setFrameAsActiveTool,i.actions.toggleLassoTool].map(X=>N(X,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(X=>N(X,Pe.editor)),B=[i.actions.saveToActiveFile,i.actions.saveFileToDisk,i.actions.copyAsPng,i.actions.copyAsSvg].map(X=>N(X,Pe.export));k=[...O,..._,{label:R(jo),icon:L(jo),shortcut:He(jo.name),category:Pe.editor,keywords:["delete","destroy"],viewMode:!1,perform:()=>{Ve.set(En,"clearCanvas")}},{label:h("buttons.exportImage"),category:Pe.export,icon:ks,shortcut:He("imageExport"),keywords:["export","image","png","jpeg","svg","clipboard","picture"],perform:()=>{r({openDialog:{name:"imageExport"}})}},...B];let K=[{label:h("toolBar.library"),category:Pe.app,icon:zn,viewMode:!1,perform:()=>{S.openSidebar?r({openSidebar:null}):r({openSidebar:{name:Xw.name,tab:Xw.defaultTab}})}},{label:h("search.title"),category:Pe.app,icon:Ft,viewMode:!0,perform:()=>{i.executeAction(ml)}},{label:h("labels.shapeSwitch"),category:Pe.elements,icon:Sa,perform:()=>{i.executeAction(_y)}},{label:h("labels.changeStroke"),keywords:["color","outline"],category:Pe.elements,icon:Ss,viewMode:!1,predicate:(X,q)=>{let se=J(X,q);return se.length>0&&Rh(q,se)},perform:()=>{r(X=>({openMenu:X.openMenu==="shape"?null:"shape",openPopup:"elementStroke"}))}},{label:h("labels.changeBackground"),keywords:["color","fill"],icon:Ss,category:Pe.elements,viewMode:!1,predicate:(X,q)=>{let se=J(X,q);return se.length>0&&Nh(q,se)},perform:()=>{r(X=>({openMenu:X.openMenu==="shape"?null:"shape",openPopup:"elementBackground"}))}},{label:h("labels.canvasBackground"),keywords:["color"],icon:Ss,category:Pe.editor,viewMode:!1,perform:()=>{r(X=>({openMenu:X.openMenu==="canvas"?null:"canvas",openPopup:"canvasBackground"}))}},...Rw.reduce((X,q)=>{let{value:se,icon:ie,key:be,numericKey:ue}=q;if(M.UIOptions.tools?.[se]===!1)return X;let Io=be&&Y7(typeof be=="string"?be:be[0])||ue,es={label:h(`toolBar.${se}`),category:Pe.tools,shortcut:Io||void 0,icon:ie,keywords:["toolbar"],viewMode:!1,perform:({event:Fm})=>{se==="image"?o.setActiveTool({type:se}):o.setActiveTool({type:se})}};return X.push(es),X},[]),...G,{label:h("toolBar.lock"),category:Pe.tools,icon:S.activeTool.locked?Hn:on,shortcut:Eo.Q.toLocaleUpperCase(),viewMode:!1,perform:()=>{o.toggleLock()}},{label:`${h("labels.textToDiagram")}...`,category:Pe.tools,icon:x0,viewMode:!1,predicate:M.aiEnabled,perform:()=>{r(X=>({...X,openDialog:{name:"ttd",tab:"text-to-diagram"}}))}},{label:`${h("toolBar.mermaidToExcalidraw")}...`,category:Pe.tools,icon:d0,viewMode:!1,predicate:M.aiEnabled,perform:()=>{r(X=>({...X,openDialog:{name:"ttd",tab:"mermaid"}}))}}],j=[...k,...K,...P||[]].map(X=>({...X,icon:X.icon||Sa,order:X.order??Z7(X.category),haystack:`${dh(X.label.toLocaleLowerCase())} ${X.keywords?.join(" ")||""}`}));m(j),l(j.find(X=>X.label===a?.label)??null)}},[d,o,i,m,a?.label,l,r]);let[p,u]=gd(""),[f,b]=gd(null),[x,w]=gd({}),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=Bh(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),C=Bh(S=>{let P=X7(S.target)||$w(S)||S.key===Eo.ESCAPE;if(P&&S.key!==Eo.ARROW_UP&&S.key!==Eo.ARROW_DOWN&&S.key!==Eo.ENTER)return;let M=Object.values(x).flat(),R=a&&!p&&v(a);if(S.key===Eo.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===Eo.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===Eo.ENTER&&f&&setTimeout(()=>{y(f,S)}),!P){if(S.stopPropagation(),/^[a-zA-Z0-9]$/.test(S.key)){c?.current?.focus();return}S.preventDefault()}});return fd(()=>(window.addEventListener(xd.KEYDOWN,C,{capture:!0}),()=>window.removeEventListener(xd.KEYDOWN,C,{capture:!0})),[C]),fd(()=>{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=dh(p.toLocaleLowerCase().replace(/[<>_| -]/g,""));P=U7.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]),Ro(Ge,{onCloseRequest:()=>E(),closeOnClickOutside:!0,title:!1,size:720,autofocus:!0,className:"command-palette-dialog",children:[mt(Ni,{value:p,placeholder:h("commandPalette.search.placeholder"),onChange:S=>{u(S)},selectOnRender:!0,ref:c}),!o.device.viewport.isMobile&&Ro("div",{className:"shortcuts-wrapper",children:[mt(bd,{shortcut:"\u2191\u2193",children:h("commandPalette.shortcuts.select")}),mt(bd,{shortcut:"\u21B5",children:h("commandPalette.shortcuts.confirm")}),mt(bd,{shortcut:V7("Esc"),children:h("commandPalette.shortcuts.close")})]}),Ro("div",{className:"commands",children:[a&&!p&&Ro("div",{className:"command-category",children:[Ro("div",{className:"command-category-title",children:[h("commandPalette.recents"),mt("div",{className:"icon",style:{marginLeft:"6px"},children:E0})]}),mt(Kw,{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)=>Ro("div",{className:"command-category",children:[mt("div",{className:"command-category-title",children:S}),x[S].map(M=>mt(Kw,{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?Ro("div",{className:"no-match",children:[mt("div",{className:"icon",children:Ft})," ",h("commandPalette.search.noMatch")]}):null]})]})}var Kw=({command:e,isSelected:o,disabled:t,onMouseMove:r,onClick:n,showShortcut:i,appState:a})=>{let l=()=>{};return Ro("div",{className:Zw("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?h("commandPalette.itemNotAvailable"):"",children:[Ro("div",{className:"name",children:[e.icon&&mt(Ir,{icon:typeof e.icon=="function"?e.icon(a):e.icon}),mt(Ra,{children:e.label})]}),i&&e.shortcut&&mt(bd,{shortcut:e.shortcut})]})};import{getSizeFromPoints as wbe,randomInteger as V_,getUpdatedTimestamp as X_}from"@haoxin-web/excalidraw-common";import{simplify as N_}from"points-on-curve";import{pointsOnBezierCurves as Rde}from"points-on-curve";import{invariant as Bde}from"@haoxin-web/excalidraw-common";import{curve as Ode,lineSegment as zde,pointFrom as Hde,pointDistance as Gde,pointFromArray as Ude,pointFromVector as Wde,pointRotateRads as Yde,polygon as Vde,polygonFromPoints as Xde,PRECISION as Kde,segmentsIntersectAt as Zde,vector as $de,vectorAdd as jde,vectorFromPoint as qde,vectorScale as Jde}from"@haoxin-web/excalidraw-math";import{getElementAbsoluteCoords as eme}from"@haoxin-web/excalidraw-element";var Oh=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 B_,pointDistance as E2,pointRotateRads as ibe}from"@haoxin-web/excalidraw-math";import{ROUGHNESS as F_,isTransparent as gl,assertNever as O_,COLOR_PALETTE as z_,LINE_POLYGON_POINT_MERGE_DISTANCE as lbe}from"@haoxin-web/excalidraw-common";import{RoughGenerator as H_}from"roughjs/bin/generator";import v1e from"roughjs/bin/rough";import{getStroke as M_}from"perfect-freehand";import{isRightAngleRads as C1e}from"@haoxin-web/excalidraw-math";import{BOUND_TEXT_PADDING as k1e,DEFAULT_REDUCED_GLOBAL_ALPHA as M1e,ELEMENT_READY_TO_ERASE_OPACITY as L1e,FRAME_STYLE as P1e,MIME_TYPES as g2,THEME as A1e,distance as _1e,getFontString as D1e,isRTL as R1e,getVerticalOffset as N1e}from"@haoxin-web/excalidraw-common";import Rge from"roughjs/bin/rough";import{arrayToMap as Bge,invariant as i2,rescalePoints as Fge,sizeOf as Oge}from"@haoxin-web/excalidraw-common";import{degreesToRadians as jh,lineSegment as Hge,pointDistance as Gge,pointFrom as at,pointFromArray as p_,pointRotateRads as Gi}from"@haoxin-web/excalidraw-math";import{pointsOnBezierCurves as Yge}from"points-on-curve";import{pointCenter as Jhe,pointFrom as Qhe,pointRotateRads as ege,pointsEqual as tge,pointDistance as oge,vectorFromPoint as rge,curveLength as nge,curvePointAtLength as ige}from"@haoxin-web/excalidraw-math";import{DRAGGING_THRESHOLD as sge,KEYS as cge,shouldRotateWithDiscreteAngle as dge,getGridPoint as mge,invariant as pge,tupleToCoors as uge,viewportCoordsToSceneCoords as hge}from"@haoxin-web/excalidraw-common";import{deconstructLinearOrFreeDrawElement as fge,isPathALoop as bge}from"@haoxin-web/excalidraw-element";import{KEYS as que,arrayToMap as Jue,isBindingFallthroughEnabled as Que,tupleToCoors as ehe,invariant as the,isDevEnv as ohe,isTestEnv as rhe}from"@haoxin-web/excalidraw-common";import{lineSegment as ihe,pointFrom as ahe,pointRotateRads as lhe,vectorFromPoint as she,pointDistanceSq as che,clamp as dhe,pointDistance as mhe,pointFromVector as phe,vectorScale as uhe,vectorNormalize as hhe,vectorCross as ghe,pointsEqual as fhe,lineSegmentIntersectionPoints as bhe,PRECISION as xhe}from"@haoxin-web/excalidraw-math";import{isTransparent as kpe}from"@haoxin-web/excalidraw-common";import{curveIntersectLineSegment as Lpe,isPointWithinBounds as Ppe,lineSegment as Ape,lineSegmentIntersectionPoints as _pe,pointFrom as Dpe,pointFromVector as Rpe,pointRotateRads as Npe,pointsEqual as Bpe,vectorFromPoint as Fpe,vectorNormalize as Ope,vectorScale as zpe}from"@haoxin-web/excalidraw-math";import{ellipse as Gpe,ellipseSegmentInterceptPoints as Upe}from"@haoxin-web/excalidraw-math/ellipse";import{DEFAULT_ADAPTIVE_RADIUS as j7,DEFAULT_PROPORTIONAL_RADIUS as zh,LINE_CONFIRM_THRESHOLD as q7,ROUNDNESS as Hh}from"@haoxin-web/excalidraw-common";import{curve as ime,curveCatmullRomCubicApproxPoints as ame,curveOffsetPoints as lme,lineSegment as sme,pointDistance as J7,pointFrom as cme,pointFromArray as dme,rectangle as mme}from"@haoxin-web/excalidraw-math";var Ed=(e,o=1)=>{if(e.length>=3){let[t,r]=[e[0],e[e.length-1]];return J7(t,r)<=q7/o}return!1},Bi=(e,o)=>{if(o.roundness?.type===Hh.PROPORTIONAL_RADIUS||o.roundness?.type===Hh.LEGACY)return e*zh;if(o.roundness?.type===Hh.ADAPTIVE_RADIUS){let t=o.roundness?.value??j7,r=t/zh;return e<=r?e*zh:t}return 0};import{ROUNDNESS as xme}from"@haoxin-web/excalidraw-common";import{pointsEqual as wme}from"@haoxin-web/excalidraw-math";var jw=e=>!!e&&e.type==="embeddable",qw=e=>!!e&&e.type==="iframe",Uh=e=>!!e&&(e.type==="iframe"||e.type==="embeddable"),yn=e=>e!=null&&e.type==="text";var yd=e=>e!=null&&(e.type==="frame"||e.type==="magicframe");var Dr=e=>e!=null&&Q7(e.type);var Fi=e=>e!=null&&e.type==="arrow",pl=e=>Fi(e)&&e.elbowed;var Q7=e=>e==="arrow"||e==="line";var Oi=e=>e!==null&&"containerId"in e&&e.containerId!==null&&yn(e);import{ARROW_LABEL_FONT_SIZE_TO_MIN_WIDTH_RATIO as jme,ARROW_LABEL_WIDTH_FRACTION as qme,BOUND_TEXT_PADDING as Jme,DEFAULT_FONT_SIZE as Qme,TEXT_ALIGN as epe,VERTICAL_ALIGN as tpe,getFontString as ope,isProdEnv as rpe,invariant as npe}from"@haoxin-web/excalidraw-common";import{pointFrom as ape,pointRotateRads as lpe}from"@haoxin-web/excalidraw-math";import{BOUND_TEXT_PADDING as kme,DEFAULT_FONT_SIZE as Mme,DEFAULT_FONT_FAMILY as Lme,getFontString as Pme,isTestEnv as Ame,normalizeEOL as _me}from"@haoxin-web/excalidraw-common";var Dme="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".toLocaleUpperCase();import{isDevEnv as Hme,isTestEnv as Gme}from"@haoxin-web/excalidraw-common";import{curvePointDistance as fpe,distanceToLineSegment as bpe,pointRotateRads as xpe}from"@haoxin-web/excalidraw-math";import{ellipse as ype,ellipseDistanceFromPoint as wpe}from"@haoxin-web/excalidraw-math/ellipse";import{invariant as eue,isDevEnv as tue,isTestEnv as oue}from"@haoxin-web/excalidraw-common";import{pointFrom as nue,pointFromVector as iue,pointRotateRads as aue,pointScaleFromOrigin as lue,pointsEqual as sue,triangleIncludesPoint as cue,vectorCross as due,vectorFromPoint as n_,vectorScale as mue}from"@haoxin-web/excalidraw-math";var Zh=[1,0],t2=[0,1],$h=[-1,0],o2=[0,-1],wd=e=>{let[o,t]=e,r=Math.abs(o),n=Math.abs(t);return o>n?Zh:o<=-n?$h:t>r?t2:o2},r2=(e,o)=>wd(n_(e,o)),vd=(e,o)=>Td(r2(e,o)),Kh=(e,o)=>e[0]===o[0]&&e[1]===o[1],Td=e=>Kh(e,Zh)||Kh(e,$h);import{clamp as bue,pointDistance as xue,pointFrom as Eue,pointScaleFromOrigin as yue,pointsEqual as wue,pointTranslate as vue,vector as Tue,vectorCross as Iue,vectorFromPoint as Cue,vectorScale as Sue}from"@haoxin-web/excalidraw-math";import{BinaryHeap as Mue,invariant as Lue,isAnyTrue as Pue,tupleToCoors as Aue,getSizeFromPoints as _ue,isDevEnv as Due,arrayToMap as Rue}from"@haoxin-web/excalidraw-common";import{SHIFT_LOCKING_ANGLE as Dhe,viewportCoordsToSceneCoords as Rhe}from"@haoxin-web/excalidraw-common";import{normalizeRadians as Bhe,radiansBetweenAngles as Fhe,radiansDifference as Ohe}from"@haoxin-web/excalidraw-math";import{pointsEqual as Hhe}from"@haoxin-web/excalidraw-math";var Gh=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]},l2=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]},s2=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,m=o+s*Math.cos(l),c=t+s*Math.sin(l);i.push(m,c)}return i};var u_=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}},h_=e=>{switch(e){case"bar":return 90;case"arrow":return 20;default:return 25}},qh=(e,o,t,r)=>{if(o.length<1)return null;let n=Oh(o[0]);if(n.length<1)return null;let i=t==="start"?1:n.length-1,a=n[i].data;i2(a.length===6,"Op data length is not 6");let l=at(a[4],a[5]),s=at(a[2],a[3]),m=at(a[0],a[1]),c=n[i-1],d=at(0,0);if(c.op==="move"){let _=p_(c.data);i2(_!=null,"Op data is not a point"),d=_}else c.op==="bcurveTo"&&(d=at(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-_)*m[B]+d[B]*Math.pow(_,3),[u,f]=t==="start"?d: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=u_(r),C=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];C=Math.hypot(_-K,B-j)}let P=Math.min(v,C*(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=h_(r);if(r==="crowfoot_many"||r==="crowfoot_one_or_many"){let[_,B]=Gi(at(u,f),at(M,R),jh(-L)),[K,j]=Gi(at(u,f),at(M,R),jh(L));return[M,R,_,B,K,j]}let[k,N]=Gi(at(M,R),at(u,f),-L*Math.PI/180),[O,G]=Gi(at(M,R),at(u,f),jh(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]=Gi(at(u+P*2,f),at(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]=Gi(at(u-P*2,f),at(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 nfe,pointCenter as ife,pointRotateRads as afe,vectorFromPoint as lfe,vectorNormalize as sfe,vectorSubtract as cfe,vectorAdd as dfe,vectorScale as mfe,pointFromVector as pfe,clamp as ufe,isCloseTo as hfe}from"@haoxin-web/excalidraw-math";import{arrayToMap as e1e}from"@haoxin-web/excalidraw-common";import{isPointWithinBounds as o1e,pointFrom as r1e}from"@haoxin-web/excalidraw-math";import{vectorCross as Efe,vectorFromPoint as yfe}from"@haoxin-web/excalidraw-math";import{arrayToMap as g_}from"@haoxin-web/excalidraw-common";import{getElementBounds as f_}from"@haoxin-web/excalidraw-element";import{isArrowElement as b_,isExcalidrawElement as x_,isFreeDrawElement as E_,isLinearElement as y_,isTextElement as w_}from"@haoxin-web/excalidraw-element";import{rangeIncludesValue as Id,pointFrom as er,pointRotateRads as v_,rangeInclusive as Cd}from"@haoxin-web/excalidraw-math";var T_=e=>e.type==="diamond"?[er(e.width/2,0),er(e.width,e.height/2),er(e.width/2,e.height),er(0,e.height/2)]:[er(0,0),er(0+e.width,0),er(0+e.width,e.height),er(0,e.height)],I_=e=>y_(e)||E_(e)?e.points:T_(e),c2=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},d2=e=>{let o=I_(e),{cx:t,cy:r}=c2(o),n=er(t,r),i=o.map(c=>v_(c,n,e.angle)),{minX:a,minY:l,maxX:s,maxY:m}=c2(i);return[a+e.x,l+e.y,s+e.x,m+e.y]},Jh=(e,o,t=!1)=>{let r=d2(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},m2=(e,o)=>{let t=d2(e);return(Id(t[0],Cd(o[0],o[2]))||Id(o[0],Cd(t[0],t[2])))&&(Id(t[1],Cd(o[1],o[3]))||Id(o[1],Cd(t[1],t[3])))},p2=({elements:e,bounds:o,type:t,errorMargin:r=0})=>{x_(o)&&(o=f_(o,g_(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"?m2(a,n):t==="inside"?Jh(a,n):Jh(a,n,!0)){if(i.add(a.id),a.boundElements)for(let s of a.boundElements)i.add(s.id);w_(a)&&a.containerId&&i.add(a.containerId),b_(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 Bfe,isShallowEqual as S_}from"@haoxin-web/excalidraw-common";var C_=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 m={};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];m[f]=!0}}let c={},d=a.reduce((p,u)=>{if(u.isDeleted)return p;let f=u.groupIds.find(b=>m[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&&m[p]&&(m[p]=!1);return o=a,e=i,t={editingGroupId:l.editingGroupId,selectedGroupIds:m,selectedElementIds:Qh({...l.selectedElementIds,...d},s)},t},n=(i,a,l,s)=>{let m=s?s.scene.getSelectedElements({selectedElementIds:i.selectedElementIds,elements:a}):eg(a,i);return m.length?r(m,a,i,l):{selectedGroupIds:{},editingGroupId:null,selectedElementIds:Qh(i.selectedElementIds,l)}};return n.clearCache=()=>{o=null,e=null,t=null},n}();var Wfe=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}(),eg=(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&&Oi(i)&&o.selectedElementIds[i?.containerId]){n.push(i),r.add(i.id);continue}}if(t?.includeElementsInFrames){let i=[];return n.forEach(a=>{yd(a)&&u2(e,a.id).forEach(l=>!r.has(l.id)&&i.push(l)),i.push(a)}),i}return n};var Qh=(e,o)=>S_(o.selectedElementIds,e)?o.selectedElementIds:e;var u2=(e,o)=>{let t=[];for(let r of e.values())r.frameId===o&&t.push(r);return t};var L_=typeof document<"u"?document.createElement("img"):{src:""};L_.src=`data:${g2.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 P_=typeof document<"u"?document.createElement("img"):{src:""};P_.src=`data:${g2.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 f2=new WeakMap;var A_=new WeakMap([]);function b2(e){let o=__(e),t=new Path2D(o);return A_.set(e,t),t}function __(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 R_(M_(o,t))}function h2(e,o){return[(e[0]+o[0])/2,(e[1]+o[1])/2]}var D_=/(\s?[A-Z]?,?-?[0-9]*\.[0-9]{0,2})(([0-9]|e|-)*)/g;function R_(e){if(!e.length)return"";let o=e.length-1;return e.reduce((t,r,n,i)=>(n===o?t.push(r,h2(r,i[0]),"L",i[0],"Z"):t.push(r,h2(r,i[n+1])),t),["M",e[0],"Q"]).join(" ").replace(D_,"$1")}var x2=e=>e==="rectangle"||e==="iframe"||e==="embeddable"||e==="line"||e==="diamond"||e==="triangle"||e==="pentagon"||e==="image";var ut=class ut{};I(ut,"rg",new H_),I(ut,"cache",new WeakMap),I(ut,"get",o=>ut.cache.get(o)),I(ut,"set",(o,t)=>ut.cache.set(o,t)),I(ut,"delete",o=>ut.cache.delete(o)),I(ut,"destroy",()=>{ut.cache=new WeakMap}),I(ut,"generateElementShape",(o,t)=>{let r=t?.isExporting?void 0:ut.get(o);if(r!==void 0)return r;f2.delete(o);let n=W_(o,ut.rg,t||{isExporting:!1,canvasBackgroundColor:z_.white,embedsValidationStatus:null});return ut.cache.set(o,n),n});var Hi=ut,G_=e=>[8,8+e],w2=e=>[1.5,6+e];function U_(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&&x2(e.type)||Dr(e)&&t>=50?o:Math.min(o/(t<10?3:2),2.5)}var pt=(e,o=!1)=>{let t={seed:e.seed,strokeLineDash:e.strokeStyle==="dashed"?G_(e.strokeWidth):e.strokeStyle==="dotted"?w2(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:U_(e),stroke:e.strokeColor,preserveVertices:o||e.roughness<F_.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=gl(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 Ed(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}`)}},tg=(e,o,t)=>Uh(e)&&(o||jw(e)&&t?.get(e.id)!==!0)&&gl(e.backgroundColor)&&gl(e.strokeColor)?{...e,roughness:0,backgroundColor:"#d3d3d3",fillStyle:"solid"}:qw(e)?{...e,strokeColor:gl(e.strokeColor)?"#000000":e.strokeColor,backgroundColor:gl(e.backgroundColor)?"#f4f4f6":e.backgroundColor}:e,y2=(e,o,t,r,n,i,a)=>{let l=qh(e,o,t,r);if(l===null)return[];let s=(m,c)=>{if(m===null)return[];let[,,d,p,u,f]=m;return[n.line(d,p,u,f,c)]};switch(r){case"dot":case"circle":case"circle_outline":{let[m,c,d]=l;return delete i.strokeLineDash,[n.circle(m,c,d,{...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[m,c,d,p,u,f]=l;return delete i.strokeLineDash,[n.polygon([[m,c],[d,p],[u,f],[m,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[m,c,d,p,u,f,b,x]=l;return delete i.strokeLineDash,[n.polygon([[m,c],[d,p],[u,f],[b,x],[m,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[m,c,d,p,u,f]=l;if(e.strokeStyle==="dotted"){let b=w2(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(d,p,m,c,i),n.line(u,f,m,c,i),...r==="crowfoot_one_or_many"?s(qh(e,o,t,"crowfoot_one"),i):[]]}}};var W_=(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=Bi(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`,pt(tg(e,t,n),!0))}else if(e.type==="callout"){let a=e.width,l=e.height,s=a*.34,m=a*.22,c=a*.12,d=l+l*.18,p=pt(tg(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} ${d} L ${m} ${l} L 0 ${l} L 0 0 Z`;i=o.path(u,p)}else i=o.rectangle(0,0,e.width,e.height,pt(tg(e,t,n),!1));return i}case"diamond":{let i,[a,l,s,m,c,d,p,u]=Gh(e);if(e.roundness){let f=Bi(Math.abs(a-p),e),b=Bi(Math.abs(m-l),e);i=o.path(`M ${a+f} ${l+b} L ${s-f} ${m-b}