@myoc/excalidraw 0.19.5 → 0.19.501
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev/{chunk-O64KOXGX.js → chunk-45NC7SKS.js} +2 -2
- package/dist/dev/{chunk-LMSQM7RP.js → chunk-M3QOUBGT.js} +3 -3
- package/dist/dev/data/{image-Z4UWWRMA.js → image-SLFRXHXO.js} +3 -3
- package/dist/dev/index.js +3 -3
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/{chunk-DWIVCTY2.js → chunk-EPVOD37P.js} +2 -2
- package/dist/prod/{chunk-COCFTLLX.js → chunk-HMWQJTVU.js} +1 -1
- package/dist/prod/data/image-7G5BLOPB.js +1 -0
- package/dist/prod/index.js +2 -2
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/package.json +4 -4
- package/dist/prod/data/image-UCRRORR6.js +0 -1
- /package/dist/dev/{chunk-O64KOXGX.js.map → chunk-45NC7SKS.js.map} +0 -0
- /package/dist/dev/{chunk-LMSQM7RP.js.map → chunk-M3QOUBGT.js.map} +0 -0
- /package/dist/dev/data/{image-Z4UWWRMA.js.map → image-SLFRXHXO.js.map} +0 -0
package/dist/prod/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{$ as Cm,A as tS,B as n1,C as r1,D as i1,E as os,F as ns,G as rs,H as is,I as ha,J as a1,K as l1,L as s1,M as as,N as Or,O as c1,P as oS,Q as $n,R as zr,S as ga,U as d1,W as m1,X as p1,Y as ls,Z as u1,_ as Sm,a as Qf,aa as ss,b as Zn,ba as h1,c as xo,ca as km,d as e1,da as jn,e as ve,ea as g1,f as t1,fa as Mm,g as q,ga as f1,h as Dr,ha as b1,i as yo,ia as cs,j as da,ja as Pm,k as ma,ka as E1,l as Rr,la as x1,m as pa,ma as y1,n as Nr,na as fa,o as o1,p as vm,q as cn,r as Br,s as wt,t as ao,u as Fr,v as es,w as Im,x as ua,y as ts,z as Tm}from"./chunk-DWIVCTY2.js";import{a as T}from"./chunk-COCFTLLX.js";import{J as wm}from"./chunk-SXXYW6U7.js";import{c as Jf}from"./chunk-AJI3LATG.js";import{b as jf,c as qf,d as S}from"./chunk-SRAX5OIU.js";import AG,{useEffect as _G}from"react";import{DEFAULT_UI_OPTIONS as qT,isShallowEqual as DG}from"@excalidraw/common";import _5 from"clsx";import sz from"lodash.throttle";import Ho,{useContext as Xn}from"react";import{flushSync as oo}from"react-dom";import cz from"roughjs/bin/rough";import{nanoid as dz}from"nanoid";import{clamp as D5,pointFrom as oe,pointDistance as Cr,vector as R5,pointRotateRads as nf,vectorScale as mz,vectorFromPoint as rf,vectorSubtract as N5,vectorDot as B5,vectorNormalize as F5}from"@excalidraw/math";import{COLOR_PALETTE as pz,CODES as O5,shouldResizeFromCenter as z5,shouldMaintainAspectRatio as Ol,shouldRotateWithDiscreteAngle as H5,isArrowKey as im,KEYS as X,APP_NAME as uz,CURSOR_TYPE as Ne,DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT as hz,DEFAULT_VERTICAL_ALIGN as G5,DRAGGING_THRESHOLD as gz,ELEMENT_SHIFT_TRANSLATE_AMOUNT as fz,ELEMENT_TRANSLATE_AMOUNT as U5,EVENT as re,FRAME_STYLE as No,IMAGE_MIME_TYPES as bz,IMAGE_RENDER_TIMEOUT as Ez,LINE_CONFIRM_THRESHOLD as af,MAX_ALLOWED_FILE_BYTES as W5,MIME_TYPES as Bo,MQ_RIGHT_SIDEBAR_MIN_WIDTH as xz,POINTER_BUTTON as kr,ROUNDNESS as am,SCROLL_TIMEOUT as yz,TAP_TWICE_TIMEOUT as wz,TEXT_TO_CENTER_SNAP_THRESHOLD as vz,THEME as lm,TOUCH_CTX_MENU_TIMEOUT as Iz,VERTICAL_ALIGN as Tz,YOUTUBE_STATES as sm,ZOOM_STEP as Sz,POINTER_EVENTS as na,TOOL_TYPE as Fo,supportsResizeObserver as Cz,DEFAULT_COLLISION_THRESHOLD as Y5,DEFAULT_TEXT_ALIGN as kz,ARROW_TYPE as Un,DEFAULT_REDUCED_GLOBAL_ALPHA as Mz,isLocalLink as Pz,normalizeLink as lf,toValidURL as Lz,getGridPoint as pt,getLineHeight as V5,debounce as X5,distance as ra,getFontString as sf,getNearestScrollableContainer as Az,isInputLike as K5,isToolIcon as _z,isWritableElement as zl,sceneCoordsToViewportCoords as cm,tupleToCoors as cf,viewportCoordsToSceneCoords as Be,wrapEvent as Dz,updateObject as df,updateActiveTool as Oo,isTransparent as Rz,easeToValuesRAF as Nz,muteFSAbortError as Bz,isTestEnv as LT,isDevEnv as AT,easeOut as Fz,updateStable as Hl,addEventListener as Fe,normalizeEOL as Oz,getDateTime as Z5,isShallowEqual as $5,arrayToMap as dm,applyDarkModeFilter as zz,randomInteger as Hz,CLASSES as mf,Emitter as Mr,MINIMUM_ARROW_SIZE as Gz,DOUBLE_TAP_POSITION_THRESHOLD as Uz,BIND_MODE_TIMEOUT as Wz,invariant as zo,getFeatureFlag as an,createUserAgentDescriptor as _T,getFormFactor as Yz,deriveStylesPanelMode as fm,isIOS as Vz,isBrave as Xz,isSafari as Kz,loadDesktopUIModePreference as Zz,setDesktopUIMode as $z,isSelectionLikeTool as mm}from"@excalidraw/common";import{getObservedAppState as jz,getCommonBounds as ia,getElementAbsoluteCoords as j5,bindOrUnbindBindingElements as q5,fixBindingsAfterDeletion as qz,getHoveredElementForBinding as bo,isBindingEnabled as Gl,shouldEnableBindingForPointerEvent as Jz,updateBoundElements as pm,LinearElementEditor as pe,newElementWith as Wn,newFrameElement as Qz,newFreeDrawElement as eH,newEmbeddableElement as J5,newMagicFrameElement as Q5,newIframeElement as tH,newArrowElement as oH,newElement as nH,newImageElement as rH,newLinearElement as iH,newTextElement as eT,refreshTextDimensions as aH,deepCopyElement as tT,duplicateElements as pf,hasBoundTextElement as oT,isArrowElement as aa,isBindingElement as Yn,isBindingElementType as lH,isBoundToContainer as uf,isFrameLikeElement as Lt,isImageElement as Pr,isEmbeddableElement as ln,isInitializedImageElement as Ul,isLinearElement as Et,isLinearElementType as sH,isUsingAdaptiveRadius as cH,isIframeElement as la,isIframeLikeElement as Wl,isMagicFrameElement as nT,isTextBindableContainer as rT,isElbowArrow as At,isFlowchartNodeElement as dH,isBindableElement as hf,isTextElement as Eo,getNormalizedDimensions as mH,isElementCompletelyInViewport as gf,isElementInViewport as iT,isInvisiblySmallElement as aT,getCornerRadius as pH,isPathALoop as lT,createSrcDoc as sT,embeddableURLValidator as ff,maybeParseEmbedSrc as uH,getEmbedLink as um,getInitializedImageElements as hH,normalizeSVG as cT,updateImageCache as gH,getBoundTextElement as bf,getContainerCenter as Ef,getContainerElement as dT,isValidTextContainer as fH,redrawTextBoundingBox as bH,hasBoundingBox as EH,getFrameChildren as xf,isCursorInFrame as mT,addElementsToFrame as yf,replaceAllElementsInFrame as xH,removeElementsFromFrame as yH,getElementsInResizingFrame as wf,getElementsInNewFrame as wH,getContainingFrame as vf,elementOverlapsWithFrame as vH,updateFrameMembershipOfSelectedElements as pT,isElementInFrame as uT,getFrameLikeTitle as IH,getElementsOverlappingFrame as TH,filterElementsEligibleAsFrameChildren as SH,hitElementBoundText as CH,hitElementBoundingBoxOnly as kH,hitElementItself as Yl,getVisibleSceneBounds as MH,FlowChartCreator as PH,FlowChartNavigator as LH,getLinkDirectionFromKey as hT,cropElement as AH,wrapText as _H,isElementLink as If,parseElementLinkFromURL as DH,isMeasureTextSupported as RH,normalizeText as NH,measureText as gT,getLineHeightInPx as BH,getApproxMinLineWidth as FH,getApproxMinLineHeight as OH,getMinTextElementWidth as zH,ShapeCache as Vl,getRenderOpacity as HH,editGroupForSelectedElement as GH,getElementsInGroup as Lr,getSelectedGroupIdForElement as UH,getSelectedGroupIds as WH,isElementInGroup as fT,isSelectedViaGroup as YH,selectGroupsForSelectedElements as no,syncInvalidIndices as DT,syncMovedIndices as bT,excludeElementsInFramesFromSelection as VH,getSelectionStateForElements as XH,makeNextSelectedElementIds as ye,getResizeOffsetXY as KH,getResizeArrowDirection as ZH,transformElements as $H,getCursorForResizingElement as ET,getElementWithTransformHandleType as xT,getTransformHandleTypeFromCoords as yT,dragNewElement as wT,dragSelectedElements as jH,getDragOffsetXY as qH,isNonDeletedElement as vT,Scene as IT,Store as JH,CaptureUpdateAction as xt,hitElementBoundingBox as QH,isLineElement as Tf,isSimpleArrow as Sf,StoreDelta as TT,positionElementsOnGrid as ST,calculateFixedPointForNonElbowArrowBinding as CT,bindOrUnbindBindingElement as eG,mutateElement as hm,getElementBounds as kT,doBoundsIntersect as tG,isPointInElement as oG,maxBindingDistance_simple as Cf,convertToExcalidrawElements as nG}from"@excalidraw/element";import{KEYS as op,MOBILE_ACTION_BUTTON_BG as bS,updateActiveTool as ES}from"@excalidraw/common";import{getNonDeletedElements as np}from"@excalidraw/element";import{fixBindingsAfterDeletion as xS}from"@excalidraw/element";import{LinearElementEditor as hb}from"@excalidraw/element";import{newElementWith as Rs}from"@excalidraw/element";import{getContainerElement as gb}from"@excalidraw/element";import{isBoundToContainer as _s,isElbowArrow as yS,isFrameLikeElement as wS}from"@excalidraw/element";import{getFrameChildren as vS}from"@excalidraw/element";import{getElementsInGroup as rp,selectGroupsForSelectedElements as IS}from"@excalidraw/element";import{CaptureUpdateAction as Ds}from"@excalidraw/element";import{isDevEnv as aS}from"@excalidraw/common";import{atom as Se,createStore as nS}from"jotai";import{createIsolation as rS}from"jotai-scope";var w1=rS();var{useAtom:ue,useSetAtom:Hr,useAtomValue:ds,useStore:zG}=w1,v1=w1.Provider,$e=nS();var iS=jf({"./locales/ar-SA.json":()=>import("./locales/ar-SA-EYKRCXR6.js"),"./locales/az-AZ.json":()=>import("./locales/az-AZ-ZNDJBVCS.js"),"./locales/bg-BG.json":()=>import("./locales/bg-BG-O5I6U3AR.js"),"./locales/bn-BD.json":()=>import("./locales/bn-BD-CXZY522G.js"),"./locales/bn-IN.json":()=>import("./locales/bn-IN-HPUBVY4I.js"),"./locales/ca-ES.json":()=>import("./locales/ca-ES-AREX5NEO.js"),"./locales/cs-CZ.json":()=>import("./locales/cs-CZ-HXAZMFYH.js"),"./locales/da-DK.json":()=>import("./locales/da-DK-5X7ZLFU3.js"),"./locales/de-CH.json":()=>import("./locales/de-CH-76ZNVSOF.js"),"./locales/de-DE.json":()=>import("./locales/de-DE-G3JVZ4MQ.js"),"./locales/el-GR.json":()=>import("./locales/el-GR-4AZTZGY6.js"),"./locales/en.json":()=>import("./locales/en-IT7EQLWB.js"),"./locales/es-ES.json":()=>import("./locales/es-ES-ART7BI3G.js"),"./locales/eu-ES.json":()=>import("./locales/eu-ES-BIF4XBMT.js"),"./locales/fa-IR.json":()=>import("./locales/fa-IR-D4HHKAAI.js"),"./locales/fi-FI.json":()=>import("./locales/fi-FI-O35ZY7UI.js"),"./locales/fr-FR.json":()=>import("./locales/fr-FR-XEFNCM4I.js"),"./locales/gl-ES.json":()=>import("./locales/gl-ES-U4NYM3X5.js"),"./locales/he-IL.json":()=>import("./locales/he-IL-656ABAVQ.js"),"./locales/hi-IN.json":()=>import("./locales/hi-IN-Z55GAFFR.js"),"./locales/hu-HU.json":()=>import("./locales/hu-HU-UJ62DVIW.js"),"./locales/id-ID.json":()=>import("./locales/id-ID-FLZFU3OO.js"),"./locales/it-IT.json":()=>import("./locales/it-IT-GIGIGIBJ.js"),"./locales/ja-JP.json":()=>import("./locales/ja-JP-43VXGDWI.js"),"./locales/kaa.json":()=>import("./locales/kaa-L3IMSDYL.js"),"./locales/kab-KAB.json":()=>import("./locales/kab-KAB-XKPWJLNL.js"),"./locales/kk-KZ.json":()=>import("./locales/kk-KZ-SXPDDY2H.js"),"./locales/km-KH.json":()=>import("./locales/km-KH-DOS4CPGC.js"),"./locales/ko-KR.json":()=>import("./locales/ko-KR-BGC6VCY4.js"),"./locales/ku-TR.json":()=>import("./locales/ku-TR-J7IUITIA.js"),"./locales/lt-LT.json":()=>import("./locales/lt-LT-AC3LV5KG.js"),"./locales/lv-LV.json":()=>import("./locales/lv-LV-I6AY7QG2.js"),"./locales/mr-IN.json":()=>import("./locales/mr-IN-5SP4HV5B.js"),"./locales/my-MM.json":()=>import("./locales/my-MM-S7ECRBYZ.js"),"./locales/nb-NO.json":()=>import("./locales/nb-NO-6PNHTF4R.js"),"./locales/nl-NL.json":()=>import("./locales/nl-NL-R4C4SUIG.js"),"./locales/nn-NO.json":()=>import("./locales/nn-NO-3TFXTM7Y.js"),"./locales/oc-FR.json":()=>import("./locales/oc-FR-IK6GIE7H.js"),"./locales/pa-IN.json":()=>import("./locales/pa-IN-YAKHYJET.js"),"./locales/percentages.json":()=>import("./locales/percentages-OL6W367U.js"),"./locales/pl-PL.json":()=>import("./locales/pl-PL-BIY22ZWU.js"),"./locales/pt-BR.json":()=>import("./locales/pt-BR-Q23NUPD6.js"),"./locales/pt-PT.json":()=>import("./locales/pt-PT-LOPEJLPJ.js"),"./locales/ro-RO.json":()=>import("./locales/ro-RO-W3D2ZATV.js"),"./locales/ru-RU.json":()=>import("./locales/ru-RU-DCTW7QSH.js"),"./locales/si-LK.json":()=>import("./locales/si-LK-FYRRHO3C.js"),"./locales/sk-SK.json":()=>import("./locales/sk-SK-MC7UOHQO.js"),"./locales/sl-SI.json":()=>import("./locales/sl-SI-L6B6HFY5.js"),"./locales/sv-SE.json":()=>import("./locales/sv-SE-KMY6L2BA.js"),"./locales/ta-IN.json":()=>import("./locales/ta-IN-ZQCYE2JK.js"),"./locales/th-TH.json":()=>import("./locales/th-TH-WS7ECBAV.js"),"./locales/tr-TR.json":()=>import("./locales/tr-TR-S5FI7JRW.js"),"./locales/uk-UA.json":()=>import("./locales/uk-UA-4EZUWUSQ.js"),"./locales/uz-UZ.json":()=>import("./locales/uz-UZ-OKHL6AFA.js"),"./locales/vi-VN.json":()=>import("./locales/vi-VN-K34TWHF7.js"),"./locales/zh-CN.json":()=>import("./locales/zh-CN-JE4UZWNO.js"),"./locales/zh-HK.json":()=>import("./locales/zh-HK-RM35YDXX.js"),"./locales/zh-TW.json":()=>import("./locales/zh-TW-ONGLV6Y5.js")});var lS=85,wo={code:"en",label:"English"},Ur=[wo,...[{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=>Jf[e.code]>=lS).sort((e,o)=>e.label>o.label?1:-1)],ps="__test__";aS()&&Ur.unshift({code:ps,label:"test language"},{code:`${ps}.rtl`,label:"\u202Atest language (rtl)\u202C",rtl:!0});var Gr=wo,ms={},us=async e=>{if(Gr=e,document.documentElement.dir=Gr.rtl?"rtl":"ltr",document.documentElement.lang=Gr.code,e.code.startsWith(ps))ms={};else try{ms=await iS(`./locales/${Gr.code}.json`)}catch(o){console.error(`Failed to load language ${e.code}:`,o.message),ms=wm}$e.set(T1,e.code)},Uo=()=>Gr,I1=(e,o)=>{for(let t=0;t<o.length;++t){let n=o[t];if(e[n]===void 0)return;e=e[n]}if(typeof e=="string")return e},g=(e,o,t)=>{if(Gr.code.startsWith(ps))return`\u202A[[${o?`${e}(${JSON.stringify(o).slice(1,-1)})`:e}]]\u202C`;let n=e.split("."),r=I1(ms,n)||I1(wm,n)||t;if(r===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)r=r.replace(`{{${i}}}`,String(o[i]));return r},T1=Se(wo.code),Ue=()=>{let e=ds(T1);return{t:g,langCode:e}};import sS from"clsx";import it from"react";import{THEME as cS}from"@excalidraw/common";import{Fragment as Ie,jsx as u,jsxs as R}from"react/jsx-runtime";var lo=e=>"var(--icon-fill-color)",S1=e=>e===cS.LIGHT?"#fff":"#1e1e1e",M=(e,o=512)=>{let{width:t=512,height:n=t,mirror:r,style:i,...a}=typeof o=="number"?{width:o}:o;return u("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${t} ${n}`,className:sS({"rtl-mirror":r}),style:i,...a,children:typeof e=="string"?u("path",{fill:"currentColor",d:e}):e})},z={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},ie={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},eU=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("rect",{x:3,y:8,width:18,height:4,rx:1}),u("line",{x1:12,y1:8,x2:12,y2:21}),u("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),u("path",{d:"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5"})]}),z),hs=M(R("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),u("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),u("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),u("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),u("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),z),C1=M(R("svg",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),u("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),z),k1=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("circle",{cx:"12",cy:"12",r:"1"}),u("circle",{cx:"12",cy:"19",r:"1"}),u("circle",{cx:"12",cy:"5",r:"1"})]}),z),M1=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),u("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),u("path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]}),z),P1=M(R("svg",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),u("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),u("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),z),Lm=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M6.5 9.5l3.5 -3"}),u("path",{d:"M14 5.5l3 1.5"}),u("path",{d:"M18.5 10l-2.5 7"}),u("path",{d:"M13.5 17.5l-7 -5"})]}),z),Wo=M(R("g",{children:[u("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z",stroke:"currentColor",strokeWidth:"1.25"}),u("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z",stroke:"currentColor",strokeWidth:"1.25"}),u("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:u("path",{stroke:"none",d:"M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481",fill:"#fff"})}),u("g",{mask:"url(#UnlockedIcon)",children:u("path",{stroke:"none",d:"M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z",fill:"currentColor"})})]}),ie),dn=M(R("g",{strokeWidth:"1.25",children:[u("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z"}),u("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),u("path",{d:"M6.667 8.333V5.417C6.667 3.806 8.159 2.5 10 2.5c1.841 0 3.333 1.306 3.333 2.917v2.916"})]}),ie),L1=M(u("g",{fill:"currentColor",children:u("path",{d:"M12 2a5 5 0 0 1 5 5v3a3 3 0 0 1 3 3v6a3 3 0 0 1 -3 3h-10a3 3 0 0 1 -3 -3v-6a3 3 0 0 1 3 -3v-3a5 5 0 0 1 5 -5m0 12a2 2 0 0 0 -1.995 1.85l-.005 .15a2 2 0 1 0 2 -2m0 -10a3 3 0 0 0 -3 3v3h6v-3a3 3 0 0 0 -3 -3"})}),{width:24,height:24}),A1=M(R(Ie,{children:[u("path",{d:"M38.5 83.5c-14-2-17.833-10.473-21-22.5C14.333 48.984 12 22 12 12.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),u("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),u("path",{d:"M12.005 10.478c1.92 3.495 3.838 7 7.905 14.423m-7.905-14.423c3.11 5.683 6.23 11.368 7.905 14.423m0 0c-3.68.226-7.35.455-13.91.85m13.91-.85c-5.279.33-10.566.647-13.91.85m0 0c1.936-4.931 3.882-9.86 6.005-15.273M6 25.75c2.069-5.257 4.135-10.505 6.005-15.272",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:41,height:94,fill:"none"}),_1=M(R(Ie,{children:[u("path",{d:"M18.026 1.232c-5.268 13.125-5.548 33.555 3.285 42.311 8.823 8.75 33.31 12.304 42.422 13.523",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),u("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),u("path",{d:"M72.181 59.247c-3.163-2.429-6.337-4.856-13.058-10m13.058 10c-5.145-3.936-10.292-7.882-13.058-10m0 0c-.78 3.603-1.563 7.196-2.948 13.62m2.948-13.62c-1.126 5.168-2.24 10.346-2.948 13.62m0 0c5.168-1.166 10.334-2.343 16.006-3.62m-16.006 3.62c5.51-1.248 11.01-2.495 16.006-3.62",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:85,height:71,fill:"none"}),D1=M(R(Ie,{children:[u("path",{d:"M1 77c14-2 31.833-11.973 35-24 3.167-12.016-6-35-9.5-43.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),u("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),u("path",{d:"M24.165 1.093c-.522 3.953-1.037 7.916-2.132 16.309m2.131-16.309c-.835 6.424-1.68 12.854-2.13 16.308m0 0c3.51-1.125 7.013-2.243 13.27-4.257m-13.27 4.257c5.038-1.608 10.08-3.232 13.27-4.257m0 0c-3.595-3.892-7.197-7.777-11.14-12.05m11.14 12.05c-3.837-4.148-7.667-8.287-11.14-12.05",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:38,height:78,fill:"none"}),tU=M(u("g",{fill:"currentColor",children:u("path",{d:"M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z",fill:"currentColor"})}),{width:40,height:40,fill:"none"}),gs=M(R("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 6l4.153 11.793a0.365 .365 0 0 0 .331 .207a0.366 .366 0 0 0 .332 -.207l2.184 -4.793l4.787 -1.994a0.355 .355 0 0 0 .213 -.323a0.355 .355 0 0 0 -.213 -.323l-11.787 -4.36z"}),u("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),mn=M(R("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,children:[u("path",{d:"M4.028 13.252c-.657 -.972 -1.028 -2.078 -1.028 -3.252c0 -3.866 4.03 -7 9 -7s9 3.134 9 7s-4.03 7 -9 7c-1.913 0 -3.686 -.464 -5.144 -1.255"}),u("path",{d:"M5 15m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M5 17c0 1.42 .316 2.805 1 4"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),fs=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),z),bs=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M10.5 20.4l-6.9 -6.9c-.781 -.781 -.781 -2.219 0 -3l6.9 -6.9c.781 -.781 2.219 -.781 3 0l6.9 6.9c.781 .781 .781 2.219 0 3l-6.9 6.9c-.781 .781 -2.219 .781 -3 0z"})]}),z),Es=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("circle",{cx:"12",cy:"12",r:"9"})]}),z),R1=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),u("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),u("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),z),xs=M(u("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),ie),N1=M(R("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),u("path",{d:"M16 7h4"}),u("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),z),pn=M(R("g",{strokeWidth:"1.25",children:[u("path",{clipRule:"evenodd",d:"m7.643 15.69 7.774-7.773a2.357 2.357 0 1 0-3.334-3.334L4.31 12.357a3.333 3.333 0 0 0-.977 2.357v1.953h1.953c.884 0 1.732-.352 2.357-.977Z"}),u("path",{d:"m11.25 5.417 3.333 3.333"})]}),ie),un=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),u("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),u("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),u("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),u("polyline",{points:"5 20 11 4 13 4 20 20"})]}),z),B1=M(R("g",{stroke:"currentColor",strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 7v-2h13v2"}),u("path",{d:"M10 5v14"}),u("path",{d:"M12 19h-4"}),u("path",{d:"M15 13v-1h6v1"}),u("path",{d:"M18 12v7"}),u("path",{d:"M17 19h2"})]}),z),ys=M(R("g",{strokeWidth:"1.25",children:[u("path",{d:"M12.5 6.667h.01"}),u("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z"}),u("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),u("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),ie),F1=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3"}),u("path",{d:"M18 13.3l-6.3 -6.3"})]}),z),Am=M(u("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),ie),_m=M(u("path",{d:"M5 10h10",strokeWidth:"1.25"}),ie),O1=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M21 21l-6 -6"}),u("path",{d:"M3.268 12.043a7.017 7.017 0 0 0 6.634 4.957a7.012 7.012 0 0 0 7.043 -6.131a7 7 0 0 0 -5.314 -7.672a7.021 7.021 0 0 0 -8.241 4.403"}),u("path",{d:"M3 4v4h4"})]}),z),Yo=M(u("path",{strokeWidth:"1.25",d:"M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"}),ie),ws=M(R("g",{strokeWidth:"1.5",children:[u("polyline",{points:"12 16 18 10 12 4"}),u("polyline",{points:"8 4 2 10 8 16"})]}),ie),ba=M(R("g",{strokeWidth:"1.25",children:[u("path",{d:"M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"}),u("path",{clipRule:"evenodd",d:"M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"})]}),ie),Ea=M(u("path",{clipRule:"evenodd",d:"M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z",stroke:"currentColor"}),ie),xa=M(u("g",{stroke:"currentColor",strokeLinejoin:"round",children:u("path",{d:"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667"})}),{...ie,strokeWidth:1.5}),z1=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),u("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),u("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),z),qn=M(u("path",{strokeWidth:"1.25",d:"M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10"}),ie),Wr=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("circle",{cx:"12",cy:"12",r:"9"}),u("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),u("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),z),H1=M(R("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("circle",{cx:"12",cy:"12",r:"9"}),u("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),u("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),z),oU=M(u("path",{strokeWidth:"1.25",d:"M9.167 5.833H5.833c-1.254 0-2.5 1.282-2.5 2.5v5.834c0 1.283 1.252 2.5 2.5 2.5h5.834c1.251 0 2.5-1.25 2.5-2.5v-3.334M8.333 11.667l8.334-8.334M12.5 3.333h4.167V7.5"}),ie),G1=M(u("path",{d:"M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5",strokeWidth:"1.25"}),ie),U1=M(R("g",{strokeWidth:"1.25",children:[u("path",{d:"M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0"}),u("path",{d:"M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084"})]}),ie),W1=M(R("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 4l11.733 16h4.267l-11.733 -16z"}),u("path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"})]}),z),Y1=M(u("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),ya=M(R("g",{strokeWidth:"1.25",children:[u("path",{d:"M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"}),u("path",{d:"M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"})]}),ie),V1=M("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}),X1=M("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}),Yr=M(u("path",{d:"m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z",strokeWidth:"1.25"}),ie),nU=M("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}),rU=M("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"),vs=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z"}),u("path",{d:"M13.737 9.737c2.299 -2.3 3.23 -5.095 2.081 -6.245c-1.15 -1.15 -3.945 -.217 -6.244 2.082c-2.3 2.299 -3.231 5.095 -2.082 6.244c1.15 1.15 3.946 .218 6.245 -2.081z"}),u("path",{d:"M7.492 11.818c.362 .362 .768 .676 1.208 .934l6.895 4.047c1.078 .557 2.255 -.075 3.692 -1.512c1.437 -1.437 2.07 -2.614 1.512 -3.692c-.372 -.718 -1.72 -3.017 -4.047 -6.895a6.015 6.015 0 0 0 -.934 -1.208"})]}),z),K1=M(u("g",{strokeWidth:1.5,children:u("path",{d:"M6 18l12 -12"})}),z),Is=M(R("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M15 8h.01"}),u("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),u("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),u("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),u("path",{d:"M19 16v6"}),u("path",{d:"M22 19l-3 3l-3 -3"})]}),z),Z1=M("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}),iU=M("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}),aU=M("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}),$1=M("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"),lU=M("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"),Dm=M(u("path",{d:"M7.5 10.833 4.167 7.5 7.5 4.167M4.167 7.5h9.166a3.333 3.333 0 0 1 0 6.667H12.5",strokeWidth:"1.25"}),ie),Rm=M(u("path",{d:"M12.5 10.833 15.833 7.5 12.5 4.167M15.833 7.5H6.667a3.333 3.333 0 1 0 0 6.667H7.5",strokeWidth:"1.25"}),ie),j1=M("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}),q1=M(u("path",{d:"M5 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 17.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7.25 8.917l5.5-2.834M7.25 11.083l5.5 2.834",strokeWidth:"1.5"}),ie),sU=M("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"),cU=M("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}),dU=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M8 9h-1a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-8a2 2 0 0 0 -2 -2h-1"}),u("path",{d:"M12 14v-11"}),u("path",{d:"M9 6l3 -3l3 3"})]}),z),mU=M(R(Ie,{children:[u("path",{fill:"currentColor",d:"M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z"}),u("path",{stroke:"currentColor",fill:"currentColor",d:"M0 36v20h48v-6.2c0-6 0-6.1-2-4.3-1.1 1-2 2.9-2 4.2V52H4V34c0-17.3-.1-18-2-18s-2 .7-2 20z"})]}),{width:64,height:64}),pU=M(u("path",{stroke:"currentColor",strokeWidth:"40",fill:"currentColor",d:"M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z"}),{width:1024}),J1=R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 10l0 10"}),u("path",{d:"M12 10l4 4"}),u("path",{d:"M12 10l-4 4"}),u("path",{d:"M4 4l16 0"})]}),Q1=R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 5l0 14"}),u("path",{d:"M16 9l-4 -4"}),u("path",{d:"M8 9l4 -4"})]}),Nm=M(Q1,z),Bm=M(Q1,{...z,style:{transform:"rotate(180deg)"}}),Fm=M(J1,z),Om=M(J1,{...z,style:{transform:"rotate(180deg)"}}),zm=M(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v7.083c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V8.125c0-.92-.746-1.667-1.666-1.667ZM6.875 6.458h-.417c-.92 0-1.666.747-1.666 1.667v3.75c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667v-3.75c0-.92-.747-1.667-1.667-1.667Z"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),Hm=M(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M6.875 3.125h-.417c-.92 0-1.666.746-1.666 1.667v7.083c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667V4.792c0-.92-.747-1.667-1.667-1.667ZM13.542 5.817h-.417c-.92 0-1.667.747-1.667 1.667v4.391c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V7.484c0-.92-.746-1.667-1.666-1.667Z"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),Gm=M(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M15.208 4.792H8.125c-.92 0-1.667.746-1.667 1.666v.417c0 .92.747 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM12.516 11.458H8.125c-.92 0-1.667.746-1.667 1.667v.417c0 .92.747 1.666 1.667 1.666h4.391c.92 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.667-1.667Z"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),Um=M(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M11.875 4.792H4.792c-.92 0-1.667.746-1.667 1.666v.417c0 .92.746 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM11.683 11.458H7.292c-.92 0-1.667.746-1.667 1.667v.417c0 .92.746 1.666 1.667 1.666h4.39c.921 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.666-1.667Z"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),e0=M(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M14.375 10.208v-.416c0-.92-.746-1.667-1.667-1.667H7.292c-.92 0-1.667.746-1.667 1.667v.416c0 .92.746 1.667 1.667 1.667h5.416c.92 0 1.667-.746 1.667-1.667Z"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),t0=M(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M10.208 5.625h-.416c-.92 0-1.667.746-1.667 1.667v5.416c0 .92.746 1.667 1.667 1.667h.416c.92 0 1.667-.746 1.667-1.667V7.292c0-.92-.746-1.667-1.667-1.667Z"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),Wm=M(R("g",{stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),u("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M6.875 4.792h-.417c-.92 0-1.666.746-1.666 1.666v7.084c0 .92.746 1.666 1.666 1.666h.417c.92 0 1.667-.746 1.667-1.666V6.458c0-.92-.747-1.666-1.667-1.666ZM13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v3.75c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667v-3.75c0-.92-.746-1.667-1.666-1.667Z"})]}),ie),Ym=M(R("g",{stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),u("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M4.792 13.125v.417c0 .92.746 1.666 1.666 1.666h7.084c.92 0 1.666-.746 1.666-1.666v-.417c0-.92-.746-1.667-1.666-1.667H6.458c-.92 0-1.666.746-1.666 1.667ZM6.458 6.458v.417c0 .92.747 1.667 1.667 1.667h3.75c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666h-3.75c-.92 0-1.667.746-1.667 1.666Z"})]}),ie),Ts=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("circle",{cx:"9",cy:"7",r:"4"}),u("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),u("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),u("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),z),uU=M("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"),hU=M("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"),Ut=M(R(Ie,{children:[u("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:u("path",{d:"M15 5 5 15M5 5l10 10"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),gU=M("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}),fU=M("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}),bU=M("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}),Vm=it.memo(({theme:e})=>M(R(Ie,{children:[u("path",{d:"M25 26H111V111H25",fill:lo(e)}),u("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:lo(e),strokeWidth:"2"}),u("path",{d:"M100 100H160V160H100",fill:lo(e)}),u("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:lo(e),strokeWidth:"2"}),R("g",{fill:S1(e),stroke:lo(e),strokeWidth:"6",children:[u("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),u("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),u("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),u("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),Xm=it.memo(({theme:e})=>M(R(Ie,{children:[u("path",{d:"M25 26H111V111H25",fill:lo(e)}),u("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:lo(e),strokeWidth:"2"}),u("path",{d:"M100 100H160V160H100",fill:lo(e)}),u("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:lo(e),strokeWidth:"2"}),R("g",{fill:S1(e),stroke:lo(e),strokeWidth:"6",children:[u("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),u("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),u("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),u("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),u("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),u("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),o0=M(u("g",{strokeWidth:1.25,children:u("path",{d:"M5.879 2.625h8.242a3.27 3.27 0 0 1 3.254 3.254v8.242a3.27 3.27 0 0 1-3.254 3.254H5.88a3.27 3.27 0 0 1-3.254-3.254V5.88A3.27 3.27 0 0 1 5.88 2.626l-.001-.001ZM4.518 16.118l7.608-12.83m.198 13.934 5.051-9.897M2.778 9.675l9.348-6.387m-7.608 12.83 12.857-8.793"})}),ie),n0=M(R(Ie,{children:[u("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),u("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:u("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.25"})}),u("g",{mask:"url(#FillHachureIcon)",children:u("path",{d:"M2.258 15.156 15.156 2.258M7.324 20.222 20.222 7.325m-20.444 5.35L12.675-.222m-8.157 18.34L17.416 5.22",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})]}),ie),r0=M(R(Ie,{children:[R("g",{clipPath:"url(#a)",children:[u("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),u("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:u("path",{d:"M2.426 15.044 15.044 2.426M7.383 20 20 7.383M0 12.617 12.617 0m-7.98 17.941L17.256 5.324m-2.211 12.25L2.426 4.956M20 12.617 7.383 0m5.234 20L0 7.383m17.941 7.98L5.324 2.745",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),u("g",{mask:"url(#FillCrossHatchIcon)",children:u("path",{d:"M14.121 2H5.88A3.879 3.879 0 0 0 2 5.879v8.242A3.879 3.879 0 0 0 5.879 18h8.242A3.879 3.879 0 0 0 18 14.121V5.88A3.879 3.879 0 0 0 14.121 2Z",fill:"currentColor"})})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),i0=M(R(Ie,{children:[u("g",{clipPath:"url(#a)",children:u("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z",stroke:"currentColor",strokeWidth:"1.25"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),{...ie,fill:"currentColor"}),Km=M(u(Ie,{children:u("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),ie),a0=M(u("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),ie),l0=M(u("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),ie),EU=it.memo(({theme:e})=>M(u("path",{d:"M6 10H34",stroke:lo(e),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})),s0=M(R("g",{strokeWidth:"2",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 12h2"}),u("path",{d:"M17 12h2"}),u("path",{d:"M11 12h2"})]}),z),c0=M(R("g",{strokeWidth:"2",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 12v.01"}),u("path",{d:"M8 12v.01"}),u("path",{d:"M12 12v.01"}),u("path",{d:"M16 12v.01"}),u("path",{d:"M20 12v.01"})]}),z),d0=M(u("path",{d:"M2.5 12.038c1.655-.885 5.9-3.292 8.568-4.354 2.668-1.063.101 2.821 1.32 3.104 1.218.283 5.112-1.814 5.112-1.814",strokeWidth:"1.25"}),ie),m0=M(u("path",{d:"M2.5 12.563c1.655-.886 5.9-3.293 8.568-4.355 2.668-1.062.101 2.822 1.32 3.105 1.218.283 5.112-1.814 5.112-1.814m-13.469 2.23c2.963-1.586 6.13-5.62 7.468-4.998 1.338.623-1.153 4.11-.132 5.595 1.02 1.487 6.133-1.43 6.133-1.43",strokeWidth:"1.25"}),ie),p0=M(u("path",{d:"M2.5 11.936c1.737-.879 8.627-5.346 10.42-5.268 1.795.078-.418 5.138.345 5.736.763.598 3.53-1.789 4.235-2.147M2.929 9.788c1.164-.519 5.47-3.28 6.987-3.114 1.519.165 1 3.827 2.121 4.109 1.122.281 3.839-2.016 4.606-2.42",strokeWidth:"1.25"}),ie),u0=M(R("svg",{strokeWidth:"1.5",children:[u("path",{d:"M3.33334 9.99998V6.66665C3.33334 6.04326 3.33403 4.9332 3.33539 3.33646C4.95233 3.33436 6.06276 3.33331 6.66668 3.33331H10"}),u("path",{d:"M13.3333 3.33331V3.34331"}),u("path",{d:"M16.6667 3.33331V3.34331"}),u("path",{d:"M16.6667 6.66669V6.67669"}),u("path",{d:"M16.6667 10V10.01"}),u("path",{d:"M3.33334 13.3333V13.3433"}),u("path",{d:"M16.6667 13.3333V13.3433"}),u("path",{d:"M3.33334 16.6667V16.6767"}),u("path",{d:"M6.66666 16.6667V16.6767"}),u("path",{d:"M10 16.6667V16.6767"}),u("path",{d:"M13.3333 16.6667V16.6767"}),u("path",{d:"M16.6667 16.6667V16.6767"})]}),ie),h0=M(R("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),u("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),u("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),u("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),u("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),u("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),u("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),u("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),u("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),u("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),u("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),u("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),z),g0=M(R("g",{stroke:"currentColor",opacity:.3,strokeWidth:2,children:[u("path",{d:"M12 12l9 0"}),u("path",{d:"M3 9l6 6"}),u("path",{d:"M3 15l6 -6"})]}),z),f0=it.memo(({flip:e=!1})=>M(R("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[u("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),u("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})),b0=it.memo(({flip:e=!1})=>M(R("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[u("path",{d:"M32 10L6 10",strokeWidth:2}),u("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),E0=it.memo(({flip:e=!1})=>M(R("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[u("path",{d:"M26 10L6 10"}),u("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),x0=it.memo(({flip:e=!1})=>M(u("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",children:u("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})),y0=it.memo(({flip:e=!1})=>M(R("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[u("path",{d:"M32 10L6 10",strokeWidth:2}),u("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})),w0=it.memo(({flip:e=!1})=>M(R("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",children:[u("path",{d:"M6,9.5H27"}),u("path",{d:"M27,5L34,10L27,14Z",fill:"none"})]}),{width:40,height:20})),v0=it.memo(({flip:e=!1})=>M(R("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[u("path",{d:"M6,9.5H20"}),u("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),I0=it.memo(({flip:e=!1})=>M(R("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[u("path",{d:"M6,9.5H20"}),u("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),T0=it.memo(({flip:e=!1})=>M(u("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:u("path",{d:"M34,10 H6 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),S0=it.memo(({flip:e=!1})=>M(u("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:u("path",{d:"M34,10 H6 M15,10 L15,15 L15,5"})}),{width:40,height:20})),C0=it.memo(({flip:e=!1})=>M(u("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:u("path",{d:"M34,10 H6 M15,10 L15,16 L15,4 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),k0=M(R(Ie,{children:[u("g",{clipPath:"url(#a)",children:u("path",{d:"M14.167 6.667a3.333 3.333 0 0 0-3.334-3.334H9.167a3.333 3.333 0 0 0 0 6.667h1.666a3.333 3.333 0 0 1 0 6.667H9.167a3.333 3.333 0 0 1-3.334-3.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),M0=M(R(Ie,{children:[u("g",{clipPath:"url(#a)",children:u("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),P0=M(R(Ie,{children:[u("g",{clipPath:"url(#a)",children:u("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),L0=M(u(Ie,{children:u("path",{d:"m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),ie),Jn=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 7v-2h13v2"}),u("path",{d:"M10 5v14"}),u("path",{d:"M12 19h-4"}),u("path",{d:"M15 13v-1h6v1"}),u("path",{d:"M18 12v7"}),u("path",{d:"M17 19h2"})]}),z),A0=M(u(Ie,{children:R("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M7 12h10"}),u("path",{d:"M7 5v14"}),u("path",{d:"M17 5v14"}),u("path",{d:"M15 19h4"}),u("path",{d:"M15 5h4"}),u("path",{d:"M5 19h4"}),u("path",{d:"M5 5h4"})]})}),z),wa=M(u(Ie,{children:u("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:u("path",{d:"M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334"})})}),ie),dS=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M7 8l-4 4l4 4"}),u("path",{d:"M17 8l4 4l-4 4"}),u("path",{d:"M14 4l-4 16"})]}),z),Ss=dS,_0=M(R("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),u("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),u("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),z),D0=M(R("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),u("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),u("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),z),R0=M(R("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),u("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),u("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),z),N0=it.memo(({theme:e})=>M(R("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),u("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),z)),B0=it.memo(({theme:e})=>M(R("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),u("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),z)),F0=it.memo(({theme:e})=>M(R("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),u("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),u("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),z)),Cs=M(R("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M21 19h-18l9 -15"}),u("path",{d:"M20.615 15.171h.015"}),u("path",{d:"M19.515 11.771h.015"}),u("path",{d:"M17.715 8.671h.015"}),u("path",{d:"M15.415 5.971h.015"})]}),z),O0=M(u("path",{d:"M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z",fill:"currentColor"}),{width:640,height:512}),xU=M(u("path",{d:"M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z"})),ks=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),u("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),u("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),u("path",{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"})]}),z),Zm=M(R(Ie,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),u("path",{d:"M7 11l5 5l5 -5"}),u("path",{d:"M12 4l0 12"})]}),z),Vr=M(R(Ie,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"}),u("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]}),z),z0=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),u("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),u("path",{d:"M9.15 14.85l8.85 -10.85"}),u("path",{d:"M6 4l8.85 10.85"})]}),z),H0=M(R(Ie,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),u("path",{d:"M12 17l0 .01"}),u("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),z),yU=M(R(Ie,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M7 4v16l13 -8z"})]}),z),wU=M(R(Ie,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z",strokeWidth:"0",fill:"currentColor"})]}),z),G0=M(R(Ie,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 12l5 5l10 -10"})]}),z),U0=M(R(Ie,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z"}),u("path",{d:"M12 9v4"}),u("path",{d:"M12 17h.01"})]}),z),W0=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M11 7l6 6"}),u("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"})]}),z),Xr=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 3l-4 7h8z"}),u("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),u("path",{d:"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"})]}),z),hn=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 7l16 0"}),u("path",{d:"M4 17l16 0"}),u("path",{d:"M7 4l0 16"}),u("path",{d:"M17 4l0 16"})]}),z),vU=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"}),u("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"})]}),z),IU=M(R("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 10l-2 1l8 4l8 -4l-2 -1"}),u("path",{d:"M4 15l8 4l8 -4"}),u("path",{d:"M12 4v7"}),u("path",{d:"M15 8l-3 3l-3 -3"})]}),z),TU=M(R("g",{strokeWidth:"1.25",children:[u("path",{d:"M4.16602 10H15.8327"}),u("path",{d:"M12.5 13.3333L15.8333 10"}),u("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),ie),Kr=M(R("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[u("path",{clipRule:"evenodd",d:"m9.644 13.69 7.774-7.773a2.357 2.357 0 0 0-3.334-3.334l-7.773 7.774L8 12l1.643 1.69Z"}),u("path",{d:"m13.25 3.417 3.333 3.333M10 10l2-2M5 15l3-3M2.156 17.894l1-1M5.453 19.029l-.144-1.407M2.377 11.887l.866 1.118M8.354 17.273l-1.194-.758M.953 14.652l1.408.13"})]}),20),Y0=M(R("g",{stroke:"currentColor",fill:"none",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z"}),u("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),u("path",{d:"M15 6l3 3"}),u("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),u("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),z),SU=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z"}),u("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),u("path",{d:"M15 6l3 3"}),u("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),u("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),z),CU=M(R("g",{stroke:"currentColor",fill:"none",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35"}),u("path",{d:"M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946"}),u("path",{d:"M6 7.63c-1.391 -.236 -2.787 .395 -3.534 1.689a3.474 3.474 0 0 0 1.271 4.745l4.263 2.514l6 -3.348"}),u("path",{d:"M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45"}),u("path",{d:"M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946"}),u("path",{d:"M18 16.302c1.391 .236 2.787 -.395 3.534 -1.689a3.474 3.474 0 0 0 -1.271 -4.745l-4.308 -2.514l-5.955 3.42"})]}),z),V0=M(R("g",{stroke:"currentColor",fill:"none",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),u("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),u("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),u("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"})]}),z),Qn=M(R("g",{stroke:"currentColor",fill:"none",strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"}),u("path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"})]}),z),X0=M(R("g",{stroke:"currentColor",fill:"none",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"}),u("path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"}),u("path",{d:"M3 3l18 18"})]}),z),kU=M(R("g",{stroke:"currentColor",fill:"none",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),u("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),u("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),u("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),u("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),u("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),z),MU=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),u("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),u("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),u("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),u("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),u("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),z),_t=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),u("path",{d:"M21 21l-6 -6"})]}),z),K0=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M20.984 12.53a9 9 0 1 0 -7.552 8.355"}),u("path",{d:"M12 7v5l3 3"}),u("path",{d:"M19 16l-2 3h4l-2 3"})]}),z),PU=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 8l0 4l2 2"}),u("path",{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5"})]}),z),Z0=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M9 2m0 3a3 3 0 0 1 3 -3h0a3 3 0 0 1 3 3v5a3 3 0 0 1 -3 3h0a3 3 0 0 1 -3 -3z"}),u("path",{d:"M5 10a7 7 0 0 0 14 0"}),u("path",{d:"M8 21l8 0"}),u("path",{d:"M12 17l0 4"})]}),z),$0=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 3l18 18"}),u("path",{d:"M9 5a3 3 0 0 1 6 0v5a3 3 0 0 1 -.13 .874m-2 2a3 3 0 0 1 -3.87 -2.872v-1"}),u("path",{d:"M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85"}),u("path",{d:"M8 21l8 0"}),u("path",{d:"M12 17l0 4"})]}),z),va=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"})]}),z),j0=M(R("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M8 8m0 1a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1z"}),u("path",{d:"M12 20v.01"}),u("path",{d:"M16 20v.01"}),u("path",{d:"M8 20v.01"}),u("path",{d:"M4 20v.01"}),u("path",{d:"M4 16v.01"}),u("path",{d:"M4 12v.01"}),u("path",{d:"M4 8v.01"}),u("path",{d:"M4 4v.01"}),u("path",{d:"M8 4v.01"}),u("path",{d:"M12 4v.01"}),u("path",{d:"M16 4v.01"}),u("path",{d:"M20 4v.01"}),u("path",{d:"M20 8v.01"}),u("path",{d:"M20 12v.01"}),u("path",{d:"M20 16v.01"}),u("path",{d:"M20 20v.01"})]}),z),q0=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 3v18"}),u("path",{d:"M19 21v-18"}),u("path",{d:"M5 7h14"}),u("path",{d:"M5 15h14"}),u("path",{d:"M8 13v4"}),u("path",{d:"M11 13v4"}),u("path",{d:"M16 13v4"}),u("path",{d:"M14 5v4"}),u("path",{d:"M11 5v4"}),u("path",{d:"M8 5v4"}),u("path",{d:"M3 21h18"})]}),z),J0=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 12l18 0"}),u("path",{d:"M7 16l10 0l-10 5l0 -5"}),u("path",{d:"M7 8l10 0l-10 -5l0 5"})]}),z),Q0=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 3l0 18"}),u("path",{d:"M16 7l0 10l5 0l-5 -10"}),u("path",{d:"M8 7l0 10l-5 0l5 -10"})]}),z),$m=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"}),u("path",{d:"M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"}),u("path",{d:"M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"})]}),z),Ms=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"}),u("path",{d:"M22 22l-3 -3"}),u("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),u("path",{d:"M3 11v-1"}),u("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),u("path",{d:"M10 3h1"}),u("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"})]}),z),eb=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),u("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),u("path",{d:"M4 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"}),u("path",{d:"M10 15l2 6l2 -6"}),u("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"})]}),z),tb=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),u("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),u("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"}),u("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"}),u("path",{d:"M11 21v-6l3 6v-6"})]}),z),ob=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 13v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a2 2 0 0 0 6 0v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a8 8 0 0 1 -16 0"}),u("path",{d:"M4 8l5 0"}),u("path",{d:"M15 8l4 0"})]}),z),nb=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 14c.83 .642 2.077 1.017 3.5 1c1.423 .017 2.67 -.358 3.5 -1c.83 -.642 2.077 -1.017 3.5 -1c1.423 -.017 2.67 .358 3.5 1"}),u("path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),u("path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),u("path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z"}),u("path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555"})]}),z),rb=M(R("g",{stroke:"currentColor",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 5a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-16a1 1 0 0 1-1-1v-10zM7 20h10M9 16v4M15 16v4"})]}),{...z,strokeWidth:1.5}),LU=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M15 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"}),u("path",{d:"M21 12h-13l3 -3"}),u("path",{d:"M11 15l-3 -3"})]}),z),AU=M(R("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8z"}),u("path",{d:"M10 9l5 3l-5 3z"})]}),z),ib=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 6h18"}),u("path",{d:"M3 12h18"}),u("path",{d:"M3 18h18"}),u("path",{d:"M6 3v18"}),u("path",{d:"M12 3v18"}),u("path",{d:"M18 3v18"})]}),z),ab=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M17 3m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),u("path",{d:"M3 17m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),u("path",{d:"M17 5c-6.627 0 -12 5.373 -12 12"})]}),z),Zr=M(R("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 18l12 -12"}),u("path",{d:"M18 10v-4h-4"})]}),z),$r=M(R("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4,19L10,19C11.097,19 12,18.097 12,17L12,9C12,7.903 12.903,7 14,7L21,7"}),u("path",{d:"M18 4l3 3l-3 3"})]}),z),jr=M(R("g",{children:[u("path",{d:"M16,12L20,9L16,6"}),u("path",{d:"M6 20c0 -6.075 4.925 -11 11 -11h3"})]}),z),Ps=M(R("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 9l6 6l6 -6"})]}),z),lb=M(R("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 15l6 -6l6 6"})]}),z),sb=M(R("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 15l6 -6l6 6"})]}),z),jm=M(R("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"}),u("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"})]}),z),Ls=M(R("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M19 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M5 7l0 10"}),u("path",{d:"M7 5l10 0"}),u("path",{d:"M7 19l10 0"}),u("path",{d:"M19 7l0 10"})]}),z),qm=M(R("g",{strokeWidth:"1.25",children:[u("rect",{x:"4",y:"4",width:"4",height:"4",rx:"1"}),u("rect",{x:"10",y:"4",width:"4",height:"4",rx:"1"}),u("rect",{x:"16",y:"4",width:"4",height:"4",rx:"1"}),u("rect",{x:"4",y:"10",width:"4",height:"4",rx:"1"}),u("rect",{x:"10",y:"10",width:"4",height:"4",rx:"1"}),u("rect",{x:"16",y:"10",width:"4",height:"4",rx:"1"}),u("rect",{x:"4",y:"16",width:"4",height:"4",rx:"1"}),u("rect",{x:"10",y:"16",width:"4",height:"4",rx:"1"}),u("rect",{x:"16",y:"16",width:"4",height:"4",rx:"1"})]}),z),Jm=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("rect",{x:"7",y:"6",width:"10",height:"8",rx:"1",strokeDasharray:"2 2"}),u("line",{x1:"3",y1:"6",x2:"3",y2:"14"}),u("polyline",{points:"2 8 3 6 4 8"}),u("polyline",{points:"2 12 3 14 4 12"}),u("line",{x1:"7",y1:"18",x2:"17",y2:"18"}),u("polyline",{points:"9 17 7 18 9 19"}),u("polyline",{points:"15 17 17 18 15 19"})]}),z),_U=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 11v8a1 1 0 0 0 1 1h8m-9 -14v-1a1 1 0 0 1 1 -1h1m5 0h2m5 0h1a1 1 0 0 1 1 1v1m0 5v2m0 5v1a1 1 0 0 1 -1 1h-1"}),u("path",{d:"M4 12h7a1 1 0 0 1 1 1v7"})]}),z),Qm=M(u("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:.5,viewBox:"0 0 640 512",children:u("path",{d:"M15 15C24.4 5.7 39.6 5.7 49 15l63 63L112 40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 96c0 13.3-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l38.1 0L15 49C5.7 39.6 5.7 24.4 15 15zM133.5 243.9C158.6 193.6 222.7 112 320 112s161.4 81.6 186.5 131.9c3.8 7.6 3.8 16.5 0 24.2C481.4 318.4 417.3 400 320 400s-161.4-81.6-186.5-131.9c-3.8-7.6-3.8-16.5 0-24.2zM320 320a64 64 0 1 0 0-128 64 64 0 1 0 0 128zM591 15c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-63 63 38.1 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24s24 10.7 24 24l0 38.1 63-63zM15 497c-9.4-9.4-9.4-24.6 0-33.9l63-63L40 400c-13.3 0-24-10.7-24-24s10.7-24 24-24l96 0c13.3 0 24 10.7 24 24l0 96c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-38.1L49 497c-9.4 9.4-24.6 9.4-33.9 0zm576 0l-63-63 0 38.1c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24l96 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-38.1 0 63 63c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0z"})})),cb=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M14 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M4 6l8 0"}),u("path",{d:"M16 6l4 0"}),u("path",{d:"M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M4 12l2 0"}),u("path",{d:"M10 12l10 0"}),u("path",{d:"M17 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M4 18l11 0"}),u("path",{d:"M19 18l1 0"})]}),z),db=M(R("g",{strokeWidth:1,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 10l4 -4 L6 14l8 -8 L6 18l12 -12 L10 18l8 -8 L14 18l4 -4"})]}),z),mS=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4"}),u("path",{d:"M13.5 6.5l4 4"})]}),z),DU=M(R("g",{strokeWidth:1,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M11 7l-5 5l5 5"}),u("path",{d:"M17 7l-5 5l5 5"})]}),z),mb=M(R("g",{strokeWidth:"1.75",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"}),u("path",{d:"M15 4l0 16"})]}),z),RU=M(R("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 20l1.3 -3.9c-2.324 -3.437 -1.426 -7.872 2.1 -10.374c3.526 -2.501 8.59 -2.296 11.845 .48c3.255 2.777 3.695 7.266 1.029 10.501c-2.666 3.235 -7.615 4.215 -11.574 2.293l-4.7 1"})]}),z),NU=M(R("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 4l18 0"}),u("path",{d:"M4 4v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-10"}),u("path",{d:"M12 16l0 4"}),u("path",{d:"M9 20l6 0"}),u("path",{d:"M8 12l3 -3l2 2l3 -3"})]}),z);import pb from"clsx";import tp,{useEffect as hS,useRef as ub,useState as gS}from"react";import{isPromiseLike as fS}from"@excalidraw/common";import pS from"react";import{jsx as ep}from"react/jsx-runtime";var uS=({size:e="1em",circleWidth:o=8,synchronized:t=!1,className:n=""})=>{let i=-(pS.useRef(Date.now()).current%1600);return ep("div",{className:`Spinner ${n}`,children:ep("svg",{viewBox:"0 0 100 100",style:{width:e,height:e,"--spinner-delay":t?`${i}ms`:0},children:ep("circle",{cx:"50",cy:"50",r:50-o/2,strokeWidth:o,fill:"none",strokeMiterlimit:"10"})})})},Dt=uS;import{jsx as Ia,jsxs as Ta}from"react/jsx-runtime";var V=tp.forwardRef(({size:e="medium",visible:o=!0,className:t="",...n},r)=>{let{id:i}=ke(),a=tp.useRef(null);tp.useImperativeHandle(r,()=>a.current);let l=`ToolIcon_size_${e}`,[s,c]=gS(!1),m=ub(!0),p=async h=>{let f="onClick"in n&&n.onClick?.(h);if(fS(f))try{c(!0),await f}catch(b){if(b instanceof Nr)console.warn(b);else throw b}finally{m.current&&c(!1)}};hS(()=>(m.current=!0,()=>{m.current=!1}),[]);let d=ub(null);if(n.type==="button"||n.type==="icon"||n.type==="submit"){let h=n.type==="icon"?"button":n.type;return Ta("button",{className:pb("ToolIcon_type_button",l,t,o&&!n.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!n.hidden,"ToolIcon--selected":n.selected,"ToolIcon--plain":n.type==="icon"}),style:n.style,"data-testid":n["data-testid"],hidden:n.hidden,title:n.title,"aria-label":n["aria-label"],type:h,onClick:p,ref:a,disabled:s||n.isLoading||!!n.disabled,children:[(n.icon||n.label)&&Ta("div",{className:"ToolIcon__icon","aria-hidden":"true","aria-disabled":!!n.disabled,children:[n.icon||n.label,n.keyBindingLabel&&Ia("span",{className:"ToolIcon__keybinding",children:n.keyBindingLabel}),n.isLoading&&Ia(Dt,{})]}),n.showAriaLabel&&Ta("div",{className:"ToolIcon__label",children:[n["aria-label"]," ",s&&Ia(Dt,{})]}),n.children]})}return Ta("label",{className:pb("ToolIcon",t),title:n.title,onPointerDown:h=>{d.current=h.pointerType||null,n.onPointerDown?.({pointerType:h.pointerType||null})},onPointerUp:()=>{requestAnimationFrame(()=>{d.current=null})},children:[Ia("input",{className:`ToolIcon_type_radio ${l}`,type:"radio",name:n.name,"aria-label":n["aria-label"],"aria-keyshortcuts":n["aria-keyshortcuts"],"data-testid":n["data-testid"],id:`${i}-${n.id}`,onChange:()=>{n.onChange?.({pointerType:d.current})},checked:n.checked,ref:a}),Ta("div",{className:"ToolIcon__icon",children:[n.icon,n.keyBindingLabel&&Ia("span",{className:"ToolIcon__keybinding",children:n.keyBindingLabel})]})]})});V.displayName="ToolButton";var As=[],F=e=>(As=As.concat(e),e);import{jsx as SS}from"react/jsx-runtime";var TS=(e,o,t)=>{let n=new Set(q(e.filter(m=>wS(m)),o).map(m=>m.id)),r={},i=t.scene.getNonDeletedElementsMap(),a=new Set;for(let m of n){let p=vS(e,m);for(let d of p)if(!a.has(d.id)){if(_s(d)){let h=gb(d,i);h&&(r[h.id]=!0)}else r[d.id]=!0;a.add(d.id)}}let l=!0,s=e.map(m=>{if(o.selectedElementIds[m.id]){let p=_s(m)?gb(m,i):null;return m.frameId&&n.has(m.frameId)?(l=!1,r[m.id]=!0,m):p?.frameId&&n.has(p?.frameId)?m:(m.boundElements&&m.boundElements.forEach(d=>{let h=t.scene.getNonDeletedElementsMap().get(d.id);h&&yS(h)&&t.scene.mutateElement(h,{startBinding:m.id===h.startBinding?.elementId?null:h.startBinding,endBinding:m.id===h.endBinding?.elementId?null:h.endBinding})}),Rs(m,{isDeleted:!0}))}return m.frameId&&n.has(m.frameId)?(l=!1,_s(m)||(r[m.id]=!0),Rs(m,{frameId:null})):_s(m)&&o.selectedElementIds[m.containerId]?Rs(m,{isDeleted:!0}):m}),c=o.editingGroupId;if(l&&o.editingGroupId){let m=rp(s,o.editingGroupId).filter(p=>!p.isDeleted);if(m.length>1)m[0]&&(r[m[0].id]=!0);else{c=null,m[0]&&(r[m[0].id]=!0);let p=m[0];if(p){let d=p.groupIds.findIndex(f=>f===o.editingGroupId),h=p.groupIds[d+1];if(h){let f=rp(s,h).filter(b=>!b.isDeleted);f.length>1&&(c=h,f.forEach(b=>{r[b.id]=!0}))}}}}return{elements:s,appState:{...o,...IS({selectedElementIds:r,editingGroupId:c},s,o,null)}}},fb=(e,o)=>{if(e.editingGroupId){let t=rp(np(o),e.editingGroupId);if(t.length)return{...e,selectedElementIds:{[t[0].id]:!0}}}return e},Sa=F({name:"deleteSelectedElements",label:"labels.delete",icon:Yo,trackEvent:{category:"element",action:"delete"},perform:(e,o,t,n)=>{if(o.selectedLinearElement?.isEditing){let{elementId:a,selectedPointsIndices:l}=o.selectedLinearElement,s=n.scene.getNonDeletedElementsMap(),c=hb.getElement(a,s);if(!c||l==null)return!1;if(l.length>=c.points.length){let m=e.map(d=>d.id===c.id?Rs(d,{isDeleted:!0}):d),p=fb(o,m);return{elements:m,appState:{...p,selectedLinearElement:null},captureUpdate:Ds.IMMEDIATELY}}return hb.deletePoints(c,n,l),{elements:e,appState:{...o,selectedLinearElement:{...o.selectedLinearElement,selectedPointsIndices:l?.[0]>0?[l[0]-1]:[0]}},captureUpdate:Ds.IMMEDIATELY}}let{elements:r,appState:i}=TS(e,o,n);return xS(r,r.filter(a=>a.isDeleted)),i=fb(i,r),{elements:r,appState:{...i,activeTool:ES(o,{type:n.state.preferredSelectionTool.type}),multiElement:null,newElement:null,activeEmbeddable:null,selectedLinearElement:null},captureUpdate:ve(np(e),o)?Ds.IMMEDIATELY:Ds.EVENTUALLY}},keyTest:(e,o,t)=>(e.key===op.BACKSPACE||e.key===op.DELETE)&&!e[op.CTRL_OR_CMD],PanelComponent:({elements:e,appState:o,updateData:t,app:n})=>{let r=je()==="mobile";return SS(V,{type:"button",icon:Yo,title:g("labels.delete"),"aria-label":g("labels.delete"),onClick:()=>t(null),disabled:!ve(np(e),o),style:{...r&&o.openPopup!=="compactOtherProperties"?bS:{}}})}});import{KEYS as qr,CODES as Jr,isDarwin as Ns}from"@excalidraw/common";import{moveOneLeft as CS,moveOneRight as kS,moveAllLeft as MS,moveAllRight as PS}from"@excalidraw/element";import{CaptureUpdateAction as Bs}from"@excalidraw/element";import{isDarwin as bb}from"@excalidraw/common";var A=e=>e.replace(/\b(Opt(?:ion)?|Alt)\b/i,bb?g("keys.option"):g("keys.alt")).replace(/\bShift\b/i,g("keys.shift")).replace(/\b(Enter|Return)\b/i,g("keys.enter")).replace(/\b(Ctrl|Cmd|Command|CtrlOrCmd)\b/gi,bb?g("keys.cmd"):g("keys.ctrl")).replace(/\b(Esc(?:ape)?)\b/i,g("keys.escape")).replace(/\b(Space(?:bar)?)\b/i,g("keys.spacebar")).replace(/\b(Del(?:ete)?)\b/i,g("keys.delete"));import{jsx as Fs}from"react/jsx-runtime";var ip=F({name:"sendBackward",label:"labels.sendBackward",keywords:["move down","zindex","layer"],icon:Bm,trackEvent:{category:"element"},perform:(e,o,t,n)=>({elements:CS(e,o,n.scene),appState:o,captureUpdate:Bs.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[qr.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Jr.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>Fs("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendBackward")} \u2014 ${A("CtrlOrCmd+[")}`,children:Bm})}),ap=F({name:"bringForward",label:"labels.bringForward",keywords:["move up","zindex","layer"],icon:Nm,trackEvent:{category:"element"},perform:(e,o,t,n)=>({elements:kS(e,o,n.scene),appState:o,captureUpdate:Bs.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[qr.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Jr.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>Fs("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.bringForward")} \u2014 ${A("CtrlOrCmd+]")}`,children:Nm})}),lp=F({name:"sendToBack",label:"labels.sendToBack",keywords:["move down","zindex","layer"],icon:Om,trackEvent:{category:"element"},perform:(e,o)=>({elements:MS(e,o),appState:o,captureUpdate:Bs.IMMEDIATELY}),keyTest:e=>Ns?e[qr.CTRL_OR_CMD]&&e.altKey&&e.code===Jr.BRACKET_LEFT:e[qr.CTRL_OR_CMD]&&e.shiftKey&&e.code===Jr.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>Fs("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendToBack")} \u2014 ${Ns?A("CtrlOrCmd+Alt+["):A("CtrlOrCmd+Shift+[")}`,children:Om})}),sp=F({name:"bringToFront",label:"labels.bringToFront",keywords:["move up","zindex","layer"],icon:Fm,trackEvent:{category:"element"},perform:(e,o)=>({elements:PS(e,o),appState:o,captureUpdate:Bs.IMMEDIATELY}),keyTest:e=>Ns?e[qr.CTRL_OR_CMD]&&e.altKey&&e.code===Jr.BRACKET_RIGHT:e[qr.CTRL_OR_CMD]&&e.shiftKey&&e.code===Jr.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>Fs("button",{type:"button",className:"zIndexButton",onClick:t=>e(null),title:`${g("labels.bringToFront")} \u2014 ${Ns?A("CtrlOrCmd+Alt+]"):A("CtrlOrCmd+Shift+]")}`,children:Fm})});import{getNonDeletedElements as LS}from"@excalidraw/element";import{LinearElementEditor as AS}from"@excalidraw/element";import{isLinearElement as _S,isTextElement as DS}from"@excalidraw/element";import{arrayToMap as RS,KEYS as Eb}from"@excalidraw/common";import{selectGroupsForSelectedElements as NS}from"@excalidraw/element";import{CaptureUpdateAction as BS}from"@excalidraw/element";var cp=F({name:"selectAll",label:"labels.selectAll",icon:j0,trackEvent:{category:"canvas"},viewMode:!1,perform:(e,o,t,n)=>{if(o.selectedLinearElement?.isEditing)return!1;let r=e.filter(i=>!i.isDeleted&&!(DS(i)&&i.containerId)&&!i.locked).reduce((i,a)=>(i[a.id]=!0,i),{});return{appState:{...o,...NS({editingGroupId:null,selectedElementIds:r},LS(e),o,n),selectedLinearElement:Object.keys(r).length===1&&_S(e[0])?new AS(e[0],RS(e)):null},captureUpdate:BS.IMMEDIATELY}},keyTest:e=>e[Eb.CTRL_OR_CMD]&&e.key===Eb.A});import{DEFAULT_GRID_SIZE as xb,KEYS as yb,MOBILE_ACTION_BUTTON_BG as FS,arrayToMap as wb}from"@excalidraw/common";import{getNonDeletedElements as vb}from"@excalidraw/element";import{LinearElementEditor as OS}from"@excalidraw/element";import{getSelectedElements as zS,getSelectionStateForElements as HS}from"@excalidraw/element";import{syncMovedIndices as GS}from"@excalidraw/element";import{duplicateElements as US}from"@excalidraw/element";import{CaptureUpdateAction as Ib}from"@excalidraw/element";import{jsx as WS}from"react/jsx-runtime";var dp=F({name:"duplicateSelection",label:"labels.duplicateSelection",icon:ba,trackEvent:{category:"element"},perform:(e,o,t,n)=>{if(o.selectedElementsAreBeingDragged)return!1;if(o.selectedLinearElement?.isEditing)try{let a=OS.duplicateSelectedPoints(o,n.scene);return{elements:e,appState:a,captureUpdate:Ib.IMMEDIATELY}}catch{return!1}let{duplicatedElements:r,elementsWithDuplicates:i}=US({type:"in-place",elements:e,idsOfElementsToDuplicate:wb(zS(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+xb/2,y:a.y+xb/2,frameId:s??a.frameId}}});if(n.props.onDuplicate&&i){let a=n.props.onDuplicate(i,e);a&&(i=a)}return{elements:GS(i,wb(r)),appState:{...o,...HS(r,vb(i),o)},captureUpdate:Ib.IMMEDIATELY}},keyTest:e=>e[yb.CTRL_OR_CMD]&&e.key===yb.D,PanelComponent:({elements:e,appState:o,updateData:t,app:n})=>{let r=je()==="mobile";return WS(V,{type:"button",icon:ba,title:`${g("labels.duplicateSelection")} \u2014 ${A("CtrlOrCmd+D")}`,"aria-label":g("labels.duplicateSelection"),onClick:()=>t(null),disabled:!ve(vb(e),o),style:{...r&&o.openPopup!=="compactOtherProperties"?FS:{}}})}});import{pointFrom as V4}from"@excalidraw/math";import{useEffect as _p,useMemo as X4,useRef as Dp,useState as K4}from"react";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE as Z4,DEFAULT_ELEMENT_BACKGROUND_PICKS as $4,DEFAULT_ELEMENT_STROKE_COLOR_PALETTE as j4,DEFAULT_ELEMENT_STROKE_PICKS as q4,ARROW_TYPE as Xt,DEFAULT_FONT_FAMILY as J4,DEFAULT_FONT_SIZE as Q4,FONT_FAMILY as e6,ROUNDNESS as oc,STROKE_WIDTH as Rp,VERTICAL_ALIGN as ec,KEYS as di,randomInteger as t6,arrayToMap as Bp,getFontFamilyString as o6,getLineHeight as n6,isTransparent as r6,reduceToCommonValue as i6,invariant as Fp,FONT_SIZES as tc}from"@excalidraw/common";import{canBecomePolygon as a6,getNonDeletedElements as pE}from"@excalidraw/element";import{bindBindingElement as sE,calculateFixedPointForElbowArrowBinding as cE,updateBoundElements as l6}from"@excalidraw/element";import{LinearElementEditor as or}from"@excalidraw/element";import{newElementWith as Xe}from"@excalidraw/element";import{getBoundTextElement as vn,redrawTextBoundingBox as Fa}from"@excalidraw/element";import{isArrowElement as nc,isBoundToContainer as s6,isElbowArrow as uE,isLinearElement as Np,isLineElement as dE,isTextElement as It,isUsingAdaptiveRadius as c6}from"@excalidraw/element";import{hasStrokeColor as d6}from"@excalidraw/element";import{updateElbowArrowPoints as m6,CaptureUpdateAction as Ke,toggleLinePolygonState as p6}from"@excalidraw/element";import{deriveStylesPanelMode as u6}from"@excalidraw/common";import{isDevEnv as YS}from"@excalidraw/common";var VS=new Set(["command_palette","export"]),le=(e,o,t,n)=>{try{if(typeof window>"u"||T.VITE_WORKER_ID||T.VITE_APP_ENABLE_TRACKING!=="true"||!VS.has(e)||YS())return;T.PROD||console.info("trackEvent",{category:e,action:o,label:t,value:n}),window.sa_event&&window.sa_event(o,{category:e,label:t,value:n})}catch(r){console.error("error during analytics",r)}};import $S from"clsx";import XS from"clsx";import{forwardRef as KS}from"react";import{jsx as ZS}from"react/jsx-runtime";var Qr=KS((e,o)=>{let{title:t,className:n,testId:r,active:i,standalone:a,icon:l,onClick:s}=e;return ZS("button",{type:"button",ref:o,title:t,"data-testid":r,className:XS(n,{standalone:a,active:i}),onClick:s,style:e.style,children:l},t)});import{Fragment as qS,jsx as mp,jsxs as jS}from"react/jsx-runtime";var Wt=e=>mp(qS,{children:e.options.map(o=>e.type==="button"?mp(Qr,{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):jS("label",{className:$S({active:e.value===o.value}),title:o.text,children:[mp("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 Xs from"@radix-ui/react-popover";import Wb from"clsx";import{useRef as Yb,useEffect as QC}from"react";import{COLOR_OUTLINE_CONTRAST_THRESHOLD as Gb,COLOR_PALETTE as Vb,isColorDark as Ub,isWritableElement as e4}from"@excalidraw/common";import{jsx as JS}from"react/jsx-runtime";var Os=()=>JS("div",{style:{width:1,height:"1rem",backgroundColor:"var(--default-border-color)",margin:"0 auto"}});import{useEffect as nC,useRef as rC}from"react";import{createPortal as iC}from"react-dom";import{EVENT as fn,KEYS as aC,rgbToHex as lC}from"@excalidraw/common";import Tb from"react";var pp=Tb.createContext(null),Te=()=>Tb.useContext(pp);import{useState as QS,useLayoutEffect as Sb}from"react";import{THEME as eC}from"@excalidraw/common";var zs=e=>{let[o,t]=QS(null),n=de(),{theme:r}=Te(),{container:i}=ke();return Sb(()=>{o&&(o.className="",o.classList.add("excalidraw",...e?.className?.split(/\s+/)||[]),o.classList.toggle("excalidraw--mobile",n.formFactor==="phone"),o.classList.toggle("theme--dark",r===eC.DARK))},[o,r,n.formFactor,e?.className]),Sb(()=>{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 tC}from"react";import{EVENT as Hs}from"@excalidraw/common";function ei(e,o,t){tC(()=>{function n(r){let i=r;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(Hs.POINTER_DOWN,n),document.addEventListener(Hs.TOUCH_START,n),()=>{document.removeEventListener(Hs.POINTER_DOWN,n),document.removeEventListener(Hs.TOUCH_START,n)}},[e,o,t])}import{useRef as oC}from"react";var gn=e=>{let o=oC(e);return Object.assign(o.current,e),o.current};import{jsx as sC}from"react/jsx-runtime";var bn=Se(null),Cb=({onCancel:e,onChange:o,onSelect:t,colorPickerType:n})=>{let r=zs({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),i=Te(),a=En(),l=qe(),s=q(a,i),c=gn({app:l,onCancel:e,onChange:o,onSelect:t,selectedElements:s}),{container:m}=ke();nC(()=>{let d=p.current;if(!d||!l.canvas||!r)return;let h=!1,f=l.canvas.getContext("2d"),b=({clientX:C,clientY:P})=>{let k=f.getImageData((C-i.offsetLeft)*window.devicePixelRatio,(P-i.offsetTop)*window.devicePixelRatio,1,1).data;return lC(k[0],k[1],k[2])},E=({clientX:C,clientY:P,altKey:k})=>{d.style.top=`${P+20}px`,d.style.left=`${C+20}px`;let N=b({clientX:C,clientY:P});h&&c.onChange(n,N,c.selectedElements,{altKey:k}),d.style.background=N},w=()=>{c.onCancel()},y=(C,P)=>{c.onSelect(C,P)},x=C=>{h=!0,C.stopImmediatePropagation()},v=C=>{h=!1,m?.focus(),C.stopImmediatePropagation(),C.preventDefault(),y(b(C),C)},I=C=>{C.key===aC.ESCAPE&&(C.preventDefault(),C.stopImmediatePropagation(),w())};return r.tabIndex=-1,r.focus(),E({clientX:c.app.lastViewportPosition.x,clientY:c.app.lastViewportPosition.y,altKey:!1}),r.addEventListener(fn.KEYDOWN,I),r.addEventListener(fn.POINTER_DOWN,x),r.addEventListener(fn.POINTER_UP,v),window.addEventListener("pointermove",E,{passive:!0}),window.addEventListener(fn.BLUR,w),()=>{h=!1,r.removeEventListener(fn.KEYDOWN,I),r.removeEventListener(fn.POINTER_DOWN,x),r.removeEventListener(fn.POINTER_UP,v),window.removeEventListener("pointermove",E),window.removeEventListener(fn.BLUR,w)}},[c,l.canvas,r,n,m,i.offsetLeft,i.offsetTop]);let p=rC(null);return ei(p,()=>{e()},d=>!!d.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")),r?iC(sC("div",{ref:p,className:"excalidraw-eye-dropper-preview"}),r):null};import*as ti from"@radix-ui/react-popover";import pC from"clsx";import uC from"react";import{isInteractive as hC}from"@excalidraw/common";import cC from"react";import dC from"clsx";import{jsx as mC}from"react/jsx-runtime";var ze=cC.forwardRef(({children:e,padding:o,className:t,style:n},r)=>mC("div",{className:dC("Island",t),style:{"--padding":o,...n},ref:r,children:e}));import{jsx as up,jsxs as gC}from"react/jsx-runtime";var Vo=uC.forwardRef(({className:e,container:o,children:t,style:n,onClose:r,onKeyDown:i,onFocusOutside:a,onPointerLeave:l,onPointerDownOutside:s,preventAutoFocusOnTouch:c=!1},m)=>{let p=de(),d=p.formFactor==="phone"&&!p.isLandscape;return up(ti.Portal,{container:o,children:gC(ti.Content,{ref:m,className:pC("focus-visible-none",e),"data-prevent-outside-click":!0,side:d?"bottom":"right",align:d?"center":"start",alignOffset:-16,sideOffset:20,collisionBoundary:o??void 0,style:{zIndex:"var(--zIndex-ui-styles-popup)",marginLeft:p.formFactor==="phone"?"0.5rem":void 0},onPointerLeave:l,onKeyDown:i,onFocusOutside:a,onPointerDownOutside:s,onOpenAutoFocus:h=>{c&&p.isTouchScreen&&h.preventDefault()},onCloseAutoFocus:h=>{h.stopPropagation(),h.preventDefault(),o&&!hC(document.activeElement)&&o.focus(),r()},children:[up(ze,{padding:3,style:n,children:t}),up(ti.Arrow,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})});import{useState as fC,useCallback as hp}from"react";var Gs=()=>document.querySelector(".excalidraw-wysiwyg"),Us=()=>{let e=Gs();return e?{start:e.selectionStart,end:e.selectionEnd}:null},Ca=e=>{setTimeout(()=>{let o=Gs();o&&(o.focus(),e&&(o.selectionStart=e.start,o.selectionEnd=e.end))},0)},ka=(e,o,t,n)=>{o&&n&&n();let r=o&&t?Us():null;e(),o&&t&&Ca(r)},kb=()=>{let[e,o]=fC(null),t=hp(()=>{let i=Us();o(i)},[]),n=hp(()=>{setTimeout(()=>{let i=Gs();i&&(i.focus(),e&&(i.selectionStart=e.start,i.selectionEnd=e.end,o(null)))},0)},[e]),r=hp(()=>{o(null)},[]);return{saveCaretPosition:t,restoreCaretPosition:n,clearSavedPosition:r,hasSavedPosition:!!e}},Mb=(e=100)=>{let o=Gs();if(o){let t=o.onblur;o.onblur=null,setTimeout(()=>{o.onblur=t},e)}};import EC from"clsx";import{useCallback as xC,useEffect as fp,useRef as Lb,useState as yC}from"react";import{KEYS as bp,normalizeInputColor as wC}from"@excalidraw/common";import{MAX_CUSTOM_COLORS_USED_IN_CANVAS as bC}from"@excalidraw/common";var xn=({palette:e,color:o})=>{if(!o)return null;for(let[t,n]of Object.entries(e))if(Array.isArray(n)){let r=n.indexOf(o);if(r>-1)return{colorName:t,shade:r}}else if(n===o)return{colorName:t,shade:null};return null},Ma=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),gp=({color:e,palette:o})=>!Object.values(o).flat().includes(e),Pb=(e,o,t)=>{let n={elementBackground:"backgroundColor",elementStroke:"strokeColor"},r=e.filter(a=>{if(a.isDeleted)return!1;let l=a[n[o]];return gp({color:l,palette:t})}),i=new Map;return r.forEach(a=>{let l=a[n[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,bC)},Yt=Se(null);import{Fragment as vC,jsx as Ws,jsxs as Ab}from"react/jsx-runtime";var _b=({color:e,onChange:o,label:t,colorPickerType:n,placeholder:r})=>{let i=de(),[a,l]=yC(e),[s,c]=ue(Yt);fp(()=>{l(e)},[e]);let m=xC(b=>{let E=b.toLowerCase(),w=wC(E);w&&o(w),l(E)},[o]),p=Lb(null),d=Lb(null);fp(()=>{p.current&&p.current.focus()},[s]);let[h,f]=ue(bn);return fp(()=>()=>{f(null)},[f]),Ab("div",{className:"color-picker__input-label",children:[Ws("div",{className:"color-picker__input-hash",children:"#"}),Ws("input",{ref:s==="hex"?p:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":t,onChange:b=>{m(b.target.value)},value:(a||"").replace(/^#/,""),onBlur:()=>{l(e)},tabIndex:-1,onFocus:()=>c("hex"),onKeyDown:b=>{b.key!==bp.TAB&&(b.key===bp.ESCAPE&&d.current?.focus(),b.stopPropagation())},placeholder:r}),i.formFactor!=="phone"&&Ab(vC,{children:[Ws("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),Ws("div",{ref:d,className:EC("excalidraw-eye-dropper-trigger",{selected:h}),onClick:()=>f(b=>b?null:{keepOpenOnAlt:!1,onSelect:E=>o(E),colorPickerType:n}),title:`${g("labels.eyeDropper")} \u2014 ${bp.I.toLocaleUpperCase()} or ${A("Alt")} `,children:W0})]})]})};import wp,{useEffect as vp,useImperativeHandle as UC,useState as WC}from"react";import{EVENT as Ob}from"@excalidraw/common";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX as YC,DEFAULT_ELEMENT_STROKE_COLOR_INDEX as VC,KEYS as XC}from"@excalidraw/common";import CC from"clsx";import{useEffect as kC,useRef as MC}from"react";import{isColorDark as IC}from"@excalidraw/common";import{jsxs as SC}from"react/jsx-runtime";var TC=({color:e,keyLabel:o,isShade:t=!1})=>SC("div",{className:"color-picker__button__hotkey-label",style:{color:IC(e)?"#fff":"#000"},children:[t&&"\u21E7",o]}),oi=TC;import{jsx as Ep,jsxs as PC}from"react/jsx-runtime";var Db=({colors:e,color:o,onChange:t,label:n})=>{let[r,i]=ue(Yt),a=MC(null);return kC(()=>{a.current&&a.current.focus()},[o,r]),Ep("div",{className:"color-picker-content--default",children:e.map((l,s)=>PC("button",{ref:o===l?a:void 0,tabIndex:-1,type:"button",className:CC("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":n,style:{"--swatch-color":l},children:[Ep("div",{className:"color-picker__button-outline"}),Ep(oi,{color:l,keyLabel:s+1})]},s))})};import LC from"clsx";import{useEffect as AC,useRef as _C}from"react";import{jsx as xp,jsxs as RC}from"react/jsx-runtime";var DC=({palette:e,color:o,onChange:t,activeShade:n,showHotKey:r=!0})=>{let i=xn({color:o,palette:e}),[a,l]=ue(Yt),s=_C(null);return AC(()=>{s.current&&a==="baseColors"&&s.current.focus()},[i?.colorName,a]),xp("div",{className:"color-picker-content--default",children:Object.entries(e).map(([c,m],p)=>{let d=(Array.isArray(m)?m[n]:m)||"transparent",h=Ma[p],f=g(`colors.${c.replace(/\d+/,"")}`,null,"");return RC("button",{ref:i?.colorName===c?s:void 0,tabIndex:-1,type:"button",className:LC("color-picker__button color-picker__button--large has-outline",{active:i?.colorName===c,"is-transparent":d==="transparent"||!d}),onClick:()=>{t(d),l("baseColors")},title:`${f}${d.startsWith("#")?` ${d}`:""} \u2014 ${h}`,"aria-label":`${f} \u2014 ${h}`,style:d?{"--swatch-color":d}:void 0,"data-testid":`color-${c}`,children:[xp("div",{className:"color-picker__button-outline"}),r&&xp(oi,{color:d,keyLabel:h})]},c)})})},Rb=DC;import{jsx as BC}from"react/jsx-runtime";var NC=({children:e})=>BC("div",{className:"color-picker__heading",children:e}),ni=NC;import FC from"clsx";import{useEffect as OC,useRef as zC}from"react";import{jsx as Pa,jsxs as Nb}from"react/jsx-runtime";var Bb=({color:e,onChange:o,palette:t,showHotKey:n})=>{let r=xn({color:e||"transparent",palette:t}),[i,a]=ue(Yt),l=zC(null);if(OC(()=>{l.current&&i==="shades"&&l.current.focus()},[r,i]),r){let{colorName:s,shade:c}=r,m=t[s];if(Array.isArray(m))return Pa("div",{className:"color-picker-content--default shades",children:m.map((p,d)=>Nb("button",{ref:d===c&&i==="shades"?l:void 0,tabIndex:-1,type:"button",className:FC("color-picker__button color-picker__button--large has-outline",{active:d===c}),"aria-label":"Shade",title:`${s} - ${d+1}`,style:p?{"--swatch-color":p}:void 0,onClick:()=>{o(p),a("shades")},children:[Pa("div",{className:"color-picker__button-outline"}),n&&Pa(oi,{color:p,keyLabel:d+1,isShade:!0})]},d))})}return Nb("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[Pa("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),Pa("div",{tabIndex:-1,style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:"0.75rem"},children:g("colorPicker.noShades")})]})};import{COLORS_PER_ROW as ri,COLOR_PALETTE as HC,KEYS as La}from"@excalidraw/common";var yp=(e,o,t)=>{let n=Math.ceil(t/ri);switch(o=o??-1,e){case"ArrowLeft":{let r=o-1;return r<0?t-1:r}case"ArrowRight":return(o+1)%t;case"ArrowDown":{let r=o+ri;return r>=t?o%ri:r}case"ArrowUp":{let r=o-ri,i=r<0?ri*n+r:r;return i>=t?void 0:i}}},GC=({e,colorObj:o,onChange:t,palette:n,customColors:r,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(n[o.colorName][l]),i("shades"),!0}if(["1","2","3","4","5"].includes(e.key)&&r[Number(e.key)-1])return t(r[Number(e.key)-1]),i("custom"),!0;if(Ma.includes(e.key)){let l=Ma.indexOf(e.key),s=Object.keys(n)[l],c=n[s],m=Array.isArray(c)?c[a]:c;return t(m),i("baseColors"),!0}return!1},Fb=({event:e,activeColorPickerSection:o,palette:t,color:n,onChange:r,customColors:i,setActiveColorPickerSection:a,updateData:l,activeShade:s,onEyeDropperToggle:c,onEscape:m})=>{if(e[La.CTRL_OR_CMD])return!1;if(e.key===La.ESCAPE)return m(e),!0;if(e.key===La.ALT)return c(!0),!0;if(e.key===La.I)return c(),!0;let p=xn({color:n,palette:t});if(e.key===La.TAB){let d={custom:!!i.length,baseColors:!0,shades:p?.shade!=null,hex:!0},h=Object.entries(d).reduce((y,[x,v])=>(v&&y.push(x),y),[]),f=h.indexOf(o),b=e.shiftKey?-1:1,E=f+b>h.length-1?0:f+b<0?h.length-1:f+b,w=h[E];return w&&a(w),w==="custom"?r(i[0]):w==="baseColors"&&(Object.entries(t).find(([x,v])=>Array.isArray(v)?v.includes(n):v===n?x:null)||r(HC.black)),e.preventDefault(),e.stopPropagation(),!0}if(GC({e,colorObj:p,onChange:r,palette:t,customColors:i,setActiveColorPickerSection:a,activeShade:s}))return!0;if(o==="shades"&&p){let{shade:d}=p,h=yp(e.key,d,ri);if(h!==void 0)return r(t[p.colorName][h]),!0}if(o==="baseColors"&&p){let{colorName:d}=p,h=Object.keys(t),f=h.indexOf(d),b=yp(e.key,f,h.length);if(b!==void 0){let E=h[b],w=t[E];return r(Array.isArray(w)?w[s]:w),!0}}if(o==="custom"){let d=n!=null?i.indexOf(n):0,h=yp(e.key,d,i.length);if(h!==void 0){let f=i[h];return r(f),!0}}return!1};import{jsx as yn,jsxs as Ys}from"react/jsx-runtime";var zb=wp.forwardRef(({color:e,onChange:o,type:t,elements:n,palette:r,updateData:i,children:a,showTitle:l,onEyeDropperToggle:s,onEscape:c,showHotKey:m=!0},p)=>{let d=l?t==="elementStroke"?g("labels.stroke"):t==="elementBackground"?g("labels.background"):null:null,[h]=wp.useState(()=>t==="canvasBackground"?[]:Pb(n,t,r)),[f,b]=ue(Yt),E=xn({color:e,palette:r});vp(()=>{if(!f){let v=!!e&&gp({color:e,palette:r}),I=v&&!h.includes(e);b(I?null:v?"custom":E?.shade!=null?"shades":"baseColors")}},[f,e,r,b,E,h]);let[w,y]=WC(E?.shade??(t==="elementBackground"?YC:VC));vp(()=>{E?.shade!=null&&y(E.shade);let v=I=>{I.key===XC.ALT&&s(!1)};return document.addEventListener(Ob.KEYUP,v,{capture:!0}),()=>{document.removeEventListener(Ob.KEYUP,v,{capture:!0})}},[E,s]);let x=wp.useRef(null);return UC(p,()=>x.current),vp(()=>{x?.current?.focus()},[]),yn("div",{role:"dialog","aria-modal":"true","aria-label":g("labels.colorPicker"),children:Ys("div",{ref:x,onKeyDown:v=>{Fb({event:v,activeColorPickerSection:f,palette:r,color:e,onChange:o,onEyeDropperToggle:s,customColors:h,setActiveColorPickerSection:b,updateData:i,activeShade:w,onEscape:c})&&(v.preventDefault(),v.stopPropagation())},className:"color-picker-content properties-content",tabIndex:-1,children:[d&&yn("div",{className:"color-picker__title",children:d}),!!h.length&&Ys("div",{children:[yn(ni,{children:g("colorPicker.mostUsedCustomColors")}),yn(Db,{colors:h,color:e,label:g("colorPicker.mostUsedCustomColors"),onChange:o})]}),Ys("div",{children:[yn(ni,{children:g("colorPicker.colors")}),yn(Rb,{color:e,palette:r,onChange:o,activeShade:w,showHotKey:m})]}),Ys("div",{children:[yn(ni,{children:g("colorPicker.shades")}),yn(Bb,{color:e,onChange:o,palette:r,showHotKey:m})]}),a]})})});import KC from"clsx";import{COLOR_OUTLINE_CONTRAST_THRESHOLD as ZC,DEFAULT_CANVAS_BACKGROUND_PICKS as $C,DEFAULT_ELEMENT_BACKGROUND_PICKS as jC,DEFAULT_ELEMENT_STROKE_PICKS as qC,isColorDark as JC}from"@excalidraw/common";import{jsx as Ip}from"react/jsx-runtime";var Hb=({onChange:e,type:o,activeColor:t,topPicks:n})=>{let r;return o==="elementStroke"&&(r=qC),o==="elementBackground"&&(r=jC),o==="canvasBackground"&&(r=$C),n&&(r=n),r?Ip("div",{className:"color-picker__top-picks",children:r.map(i=>Ip("button",{className:KC("color-picker__button",{active:i===t,"is-transparent":i==="transparent"||!i,"has-outline":!JC(i,ZC)}),style:{"--swatch-color":i},type:"button",title:i,onClick:()=>e(i),"data-testid":`color-top-pick-${i}`,children:Ip("div",{className:"color-picker__button-outline"})},i))}):(console.error("Invalid type for TopPicks"),null)};import{jsx as Vt,jsxs as Vs}from"react/jsx-runtime";var t4=({type:e,color:o,onChange:t,label:n,elements:r,palette:i=Vb,updateData:a,getOpenPopup:l,appState:s})=>{let{container:c}=ke(),m=je(),p=m!=="full",d=m==="mobile",[,h]=ue(Yt),[f,b]=ue(bn),E=Vs("div",{children:[Vt(ni,{children:g("colorPicker.hexCode")}),Vt(_b,{color:o||"",label:n,onChange:x=>{t(x)},colorPickerType:e,placeholder:g("colorPicker.color")})]}),w=Yb(null),y=()=>{w.current?.focus()};return Vt(Vo,{container:c,style:{maxWidth:"13rem"},preventAutoFocusOnTouch:!!s.editingTextElement,onFocusOutside:x=>{e4(x.target)||y(),x.preventDefault()},onPointerDownOutside:x=>{f&&x.preventDefault()},onClose:()=>{l()===e&&a({openPopup:null}),h(null),s.editingTextElement&&setTimeout(()=>{let x=document.querySelector(".excalidraw-wysiwyg");x&&x.focus()},0)},children:i?Vt(zb,{ref:w,palette:i,color:o,onChange:x=>{let v=s.editingTextElement?Us():null;t(x),s.editingTextElement&&v&&Ca(v)},onEyeDropperToggle:x=>{b(v=>x?(v=v||{keepOpenOnAlt:!0,onSelect:t,colorPickerType:e},v.keepOpenOnAlt=!0,v):x===!1||v?null:{keepOpenOnAlt:!1,onSelect:t,colorPickerType:e})},onEscape:x=>{f?b(null):a({openPopup:null})},type:e,elements:r,updateData:a,showTitle:p,showHotKey:!d,children:E}):E})},o4=({label:e,color:o,type:t,mode:n="background",onToggle:r,editingTextElement:i})=>{let a=je(),l=a!=="full",s=a==="mobile",c=m=>{m.preventDefault(),m.stopPropagation(),i&&Mb(),r()};return Vs(Xs.Trigger,{type:"button",className:Wb("color-picker__button active-color properties-trigger",{"is-transparent":!o||o==="transparent","has-outline":!o||!Ub(o,Gb),"compact-sizing":l,"mobile-border":s}),"aria-label":e,style:o?{"--swatch-color":o}:void 0,title:t==="elementStroke"?g("labels.showStroke"):g("labels.showBackground"),"data-openpopup":t,onClick:c,children:[Vt("div",{className:"color-picker__button-outline",children:!o&&K1}),l&&o&&n==="stroke"&&Vt("div",{className:"color-picker__button-background",children:Vt("span",{style:{color:o&&Ub(o,Gb)?"#fff":"#111"},children:db})})]})},Aa=({type:e,color:o,onChange:t,label:n,elements:r,palette:i=Vb,topPicks:a,updateData:l,appState:s})=>{let c=Yb(s.openPopup);QC(()=>{c.current=s.openPopup},[s.openPopup]);let p=je()!=="full";return Vt("div",{children:Vs("div",{role:"dialog","aria-modal":"true",className:Wb("color-picker-container",{"color-picker-container--no-top-picks":p}),children:[!p&&Vt(Hb,{activeColor:o,onChange:t,type:e,topPicks:a}),!p&&Vt(Os,{}),Vs(Xs.Root,{open:s.openPopup===e,onOpenChange:d=>{d&&l({openPopup:e})},children:[Vt(o4,{color:o,label:n,type:e,mode:e==="elementStroke"?"stroke":"background",editingTextElement:!!s.editingTextElement,onToggle:()=>{s.openPopup===e?l({openPopup:null}):s.openPopup?l({openPopup:e}):l({openPopup:e})}}),s.openPopup===e&&Vt(t4,{type:e,color:o,onChange:t,label:n,elements:r,palette:i,updateData:l,getOpenPopup:()=>c.current,appState:s})]})]})})};import*as eE from"@radix-ui/react-popover";import _4 from"clsx";import D4,{useCallback as R4,useMemo as N4}from"react";import{FONT_FAMILY as Mp}from"@excalidraw/common";import v4,{useMemo as wn,useState as I4,useRef as T4,useEffect as S4,useCallback as $b}from"react";import{arrayToList as C4,debounce as k4,FONT_FAMILY as er,getFontFamilyString as M4}from"@excalidraw/common";import n4 from"clsx";import r4 from"react";import{jsx as i4,jsxs as a4}from"react/jsx-runtime";var Ks=r4.forwardRef(({className:e,placeholder:o,onChange:t},n)=>a4("div",{className:n4("QuickSearch__wrapper",e),children:[_t,i4("input",{ref:n,className:"QuickSearch__input",type:"text",placeholder:o,onChange:r=>t(r.target.value.trim().toLowerCase())})]}));import l4 from"clsx";import{Children as s4}from"react";import{jsx as Xb}from"react/jsx-runtime";var Zs=({className:e,placeholder:o,children:t})=>{let n=!s4.count(t);return Xb("div",{className:l4("ScrollableList__wrapper",e),role:"menu",children:n?Xb("div",{className:"empty",children:o}):t})};import{jsx as c4,jsxs as d4}from"react/jsx-runtime";var Kb=({children:e,className:o="",style:t,title:n})=>d4("div",{className:`dropdown-menu-group ${o}`,style:t,children:[n&&c4("p",{className:"dropdown-menu-group-title",children:n}),e]}),_a=Kb;Kb.displayName="DropdownMenuGroup";import{useEffect as x4,useRef as y4}from"react";import{THEME as w4}from"@excalidraw/common";import{jsx as m4}from"react/jsx-runtime";var Da=({children:e,...o})=>m4("span",{...o,style:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",...o.style},children:e});import{Fragment as u4,jsx as Ra,jsxs as h4}from"react/jsx-runtime";var p4=({textStyle:e,icon:o,shortcut:t,children:n,badge:r})=>{let i=de();return h4(u4,{children:[o&&Ra("div",{className:"dropdown-menu-item__icon",children:o}),Ra("div",{style:e,className:"dropdown-menu-item__text",children:Ra(Da,{children:n})}),r&&Ra("div",{className:"dropdown-menu-item__badge",children:r}),t&&i.formFactor!=="phone"&&Ra("div",{className:"dropdown-menu-item__shortcut",children:t})]})},$s=p4;import g4,{useContext as f4}from"react";import{EVENT as b4,composeEventHandlers as E4}from"@excalidraw/common";var Tp=g4.createContext({}),js=(e="",o=!1,t=!1)=>`dropdown-menu-item dropdown-menu-item-base ${e}
|
|
1
|
+
import{$ as Cm,A as tS,B as n1,C as r1,D as i1,E as os,F as ns,G as rs,H as is,I as ha,J as a1,K as l1,L as s1,M as as,N as Or,O as c1,P as oS,Q as $n,R as zr,S as ga,U as d1,W as m1,X as p1,Y as ls,Z as u1,_ as Sm,a as Qf,aa as ss,b as Zn,ba as h1,c as xo,ca as km,d as e1,da as jn,e as ve,ea as g1,f as t1,fa as Mm,g as q,ga as f1,h as Dr,ha as b1,i as yo,ia as cs,j as da,ja as Pm,k as ma,ka as E1,l as Rr,la as x1,m as pa,ma as y1,n as Nr,na as fa,o as o1,p as vm,q as cn,r as Br,s as wt,t as ao,u as Fr,v as es,w as Im,x as ua,y as ts,z as Tm}from"./chunk-EPVOD37P.js";import{a as T}from"./chunk-HMWQJTVU.js";import{J as wm}from"./chunk-SXXYW6U7.js";import{c as Jf}from"./chunk-AJI3LATG.js";import{b as jf,c as qf,d as S}from"./chunk-SRAX5OIU.js";import AG,{useEffect as _G}from"react";import{DEFAULT_UI_OPTIONS as qT,isShallowEqual as DG}from"@excalidraw/common";import _5 from"clsx";import sz from"lodash.throttle";import Ho,{useContext as Xn}from"react";import{flushSync as oo}from"react-dom";import cz from"roughjs/bin/rough";import{nanoid as dz}from"nanoid";import{clamp as D5,pointFrom as oe,pointDistance as Cr,vector as R5,pointRotateRads as nf,vectorScale as mz,vectorFromPoint as rf,vectorSubtract as N5,vectorDot as B5,vectorNormalize as F5}from"@excalidraw/math";import{COLOR_PALETTE as pz,CODES as O5,shouldResizeFromCenter as z5,shouldMaintainAspectRatio as Ol,shouldRotateWithDiscreteAngle as H5,isArrowKey as im,KEYS as X,APP_NAME as uz,CURSOR_TYPE as Ne,DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT as hz,DEFAULT_VERTICAL_ALIGN as G5,DRAGGING_THRESHOLD as gz,ELEMENT_SHIFT_TRANSLATE_AMOUNT as fz,ELEMENT_TRANSLATE_AMOUNT as U5,EVENT as re,FRAME_STYLE as No,IMAGE_MIME_TYPES as bz,IMAGE_RENDER_TIMEOUT as Ez,LINE_CONFIRM_THRESHOLD as af,MAX_ALLOWED_FILE_BYTES as W5,MIME_TYPES as Bo,MQ_RIGHT_SIDEBAR_MIN_WIDTH as xz,POINTER_BUTTON as kr,ROUNDNESS as am,SCROLL_TIMEOUT as yz,TAP_TWICE_TIMEOUT as wz,TEXT_TO_CENTER_SNAP_THRESHOLD as vz,THEME as lm,TOUCH_CTX_MENU_TIMEOUT as Iz,VERTICAL_ALIGN as Tz,YOUTUBE_STATES as sm,ZOOM_STEP as Sz,POINTER_EVENTS as na,TOOL_TYPE as Fo,supportsResizeObserver as Cz,DEFAULT_COLLISION_THRESHOLD as Y5,DEFAULT_TEXT_ALIGN as kz,ARROW_TYPE as Un,DEFAULT_REDUCED_GLOBAL_ALPHA as Mz,isLocalLink as Pz,normalizeLink as lf,toValidURL as Lz,getGridPoint as pt,getLineHeight as V5,debounce as X5,distance as ra,getFontString as sf,getNearestScrollableContainer as Az,isInputLike as K5,isToolIcon as _z,isWritableElement as zl,sceneCoordsToViewportCoords as cm,tupleToCoors as cf,viewportCoordsToSceneCoords as Be,wrapEvent as Dz,updateObject as df,updateActiveTool as Oo,isTransparent as Rz,easeToValuesRAF as Nz,muteFSAbortError as Bz,isTestEnv as LT,isDevEnv as AT,easeOut as Fz,updateStable as Hl,addEventListener as Fe,normalizeEOL as Oz,getDateTime as Z5,isShallowEqual as $5,arrayToMap as dm,applyDarkModeFilter as zz,randomInteger as Hz,CLASSES as mf,Emitter as Mr,MINIMUM_ARROW_SIZE as Gz,DOUBLE_TAP_POSITION_THRESHOLD as Uz,BIND_MODE_TIMEOUT as Wz,invariant as zo,getFeatureFlag as an,createUserAgentDescriptor as _T,getFormFactor as Yz,deriveStylesPanelMode as fm,isIOS as Vz,isBrave as Xz,isSafari as Kz,loadDesktopUIModePreference as Zz,setDesktopUIMode as $z,isSelectionLikeTool as mm}from"@excalidraw/common";import{getObservedAppState as jz,getCommonBounds as ia,getElementAbsoluteCoords as j5,bindOrUnbindBindingElements as q5,fixBindingsAfterDeletion as qz,getHoveredElementForBinding as bo,isBindingEnabled as Gl,shouldEnableBindingForPointerEvent as Jz,updateBoundElements as pm,LinearElementEditor as pe,newElementWith as Wn,newFrameElement as Qz,newFreeDrawElement as eH,newEmbeddableElement as J5,newMagicFrameElement as Q5,newIframeElement as tH,newArrowElement as oH,newElement as nH,newImageElement as rH,newLinearElement as iH,newTextElement as eT,refreshTextDimensions as aH,deepCopyElement as tT,duplicateElements as pf,hasBoundTextElement as oT,isArrowElement as aa,isBindingElement as Yn,isBindingElementType as lH,isBoundToContainer as uf,isFrameLikeElement as Lt,isImageElement as Pr,isEmbeddableElement as ln,isInitializedImageElement as Ul,isLinearElement as Et,isLinearElementType as sH,isUsingAdaptiveRadius as cH,isIframeElement as la,isIframeLikeElement as Wl,isMagicFrameElement as nT,isTextBindableContainer as rT,isElbowArrow as At,isFlowchartNodeElement as dH,isBindableElement as hf,isTextElement as Eo,getNormalizedDimensions as mH,isElementCompletelyInViewport as gf,isElementInViewport as iT,isInvisiblySmallElement as aT,getCornerRadius as pH,isPathALoop as lT,createSrcDoc as sT,embeddableURLValidator as ff,maybeParseEmbedSrc as uH,getEmbedLink as um,getInitializedImageElements as hH,normalizeSVG as cT,updateImageCache as gH,getBoundTextElement as bf,getContainerCenter as Ef,getContainerElement as dT,isValidTextContainer as fH,redrawTextBoundingBox as bH,hasBoundingBox as EH,getFrameChildren as xf,isCursorInFrame as mT,addElementsToFrame as yf,replaceAllElementsInFrame as xH,removeElementsFromFrame as yH,getElementsInResizingFrame as wf,getElementsInNewFrame as wH,getContainingFrame as vf,elementOverlapsWithFrame as vH,updateFrameMembershipOfSelectedElements as pT,isElementInFrame as uT,getFrameLikeTitle as IH,getElementsOverlappingFrame as TH,filterElementsEligibleAsFrameChildren as SH,hitElementBoundText as CH,hitElementBoundingBoxOnly as kH,hitElementItself as Yl,getVisibleSceneBounds as MH,FlowChartCreator as PH,FlowChartNavigator as LH,getLinkDirectionFromKey as hT,cropElement as AH,wrapText as _H,isElementLink as If,parseElementLinkFromURL as DH,isMeasureTextSupported as RH,normalizeText as NH,measureText as gT,getLineHeightInPx as BH,getApproxMinLineWidth as FH,getApproxMinLineHeight as OH,getMinTextElementWidth as zH,ShapeCache as Vl,getRenderOpacity as HH,editGroupForSelectedElement as GH,getElementsInGroup as Lr,getSelectedGroupIdForElement as UH,getSelectedGroupIds as WH,isElementInGroup as fT,isSelectedViaGroup as YH,selectGroupsForSelectedElements as no,syncInvalidIndices as DT,syncMovedIndices as bT,excludeElementsInFramesFromSelection as VH,getSelectionStateForElements as XH,makeNextSelectedElementIds as ye,getResizeOffsetXY as KH,getResizeArrowDirection as ZH,transformElements as $H,getCursorForResizingElement as ET,getElementWithTransformHandleType as xT,getTransformHandleTypeFromCoords as yT,dragNewElement as wT,dragSelectedElements as jH,getDragOffsetXY as qH,isNonDeletedElement as vT,Scene as IT,Store as JH,CaptureUpdateAction as xt,hitElementBoundingBox as QH,isLineElement as Tf,isSimpleArrow as Sf,StoreDelta as TT,positionElementsOnGrid as ST,calculateFixedPointForNonElbowArrowBinding as CT,bindOrUnbindBindingElement as eG,mutateElement as hm,getElementBounds as kT,doBoundsIntersect as tG,isPointInElement as oG,maxBindingDistance_simple as Cf,convertToExcalidrawElements as nG}from"@excalidraw/element";import{KEYS as op,MOBILE_ACTION_BUTTON_BG as bS,updateActiveTool as ES}from"@excalidraw/common";import{getNonDeletedElements as np}from"@excalidraw/element";import{fixBindingsAfterDeletion as xS}from"@excalidraw/element";import{LinearElementEditor as hb}from"@excalidraw/element";import{newElementWith as Rs}from"@excalidraw/element";import{getContainerElement as gb}from"@excalidraw/element";import{isBoundToContainer as _s,isElbowArrow as yS,isFrameLikeElement as wS}from"@excalidraw/element";import{getFrameChildren as vS}from"@excalidraw/element";import{getElementsInGroup as rp,selectGroupsForSelectedElements as IS}from"@excalidraw/element";import{CaptureUpdateAction as Ds}from"@excalidraw/element";import{isDevEnv as aS}from"@excalidraw/common";import{atom as Se,createStore as nS}from"jotai";import{createIsolation as rS}from"jotai-scope";var w1=rS();var{useAtom:ue,useSetAtom:Hr,useAtomValue:ds,useStore:zG}=w1,v1=w1.Provider,$e=nS();var iS=jf({"./locales/ar-SA.json":()=>import("./locales/ar-SA-EYKRCXR6.js"),"./locales/az-AZ.json":()=>import("./locales/az-AZ-ZNDJBVCS.js"),"./locales/bg-BG.json":()=>import("./locales/bg-BG-O5I6U3AR.js"),"./locales/bn-BD.json":()=>import("./locales/bn-BD-CXZY522G.js"),"./locales/bn-IN.json":()=>import("./locales/bn-IN-HPUBVY4I.js"),"./locales/ca-ES.json":()=>import("./locales/ca-ES-AREX5NEO.js"),"./locales/cs-CZ.json":()=>import("./locales/cs-CZ-HXAZMFYH.js"),"./locales/da-DK.json":()=>import("./locales/da-DK-5X7ZLFU3.js"),"./locales/de-CH.json":()=>import("./locales/de-CH-76ZNVSOF.js"),"./locales/de-DE.json":()=>import("./locales/de-DE-G3JVZ4MQ.js"),"./locales/el-GR.json":()=>import("./locales/el-GR-4AZTZGY6.js"),"./locales/en.json":()=>import("./locales/en-IT7EQLWB.js"),"./locales/es-ES.json":()=>import("./locales/es-ES-ART7BI3G.js"),"./locales/eu-ES.json":()=>import("./locales/eu-ES-BIF4XBMT.js"),"./locales/fa-IR.json":()=>import("./locales/fa-IR-D4HHKAAI.js"),"./locales/fi-FI.json":()=>import("./locales/fi-FI-O35ZY7UI.js"),"./locales/fr-FR.json":()=>import("./locales/fr-FR-XEFNCM4I.js"),"./locales/gl-ES.json":()=>import("./locales/gl-ES-U4NYM3X5.js"),"./locales/he-IL.json":()=>import("./locales/he-IL-656ABAVQ.js"),"./locales/hi-IN.json":()=>import("./locales/hi-IN-Z55GAFFR.js"),"./locales/hu-HU.json":()=>import("./locales/hu-HU-UJ62DVIW.js"),"./locales/id-ID.json":()=>import("./locales/id-ID-FLZFU3OO.js"),"./locales/it-IT.json":()=>import("./locales/it-IT-GIGIGIBJ.js"),"./locales/ja-JP.json":()=>import("./locales/ja-JP-43VXGDWI.js"),"./locales/kaa.json":()=>import("./locales/kaa-L3IMSDYL.js"),"./locales/kab-KAB.json":()=>import("./locales/kab-KAB-XKPWJLNL.js"),"./locales/kk-KZ.json":()=>import("./locales/kk-KZ-SXPDDY2H.js"),"./locales/km-KH.json":()=>import("./locales/km-KH-DOS4CPGC.js"),"./locales/ko-KR.json":()=>import("./locales/ko-KR-BGC6VCY4.js"),"./locales/ku-TR.json":()=>import("./locales/ku-TR-J7IUITIA.js"),"./locales/lt-LT.json":()=>import("./locales/lt-LT-AC3LV5KG.js"),"./locales/lv-LV.json":()=>import("./locales/lv-LV-I6AY7QG2.js"),"./locales/mr-IN.json":()=>import("./locales/mr-IN-5SP4HV5B.js"),"./locales/my-MM.json":()=>import("./locales/my-MM-S7ECRBYZ.js"),"./locales/nb-NO.json":()=>import("./locales/nb-NO-6PNHTF4R.js"),"./locales/nl-NL.json":()=>import("./locales/nl-NL-R4C4SUIG.js"),"./locales/nn-NO.json":()=>import("./locales/nn-NO-3TFXTM7Y.js"),"./locales/oc-FR.json":()=>import("./locales/oc-FR-IK6GIE7H.js"),"./locales/pa-IN.json":()=>import("./locales/pa-IN-YAKHYJET.js"),"./locales/percentages.json":()=>import("./locales/percentages-OL6W367U.js"),"./locales/pl-PL.json":()=>import("./locales/pl-PL-BIY22ZWU.js"),"./locales/pt-BR.json":()=>import("./locales/pt-BR-Q23NUPD6.js"),"./locales/pt-PT.json":()=>import("./locales/pt-PT-LOPEJLPJ.js"),"./locales/ro-RO.json":()=>import("./locales/ro-RO-W3D2ZATV.js"),"./locales/ru-RU.json":()=>import("./locales/ru-RU-DCTW7QSH.js"),"./locales/si-LK.json":()=>import("./locales/si-LK-FYRRHO3C.js"),"./locales/sk-SK.json":()=>import("./locales/sk-SK-MC7UOHQO.js"),"./locales/sl-SI.json":()=>import("./locales/sl-SI-L6B6HFY5.js"),"./locales/sv-SE.json":()=>import("./locales/sv-SE-KMY6L2BA.js"),"./locales/ta-IN.json":()=>import("./locales/ta-IN-ZQCYE2JK.js"),"./locales/th-TH.json":()=>import("./locales/th-TH-WS7ECBAV.js"),"./locales/tr-TR.json":()=>import("./locales/tr-TR-S5FI7JRW.js"),"./locales/uk-UA.json":()=>import("./locales/uk-UA-4EZUWUSQ.js"),"./locales/uz-UZ.json":()=>import("./locales/uz-UZ-OKHL6AFA.js"),"./locales/vi-VN.json":()=>import("./locales/vi-VN-K34TWHF7.js"),"./locales/zh-CN.json":()=>import("./locales/zh-CN-JE4UZWNO.js"),"./locales/zh-HK.json":()=>import("./locales/zh-HK-RM35YDXX.js"),"./locales/zh-TW.json":()=>import("./locales/zh-TW-ONGLV6Y5.js")});var lS=85,wo={code:"en",label:"English"},Ur=[wo,...[{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=>Jf[e.code]>=lS).sort((e,o)=>e.label>o.label?1:-1)],ps="__test__";aS()&&Ur.unshift({code:ps,label:"test language"},{code:`${ps}.rtl`,label:"\u202Atest language (rtl)\u202C",rtl:!0});var Gr=wo,ms={},us=async e=>{if(Gr=e,document.documentElement.dir=Gr.rtl?"rtl":"ltr",document.documentElement.lang=Gr.code,e.code.startsWith(ps))ms={};else try{ms=await iS(`./locales/${Gr.code}.json`)}catch(o){console.error(`Failed to load language ${e.code}:`,o.message),ms=wm}$e.set(T1,e.code)},Uo=()=>Gr,I1=(e,o)=>{for(let t=0;t<o.length;++t){let n=o[t];if(e[n]===void 0)return;e=e[n]}if(typeof e=="string")return e},g=(e,o,t)=>{if(Gr.code.startsWith(ps))return`\u202A[[${o?`${e}(${JSON.stringify(o).slice(1,-1)})`:e}]]\u202C`;let n=e.split("."),r=I1(ms,n)||I1(wm,n)||t;if(r===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)r=r.replace(`{{${i}}}`,String(o[i]));return r},T1=Se(wo.code),Ue=()=>{let e=ds(T1);return{t:g,langCode:e}};import sS from"clsx";import it from"react";import{THEME as cS}from"@excalidraw/common";import{Fragment as Ie,jsx as u,jsxs as R}from"react/jsx-runtime";var lo=e=>"var(--icon-fill-color)",S1=e=>e===cS.LIGHT?"#fff":"#1e1e1e",M=(e,o=512)=>{let{width:t=512,height:n=t,mirror:r,style:i,...a}=typeof o=="number"?{width:o}:o;return u("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${t} ${n}`,className:sS({"rtl-mirror":r}),style:i,...a,children:typeof e=="string"?u("path",{fill:"currentColor",d:e}):e})},z={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},ie={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},eU=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("rect",{x:3,y:8,width:18,height:4,rx:1}),u("line",{x1:12,y1:8,x2:12,y2:21}),u("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),u("path",{d:"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5"})]}),z),hs=M(R("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),u("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),u("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),u("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),u("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),z),C1=M(R("svg",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),u("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),z),k1=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("circle",{cx:"12",cy:"12",r:"1"}),u("circle",{cx:"12",cy:"19",r:"1"}),u("circle",{cx:"12",cy:"5",r:"1"})]}),z),M1=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),u("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),u("path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]}),z),P1=M(R("svg",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),u("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),u("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),z),Lm=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M6.5 9.5l3.5 -3"}),u("path",{d:"M14 5.5l3 1.5"}),u("path",{d:"M18.5 10l-2.5 7"}),u("path",{d:"M13.5 17.5l-7 -5"})]}),z),Wo=M(R("g",{children:[u("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z",stroke:"currentColor",strokeWidth:"1.25"}),u("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z",stroke:"currentColor",strokeWidth:"1.25"}),u("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:u("path",{stroke:"none",d:"M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481",fill:"#fff"})}),u("g",{mask:"url(#UnlockedIcon)",children:u("path",{stroke:"none",d:"M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z",fill:"currentColor"})})]}),ie),dn=M(R("g",{strokeWidth:"1.25",children:[u("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z"}),u("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),u("path",{d:"M6.667 8.333V5.417C6.667 3.806 8.159 2.5 10 2.5c1.841 0 3.333 1.306 3.333 2.917v2.916"})]}),ie),L1=M(u("g",{fill:"currentColor",children:u("path",{d:"M12 2a5 5 0 0 1 5 5v3a3 3 0 0 1 3 3v6a3 3 0 0 1 -3 3h-10a3 3 0 0 1 -3 -3v-6a3 3 0 0 1 3 -3v-3a5 5 0 0 1 5 -5m0 12a2 2 0 0 0 -1.995 1.85l-.005 .15a2 2 0 1 0 2 -2m0 -10a3 3 0 0 0 -3 3v3h6v-3a3 3 0 0 0 -3 -3"})}),{width:24,height:24}),A1=M(R(Ie,{children:[u("path",{d:"M38.5 83.5c-14-2-17.833-10.473-21-22.5C14.333 48.984 12 22 12 12.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),u("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),u("path",{d:"M12.005 10.478c1.92 3.495 3.838 7 7.905 14.423m-7.905-14.423c3.11 5.683 6.23 11.368 7.905 14.423m0 0c-3.68.226-7.35.455-13.91.85m13.91-.85c-5.279.33-10.566.647-13.91.85m0 0c1.936-4.931 3.882-9.86 6.005-15.273M6 25.75c2.069-5.257 4.135-10.505 6.005-15.272",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:41,height:94,fill:"none"}),_1=M(R(Ie,{children:[u("path",{d:"M18.026 1.232c-5.268 13.125-5.548 33.555 3.285 42.311 8.823 8.75 33.31 12.304 42.422 13.523",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),u("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),u("path",{d:"M72.181 59.247c-3.163-2.429-6.337-4.856-13.058-10m13.058 10c-5.145-3.936-10.292-7.882-13.058-10m0 0c-.78 3.603-1.563 7.196-2.948 13.62m2.948-13.62c-1.126 5.168-2.24 10.346-2.948 13.62m0 0c5.168-1.166 10.334-2.343 16.006-3.62m-16.006 3.62c5.51-1.248 11.01-2.495 16.006-3.62",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:85,height:71,fill:"none"}),D1=M(R(Ie,{children:[u("path",{d:"M1 77c14-2 31.833-11.973 35-24 3.167-12.016-6-35-9.5-43.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),u("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),u("path",{d:"M24.165 1.093c-.522 3.953-1.037 7.916-2.132 16.309m2.131-16.309c-.835 6.424-1.68 12.854-2.13 16.308m0 0c3.51-1.125 7.013-2.243 13.27-4.257m-13.27 4.257c5.038-1.608 10.08-3.232 13.27-4.257m0 0c-3.595-3.892-7.197-7.777-11.14-12.05m11.14 12.05c-3.837-4.148-7.667-8.287-11.14-12.05",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:38,height:78,fill:"none"}),tU=M(u("g",{fill:"currentColor",children:u("path",{d:"M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z",fill:"currentColor"})}),{width:40,height:40,fill:"none"}),gs=M(R("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 6l4.153 11.793a0.365 .365 0 0 0 .331 .207a0.366 .366 0 0 0 .332 -.207l2.184 -4.793l4.787 -1.994a0.355 .355 0 0 0 .213 -.323a0.355 .355 0 0 0 -.213 -.323l-11.787 -4.36z"}),u("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),mn=M(R("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,children:[u("path",{d:"M4.028 13.252c-.657 -.972 -1.028 -2.078 -1.028 -3.252c0 -3.866 4.03 -7 9 -7s9 3.134 9 7s-4.03 7 -9 7c-1.913 0 -3.686 -.464 -5.144 -1.255"}),u("path",{d:"M5 15m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M5 17c0 1.42 .316 2.805 1 4"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),fs=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),z),bs=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M10.5 20.4l-6.9 -6.9c-.781 -.781 -.781 -2.219 0 -3l6.9 -6.9c.781 -.781 2.219 -.781 3 0l6.9 6.9c.781 .781 .781 2.219 0 3l-6.9 6.9c-.781 .781 -2.219 .781 -3 0z"})]}),z),Es=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("circle",{cx:"12",cy:"12",r:"9"})]}),z),R1=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),u("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),u("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),z),xs=M(u("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),ie),N1=M(R("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),u("path",{d:"M16 7h4"}),u("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),z),pn=M(R("g",{strokeWidth:"1.25",children:[u("path",{clipRule:"evenodd",d:"m7.643 15.69 7.774-7.773a2.357 2.357 0 1 0-3.334-3.334L4.31 12.357a3.333 3.333 0 0 0-.977 2.357v1.953h1.953c.884 0 1.732-.352 2.357-.977Z"}),u("path",{d:"m11.25 5.417 3.333 3.333"})]}),ie),un=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),u("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),u("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),u("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),u("polyline",{points:"5 20 11 4 13 4 20 20"})]}),z),B1=M(R("g",{stroke:"currentColor",strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 7v-2h13v2"}),u("path",{d:"M10 5v14"}),u("path",{d:"M12 19h-4"}),u("path",{d:"M15 13v-1h6v1"}),u("path",{d:"M18 12v7"}),u("path",{d:"M17 19h2"})]}),z),ys=M(R("g",{strokeWidth:"1.25",children:[u("path",{d:"M12.5 6.667h.01"}),u("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z"}),u("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),u("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),ie),F1=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3"}),u("path",{d:"M18 13.3l-6.3 -6.3"})]}),z),Am=M(u("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),ie),_m=M(u("path",{d:"M5 10h10",strokeWidth:"1.25"}),ie),O1=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M21 21l-6 -6"}),u("path",{d:"M3.268 12.043a7.017 7.017 0 0 0 6.634 4.957a7.012 7.012 0 0 0 7.043 -6.131a7 7 0 0 0 -5.314 -7.672a7.021 7.021 0 0 0 -8.241 4.403"}),u("path",{d:"M3 4v4h4"})]}),z),Yo=M(u("path",{strokeWidth:"1.25",d:"M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"}),ie),ws=M(R("g",{strokeWidth:"1.5",children:[u("polyline",{points:"12 16 18 10 12 4"}),u("polyline",{points:"8 4 2 10 8 16"})]}),ie),ba=M(R("g",{strokeWidth:"1.25",children:[u("path",{d:"M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"}),u("path",{clipRule:"evenodd",d:"M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"})]}),ie),Ea=M(u("path",{clipRule:"evenodd",d:"M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z",stroke:"currentColor"}),ie),xa=M(u("g",{stroke:"currentColor",strokeLinejoin:"round",children:u("path",{d:"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667"})}),{...ie,strokeWidth:1.5}),z1=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),u("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),u("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),z),qn=M(u("path",{strokeWidth:"1.25",d:"M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10"}),ie),Wr=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("circle",{cx:"12",cy:"12",r:"9"}),u("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),u("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),z),H1=M(R("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("circle",{cx:"12",cy:"12",r:"9"}),u("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),u("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),z),oU=M(u("path",{strokeWidth:"1.25",d:"M9.167 5.833H5.833c-1.254 0-2.5 1.282-2.5 2.5v5.834c0 1.283 1.252 2.5 2.5 2.5h5.834c1.251 0 2.5-1.25 2.5-2.5v-3.334M8.333 11.667l8.334-8.334M12.5 3.333h4.167V7.5"}),ie),G1=M(u("path",{d:"M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5",strokeWidth:"1.25"}),ie),U1=M(R("g",{strokeWidth:"1.25",children:[u("path",{d:"M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0"}),u("path",{d:"M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084"})]}),ie),W1=M(R("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 4l11.733 16h4.267l-11.733 -16z"}),u("path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"})]}),z),Y1=M(u("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),ya=M(R("g",{strokeWidth:"1.25",children:[u("path",{d:"M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"}),u("path",{d:"M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"})]}),ie),V1=M("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}),X1=M("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}),Yr=M(u("path",{d:"m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z",strokeWidth:"1.25"}),ie),nU=M("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}),rU=M("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"),vs=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z"}),u("path",{d:"M13.737 9.737c2.299 -2.3 3.23 -5.095 2.081 -6.245c-1.15 -1.15 -3.945 -.217 -6.244 2.082c-2.3 2.299 -3.231 5.095 -2.082 6.244c1.15 1.15 3.946 .218 6.245 -2.081z"}),u("path",{d:"M7.492 11.818c.362 .362 .768 .676 1.208 .934l6.895 4.047c1.078 .557 2.255 -.075 3.692 -1.512c1.437 -1.437 2.07 -2.614 1.512 -3.692c-.372 -.718 -1.72 -3.017 -4.047 -6.895a6.015 6.015 0 0 0 -.934 -1.208"})]}),z),K1=M(u("g",{strokeWidth:1.5,children:u("path",{d:"M6 18l12 -12"})}),z),Is=M(R("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M15 8h.01"}),u("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),u("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),u("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),u("path",{d:"M19 16v6"}),u("path",{d:"M22 19l-3 3l-3 -3"})]}),z),Z1=M("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}),iU=M("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}),aU=M("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}),$1=M("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"),lU=M("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"),Dm=M(u("path",{d:"M7.5 10.833 4.167 7.5 7.5 4.167M4.167 7.5h9.166a3.333 3.333 0 0 1 0 6.667H12.5",strokeWidth:"1.25"}),ie),Rm=M(u("path",{d:"M12.5 10.833 15.833 7.5 12.5 4.167M15.833 7.5H6.667a3.333 3.333 0 1 0 0 6.667H7.5",strokeWidth:"1.25"}),ie),j1=M("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}),q1=M(u("path",{d:"M5 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 17.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7.25 8.917l5.5-2.834M7.25 11.083l5.5 2.834",strokeWidth:"1.5"}),ie),sU=M("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"),cU=M("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}),dU=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M8 9h-1a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-8a2 2 0 0 0 -2 -2h-1"}),u("path",{d:"M12 14v-11"}),u("path",{d:"M9 6l3 -3l3 3"})]}),z),mU=M(R(Ie,{children:[u("path",{fill:"currentColor",d:"M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z"}),u("path",{stroke:"currentColor",fill:"currentColor",d:"M0 36v20h48v-6.2c0-6 0-6.1-2-4.3-1.1 1-2 2.9-2 4.2V52H4V34c0-17.3-.1-18-2-18s-2 .7-2 20z"})]}),{width:64,height:64}),pU=M(u("path",{stroke:"currentColor",strokeWidth:"40",fill:"currentColor",d:"M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z"}),{width:1024}),J1=R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 10l0 10"}),u("path",{d:"M12 10l4 4"}),u("path",{d:"M12 10l-4 4"}),u("path",{d:"M4 4l16 0"})]}),Q1=R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 5l0 14"}),u("path",{d:"M16 9l-4 -4"}),u("path",{d:"M8 9l4 -4"})]}),Nm=M(Q1,z),Bm=M(Q1,{...z,style:{transform:"rotate(180deg)"}}),Fm=M(J1,z),Om=M(J1,{...z,style:{transform:"rotate(180deg)"}}),zm=M(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v7.083c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V8.125c0-.92-.746-1.667-1.666-1.667ZM6.875 6.458h-.417c-.92 0-1.666.747-1.666 1.667v3.75c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667v-3.75c0-.92-.747-1.667-1.667-1.667Z"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),Hm=M(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M6.875 3.125h-.417c-.92 0-1.666.746-1.666 1.667v7.083c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667V4.792c0-.92-.747-1.667-1.667-1.667ZM13.542 5.817h-.417c-.92 0-1.667.747-1.667 1.667v4.391c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V7.484c0-.92-.746-1.667-1.666-1.667Z"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),Gm=M(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M15.208 4.792H8.125c-.92 0-1.667.746-1.667 1.666v.417c0 .92.747 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM12.516 11.458H8.125c-.92 0-1.667.746-1.667 1.667v.417c0 .92.747 1.666 1.667 1.666h4.391c.92 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.667-1.667Z"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),Um=M(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M11.875 4.792H4.792c-.92 0-1.667.746-1.667 1.666v.417c0 .92.746 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM11.683 11.458H7.292c-.92 0-1.667.746-1.667 1.667v.417c0 .92.746 1.666 1.667 1.666h4.39c.921 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.666-1.667Z"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),e0=M(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M14.375 10.208v-.416c0-.92-.746-1.667-1.667-1.667H7.292c-.92 0-1.667.746-1.667 1.667v.416c0 .92.746 1.667 1.667 1.667h5.416c.92 0 1.667-.746 1.667-1.667Z"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),t0=M(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M10.208 5.625h-.416c-.92 0-1.667.746-1.667 1.667v5.416c0 .92.746 1.667 1.667 1.667h.416c.92 0 1.667-.746 1.667-1.667V7.292c0-.92-.746-1.667-1.667-1.667Z"})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),Wm=M(R("g",{stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),u("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M6.875 4.792h-.417c-.92 0-1.666.746-1.666 1.666v7.084c0 .92.746 1.666 1.666 1.666h.417c.92 0 1.667-.746 1.667-1.666V6.458c0-.92-.747-1.666-1.667-1.666ZM13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v3.75c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667v-3.75c0-.92-.746-1.667-1.666-1.667Z"})]}),ie),Ym=M(R("g",{stroke:"currentColor",strokeWidth:"1.25",children:[u("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),u("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M4.792 13.125v.417c0 .92.746 1.666 1.666 1.666h7.084c.92 0 1.666-.746 1.666-1.666v-.417c0-.92-.746-1.667-1.666-1.667H6.458c-.92 0-1.666.746-1.666 1.667ZM6.458 6.458v.417c0 .92.747 1.667 1.667 1.667h3.75c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666h-3.75c-.92 0-1.667.746-1.667 1.666Z"})]}),ie),Ts=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("circle",{cx:"9",cy:"7",r:"4"}),u("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),u("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),u("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),z),uU=M("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"),hU=M("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"),Ut=M(R(Ie,{children:[u("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:u("path",{d:"M15 5 5 15M5 5l10 10"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),gU=M("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}),fU=M("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}),bU=M("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}),Vm=it.memo(({theme:e})=>M(R(Ie,{children:[u("path",{d:"M25 26H111V111H25",fill:lo(e)}),u("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:lo(e),strokeWidth:"2"}),u("path",{d:"M100 100H160V160H100",fill:lo(e)}),u("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:lo(e),strokeWidth:"2"}),R("g",{fill:S1(e),stroke:lo(e),strokeWidth:"6",children:[u("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),u("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),u("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),u("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),Xm=it.memo(({theme:e})=>M(R(Ie,{children:[u("path",{d:"M25 26H111V111H25",fill:lo(e)}),u("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:lo(e),strokeWidth:"2"}),u("path",{d:"M100 100H160V160H100",fill:lo(e)}),u("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:lo(e),strokeWidth:"2"}),R("g",{fill:S1(e),stroke:lo(e),strokeWidth:"6",children:[u("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),u("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),u("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),u("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),u("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),u("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),o0=M(u("g",{strokeWidth:1.25,children:u("path",{d:"M5.879 2.625h8.242a3.27 3.27 0 0 1 3.254 3.254v8.242a3.27 3.27 0 0 1-3.254 3.254H5.88a3.27 3.27 0 0 1-3.254-3.254V5.88A3.27 3.27 0 0 1 5.88 2.626l-.001-.001ZM4.518 16.118l7.608-12.83m.198 13.934 5.051-9.897M2.778 9.675l9.348-6.387m-7.608 12.83 12.857-8.793"})}),ie),n0=M(R(Ie,{children:[u("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),u("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:u("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.25"})}),u("g",{mask:"url(#FillHachureIcon)",children:u("path",{d:"M2.258 15.156 15.156 2.258M7.324 20.222 20.222 7.325m-20.444 5.35L12.675-.222m-8.157 18.34L17.416 5.22",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})]}),ie),r0=M(R(Ie,{children:[R("g",{clipPath:"url(#a)",children:[u("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),u("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:u("path",{d:"M2.426 15.044 15.044 2.426M7.383 20 20 7.383M0 12.617 12.617 0m-7.98 17.941L17.256 5.324m-2.211 12.25L2.426 4.956M20 12.617 7.383 0m5.234 20L0 7.383m17.941 7.98L5.324 2.745",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),u("g",{mask:"url(#FillCrossHatchIcon)",children:u("path",{d:"M14.121 2H5.88A3.879 3.879 0 0 0 2 5.879v8.242A3.879 3.879 0 0 0 5.879 18h8.242A3.879 3.879 0 0 0 18 14.121V5.88A3.879 3.879 0 0 0 14.121 2Z",fill:"currentColor"})})]}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),i0=M(R(Ie,{children:[u("g",{clipPath:"url(#a)",children:u("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z",stroke:"currentColor",strokeWidth:"1.25"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),{...ie,fill:"currentColor"}),Km=M(u(Ie,{children:u("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),ie),a0=M(u("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),ie),l0=M(u("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),ie),EU=it.memo(({theme:e})=>M(u("path",{d:"M6 10H34",stroke:lo(e),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})),s0=M(R("g",{strokeWidth:"2",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 12h2"}),u("path",{d:"M17 12h2"}),u("path",{d:"M11 12h2"})]}),z),c0=M(R("g",{strokeWidth:"2",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 12v.01"}),u("path",{d:"M8 12v.01"}),u("path",{d:"M12 12v.01"}),u("path",{d:"M16 12v.01"}),u("path",{d:"M20 12v.01"})]}),z),d0=M(u("path",{d:"M2.5 12.038c1.655-.885 5.9-3.292 8.568-4.354 2.668-1.063.101 2.821 1.32 3.104 1.218.283 5.112-1.814 5.112-1.814",strokeWidth:"1.25"}),ie),m0=M(u("path",{d:"M2.5 12.563c1.655-.886 5.9-3.293 8.568-4.355 2.668-1.062.101 2.822 1.32 3.105 1.218.283 5.112-1.814 5.112-1.814m-13.469 2.23c2.963-1.586 6.13-5.62 7.468-4.998 1.338.623-1.153 4.11-.132 5.595 1.02 1.487 6.133-1.43 6.133-1.43",strokeWidth:"1.25"}),ie),p0=M(u("path",{d:"M2.5 11.936c1.737-.879 8.627-5.346 10.42-5.268 1.795.078-.418 5.138.345 5.736.763.598 3.53-1.789 4.235-2.147M2.929 9.788c1.164-.519 5.47-3.28 6.987-3.114 1.519.165 1 3.827 2.121 4.109 1.122.281 3.839-2.016 4.606-2.42",strokeWidth:"1.25"}),ie),u0=M(R("svg",{strokeWidth:"1.5",children:[u("path",{d:"M3.33334 9.99998V6.66665C3.33334 6.04326 3.33403 4.9332 3.33539 3.33646C4.95233 3.33436 6.06276 3.33331 6.66668 3.33331H10"}),u("path",{d:"M13.3333 3.33331V3.34331"}),u("path",{d:"M16.6667 3.33331V3.34331"}),u("path",{d:"M16.6667 6.66669V6.67669"}),u("path",{d:"M16.6667 10V10.01"}),u("path",{d:"M3.33334 13.3333V13.3433"}),u("path",{d:"M16.6667 13.3333V13.3433"}),u("path",{d:"M3.33334 16.6667V16.6767"}),u("path",{d:"M6.66666 16.6667V16.6767"}),u("path",{d:"M10 16.6667V16.6767"}),u("path",{d:"M13.3333 16.6667V16.6767"}),u("path",{d:"M16.6667 16.6667V16.6767"})]}),ie),h0=M(R("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),u("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),u("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),u("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),u("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),u("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),u("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),u("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),u("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),u("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),u("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),u("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),z),g0=M(R("g",{stroke:"currentColor",opacity:.3,strokeWidth:2,children:[u("path",{d:"M12 12l9 0"}),u("path",{d:"M3 9l6 6"}),u("path",{d:"M3 15l6 -6"})]}),z),f0=it.memo(({flip:e=!1})=>M(R("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[u("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),u("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})),b0=it.memo(({flip:e=!1})=>M(R("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[u("path",{d:"M32 10L6 10",strokeWidth:2}),u("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),E0=it.memo(({flip:e=!1})=>M(R("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[u("path",{d:"M26 10L6 10"}),u("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),x0=it.memo(({flip:e=!1})=>M(u("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",children:u("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})),y0=it.memo(({flip:e=!1})=>M(R("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[u("path",{d:"M32 10L6 10",strokeWidth:2}),u("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})),w0=it.memo(({flip:e=!1})=>M(R("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",children:[u("path",{d:"M6,9.5H27"}),u("path",{d:"M27,5L34,10L27,14Z",fill:"none"})]}),{width:40,height:20})),v0=it.memo(({flip:e=!1})=>M(R("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[u("path",{d:"M6,9.5H20"}),u("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),I0=it.memo(({flip:e=!1})=>M(R("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[u("path",{d:"M6,9.5H20"}),u("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),T0=it.memo(({flip:e=!1})=>M(u("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:u("path",{d:"M34,10 H6 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),S0=it.memo(({flip:e=!1})=>M(u("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:u("path",{d:"M34,10 H6 M15,10 L15,15 L15,5"})}),{width:40,height:20})),C0=it.memo(({flip:e=!1})=>M(u("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:u("path",{d:"M34,10 H6 M15,10 L15,16 L15,4 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),k0=M(R(Ie,{children:[u("g",{clipPath:"url(#a)",children:u("path",{d:"M14.167 6.667a3.333 3.333 0 0 0-3.334-3.334H9.167a3.333 3.333 0 0 0 0 6.667h1.666a3.333 3.333 0 0 1 0 6.667H9.167a3.333 3.333 0 0 1-3.334-3.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),M0=M(R(Ie,{children:[u("g",{clipPath:"url(#a)",children:u("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),P0=M(R(Ie,{children:[u("g",{clipPath:"url(#a)",children:u("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),u("defs",{children:u("clipPath",{id:"a",children:u("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),ie),L0=M(u(Ie,{children:u("path",{d:"m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),ie),Jn=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 7v-2h13v2"}),u("path",{d:"M10 5v14"}),u("path",{d:"M12 19h-4"}),u("path",{d:"M15 13v-1h6v1"}),u("path",{d:"M18 12v7"}),u("path",{d:"M17 19h2"})]}),z),A0=M(u(Ie,{children:R("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M7 12h10"}),u("path",{d:"M7 5v14"}),u("path",{d:"M17 5v14"}),u("path",{d:"M15 19h4"}),u("path",{d:"M15 5h4"}),u("path",{d:"M5 19h4"}),u("path",{d:"M5 5h4"})]})}),z),wa=M(u(Ie,{children:u("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:u("path",{d:"M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334"})})}),ie),dS=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M7 8l-4 4l4 4"}),u("path",{d:"M17 8l4 4l-4 4"}),u("path",{d:"M14 4l-4 16"})]}),z),Ss=dS,_0=M(R("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),u("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),u("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),z),D0=M(R("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),u("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),u("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),z),R0=M(R("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),u("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),u("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),z),N0=it.memo(({theme:e})=>M(R("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),u("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),z)),B0=it.memo(({theme:e})=>M(R("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),u("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),z)),F0=it.memo(({theme:e})=>M(R("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),u("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),u("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),z)),Cs=M(R("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M21 19h-18l9 -15"}),u("path",{d:"M20.615 15.171h.015"}),u("path",{d:"M19.515 11.771h.015"}),u("path",{d:"M17.715 8.671h.015"}),u("path",{d:"M15.415 5.971h.015"})]}),z),O0=M(u("path",{d:"M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z",fill:"currentColor"}),{width:640,height:512}),xU=M(u("path",{d:"M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z"})),ks=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),u("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),u("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),u("path",{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"})]}),z),Zm=M(R(Ie,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),u("path",{d:"M7 11l5 5l5 -5"}),u("path",{d:"M12 4l0 12"})]}),z),Vr=M(R(Ie,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"}),u("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]}),z),z0=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),u("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),u("path",{d:"M9.15 14.85l8.85 -10.85"}),u("path",{d:"M6 4l8.85 10.85"})]}),z),H0=M(R(Ie,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),u("path",{d:"M12 17l0 .01"}),u("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),z),yU=M(R(Ie,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M7 4v16l13 -8z"})]}),z),wU=M(R(Ie,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z",strokeWidth:"0",fill:"currentColor"})]}),z),G0=M(R(Ie,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 12l5 5l10 -10"})]}),z),U0=M(R(Ie,{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z"}),u("path",{d:"M12 9v4"}),u("path",{d:"M12 17h.01"})]}),z),W0=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M11 7l6 6"}),u("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"})]}),z),Xr=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 3l-4 7h8z"}),u("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),u("path",{d:"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"})]}),z),hn=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 7l16 0"}),u("path",{d:"M4 17l16 0"}),u("path",{d:"M7 4l0 16"}),u("path",{d:"M17 4l0 16"})]}),z),vU=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"}),u("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"})]}),z),IU=M(R("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 10l-2 1l8 4l8 -4l-2 -1"}),u("path",{d:"M4 15l8 4l8 -4"}),u("path",{d:"M12 4v7"}),u("path",{d:"M15 8l-3 3l-3 -3"})]}),z),TU=M(R("g",{strokeWidth:"1.25",children:[u("path",{d:"M4.16602 10H15.8327"}),u("path",{d:"M12.5 13.3333L15.8333 10"}),u("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),ie),Kr=M(R("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[u("path",{clipRule:"evenodd",d:"m9.644 13.69 7.774-7.773a2.357 2.357 0 0 0-3.334-3.334l-7.773 7.774L8 12l1.643 1.69Z"}),u("path",{d:"m13.25 3.417 3.333 3.333M10 10l2-2M5 15l3-3M2.156 17.894l1-1M5.453 19.029l-.144-1.407M2.377 11.887l.866 1.118M8.354 17.273l-1.194-.758M.953 14.652l1.408.13"})]}),20),Y0=M(R("g",{stroke:"currentColor",fill:"none",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z"}),u("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),u("path",{d:"M15 6l3 3"}),u("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),u("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),z),SU=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z"}),u("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),u("path",{d:"M15 6l3 3"}),u("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),u("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),z),CU=M(R("g",{stroke:"currentColor",fill:"none",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35"}),u("path",{d:"M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946"}),u("path",{d:"M6 7.63c-1.391 -.236 -2.787 .395 -3.534 1.689a3.474 3.474 0 0 0 1.271 4.745l4.263 2.514l6 -3.348"}),u("path",{d:"M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45"}),u("path",{d:"M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946"}),u("path",{d:"M18 16.302c1.391 .236 2.787 -.395 3.534 -1.689a3.474 3.474 0 0 0 -1.271 -4.745l-4.308 -2.514l-5.955 3.42"})]}),z),V0=M(R("g",{stroke:"currentColor",fill:"none",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),u("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),u("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),u("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"})]}),z),Qn=M(R("g",{stroke:"currentColor",fill:"none",strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"}),u("path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"})]}),z),X0=M(R("g",{stroke:"currentColor",fill:"none",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"}),u("path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"}),u("path",{d:"M3 3l18 18"})]}),z),kU=M(R("g",{stroke:"currentColor",fill:"none",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),u("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),u("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),u("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),u("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),u("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),z),MU=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),u("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),u("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),u("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),u("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),u("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),z),_t=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),u("path",{d:"M21 21l-6 -6"})]}),z),K0=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M20.984 12.53a9 9 0 1 0 -7.552 8.355"}),u("path",{d:"M12 7v5l3 3"}),u("path",{d:"M19 16l-2 3h4l-2 3"})]}),z),PU=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 8l0 4l2 2"}),u("path",{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5"})]}),z),Z0=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M9 2m0 3a3 3 0 0 1 3 -3h0a3 3 0 0 1 3 3v5a3 3 0 0 1 -3 3h0a3 3 0 0 1 -3 -3z"}),u("path",{d:"M5 10a7 7 0 0 0 14 0"}),u("path",{d:"M8 21l8 0"}),u("path",{d:"M12 17l0 4"})]}),z),$0=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 3l18 18"}),u("path",{d:"M9 5a3 3 0 0 1 6 0v5a3 3 0 0 1 -.13 .874m-2 2a3 3 0 0 1 -3.87 -2.872v-1"}),u("path",{d:"M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85"}),u("path",{d:"M8 21l8 0"}),u("path",{d:"M12 17l0 4"})]}),z),va=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"})]}),z),j0=M(R("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M8 8m0 1a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1z"}),u("path",{d:"M12 20v.01"}),u("path",{d:"M16 20v.01"}),u("path",{d:"M8 20v.01"}),u("path",{d:"M4 20v.01"}),u("path",{d:"M4 16v.01"}),u("path",{d:"M4 12v.01"}),u("path",{d:"M4 8v.01"}),u("path",{d:"M4 4v.01"}),u("path",{d:"M8 4v.01"}),u("path",{d:"M12 4v.01"}),u("path",{d:"M16 4v.01"}),u("path",{d:"M20 4v.01"}),u("path",{d:"M20 8v.01"}),u("path",{d:"M20 12v.01"}),u("path",{d:"M20 16v.01"}),u("path",{d:"M20 20v.01"})]}),z),q0=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 3v18"}),u("path",{d:"M19 21v-18"}),u("path",{d:"M5 7h14"}),u("path",{d:"M5 15h14"}),u("path",{d:"M8 13v4"}),u("path",{d:"M11 13v4"}),u("path",{d:"M16 13v4"}),u("path",{d:"M14 5v4"}),u("path",{d:"M11 5v4"}),u("path",{d:"M8 5v4"}),u("path",{d:"M3 21h18"})]}),z),J0=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 12l18 0"}),u("path",{d:"M7 16l10 0l-10 5l0 -5"}),u("path",{d:"M7 8l10 0l-10 -5l0 5"})]}),z),Q0=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M12 3l0 18"}),u("path",{d:"M16 7l0 10l5 0l-5 -10"}),u("path",{d:"M8 7l0 10l-5 0l5 -10"})]}),z),$m=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"}),u("path",{d:"M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"}),u("path",{d:"M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"})]}),z),Ms=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"}),u("path",{d:"M22 22l-3 -3"}),u("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),u("path",{d:"M3 11v-1"}),u("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),u("path",{d:"M10 3h1"}),u("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"})]}),z),eb=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),u("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),u("path",{d:"M4 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"}),u("path",{d:"M10 15l2 6l2 -6"}),u("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"})]}),z),tb=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),u("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),u("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"}),u("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"}),u("path",{d:"M11 21v-6l3 6v-6"})]}),z),ob=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 13v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a2 2 0 0 0 6 0v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a8 8 0 0 1 -16 0"}),u("path",{d:"M4 8l5 0"}),u("path",{d:"M15 8l4 0"})]}),z),nb=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 14c.83 .642 2.077 1.017 3.5 1c1.423 .017 2.67 -.358 3.5 -1c.83 -.642 2.077 -1.017 3.5 -1c1.423 -.017 2.67 .358 3.5 1"}),u("path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),u("path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),u("path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z"}),u("path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555"})]}),z),rb=M(R("g",{stroke:"currentColor",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 5a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-16a1 1 0 0 1-1-1v-10zM7 20h10M9 16v4M15 16v4"})]}),{...z,strokeWidth:1.5}),LU=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M15 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"}),u("path",{d:"M21 12h-13l3 -3"}),u("path",{d:"M11 15l-3 -3"})]}),z),AU=M(R("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8z"}),u("path",{d:"M10 9l5 3l-5 3z"})]}),z),ib=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 6h18"}),u("path",{d:"M3 12h18"}),u("path",{d:"M3 18h18"}),u("path",{d:"M6 3v18"}),u("path",{d:"M12 3v18"}),u("path",{d:"M18 3v18"})]}),z),ab=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M17 3m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),u("path",{d:"M3 17m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),u("path",{d:"M17 5c-6.627 0 -12 5.373 -12 12"})]}),z),Zr=M(R("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 18l12 -12"}),u("path",{d:"M18 10v-4h-4"})]}),z),$r=M(R("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4,19L10,19C11.097,19 12,18.097 12,17L12,9C12,7.903 12.903,7 14,7L21,7"}),u("path",{d:"M18 4l3 3l-3 3"})]}),z),jr=M(R("g",{children:[u("path",{d:"M16,12L20,9L16,6"}),u("path",{d:"M6 20c0 -6.075 4.925 -11 11 -11h3"})]}),z),Ps=M(R("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 9l6 6l6 -6"})]}),z),lb=M(R("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 15l6 -6l6 6"})]}),z),sb=M(R("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 15l6 -6l6 6"})]}),z),jm=M(R("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"}),u("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"})]}),z),Ls=M(R("g",{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M5 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M19 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M5 7l0 10"}),u("path",{d:"M7 5l10 0"}),u("path",{d:"M7 19l10 0"}),u("path",{d:"M19 7l0 10"})]}),z),qm=M(R("g",{strokeWidth:"1.25",children:[u("rect",{x:"4",y:"4",width:"4",height:"4",rx:"1"}),u("rect",{x:"10",y:"4",width:"4",height:"4",rx:"1"}),u("rect",{x:"16",y:"4",width:"4",height:"4",rx:"1"}),u("rect",{x:"4",y:"10",width:"4",height:"4",rx:"1"}),u("rect",{x:"10",y:"10",width:"4",height:"4",rx:"1"}),u("rect",{x:"16",y:"10",width:"4",height:"4",rx:"1"}),u("rect",{x:"4",y:"16",width:"4",height:"4",rx:"1"}),u("rect",{x:"10",y:"16",width:"4",height:"4",rx:"1"}),u("rect",{x:"16",y:"16",width:"4",height:"4",rx:"1"})]}),z),Jm=M(R("g",{strokeWidth:"1.5",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("rect",{x:"7",y:"6",width:"10",height:"8",rx:"1",strokeDasharray:"2 2"}),u("line",{x1:"3",y1:"6",x2:"3",y2:"14"}),u("polyline",{points:"2 8 3 6 4 8"}),u("polyline",{points:"2 12 3 14 4 12"}),u("line",{x1:"7",y1:"18",x2:"17",y2:"18"}),u("polyline",{points:"9 17 7 18 9 19"}),u("polyline",{points:"15 17 17 18 15 19"})]}),z),_U=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 11v8a1 1 0 0 0 1 1h8m-9 -14v-1a1 1 0 0 1 1 -1h1m5 0h2m5 0h1a1 1 0 0 1 1 1v1m0 5v2m0 5v1a1 1 0 0 1 -1 1h-1"}),u("path",{d:"M4 12h7a1 1 0 0 1 1 1v7"})]}),z),Qm=M(u("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:.5,viewBox:"0 0 640 512",children:u("path",{d:"M15 15C24.4 5.7 39.6 5.7 49 15l63 63L112 40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 96c0 13.3-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l38.1 0L15 49C5.7 39.6 5.7 24.4 15 15zM133.5 243.9C158.6 193.6 222.7 112 320 112s161.4 81.6 186.5 131.9c3.8 7.6 3.8 16.5 0 24.2C481.4 318.4 417.3 400 320 400s-161.4-81.6-186.5-131.9c-3.8-7.6-3.8-16.5 0-24.2zM320 320a64 64 0 1 0 0-128 64 64 0 1 0 0 128zM591 15c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-63 63 38.1 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24s24 10.7 24 24l0 38.1 63-63zM15 497c-9.4-9.4-9.4-24.6 0-33.9l63-63L40 400c-13.3 0-24-10.7-24-24s10.7-24 24-24l96 0c13.3 0 24 10.7 24 24l0 96c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-38.1L49 497c-9.4 9.4-24.6 9.4-33.9 0zm576 0l-63-63 0 38.1c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24l96 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-38.1 0 63 63c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0z"})})),cb=M(R("g",{strokeWidth:1.5,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M14 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M4 6l8 0"}),u("path",{d:"M16 6l4 0"}),u("path",{d:"M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M4 12l2 0"}),u("path",{d:"M10 12l10 0"}),u("path",{d:"M17 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),u("path",{d:"M4 18l11 0"}),u("path",{d:"M19 18l1 0"})]}),z),db=M(R("g",{strokeWidth:1,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M6 10l4 -4 L6 14l8 -8 L6 18l12 -12 L10 18l8 -8 L14 18l4 -4"})]}),z),mS=M(R("g",{strokeWidth:1.25,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4"}),u("path",{d:"M13.5 6.5l4 4"})]}),z),DU=M(R("g",{strokeWidth:1,children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M11 7l-5 5l5 5"}),u("path",{d:"M17 7l-5 5l5 5"})]}),z),mb=M(R("g",{strokeWidth:"1.75",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"}),u("path",{d:"M15 4l0 16"})]}),z),RU=M(R("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 20l1.3 -3.9c-2.324 -3.437 -1.426 -7.872 2.1 -10.374c3.526 -2.501 8.59 -2.296 11.845 .48c3.255 2.777 3.695 7.266 1.029 10.501c-2.666 3.235 -7.615 4.215 -11.574 2.293l-4.7 1"})]}),z),NU=M(R("g",{strokeWidth:"1.25",children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M3 4l18 0"}),u("path",{d:"M4 4v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-10"}),u("path",{d:"M12 16l0 4"}),u("path",{d:"M9 20l6 0"}),u("path",{d:"M8 12l3 -3l2 2l3 -3"})]}),z);import pb from"clsx";import tp,{useEffect as hS,useRef as ub,useState as gS}from"react";import{isPromiseLike as fS}from"@excalidraw/common";import pS from"react";import{jsx as ep}from"react/jsx-runtime";var uS=({size:e="1em",circleWidth:o=8,synchronized:t=!1,className:n=""})=>{let i=-(pS.useRef(Date.now()).current%1600);return ep("div",{className:`Spinner ${n}`,children:ep("svg",{viewBox:"0 0 100 100",style:{width:e,height:e,"--spinner-delay":t?`${i}ms`:0},children:ep("circle",{cx:"50",cy:"50",r:50-o/2,strokeWidth:o,fill:"none",strokeMiterlimit:"10"})})})},Dt=uS;import{jsx as Ia,jsxs as Ta}from"react/jsx-runtime";var V=tp.forwardRef(({size:e="medium",visible:o=!0,className:t="",...n},r)=>{let{id:i}=ke(),a=tp.useRef(null);tp.useImperativeHandle(r,()=>a.current);let l=`ToolIcon_size_${e}`,[s,c]=gS(!1),m=ub(!0),p=async h=>{let f="onClick"in n&&n.onClick?.(h);if(fS(f))try{c(!0),await f}catch(b){if(b instanceof Nr)console.warn(b);else throw b}finally{m.current&&c(!1)}};hS(()=>(m.current=!0,()=>{m.current=!1}),[]);let d=ub(null);if(n.type==="button"||n.type==="icon"||n.type==="submit"){let h=n.type==="icon"?"button":n.type;return Ta("button",{className:pb("ToolIcon_type_button",l,t,o&&!n.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!n.hidden,"ToolIcon--selected":n.selected,"ToolIcon--plain":n.type==="icon"}),style:n.style,"data-testid":n["data-testid"],hidden:n.hidden,title:n.title,"aria-label":n["aria-label"],type:h,onClick:p,ref:a,disabled:s||n.isLoading||!!n.disabled,children:[(n.icon||n.label)&&Ta("div",{className:"ToolIcon__icon","aria-hidden":"true","aria-disabled":!!n.disabled,children:[n.icon||n.label,n.keyBindingLabel&&Ia("span",{className:"ToolIcon__keybinding",children:n.keyBindingLabel}),n.isLoading&&Ia(Dt,{})]}),n.showAriaLabel&&Ta("div",{className:"ToolIcon__label",children:[n["aria-label"]," ",s&&Ia(Dt,{})]}),n.children]})}return Ta("label",{className:pb("ToolIcon",t),title:n.title,onPointerDown:h=>{d.current=h.pointerType||null,n.onPointerDown?.({pointerType:h.pointerType||null})},onPointerUp:()=>{requestAnimationFrame(()=>{d.current=null})},children:[Ia("input",{className:`ToolIcon_type_radio ${l}`,type:"radio",name:n.name,"aria-label":n["aria-label"],"aria-keyshortcuts":n["aria-keyshortcuts"],"data-testid":n["data-testid"],id:`${i}-${n.id}`,onChange:()=>{n.onChange?.({pointerType:d.current})},checked:n.checked,ref:a}),Ta("div",{className:"ToolIcon__icon",children:[n.icon,n.keyBindingLabel&&Ia("span",{className:"ToolIcon__keybinding",children:n.keyBindingLabel})]})]})});V.displayName="ToolButton";var As=[],F=e=>(As=As.concat(e),e);import{jsx as SS}from"react/jsx-runtime";var TS=(e,o,t)=>{let n=new Set(q(e.filter(m=>wS(m)),o).map(m=>m.id)),r={},i=t.scene.getNonDeletedElementsMap(),a=new Set;for(let m of n){let p=vS(e,m);for(let d of p)if(!a.has(d.id)){if(_s(d)){let h=gb(d,i);h&&(r[h.id]=!0)}else r[d.id]=!0;a.add(d.id)}}let l=!0,s=e.map(m=>{if(o.selectedElementIds[m.id]){let p=_s(m)?gb(m,i):null;return m.frameId&&n.has(m.frameId)?(l=!1,r[m.id]=!0,m):p?.frameId&&n.has(p?.frameId)?m:(m.boundElements&&m.boundElements.forEach(d=>{let h=t.scene.getNonDeletedElementsMap().get(d.id);h&&yS(h)&&t.scene.mutateElement(h,{startBinding:m.id===h.startBinding?.elementId?null:h.startBinding,endBinding:m.id===h.endBinding?.elementId?null:h.endBinding})}),Rs(m,{isDeleted:!0}))}return m.frameId&&n.has(m.frameId)?(l=!1,_s(m)||(r[m.id]=!0),Rs(m,{frameId:null})):_s(m)&&o.selectedElementIds[m.containerId]?Rs(m,{isDeleted:!0}):m}),c=o.editingGroupId;if(l&&o.editingGroupId){let m=rp(s,o.editingGroupId).filter(p=>!p.isDeleted);if(m.length>1)m[0]&&(r[m[0].id]=!0);else{c=null,m[0]&&(r[m[0].id]=!0);let p=m[0];if(p){let d=p.groupIds.findIndex(f=>f===o.editingGroupId),h=p.groupIds[d+1];if(h){let f=rp(s,h).filter(b=>!b.isDeleted);f.length>1&&(c=h,f.forEach(b=>{r[b.id]=!0}))}}}}return{elements:s,appState:{...o,...IS({selectedElementIds:r,editingGroupId:c},s,o,null)}}},fb=(e,o)=>{if(e.editingGroupId){let t=rp(np(o),e.editingGroupId);if(t.length)return{...e,selectedElementIds:{[t[0].id]:!0}}}return e},Sa=F({name:"deleteSelectedElements",label:"labels.delete",icon:Yo,trackEvent:{category:"element",action:"delete"},perform:(e,o,t,n)=>{if(o.selectedLinearElement?.isEditing){let{elementId:a,selectedPointsIndices:l}=o.selectedLinearElement,s=n.scene.getNonDeletedElementsMap(),c=hb.getElement(a,s);if(!c||l==null)return!1;if(l.length>=c.points.length){let m=e.map(d=>d.id===c.id?Rs(d,{isDeleted:!0}):d),p=fb(o,m);return{elements:m,appState:{...p,selectedLinearElement:null},captureUpdate:Ds.IMMEDIATELY}}return hb.deletePoints(c,n,l),{elements:e,appState:{...o,selectedLinearElement:{...o.selectedLinearElement,selectedPointsIndices:l?.[0]>0?[l[0]-1]:[0]}},captureUpdate:Ds.IMMEDIATELY}}let{elements:r,appState:i}=TS(e,o,n);return xS(r,r.filter(a=>a.isDeleted)),i=fb(i,r),{elements:r,appState:{...i,activeTool:ES(o,{type:n.state.preferredSelectionTool.type}),multiElement:null,newElement:null,activeEmbeddable:null,selectedLinearElement:null},captureUpdate:ve(np(e),o)?Ds.IMMEDIATELY:Ds.EVENTUALLY}},keyTest:(e,o,t)=>(e.key===op.BACKSPACE||e.key===op.DELETE)&&!e[op.CTRL_OR_CMD],PanelComponent:({elements:e,appState:o,updateData:t,app:n})=>{let r=je()==="mobile";return SS(V,{type:"button",icon:Yo,title:g("labels.delete"),"aria-label":g("labels.delete"),onClick:()=>t(null),disabled:!ve(np(e),o),style:{...r&&o.openPopup!=="compactOtherProperties"?bS:{}}})}});import{KEYS as qr,CODES as Jr,isDarwin as Ns}from"@excalidraw/common";import{moveOneLeft as CS,moveOneRight as kS,moveAllLeft as MS,moveAllRight as PS}from"@excalidraw/element";import{CaptureUpdateAction as Bs}from"@excalidraw/element";import{isDarwin as bb}from"@excalidraw/common";var A=e=>e.replace(/\b(Opt(?:ion)?|Alt)\b/i,bb?g("keys.option"):g("keys.alt")).replace(/\bShift\b/i,g("keys.shift")).replace(/\b(Enter|Return)\b/i,g("keys.enter")).replace(/\b(Ctrl|Cmd|Command|CtrlOrCmd)\b/gi,bb?g("keys.cmd"):g("keys.ctrl")).replace(/\b(Esc(?:ape)?)\b/i,g("keys.escape")).replace(/\b(Space(?:bar)?)\b/i,g("keys.spacebar")).replace(/\b(Del(?:ete)?)\b/i,g("keys.delete"));import{jsx as Fs}from"react/jsx-runtime";var ip=F({name:"sendBackward",label:"labels.sendBackward",keywords:["move down","zindex","layer"],icon:Bm,trackEvent:{category:"element"},perform:(e,o,t,n)=>({elements:CS(e,o,n.scene),appState:o,captureUpdate:Bs.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[qr.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Jr.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>Fs("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendBackward")} \u2014 ${A("CtrlOrCmd+[")}`,children:Bm})}),ap=F({name:"bringForward",label:"labels.bringForward",keywords:["move up","zindex","layer"],icon:Nm,trackEvent:{category:"element"},perform:(e,o,t,n)=>({elements:kS(e,o,n.scene),appState:o,captureUpdate:Bs.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[qr.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Jr.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>Fs("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.bringForward")} \u2014 ${A("CtrlOrCmd+]")}`,children:Nm})}),lp=F({name:"sendToBack",label:"labels.sendToBack",keywords:["move down","zindex","layer"],icon:Om,trackEvent:{category:"element"},perform:(e,o)=>({elements:MS(e,o),appState:o,captureUpdate:Bs.IMMEDIATELY}),keyTest:e=>Ns?e[qr.CTRL_OR_CMD]&&e.altKey&&e.code===Jr.BRACKET_LEFT:e[qr.CTRL_OR_CMD]&&e.shiftKey&&e.code===Jr.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>Fs("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendToBack")} \u2014 ${Ns?A("CtrlOrCmd+Alt+["):A("CtrlOrCmd+Shift+[")}`,children:Om})}),sp=F({name:"bringToFront",label:"labels.bringToFront",keywords:["move up","zindex","layer"],icon:Fm,trackEvent:{category:"element"},perform:(e,o)=>({elements:PS(e,o),appState:o,captureUpdate:Bs.IMMEDIATELY}),keyTest:e=>Ns?e[qr.CTRL_OR_CMD]&&e.altKey&&e.code===Jr.BRACKET_RIGHT:e[qr.CTRL_OR_CMD]&&e.shiftKey&&e.code===Jr.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>Fs("button",{type:"button",className:"zIndexButton",onClick:t=>e(null),title:`${g("labels.bringToFront")} \u2014 ${Ns?A("CtrlOrCmd+Alt+]"):A("CtrlOrCmd+Shift+]")}`,children:Fm})});import{getNonDeletedElements as LS}from"@excalidraw/element";import{LinearElementEditor as AS}from"@excalidraw/element";import{isLinearElement as _S,isTextElement as DS}from"@excalidraw/element";import{arrayToMap as RS,KEYS as Eb}from"@excalidraw/common";import{selectGroupsForSelectedElements as NS}from"@excalidraw/element";import{CaptureUpdateAction as BS}from"@excalidraw/element";var cp=F({name:"selectAll",label:"labels.selectAll",icon:j0,trackEvent:{category:"canvas"},viewMode:!1,perform:(e,o,t,n)=>{if(o.selectedLinearElement?.isEditing)return!1;let r=e.filter(i=>!i.isDeleted&&!(DS(i)&&i.containerId)&&!i.locked).reduce((i,a)=>(i[a.id]=!0,i),{});return{appState:{...o,...NS({editingGroupId:null,selectedElementIds:r},LS(e),o,n),selectedLinearElement:Object.keys(r).length===1&&_S(e[0])?new AS(e[0],RS(e)):null},captureUpdate:BS.IMMEDIATELY}},keyTest:e=>e[Eb.CTRL_OR_CMD]&&e.key===Eb.A});import{DEFAULT_GRID_SIZE as xb,KEYS as yb,MOBILE_ACTION_BUTTON_BG as FS,arrayToMap as wb}from"@excalidraw/common";import{getNonDeletedElements as vb}from"@excalidraw/element";import{LinearElementEditor as OS}from"@excalidraw/element";import{getSelectedElements as zS,getSelectionStateForElements as HS}from"@excalidraw/element";import{syncMovedIndices as GS}from"@excalidraw/element";import{duplicateElements as US}from"@excalidraw/element";import{CaptureUpdateAction as Ib}from"@excalidraw/element";import{jsx as WS}from"react/jsx-runtime";var dp=F({name:"duplicateSelection",label:"labels.duplicateSelection",icon:ba,trackEvent:{category:"element"},perform:(e,o,t,n)=>{if(o.selectedElementsAreBeingDragged)return!1;if(o.selectedLinearElement?.isEditing)try{let a=OS.duplicateSelectedPoints(o,n.scene);return{elements:e,appState:a,captureUpdate:Ib.IMMEDIATELY}}catch{return!1}let{duplicatedElements:r,elementsWithDuplicates:i}=US({type:"in-place",elements:e,idsOfElementsToDuplicate:wb(zS(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+xb/2,y:a.y+xb/2,frameId:s??a.frameId}}});if(n.props.onDuplicate&&i){let a=n.props.onDuplicate(i,e);a&&(i=a)}return{elements:GS(i,wb(r)),appState:{...o,...HS(r,vb(i),o)},captureUpdate:Ib.IMMEDIATELY}},keyTest:e=>e[yb.CTRL_OR_CMD]&&e.key===yb.D,PanelComponent:({elements:e,appState:o,updateData:t,app:n})=>{let r=je()==="mobile";return WS(V,{type:"button",icon:ba,title:`${g("labels.duplicateSelection")} \u2014 ${A("CtrlOrCmd+D")}`,"aria-label":g("labels.duplicateSelection"),onClick:()=>t(null),disabled:!ve(vb(e),o),style:{...r&&o.openPopup!=="compactOtherProperties"?FS:{}}})}});import{pointFrom as V4}from"@excalidraw/math";import{useEffect as _p,useMemo as X4,useRef as Dp,useState as K4}from"react";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE as Z4,DEFAULT_ELEMENT_BACKGROUND_PICKS as $4,DEFAULT_ELEMENT_STROKE_COLOR_PALETTE as j4,DEFAULT_ELEMENT_STROKE_PICKS as q4,ARROW_TYPE as Xt,DEFAULT_FONT_FAMILY as J4,DEFAULT_FONT_SIZE as Q4,FONT_FAMILY as e6,ROUNDNESS as oc,STROKE_WIDTH as Rp,VERTICAL_ALIGN as ec,KEYS as di,randomInteger as t6,arrayToMap as Bp,getFontFamilyString as o6,getLineHeight as n6,isTransparent as r6,reduceToCommonValue as i6,invariant as Fp,FONT_SIZES as tc}from"@excalidraw/common";import{canBecomePolygon as a6,getNonDeletedElements as pE}from"@excalidraw/element";import{bindBindingElement as sE,calculateFixedPointForElbowArrowBinding as cE,updateBoundElements as l6}from"@excalidraw/element";import{LinearElementEditor as or}from"@excalidraw/element";import{newElementWith as Xe}from"@excalidraw/element";import{getBoundTextElement as vn,redrawTextBoundingBox as Fa}from"@excalidraw/element";import{isArrowElement as nc,isBoundToContainer as s6,isElbowArrow as uE,isLinearElement as Np,isLineElement as dE,isTextElement as It,isUsingAdaptiveRadius as c6}from"@excalidraw/element";import{hasStrokeColor as d6}from"@excalidraw/element";import{updateElbowArrowPoints as m6,CaptureUpdateAction as Ke,toggleLinePolygonState as p6}from"@excalidraw/element";import{deriveStylesPanelMode as u6}from"@excalidraw/common";import{isDevEnv as YS}from"@excalidraw/common";var VS=new Set(["command_palette","export"]),le=(e,o,t,n)=>{try{if(typeof window>"u"||T.VITE_WORKER_ID||T.VITE_APP_ENABLE_TRACKING!=="true"||!VS.has(e)||YS())return;T.PROD||console.info("trackEvent",{category:e,action:o,label:t,value:n}),window.sa_event&&window.sa_event(o,{category:e,label:t,value:n})}catch(r){console.error("error during analytics",r)}};import $S from"clsx";import XS from"clsx";import{forwardRef as KS}from"react";import{jsx as ZS}from"react/jsx-runtime";var Qr=KS((e,o)=>{let{title:t,className:n,testId:r,active:i,standalone:a,icon:l,onClick:s}=e;return ZS("button",{type:"button",ref:o,title:t,"data-testid":r,className:XS(n,{standalone:a,active:i}),onClick:s,style:e.style,children:l},t)});import{Fragment as qS,jsx as mp,jsxs as jS}from"react/jsx-runtime";var Wt=e=>mp(qS,{children:e.options.map(o=>e.type==="button"?mp(Qr,{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):jS("label",{className:$S({active:e.value===o.value}),title:o.text,children:[mp("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 Xs from"@radix-ui/react-popover";import Wb from"clsx";import{useRef as Yb,useEffect as QC}from"react";import{COLOR_OUTLINE_CONTRAST_THRESHOLD as Gb,COLOR_PALETTE as Vb,isColorDark as Ub,isWritableElement as e4}from"@excalidraw/common";import{jsx as JS}from"react/jsx-runtime";var Os=()=>JS("div",{style:{width:1,height:"1rem",backgroundColor:"var(--default-border-color)",margin:"0 auto"}});import{useEffect as nC,useRef as rC}from"react";import{createPortal as iC}from"react-dom";import{EVENT as fn,KEYS as aC,rgbToHex as lC}from"@excalidraw/common";import Tb from"react";var pp=Tb.createContext(null),Te=()=>Tb.useContext(pp);import{useState as QS,useLayoutEffect as Sb}from"react";import{THEME as eC}from"@excalidraw/common";var zs=e=>{let[o,t]=QS(null),n=de(),{theme:r}=Te(),{container:i}=ke();return Sb(()=>{o&&(o.className="",o.classList.add("excalidraw",...e?.className?.split(/\s+/)||[]),o.classList.toggle("excalidraw--mobile",n.formFactor==="phone"),o.classList.toggle("theme--dark",r===eC.DARK))},[o,r,n.formFactor,e?.className]),Sb(()=>{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 tC}from"react";import{EVENT as Hs}from"@excalidraw/common";function ei(e,o,t){tC(()=>{function n(r){let i=r;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(Hs.POINTER_DOWN,n),document.addEventListener(Hs.TOUCH_START,n),()=>{document.removeEventListener(Hs.POINTER_DOWN,n),document.removeEventListener(Hs.TOUCH_START,n)}},[e,o,t])}import{useRef as oC}from"react";var gn=e=>{let o=oC(e);return Object.assign(o.current,e),o.current};import{jsx as sC}from"react/jsx-runtime";var bn=Se(null),Cb=({onCancel:e,onChange:o,onSelect:t,colorPickerType:n})=>{let r=zs({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),i=Te(),a=En(),l=qe(),s=q(a,i),c=gn({app:l,onCancel:e,onChange:o,onSelect:t,selectedElements:s}),{container:m}=ke();nC(()=>{let d=p.current;if(!d||!l.canvas||!r)return;let h=!1,f=l.canvas.getContext("2d"),b=({clientX:C,clientY:P})=>{let k=f.getImageData((C-i.offsetLeft)*window.devicePixelRatio,(P-i.offsetTop)*window.devicePixelRatio,1,1).data;return lC(k[0],k[1],k[2])},E=({clientX:C,clientY:P,altKey:k})=>{d.style.top=`${P+20}px`,d.style.left=`${C+20}px`;let N=b({clientX:C,clientY:P});h&&c.onChange(n,N,c.selectedElements,{altKey:k}),d.style.background=N},w=()=>{c.onCancel()},y=(C,P)=>{c.onSelect(C,P)},x=C=>{h=!0,C.stopImmediatePropagation()},v=C=>{h=!1,m?.focus(),C.stopImmediatePropagation(),C.preventDefault(),y(b(C),C)},I=C=>{C.key===aC.ESCAPE&&(C.preventDefault(),C.stopImmediatePropagation(),w())};return r.tabIndex=-1,r.focus(),E({clientX:c.app.lastViewportPosition.x,clientY:c.app.lastViewportPosition.y,altKey:!1}),r.addEventListener(fn.KEYDOWN,I),r.addEventListener(fn.POINTER_DOWN,x),r.addEventListener(fn.POINTER_UP,v),window.addEventListener("pointermove",E,{passive:!0}),window.addEventListener(fn.BLUR,w),()=>{h=!1,r.removeEventListener(fn.KEYDOWN,I),r.removeEventListener(fn.POINTER_DOWN,x),r.removeEventListener(fn.POINTER_UP,v),window.removeEventListener("pointermove",E),window.removeEventListener(fn.BLUR,w)}},[c,l.canvas,r,n,m,i.offsetLeft,i.offsetTop]);let p=rC(null);return ei(p,()=>{e()},d=>!!d.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")),r?iC(sC("div",{ref:p,className:"excalidraw-eye-dropper-preview"}),r):null};import*as ti from"@radix-ui/react-popover";import pC from"clsx";import uC from"react";import{isInteractive as hC}from"@excalidraw/common";import cC from"react";import dC from"clsx";import{jsx as mC}from"react/jsx-runtime";var ze=cC.forwardRef(({children:e,padding:o,className:t,style:n},r)=>mC("div",{className:dC("Island",t),style:{"--padding":o,...n},ref:r,children:e}));import{jsx as up,jsxs as gC}from"react/jsx-runtime";var Vo=uC.forwardRef(({className:e,container:o,children:t,style:n,onClose:r,onKeyDown:i,onFocusOutside:a,onPointerLeave:l,onPointerDownOutside:s,preventAutoFocusOnTouch:c=!1},m)=>{let p=de(),d=p.formFactor==="phone"&&!p.isLandscape;return up(ti.Portal,{container:o,children:gC(ti.Content,{ref:m,className:pC("focus-visible-none",e),"data-prevent-outside-click":!0,side:d?"bottom":"right",align:d?"center":"start",alignOffset:-16,sideOffset:20,collisionBoundary:o??void 0,style:{zIndex:"var(--zIndex-ui-styles-popup)",marginLeft:p.formFactor==="phone"?"0.5rem":void 0},onPointerLeave:l,onKeyDown:i,onFocusOutside:a,onPointerDownOutside:s,onOpenAutoFocus:h=>{c&&p.isTouchScreen&&h.preventDefault()},onCloseAutoFocus:h=>{h.stopPropagation(),h.preventDefault(),o&&!hC(document.activeElement)&&o.focus(),r()},children:[up(ze,{padding:3,style:n,children:t}),up(ti.Arrow,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})});import{useState as fC,useCallback as hp}from"react";var Gs=()=>document.querySelector(".excalidraw-wysiwyg"),Us=()=>{let e=Gs();return e?{start:e.selectionStart,end:e.selectionEnd}:null},Ca=e=>{setTimeout(()=>{let o=Gs();o&&(o.focus(),e&&(o.selectionStart=e.start,o.selectionEnd=e.end))},0)},ka=(e,o,t,n)=>{o&&n&&n();let r=o&&t?Us():null;e(),o&&t&&Ca(r)},kb=()=>{let[e,o]=fC(null),t=hp(()=>{let i=Us();o(i)},[]),n=hp(()=>{setTimeout(()=>{let i=Gs();i&&(i.focus(),e&&(i.selectionStart=e.start,i.selectionEnd=e.end,o(null)))},0)},[e]),r=hp(()=>{o(null)},[]);return{saveCaretPosition:t,restoreCaretPosition:n,clearSavedPosition:r,hasSavedPosition:!!e}},Mb=(e=100)=>{let o=Gs();if(o){let t=o.onblur;o.onblur=null,setTimeout(()=>{o.onblur=t},e)}};import EC from"clsx";import{useCallback as xC,useEffect as fp,useRef as Lb,useState as yC}from"react";import{KEYS as bp,normalizeInputColor as wC}from"@excalidraw/common";import{MAX_CUSTOM_COLORS_USED_IN_CANVAS as bC}from"@excalidraw/common";var xn=({palette:e,color:o})=>{if(!o)return null;for(let[t,n]of Object.entries(e))if(Array.isArray(n)){let r=n.indexOf(o);if(r>-1)return{colorName:t,shade:r}}else if(n===o)return{colorName:t,shade:null};return null},Ma=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),gp=({color:e,palette:o})=>!Object.values(o).flat().includes(e),Pb=(e,o,t)=>{let n={elementBackground:"backgroundColor",elementStroke:"strokeColor"},r=e.filter(a=>{if(a.isDeleted)return!1;let l=a[n[o]];return gp({color:l,palette:t})}),i=new Map;return r.forEach(a=>{let l=a[n[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,bC)},Yt=Se(null);import{Fragment as vC,jsx as Ws,jsxs as Ab}from"react/jsx-runtime";var _b=({color:e,onChange:o,label:t,colorPickerType:n,placeholder:r})=>{let i=de(),[a,l]=yC(e),[s,c]=ue(Yt);fp(()=>{l(e)},[e]);let m=xC(b=>{let E=b.toLowerCase(),w=wC(E);w&&o(w),l(E)},[o]),p=Lb(null),d=Lb(null);fp(()=>{p.current&&p.current.focus()},[s]);let[h,f]=ue(bn);return fp(()=>()=>{f(null)},[f]),Ab("div",{className:"color-picker__input-label",children:[Ws("div",{className:"color-picker__input-hash",children:"#"}),Ws("input",{ref:s==="hex"?p:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":t,onChange:b=>{m(b.target.value)},value:(a||"").replace(/^#/,""),onBlur:()=>{l(e)},tabIndex:-1,onFocus:()=>c("hex"),onKeyDown:b=>{b.key!==bp.TAB&&(b.key===bp.ESCAPE&&d.current?.focus(),b.stopPropagation())},placeholder:r}),i.formFactor!=="phone"&&Ab(vC,{children:[Ws("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),Ws("div",{ref:d,className:EC("excalidraw-eye-dropper-trigger",{selected:h}),onClick:()=>f(b=>b?null:{keepOpenOnAlt:!1,onSelect:E=>o(E),colorPickerType:n}),title:`${g("labels.eyeDropper")} \u2014 ${bp.I.toLocaleUpperCase()} or ${A("Alt")} `,children:W0})]})]})};import wp,{useEffect as vp,useImperativeHandle as UC,useState as WC}from"react";import{EVENT as Ob}from"@excalidraw/common";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX as YC,DEFAULT_ELEMENT_STROKE_COLOR_INDEX as VC,KEYS as XC}from"@excalidraw/common";import CC from"clsx";import{useEffect as kC,useRef as MC}from"react";import{isColorDark as IC}from"@excalidraw/common";import{jsxs as SC}from"react/jsx-runtime";var TC=({color:e,keyLabel:o,isShade:t=!1})=>SC("div",{className:"color-picker__button__hotkey-label",style:{color:IC(e)?"#fff":"#000"},children:[t&&"\u21E7",o]}),oi=TC;import{jsx as Ep,jsxs as PC}from"react/jsx-runtime";var Db=({colors:e,color:o,onChange:t,label:n})=>{let[r,i]=ue(Yt),a=MC(null);return kC(()=>{a.current&&a.current.focus()},[o,r]),Ep("div",{className:"color-picker-content--default",children:e.map((l,s)=>PC("button",{ref:o===l?a:void 0,tabIndex:-1,type:"button",className:CC("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":n,style:{"--swatch-color":l},children:[Ep("div",{className:"color-picker__button-outline"}),Ep(oi,{color:l,keyLabel:s+1})]},s))})};import LC from"clsx";import{useEffect as AC,useRef as _C}from"react";import{jsx as xp,jsxs as RC}from"react/jsx-runtime";var DC=({palette:e,color:o,onChange:t,activeShade:n,showHotKey:r=!0})=>{let i=xn({color:o,palette:e}),[a,l]=ue(Yt),s=_C(null);return AC(()=>{s.current&&a==="baseColors"&&s.current.focus()},[i?.colorName,a]),xp("div",{className:"color-picker-content--default",children:Object.entries(e).map(([c,m],p)=>{let d=(Array.isArray(m)?m[n]:m)||"transparent",h=Ma[p],f=g(`colors.${c.replace(/\d+/,"")}`,null,"");return RC("button",{ref:i?.colorName===c?s:void 0,tabIndex:-1,type:"button",className:LC("color-picker__button color-picker__button--large has-outline",{active:i?.colorName===c,"is-transparent":d==="transparent"||!d}),onClick:()=>{t(d),l("baseColors")},title:`${f}${d.startsWith("#")?` ${d}`:""} \u2014 ${h}`,"aria-label":`${f} \u2014 ${h}`,style:d?{"--swatch-color":d}:void 0,"data-testid":`color-${c}`,children:[xp("div",{className:"color-picker__button-outline"}),r&&xp(oi,{color:d,keyLabel:h})]},c)})})},Rb=DC;import{jsx as BC}from"react/jsx-runtime";var NC=({children:e})=>BC("div",{className:"color-picker__heading",children:e}),ni=NC;import FC from"clsx";import{useEffect as OC,useRef as zC}from"react";import{jsx as Pa,jsxs as Nb}from"react/jsx-runtime";var Bb=({color:e,onChange:o,palette:t,showHotKey:n})=>{let r=xn({color:e||"transparent",palette:t}),[i,a]=ue(Yt),l=zC(null);if(OC(()=>{l.current&&i==="shades"&&l.current.focus()},[r,i]),r){let{colorName:s,shade:c}=r,m=t[s];if(Array.isArray(m))return Pa("div",{className:"color-picker-content--default shades",children:m.map((p,d)=>Nb("button",{ref:d===c&&i==="shades"?l:void 0,tabIndex:-1,type:"button",className:FC("color-picker__button color-picker__button--large has-outline",{active:d===c}),"aria-label":"Shade",title:`${s} - ${d+1}`,style:p?{"--swatch-color":p}:void 0,onClick:()=>{o(p),a("shades")},children:[Pa("div",{className:"color-picker__button-outline"}),n&&Pa(oi,{color:p,keyLabel:d+1,isShade:!0})]},d))})}return Nb("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[Pa("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),Pa("div",{tabIndex:-1,style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:"0.75rem"},children:g("colorPicker.noShades")})]})};import{COLORS_PER_ROW as ri,COLOR_PALETTE as HC,KEYS as La}from"@excalidraw/common";var yp=(e,o,t)=>{let n=Math.ceil(t/ri);switch(o=o??-1,e){case"ArrowLeft":{let r=o-1;return r<0?t-1:r}case"ArrowRight":return(o+1)%t;case"ArrowDown":{let r=o+ri;return r>=t?o%ri:r}case"ArrowUp":{let r=o-ri,i=r<0?ri*n+r:r;return i>=t?void 0:i}}},GC=({e,colorObj:o,onChange:t,palette:n,customColors:r,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(n[o.colorName][l]),i("shades"),!0}if(["1","2","3","4","5"].includes(e.key)&&r[Number(e.key)-1])return t(r[Number(e.key)-1]),i("custom"),!0;if(Ma.includes(e.key)){let l=Ma.indexOf(e.key),s=Object.keys(n)[l],c=n[s],m=Array.isArray(c)?c[a]:c;return t(m),i("baseColors"),!0}return!1},Fb=({event:e,activeColorPickerSection:o,palette:t,color:n,onChange:r,customColors:i,setActiveColorPickerSection:a,updateData:l,activeShade:s,onEyeDropperToggle:c,onEscape:m})=>{if(e[La.CTRL_OR_CMD])return!1;if(e.key===La.ESCAPE)return m(e),!0;if(e.key===La.ALT)return c(!0),!0;if(e.key===La.I)return c(),!0;let p=xn({color:n,palette:t});if(e.key===La.TAB){let d={custom:!!i.length,baseColors:!0,shades:p?.shade!=null,hex:!0},h=Object.entries(d).reduce((y,[x,v])=>(v&&y.push(x),y),[]),f=h.indexOf(o),b=e.shiftKey?-1:1,E=f+b>h.length-1?0:f+b<0?h.length-1:f+b,w=h[E];return w&&a(w),w==="custom"?r(i[0]):w==="baseColors"&&(Object.entries(t).find(([x,v])=>Array.isArray(v)?v.includes(n):v===n?x:null)||r(HC.black)),e.preventDefault(),e.stopPropagation(),!0}if(GC({e,colorObj:p,onChange:r,palette:t,customColors:i,setActiveColorPickerSection:a,activeShade:s}))return!0;if(o==="shades"&&p){let{shade:d}=p,h=yp(e.key,d,ri);if(h!==void 0)return r(t[p.colorName][h]),!0}if(o==="baseColors"&&p){let{colorName:d}=p,h=Object.keys(t),f=h.indexOf(d),b=yp(e.key,f,h.length);if(b!==void 0){let E=h[b],w=t[E];return r(Array.isArray(w)?w[s]:w),!0}}if(o==="custom"){let d=n!=null?i.indexOf(n):0,h=yp(e.key,d,i.length);if(h!==void 0){let f=i[h];return r(f),!0}}return!1};import{jsx as yn,jsxs as Ys}from"react/jsx-runtime";var zb=wp.forwardRef(({color:e,onChange:o,type:t,elements:n,palette:r,updateData:i,children:a,showTitle:l,onEyeDropperToggle:s,onEscape:c,showHotKey:m=!0},p)=>{let d=l?t==="elementStroke"?g("labels.stroke"):t==="elementBackground"?g("labels.background"):null:null,[h]=wp.useState(()=>t==="canvasBackground"?[]:Pb(n,t,r)),[f,b]=ue(Yt),E=xn({color:e,palette:r});vp(()=>{if(!f){let v=!!e&&gp({color:e,palette:r}),I=v&&!h.includes(e);b(I?null:v?"custom":E?.shade!=null?"shades":"baseColors")}},[f,e,r,b,E,h]);let[w,y]=WC(E?.shade??(t==="elementBackground"?YC:VC));vp(()=>{E?.shade!=null&&y(E.shade);let v=I=>{I.key===XC.ALT&&s(!1)};return document.addEventListener(Ob.KEYUP,v,{capture:!0}),()=>{document.removeEventListener(Ob.KEYUP,v,{capture:!0})}},[E,s]);let x=wp.useRef(null);return UC(p,()=>x.current),vp(()=>{x?.current?.focus()},[]),yn("div",{role:"dialog","aria-modal":"true","aria-label":g("labels.colorPicker"),children:Ys("div",{ref:x,onKeyDown:v=>{Fb({event:v,activeColorPickerSection:f,palette:r,color:e,onChange:o,onEyeDropperToggle:s,customColors:h,setActiveColorPickerSection:b,updateData:i,activeShade:w,onEscape:c})&&(v.preventDefault(),v.stopPropagation())},className:"color-picker-content properties-content",tabIndex:-1,children:[d&&yn("div",{className:"color-picker__title",children:d}),!!h.length&&Ys("div",{children:[yn(ni,{children:g("colorPicker.mostUsedCustomColors")}),yn(Db,{colors:h,color:e,label:g("colorPicker.mostUsedCustomColors"),onChange:o})]}),Ys("div",{children:[yn(ni,{children:g("colorPicker.colors")}),yn(Rb,{color:e,palette:r,onChange:o,activeShade:w,showHotKey:m})]}),Ys("div",{children:[yn(ni,{children:g("colorPicker.shades")}),yn(Bb,{color:e,onChange:o,palette:r,showHotKey:m})]}),a]})})});import KC from"clsx";import{COLOR_OUTLINE_CONTRAST_THRESHOLD as ZC,DEFAULT_CANVAS_BACKGROUND_PICKS as $C,DEFAULT_ELEMENT_BACKGROUND_PICKS as jC,DEFAULT_ELEMENT_STROKE_PICKS as qC,isColorDark as JC}from"@excalidraw/common";import{jsx as Ip}from"react/jsx-runtime";var Hb=({onChange:e,type:o,activeColor:t,topPicks:n})=>{let r;return o==="elementStroke"&&(r=qC),o==="elementBackground"&&(r=jC),o==="canvasBackground"&&(r=$C),n&&(r=n),r?Ip("div",{className:"color-picker__top-picks",children:r.map(i=>Ip("button",{className:KC("color-picker__button",{active:i===t,"is-transparent":i==="transparent"||!i,"has-outline":!JC(i,ZC)}),style:{"--swatch-color":i},type:"button",title:i,onClick:()=>e(i),"data-testid":`color-top-pick-${i}`,children:Ip("div",{className:"color-picker__button-outline"})},i))}):(console.error("Invalid type for TopPicks"),null)};import{jsx as Vt,jsxs as Vs}from"react/jsx-runtime";var t4=({type:e,color:o,onChange:t,label:n,elements:r,palette:i=Vb,updateData:a,getOpenPopup:l,appState:s})=>{let{container:c}=ke(),m=je(),p=m!=="full",d=m==="mobile",[,h]=ue(Yt),[f,b]=ue(bn),E=Vs("div",{children:[Vt(ni,{children:g("colorPicker.hexCode")}),Vt(_b,{color:o||"",label:n,onChange:x=>{t(x)},colorPickerType:e,placeholder:g("colorPicker.color")})]}),w=Yb(null),y=()=>{w.current?.focus()};return Vt(Vo,{container:c,style:{maxWidth:"13rem"},preventAutoFocusOnTouch:!!s.editingTextElement,onFocusOutside:x=>{e4(x.target)||y(),x.preventDefault()},onPointerDownOutside:x=>{f&&x.preventDefault()},onClose:()=>{l()===e&&a({openPopup:null}),h(null),s.editingTextElement&&setTimeout(()=>{let x=document.querySelector(".excalidraw-wysiwyg");x&&x.focus()},0)},children:i?Vt(zb,{ref:w,palette:i,color:o,onChange:x=>{let v=s.editingTextElement?Us():null;t(x),s.editingTextElement&&v&&Ca(v)},onEyeDropperToggle:x=>{b(v=>x?(v=v||{keepOpenOnAlt:!0,onSelect:t,colorPickerType:e},v.keepOpenOnAlt=!0,v):x===!1||v?null:{keepOpenOnAlt:!1,onSelect:t,colorPickerType:e})},onEscape:x=>{f?b(null):a({openPopup:null})},type:e,elements:r,updateData:a,showTitle:p,showHotKey:!d,children:E}):E})},o4=({label:e,color:o,type:t,mode:n="background",onToggle:r,editingTextElement:i})=>{let a=je(),l=a!=="full",s=a==="mobile",c=m=>{m.preventDefault(),m.stopPropagation(),i&&Mb(),r()};return Vs(Xs.Trigger,{type:"button",className:Wb("color-picker__button active-color properties-trigger",{"is-transparent":!o||o==="transparent","has-outline":!o||!Ub(o,Gb),"compact-sizing":l,"mobile-border":s}),"aria-label":e,style:o?{"--swatch-color":o}:void 0,title:t==="elementStroke"?g("labels.showStroke"):g("labels.showBackground"),"data-openpopup":t,onClick:c,children:[Vt("div",{className:"color-picker__button-outline",children:!o&&K1}),l&&o&&n==="stroke"&&Vt("div",{className:"color-picker__button-background",children:Vt("span",{style:{color:o&&Ub(o,Gb)?"#fff":"#111"},children:db})})]})},Aa=({type:e,color:o,onChange:t,label:n,elements:r,palette:i=Vb,topPicks:a,updateData:l,appState:s})=>{let c=Yb(s.openPopup);QC(()=>{c.current=s.openPopup},[s.openPopup]);let p=je()!=="full";return Vt("div",{children:Vs("div",{role:"dialog","aria-modal":"true",className:Wb("color-picker-container",{"color-picker-container--no-top-picks":p}),children:[!p&&Vt(Hb,{activeColor:o,onChange:t,type:e,topPicks:a}),!p&&Vt(Os,{}),Vs(Xs.Root,{open:s.openPopup===e,onOpenChange:d=>{d&&l({openPopup:e})},children:[Vt(o4,{color:o,label:n,type:e,mode:e==="elementStroke"?"stroke":"background",editingTextElement:!!s.editingTextElement,onToggle:()=>{s.openPopup===e?l({openPopup:null}):s.openPopup?l({openPopup:e}):l({openPopup:e})}}),s.openPopup===e&&Vt(t4,{type:e,color:o,onChange:t,label:n,elements:r,palette:i,updateData:l,getOpenPopup:()=>c.current,appState:s})]})]})})};import*as eE from"@radix-ui/react-popover";import _4 from"clsx";import D4,{useCallback as R4,useMemo as N4}from"react";import{FONT_FAMILY as Mp}from"@excalidraw/common";import v4,{useMemo as wn,useState as I4,useRef as T4,useEffect as S4,useCallback as $b}from"react";import{arrayToList as C4,debounce as k4,FONT_FAMILY as er,getFontFamilyString as M4}from"@excalidraw/common";import n4 from"clsx";import r4 from"react";import{jsx as i4,jsxs as a4}from"react/jsx-runtime";var Ks=r4.forwardRef(({className:e,placeholder:o,onChange:t},n)=>a4("div",{className:n4("QuickSearch__wrapper",e),children:[_t,i4("input",{ref:n,className:"QuickSearch__input",type:"text",placeholder:o,onChange:r=>t(r.target.value.trim().toLowerCase())})]}));import l4 from"clsx";import{Children as s4}from"react";import{jsx as Xb}from"react/jsx-runtime";var Zs=({className:e,placeholder:o,children:t})=>{let n=!s4.count(t);return Xb("div",{className:l4("ScrollableList__wrapper",e),role:"menu",children:n?Xb("div",{className:"empty",children:o}):t})};import{jsx as c4,jsxs as d4}from"react/jsx-runtime";var Kb=({children:e,className:o="",style:t,title:n})=>d4("div",{className:`dropdown-menu-group ${o}`,style:t,children:[n&&c4("p",{className:"dropdown-menu-group-title",children:n}),e]}),_a=Kb;Kb.displayName="DropdownMenuGroup";import{useEffect as x4,useRef as y4}from"react";import{THEME as w4}from"@excalidraw/common";import{jsx as m4}from"react/jsx-runtime";var Da=({children:e,...o})=>m4("span",{...o,style:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",...o.style},children:e});import{Fragment as u4,jsx as Ra,jsxs as h4}from"react/jsx-runtime";var p4=({textStyle:e,icon:o,shortcut:t,children:n,badge:r})=>{let i=de();return h4(u4,{children:[o&&Ra("div",{className:"dropdown-menu-item__icon",children:o}),Ra("div",{style:e,className:"dropdown-menu-item__text",children:Ra(Da,{children:n})}),r&&Ra("div",{className:"dropdown-menu-item__badge",children:r}),t&&i.formFactor!=="phone"&&Ra("div",{className:"dropdown-menu-item__shortcut",children:t})]})},$s=p4;import g4,{useContext as f4}from"react";import{EVENT as b4,composeEventHandlers as E4}from"@excalidraw/common";var Tp=g4.createContext({}),js=(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(),qs=(e,o)=>{let t=f4(Tp);return E4(e,n=>{let r=new CustomEvent(b4.MENU_ITEM_SELECT,{bubbles:!0,cancelable:!0});o?.(r),r.defaultPrevented||t.onSelect?.(r)})};import{jsx as Sp}from"react/jsx-runtime";var Cp=({icon:e,value:o,order:t,children:n,shortcut:r,className:i,hovered:a,selected:l,textStyle:s,onSelect:c,onClick:m,badge:p,...d})=>{let h=qs(m,c),f=y4(null);return x4(()=>{a&&(t===0?f.current?.scrollIntoView({block:"end"}):f.current?.scrollIntoView({block:"nearest"}))},[a,t]),Sp("button",{...d,ref:f,value:o,onClick:h,className:js(i,l,a),title:d.title??d["aria-label"],children:Sp($s,{textStyle:s,icon:e,shortcut:r,badge:p,children:n})})};Cp.displayName="DropdownMenuItem";var ii={GREEN:"green",RED:"red",BLUE:"blue"},Js=({type:e=ii.BLUE,children:o})=>{let{theme:t}=vo(),n={display:"inline-flex",marginLeft:"auto",padding:"2px 4px",borderRadius:6,fontSize:9,fontFamily:"Cascadia, monospace",border:t===w4.LIGHT?"1.5px solid white":"none"};switch(e){case ii.GREEN:Object.assign(n,{backgroundColor:"var(--background-color-badge)",color:"var(--color-badge)"});break;case ii.RED:Object.assign(n,{backgroundColor:"pink",color:"darkred"});break;case ii.BLUE:default:Object.assign(n,{background:"var(--color-promo)",color:"var(--color-surface-lowest)"})}return Sp("div",{className:"DropDownMenuItemBadge",style:n,children:o})};Js.displayName="DropdownMenuItemBadge";Cp.Badge=Js;var vt=Cp;import{KEYS as ai}from"@excalidraw/common";var Zb=({event:e,inputRef:o,hoveredFont:t,filteredFonts:n,onClose:r,onSelect:i,onHover:a})=>{if(!e[ai.CTRL_OR_CMD]&&e.shiftKey&&e.key.toLowerCase()===ai.F)return o.current?.focus(),!0;if(e.key===ai.ESCAPE)return r(),!0;if(e.key===ai.ENTER)return t?.value&&i(t.value),!0;if(e.key===ai.ARROW_DOWN)return t?.next?a(t.next.value):n[0]?.value&&a(n[0].value),!0;if(e.key===ai.ARROW_UP)return t?.prev?a(t.prev.value):n[n.length-1]?.value&&a(n[n.length-1].value),!0};import{jsx as li,jsxs as L4}from"react/jsx-runtime";var P4=e=>{switch(e){case er.Excalifont:case er.Virgil:return pn;case er.Nunito:case er.Helvetica:return wa;case er["Lilita One"]:return A0;case er["Comic Shanns"]:case er.Cascadia:return Ss;default:return wa}},jb=v4.memo(({selectedFontFamily:e,hoveredFontFamily:o,onSelect:t,onHover:n,onLeave:r,onOpen:i,onClose:a})=>{let{container:l}=ke(),s=qe(),{fonts:c}=s,{showDeprecatedFonts:m}=Io(),p=je(),[d,h]=I4(""),f=T4(null),b=wn(()=>Array.from(cn.registered.entries()).filter(([L,{metadata:B}])=>!B.private&&!B.fallback).map(([L,{metadata:B,fontFaces:G}])=>{let j={value:L,icon:P4(L),text:G[0]?.fontFace?.family??"Unknown"};return B.deprecated&&Object.assign(j,{deprecated:B.deprecated,badge:{type:ii.RED,placeholder:g("fontList.badge.old")}}),j}).sort((L,B)=>L.text.toLowerCase()>B.text.toLowerCase()?1:-1),[]),E=wn(()=>new Set(c.getSceneFamilies()),[e]),w=wn(()=>b.filter(L=>E.has(L.value)),[b,E]),y=wn(()=>b.filter(L=>!E.has(L.value)&&(m||!L.deprecated)),[b,E,m]),x=wn(()=>C4([...w,...y].filter(L=>L.text?.toLowerCase().includes(d))),[w,y,d]),v=wn(()=>{let L;return o?L=x.find(B=>B.value===o):e&&(L=x.find(B=>B.value===e)),!L&&d&&(x[0]?.value?n(x[0].value):r()),L},[o,e,d,x,n,r]),I=$b(L=>{let B=null;if(s.state.editingTextElement){let G=document.querySelector(".excalidraw-wysiwyg");G&&(B={start:G.selectionStart,end:G.selectionEnd})}t(L),s.state.editingTextElement&&B&&setTimeout(()=>{let G=document.querySelector(".excalidraw-wysiwyg");G&&B&&(G.focus(),G.selectionStart=B.start,G.selectionEnd=B.end)},0)},[t,s.state.editingTextElement]),C=$b(L=>{Zb({event:L,inputRef:f,hoveredFont:v,filteredFonts:x,onSelect:I,onHover:n,onClose:a})&&(L.preventDefault(),L.stopPropagation())},[v,x,I,n,a]);S4(()=>(i(),()=>{a()}),[]);let P=wn(()=>x.filter(L=>E.has(L.value)),[x,E]),k=wn(()=>x.filter(L=>!E.has(L.value)),[x,E]),N=(L,B)=>li(vt,{icon:L.icon,value:L.value,order:B,textStyle:{fontFamily:M4({fontFamily:L.value})},hovered:L.value===v?.value,selected:L.value===e,tabIndex:L.value===e?0:-1,onClick:G=>{I(Number(G.currentTarget.value))},onMouseMove:()=>{v?.value!==L.value&&n(L.value)},badge:L.badge&&li(Js,{type:L.badge.type,children:L.badge.placeholder}),children:L.text},L.value),_=[];return P.length&&_.push(li(_a,{title:g("fontList.sceneFonts"),children:P.map(N)},"group_1")),k.length&&_.push(li(_a,{title:g("fontList.availableFonts"),children:k.map((L,B)=>N(L,B+P.length))},"group_2")),L4(Vo,{className:"properties-content",container:l,style:{width:"15rem"},onClose:()=>{a(),s.state.editingTextElement&&setTimeout(()=>{let L=document.querySelector(".excalidraw-wysiwyg");L&&L.focus()},0)},onPointerLeave:r,onKeyDown:C,preventAutoFocusOnTouch:!!s.state.editingTextElement,children:[p==="full"&&li(Ks,{ref:f,placeholder:g("quickSearch.placeholder"),onChange:k4(h,20)}),li(Zs,{className:"dropdown-menu fonts manual-hover",placeholder:g("fontList.empty"),children:_.length?_:null})]})},(e,o)=>e.selectedFontFamily===o.selectedFontFamily&&e.hoveredFontFamily===o.hoveredFontFamily);import*as qb from"@radix-ui/react-popover";import{MOBILE_ACTION_BUTTON_BG as A4}from"@excalidraw/common";import{jsx as kp}from"react/jsx-runtime";var Jb=({selectedFontFamily:e,isOpened:o=!1,compactMode:t=!1})=>{let n=he(),r=t?{...A4,width:"2rem",height:"2rem"}:{};return kp(qb.Trigger,{asChild:!0,children:kp("div",{"data-openpopup":"fontFamily",className:"properties-trigger",children:kp(Qr,{standalone:!0,icon:un,title:g("labels.showFonts"),className:"properties-trigger",testId:"font-family-show-fonts",active:o,onClick:()=>{n(i=>({openPopup:i.openPopup==="fontFamily"?null:i.openPopup}))},style:{border:"none",...r}})})})};import{jsx as Na,jsxs as Qb}from"react/jsx-runtime";var tE=[{value:Mp.Excalifont,icon:pn,text:g("labels.handDrawn"),testId:"font-family-hand-drawn"},{value:Mp.Nunito,icon:wa,text:g("labels.normal"),testId:"font-family-normal"},{value:Mp["Comic Shanns"],icon:Ss,text:g("labels.code"),testId:"font-family-code"}],HZ=new Set(tE.map(e=>e.value));var oE=D4.memo(({isOpened:e,selectedFontFamily:o,hoveredFontFamily:t,onSelect:n,onHover:r,onLeave:i,onPopupChange:a,compactMode:l=!1})=>{let s=N4(()=>tE,[]),c=R4(m=>{m&&n(m)},[n]);return Qb("div",{role:"dialog","aria-modal":"true",className:_4("FontPicker__container",{"FontPicker__container--compact":l}),children:[!l&&Na("div",{className:"buttonList",children:Na(Wt,{type:"button",options:s,value:o,onClick:c})}),!l&&Na(Os,{}),Qb(eE.Root,{open:e,onOpenChange:a,children:[Na(Jb,{selectedFontFamily:o,isOpened:e,compactMode:l}),e&&Na(jb,{selectedFontFamily:o,hoveredFontFamily:t,onSelect:c,onHover:r,onLeave:i,onOpen:()=>a(!0),onClose:()=>a(!1)})]})]})},(e,o)=>e.isOpened===o.isOpened&&e.selectedFontFamily===o.selectedFontFamily&&e.hoveredFontFamily===o.hoveredFontFamily);import*as ci from"@radix-ui/react-popover";import z4 from"clsx";import Qs,{useEffect as H4}from"react";import{isArrowKey as G4,KEYS as Xo}from"@excalidraw/common";import{jsx as B4}from"react/jsx-runtime";var si=({className:e,icon:o,size:t="1em"})=>B4("span",{className:e,style:{width:t,height:"100%",margin:"0 0.5ex 0 0.5ex",display:"inline-flex",lineHeight:0,verticalAlign:"middle",flex:"0 0 auto"},children:o});import{Fragment as O4,jsx as nE,jsxs as rE}from"react/jsx-runtime";var F4=({label:e,open:o,openTrigger:t,children:n,className:r,showCollapsedIcon:i=!0})=>rE(O4,{children:[rE("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center"},className:r,onClick:t,children:[e,i&&nE(si,{icon:o?lb:Ps})]}),o&&nE("div",{style:{display:"flex",flexDirection:"column"},children:n})]}),Ba=F4;import{jsx as tr,jsxs as Pp}from"react/jsx-runtime";var U4=Se(!1);function W4({options:e,value:o,label:t,onChange:n,onClose:r,numberOfOptionsToAlwaysShow:i=e.length}){let a=de(),{container:l}=ke(),s=b=>{let E=e.find(w=>w.keyBinding===b.key.toLowerCase());if(!(b.metaKey||b.altKey||b.ctrlKey)&&E)n(E.value),b.preventDefault();else if(b.key===Xo.TAB){let w=e.findIndex(x=>x.value===o),y=b.shiftKey?(e.length+w-1)%e.length:(w+1)%e.length;n(e[y].value)}else if(G4(b.key)){let w=Uo().rtl,y=e.findIndex(x=>x.value===o);if(y!==-1){let x=e.length,v=y;switch(b.key){case(w?Xo.ARROW_LEFT:Xo.ARROW_RIGHT):v=(y+1)%x;break;case(w?Xo.ARROW_RIGHT:Xo.ARROW_LEFT):v=(x+y-1)%x;break;case Xo.ARROW_DOWN:{v=(y+(i??1))%x;break}case Xo.ARROW_UP:{v=(x+y-(i??1))%x;break}}n(e[v].value)}b.preventDefault()}else(b.key===Xo.ESCAPE||b.key===Xo.ENTER)&&(b.preventDefault(),r());b.nativeEvent.stopImmediatePropagation(),b.stopPropagation()},[c,m]=ue(U4),p=Qs.useMemo(()=>e.slice(0,i),[e,i]),d=Qs.useMemo(()=>e.slice(i),[e,i]);H4(()=>{p.some(b=>b.value===o)||m(!0)},[o,p,m]);let h=b=>tr("div",{className:"picker-content",children:b.map((E,w)=>Pp("button",{type:"button",className:z4("picker-option",{active:o===E.value}),onClick:y=>{n(E.value)},title:`${E.text} ${E.keyBinding&&`\u2014 ${E.keyBinding.toUpperCase()}`}`,"aria-label":E.text||"none","aria-keyshortcuts":E.keyBinding||void 0,ref:y=>{o===E.value&&setTimeout(()=>{y?.focus()},0)},children:[E.icon,E.keyBinding&&tr("span",{className:"picker-keybinding",children:E.keyBinding})]},E.text))}),f=a.formFactor==="phone";return tr(ci.Content,{side:f?"right":"bottom",align:"start",sideOffset:f?8:12,style:{zIndex:"var(--zIndex-ui-styles-popup)"},onKeyDown:s,collisionBoundary:l??void 0,children:Pp("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":t,children:[h(p),d.length>0&&tr(Ba,{label:g("labels.more_options"),open:c,openTrigger:()=>{m(b=>!b)},className:"picker-collapsible",children:h(d)})]})})}function Lp({value:e,label:o,options:t,onChange:n,group:r="",numberOfOptionsToAlwaysShow:i}){let[a,l]=Qs.useState(!1),s=Qs.useRef(null);return tr("div",{children:Pp(ci.Root,{open:a,onOpenChange:c=>l(c),children:[tr(ci.Trigger,{name:r,type:"button","aria-label":o,onClick:()=>l(!a),ref:s,className:a?"active":"",children:t.find(c=>c.value===e)?.icon}),a&&tr(W4,{options:t,value:e,label:o,onChange:n,onClose:()=>{l(!1)},numberOfOptionsToAlwaysShow:i})]})})}import iE,{useEffect as Y4}from"react";import{jsx as Ap,jsxs as aE}from"react/jsx-runtime";var lE=({updateData:e,app:o,testId:t})=>{let n=iE.useRef(null),r=iE.useRef(null),i=o.scene.getSelectedElements(o.state),a=!0,l=i.at(0),c=i.reduce((m,p)=>(m!=null&&m!==p.opacity&&(a=!1),m==null||m>p.opacity?p.opacity:m),l?.opacity??null)??o.state.currentItemOpacity;return Y4(()=>{if(n.current&&r.current){let m=n.current,p=r.current,d=m.offsetWidth,h=15,f=c/100*(d-h)+h/2;p.style.left=`${f}px`,m.style.background=`linear-gradient(to right, var(--color-slider-track) 0%, var(--color-slider-track) ${c}%, var(--button-bg) ${c}%, var(--button-bg) 100%)`}},[c]),aE("label",{className:"control-label",children:[g("labels.opacity"),aE("div",{className:"range-wrapper",children:[Ap("input",{style:{"--color-slider-track":a?void 0:"var(--button-bg)"},ref:n,type:"range",min:"0",max:"100",step:"10",onChange:m=>{e(+m.target.value)},value:c,className:"range-input","data-testid":t}),Ap("div",{className:"value-bubble",ref:r,children:c!==0?c:null}),Ap("div",{className:"zero-label",children:"0"})]})]})};import{Fragment as Gp,jsx as ne,jsxs as ht}from"react/jsx-runtime";var hE=.1,mi=e=>{let o=u6(e.editorInterface);return{stylesPanelMode:o,isCompact:o!=="full",isMobile:o==="mobile"}},ut=(e,o,t,n=!1)=>{let r=Bp(q(e,o,{includeBoundTextElement:n}));return e.map(i=>r.get(i.id)||i.id===o.editingTextElement?.id?t(i):i)},st=function(e,o,t,n,r){let i=o.state.editingTextElement,a=pE(e),l=null;if(i&&(l=t(i)),!l)if(ve(a,o.state)){let c=o.scene.getSelectedElements(o.state),m=n===!0?c:c.filter(p=>n(p));l=i6(m,t)??(typeof r=="function"?r(!0):r)}else l=typeof r=="function"?r(!1):r;return l},h6=(e,o,t)=>s6(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}),Op=(e,o,t,n,r)=>{let i=new Set,a=ut(e,o,l=>{if(It(l)){let s=n(l);i.add(s);let c=Xe(l,{fontSize:s});return Fa(c,t.scene.getContainerElement(l),t.scene),c=h6(l,c,t.scene),c}return l},!0);return q(e,o,{includeBoundTextElement:!0}).forEach(l=>{It(l)&&l6(l,t.scene)}),{elements:a,appState:{...o,currentItemFontSize:i.size===1?[...i][0]:r??o.currentItemFontSize},captureUpdate:Ke.IMMEDIATELY}},g6=F({name:"changeStrokeColor",label:"labels.stroke",trackEvent:!1,perform:(e,o,t)=>({...t?.currentItemStrokeColor&&{elements:ut(e,o,n=>d6(n.type)?Xe(n,{strokeColor:t.currentItemStrokeColor}):n,!0)},appState:{...o,...t},captureUpdate:t?.currentItemStrokeColor?Ke.IMMEDIATELY:Ke.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t,app:n,data:r})=>{let{stylesPanelMode:i}=mi(n);return ht(Gp,{children:[i==="full"&&ne("h3",{"aria-hidden":"true",children:g("labels.stroke")}),ne(Aa,{topPicks:q4,palette:j4,type:"elementStroke",label:g("labels.stroke"),color:st(e,n,a=>a.strokeColor,!0,a=>a?null:o.currentItemStrokeColor),onChange:a=>t({currentItemStrokeColor:a}),elements:e,appState:o,updateData:t})]})}}),f6=F({name:"changeBackgroundColor",label:"labels.changeBackground",trackEvent:!1,perform:(e,o,t,n)=>{if(!t?.currentItemBackgroundColor)return{appState:{...o,...t},captureUpdate:Ke.EVENTUALLY};let r,i=n.scene.getSelectedElements(o);if(!r6(t.currentItemBackgroundColor)&&i.every(l=>dE(l)&&a6(l.points))){let l=Bp(i);r=e.map(s=>l.has(s.id)&&dE(s)?Xe(s,{backgroundColor:t.currentItemBackgroundColor,...p6(s,!0)}):s)}else r=ut(e,o,l=>Xe(l,{backgroundColor:t.currentItemBackgroundColor}));return{elements:r,appState:{...o,...t},captureUpdate:Ke.IMMEDIATELY}},PanelComponent:({elements:e,appState:o,updateData:t,app:n,data:r})=>{let{stylesPanelMode:i}=mi(n);return ht(Gp,{children:[i==="full"&&ne("h3",{"aria-hidden":"true",children:g("labels.background")}),ne(Aa,{topPicks:$4,palette:Z4,type:"elementBackground",label:g("labels.background"),color:st(e,n,a=>a.backgroundColor,!0,a=>a?null:o.currentItemBackgroundColor),onChange:a=>t({currentItemBackgroundColor:a}),elements:e,appState:o,updateData:t})]})}}),b6=F({name:"changeFillStyle",label:"labels.fill",trackEvent:!1,perform:(e,o,t,n)=>(le("element","changeFillStyle",`${t} (${n.editorInterface.formFactor==="phone"?"mobile":"desktop"})`),{elements:ut(e,o,r=>Xe(r,{fillStyle:t})),appState:{...o,currentItemFillStyle:t},captureUpdate:Ke.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:n})=>{let r=q(e,o),i=r.length>0&&r.every(a=>a.fillStyle==="zigzag");return ht("fieldset",{children:[ne("legend",{children:g("labels.fill")}),ne("div",{className:"buttonList",children:ne(Wt,{type:"button",options:[{value:"hachure",text:`${i?g("labels.zigzag"):g("labels.hachure")} (${A("Alt-Click")})`,icon:i?o0:n0,active:i?!0:void 0,testId:"fill-hachure"},{value:"cross-hatch",text:g("labels.crossHatch"),icon:r0,testId:"fill-cross-hatch"},{value:"solid",text:g("labels.solid"),icon:i0,testId:"fill-solid"}],value:st(e,n,a=>a.fillStyle,a=>a.hasOwnProperty("fillStyle"),a=>a?null:o.currentItemFillStyle),onClick:(a,l)=>{let s=l.altKey&&a==="hachure"&&r.every(c=>c.fillStyle==="hachure")?"zigzag":a;t(s)}})})]})}}),E6=F({name:"changeStrokeWidth",label:"labels.strokeWidth",trackEvent:!1,perform:(e,o,t)=>({elements:ut(e,o,n=>Xe(n,{strokeWidth:t})),appState:{...o,currentItemStrokeWidth:t},captureUpdate:Ke.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:n,data:r})=>ht("fieldset",{children:[ne("legend",{children:g("labels.strokeWidth")}),ne("div",{className:"buttonList",children:ne(Wt,{group:"stroke-width",options:[{value:Rp.thin,text:g("labels.thin"),icon:Km,testId:"strokeWidth-thin"},{value:Rp.bold,text:g("labels.bold"),icon:a0,testId:"strokeWidth-bold"},{value:Rp.extraBold,text:g("labels.extraBold"),icon:l0,testId:"strokeWidth-extraBold"}],value:st(e,n,i=>i.strokeWidth,i=>i.hasOwnProperty("strokeWidth"),i=>i?null:o.currentItemStrokeWidth),onChange:i=>t(i)})})]})}),x6=F({name:"changeSloppiness",label:"labels.sloppiness",trackEvent:!1,perform:(e,o,t)=>({elements:ut(e,o,n=>Xe(n,{seed:t6(),roughness:t})),appState:{...o,currentItemRoughness:t},captureUpdate:Ke.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:n,data:r})=>ht("fieldset",{children:[ne("legend",{children:g("labels.sloppiness")}),ne("div",{className:"buttonList",children:ne(Wt,{group:"sloppiness",options:[{value:0,text:g("labels.architect"),icon:d0},{value:1,text:g("labels.artist"),icon:m0},{value:2,text:g("labels.cartoonist"),icon:p0}],value:st(e,n,i=>i.roughness,i=>i.hasOwnProperty("roughness"),i=>i?null:o.currentItemRoughness),onChange:i=>t(i)})})]})}),Y$=F({name:"changeStrokeStyle",label:"labels.strokeStyle",trackEvent:!1,perform:(e,o,t)=>({elements:ut(e,o,n=>Xe(n,{strokeStyle:t})),appState:{...o,currentItemStrokeStyle:t},captureUpdate:Ke.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:n,data:r})=>ht("fieldset",{children:[ne("legend",{children:g("labels.strokeStyle")}),ne("div",{className:"buttonList",children:ne(Wt,{group:"strokeStyle",options:[{value:"solid",text:g("labels.strokeStyle_solid"),icon:Km},{value:"dashed",text:g("labels.strokeStyle_dashed"),icon:s0},{value:"dotted",text:g("labels.strokeStyle_dotted"),icon:c0}],value:st(e,n,i=>i.strokeStyle,i=>i.hasOwnProperty("strokeStyle"),i=>i?null:o.currentItemStrokeStyle),onChange:i=>t(i)})})]})}),y6=F({name:"changeOpacity",label:"labels.opacity",trackEvent:!1,perform:(e,o,t)=>({elements:ut(e,o,n=>Xe(n,{opacity:t}),!0),appState:{...o,currentItemOpacity:t},captureUpdate:Ke.IMMEDIATELY}),PanelComponent:({app:e,updateData:o})=>ne(lE,{updateData:o,app:e,testId:"opacity"})}),w6=F({name:"changeFontSize",label:"labels.fontSize",trackEvent:!1,perform:(e,o,t,n)=>Op(e,o,n,()=>(Fp(t,"actionChangeFontSize: Expected a font size value"),t),t),PanelComponent:({elements:e,appState:o,updateData:t,app:n,data:r})=>{let{isCompact:i}=mi(n);return ht("fieldset",{children:[ne("legend",{children:g("labels.fontSize")}),ne("div",{className:"buttonList",children:ne(Wt,{group:"font-size",options:[{value:tc.sm,text:g("labels.small"),icon:k0,testId:"fontSize-small"},{value:tc.md,text:g("labels.medium"),icon:M0,testId:"fontSize-medium"},{value:tc.lg,text:g("labels.large"),icon:P0,testId:"fontSize-large"},{value:tc.xl,text:g("labels.veryLarge"),icon:L0,testId:"fontSize-veryLarge"}],value:st(e,n,a=>{if(It(a))return a.fontSize;let l=vn(a,n.scene.getNonDeletedElementsMap());return l?l.fontSize:null},a=>It(a)||vn(a,n.scene.getNonDeletedElementsMap())!==null,a=>a?null:o.currentItemFontSize||Q4),onChange:a=>{ka(()=>t(a),i,!!o.editingTextElement,r?.onPreventClose)}})})]})}}),zp=F({name:"decreaseFontSize",label:"labels.decreaseFontSize",icon:Jn,trackEvent:!1,perform:(e,o,t,n)=>Op(e,o,n,r=>Math.round(1/(1+hE)*r.fontSize)),keyTest:e=>e[di.CTRL_OR_CMD]&&e.shiftKey&&(e.key===di.CHEVRON_LEFT||e.key===di.COMMA)}),Hp=F({name:"increaseFontSize",label:"labels.increaseFontSize",icon:Jn,trackEvent:!1,perform:(e,o,t,n)=>Op(e,o,n,r=>Math.round(r.fontSize*(1+hE))),keyTest:e=>e[di.CTRL_OR_CMD]&&e.shiftKey&&(e.key===di.CHEVRON_RIGHT||e.key===di.PERIOD)}),v6=F({name:"changeFontFamily",label:"labels.fontFamily",trackEvent:!1,perform:(e,o,t,n)=>{let{cachedElements:r,resetAll:i,resetContainers:a,...l}=t;if(i)return{elements:ut(e,o,b=>{let E=r?.get(b.id);return E?Xe(b,{...E}):b},!0),appState:{...o,...l},captureUpdate:Ke.NEVER};Fp(t,"actionChangeFontFamily: value must be defined");let{currentItemFontFamily:s,currentHoveredFontFamily:c}=t,m=Ke.EVENTUALLY,p,d=!1;if(s)p=s,m=Ke.IMMEDIATELY;else if(c){p=c,m=Ke.EVENTUALLY;let f=q(e,o,{includeBoundTextElement:!0}).filter(b=>It(b));if(f.length>200)d=!0;else{let b=0,E=0;for(;b<f.length&&E<5e3;){let w=f[b];E+=w?.originalText.length||0,b++}E>5e3&&(d=!0)}}let h={appState:{...o,...l},captureUpdate:m};if(p&&!d){let f=new Map,b=new Set,E=!1,w=Array.from(cn.loadedFontsCache.values()),y=Object.entries(e6).find(([I,C])=>C===p)?.[0];c&&y&&w.some(I=>I.startsWith(y))&&(E=!0),Object.assign(h,{elements:ut(e,o,I=>{if(It(I)&&(I.fontFamily!==p||s)){let C=Xe(I,{fontFamily:p,lineHeight:n6(p)}),P=r?.get(I.containerId||"")||{},k=n.scene.getContainerElement(I);return a&&k&&P&&n.scene.mutateElement(k,{...P}),E||(b=new Set([...b,...Array.from(C.originalText)])),f.set(C,k),C}return I},!0)});let x=`10px ${o6({fontFamily:p})}`,v=Array.from(b.values()).join();if(E||window.document.fonts.check(x,v))for(let[I,C]of f)Fa(I,C,n.scene);else window.document.fonts.load(x,v).then(I=>{for(let[C,P]of f){let k=n.scene.getElement(C.id),N=P?n.scene.getElement(P.id):null;k&&Fa(k,N,n.scene)}n.fonts.onLoaded(I)})}return h},PanelComponent:({elements:e,appState:o,app:t,updateData:n})=>{let r=Dp(new Map),i=Dp(null),[a,l]=K4({}),s=Dp(!0),{stylesPanelMode:c,isCompact:m}=mi(t),p=X4(()=>{let d=(h,f)=>st(h,t,b=>{if(It(b))return b.fontFamily;let E=vn(b,f);return E?E.fontFamily:null},b=>It(b)||vn(b,f)!==null,b=>b?null:o.currentItemFontFamily||J4);return a.openPopup==="fontFamily"&&o.openPopup==="fontFamily"?d(Array.from(r.current?.values()??[]),r.current):!a.openPopup&&o.openPopup!=="fontFamily"?d(e,t.scene.getNonDeletedElementsMap()):i.current},[a.openPopup,o,e,t]);return _p(()=>{i.current=p},[p]),_p(()=>{Object.keys(a).length&&(n(a),l({}))},[a]),_p(()=>(s.current=!1,()=>{s.current=!0}),[]),ht(Gp,{children:[c==="full"&&ne("legend",{children:g("labels.fontFamily")}),ne(oE,{isOpened:o.openPopup==="fontFamily",selectedFontFamily:p,hoveredFontFamily:o.currentHoveredFontFamily,compactMode:c!=="full",onSelect:d=>{ka(()=>{l({openPopup:null,currentHoveredFontFamily:null,currentItemFontFamily:d}),r.current.clear()},m,!!o.editingTextElement)},onHover:d=>{l({currentHoveredFontFamily:d,cachedElements:new Map(r.current),resetContainers:!0})},onLeave:()=>{l({currentHoveredFontFamily:null,cachedElements:new Map(r.current),resetAll:!0})},onPopupChange:d=>{if(d){r.current.clear();let{editingTextElement:h}=o;if(h?.type==="text"){let f=t.scene.getElement(h.id);r.current.set(h.id,Xe(f||h,{},!0))}else{let f=q(e,o,{includeBoundTextElement:!0});for(let b of f)r.current.set(b.id,Xe(b,{},!0))}l({...a,openPopup:"fontFamily"})}else{let h={currentHoveredFontFamily:null,cachedElements:new Map(r.current),resetAll:!0};l({...h}),r.current.clear(),m&&o.editingTextElement&&Ca(null)}}})]})}}),I6=F({name:"changeTextAlign",label:"Change text alignment",trackEvent:!1,perform:(e,o,t,n)=>({elements:ut(e,o,r=>{if(It(r)){let i=Xe(r,{textAlign:t});return Fa(i,n.scene.getContainerElement(r),n.scene),i}return r},!0),appState:{...o,currentItemTextAlign:t},captureUpdate:Ke.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:n,data:r})=>{let i=n.scene.getNonDeletedElementsMap(),{isCompact:a}=mi(n);return ht("fieldset",{children:[ne("legend",{children:g("labels.textAlign")}),ne("div",{className:"buttonList",children:ne(Wt,{group:"text-align",options:[{value:"left",text:g("labels.left"),icon:_0,testId:"align-left"},{value:"center",text:g("labels.center"),icon:D0,testId:"align-horizontal-center"},{value:"right",text:g("labels.right"),icon:R0,testId:"align-right"}],value:st(e,n,l=>{if(It(l))return l.textAlign;let s=vn(l,i);return s?s.textAlign:null},l=>It(l)||vn(l,i)!==null,l=>l?null:o.currentItemTextAlign),onChange:l=>{ka(()=>t(l),a,!!o.editingTextElement,r?.onPreventClose)}})})]})}}),T6=F({name:"changeVerticalAlign",label:"Change vertical alignment",trackEvent:{category:"element"},perform:(e,o,t,n)=>({elements:ut(e,o,r=>{if(It(r)){let i=Xe(r,{verticalAlign:t});return Fa(i,n.scene.getContainerElement(r),n.scene),i}return r},!0),appState:{...o},captureUpdate:Ke.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:n,data:r})=>{let{isCompact:i}=mi(n);return ne("fieldset",{children:ne("div",{className:"buttonList",children:ne(Wt,{group:"text-align",options:[{value:ec.TOP,text:g("labels.alignTop"),icon:ne(N0,{theme:o.theme}),testId:"align-top"},{value:ec.MIDDLE,text:g("labels.centerVertically"),icon:ne(F0,{theme:o.theme}),testId:"align-middle"},{value:ec.BOTTOM,text:g("labels.alignBottom"),icon:ne(B0,{theme:o.theme}),testId:"align-bottom"}],value:st(e,n,a=>{if(It(a)&&a.containerId)return a.verticalAlign;let l=vn(a,n.scene.getNonDeletedElementsMap());return l?l.verticalAlign:null},a=>It(a)||vn(a,n.scene.getNonDeletedElementsMap())!==null,a=>a?null:ec.MIDDLE),onChange:a=>{ka(()=>t(a),i,!!o.editingTextElement,r?.onPreventClose)}})})})}}),V$=F({name:"changeRoundness",label:"Change edge roundness",trackEvent:!1,perform:(e,o,t)=>({elements:ut(e,o,n=>uE(n)?n:Xe(n,{roundness:t==="round"?{type:c6(n.type)?oc.ADAPTIVE_RADIUS:oc.PROPORTIONAL_RADIUS}:null})),appState:{...o,currentItemRoundness:t},captureUpdate:Ke.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:n,renderAction:r})=>{let a=Dr(pE(e),o).some(l=>l.roundness?.type===oc.LEGACY);return ht("fieldset",{children:[ne("legend",{children:g("labels.edges")}),ht("div",{className:"buttonList",children:[ne(Wt,{group:"edges",options:[{value:"sharp",text:g("labels.sharp"),icon:u0},{value:"round",text:g("labels.round"),icon:h0}],value:st(e,n,l=>a?null:l.roundness?"round":"sharp",l=>!nc(l)&&l.hasOwnProperty("roundness"),l=>l?null:o.currentItemRoundness),onChange:l=>t(l)}),r("togglePolygon")]})]})}}),mE=e=>[{value:null,text:g("labels.arrowhead_none"),keyBinding:"q",icon:g0},{value:"arrow",text:g("labels.arrowhead_arrow"),keyBinding:"w",icon:ne(f0,{flip:e})},{value:"triangle",text:g("labels.arrowhead_triangle"),icon:ne(y0,{flip:e}),keyBinding:"e"},{value:"triangle_outline",text:g("labels.arrowhead_triangle_outline"),icon:ne(w0,{flip:e}),keyBinding:"r"},{value:"circle",text:g("labels.arrowhead_circle"),keyBinding:"a",icon:ne(b0,{flip:e})},{value:"circle_outline",text:g("labels.arrowhead_circle_outline"),keyBinding:"s",icon:ne(E0,{flip:e})},{value:"diamond",text:g("labels.arrowhead_diamond"),icon:ne(v0,{flip:e}),keyBinding:"d"},{value:"diamond_outline",text:g("labels.arrowhead_diamond_outline"),icon:ne(I0,{flip:e}),keyBinding:"f"},{value:"bar",text:g("labels.arrowhead_bar"),keyBinding:"z",icon:ne(x0,{flip:e})},{value:"crowfoot_one",text:g("labels.arrowhead_crowfoot_one"),icon:ne(S0,{flip:e}),keyBinding:"x"},{value:"crowfoot_many",text:g("labels.arrowhead_crowfoot_many"),icon:ne(T0,{flip:e}),keyBinding:"c"},{value:"crowfoot_one_or_many",text:g("labels.arrowhead_crowfoot_one_or_many"),icon:ne(C0,{flip:e}),keyBinding:"v"}],X$=F({name:"changeArrowhead",label:"Change arrowheads",trackEvent:!1,perform:(e,o,t)=>(Fp(t,"actionChangeArrowhead: value must be defined"),{elements:ut(e,o,n=>{if(Np(n)){let{position:r,type:i}=t;if(r==="start")return Xe(n,{startArrowhead:i});if(r==="end")return Xe(n,{endArrowhead:i})}return n}),appState:{...o,[t.position==="start"?"currentItemStartArrowhead":"currentItemEndArrowhead"]:t.type},captureUpdate:Ke.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:n})=>{let r=Uo().rtl;return ht("fieldset",{children:[ne("legend",{children:g("labels.arrowheads")}),ht("div",{className:"iconSelectList buttonList",children:[ne(Lp,{label:"arrowhead_start",options:mE(!r),value:st(e,n,i=>Np(i)&&Rr(i.type)?i.startArrowhead:o.currentItemStartArrowhead,!0,o.currentItemStartArrowhead),onChange:i=>t({position:"start",type:i}),numberOfOptionsToAlwaysShow:4}),ne(Lp,{label:"arrowhead_end",group:"arrowheads",options:mE(!!r),value:st(e,n,i=>Np(i)&&Rr(i.type)?i.endArrowhead:o.currentItemEndArrowhead,!0,o.currentItemEndArrowhead),onChange:i=>t({position:"end",type:i}),numberOfOptionsToAlwaysShow:4})]})]})}}),S6=F({name:"changeArrowProperties",label:"Change arrow properties",trackEvent:!1,perform:(e,o,t,n)=>!1,PanelComponent:({elements:e,appState:o,updateData:t,app:n,renderAction:r})=>ht("div",{className:"selected-shape-actions",children:[r("changeArrowhead"),r("changeArrowType")]})}),K$=F({name:"changeArrowType",label:"Change arrow types",trackEvent:!1,perform:(e,o,t,n)=>{let r=ut(e,o,l=>{if(!nc(l))return l;let s=n.scene.getNonDeletedElementsMap(),c=or.getPointAtIndexGlobalCoordinates(l,0,s),m=or.getPointAtIndexGlobalCoordinates(l,-1,s),p=Xe(l,{x:t===Xt.elbow?c[0]:l.x,y:t===Xt.elbow?c[1]:l.y,roundness:t===Xt.round?{type:oc.PROPORTIONAL_RADIUS}:null,elbowed:t===Xt.elbow,angle:t===Xt.elbow?0:l.angle,points:t===Xt.elbow||l.elbowed?[or.pointFromAbsoluteCoords({...l,x:c[0],y:c[1],angle:0},c,s),or.pointFromAbsoluteCoords({...l,x:c[0],y:c[1],angle:0},m,s)]:l.points});if(uE(p)){p.fixedSegments=null;let d=n.scene.getNonDeletedElementsMap();n.dismissLinearEditor();let h=or.getPointAtIndexGlobalCoordinates(p,0,d),f=or.getPointAtIndexGlobalCoordinates(p,-1,d),b=p.startBinding&&d.get(p.startBinding.elementId),E=p.endBinding&&d.get(p.endBinding.elementId),w=b&&p.startBinding?{...p.startBinding,...cE(p,b,"start",d)}:null,y=E&&p.endBinding?{...p.endBinding,...cE(p,E,"end",d)}:null;p={...p,startBinding:w,endBinding:y,...m6(p,d,{points:[h,f].map(x=>V4(x[0]-p.x,x[1]-p.y)),startBinding:w,endBinding:y,fixedSegments:null})}}else{let d=n.scene.getNonDeletedElementsMap();if(p.startBinding){let h=d.get(p.startBinding.elementId);h&&sE(p,h,o.bindMode==="inside"?"inside":"orbit","start",n.scene)}if(p.endBinding){let h=d.get(p.endBinding.elementId);h&&sE(p,h,o.bindMode==="inside"?"inside":"orbit","end",n.scene)}}return p}),i={...o,currentItemArrowType:t},a=o.selectedLinearElement?.elementId;if(a){let l=r.find(s=>s.id===a);l&&(i.selectedLinearElement=new or(l,Bp(e)))}return{elements:r,appState:i,captureUpdate:Ke.IMMEDIATELY}},PanelComponent:({elements:e,appState:o,updateData:t,app:n})=>ht("fieldset",{children:[ne("legend",{children:g("labels.arrowtypes")}),ne("div",{className:"buttonList",children:ne(Wt,{group:"arrowtypes",options:[{value:Xt.sharp,text:g("labels.arrowtype_sharp"),icon:Zr,testId:"sharp-arrow"},{value:Xt.round,text:g("labels.arrowtype_round"),icon:jr,testId:"round-arrow"},{value:Xt.elbow,text:g("labels.arrowtype_elbowed"),icon:$r,testId:"elbow-arrow"}],value:st(e,n,r=>nc(r)?r.elbowed?Xt.elbow:r.roundness?Xt.round:Xt.sharp:null,r=>nc(r),r=>r?null:o.currentItemArrowType),onChange:r=>t(r)})})]})});import{clamp as Xp,roundToStep as _6}from"@excalidraw/math";import{DEFAULT_CANVAS_BACKGROUND_PICKS as D6,CURSOR_TYPE as xE,MAX_ZOOM as yE,MIN_ZOOM as wE,THEME as Oa,ZOOM_STEP as Kp,updateActiveTool as ui,CODES as So,KEYS as Zo}from"@excalidraw/common";import{getNonDeletedElements as R6}from"@excalidraw/element";import{getCommonBounds as N6}from"@excalidraw/element";import{CaptureUpdateAction as Co}from"@excalidraw/element";import{useEffect as C6}from"react";import{jsx as M6}from"react/jsx-runtime";var pi=()=>{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},Up=(e,o,t="bottom")=>{let n=e.getBoundingClientRect(),r=window.innerWidth,i=window.innerHeight,a=5,l=o.left+o.width/2-n.width/2;l<0?l=a:l+n.width>=r&&(l=r-n.width-a);let s;t==="bottom"?(s=o.top+o.height+a,s+n.height>=i&&(s=o.top-n.height-a)):(s=o.top-n.height-a,s<0&&(s=o.top+o.height+a)),Object.assign(e.style,{top:`${s}px`,left:`${l}px`})},k6=(e,o,t,n)=>{o.classList.add("excalidraw-tooltip--visible"),o.style.minWidth=n?"50ch":"10ch",o.style.maxWidth=n?"50ch":"15ch",o.textContent=t;let r=e.getBoundingClientRect();Up(o,r)},ct=({children:e,label:o,long:t=!1,style:n,disabled:r})=>(C6(()=>()=>pi().classList.remove("excalidraw-tooltip--visible"),[]),r?null:M6("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:i=>k6(i.currentTarget,pi(),o,t),onPointerLeave:()=>pi().classList.remove("excalidraw-tooltip--visible"),style:n,children:e}));import{CURSOR_TYPE as Wp,MIME_TYPES as Yp,THEME as fE}from"@excalidraw/common";var bE='<svg viewBox="0 0 24 24" stroke-width="1" width="28" height="28" xmlns="http://www.w3.org/2000/svg">',P6='<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"/>',EE='<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"/>',L6=`data:${Yp.svg},${encodeURIComponent(`${bE}${EE}</svg>`)}`,A6=`data:${Yp.svg},${encodeURIComponent(`${bE}${P6}${EE}</svg>`)}`,Rt=e=>{e&&(e.style.cursor="")},xe=(e,o)=>{e&&(e.style.cursor=o)},To,gE,Vp=(e,o)=>{let n=()=>{let r=o===fE.DARK;To=document.createElement("canvas"),To.theme=o,To.height=20,To.width=20;let i=To.getContext("2d");i.lineWidth=1,i.beginPath(),i.arc(To.width/2,To.height/2,5,0,2*Math.PI),i.fillStyle=r?"#000":"#fff",i.fill(),i.strokeStyle=r?"#fff":"#000",i.stroke(),gE=To.toDataURL(Yp.svg)};(!To||To.theme!==o)&&n(),xe(e,`url(${gE}) ${20/2} ${20/2}, auto`)},Nt=(e,o)=>{if(e)if(o.activeTool.type==="selection")Rt(e);else if(ao(o))e.style.cursor=Wp.GRAB;else if(wt(o))Vp(e,o.theme);else if(o.activeTool.type==="laser"){let t=o.theme===fE.LIGHT?L6:A6;e.style.cursor=`url(${t}), auto`}else["image","custom"].includes(o.activeTool.type)?o.activeTool.type!=="image"&&(e.style.cursor=Wp.AUTO):e.style.cursor=Wp.CROSSHAIR};var Ko=({viewportX:e,viewportY:o,nextZoom:t},n)=>{let r=e-n.offsetLeft,i=o-n.offsetTop,a=n.zoom.value,l=n.scrollX+(r-r/a),s=n.scrollY+(i-i/a),c=-(r-r/t),m=-(i-i/t);return{scrollX:l+c,scrollY:s+m,zoom:{value:t}}};import{jsx as lc,jsxs as z6}from"react/jsx-runtime";var B6=F({name:"changeViewBackgroundColor",label:"labels.canvasBackground",trackEvent:!1,predicate:(e,o,t,n)=>!!n.props.UIOptions.canvasActions.changeViewBackgroundColor&&!o.viewModeEnabled,perform:(e,o,t)=>({appState:{...o,...t},captureUpdate:t?.viewBackgroundColor?Co.IMMEDIATELY:Co.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t,appProps:n,data:r})=>lc(Aa,{palette:null,topPicks:D6,label:g("labels.canvasBackground"),type:"canvasBackground",color:o.viewBackgroundColor,onChange:i=>t({viewBackgroundColor:i}),"data-testid":"canvas-background-picker",elements:e,appState:o,updateData:t})}),rc=F({name:"zoomIn",label:"buttons.zoomIn",viewMode:!0,icon:Am,trackEvent:{category:"canvas"},perform:(e,o,t,n)=>({appState:{...o,...Ko({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:xo(o.zoom.value+Kp)},o),userToFollow:null},captureUpdate:Co.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>lc(V,{type:"button",className:"zoom-in-button zoom-button",icon:Am,title:`${g("buttons.zoomIn")} \u2014 ${A("CtrlOrCmd++")}`,"aria-label":g("buttons.zoomIn"),disabled:o.zoom.value>=yE,onClick:()=>{e(null)}}),keyTest:e=>(e.code===So.EQUAL||e.code===So.NUM_ADD)&&(e[Zo.CTRL_OR_CMD]||e.shiftKey)}),ic=F({name:"zoomOut",label:"buttons.zoomOut",icon:_m,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t,n)=>({appState:{...o,...Ko({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:xo(o.zoom.value-Kp)},o),userToFollow:null},captureUpdate:Co.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>lc(V,{type:"button",className:"zoom-out-button zoom-button",icon:_m,title:`${g("buttons.zoomOut")} \u2014 ${A("CtrlOrCmd+-")}`,"aria-label":g("buttons.zoomOut"),disabled:o.zoom.value<=wE,onClick:()=>{e(null)}}),keyTest:e=>(e.code===So.MINUS||e.code===So.NUM_SUBTRACT)&&(e[Zo.CTRL_OR_CMD]||e.shiftKey)}),ac=F({name:"resetZoom",label:"buttons.resetZoom",icon:O1,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t,n)=>({appState:{...o,...Ko({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:xo(1)},o),userToFollow:null},captureUpdate:Co.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>lc(ct,{label:g("buttons.resetZoom"),style:{height:"100%"},children:z6(V,{type:"button",className:"reset-zoom-button zoom-button",title:g("buttons.resetZoom"),"aria-label":g("buttons.resetZoom"),onClick:()=>{e(null)},children:[(o.zoom.value*100).toFixed(0),"%"]})}),keyTest:e=>(e.code===So.ZERO||e.code===So.NUM_ZERO)&&(e[Zo.CTRL_OR_CMD]||e.shiftKey)}),F6=(e,o,t=1)=>{let[n,r,i,a]=e,l=i-n,s=o.width/l,c=a-r,m=o.height/c,d=Math.min(s,m)*Xp(t,.1,1);return Math.min(d,1)},vE=({bounds:e,appState:o,canvasOffsets:t,fitToViewport:n=!1,viewportZoomFactor:r=1,minZoom:i=-1/0,maxZoom:a=1/0})=>{r=Xp(r,wE,yE);let[l,s,c,m]=e,p=(l+c)/2,d=(s+m)/2,h=t?.left??0,f=t?.top??0,b=t?.right??0,E=t?.bottom??0,w=o.width-h-b,y=o.height-f-E,x;if(n){let C=c-l,P=m-s;x=Math.min(w/C,y/P)*r}else x=F6(e,{width:w,height:y},r);let v=xo(Xp(_6(x,Kp,"floor"),i,a)),I=Qf({scenePoint:{x:p,y:d},viewportDimensions:{width:o.width,height:o.height},offsets:t,zoom:{value:v}});return{appState:{...o,scrollX:I.scrollX,scrollY:I.scrollY,zoom:{value:v}},captureUpdate:Co.EVENTUALLY}},za=({canvasOffsets:e,targetElements:o,appState:t,fitToViewport:n,viewportZoomFactor:r,minZoom:i,maxZoom:a})=>{let l=N6(R6(o));return vE({canvasOffsets:e,bounds:l,appState:t,fitToViewport:n,viewportZoomFactor:r,minZoom:i,maxZoom:a})},Mj=F({name:"zoomToFitSelectionInViewport",label:"labels.zoomToFitViewport",icon:Ms,trackEvent:{category:"canvas"},perform:(e,o,t,n)=>{let r=n.scene.getSelectedElements(o);return za({targetElements:r.length?r:e,appState:{...o,userToFollow:null},fitToViewport:!1,canvasOffsets:n.getEditorUIOffsets()})},keyTest:e=>e.code===So.TWO&&e.shiftKey&&!e.altKey&&!e[Zo.CTRL_OR_CMD]}),Pj=F({name:"zoomToFitSelection",label:"helpDialog.zoomToSelection",icon:Ms,trackEvent:{category:"canvas"},perform:(e,o,t,n)=>{let r=n.scene.getSelectedElements(o);return za({targetElements:r.length?r:e,appState:{...o,userToFollow:null},fitToViewport:!0,canvasOffsets:n.getEditorUIOffsets()})},keyTest:e=>e.code===So.THREE&&e.shiftKey&&!e.altKey&&!e[Zo.CTRL_OR_CMD]}),O6=F({name:"zoomToFit",label:"helpDialog.zoomToFit",icon:Ms,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t,n)=>za({targetElements:e,appState:{...o,userToFollow:null},fitToViewport:!1,canvasOffsets:n.getEditorUIOffsets()}),keyTest:e=>e.code===So.ONE&&e.shiftKey&&!e.altKey&&!e[Zo.CTRL_OR_CMD]}),nr=F({name:"toggleTheme",label:(e,o)=>o.theme===Oa.DARK?"buttons.lightMode":"buttons.darkMode",keywords:["toggle","dark","light","mode","theme"],icon:(e,o)=>e.theme===Oa.LIGHT?Ea:xa,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t)=>({appState:{...o,theme:t||(o.theme===Oa.LIGHT?Oa.DARK:Oa.LIGHT)},captureUpdate:Co.EVENTUALLY}),keyTest:e=>e.altKey&&e.shiftKey&&e.code===So.D,predicate:(e,o,t,n)=>!!n.props.UIOptions.canvasActions.toggleTheme}),Lj=F({name:"toggleEraserTool",label:"toolBar.eraser",trackEvent:{category:"toolbar"},perform:(e,o,t,n)=>{let r;return wt(o)?r=ui(o,{...o.activeTool.lastActiveTool||{type:n.state.preferredSelectionTool.type},lastActiveToolBeforeEraser:null}):r=ui(o,{type:"eraser",lastActiveToolBeforeEraser:o.activeTool}),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:r},captureUpdate:Co.IMMEDIATELY}},keyTest:e=>e.key===Zo.E}),Aj=F({name:"toggleLassoTool",label:"toolBar.lasso",icon:mn,trackEvent:{category:"toolbar"},predicate:(e,o,t,n)=>n.state.preferredSelectionTool.type!=="lasso",perform:(e,o,t,n)=>{let r;return o.activeTool.type!=="lasso"?(r=ui(o,{type:"lasso",fromSelection:!1}),xe(n.interactiveCanvas,xE.CROSSHAIR)):r=ui(o,{type:"selection"}),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:r},captureUpdate:Co.NEVER}}}),IE=F({name:"toggleHandTool",label:"toolBar.hand",trackEvent:{category:"toolbar"},icon:ks,viewMode:!1,perform:(e,o,t,n)=>{let r;return ao(o)?r=ui(o,{...o.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):(r=ui(o,{type:"hand",lastActiveToolBeforeEraser:o.activeTool}),xe(n.interactiveCanvas,xE.GRAB)),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:r},captureUpdate:Co.IMMEDIATELY}},keyTest:e=>!e.altKey&&!e[Zo.CTRL_OR_CMD]&&e.key===Zo.H});import{updateActiveTool as TE}from"@excalidraw/common";import{CaptureUpdateAction as H6}from"@excalidraw/element";var G6=F({name:"setEmbeddableAsActiveTool",trackEvent:{category:"toolbar"},target:"Tool",label:"toolBar.embeddable",perform:(e,o,t,n)=>{let r=TE(o,{type:"embeddable"});return Nt(n.canvas,{...o,activeTool:r}),{elements:e,appState:{...o,activeTool:TE(o,{type:"embeddable"})},captureUpdate:H6.EVENTUALLY}}});import{pointFrom as SE}from"@excalidraw/math";import{bindOrUnbindBindingElement as U6}from"@excalidraw/element/binding";import{isValidPolygon as CE,LinearElementEditor as sc,newElementWith as Zp}from"@excalidraw/element";import{isBindingElement as kE,isFreeDrawElement as ME,isLinearElement as PE,isLineElement as cc}from"@excalidraw/element";import{KEYS as $p,arrayToMap as W6,invariant as LE,shouldRotateWithDiscreteAngle as Y6,updateActiveTool as AE}from"@excalidraw/common";import{isPathALoop as V6}from"@excalidraw/element";import{isInvisiblySmallElement as jp}from"@excalidraw/element";import{CaptureUpdateAction as _E}from"@excalidraw/element";import{jsx as X6}from"react/jsx-runtime";var gt=F({name:"finalize",label:"",trackEvent:!1,perform:(e,o,t,n)=>{let r=e,{interactiveCanvas:i,focusContainer:a,scene:l}=n,s=l.getNonDeletedElementsMap();if(t&&o.selectedLinearElement){let{event:d,sceneCoords:h}=t,f=sc.getElement(o.selectedLinearElement.elementId,s);LE(f,"Arrow element should exist if selectedLinearElement is set"),LE(h,"sceneCoords should be defined if actionFinalize is called with event");let b=sc.handlePointerUp(d,o.selectedLinearElement,o,n.scene);if(kE(f)&&!o.selectedLinearElement.segmentMidPointHoveredCoords){let E=!!o.newElement,y=(E||!o.selectedLinearElement.selectedPointsIndices?[f.points.length-1]:o.selectedLinearElement.selectedPointsIndices).reduce((x,v)=>(x.set(v,{point:sc.pointFromAbsoluteCoords(f,SE(h.x,h.y),s)}),x),new Map)??new Map;U6(f,y,h.x,h.y,l,o,{newArrow:E,altKey:d.altKey,angleLocked:Y6(d)})}else cc(f)&&o.selectedLinearElement?.isEditing&&!o.newElement&&!CE(f.points)&&l.mutateElement(f,{polygon:!1});if(b!==o.selectedLinearElement){f&&jp(f)&&(r=r.map(w=>w.id===f.id?Zp(w,{isDeleted:!0}):w));let E=o.activeTool?.locked;return{elements:f.points.length<2||jp(f)?e.map(w=>w.id===f.id?Zp(w,{isDeleted:!0}):w):r,appState:{...o,cursorButton:"up",selectedLinearElement:E?null:{...b,selectedPointsIndices:null,isEditing:!1,initialState:{...b.initialState,lastClickedPoint:-1}},selectionElement:null,suggestedBinding:null,newElement:null,multiElement:null},captureUpdate:_E.IMMEDIATELY}}}window.document.activeElement instanceof HTMLElement&&a();let c=null;if(o.multiElement)c=o.multiElement;else if(o.newElement?.type==="freedraw"||kE(o.newElement))c=o.newElement;else if(Object.keys(o.selectedElementIds).length===1){let d=s.get(Object.keys(o.selectedElementIds)[0]);d&&(c=d)}if(c){if(o.selectedLinearElement&&o.multiElement&&c.type!=="freedraw"&&o.lastPointerDownWith!=="touch"){let{points:d}=c,{lastCommittedPoint:h}=o.selectedLinearElement;(!h||d[d.length-1]!==h)&&l.mutateElement(c,{points:c.points.slice(0,-1)})}if(c&&jp(c)&&(r=r.map(d=>d.id===c?.id?Zp(d,{isDeleted:!0}):d)),PE(c)||ME(c)){if(V6(c.points,o.zoom.value)&&(cc(c)||ME(c))){let h=c.points,f=h[0],b=h.map((E,w)=>w===h.length-1?SE(f[0],f[1]):E);cc(c)?l.mutateElement(c,{points:b,polygon:!0}):l.mutateElement(c,{points:b})}cc(c)&&!CE(c.points)&&l.mutateElement(c,{polygon:!1})}}(!o.activeTool.locked&&o.activeTool.type!=="freedraw"||!c)&&Rt(i);let m;o.activeTool.type==="eraser"?m=AE(o,{...o.activeTool.lastActiveTool||{type:n.state.preferredSelectionTool.type},lastActiveToolBeforeEraser:null}):m=AE(o,{type:n.state.preferredSelectionTool.type});let p=c&&PE(c)?new sc(c,W6(r)):o.selectedLinearElement;return p=p&&{...p,isEditing:o.newElement?!1:p.isEditing,initialState:{...p.initialState,lastClickedPoint:-1,origin:null}},{elements:r,appState:{...o,cursorButton:"up",activeTool:(o.activeTool.locked||o.activeTool.type==="freedraw")&&c?o.activeTool:m,activeEmbeddable:null,newElement:null,selectionElement:null,multiElement:null,editingTextElement:null,startBoundElement:null,suggestedBinding:null,selectedElementIds:c&&!o.activeTool.locked&&o.activeTool.type!=="freedraw"?{...o.selectedElementIds,[c.id]:!0}:o.selectedElementIds,selectedLinearElement:p},captureUpdate:_E.IMMEDIATELY}},keyTest:(e,o)=>e.key===$p.ESCAPE&&(o.selectedLinearElement?.isEditing||!o.newElement&&o.multiElement===null)||(e.key===$p.ESCAPE||e.key===$p.ENTER)&&o.multiElement!==null,PanelComponent:({appState:e,updateData:o,data:t})=>X6(V,{type:"button",icon:$1,title:g("buttons.done"),"aria-label":g("buttons.done"),onClick:o,visible:e.multiElement!=null,size:t?.size||"medium",style:{pointerEvents:"all"}})});import{KEYS as fc,DEFAULT_EXPORT_PADDING as Fk,EXPORT_SCALES as Ok,THEME as Qp}from"@excalidraw/common";import{getNonDeletedElements as zk}from"@excalidraw/element";import{CaptureUpdateAction as po}from"@excalidraw/element";import K6 from"clsx";import{jsx as DE,jsxs as Z6}from"react/jsx-runtime";var Ha=({children:e,checked:o,onChange:t,className:n})=>Z6("div",{className:K6("Checkbox",n,{"is-checked":o}),onClick:r=>{t(!o,r),r.currentTarget.querySelector(".Checkbox-box").focus()},children:[DE("button",{type:"button",className:"Checkbox-box",role:"checkbox","aria-checked":o,children:Y1}),DE("div",{className:"Checkbox-label",children:e})]});import{THEME as Ga}from"@excalidraw/common";import{jsx as Ua}from"react/jsx-runtime";var NE=e=>{let o=e.title||(e.value===Ga.DARK?g("buttons.lightMode"):g("buttons.darkMode"));return Ua(V,{type:"icon",icon:e.value===Ga.LIGHT?RE.MOON:RE.SUN,title:o,"aria-label":o,onClick:()=>e.onChange(e.value===Ga.DARK?Ga.LIGHT:Ga.DARK),"data-testid":"toggle-dark-mode"})},RE={SUN:Ua("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:Ua("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:Ua("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:Ua("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 $6}from"react";import{focusNearestParent as j6,KEYS as q6}from"@excalidraw/common";import{jsx as BE,jsxs as J6}from"react/jsx-runtime";var FE=e=>{let{id:o}=ke(),[t,n]=$6(e.value),r=a=>{e.ignoreFocus||j6(a.target);let l=a.target.value;l!==e.value&&e.onChange(l)},i=a=>{if(a.key===q6.ENTER){if(a.preventDefault(),a.nativeEvent.isComposing||a.keyCode===229)return;a.currentTarget.blur()}};return J6("div",{className:"ProjectName",children:[BE("label",{className:"ProjectName-label",htmlFor:"filename",children:`${e.label}:`}),BE("input",{type:"text",className:"TextInput",onBlur:r,onKeyDown:i,id:`${o}-filename`,value:t,onChange:a=>n(a.target.value)})]})};import{DEFAULT_EXPORT_PADDING as Mk,DEFAULT_FILENAME as Pk,IMAGE_MIME_TYPES as QE,isFirefox as Lk,MIME_TYPES as Ak,cloneJSON as _k,SVG_DOCUMENT_PREAMBLE as Dk}from"@excalidraw/common";import{getNonDeletedElements as Rk}from"@excalidraw/element";import{isFrameLikeElement as Nk}from"@excalidraw/element";import{getElementsOverlappingFrame as Bk}from"@excalidraw/element";import{ALLOWED_PASTE_MIME_TYPES as dk,EXPORT_DATA_TYPES as Va,MIME_TYPES as co,arrayToMap as mk,isMemberOf as pk,isPromiseLike as uk,EVENT as pc}from"@excalidraw/common";import{mutateElement as hk}from"@excalidraw/element";import{deepCopyElement as gk}from"@excalidraw/element";import{isFrameLikeElement as fk,isInitializedImageElement as bk}from"@excalidraw/element";import{getContainingFrame as ZE}from"@excalidraw/element";import{pointFrom as In}from"@excalidraw/math";import{COLOR_PALETTE as zE,DEFAULT_CHART_COLOR_INDEX as Q6,getAllColorsSpecificShade as ek,DEFAULT_FONT_FAMILY as tk,DEFAULT_FONT_SIZE as HE,VERTICAL_ALIGN as ok,randomId as GE,isDevEnv as UE,FONT_SIZES as nk}from"@excalidraw/common";import{newTextElement as dc,newLinearElement as Ya,newElement as Jp}from"@excalidraw/element";var so=32,Ce=12,Tn=256,WE=50,rr="NOT_SPREADSHEET",hi="VALID_SPREADSHEET",Wa=e=>{let o=/^([-+]?)[$€£¥₩]?([-+]?)([\d.,]+)[%]?$/.exec(e);return o?parseFloat(`${(o[1]||o[2])+o[3]}`.replace(/,/g,"")):null},qp=(e,o)=>e.slice(1).every(t=>Wa(t[o])!==null),OE=e=>{let o=e[0].length;if(o>2)return{type:rr,reason:"More than 2 columns"};if(o===1){if(!qp(e,0))return{type:rr,reason:"Value is not numeric"};let s=Wa(e[0][0])===null,c=(s?e.slice(1):e).map(m=>Wa(m[0]));return c.length<2?{type:rr,reason:"Less than two rows"}:{type:hi,spreadsheet:{title:s?e[0][0]:null,labels:null,values:c}}}let t=qp(e,0),n=qp(e,1);if(!t&&!n)return{type:rr,reason:"Value is not numeric"};let[r,i]=n?[0,1]:[1,0],a=Wa(e[0][i])===null,l=a?e.slice(1):e;return l.length<2?{type:rr,reason:"Less than 2 rows"}:{type:hi,spreadsheet:{title:a?e[0][i]:null,labels:l.map(s=>s[r]),values:l.map(s=>Wa(s[i]))}}},rk=e=>{let o=[];for(let t=0;t<e[0].length;t++){let n=[];for(let r=0;r<e.length;r++)n.push(e[r][t]);o.push(n)}return o},YE=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:rr,reason:"No values"};let t=o[0].length;if(!o.every(i=>i.length===t))return{type:rr,reason:"All rows don't have same number of columns"};let r=OE(o);if(r.type!==hi){let i=OE(rk(o));if(i.type===hi)return i}return r},mc=ek(Q6),Kt={fillStyle:"hachure",fontFamily:tk,fontSize:HE,opacity:100,roughness:1,strokeColor:zE.black,roundness:null,strokeStyle:"solid",strokeWidth:1,verticalAlign:ok.MIDDLE,locked:!1},VE=e=>{let o=(so+Ce)*e.values.length+Ce,t=Tn+Ce*2;return{chartWidth:o,chartHeight:t}},ik=(e,o,t,n,r)=>e.labels?.map((i,a)=>dc({groupIds:[n],backgroundColor:r,...Kt,text:i.length>8?`${i.slice(0,5)}...`:i,x:o+a*(so+Ce)+Ce*2,y:t+Ce/2,width:so,angle:5.87,fontSize:nk.sm,textAlign:"center",verticalAlign:"top"}))||[],ak=(e,o,t,n,r)=>{let i=dc({groupIds:[n],backgroundColor:r,...Kt,x:o-Ce,y:t-Ce,text:"0",textAlign:"right"}),a=dc({groupIds:[n],backgroundColor:r,...Kt,x:o-Ce,y:t-Tn-i.height/2,text:Math.max(...e.values).toLocaleString(),textAlign:"right"});return[i,a]},lk=(e,o,t,n,r)=>{let{chartWidth:i,chartHeight:a}=VE(e),l=Ya({backgroundColor:r,groupIds:[n],...Kt,type:"line",x:o,y:t,width:i,points:[In(0,0),In(i,0)]}),s=Ya({backgroundColor:r,groupIds:[n],...Kt,type:"line",x:o,y:t,height:a,points:[In(0,0),In(0,-a)]}),c=Ya({backgroundColor:r,groupIds:[n],...Kt,type:"line",x:o,y:t-Tn-Ce,strokeStyle:"dotted",width:i,opacity:WE,points:[In(0,0),In(i,0)]});return[l,s,c]},XE=(e,o,t,n,r,i)=>{let{chartWidth:a,chartHeight:l}=VE(e),s=e.title?dc({backgroundColor:r,groupIds:[n],...Kt,text:e.title,x:o+a/2,y:t-Tn-Ce*2-HE,roundness:null,textAlign:"center"}):null,c=i?Jp({backgroundColor:r,groupIds:[n],...Kt,type:"rectangle",x:o,y:t-l,width:a,height:l,strokeColor:zE.black,fillStyle:"solid",opacity:6}):null;return[...c?[c]:[],...s?[s]:[],...ik(e,o,t,n,r),...ak(e,o,t,n,r),...lk(e,o,t,n,r)]},sk=(e,o,t)=>{let n=Math.max(...e.values),r=GE(),i=mc[Math.floor(Math.random()*mc.length)];return[...e.values.map((l,s)=>{let c=l/n*Tn;return Jp({backgroundColor:i,groupIds:[r],...Kt,type:"rectangle",x:o+s*(so+Ce)+Ce,y:t-c-Ce,width:so,height:c})}),...XE(e,o,t,r,i,UE())]},ck=(e,o,t)=>{let n=Math.max(...e.values),r=GE(),i=mc[Math.floor(Math.random()*mc.length)],a=0,l=[];for(let b of e.values){let E=a*(so+Ce),w=-(b/n)*Tn;l.push([E,w]),a++}let s=Math.max(...l.map(b=>b[0])),c=Math.max(...l.map(b=>b[1])),m=Math.min(...l.map(b=>b[0])),p=Math.min(...l.map(b=>b[1])),d=Ya({backgroundColor:i,groupIds:[r],...Kt,type:"line",x:o+Ce+so/2,y:t-Ce,height:c-p,width:s-m,strokeWidth:2,points:l}),h=e.values.map((b,E)=>{let w=E*(so+Ce)+Ce/2,y=-(b/n)*Tn+Ce/2;return Jp({backgroundColor:i,groupIds:[r],...Kt,fillStyle:"solid",strokeWidth:2,type:"ellipse",x:o+w+so/2,y:t+y-Ce*2,width:Ce,height:Ce})}),f=e.values.map((b,E)=>{let w=E*(so+Ce)+Ce/2,y=b/n*Tn+Ce/2+Ce;return Ya({backgroundColor:i,groupIds:[r],...Kt,type:"line",x:o+w+so/2+Ce/2,y:t-y,height:y,strokeStyle:"dotted",opacity:WE,points:[In(0,0),In(0,y)]})});return[...XE(e,o,t,r,i,UE()),d,...f,...h]},KE=(e,o,t,n)=>e==="line"?ck(o,t,n):sk(o,t,n);var Yq="clipboard"in navigator&&"readText"in navigator.clipboard,uc="clipboard"in navigator&&"writeText"in navigator.clipboard,Sn="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,Ek=e=>!!([Va.excalidraw,Va.excalidrawClipboard,Va.excalidrawClipboardWithAPI].includes(e?.type)&&Array.isArray(e.elements)),$E=({types:e,files:o})=>{!e&&!o&&console.warn("createPasteEvent: no types or files provided");let t=new ClipboardEvent(pc.PASTE,{clipboardData:new DataTransfer});if(e)for(let[n,r]of Object.entries(e)){if(typeof r!="string"){o=o||[],o.push(r);continue}try{if(t.clipboardData?.items.add(r,n),t.clipboardData?.getData(n)!==r)throw new Error(`Failed to set "${n}" as clipboardData item`)}catch(i){throw new Error(i.message)}}if(o){let n=-1;for(let r of o){n++;try{if(t.clipboardData?.items.add(r),t.clipboardData?.files[n]!==r)throw new Error(`Failed to set file "${r.name}" as clipboardData item`)}catch(i){throw new Error(i.message)}}}return t},xk=({elements:e,files:o})=>{let t=mk(e),n=new Set(e.filter(l=>fk(l))),r=!1,i=e.reduce((l,s)=>(bk(s)&&(r=!0,o&&o[s.fileId]&&(l[s.fileId]=o[s.fileId])),l),{});r&&!o&&console.warn("copyToClipboard: attempting to file element(s) without providing associated `files` object.");let a={type:Va.excalidrawClipboard,elements:e.map(l=>{if(ZE(l,t)&&!n.has(ZE(l,t))){let s=gk(l);return hk(s,t,{frameId:null}),s}return l}),files:o?i:void 0};return JSON.stringify(a)},hc=async(e,o,t)=>{await mo(xk({elements:e,files:o}),t)},yk=e=>{let o=YE(e);return o.type===hi?{spreadsheet:o.spreadsheet}:null};function jE(e){let o=[];for(let t of e.childNodes)if(t.nodeType===3){let n=t.textContent?.trim();n&&o.push({type:"text",value:n})}else if(t instanceof HTMLImageElement){let n=t.getAttribute("src");n&&n.startsWith("http")&&o.push({type:"imageUrl",value:n})}else o=o.concat(jE(t));return o}var wk=e=>{let o=e.value;try{let t=new DOMParser().parseFromString(o,co.html),n=jE(t.body);if(n.length)return{type:"mixedContent",value:n}}catch(t){console.error(`error in parseHTMLFromPaste: ${t.message}`)}return null},qE=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 n=await navigator.clipboard?.readText();if(n)return{[co.text]:n}}}catch(n){if(navigator.clipboard?.read)console.warn(`navigator.clipboard.readText() failed (${n.message}). Failling back to navigator.clipboard.read()`);else{if(n.name==="DataError")return console.warn(`navigator.clipboard.read() error, clipboard is probably empty: ${n.message}`),e;throw n}}throw t}for(let t of o)for(let n of t.types)if(pk(dk,n))try{if(n===co.text||n===co.html)e[n]=await(await t.getType(n)).text();else if(u1(n)){let r=await t.getType(n),i=y1(r,n,void 0);e[n]=i}else throw new vm(`Unsupported clipboard type: ${n}`)}catch(r){console.warn(r instanceof vm?r.message:`Cannot retrieve ${n} from clipboardItem: ${r.message}`)}return Object.keys(e).length===0&&console.warn("No clipboard data found from clipboard.read()."),e},vk=async(e,o=!1)=>{try{let t=e.findByType(co.html),n=!o&&t&&wk(t);return n?n.value.every(r=>r.type==="text")?{type:"text",value:e.getData(co.text)??n.value.map(r=>r.value).join(`
|
|
5
|
-
`).trim()}:n:{type:"text",value:(e.getData(co.text)||"").trim()}}catch{return{type:"text",value:""}}},Ik=function(e){return this.find(o=>o.type===e)||null},Tk=function(e){return this.find(t=>t.type===e)?.value??null},Sk=function(){return this.filter(e=>e.kind==="file")},Xa=async e=>{let o;kk(e)?o=e.clipboardData?.items:o=e.dataTransfer?.items;let t=(await Promise.all(Array.from(o||[]).map(async n=>{if(n.kind==="file"){let r=n.getAsFile();if(r){let i=await x1(n);return r=await fa(r),{type:r.type,kind:"file",file:r,fileHandle:i}}}else if(n.kind==="string"){let{type:r}=n,i;return"clipboardData"in e&&e.clipboardData?i=e.clipboardData?.getData(r):i=await new Promise(a=>{n.getAsString(l=>a(l))}),{type:r,kind:"string",value:i}}return null}))).filter(n=>n!=null);return Object.assign(t,{findByType:Ik,getData:Tk,getFiles:Sk})},JE=async(e,o=!1)=>{let t=await vk(e,o);if(t.type==="mixedContent")return{mixedContent:t.value};try{let n=!o&&yk(t.value);if(n)return n}catch(n){console.error(n)}try{let n=JSON.parse(t.value),r=n.type===Va.excalidrawClipboardWithAPI;if(Ek(n))return{elements:n.elements,files:n.files,text:o?JSON.stringify(n.elements,null,2):void 0,programmaticAPI:r}}catch{}return{text:t.value}},gc=async e=>{try{await navigator.clipboard.write([new window.ClipboardItem({[co.png]:e})])}catch(o){if(uk(e))await navigator.clipboard.write([new window.ClipboardItem({[co.png]:await e})]);else throw o}},mo=async(e,o)=>{if(uc)try{await navigator.clipboard.writeText(e||"");return}catch(t){console.error(t)}try{if(o){if(o.clipboardData?.setData(co.text,e||""),o.clipboardData?.getData(co.text)!==e)throw new Error("Failed to setData on clipboardEvent");return}}catch(t){console.error(t)}if(!Ck(e))throw new Error("Error copying to clipboard.")},Ck=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 n=window.pageYOffset||document.documentElement.scrollTop;t.style.top=`${n}px`,t.style.fontSize="12pt",t.setAttribute("readonly",""),t.value=e,document.body.appendChild(t);let r=!1;try{t.select(),t.setSelectionRange(0,t.value.length),r=document.execCommand("copy")}catch(i){console.error(i)}return t.remove(),r},kk=e=>e.type===pc.PASTE||e.type===pc.COPY||e.type===pc.CUT;var ir=(e,{selectedElementIds:o},t)=>{e=Rk(e);let n=t&&ve(e,{selectedElementIds:o}),r=null,i=n?q(e,{selectedElementIds:o},{includeBoundTextElement:!0}):e;return n&&(i.length===1&&Nk(i[0])?(r=i[0],i=Bk(e,r)):i.length>1&&(i=q(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}))),{exportingFrame:r,exportedElements:_k(i)}},ar=async(e,o,t,n,{exportBackground:r,exportPadding:i=Mk,viewBackgroundColor:a,name:l=t.name||Pk,fileHandle:s=null,exportingFrame:c=null})=>{if(o.length===0)throw new Error(g("alerts.cannotExportEmptyCanvas"));if(e==="svg"||e==="clipboard-svg"){let p=Or(o,{exportBackground:r,exportWithDarkMode:t.exportWithDarkMode,viewBackgroundColor:a,exportPadding:i,exportScale:t.exportScale,exportEmbedScene:t.exportEmbedScene&&e==="svg"},n,{exportingFrame:c});if(e==="svg")return Im(p.then(d=>new Blob([Dk+d.outerHTML],{type:Ak.svg})),{description:"Export to SVG",name:l,extension:t.exportEmbedScene?"excalidraw.svg":"svg",mimeTypes:[QE.svg],fileHandle:s});if(e==="clipboard-svg"){let d=await p.then(h=>h.outerHTML);try{await mo(d)}catch{throw new Error(g("errors.copyToSystemClipboardFailed"))}return}}let m=as(o,t,n,{exportBackground:r,viewBackgroundColor:a,exportPadding:i,exportingFrame:c});if(e==="png"){let p=jn(m);return t.exportEmbedScene&&(p=p.then(d=>import("./data/image-
|
|
5
|
+
`).trim()}:n:{type:"text",value:(e.getData(co.text)||"").trim()}}catch{return{type:"text",value:""}}},Ik=function(e){return this.find(o=>o.type===e)||null},Tk=function(e){return this.find(t=>t.type===e)?.value??null},Sk=function(){return this.filter(e=>e.kind==="file")},Xa=async e=>{let o;kk(e)?o=e.clipboardData?.items:o=e.dataTransfer?.items;let t=(await Promise.all(Array.from(o||[]).map(async n=>{if(n.kind==="file"){let r=n.getAsFile();if(r){let i=await x1(n);return r=await fa(r),{type:r.type,kind:"file",file:r,fileHandle:i}}}else if(n.kind==="string"){let{type:r}=n,i;return"clipboardData"in e&&e.clipboardData?i=e.clipboardData?.getData(r):i=await new Promise(a=>{n.getAsString(l=>a(l))}),{type:r,kind:"string",value:i}}return null}))).filter(n=>n!=null);return Object.assign(t,{findByType:Ik,getData:Tk,getFiles:Sk})},JE=async(e,o=!1)=>{let t=await vk(e,o);if(t.type==="mixedContent")return{mixedContent:t.value};try{let n=!o&&yk(t.value);if(n)return n}catch(n){console.error(n)}try{let n=JSON.parse(t.value),r=n.type===Va.excalidrawClipboardWithAPI;if(Ek(n))return{elements:n.elements,files:n.files,text:o?JSON.stringify(n.elements,null,2):void 0,programmaticAPI:r}}catch{}return{text:t.value}},gc=async e=>{try{await navigator.clipboard.write([new window.ClipboardItem({[co.png]:e})])}catch(o){if(uk(e))await navigator.clipboard.write([new window.ClipboardItem({[co.png]:await e})]);else throw o}},mo=async(e,o)=>{if(uc)try{await navigator.clipboard.writeText(e||"");return}catch(t){console.error(t)}try{if(o){if(o.clipboardData?.setData(co.text,e||""),o.clipboardData?.getData(co.text)!==e)throw new Error("Failed to setData on clipboardEvent");return}}catch(t){console.error(t)}if(!Ck(e))throw new Error("Error copying to clipboard.")},Ck=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 n=window.pageYOffset||document.documentElement.scrollTop;t.style.top=`${n}px`,t.style.fontSize="12pt",t.setAttribute("readonly",""),t.value=e,document.body.appendChild(t);let r=!1;try{t.select(),t.setSelectionRange(0,t.value.length),r=document.execCommand("copy")}catch(i){console.error(i)}return t.remove(),r},kk=e=>e.type===pc.PASTE||e.type===pc.COPY||e.type===pc.CUT;var ir=(e,{selectedElementIds:o},t)=>{e=Rk(e);let n=t&&ve(e,{selectedElementIds:o}),r=null,i=n?q(e,{selectedElementIds:o},{includeBoundTextElement:!0}):e;return n&&(i.length===1&&Nk(i[0])?(r=i[0],i=Bk(e,r)):i.length>1&&(i=q(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}))),{exportingFrame:r,exportedElements:_k(i)}},ar=async(e,o,t,n,{exportBackground:r,exportPadding:i=Mk,viewBackgroundColor:a,name:l=t.name||Pk,fileHandle:s=null,exportingFrame:c=null})=>{if(o.length===0)throw new Error(g("alerts.cannotExportEmptyCanvas"));if(e==="svg"||e==="clipboard-svg"){let p=Or(o,{exportBackground:r,exportWithDarkMode:t.exportWithDarkMode,viewBackgroundColor:a,exportPadding:i,exportScale:t.exportScale,exportEmbedScene:t.exportEmbedScene&&e==="svg"},n,{exportingFrame:c});if(e==="svg")return Im(p.then(d=>new Blob([Dk+d.outerHTML],{type:Ak.svg})),{description:"Export to SVG",name:l,extension:t.exportEmbedScene?"excalidraw.svg":"svg",mimeTypes:[QE.svg],fileHandle:s});if(e==="clipboard-svg"){let d=await p.then(h=>h.outerHTML);try{await mo(d)}catch{throw new Error(g("errors.copyToSystemClipboardFailed"))}return}}let m=as(o,t,n,{exportBackground:r,viewBackgroundColor:a,exportPadding:i,exportingFrame:c});if(e==="png"){let p=jn(m);return t.exportEmbedScene&&(p=p.then(d=>import("./data/image-7G5BLOPB.js").then(({encodePngMetadata:h})=>h({blob:d,metadata:ua(o,t,n,"local")})))),Im(p,{description:"Export to PNG",name:l,extension:t.exportEmbedScene?"excalidraw.png":"png",mimeTypes:[QE.png],fileHandle:s})}else if(e==="clipboard")try{let p=jn(m);await gc(p)}catch(p){throw console.warn(p),p.name==="CANVAS_POSSIBLY_TOO_BIG"?new Error(g("canvasError.canvasTooBig")):Lk&&p.name==="TypeError"?new Error(`${g("alerts.couldNotCopyToClipboard")}
|
|
6
6
|
|
|
7
7
|
${g("hints.firefox_clipboard_write")}`):new Error(g("alerts.couldNotCopyToClipboard"))}else throw new Error("Unsupported export type")};var ex=async(e,o,t,n)=>{let{exportBackground:r,viewBackgroundColor:i,fileHandle:a}=o,l=m1(a);if(!a||!p1(l))throw new Error("fileHandle should exist and should be of type svg or png when resaving");o={...o,exportEmbedScene:!0};let{exportedElements:s,exportingFrame:c}=ir(e,o,!1);return await ar(l,s,o,t,{exportBackground:r,viewBackgroundColor:i,name:n,fileHandle:a,exportingFrame:c}),{fileHandle:a}};import{Fragment as Hk,jsx as $o,jsxs as Gk}from"react/jsx-runtime";var eu=F({name:"changeProjectName",label:"labels.fileTitle",trackEvent:!1,perform:(e,o,t)=>({appState:{...o,name:t},captureUpdate:po.EVENTUALLY}),PanelComponent:({appState:e,updateData:o,appProps:t,data:n,app:r})=>$o(FE,{label:g("labels.fileTitle"),value:r.getName(),onChange:i=>o(i),ignoreFocus:n?.ignoreFocus??!1})}),tx=F({name:"changeExportScale",label:"imageExportDialog.scale",trackEvent:{category:"export",action:"scale"},perform:(e,o,t)=>({appState:{...o,exportScale:t},captureUpdate:po.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t})=>{let n=zk(e),i=ve(n,o)?q(n,o):n;return $o(Hk,{children:Ok.map(a=>{let[l,s]=c1(i,Fk,a),c=`${g("imageExportDialog.label.scale")} ${a}x (${l}x${s})`;return $o(V,{size:"small",type:"radio",icon:`${a}x`,name:"export-canvas-scale",title:c,"aria-label":c,id:"export-canvas-scale",checked:a===o.exportScale,onChange:()=>t(a)},a)})})}}),tu=F({name:"changeExportBackground",label:"imageExportDialog.label.withBackground",trackEvent:{category:"export",action:"toggleBackground"},perform:(e,o,t)=>({appState:{...o,exportBackground:t},captureUpdate:po.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>$o(Ha,{checked:e.exportBackground,onChange:t=>o(t),children:g("imageExportDialog.label.withBackground")})}),bc=F({name:"changeExportEmbedScene",label:"imageExportDialog.tooltip.embedScene",trackEvent:{category:"export",action:"embedScene"},perform:(e,o,t)=>({appState:{...o,exportEmbedScene:t},captureUpdate:po.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>Gk(Ha,{checked:e.exportEmbedScene,onChange:t=>o(t),children:[g("imageExportDialog.label.embedScene"),$o(ct,{label:g("imageExportDialog.tooltip.embedScene"),long:!0,children:$o("div",{className:"excalidraw-tooltip-icon",children:j1})})]})}),lr=F({name:"saveToActiveFile",label:"buttons.save",icon:qn,trackEvent:{category:"export"},predicate:(e,o,t,n)=>!!n.props.UIOptions.canvasActions.saveToActiveFile&&!!o.fileHandle&&!o.viewModeEnabled,perform:async(e,o,t,n)=>{let r=!!o.fileHandle;try{let{fileHandle:i}=ls(o.fileHandle)?await ex(e,o,n.files,n.getName()):await ts(e,o,n.files,n.getName());return{captureUpdate:po.EVENTUALLY,appState:{...o,fileHandle:i,toast:r?{message:i?.name?g("toast.fileSavedToFilename").replace("{filename}",`"${i.name}"`):g("toast.fileSaved")}:null}}}catch(i){return i?.name!=="AbortError"?console.error(i):console.warn(i),{captureUpdate:po.EVENTUALLY}}},keyTest:e=>!1}),Ka=F({name:"saveFileToDisk",label:"exportDialog.disk_title",icon:qn,viewMode:!0,trackEvent:{category:"export"},perform:async(e,o,t,n)=>{try{let{fileHandle:r}=await ts(e,{...o,fileHandle:null},n.files,n.getName());return{captureUpdate:po.EVENTUALLY,appState:{...o,openDialog:null,fileHandle:r,toast:{message:g("toast.fileSaved")}}}}catch(r){return r?.name!=="AbortError"?console.error(r):console.warn(r),{captureUpdate:po.EVENTUALLY}}},keyTest:e=>e.key===fc.S&&e.shiftKey&&e[fc.CTRL_OR_CMD],PanelComponent:({updateData:e})=>$o(V,{type:"button",icon:X1,title:g("buttons.saveAs"),"aria-label":g("buttons.saveAs"),showAriaLabel:de().formFactor==="phone",hidden:!Fr,onClick:()=>e(null),"data-testid":"save-as-button"})}),gi=F({name:"loadScene",label:"buttons.load",trackEvent:{category:"export"},predicate:(e,o,t,n)=>!!n.props.UIOptions.canvasActions.loadScene&&!o.viewModeEnabled,perform:async(e,o,t,n)=>{try{let{elements:r,appState:i,files:a}=await Tm(o,e);return{elements:r,appState:i,files:a,captureUpdate:po.IMMEDIATELY}}catch(r){return r?.name==="AbortError"?(console.warn(r),!1):{elements:e,appState:{...o,errorMessage:r.message},files:n.files,captureUpdate:po.EVENTUALLY}}},keyTest:e=>e[fc.CTRL_OR_CMD]&&e.key===fc.O}),ox=F({name:"exportWithDarkMode",label:"imageExportDialog.label.darkMode",trackEvent:{category:"export",action:"toggleTheme"},perform:(e,o,t)=>({appState:{...o,exportWithDarkMode:t},captureUpdate:po.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>$o("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"-45px",marginBottom:"10px"},children:$o(NE,{value:e.exportWithDarkMode?Qp.DARK:Qp.LIGHT,onChange:t=>{o(t===Qp.DARK)},title:g("imageExportDialog.label.darkMode")})})});import{DEFAULT_FONT_SIZE as Uk,DEFAULT_FONT_FAMILY as Wk,DEFAULT_TEXT_ALIGN as Yk,CODES as nx,KEYS as rx,getLineHeight as Vk}from"@excalidraw/common";import{newElementWith as Ec}from"@excalidraw/element";import{hasBoundTextElement as Xk,canApplyRoundnessTypeToElement as Kk,getDefaultRoundnessTypeForElement as Zk,isFrameLikeElement as $k,isArrowElement as jk,isExcalidrawElement as qk,isTextElement as ou}from"@excalidraw/element";import{getBoundTextElement as Jk,redrawTextBoundingBox as Qk}from"@excalidraw/element";import{CaptureUpdateAction as nu}from"@excalidraw/element";var ix="{}",ru=F({name:"copyStyles",label:"labels.copyStyles",icon:$m,trackEvent:{category:"element"},perform:(e,o,t,n)=>{let r=[],i=e.find(a=>o.selectedElementIds[a.id]);if(r.push(i),i&&Xk(i)){let a=Jk(i,n.scene.getNonDeletedElementsMap());r.push(a)}return i&&(ix=JSON.stringify(r)),{appState:{...o,toast:{message:g("toast.copyStyles")}},captureUpdate:nu.EVENTUALLY}},keyTest:e=>e[rx.CTRL_OR_CMD]&&e.altKey&&e.code===nx.C}),iu=F({name:"pasteStyles",label:"labels.pasteStyles",icon:$m,trackEvent:{category:"element"},perform:(e,o,t,n)=>{let r=JSON.parse(ix),i=r[0],a=r[1];if(!qk(i))return{elements:e,captureUpdate:nu.EVENTUALLY};let l=q(e,o,{includeBoundTextElement:!0}),s=l.map(c=>c.id);return{elements:e.map(c=>{if(s.includes(c.id)){let m=i;if(ou(c)&&c.containerId&&(m=a),!m)return c;let p=Ec(c,{backgroundColor:m?.backgroundColor,strokeWidth:m?.strokeWidth,strokeColor:m?.strokeColor,strokeStyle:m?.strokeStyle,fillStyle:m?.fillStyle,opacity:m?.opacity,roughness:m?.roughness,roundness:m.roundness?Kk(m.roundness.type,c)?m.roundness:Zk(c):null});if(ou(p)){let d=m.fontSize||Uk,h=m.fontFamily||Wk;p=Ec(p,{fontSize:d,fontFamily:h,textAlign:m.textAlign||Yk,lineHeight:m.lineHeight||Vk(h)});let f=null;p.containerId&&(f=l.find(b=>ou(p)&&b.id===p.containerId)||null),Qk(p,f,n.scene)}return p.type==="arrow"&&jk(m)&&(p=Ec(p,{startArrowhead:m.startArrowhead,endArrowhead:m.endArrowhead})),$k(c)&&(p=Ec(p,{roundness:null,backgroundColor:"transparent"})),p}return c}),captureUpdate:nu.IMMEDIATELY}},keyTest:e=>e[rx.CTRL_OR_CMD]&&e.altKey&&e.code===nx.V});import{KEYS as eM}from"@excalidraw/common";import{CaptureUpdateAction as tM}from"@excalidraw/element";var sr=F({name:"toggleShortcuts",label:"welcomeScreen.defaults.helpHint",icon:H1,viewMode:!0,trackEvent:{category:"menu",action:"toggleHelpDialog"},perform:(e,o,t,{focusContainer:n})=>(o.openDialog?.name==="help"&&n(),{appState:{...o,openDialog:o.openDialog?.name==="help"?null:{name:"help"},openMenu:null,openPopup:null},captureUpdate:tM.EVENTUALLY}),keyTest:e=>e.key===eM.QUESTION_MARK});import{getNonDeletedElements as yc}from"@excalidraw/element";import{newElementWith as sx}from"@excalidraw/element";import{isBoundToContainer as oM}from"@excalidraw/element";import{frameAndChildrenSelectedTogether as nM,getElementsInResizingFrame as rM,getFrameLikeElements as iM,getRootElements as aM,groupByFrameLikes as lM,removeElementsFromFrame as sM,replaceAllElementsInFrame as cM}from"@excalidraw/element";import{KEYS as wc,randomId as dM,arrayToMap as au}from"@excalidraw/common";import{getSelectedGroupIds as xc,selectGroup as mM,selectGroupsForSelectedElements as pM,getElementsInGroup as ax,addToGroup as uM,removeFromSelectedGroups as hM,isElementInGroup as cx}from"@excalidraw/element";import{syncMovedIndices as gM}from"@excalidraw/element";import{CaptureUpdateAction as Za}from"@excalidraw/element";import{jsx as fi}from"react/jsx-runtime";var fM=e=>{if(e.length>=2){let o=e[0].groupIds;for(let t of o)if(e.reduce((n,r)=>n&&cx(r,t),!0))return!0}return!1},lx=(e,o,t)=>{let n=t.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0});return n.length>=2&&!fM(n)&&!nM(n)},lu=F({name:"group",label:"labels.group",icon:e=>fi(Vm,{theme:e.theme}),trackEvent:{category:"element"},perform:(e,o,t,n)=>{let r=aM(n.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0}));if(r.length<2)return{appState:o,elements:e,captureUpdate:Za.EVENTUALLY};let i=xc(o);if(i.length===1){let E=i[0],w=new Set(ax(e,E).map(v=>v.id)),y=new Set(r.map(v=>v.id));if(new Set([...Array.from(w),...Array.from(y)]).size===w.size)return{appState:o,elements:e,captureUpdate:Za.EVENTUALLY}}let a=[...e];new Set(r.map(E=>E.frameId)).size>1&&lM(r).forEach((w,y)=>{sM(w,n.scene.getNonDeletedElementsMap())});let s=dM(),c=au(r);a=a.map(E=>c.get(E.id)?sx(E,{groupIds:uM(E.groupIds,s,o.editingGroupId)}):E);let m=ax(a,s),p=m[m.length-1],d=a.lastIndexOf(p),h=a.slice(d+1),f=a.slice(0,d).filter(E=>!cx(E,s)),b=gM([...f,...m,...h],au(m));return{appState:{...o,...mM(s,{...o,selectedGroupIds:{}},yc(a))},elements:b,captureUpdate:Za.IMMEDIATELY}},predicate:(e,o,t,n)=>lx(e,o,n),keyTest:e=>!e.shiftKey&&e[wc.CTRL_OR_CMD]&&e.key===wc.G,PanelComponent:({elements:e,appState:o,updateData:t,app:n})=>fi(V,{hidden:!lx(e,o,n),type:"button",icon:fi(Vm,{theme:o.theme}),onClick:()=>t(null),title:`${g("labels.group")} \u2014 ${A("CtrlOrCmd+G")}`,"aria-label":g("labels.group"),visible:ve(yc(e),o)})}),su=F({name:"ungroup",label:"labels.ungroup",icon:e=>fi(Xm,{theme:e.theme}),trackEvent:{category:"element"},perform:(e,o,t,n)=>{let r=xc(o),i=au(e);if(r.length===0)return{appState:o,elements:e,captureUpdate:Za.EVENTUALLY};let a=[...e],l=[];a=a.map(d=>{oM(d)&&l.push(d.id);let h=hM(d.groupIds,o.selectedGroupIds);return h.length===d.groupIds.length?d:sx(d,{groupIds:h})});let s=pM(o,yc(a),o,null),c=n.scene.getSelectedElements(o),m=new Set(c.filter(d=>d.frameId).map(d=>d.frameId));return iM(e).filter(d=>m.has(d.id)).forEach(d=>{d&&(a=cM(a,rM(a,d,o,i),d,n))}),s.selectedElementIds=Object.entries(s.selectedElementIds).reduce((d,[h,f])=>(f&&!l.includes(h)&&(d[h]=!0),d),{}),{appState:{...o,...s},elements:a,captureUpdate:Za.IMMEDIATELY}},keyTest:e=>e.shiftKey&&e[wc.CTRL_OR_CMD]&&e.key===wc.G.toUpperCase(),predicate:(e,o)=>xc(o).length>0,PanelComponent:({elements:e,appState:o,updateData:t})=>fi(V,{type:"button",hidden:xc(o).length===0,icon:fi(Xm,{theme:o.theme}),onClick:()=>t(null),title:`${g("labels.ungroup")} \u2014 ${A("CtrlOrCmd+Shift+G")}`,"aria-label":g("labels.ungroup"),visible:ve(yc(e),o)})});import IM from"clsx";import{CaptureUpdateAction as hx}from"@excalidraw/element";import{invariant as TM}from"@excalidraw/common";import{COLOR_CHARCOAL_BLACK as bM,COLOR_VOICE_CALL as EM,COLOR_WHITE as Ic,THEME as xM,UserIdleState as dx}from"@excalidraw/common";var vc=(e,o,t,n,r,i,a)=>{e.beginPath(),e.moveTo(o+i,t),e.lineTo(o+n-i,t),e.quadraticCurveTo(o+n,t,o+n,t+i),e.lineTo(o+n,t+r-i),e.quadraticCurveTo(o+n,t+r,o+n-i,t+r),e.lineTo(o+i,t+r),e.quadraticCurveTo(o,t+r,o,t+r-i),e.lineTo(o,t+i),e.quadraticCurveTo(o,t,o+i,t),e.closePath(),e.fill(),a&&(e.strokeStyle=a),e.stroke()};function yM(e){let o=0;if(e.length===0)return o;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);o=(o<<5)-o+n}return o}var cr=(e,o)=>`hsl(${Math.abs(yM(o?.id||e))%37*10}, 100%, 83%)`,mx=e=>{let o=e?.trim()?.codePointAt(0);return(o?String.fromCodePoint(o):"?").toUpperCase()},px=({context:e,renderConfig:o,appState:t,normalizedWidth:n,normalizedHeight:r})=>{for(let[i,a]of o.remotePointerViewportCoords){let{x:l,y:s}=a,c=t.collaborators.get(i);l-=t.offsetLeft,s-=t.offsetTop;let m=11,p=14,d=l<0||l>n-m||s<0||s>r-p;l=Math.max(l,0),l=Math.min(l,n-m),s=Math.max(s,0),s=Math.min(s,r-p);let h=cr(i,c);e.save(),e.strokeStyle=h,e.fillStyle=h;let f=o.remotePointerUserStates.get(i),b=d||f===dx.IDLE||f===dx.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=h,e.stroke(),e.closePath());let E=t.theme===xM.DARK?"#2f6330":EM,w=c?.isSpeaking;w&&(e.fillStyle=E,e.strokeStyle=E,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=Ic,e.strokeStyle=Ic,e.lineWidth=6,e.lineJoin="round",e.beginPath(),e.moveTo(l,s),e.lineTo(l+0,s+14),e.lineTo(l+4,s+9),e.lineTo(l+11,s+8),e.closePath(),e.stroke(),e.fill(),e.fillStyle=h,e.strokeStyle=h,e.lineWidth=2,e.lineJoin="round",e.beginPath(),b?(e.moveTo(l-1,s-1),e.lineTo(l-1,s+15),e.lineTo(l+5,s+10),e.lineTo(l+12,s+9),e.closePath(),e.fill()):(e.moveTo(l,s),e.lineTo(l+0,s+14),e.lineTo(l+4,s+9),e.lineTo(l+11,s+8),e.closePath(),e.fill(),e.stroke());let y=o.remotePointerUsernames.get(i)||"";if(!d&&y){e.font="600 12px sans-serif";let x=(w?l+0:l)+m/2,v=(w?s+0:s)+p+2,I=5,C=3,P=e.measureText(y),k=P.actualBoundingBoxDescent+P.actualBoundingBoxAscent,N=Math.max(k,12),_=x-1,L=v-1,B=P.width+2+I*2+2,G=N+2+C*2+2;if(e.roundRect?(e.beginPath(),e.roundRect(_,L,B,G,8),e.fillStyle=h,e.fill(),e.strokeStyle=Ic,e.stroke(),w&&(e.beginPath(),e.roundRect(_-2,L-2,B+4,G+4,8),e.strokeStyle=E,e.stroke())):vc(e,_,L,B,G,8,Ic),e.fillStyle=bM,e.fillText(y,x+I+1,v+C+P.actualBoundingBoxAscent+Math.floor((N-k)/2)+2),w){e.fillStyle=E;let j=8,H=8,Y=5;e.fillRect(_+B+H,L+(G/2-j/2),2,j),e.fillRect(_+B+H+Y,L+(G/2-j*2/2),2,j*2),e.fillRect(_+B+H+Y*2,L+(G/2-j/2),2,j)}}e.restore(),e.closePath()}};import wM from"clsx";import{useState as vM}from"react";import{jsx as ux}from"react/jsx-runtime";var cu=({color:e,onClick:o,name:t,src:n,className:r})=>{let i=mx(t),[a,l]=vM(!1),s=!a&&n,c=s?void 0:{background:e};return ux("div",{className:wM("Avatar",r),style:c,onClick:o,children:s?ux("img",{className:"Avatar-img",src:n,alt:i,referrerPolicy:"no-referrer",onError:()=>l(!0)}):i})};import{jsx as ko,jsxs as Tc}from"react/jsx-runtime";var SM=F({name:"goToCollaborator",label:"Go to a collaborator",viewMode:!0,trackEvent:{category:"collab"},perform:(e,o,t)=>(TM(t,"actionGoToCollaborator: collaborator should be defined when actionGoToCollaborator is called"),!t.socketId||o.userToFollow?.socketId===t.socketId||t.isCurrentUser?{appState:{...o,userToFollow:null},captureUpdate:hx.EVENTUALLY}:{appState:{...o,userToFollow:{socketId:t.socketId,username:t.username||""},openMenu:o.openMenu==="canvas"?null:o.openMenu},captureUpdate:hx.EVENTUALLY}),PanelComponent:({updateData:e,data:o,appState:t})=>{let{socketId:n,collaborator:r,withName:i,isBeingFollowed:a}=o,l=cr(n,r),s=IM({"is-followed":a,"is-current-user":r.isCurrentUser===!0,"is-speaking":r.isSpeaking,"is-in-call":r.isInCall,"is-muted":r.isMuted}),c=r.isInCall?r.isSpeaking?Tc("div",{className:"UserList__collaborator-status-icon-speaking-indicator",title:g("userList.hint.isSpeaking"),children:[ko("div",{}),ko("div",{}),ko("div",{})]}):r.isMuted?ko("div",{className:"UserList__collaborator-status-icon-microphone-muted",title:g("userList.hint.micMuted"),children:$0}):ko("div",{title:g("userList.hint.inCall"),children:Z0}):null;return i?Tc("div",{className:`dropdown-menu-item dropdown-menu-item-base UserList__collaborator ${s}`,style:{"--avatar-size":"1.5rem"},onClick:()=>e(r),children:[ko(cu,{color:l,onClick:()=>{},name:r.username||"",src:r.avatarUrl,className:s}),ko("div",{className:"UserList__collaborator-name",children:r.username}),Tc("div",{className:"UserList__collaborator-status-icons","aria-hidden":!0,children:[a&&ko("div",{className:"UserList__collaborator-status-icon-is-followed",title:g("userList.hint.followStatus"),children:Qn}),c]})]}):Tc("div",{className:`UserList__collaborator UserList__collaborator--avatar-only ${s}`,children:[ko(cu,{color:l,onClick:()=>{e(r)},name:r.username||"",src:r.avatarUrl,className:s}),c&&ko("div",{className:"UserList__collaborator-status-icon",children:c})]})}});import{LIBRARY_DISABLED_TYPES as CM,randomId as kM}from"@excalidraw/common";import{deepCopyElement as MM}from"@excalidraw/element";import{CaptureUpdateAction as du}from"@excalidraw/element";var mu=F({name:"addToLibrary",trackEvent:{category:"element"},perform:(e,o,t,n)=>{let r=n.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});for(let i of CM)if(r.some(a=>a.type===i))return{captureUpdate:du.EVENTUALLY,appState:{...o,errorMessage:g(`errors.libraryElementTypeError.${i}`)}};return n.library.getLatestLibrary().then(i=>n.library.setLibrary([{id:kM(),status:"unpublished",elements:r.map(MM),created:Date.now()},...i])).then(()=>({captureUpdate:du.EVENTUALLY,appState:{...o,toast:{message:g("toast.addedToLibrary")}}})).catch(i=>({captureUpdate:du.EVENTUALLY,appState:{...o,errorMessage:i.message}}))},label:"labels.addToLibrary"});import{getNonDeletedElements as bi}from"@excalidraw/element";import{isFrameLikeElement as PM}from"@excalidraw/element";import{updateFrameMembershipOfSelectedElements as LM}from"@excalidraw/element";import{KEYS as Cn,arrayToMap as AM}from"@excalidraw/common";import{alignElements as _M}from"@excalidraw/element";import{CaptureUpdateAction as Ei}from"@excalidraw/element";import{getSelectedElementsByGroup as DM}from"@excalidraw/element";import{jsx as yi}from"react/jsx-runtime";var Ze=(e,o)=>{let t=o.scene.getSelectedElements(e);return DM(t,o.scene.getNonDeletedElementsMap(),e).length>1&&!t.some(n=>PM(n))},xi=(e,o,t,n)=>{let r=t.scene.getSelectedElements(o),i=_M(r,n,t.scene,o),a=AM(i);return LM(e.map(l=>a.get(l.id)||l),o,t)},RM=F({name:"alignTop",label:"labels.alignTop",icon:zm,trackEvent:{category:"element"},predicate:(e,o,t,n)=>Ze(o,n),perform:(e,o,t,n)=>({appState:o,elements:xi(e,o,n,{position:"start",axis:"y"}),captureUpdate:Ei.IMMEDIATELY}),keyTest:e=>e[Cn.CTRL_OR_CMD]&&e.shiftKey&&e.key===Cn.ARROW_UP,PanelComponent:({elements:e,appState:o,updateData:t,app:n})=>yi(V,{hidden:!Ze(o,n),type:"button",icon:zm,onClick:()=>t(null),title:`${g("labels.alignTop")} \u2014 ${A("CtrlOrCmd+Shift+Up")}`,"aria-label":g("labels.alignTop"),visible:ve(bi(e),o)})}),NM=F({name:"alignBottom",label:"labels.alignBottom",icon:Hm,trackEvent:{category:"element"},predicate:(e,o,t,n)=>Ze(o,n),perform:(e,o,t,n)=>({appState:o,elements:xi(e,o,n,{position:"end",axis:"y"}),captureUpdate:Ei.IMMEDIATELY}),keyTest:e=>e[Cn.CTRL_OR_CMD]&&e.shiftKey&&e.key===Cn.ARROW_DOWN,PanelComponent:({elements:e,appState:o,updateData:t,app:n})=>yi(V,{hidden:!Ze(o,n),type:"button",icon:Hm,onClick:()=>t(null),title:`${g("labels.alignBottom")} \u2014 ${A("CtrlOrCmd+Shift+Down")}`,"aria-label":g("labels.alignBottom"),visible:ve(bi(e),o)})}),BM=F({name:"alignLeft",label:"labels.alignLeft",icon:Gm,trackEvent:{category:"element"},predicate:(e,o,t,n)=>Ze(o,n),perform:(e,o,t,n)=>({appState:o,elements:xi(e,o,n,{position:"start",axis:"x"}),captureUpdate:Ei.IMMEDIATELY}),keyTest:e=>e[Cn.CTRL_OR_CMD]&&e.shiftKey&&e.key===Cn.ARROW_LEFT,PanelComponent:({elements:e,appState:o,updateData:t,app:n})=>yi(V,{hidden:!Ze(o,n),type:"button",icon:Gm,onClick:()=>t(null),title:`${g("labels.alignLeft")} \u2014 ${A("CtrlOrCmd+Shift+Left")}`,"aria-label":g("labels.alignLeft"),visible:ve(bi(e),o)})}),FM=F({name:"alignRight",label:"labels.alignRight",icon:Um,trackEvent:{category:"element"},predicate:(e,o,t,n)=>Ze(o,n),perform:(e,o,t,n)=>({appState:o,elements:xi(e,o,n,{position:"end",axis:"x"}),captureUpdate:Ei.IMMEDIATELY}),keyTest:e=>e[Cn.CTRL_OR_CMD]&&e.shiftKey&&e.key===Cn.ARROW_RIGHT,PanelComponent:({elements:e,appState:o,updateData:t,app:n})=>yi(V,{hidden:!Ze(o,n),type:"button",icon:Um,onClick:()=>t(null),title:`${g("labels.alignRight")} \u2014 ${A("CtrlOrCmd+Shift+Right")}`,"aria-label":g("labels.alignRight"),visible:ve(bi(e),o)})}),OM=F({name:"alignVerticallyCentered",label:"labels.centerVertically",icon:Wm,trackEvent:{category:"element"},predicate:(e,o,t,n)=>Ze(o,n),perform:(e,o,t,n)=>({appState:o,elements:xi(e,o,n,{position:"center",axis:"y"}),captureUpdate:Ei.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:n})=>yi(V,{hidden:!Ze(o,n),type:"button",icon:Wm,onClick:()=>t(null),title:g("labels.centerVertically"),"aria-label":g("labels.centerVertically"),visible:ve(bi(e),o)})}),zM=F({name:"alignHorizontallyCentered",label:"labels.centerHorizontally",icon:Ym,trackEvent:{category:"element"},predicate:(e,o,t,n)=>Ze(o,n),perform:(e,o,t,n)=>({appState:o,elements:xi(e,o,n,{position:"center",axis:"x"}),captureUpdate:Ei.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:n})=>yi(V,{hidden:!Ze(o,n),type:"button",icon:Ym,onClick:()=>t(null),title:g("labels.centerHorizontally"),"aria-label":g("labels.centerHorizontally"),visible:ve(bi(e),o)})});import{getNonDeletedElements as gx}from"@excalidraw/element";import{isFrameLikeElement as HM}from"@excalidraw/element";import{CODES as fx,KEYS as bx,arrayToMap as GM}from"@excalidraw/common";import{updateFrameMembershipOfSelectedElements as UM}from"@excalidraw/element";import{distributeElements as WM}from"@excalidraw/element";import{CaptureUpdateAction as Ex}from"@excalidraw/element";import{getSelectedElementsByGroup as YM}from"@excalidraw/element";import{jsx as wx}from"react/jsx-runtime";var xx=(e,o)=>{let t=o.scene.getSelectedElements(e);return YM(t,o.scene.getNonDeletedElementsMap(),e).length>2&&!t.some(n=>HM(n))},yx=(e,o,t,n)=>{let r=t.scene.getSelectedElements(o),i=WM(r,t.scene.getNonDeletedElementsMap(),n,o),a=GM(i);return UM(e.map(l=>a.get(l.id)||l),o,t)},VM=F({name:"distributeHorizontally",label:"labels.distributeHorizontally",trackEvent:{category:"element"},perform:(e,o,t,n)=>({appState:o,elements:yx(e,o,n,{space:"between",axis:"x"}),captureUpdate:Ex.IMMEDIATELY}),keyTest:e=>!e[bx.CTRL_OR_CMD]&&e.altKey&&e.code===fx.H,PanelComponent:({elements:e,appState:o,updateData:t,app:n})=>wx(V,{hidden:!xx(o,n),type:"button",icon:e0,onClick:()=>t(null),title:`${g("labels.distributeHorizontally")} \u2014 ${A("Alt+H")}`,"aria-label":g("labels.distributeHorizontally"),visible:ve(gx(e),o)})}),XM=F({name:"distributeVertically",label:"labels.distributeVertically",trackEvent:{category:"element"},perform:(e,o,t,n)=>({appState:o,elements:yx(e,o,n,{space:"between",axis:"y"}),captureUpdate:Ex.IMMEDIATELY}),keyTest:e=>!e[bx.CTRL_OR_CMD]&&e.altKey&&e.code===fx.V,PanelComponent:({elements:e,appState:o,updateData:t,app:n})=>wx(V,{hidden:!xx(o,n),type:"button",icon:t0,onClick:()=>t(null),title:`${g("labels.distributeVertically")} \u2014 ${A("Alt+V")}`,"aria-label":g("labels.distributeVertically"),visible:ve(gx(e),o)})});import{arrayToMap as vx,KEYS as KM,matchKey as ZM}from"@excalidraw/common";import{CaptureUpdateAction as $M}from"@excalidraw/element";import{updateFrameMembershipOfSelectedElements as jM}from"@excalidraw/element/frame";import{arrangeElements as qM}from"@excalidraw/element/arrange";import{jsx as tP}from"react/jsx-runtime";var JM=(e,o,t)=>{let n=t.scene.getSelectedElements(o),r=vx(e),i=qM(t.scene,n,r,o.arrangeConfiguration.algorithm,o.arrangeConfiguration.gap),a=vx(i);return jM(e.map(l=>a.get(l.id)||l),o,t)},QM=Ze,eP=F({name:"arrangeElements",label:"labels.arrangeElements",keywords:["arrange","rearrange","spread"],icon:qm,trackEvent:{category:"element"},viewMode:!1,predicate:(e,o,t,n)=>QM(o,n),perform:(e,o,t,n)=>({appState:o,elements:JM(e,o,n),captureUpdate:$M.IMMEDIATELY}),keyTest:e=>e.shiftKey&&ZM(e,KM.R),PanelComponent:({updateData:e})=>tP("button",{type:"button",className:"arrangeButton",onClick:()=>e(null),title:`${g("labels.arrangeElements")} \u2014 ${A("Shift+R")}`,children:qm})});import{arrayToMap as Ix}from"@excalidraw/common";import{CaptureUpdateAction as oP}from"@excalidraw/element";import{updateFrameMembershipOfSelectedElements as nP}from"@excalidraw/element/frame";import{normaliseElements as rP}from"@excalidraw/element/normalise";import{jsx as lP}from"react/jsx-runtime";var iP=(e,o,t)=>{let n=t.scene.getSelectedElements(o),r=Ix(e),i=rP(t.scene,n,r,o.normaliseConfiguration.mode,o.normaliseConfiguration.metric),a=Ix(i);return nP(e.map(l=>a.get(l.id)||l),o,t)},aP=Ze,pu=F({name:"normaliseElements",label:"labels.normaliseElements",keywords:["normalize","normalise","scale","size","image"],icon:Jm,trackEvent:{category:"element"},viewMode:!1,predicate:(e,o,t,n)=>aP(o,n),perform:(e,o,t,n)=>({appState:o,elements:iP(e,o,n),captureUpdate:oP.IMMEDIATELY}),PanelComponent:({updateData:e})=>lP("button",{type:"button",className:"arrangeButton",onClick:()=>e(null),title:g("labels.normaliseElements"),children:Jm})});import{getNonDeletedElements as sP}from"@excalidraw/element";import{bindOrUnbindBindingElements as cP}from"@excalidraw/element";import{getCommonBoundingBox as Tx}from"@excalidraw/element";import{newElementWith as dP}from"@excalidraw/element";import{deepCopyElement as mP}from"@excalidraw/element";import{resizeMultipleElements as pP}from"@excalidraw/element";import{isArrowElement as Sx,isElbowArrow as uP}from"@excalidraw/element";import{updateFrameMembershipOfSelectedElements as Cx}from"@excalidraw/element";import{CODES as kx,KEYS as hP,arrayToMap as gP}from"@excalidraw/common";import{CaptureUpdateAction as Mx}from"@excalidraw/element";var uu=F({name:"flipHorizontal",label:"labels.flipHorizontal",icon:Q0,trackEvent:{category:"element"},perform:(e,o,t,n)=>({elements:Cx(Px(e,n.scene.getNonDeletedElementsMap(),o,"horizontal",n),o,n),appState:o,captureUpdate:Mx.IMMEDIATELY}),keyTest:e=>e.shiftKey&&e.code===kx.H}),hu=F({name:"flipVertical",label:"labels.flipVertical",icon:J0,trackEvent:{category:"element"},perform:(e,o,t,n)=>({elements:Cx(Px(e,n.scene.getNonDeletedElementsMap(),o,"vertical",n),o,n),appState:o,captureUpdate:Mx.IMMEDIATELY}),keyTest:e=>e.shiftKey&&e.code===kx.V&&!e[hP.CTRL_OR_CMD]}),Px=(e,o,t,n,r)=>{let i=q(sP(e),t,{includeBoundTextElement:!0,includeElementsInFrames:!0}),a=fP(i,o,n,r),l=gP(a);return e.map(s=>l.get(s.id)||s)},fP=(e,o,t,n)=>{if(e.every(d=>Sx(d)&&(d.startBinding||d.endBinding)))return e.map(d=>{let h=d;return dP(h,{startArrowhead:h.endArrowhead,endArrowhead:h.startArrowhead})});let{midX:r,midY:i}=Tx(e);pP(e,o,"nw",n.scene,new Map(Array.from(o.values()).map(d=>[d.id,mP(d)])),{flipByX:t==="horizontal",flipByY:t==="vertical",shouldResizeFromCenter:!0,shouldMaintainAspectRatio:!0}),cP(e.filter(Sx),n.scene,n.state);let{elbowArrows:a,otherElements:l}=e.reduce((d,h)=>uP(h)?{...d,elbowArrows:d.elbowArrows.concat(h)}:{...d,otherElements:d.otherElements.concat(h)},{elbowArrows:[],otherElements:[]}),{midX:s,midY:c}=Tx(e),[m,p]=[r-s,i-c];return l.forEach(d=>n.scene.mutateElement(d,{x:d.x+m,y:d.y+p})),a.forEach(d=>n.scene.mutateElement(d,{x:d.x+m,y:d.y+p})),e};import{isTextElement as bP}from"@excalidraw/element";import{getTextFromElements as EP}from"@excalidraw/element";import{CODES as xP,KEYS as Lx,isFirefox as yP}from"@excalidraw/common";import{CaptureUpdateAction as Bt}from"@excalidraw/element";var wi=F({name:"copy",label:"labels.copy",icon:ba,trackEvent:{category:"element"},perform:async(e,o,t,n)=>{let r=n.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});try{await hc(r,n.files,t)}catch(i){return{captureUpdate:Bt.EVENTUALLY,appState:{...o,errorMessage:i.message}}}return{captureUpdate:Bt.EVENTUALLY}},keyTest:void 0}),gu=F({name:"paste",label:"labels.paste",trackEvent:{category:"element"},perform:async(e,o,t,n)=>{let r;try{r=await qE()}catch(i){return i.name==="AbortError"||i.name==="NotAllowedError"?!1:(console.error(`actionPaste ${i.name}: ${i.message}`),yP?{captureUpdate:Bt.EVENTUALLY,appState:{...o,errorMessage:g("hints.firefox_clipboard_write")}}:{captureUpdate:Bt.EVENTUALLY,appState:{...o,errorMessage:g("errors.asyncPasteFailedOnRead")}})}try{n.pasteFromClipboard($E({types:r}))}catch(i){return console.error(i),{captureUpdate:Bt.EVENTUALLY,appState:{...o,errorMessage:g("errors.asyncPasteFailedOnParse")}}}return{captureUpdate:Bt.EVENTUALLY}},keyTest:void 0}),Sc=F({name:"cut",label:"labels.cut",icon:z0,trackEvent:{category:"element"},perform:(e,o,t,n)=>(wi.perform(e,o,t,n),Sa.perform(e,o,null,n)),keyTest:e=>e[Lx.CTRL_OR_CMD]&&e.key===Lx.X}),Cc=F({name:"copyAsSvg",label:"labels.copyAsSvg",icon:eb,trackEvent:{category:"element"},perform:async(e,o,t,n)=>{if(!n.canvas)return{captureUpdate:Bt.EVENTUALLY};let{exportedElements:r,exportingFrame:i}=ir(e,o,!0);try{await ar("clipboard-svg",r,o,n.files,{...o,exportingFrame:i,name:n.getName()});let a=n.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});return{appState:{toast:{message:g("toast.copyToClipboardAsSvg",{exportSelection:a.length?g("toast.selection"):g("toast.canvas"),exportColorScheme:o.exportWithDarkMode?g("buttons.darkMode"):g("buttons.lightMode")})}},captureUpdate:Bt.EVENTUALLY}}catch(a){return console.error(a),{appState:{errorMessage:a.message},captureUpdate:Bt.EVENTUALLY}}},predicate:e=>uc&&e.length>0,keywords:["svg","clipboard","copy"]}),kc=F({name:"copyAsPng",label:"labels.copyAsPng",icon:tb,trackEvent:{category:"element"},perform:async(e,o,t,n)=>{if(!n.canvas)return{captureUpdate:Bt.EVENTUALLY};let r=n.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),{exportedElements:i,exportingFrame:a}=ir(e,o,!0);try{return await ar("clipboard",i,o,n.files,{...o,exportingFrame:a,name:n.getName()}),{appState:{...o,toast:{message:g("toast.copyToClipboardAsPng",{exportSelection:r.length?g("toast.selection"):g("toast.canvas"),exportColorScheme:o.exportWithDarkMode?g("buttons.darkMode"):g("buttons.lightMode")})}},captureUpdate:Bt.EVENTUALLY}}catch(l){return console.error(l),{appState:{...o,errorMessage:l.message},captureUpdate:Bt.EVENTUALLY}}},predicate:e=>Sn&&e.length>0,keyTest:e=>e.code===xP.C&&e.altKey&&e.shiftKey,keywords:["png","clipboard","copy"]}),Mc=F({name:"copyText",label:"labels.copyText",trackEvent:{category:"element"},perform:(e,o,t,n)=>{let r=n.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0});try{mo(EP(r))}catch{throw new Error(g("errors.copyToSystemClipboardFailed"))}return{captureUpdate:Bt.EVENTUALLY}},predicate:(e,o,t,n)=>uc&&n.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0}).some(bP),keywords:["text","clipboard","copy"]});import{CODES as wP,KEYS as vP}from"@excalidraw/common";import{CaptureUpdateAction as IP}from"@excalidraw/element";var Pc=F({name:"gridMode",icon:ib,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:IP.EVENTUALLY}},checked:e=>e.gridModeEnabled,predicate:(e,o,t)=>t.gridModeEnabled===void 0,keyTest:e=>e[vP.CTRL_OR_CMD]&&e.code===wP.QUOTE});import{CODES as TP,KEYS as SP}from"@excalidraw/common";import{CaptureUpdateAction as CP}from"@excalidraw/element";var vi=F({name:"zenMode",label:"buttons.zenMode",icon:nb,viewMode:!0,trackEvent:{category:"canvas",predicate:e=>!e.zenModeEnabled},perform(e,o){return{appState:{...o,zenModeEnabled:!this.checked(o)},captureUpdate:CP.EVENTUALLY}},checked:e=>e.zenModeEnabled,predicate:(e,o,t,n)=>n.editorInterface.formFactor!=="phone"&&typeof t.zenModeEnabled>"u",keyTest:e=>!e[SP.CTRL_OR_CMD]&&e.altKey&&e.code===TP.Z});import{CODES as kP,KEYS as MP}from"@excalidraw/common";import{CaptureUpdateAction as PP}from"@excalidraw/element";var fu=F({name:"objectsSnapMode",label:"buttons.objectsSnapMode",icon:ob,viewMode:!1,trackEvent:{category:"canvas",predicate:e=>!e.objectsSnapModeEnabled},perform(e,o){return{appState:{...o,objectsSnapModeEnabled:!this.checked(o),gridModeEnabled:!1},captureUpdate:PP.EVENTUALLY}},checked:e=>e.objectsSnapModeEnabled,predicate:(e,o,t)=>typeof t.objectsSnapModeEnabled>"u",keyTest:e=>!e[MP.CTRL_OR_CMD]&&e.altKey&&e.code===kP.S});import{CODES as LP,KEYS as AP}from"@excalidraw/common";import{CaptureUpdateAction as _P}from"@excalidraw/element";var Ii=F({name:"stats",label:"stats.fullTitle",icon:q0,viewMode:!0,trackEvent:{category:"menu"},keywords:["edit","attributes","customize"],perform(e,o){return{appState:{...o,stats:{...o.stats,open:!this.checked(o)}},captureUpdate:_P.EVENTUALLY}},checked:e=>e.stats.open,keyTest:e=>!e[AP.CTRL_OR_CMD]&&e.altKey&&e.code===LP.SLASH});import{BOUND_TEXT_PADDING as Ax,ROUNDNESS as _x,TEXT_ALIGN as Nx,VERTICAL_ALIGN as Bx,arrayToMap as Fx,getFontString as DP}from"@excalidraw/common";import{getOriginalContainerHeightFromCache as RP,isBoundToContainer as Dx,resetOriginalContainerCache as NP,updateOriginalContainerCache as BP}from"@excalidraw/element";import{computeBoundTextPosition as FP,computeContainerDimensionForBoundText as Rx,getBoundTextElement as Ox,redrawTextBoundingBox as zx}from"@excalidraw/element";import{hasBoundTextElement as OP,isArrowElement as zP,isTextBindableContainer as bu,isTextElement as $a,isUsingAdaptiveRadius as HP}from"@excalidraw/element";import{measureText as GP}from"@excalidraw/element";import{syncMovedIndices as Hx}from"@excalidraw/element";import{newElement as UP}from"@excalidraw/element";import{CaptureUpdateAction as Eu}from"@excalidraw/element";var xu=F({name:"unbindText",label:"labels.unbindText",trackEvent:{category:"element"},predicate:(e,o,t,n)=>n.scene.getSelectedElements(o).some(i=>OP(i)),perform:(e,o,t,n)=>{let r=n.scene.getSelectedElements(o),i=n.scene.getNonDeletedElementsMap();return r.forEach(a=>{let l=Ox(a,i);if(l){let{width:s,height:c}=GP(l.originalText,DP(l),l.lineHeight),m=RP(a.id);NP(a.id);let{x:p,y:d}=FP(a,l,i);n.scene.mutateElement(l,{containerId:null,width:s,height:c,text:l.originalText,x:p,y:d}),n.scene.mutateElement(a,{boundElements:a.boundElements?.filter(h=>h.id!==l.id),height:m||a.height})}}),{elements:e,appState:o,captureUpdate:Eu.IMMEDIATELY}}}),yu=F({name:"bindText",label:"labels.bindText",trackEvent:{category:"element"},predicate:(e,o,t,n)=>{let r=n.scene.getSelectedElements(o);if(r.length===2){let i=$a(r[0])||$a(r[1]),a;if(bu(r[0])?a=r[0]:bu(r[1])&&(a=r[1]),i&&a&&Ox(a,n.scene.getNonDeletedElementsMap())===null)return!0}return!1},perform:(e,o,t,n)=>{let r=n.scene.getSelectedElements(o),i,a;$a(r[0])&&bu(r[1])?(i=r[0],a=r[1]):(i=r[1],a=r[0]),n.scene.mutateElement(i,{containerId:a.id,verticalAlign:Bx.MIDDLE,textAlign:Nx.CENTER,autoResize:!0,angle:zP(a)?0:a?.angle??0}),n.scene.mutateElement(a,{boundElements:(a.boundElements||[]).concat({type:"text",id:i.id})});let l=a.height;return zx(i,a,n.scene),BP(a.id,l),{elements:WP(e,a,i),appState:{...o,selectedElementIds:{[a.id]:!0}},captureUpdate:Eu.IMMEDIATELY}}}),WP=(e,o,t)=>{let n=e.slice(),r=n.findIndex(a=>a.id===t.id);n.splice(r,1);let i=n.findIndex(a=>a.id===o.id);return n.splice(i+1,0,t),Hx(n,Fx([o,t])),n},YP=(e,o,t)=>{let n=e.slice(),r=n.findIndex(a=>a.id===o.id);n.splice(r,1);let i=n.findIndex(a=>a.id===t.id);return n.splice(i,0,o),Hx(n,Fx([o,t])),n},Gx=F({name:"wrapTextInContainer",label:"labels.createContainerFromText",trackEvent:{category:"element"},predicate:(e,o,t,n)=>{let r=n.scene.getSelectedElements(o),i=r.some(a=>$a(a)&&!Dx(a));return r.length>0&&i},perform:(e,o,t,n)=>{let r=n.scene.getSelectedElements(o),i=e.slice(),a={};for(let l of r)if($a(l)&&!Dx(l)){let s=UP({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:HP("rectangle")?_x.ADAPTIVE_RADIUS:_x.PROPORTIONAL_RADIUS}:null,opacity:100,locked:!1,x:l.x-Ax,y:l.y-Ax,width:Rx(l.width,"rectangle"),height:Rx(l.height,"rectangle"),groupIds:l.groupIds,frameId:l.frameId});if(l.boundElements?.length){let c=l.boundElements.filter(p=>p.type==="arrow").map(p=>p.id);i.filter(p=>c.includes(p.id)).forEach(p=>{let d=p.startBinding,h=p.endBinding;d?.elementId===l.id&&(d={...d,elementId:s.id}),h?.elementId===l.id&&(h={...h,elementId:s.id}),(d||h)&&n.scene.mutateElement(p,{startBinding:d,endBinding:h})})}n.scene.mutateElement(l,{containerId:s.id,verticalAlign:Bx.MIDDLE,boundElements:null,textAlign:Nx.CENTER,autoResize:!0}),zx(l,s,n.scene),i=YP([...i,s],s,l),a[s.id]=!0}return{elements:i,appState:{...o,selectedElementIds:a},captureUpdate:Eu.IMMEDIATELY}}});import{isEmbeddableElement as lL}from"@excalidraw/element";import{KEYS as qx}from"@excalidraw/common";import{CaptureUpdateAction as sL}from"@excalidraw/element";import{pointFrom as Vx}from"@excalidraw/math";import VP from"clsx";import{useCallback as Ux,useEffect as Wx,useLayoutEffect as XP,useRef as KP,useState as ZP}from"react";import{EVENT as wu,HYPERLINK_TOOLTIP_DELAY as $P,KEYS as Lc}from"@excalidraw/common";import{getElementAbsoluteCoords as Cu}from"@excalidraw/element";import{hitElementBoundingBox as jP}from"@excalidraw/element";import{isElementLink as qP}from"@excalidraw/element";import{getEmbedLink as JP,embeddableURLValidator as QP}from"@excalidraw/element";import{sceneCoordsToViewportCoords as Xx,viewportCoordsToSceneCoords as eL,wrapEvent as tL,isLocalLink as oL,normalizeLink as vu}from"@excalidraw/common";import{isEmbeddableElement as Iu}from"@excalidraw/element";import{jsx as Ti,jsxs as Yx}from"react/jsx-runtime";var ku=380,nL=42,Tu=5,Kx=85,rL=500,Su=!1,Ac=new Map,Zx=({element:e,scene:o,setAppState:t,onLinkOpen:n,setToast:r,updateEmbedValidationStatus:i})=>{let a=o.getNonDeletedElementsMap(),l=vo(),s=Io(),c=de(),m=e.link||"",[p,d]=ZP(m),h=KP(null),f=l.showHyperlinkPopup==="editor",b=Ux(()=>{if(!h.current)return;let v=vu(h.current.value)||null;if(!e.link&&v&&le("hyperlink","create"),Iu(e)){if(l.activeEmbeddable?.element===e&&t({activeEmbeddable:null}),!v){o.mutateElement(e,{link:null}),i(e,!1);return}if(!QP(v,s.validateEmbeddable))v&&r({message:g("toast.unableToEmbed"),closable:!0}),e.link&&Ac.set(e.id,e.link),o.mutateElement(e,{link:v}),i(e,!1);else{let{width:I,height:C}=e,P=JP(v);P?.error instanceof URIError&&r({message:g("toast.unrecognizedLinkFormat"),closable:!0});let k=P?P.intrinsicSize.w/P.intrinsicSize.h:1,N=Ac.get(e.id)!==e.link;o.mutateElement(e,{...N?{width:P?.type==="video"?I>C?I:C*k:I,height:P?.type==="video"&&I>C?I/k:C}:{},link:v}),i(e,!0),Ac.has(e.id)&&Ac.delete(e.id)}}else o.mutateElement(e,{link:v})},[e,o,r,s.validateEmbeddable,l.activeEmbeddable,t,i]);XP(()=>()=>{b()},[b]),Wx(()=>{f&&h?.current&&!(c.formFactor==="phone"||c.isTouchScreen)&&h.current.select()},[f,c.formFactor,c.isTouchScreen]),Wx(()=>{let v=null,I=C=>{if(f)return;v&&clearTimeout(v),aL(e,a,l,Vx(C.clientX,C.clientY))&&(v=window.setTimeout(()=>{t({showHyperlinkPopup:!1})},rL))};return window.addEventListener(wu.POINTER_MOVE,I,!1),()=>{window.removeEventListener(wu.POINTER_MOVE,I,!1),v&&clearTimeout(v)}},[l,e,f,t,a]);let E=Ux(()=>{le("hyperlink","delete"),o.mutateElement(e,{link:null}),t({showHyperlinkPopup:!1})},[t,e,o]),w=()=>{le("hyperlink","edit","popup-ui"),t({showHyperlinkPopup:"editor"})},{x:y,y:x}=$x(e,l,a);return l.contextMenu||l.selectedElementsAreBeingDragged||l.resizingElement||l.isRotating||l.openMenu||l.viewModeEnabled?null:Yx("div",{className:"excalidraw-hyperlinkContainer",style:{top:`${x}px`,left:`${y}px`,width:ku,padding:Tu},children:[f?Ti("input",{className:VP("excalidraw-hyperlinkContainer-input"),placeholder:g("labels.link.hint"),ref:h,value:p,onChange:v=>d(v.target.value),autoFocus:!0,onKeyDown:v=>{v.stopPropagation(),v[Lc.CTRL_OR_CMD]&&v.key===Lc.K&&v.preventDefault(),(v.key===Lc.ENTER||v.key===Lc.ESCAPE)&&(b(),t({showHyperlinkPopup:"info"}))}}):e.link?Ti("a",{href:vu(e.link||""),className:"excalidraw-hyperlinkContainer-link",target:oL(e.link)?"_self":"_blank",onClick:v=>{if(e.link&&n){let I=tL(wu.EXCALIDRAW_LINK,v.nativeEvent);n({...e,link:vu(e.link)},I),I.defaultPrevented&&v.preventDefault()}},rel:"noopener noreferrer",children:e.link}):Ti("div",{className:"excalidraw-hyperlinkContainer-link",children:g("labels.link.empty")}),Yx("div",{className:"excalidraw-hyperlinkContainer__buttons",children:[!f&&Ti(V,{type:"button",title:g("buttons.edit"),"aria-label":g("buttons.edit"),label:g("buttons.edit"),onClick:w,className:"excalidraw-hyperlinkContainer--edit",icon:pn}),Ti(V,{type:"button",title:g("labels.linkToElement"),"aria-label":g("labels.linkToElement"),label:g("labels.linkToElement"),onClick:()=>{t({openDialog:{name:"elementLinkSelector",sourceElementId:e.id}})},icon:Ls}),m&&!Iu(e)&&Ti(V,{type:"button",title:g("buttons.remove"),"aria-label":g("buttons.remove"),label:g("buttons.remove"),onClick:E,className:"excalidraw-hyperlinkContainer--remove",icon:Yo})]})]})},$x=(e,o,t)=>{let[n,r]=Cu(e,t),{x:i,y:a}=Xx({sceneX:n+e.width/2,sceneY:r},o),l=i-o.offsetLeft-ku/2,s=a-o.offsetTop-Kx;return{x:l,y:s}},Mu=(e,o)=>{let t=q(e,o);return Iu(t[0])?"labels.link.editEmbed":t[0]?.link?"labels.link.edit":"labels.link.create"},ja=null,jx=(e,o,t)=>{ja&&clearTimeout(ja),ja=window.setTimeout(()=>iL(e,o,t),$P)},iL=(e,o,t)=>{if(!e.link)return;let n=pi();n.classList.add("excalidraw-tooltip--visible"),n.style.maxWidth="20rem",n.textContent=qP(e.link)?g("labels.link.goToElement"):e.link;let[r,i,a,l]=Cu(e,t),[s,c,m,p]=r1([r,i,a,l],e.angle,o),d=Xx({sceneX:s,sceneY:c},o);Up(n,{left:d.x,top:d.y,width:m,height:p},"top"),le("hyperlink","tooltip","link-icon"),Su=!0},Pu=()=>{ja&&clearTimeout(ja),Su&&(Su=!1,pi().classList.remove("excalidraw-tooltip--visible"))},aL=(e,o,t,[n,r])=>{let{x:i,y:a}=eL({clientX:n,clientY:r},t),l=15/t.zoom.value;if(jP(Vx(i,a),e,o))return!1;let[s,c,m]=Cu(e,o);if(i>=s&&i<=m&&a>=c-Kx&&a<=c)return!1;let{x:p,y:d}=$x(e,t,o);return!(n>=p-l&&n<=p+ku+Tu*2+l&&r>=d-l&&r<=d+l+Tu*2+nL)};import{jsx as cL}from"react/jsx-runtime";var qa=F({name:"hyperlink",label:(e,o)=>Mu(e,o),icon:ya,perform:(e,o)=>o.showHyperlinkPopup==="editor"?!1:{elements:e,appState:{...o,showHyperlinkPopup:"editor",openMenu:null},captureUpdate:sL.IMMEDIATELY},trackEvent:{category:"hyperlink",action:"click"},keyTest:e=>e[qx.CTRL_OR_CMD]&&e.key===qx.K,predicate:(e,o)=>q(e,o).length===1,PanelComponent:({elements:e,appState:o,updateData:t})=>{let n=q(e,o);return cL(V,{type:"button",icon:ya,"aria-label":g(Mu(e,o)),title:`${lL(e[0])?g("labels.link.labelEmbed"):g("labels.link.label")} - ${A("CtrlOrCmd+K")}`,onClick:()=>t(null),selected:n.length===1&&!!n[0].link})}});import{KEYS as Jx,arrayToMap as Au,randomId as dL}from"@excalidraw/common";import{elementsAreInSameGroup as mL,newElementWith as Qx,selectGroupsFromGivenElements as ey}from"@excalidraw/element";import{CaptureUpdateAction as ty}from"@excalidraw/element";var Lu=e=>e.every(o=>!o.locked),Ja=F({name:"toggleElementLock",label:(e,o,t)=>{let n=t.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!1});return Lu(n)?"labels.elementLock.lock":"labels.elementLock.unlock"},icon:(e,o)=>{let t=q(o,e);return Lu(t)?dn:Wo},trackEvent:{category:"element"},predicate:(e,o,t,n)=>{let r=n.scene.getSelectedElements(o);return r.length>0&&!r.some(i=>i.locked&&i.frameId)},perform:(e,o,t,n)=>{let r=n.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});if(!r.length)return!1;let i=Lu(r),a=Au(r),l=r.length>1&&mL(r),c=r.length===1||l?null:dL(),m={...o.lockedMultiSelections};if(i)m={...o.lockedMultiSelections,...c?{[c]:!0}:{}};else if(l){let w=r[0].groupIds.at(-1);delete m[w]}let p=e.map(w=>{if(!a.has(w.id))return w;let y=w.groupIds;return i?c&&(y=[...y,c]):y=y.filter(x=>!o.lockedMultiSelections[x]),Qx(w,{locked:i,groupIds:y.length!==w.groupIds.length?y:w.groupIds})}),d=Au(p),h=i?{}:Object.fromEntries(r.map(w=>[w.id,!0])),f=r.map(w=>d.get(w.id)||w),b=i?{}:ey(f,o),E=i?c||(l?r[0].groupIds.at(-1):r[0].id):null;return{elements:p,appState:{...o,selectedElementIds:h,selectedGroupIds:b,selectedLinearElement:i?null:o.selectedLinearElement,lockedMultiSelections:m,activeLockedId:E},captureUpdate:ty.IMMEDIATELY}},keyTest:(e,o,t,n)=>e.key.toLocaleLowerCase()===Jx.L&&e[Jx.CTRL_OR_CMD]&&e.shiftKey&&n.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!1}).length>0}),oy=F({name:"unlockAllElements",trackEvent:{category:"canvas"},viewMode:!1,icon:Wo,predicate:(e,o)=>q(e,o).length===0&&e.some(n=>n.locked),perform:(e,o)=>{let t=e.filter(a=>a.locked),n=e.map(a=>{if(a.locked){let l=a.groupIds.filter(s=>!o.lockedMultiSelections[s]);return Qx(a,{locked:!1,groupIds:a.groupIds.length!==l.length?l:a.groupIds})}return a}),r=Au(n),i=t.map(a=>r.get(a.id)||a);return{elements:n,appState:{...o,selectedElementIds:Object.fromEntries(t.map(a=>[a.id,!0])),selectedGroupIds:ey(i,o),lockedMultiSelections:{},activeLockedId:null},captureUpdate:ty.IMMEDIATELY}},label:"labels.elementLock.unlockAll"});import{isElbowArrow as L_,isLinearElement as A_,isLineElement as Yi}from"@excalidraw/element";import{arrayToMap as __,invariant as Ah}from"@excalidraw/common";import{toggleLinePolygonState as D_,CaptureUpdateAction as hw}from"@excalidraw/element";import U2 from"clsx";import I8 from"fuzzy";import{useEffect as ad,useRef as W2,useMemo as T8,useState as id}from"react";import{DEFAULT_SIDEBAR as z2,EVENT as sd,KEYS as ho,capitalizeString as S8,isWritableElement as C8}from"@excalidraw/common";import{CaptureUpdateAction as KL}from"@excalidraw/element";import{useEffect as tl,useMemo as ny,useRef as Nu,useState as pL}from"react";import{getLinearElementSubType as ki,updateElbowArrowPoints as uL}from"@excalidraw/element";import{pointFrom as Dc,pointRotateRads as hL}from"@excalidraw/math";import{hasBoundTextElement as gL,isArrowBoundToElement as fL,isArrowElement as bL,isElbowArrow as EL,isLinearElement as zu,isUsingAdaptiveRadius as xL}from"@excalidraw/element";import{getCommonBoundingBox as yL,getElementAbsoluteCoords as wL}from"@excalidraw/element";import{getBoundTextElement as sy,getBoundTextMaxHeight as vL,getBoundTextMaxWidth as IL,redrawTextBoundingBox as TL}from"@excalidraw/element";import{wrapText as SL}from"@excalidraw/element";import{assertNever as CL,CLASSES as kL,getFontString as _u,isProdEnv as ML,mapFind as PL,reduceToCommonValue as LL,updateActiveTool as ry}from"@excalidraw/common";import{measureText as iy}from"@excalidraw/element";import{LinearElementEditor as AL}from"@excalidraw/element";import{newArrowElement as Du,newElement as _L,newLinearElement as DL}from"@excalidraw/element";import{ShapeCache as RL}from"@excalidraw/element";import{updateBindings as NL}from"@excalidraw/element";import{jsx as Ou}from"react/jsx-runtime";var BL=8,FL=10,Qa=["rectangle","diamond","ellipse"],el=["line","sharpArrow","curvedArrow","elbowArrow"],OL=new Set(Qa),zL=new Set(el),Mi=e=>OL.has(e),Nc=e=>e==="arrow"||zL.has(e),uo=Se(null),ol=new Map,nl=new Map,HL=({app:e})=>{let o=e.scene.getSelectedElements(e.state),t=Nu(null);return tl(()=>{if(o.length===0){e.updateEditorAtom(uo,null);return}let n=Pi(o);n&&!t.current?t.current=n:(t.current&&!n||t.current&&n!==t.current)&&(e.updateEditorAtom(uo,null),t.current=null)},[o,e]),tl(()=>()=>{ol.clear(),nl.clear()},[]),Ou(GL,{app:e,elements:o})},GL=({app:e,elements:o})=>{let t=Pi(o),n=ny(()=>t==="generic"?dy(o):[],[t,o]),r=ny(()=>t==="linear"?Fu(o):[],[t,o]),i=t==="generic"?n.every(p=>p.type===n[0].type):t==="linear"?r.every(p=>ki(p)===ki(r[0])):!1,[a,l]=pL({x:0,y:0}),s=Nu(""),c=Nu(null);tl(()=>{let p=[...n,...r].sort((E,w)=>E.id.localeCompare(w.id)),d=`
|
|
8
8
|
${e.state.scrollX}${e.state.scrollY}${e.state.offsetTop}${e.state.offsetLeft}${e.state.zoom.value}${p.map(E=>E.id).join(",")}`;if(d===s.current)return;s.current=d;let h;if(p.length===1){let[E,,,w,y,x]=wL(p[0],e.scene.getNonDeletedElementsMap());h=hL(Dc(E,w),Dc(y,x),p[0].angle)}else{let{minX:E,maxY:w}=yL(p);h=Dc(E,w)}let{x:f,y:b}=py({sceneX:h[0],sceneY:h[1]},e.state);l({x:f,y:b})},[n,r,e.scene,e.state]),tl(()=>{for(let p of r){let d=Bu(p.id,XL(p));nl.has(d)||nl.set(d,p)}},[r]),tl(()=>{for(let p of n)if(!ol.has(p.id)){let d=sy(p,e.scene.getNonDeletedElementsMap());d&&ol.set(p.id,{fontSize:d.fontSize})}},[n,e.scene]);let m=t==="linear"?[["line",xs],["sharpArrow",Zr],["curvedArrow",jr],["elbowArrow",$r]]:t==="generic"?[["rectangle",fs],["diamond",bs],["ellipse",Es]]:[];return Ou("div",{ref:c,tabIndex:-1,style:{position:"absolute",top:`${a.y+(FL+8)*e.state.zoom.value-e.state.offsetTop}px`,left:`${a.x-e.state.offsetLeft-BL}px`,zIndex:2},className:kL.CONVERT_ELEMENT_TYPE_POPUP,children:m.map(([p,d])=>{let h=i&&(t==="generic"&&n[0].type===p||t==="linear"&&ki(r[0])===p);return Ou(V,{className:"Shape",type:"radio",icon:d,checked:h,name:"convertElementType-option",title:p,keyBindingLabel:"","aria-label":p,"data-testid":`toolbar-${p}`,onChange:()=>{e.state.activeTool.type!==p&&le("convertElementType",p,"ui"),Hu(e,{conversionType:t,nextType:p}),c.current?.focus()}},`${o[0].id}${o[0].version}_${p}`)})})},UL=(e,o,t)=>{let n=IL(e,o),r=vL(e,o),i=SL(o.text,_u(o),n),a=iy(i,_u(o),o.lineHeight),l=o.fontSize;for(;(a.width>n||a.height>r)&&l>0;){l-=1;let s={...o,fontSize:l};a=iy(o.text,_u(s),o.lineHeight)}Bc(o,t.getNonDeletedElementsMap(),{fontSize:l,width:a.width,height:a.height}),TL(o,e,t)},Hu=(e,{conversionType:o,nextType:t,direction:n="right"})=>{if(!o)return!1;let r=e.scene.getSelectedElements(e.state),i=r.reduce((l,s)=>({...l,[s.id]:!0}),{}),a=n==="right"?1:-1;if(o==="generic"){let l=dy(r),c=l.every(m=>m.type===l[0].type)?Qa.indexOf(l[0].type):-1;if(t=t??Qa[(c+Qa.length+a)%Qa.length],t&&Mi(t)){let m={};for(let d of l){let h=ly(d,t,e);m[h.id]=h}let p=[];for(let d of e.scene.getElementsIncludingDeleted())m[d.id]?p.push(m[d.id]):p.push(d);e.scene.replaceAllElements(p);for(let d of Object.values(m)){let h=sy(d,e.scene.getNonDeletedElementsMap());h&&(ol.get(d.id)&&Bc(h,e.scene.getNonDeletedElementsMap(),{fontSize:ol.get(d.id)?.fontSize??h.fontSize}),UL(d,h,e.scene))}e.setState(d=>({selectedElementIds:i,activeTool:ry(d,{type:"selection"})}))}}if(o==="linear"){let l=Fu(r);if(!t){let c=LL(l,ki),m=c?el.indexOf(c):-1;t=el[(m+el.length+a)%el.length]}if(Nc(t)){let c=[],m=e.scene.getElementsMapIncludingDeleted();for(let p of l){let d=nl.get(Bu(p.id,t));if(d&&ki(d)===t)m.set(d.id,d),c.push(d);else{let h=ly(p,t,e);m.set(h.id,h),c.push(h)}}e.scene.replaceAllElements(m);for(let p of c)if(zu(p))if(EL(p)){let d=WL(p);if(d.length<2)continue;let h=[];for(let b=1;b<d.length-2;b++)h.push({start:d[b],end:d[b+1],index:b+1});let f=uL(p,e.scene.getNonDeletedElementsMap(),{points:d,fixedSegments:h});Bc(p,e.scene.getNonDeletedElementsMap(),{...f,endArrowhead:"arrow"})}else{let d=PL(["line","sharpArrow","curvedArrow"],h=>nl.get(Bu(p.id,h)));if(d){let h=d.points;e.scene.mutateElement(p,{points:h})}}}let s=Fu(e.scene.getSelectedElements(e.state));e.setState(c=>({selectedElementIds:i,selectedLinearElement:s.length===1?new AL(s[0],e.scene.getNonDeletedElementsMap()):null,activeTool:ry(c,{type:"selection"})}))}return!0},Pi=e=>{if(e.length===0)return null;let o=!1;for(let t of e){if(Mi(t.type))return"generic";cy(t)&&(o=!0)}return o?"linear":null},cy=e=>zu(e)&&(!bL(e)||!fL(e)&&!gL(e)),Bu=(e,o)=>`${e}:${o}`,dy=e=>e.filter(o=>Mi(o.type)),Fu=e=>e.filter(o=>cy(o)),_c=20,Si=(e,o)=>e[0]===o[0],Ru=(e,o)=>e[1]===o[1],ay=(e,o)=>Si(e,o)?Math.abs(e[1]-o[1]):Math.abs(e[0]-o[0]),WL=e=>{let o=[e.points[0]],t=YL(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])<_c?l[0]=a[0]:Math.abs(l[1]-a[1])<_c&&(l[1]=a[1]),Si(a,l)||Ru(a,l)||o.push(Dc(a[0],l[1])),o.push(l)}let n=[o[0]];for(let i=1;i<o.length-1;++i)Si(o[i-1],o[i])&&Si(o[i],o[i+1])||Ru(o[i-1],o[i])&&Ru(o[i],o[i+1])||n.push(o[i]);n.push(o[o.length-1]);let r=[n[0]];for(let i=1;i<n.length-1;++i){let a=r[r.length-1],l=n[i],s=n[i+1],c=Si(a,l),m=Si(l,s);if(c!==m){let p=ay(a,l),d=ay(l,s);if(p<_c||d<_c){if(d<p)c?s[0]=a[0]:s[1]=a[1];else if(m)for(let h=r.length-1;h>=0&&r[h][0]===a[0];--h)r[h][0]=l[0];else for(let h=r.length-1;h>=0&&r[h][1]===a[1];--h)r[h][1]=l[1];continue}}r.push(l)}return r.push(n[n.length-1]),r},YL=e=>{if(e.length===0)return[];let o=[e[0]];for(let t=1;t<e.length;t++){let[n,r]=o[o.length-1],[i,a]=e[t];(n!==i||r!==a)&&o.push(e[t])}return o},ly=(e,o,t)=>{if(!VL(e.type,o)){if(!ML())throw Error(`Invalid conversion from ${e.type} to ${o}.`);return e}if(e.type===o)return e;if(RL.delete(e),Mi(o)){let n=Ci(_L({...e,type:o,roundness:o==="diamond"&&e.roundness?{type:xL(o)?Rc.ADAPTIVE_RADIUS:Rc.PROPORTIONAL_RADIUS}:e.roundness}));return NL(n,t.scene,t.state),n}if(Nc(o))switch(o){case"line":return Ci(DL({...e,type:"line"}));case"sharpArrow":return Ci(Du({...e,type:"arrow",elbowed:!1,roundness:null,startArrowhead:t.state.currentItemStartArrowhead,endArrowhead:t.state.currentItemEndArrowhead}));case"curvedArrow":return Ci(Du({...e,type:"arrow",elbowed:!1,roundness:{type:Rc.PROPORTIONAL_RADIUS},startArrowhead:t.state.currentItemStartArrowhead,endArrowhead:t.state.currentItemEndArrowhead}));case"elbowArrow":return Ci(Du({...e,type:"arrow",elbowed:!0,fixedSegments:null,roundness:null}))}return CL(o,`unhandled conversion type: ${o}`),e},VL=(e,o)=>!!(Mi(e)&&Mi(o)||Nc(e)&&Nc(o)),XL=e=>zu(e)?ki(e):e.type,my=HL;var uy=F({name:"toggleShapeSwitch",label:"labels.shapeSwitch",icon:()=>null,viewMode:!0,trackEvent:{category:"shape_switch",action:"toggle"},keywords:["change","switch","swap"],perform(e,o,t,n){return $e.set(uo,{type:"panel"}),{captureUpdate:KL.NEVER}},checked:e=>e.gridModeEnabled,predicate:(e,o,t)=>Pi(e)!==null});import{canCreateLinkFromElements as Gu,defaultGetElementLinkFromSelection as ZL,getLinkIdAndTypeFromSelection as $L}from"@excalidraw/element";import{CaptureUpdateAction as rl}from"@excalidraw/element";var Fc=F({name:"copyElementLink",label:"labels.copyElementLink",icon:Vr,trackEvent:{category:"element"},perform:async(e,o,t,n)=>{let r=q(e,o);try{if(window.location){let i=$L(r,o);return i?(await mo(n.props.generateLinkForSelection?n.props.generateLinkForSelection(i.id,i.type):ZL(i.id,i.type)),{appState:{toast:{message:g("toast.elementLinkCopied"),closable:!0}},captureUpdate:rl.EVENTUALLY}):{appState:o,elements:e,app:n,captureUpdate:rl.EVENTUALLY}}}catch(i){console.error(i)}return{appState:o,elements:e,app:n,captureUpdate:rl.EVENTUALLY}},predicate:(e,o)=>Gu(q(e,o))}),hy=F({name:"linkToElement",label:"labels.linkToElement",icon:Ls,perform:(e,o,t,n)=>{let r=q(e,o);return r.length!==1||!Gu(r)?{elements:e,appState:o,app:n,captureUpdate:rl.EVENTUALLY}:{appState:{...o,openDialog:{name:"elementLinkSelector",sourceElementId:q(e,o)[0].id}},captureUpdate:rl.IMMEDIATELY}},predicate:(e,o,t,n)=>{let r=q(e,o);return o.openDialog?.name!=="elementLinkSelector"&&r.length===1&&Gu(r)},trackEvent:!1});import{isDarwin as gy}from"@excalidraw/common";var jL={toggleTheme:[A("Shift+Alt+D")],saveScene:[A("CtrlOrCmd+S")],loadScene:[A("CtrlOrCmd+O")],imageExport:[A("CtrlOrCmd+Shift+E")],commandPalette:[A("CtrlOrCmd+/"),A("CtrlOrCmd+Shift+P")],cut:[A("CtrlOrCmd+X")],copy:[A("CtrlOrCmd+C")],paste:[A("CtrlOrCmd+V")],copyStyles:[A("CtrlOrCmd+Alt+C")],pasteStyles:[A("CtrlOrCmd+Alt+V")],selectAll:[A("CtrlOrCmd+A")],deleteSelectedElements:[A("Delete")],duplicateSelection:[A("CtrlOrCmd+D"),A(`Alt+${g("helpDialog.drag")}`)],sendBackward:[A("CtrlOrCmd+[")],bringForward:[A("CtrlOrCmd+]")],sendToBack:[gy?A("CtrlOrCmd+Alt+["):A("CtrlOrCmd+Shift+[")],bringToFront:[gy?A("CtrlOrCmd+Alt+]"):A("CtrlOrCmd+Shift+]")],copyAsPng:[A("Shift+Alt+C")],group:[A("CtrlOrCmd+G")],ungroup:[A("CtrlOrCmd+Shift+G")],gridMode:[A("CtrlOrCmd+'")],zenMode:[A("Alt+Z")],objectsSnapMode:[A("Alt+S")],stats:[A("Alt+/")],addToLibrary:[],flipHorizontal:[A("Shift+H")],flipVertical:[A("Shift+V")],viewMode:[A("Alt+R")],hyperlink:[A("CtrlOrCmd+K")],toggleElementLock:[A("CtrlOrCmd+Shift+L")],resetZoom:[A("CtrlOrCmd+0")],zoomOut:[A("CtrlOrCmd+-")],zoomIn:[A("CtrlOrCmd++")],zoomToFitSelection:[A("Shift+3")],zoomToFit:[A("Shift+1")],zoomToFitSelectionInViewport:[A("Shift+2")],toggleEraserTool:[A("E")],toggleHandTool:[A("H")],setFrameAsActiveTool:[A("F")],saveFileToDisk:[A("CtrlOrCmd+S")],saveToActiveFile:[A("CtrlOrCmd+S")],toggleShortcuts:[A("?")],searchMenu:[A("CtrlOrCmd+F")],wrapSelectionInFrame:[],arrangeElements:[A("Shift+R")]},Ae=(e,o=0)=>{let t=jL[e];return t&&t.length>0?t[o]||t[0]:""};var qL="\\u0300-\\u036f",JL="\\ufe20-\\ufe2f",QL="\\u20d0-\\u20ff",eA=qL+JL+QL,tA=`[${eA}]`,oA=RegExp(tA,"g"),nA=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rA={\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"},dr=e=>e.replace(nA,o=>rA[o]||o).replace(oA,"");import t8 from"clsx";import{useEffect as o8,useState as n8}from"react";import{KEYS as r8,queryFocusableElements as E2}from"@excalidraw/common";import{useCallback as iA,useState as aA}from"react";var fy=()=>{let[e,o]=aA(null),t=iA(n=>o(n),[]);return[e,t]};import{useState as p2,useCallback as ah,useMemo as u2,useEffect as lh,memo as h2,useRef as H7}from"react";import{LIBRARY_DISABLED_TYPES as G7,randomId as U7,isShallowEqual as W7,KEYS as Y7,isWritableElement as V7,addEventListener as X7,EVENT as K7,CLASSES as c2}from"@excalidraw/common";import{useEffect as yy,useRef as wy}from"react";import{URL_HASH_KEYS as Yu,URL_QUERY_KEYS as Vu,APP_NAME as vy,EVENT as zc,DEFAULT_SIDEBAR as dA,LIBRARY_SIDEBAR_TAB as mA,arrayToMap as Xu,cloneJSON as pA,preventUnload as uA,promiseTry as Iy,resolvablePromise as hA,toValidURL as gA,Queue as fA,Emitter as bA}from"@excalidraw/common";import{hashElementsVersion as EA,hashString as xA}from"@excalidraw/element";import{getCommonBoundingBox as Wu}from"@excalidraw/element";import{MIME_TYPES as mr}from"@excalidraw/common";var Li=({elements:e,appState:o,files:t,maxWidthOrHeight:n,getDimensions:r,exportPadding:i,exportingFrame:a})=>{let l=$n(e,null,{deleteInvisibleElements:!0}),s=zr(o,null),{exportBackground:c,viewBackgroundColor:m}=s;return as(l,{...s,offsetTop:0,offsetLeft:0,width:0,height:0},t||{},{exportBackground:c,exportPadding:i,viewBackgroundColor:m,exportingFrame:a},(p,d)=>{let h=document.createElement("canvas");if(n){typeof r=="function"&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");let b=Math.max(p,d),E=n<b?n/b:o?.exportScale??1;return h.width=p*E,h.height=d*E,{canvas:h,scale:E}}let f=r?.(p,d)||{width:p,height:d};return h.width=f.width,h.height=f.height,{canvas:h,scale:f.scale??1}})},by=async e=>{let{mimeType:o=mr.png,quality:t}=e;o===mr.png&&typeof t=="number"&&console.warn(`"quality" will be ignored for "${mr.png}" mimeType`),o==="image/jpg"&&(o=mr.jpg),o===mr.jpg&&!e.appState?.exportBackground&&(console.warn(`Defaulting "exportBackground" to "true" for "${mr.jpg}" mimeType`),e={...e,appState:{...e.appState,exportBackground:!0}});let n=await Li(e);return t=t||(/image\/jpe?g/.test(o)?.92:.8),new Promise((r,i)=>{n.toBlob(async a=>{if(!a)return i(new Error("couldn't export to blob"));a&&o===mr.png&&e.appState?.exportEmbedScene&&(a=await d1({blob:a,metadata:ua(e.elements,e.appState,e.files||{},"local")})),r(a)},o,t)})},Ai=async({elements:e,appState:o=Br(),files:t={},exportPadding:n,renderEmbeddables:r,exportingFrame:i,skipInliningFonts:a,reuseImages:l})=>{let s=$n(e,null,{deleteInvisibleElements:!0}),m={...zr(o,null),exportPadding:n};return Or(s,m,t,{exportingFrame:i,renderEmbeddables:r,skipInliningFonts:a,reuseImages:l})},lA=async e=>{if(e.type==="svg"){let o=await Ai(e);await mo(o.outerHTML)}else if(e.type==="png")await gc(by(e));else if(e.type==="json")await hc(e.elements,e.files);else throw new Error("Invalid export type")};import{useEffect as Ey,useState as sA}from"react";import{COLOR_PALETTE as cA}from"@excalidraw/common";var Uu=Se(new Map),xy=async e=>await Ai({elements:e,appState:{exportBackground:!1,viewBackgroundColor:cA.white},files:null,renderEmbeddables:!1,skipInliningFonts:!0}),Oc=(e,o,t,n)=>{let[r,i]=sA();return Ey(()=>{if(o)if(e){let a=t.get(e);a?i(a):(async()=>{let l=await xy(o);l.querySelector(".style-fonts")?.remove(),l&&(t.set(e,l),i(l))})()}else(async()=>{let a=await xy(o);i(a)})()},[e,o,t,i]),Ey(()=>{let a=n.current;if(a)return r&&(a.innerHTML=r.outerHTML),()=>{a.innerHTML=""}},[r,n]),r},_i=()=>{let[e]=ue(Uu);return{clearLibraryCache:()=>e.clear(),deleteItemsFromLibraryCache:n=>{n.forEach(r=>e.delete(r))},svgCache:e}};var yA=["excalidraw.com","raw.githubusercontent.com/excalidraw/excalidraw-libraries"],Sy=new bA,jo=Se({status:"loaded",isInitialized:!1,libraryItems:[]}),il=e=>pA(e),wA=(e,o)=>!e.find(t=>t.elements.length!==o.elements.length?!1:t.elements.every((n,r)=>n.id===o.elements[r].id&&n.versionNonce===o.elements[r].versionNonce)),Cy=(e,o)=>{let t=[];for(let n of o)wA(e,n)&&t.push(n);return[...t,...e]},ky=(e,o)=>{let t=Xu(o),n={deletedItems:new Map,addedItems:new Map,updatedItems:new Map};for(let i of e)t.has(i.id)||n.deletedItems.set(i.id,i);let r=Xu(e);for(let i of o){let a=r.get(i.id);a?$u(a)!==$u(i)&&n.updatedItems.set(i.id,i):n.addedItems.set(i.id,i)}return n},Ku=class{constructor(o){S(this,"currLibraryItems",[]);S(this,"prevLibraryItems",il(this.currLibraryItems));S(this,"app");S(this,"updateQueue",[]);S(this,"getLastUpdateTask",()=>this.updateQueue[this.updateQueue.length-1]);S(this,"notifyListeners",()=>{if(this.updateQueue.length>0)$e.set(jo,o=>({status:"loading",libraryItems:this.currLibraryItems,isInitialized:o.isInitialized}));else{$e.set(jo,{status:"loaded",libraryItems:this.currLibraryItems,isInitialized:!0});try{let o=this.prevLibraryItems;this.prevLibraryItems=il(this.currLibraryItems);let t=il(this.currLibraryItems);this.app.props.onLibraryChange?.(t),Sy.trigger(ky(o,t),t)}catch(o){console.error(o)}}});S(this,"destroy",()=>{this.updateQueue=[],this.currLibraryItems=[],$e.set(Uu,new Map)});S(this,"resetLibrary",()=>this.setLibrary([]));S(this,"getLatestLibrary",()=>new Promise(async o=>{try{let t=await(this.getLastUpdateTask()||this.currLibraryItems);this.updateQueue.length>0?o(this.getLatestLibrary()):o(il(t))}catch{return o(this.currLibraryItems)}}));S(this,"updateLibrary",async({libraryItems:o,prompt:t=!1,merge:n=!1,openLibraryMenu:r=!1,defaultStatus:i="unpublished"})=>(r&&this.app.setState({openSidebar:{name:dA.name,tab:mA}}),this.setLibrary(()=>new Promise(async(a,l)=>{try{let s=await(typeof o=="function"&&!(o instanceof Blob)?o(this.currLibraryItems):o),c;s instanceof Blob?c=await km(s,i):c=ga(s,i),!t||window.confirm(g("alerts.confirmAddLibrary",{numShapes:c.length}))?(t&&this.app.focusContainer(),a(n?Cy(this.currLibraryItems,c):c)):l(new Nr)}catch(s){l(s)}}))));S(this,"setLibrary",o=>{let t=new Promise(async(n,r)=>{try{await this.getLastUpdateTask(),typeof o=="function"&&(o=o(this.currLibraryItems)),this.currLibraryItems=il(await o),n(this.currLibraryItems)}catch(i){r(i)}}).catch(n=>{if(n.name==="AbortError")return console.warn("Library update aborted by user"),this.currLibraryItems;throw n}).finally(()=>{this.updateQueue=this.updateQueue.filter(n=>n!==t),this.notifyListeners()});return this.updateQueue.push(t),this.notifyListeners(),t});this.app=o}},My=Ku,Ri=e=>{let t=Math.ceil(Math.sqrt(e.length)),n=[],r=h=>e.slice(h*t,h*t+t).reduce((b,E)=>{let{height:w}=Wu(E.elements);return Math.max(b,w)},0),i=h=>{let f=0,b=0,E=0;for(let w of e){if(f%t===0&&(b=0),b===h){let{width:y}=Wu(w.elements);E=Math.max(E,y)}f++,b++}return E},a=0,l=0,s=0,c=0,m=0,p=0,d=0;for(let h of e){m&&m%t===0&&(l+=s+50,a=0,p=0,d++),p===0&&(s=r(d)),c=i(p);let{minX:f,minY:b,width:E,height:w}=Wu(h.elements),y=(c-E)/2,x=(s-w)/2;n.push(...h.elements.map(v=>({...v,x:v.x+a+y-f,y:v.y+l+x-b}))),a+=c+50,m++,p++}return n},vA=(e,o=yA)=>{if(typeof o=="function"?o(e):o.some(t=>{let n=new URL(`https://${t.replace(/^https?:\/\//,"")}`),{hostname:r,pathname:i}=new URL(e);return new RegExp(`(^|\\.)${n.hostname}$`).test(r)&&new RegExp(`^${n.pathname.replace(/\/+$/,"")}(/+|$)`).test(i)}))return!0;throw new Error(`Invalid or disallowed library URL: "${e}"`)},Zu=()=>{let e=new URLSearchParams(window.location.hash.slice(1)).get(Yu.addLibrary)||new URLSearchParams(window.location.search).get(Vu.addLibrary),o=e?new URLSearchParams(window.location.hash.slice(1)).get("token"):null;return e?{libraryUrl:e,idToken:o}:null},kn=class kn{constructor(o){S(this,"adapter");this.adapter=o}static async getLibraryItems(o,t,n=!0){let r=()=>new Promise(async(i,a)=>{try{let l=await o.load({source:t});i(ga(l?.libraryItems||[],"published"))}catch(l){a(l)}});return n?kn.queue.push(r):r()}getLibraryItems(o){return kn.getLibraryItems(this.adapter,o,!1)}};S(kn,"queue",new fA),S(kn,"run",async(o,t)=>{let n=new kn(o);return kn.queue.push(()=>t(n))});var Di=kn,al=0,Hc=0,$u=e=>`${e.id}:${e.name||""}:${EA(e.elements)}`,Gc=e=>xA(e.map(o=>$u(o)).sort().join()),Ty=async(e,o)=>{try{return Hc++,await Di.run(e,async t=>{let n=Xu(await t.getLibraryItems("save"));for(let[l]of o.deletedItems)n.delete(l);let r=[];for(let[l,s]of o.addedItems)n.has(l)?n.set(l,s):r.push(s);if(o.updatedItems)for(let[l,s]of o.updatedItems)n.set(l,s);let i=r.concat(Array.from(n.values())),a=Gc(i);return a!==al&&await e.save({libraryItems:i}),al=a,i})}finally{Hc--}},IA=e=>{let{excalidrawAPI:o}=e,t=wy(e);t.current=e;let n=wy(!1);yy(()=>{if(!o)return;n.current=!1;let r=async({libraryUrl:l,idToken:s})=>{let c=new Promise(async(p,d)=>{try{l=decodeURIComponent(l),l=gA(l),vA(l,t.current.validateLibraryUrl);let f=await(await fetch(l)).blob();p(f)}catch(h){d(h)}}),m=s!==o.id;await(m&&document.hidden?new Promise(p=>{window.addEventListener("focus",()=>p(),{once:!0})}):null);try{await o.updateLibrary({libraryItems:c,prompt:m,merge:!0,defaultStatus:"published",openLibraryMenu:!0})}catch(p){throw o.updateScene({appState:{errorMessage:p.message}}),p}finally{if(window.location.hash.includes(Yu.addLibrary)){let p=new URLSearchParams(window.location.hash.slice(1));p.delete(Yu.addLibrary),window.history.replaceState({},vy,`#${p.toString()}`)}else if(window.location.search.includes(Vu.addLibrary)){let p=new URLSearchParams(window.location.search);p.delete(Vu.addLibrary),window.history.replaceState({},vy,`?${p.toString()}`)}}},i=l=>{l.preventDefault();let s=Zu();s&&(l.stopImmediatePropagation(),window.history.replaceState({},"",l.oldURL),r(s))},a=Zu();if(a&&r(a),"getInitialLibraryItems"in t.current&&t.current.getInitialLibraryItems&&(console.warn("useHandleLibrar `opts.getInitialLibraryItems` is deprecated. Use `opts.adapter` instead."),Promise.resolve(t.current.getInitialLibraryItems()).then(l=>{o.updateLibrary({libraryItems:l,merge:!0})}).catch(l=>{console.error(`UseHandeLibrary getInitialLibraryItems failed: ${l?.message}`)})),"adapter"in t.current&&t.current.adapter){let l=t.current.adapter,s=t.current.migrationAdapter,c=hA();s?c.resolve(Iy(s.load).then(async m=>{let p=null;try{if(!m)return Di.getLibraryItems(l,"load");p=ga(m.libraryItems||[],"published");let d=await Ty(l,ky([],p));try{await s.clear()}catch(h){console.error(`couldn't delete legacy library data: ${h.message}`)}return d}catch(d){return console.error(`couldn't migrate legacy library data: ${d.message}`),p}}).catch(m=>(console.error(`error during library migration: ${m.message}`),Di.getLibraryItems(l,"load")))):c.resolve(Iy(Di.getLibraryItems,l,"load")),o.updateLibrary({libraryItems:c.then(m=>{let p=m||[];return al=Gc(p),p}),merge:!0}).finally(()=>{n.current=!0})}return window.addEventListener(zc.HASHCHANGE,i),()=>{window.removeEventListener(zc.HASHCHANGE,i)}},[o]),yy(()=>{let r=Sy.on(async(a,l)=>{let s=n.current,c="adapter"in t.current&&t.current.adapter||null;try{c&&al!==Gc(l)&&await Ty(c,a)}catch(m){console.error(`couldn't persist library update: ${m.message}`,a),s&&t.current.excalidrawAPI&&t.current.excalidrawAPI.updateScene({appState:{errorMessage:g("errors.saveLibraryError")}})}}),i=a=>{Hc&&uA(a)};return window.addEventListener(zc.BEFORE_UNLOAD,i),()=>{window.removeEventListener(zc.BEFORE_UNLOAD,i),r(),al=0,Hc=0}},[])};import kA from"clsx";import{VERSIONS as TA}from"@excalidraw/common";import{jsx as CA}from"react/jsx-runtime";var SA=({theme:e,id:o,libraryReturnUrl:t})=>{let n=t||window.location.origin+window.location.pathname;return CA("a",{className:"library-menu-browse-button",href:`${T.VITE_APP_LIBRARY_URL}?target=${window.name||"_blank"}&referrer=${n}&useHash=true&token=${o}&theme=${e}&version=${TA.excalidrawLibrary}`,target:"_excalidraw_libraries",children:g("labels.libraries")})},Py=SA;import{jsx as MA,jsxs as PA}from"react/jsx-runtime";var Uc=({libraryReturnUrl:e,theme:o,id:t,style:n,children:r,className:i})=>PA("div",{className:kA("library-menu-control-buttons",i),style:n,children:[MA(Py,{id:t,libraryReturnUrl:e,theme:o}),r]});import{useCallback as Fi,useEffect as oh,useMemo as nh,useRef as a2,useState as l2}from"react";import{MIME_TYPES as D7,arrayToMap as R7,nextAnimationFrame as N7}from"@excalidraw/common";import{duplicateElements as B7}from"@excalidraw/element";import F7 from"clsx";import LA from"lodash.throttle";import{useEffect as AA}from"react";var _A=Se(0),Ly=e=>{let[o,t]=ue(_A);return AA(()=>{let{current:n}=e;if(!n)return;let r=LA(()=>{let{scrollTop:i}=n;t(i)},200);return n.addEventListener("scroll",r),()=>{r.cancel(),n.removeEventListener("scroll",r)}},[e,t]),o};import c7 from"clsx";import{useCallback as d7,useState as Qu}from"react";import{muteFSAbortError as m7}from"@excalidraw/common";import{flushSync as Ay}from"react-dom";import DA from"clsx";import{jsx as Wc,jsxs as NA}from"react/jsx-runtime";var RA=({label:e,onClick:o,className:t,children:n,actionType:r,type:i="button",isLoading:a,...l})=>{let s=r?`Dialog__action-button--${r}`:"";return NA("button",{className:DA("Dialog__action-button",s,t),type:i,"aria-label":e,onClick:o,...l,children:[n&&Wc("div",{style:a?{visibility:"hidden"}:{},children:n}),Wc("div",{style:a?{visibility:"hidden"}:{},children:e}),a&&Wc("div",{style:{position:"absolute",inset:0},children:Wc(Dt,{})})]})},qo=RA;import{jsx as _y,jsxs as Dy}from"react/jsx-runtime";var BA=e=>{let{onConfirm:o,onCancel:t,children:n,confirmText:r=g("buttons.confirm"),cancelText:i=g("buttons.cancel"),className:a="",...l}=e,s=he(),c=Hr(Ni),{container:m}=ke();return Dy(We,{onCloseRequest:t,size:"small",...l,className:`confirm-dialog ${a}`,children:[n,Dy("div",{className:"confirm-dialog-buttons",children:[_y(qo,{label:i,onClick:()=>{s({openMenu:null}),c(!1),Ay(()=>{t()}),m?.focus()}}),_y(qo,{label:r,onClick:()=>{s({openMenu:null}),c(!1),Ay(()=>{o()}),m?.focus()},actionType:"danger"})]})]})},Ry=BA;import{useCallback as WA,useEffect as Ju,useRef as Ny,useState as ju}from"react";import{EDITOR_LS_KEYS as qu,EXPORT_DATA_TYPES as YA,MIME_TYPES as By,VERSIONS as VA,chunk as XA,getExportSource as KA}from"@excalidraw/common";var Mn=class{static has(o){try{return!!window.localStorage.getItem(o)}catch(t){return console.warn(`localStorage.getItem error: ${t.message}`),!1}}static get(o){try{let t=window.localStorage.getItem(o);return t?JSON.parse(t):null}catch(t){return console.warn(`localStorage.getItem error: ${t.message}`),null}}};S(Mn,"set",(o,t)=>{try{return window.localStorage.setItem(o,JSON.stringify(t)),!0}catch(n){return console.warn(`localStorage.setItem error: ${n.message}`),!1}}),S(Mn,"delete",o=>{try{window.localStorage.removeItem(o)}catch(t){console.warn(`localStorage.removeItem error: ${t.message}`)}});import Yc from"react";var FA=/({{[\w-]+}})|(<[\w-]+>)|(<\/[\w-]+>)/g,OA=/{{([\w-]+)}}/,zA=/<([\w-]+)>/,HA=/<\/([\w-]+)>/,GA=(e,o)=>{let t=[{name:"",children:[]}];return e.split(FA).filter(Boolean).forEach(n=>{let r=n.match(zA),i=n.match(HA),a=n.match(OA);if(r!==null){let l=r[1];o.hasOwnProperty(l)?t.push({name:l,children:[]}):console.warn(`Trans: missed to pass in prop ${l} for interpolating ${e}`)}else if(i!==null)if(i[1]===t[t.length-1].name){let s=t.pop(),c=Yc.createElement(Yc.Fragment,{},...s.children),m=o[s.name];typeof m=="function"&&t[t.length-1].children.push(m(c))}else console.warn(`Trans: unexpected end tag ${n} 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(n)}),t.length!==1&&console.warn(`Trans: stack not empty for interpolating ${e}`),t[0].children},UA=({i18nKey:e,children:o,...t})=>{let{t:n}=Ue();return Yc.createElement(Yc.Fragment,{},...GA(n(e),t))},Ft=UA;import{jsx as me,jsxs as dt}from"react/jsx-runtime";var ZA=async e=>{let n=Math.round(8),r=Math.max(Math.round(128/64),2),i=XA(e,6),a=document.createElement("canvas");a.width=i[0].length*128+(i[0].length+1)*(n*2)-n*2,a.height=i.length*128+(i.length+1)*(n*2)-n*2;let l=a.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,a.width,a.height);for(let[s,c]of e.entries()){let m=await Li({elements:c.elements,files:null,maxWidthOrHeight:128}),{width:p,height:d}=m,h=Math.floor(s/6)*(128+n*2),f=s%6*(128+n*2);l.drawImage(m,f+(128-p)/2+n,h+(128-d)/2+n),l.lineWidth=r,l.strokeStyle="#ced4da",l.strokeRect(f+n/2,h+n/2,128+n,128+n)}return await cs(new File([await jn(a)],"preview",{type:By.png}),{outputType:By.jpg,maxWidthOrHeight:5e3})},$A=({libItem:e,appState:o,index:t,onChange:n,onRemove:r})=>{let i=Ny(null),a=Ny(null);return Ju(()=>{let l=i.current;l&&(async()=>{let s=await Ai({elements:e.elements,appState:{...o,viewBackgroundColor:"#fff",exportBackground:!0},files:null,skipInliningFonts:!0});l.innerHTML=s.outerHTML})()},[e.elements,o]),dt("div",{className:"single-library-item",children:[e.status==="published"&&me("span",{className:"single-library-item-status",children:g("labels.statusPublished")}),me("div",{ref:i,className:"single-library-item__svg"}),me(V,{"aria-label":g("buttons.remove"),type:"button",icon:Ut,className:"single-library-item--remove",onClick:r.bind(null,e.id),title:g("buttons.remove")}),dt("div",{style:{display:"flex",margin:"0.8rem 0",width:"100%",fontSize:"14px",fontWeight:500,flexDirection:"column"},children:[dt("label",{style:{display:"flex",justifyContent:"space-between",flexDirection:"column"},children:[dt("div",{style:{padding:"0.5em 0"},children:[me("span",{style:{fontWeight:500,color:"#868e96"},children:g("publishDialog.itemName")}),me("span",{"aria-hidden":"true",className:"required",children:"*"})]}),me("input",{type:"text",ref:a,style:{width:"80%",padding:"0.2rem"},defaultValue:e.name,placeholder:"Item name",onChange:l=>{n(l.target.value,t)}})]}),me("span",{className:"error",children:e.error})]})]})},jA=({onClose:e,libraryItems:o,appState:t,onSuccess:n,onError:r,updateItemsInStorage:i,onRemove:a})=>{let[l,s]=ju({authorName:"",githubHandle:"",name:"",description:"",twitterHandle:"",website:""}),[c,m]=ju(!1);Ju(()=>{let x=Mn.get(qu.PUBLISH_LIBRARY);x&&s(x)},[]);let[p,d]=ju(o.slice());Ju(()=>{d(o.slice())},[o]);let h=x=>{s({...l,[x.target.name]:x.target.value})},f=async x=>{x.preventDefault(),m(!0);let v=[],I=!1;if(p.forEach(L=>{let B="";L.name||(B=g("publishDialog.errors.required"),I=!0),v.push({...L,error:B})}),I){d(v),m(!1);return}let C=await ZA(p),P={type:YA.excalidrawLibrary,version:VA.excalidrawLibrary,source:KA(),libraryItems:p},k=JSON.stringify(P,null,2),N=new Blob([k],{type:"application/json"}),_=new FormData;_.append("excalidrawLib",N),_.append("previewImage",C),_.append("previewImageType",C.type),_.append("title",l.name),_.append("authorName",l.authorName),_.append("githubHandle",l.githubHandle),_.append("name",l.name),_.append("description",l.description),_.append("twitterHandle",l.twitterHandle),_.append("website",l.website),fetch(`${T.VITE_APP_LIBRARY_BACKEND}/submit`,{method:"post",body:_}).then(L=>L.ok?L.json().then(({url:B})=>{Mn.delete(qu.PUBLISH_LIBRARY),n({url:B,authorName:l.authorName,items:p})}):L.json().catch(()=>{throw new Error(L.statusText||"something went wrong")}).then(B=>{throw new Error(B.message||L.statusText||"something went wrong")}),L=>{console.error(L),r(L),m(!1)}).catch(L=>{console.error(L),r(L),m(!1)})},b=()=>{let x=[];return p.forEach((v,I)=>{x.push(me("div",{className:"single-library-item-wrapper",children:me($A,{libItem:v,appState:t,index:I,onChange:(C,P)=>{let k=p.slice();k[P].name=C,d(k)},onRemove:a})},I))}),me("div",{className:"selected-library-items",children:x})},E=WA(()=>{i(p),Mn.set(qu.PUBLISH_LIBRARY,l),e()},[p,e,i,l]),w=!!o.length,y=o.some(x=>x.status==="published");return me(We,{onCloseRequest:E,title:g("publishDialog.title"),className:"publish-library",children:w?dt("form",{onSubmit:f,children:[me("div",{className:"publish-library-note",children:me(Ft,{i18nKey:"publishDialog.noteDescription",link:x=>me("a",{href:"https://libraries.excalidraw.com",target:"_blank",rel:"noopener",children:x})})}),me("span",{className:"publish-library-note",children:me(Ft,{i18nKey:"publishDialog.noteGuidelines",link:x=>me("a",{href:"https://github.com/excalidraw/excalidraw-libraries#guidelines",target:"_blank",rel:"noopener noreferrer",children:x})})}),me("div",{className:"publish-library-note",children:g("publishDialog.noteItems")}),y&&me("span",{className:"publish-library-note publish-library-warning",children:g("publishDialog.republishWarning")}),b(),dt("div",{className:"publish-library__fields",children:[dt("label",{children:[dt("div",{children:[me("span",{children:g("publishDialog.libraryName")}),me("span",{"aria-hidden":"true",className:"required",children:"*"})]}),me("input",{type:"text",name:"name",required:!0,value:l.name,onChange:h,placeholder:g("publishDialog.placeholder.libraryName")})]}),dt("label",{style:{alignItems:"flex-start"},children:[dt("div",{children:[me("span",{children:g("publishDialog.libraryDesc")}),me("span",{"aria-hidden":"true",className:"required",children:"*"})]}),me("textarea",{name:"description",rows:4,required:!0,value:l.description,onChange:h,placeholder:g("publishDialog.placeholder.libraryDesc")})]}),dt("label",{children:[dt("div",{children:[me("span",{children:g("publishDialog.authorName")}),me("span",{"aria-hidden":"true",className:"required",children:"*"})]}),me("input",{type:"text",name:"authorName",required:!0,value:l.authorName,onChange:h,placeholder:g("publishDialog.placeholder.authorName")})]}),dt("label",{children:[me("span",{children:g("publishDialog.githubUsername")}),me("input",{type:"text",name:"githubHandle",value:l.githubHandle,onChange:h,placeholder:g("publishDialog.placeholder.githubHandle")})]}),dt("label",{children:[me("span",{children:g("publishDialog.twitterUsername")}),me("input",{type:"text",name:"twitterHandle",value:l.twitterHandle,onChange:h,placeholder:g("publishDialog.placeholder.twitterHandle")})]}),dt("label",{children:[me("span",{children:g("publishDialog.website")}),me("input",{type:"text",name:"website",pattern:"https?://.+",title:g("publishDialog.errors.website"),value:l.website,onChange:h,placeholder:g("publishDialog.placeholder.website")})]}),me("span",{className:"publish-library-note",children:me(Ft,{i18nKey:"publishDialog.noteLicense",link:x=>me("a",{href:"https://github.com/excalidraw/excalidraw-libraries/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",children:x})})})]}),dt("div",{className:"publish-library__buttons",children:[me(qo,{label:g("buttons.saveLibNames"),onClick:E,"data-testid":"cancel-clear-canvas-button"}),me(qo,{type:"submit",label:g("buttons.submit"),actionType:"primary",isLoading:c})]})]}):me("p",{style:{padding:"1em",textAlign:"center",fontWeight:500},children:g("publishDialog.atleastOneLibItem")})})},Fy=jA;import Qy from"react";import QA from"clsx";import{useEffect as e7,useRef as t7}from"react";import{EVENT as Gy,KEYS as o7}from"@excalidraw/common";import{forwardRef as Oy}from"react";import zy from"clsx";import{jsx as Hy}from"react/jsx-runtime";var qA=Oy(({children:e,gap:o,align:t,justifyContent:n,className:r,style:i},a)=>Hy("div",{className:zy("Stack Stack_horizontal",r),style:{"--gap":o,alignItems:t,justifyContent:n,...i},ref:a,children:e})),JA=Oy(({children:e,gap:o,align:t,justifyContent:n,className:r,style:i},a)=>Hy("div",{className:zy("Stack Stack_vertical",r),style:{"--gap":o,justifyItems:t,justifyContent:n,...i},ref:a,children:e})),Tt={Row:qA,Col:JA};import{jsx as Vc}from"react/jsx-runtime";var Uy=({children:e,onClickOutside:o,className:t="",onSelect:n,style:r,placement:i="bottom"})=>{let a=de(),l=t7(null),s=gn({onClickOutside:o});ei(l,m=>{l.current?.closest(".dropdown-menu-container")?.contains(m.target)||s.onClickOutside?.()}),e7(()=>{let m=d=>{d.key===o7.ESCAPE&&(d.stopImmediatePropagation(),s.onClickOutside?.())},p={capture:!0};return document.addEventListener(Gy.KEYDOWN,m,p),()=>{document.removeEventListener(Gy.KEYDOWN,m,p)}},[s]);let c=QA(`dropdown-menu ${t}`,{"dropdown-menu--mobile":a.formFactor==="phone","dropdown-menu--placement-top":i==="top"}).trim();return Vc(Tp.Provider,{value:{onSelect:n},children:Vc("div",{ref:l,className:c,style:r,"data-testid":"dropdown-menu",children:a.formFactor==="phone"?Vc(Tt.Col,{className:"dropdown-menu-container",children:e}):Vc(ze,{className:"dropdown-menu-container",padding:2,style:{zIndex:2},children:e})})})};Uy.displayName="DropdownMenuContent";var Wy=Uy;import{jsx as r7}from"react/jsx-runtime";var n7=({children:e,className:o="",selected:t,...n})=>r7("div",{...n,className:`dropdown-menu-item-base dropdown-menu-item-custom ${o} ${t?"dropdown-menu-item--selected":""}`.trim(),children:e}),Yy=n7;import{jsx as Vy}from"react/jsx-runtime";var Xy=({icon:e,shortcut:o,href:t,children:n,onSelect:r,className:i="",selected:a,rel:l="noopener",...s})=>{let c=qs(s.onClick,r);return Vy("a",{...s,href:t,target:"_blank",rel:l||"noopener",className:js(i,a),title:s.title??s["aria-label"],onClick:c,children:Vy($s,{icon:e,shortcut:o,children:n})})},Bi=Xy;Xy.displayName="DropdownMenuItemLink";import{jsx as i7}from"react/jsx-runtime";var Ky=()=>i7("div",{style:{height:"1px",backgroundColor:"var(--default-border-color)",margin:".5rem 0",flex:"0 0 auto"}}),Zy=Ky;Ky.displayName="DropdownMenuSeparator";import a7 from"clsx";import{jsx as l7}from"react/jsx-runtime";var $y=({className:e="",children:o,onToggle:t,title:n,...r})=>{let i=de(),a=a7(`dropdown-menu-button ${e}`,"zen-mode-transition",{"dropdown-menu-button--mobile":i.formFactor==="phone"}).trim();return l7("button",{className:a,onClick:t,type:"button","data-testid":"dropdown-menu-button",title:n,...r,children:o})},jy=$y;$y.displayName="DropdownMenuTrigger";import Xc from"react";var qy=e=>{let o=Xc.Children.toArray(e).find(t=>Xc.isValidElement(t)&&typeof t.type!="string"&&t?.type.displayName&&t.type.displayName==="DropdownMenuTrigger");return o||null},Jy=e=>{let o=Xc.Children.toArray(e).find(t=>Xc.isValidElement(t)&&typeof t.type!="string"&&t?.type.displayName&&t.type.displayName==="DropdownMenuContent");return o||null};import{jsxs as s7}from"react/jsx-runtime";var Jo=({children:e,open:o,placement:t})=>{let n=qy(e),r=Jy(e),i=r&&Qy.isValidElement(r)?Qy.cloneElement(r,{placement:t}):r;return s7("div",{className:"dropdown-menu-container",style:{display:"contents"},children:[n,o&&i]})};Jo.Trigger=jy;Jo.Content=Wy;Jo.Item=vt;Jo.ItemLink=Bi;Jo.ItemCustom=Yy;Jo.Group=_a;Jo.Separator=Zy;var ge=Jo;Jo.displayName="DropdownMenu";import{jsx as St,jsxs as Kc}from"react/jsx-runtime";var p7=(e,o)=>e.filter(t=>o.includes(t.id)),u7=({setAppState:e,selectedItems:o,library:t,onRemoveFromLibrary:n,resetLibrary:r,onSelectItems:i,appState:a,className:l})=>{let[s]=ue(jo),[c,m]=ue(Ni),p=()=>{let _=o.length?g("alerts.removeItemsFromsLibrary",{count:o.length}):g("alerts.resetLibrary"),L=o.length?g("confirmDialog.removeItemsFromLib"):g("confirmDialog.resetLibrary");return St(Ry,{onConfirm:()=>{o.length?n():r(),h(!1)},onCancel:()=>{h(!1)},title:L,children:St("p",{children:_})})},[d,h]=Qu(!1),f=!!o.length,b=f?s.libraryItems.filter(_=>o.includes(_.id)):s.libraryItems,E=f?g("buttons.remove"):g("buttons.resetLibrary"),[w,y]=Qu(!1),[x,v]=Qu(null),I=d7(()=>Kc(We,{onCloseRequest:()=>v(null),title:g("publishSuccessDialog.title"),className:"publish-library-success",size:"small",children:[St("p",{children:St(Ft,{i18nKey:"publishSuccessDialog.content",authorName:x.authorName,link:_=>St("a",{href:x?.url,target:"_blank",rel:"noopener noreferrer",children:_})})}),St(V,{type:"button",title:g("buttons.close"),"aria-label":g("buttons.close"),label:g("buttons.close"),onClick:()=>v(null),"data-testid":"publish-library-success-close",className:"publish-library-success-close"})]}),[v,x]),C=(_,L)=>{y(!1),v({url:_.url,authorName:_.authorName});let B=L.slice();B.forEach(G=>{o.includes(G.id)&&(G.status="published")}),t.setLibrary(B)},P=async()=>{try{await t.updateLibrary({libraryItems:es({description:"Excalidraw library files"}),merge:!0,openLibraryMenu:!0})}catch(_){if(_?.name==="AbortError"){console.warn(_);return}e({errorMessage:g("errors.importLibraryError")})}},k=async()=>{let _=f?b:await t.getLatestLibrary();n1(_).catch(m7).catch(L=>{e({errorMessage:L.message})})},N=()=>Kc(ge,{open:c,children:[St(ge.Trigger,{onToggle:()=>m(!c),children:k1}),Kc(ge.Content,{onClickOutside:()=>m(!1),onSelect:()=>m(!1),className:"library-menu",children:[!f&&St(ge.Item,{onSelect:P,icon:Yr,"data-testid":"lib-dropdown--load",children:g("buttons.load")}),!!b.length&&St(ge.Item,{onSelect:k,icon:qn,"data-testid":"lib-dropdown--export",children:g("buttons.export")}),f&&St(ge.Item,{icon:O0,onSelect:()=>y(!0),"data-testid":"lib-dropdown--remove",children:g("buttons.publishLibrary")}),!!b.length&&St(ge.Item,{onSelect:()=>h(!0),icon:Yo,children:E})]})]});return Kc("div",{className:c7("library-menu-dropdown-container",l),children:[N(),o.length>0&&St("div",{className:"library-actions-counter",children:o.length}),d&&p(),w&&St(Fy,{onClose:()=>y(!1),libraryItems:p7(s.libraryItems,o),appState:a,onSuccess:_=>C(_,s.libraryItems),onError:_=>window.alert(_),updateItemsInStorage:()=>t.setLibrary(s.libraryItems),onRemove:_=>i(o.filter(L=>L!==_))}),x&&I()]})},e2=({selectedItems:e,onSelectItems:o,className:t})=>{let{library:n}=qe(),{clearLibraryCache:r,deleteItemsFromLibraryCache:i}=_i(),a=Te(),l=he(),[s]=ue(jo),c=async p=>{let d=p.filter(h=>!e.includes(h.id));n.setLibrary(d).catch(()=>{l({errorMessage:g("alerts.errorRemovingFromLibrary")})}),i(e),o([])};return St(u7,{appState:a,setAppState:l,selectedItems:e,onSelectItems:o,library:n,onRemoveFromLibrary:()=>c(s.libraryItems),resetLibrary:()=>{n.resetLibrary(),r()},className:t})};import{memo as w7,useEffect as v7,useState as I7}from"react";import h7,{useCallback as g7}from"react";function f7(){return[!1,g7(o=>o(),[])]}var t2=h7.useTransition||f7;import o2 from"clsx";import{memo as b7,useRef as E7,useState as x7}from"react";import{jsx as Zc,jsxs as y7}from"react/jsx-runtime";var n2=b7(({id:e,elements:o,isPending:t,onClick:n,selected:r,onToggle:i,onDrag:a,svgCache:l})=>{let s=E7(null),c=Oc(e,o,l,s),[m,p]=x7(!1),d=de().formFactor==="phone",h=t&&Zc("div",{className:"library-unit__adder",children:C1});return y7("div",{className:o2("library-unit",{"library-unit__active":o,"library-unit--hover":o&&m,"library-unit--selected":r,"library-unit--skeleton":!c}),onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[Zc("div",{className:o2("library-unit__dragger",{"library-unit__pulse":!!t}),ref:s,draggable:!!o,onClick:o||t?f=>{e&&f.shiftKey?i(e,f):n(e)}:void 0,onDragStart:f=>{if(!e){f.preventDefault();return}p(!1),a(e,f)}}),h,e&&o&&(m||d||r)&&Zc(Ha,{checked:r,onChange:(f,b)=>i(e,b),className:"library-unit__checkbox"})]})}),r2=()=>Zc("div",{className:"library-unit library-unit--skeleton"});import{Fragment as T7,jsx as $c}from"react/jsx-runtime";var jc=({children:e})=>$c("div",{className:"library-menu-items-container__grid",children:e}),ll=w7(({items:e,onItemSelectToggle:o,onItemDrag:t,isItemSelected:n,onClick:r,svgCache:i,itemsRenderedPerBatch:a})=>{let[,l]=t2(),[s,c]=I7(0);return v7(()=>{s<e.length&&l(()=>{c(s+a)})},[s,e.length,l,a]),$c(T7,{children:e.map((m,p)=>p<s?$c(n2,{elements:m?.elements,isPending:!m?.id&&!!m?.elements,onClick:r,svgCache:i,id:m?.id,selected:n(m.id),onToggle:o,onDrag:t},m?.id??p):$c(r2,{},p))})});import eh from"clsx";import{forwardRef as M7,useRef as P7,useImperativeHandle as L7,useLayoutEffect as A7,useState as _7}from"react";import S7 from"clsx";import{composeEventHandlers as C7}from"@excalidraw/common";import{jsx as k7}from"react/jsx-runtime";var Ot=({type:e="button",onSelect:o,selected:t,children:n,className:r="",...i})=>k7("button",{onClick:C7(i.onClick,a=>{o()}),type:e,className:S7("excalidraw-button",r,{selected:t}),...i,children:n});import{jsx as th,jsxs as i2}from"react/jsx-runtime";var Pn=M7(({onChange:e,label:o,fullWidth:t,placeholder:n,readonly:r,selectOnRender:i,onKeyDown:a,isRedacted:l=!1,icon:s,className:c,type:m,...p},d)=>{let h=P7(null);L7(d,()=>h.current),A7(()=>{i&&(h.current?.focus(),h.current?.select())},[i]);let[f,b]=_7(!1);return i2("div",{className:eh("ExcTextField",c,{"ExcTextField--fullWidth":t,"ExcTextField--hasIcon":!!s}),onClick:()=>{h.current?.focus()},children:[s,o&&th("div",{className:"ExcTextField__label",children:o}),i2("div",{className:eh("ExcTextField__input",{"ExcTextField__input--readonly":r}),children:[th("input",{className:eh({"is-redacted":"value"in p&&p.value&&l&&!f}),readOnly:r,value:"value"in p?p.value:void 0,defaultValue:"defaultValue"in p?p.defaultValue:void 0,placeholder:n,ref:h,onChange:E=>e?.(E.target.value),onKeyDown:a,type:m}),l&&th(Ot,{onSelect:()=>b(!f),style:{border:0,userSelect:"none"},children:f?X0:Qn})]})]})});import{Fragment as s2,jsx as Je,jsxs as Mo}from"react/jsx-runtime";var O7=17,z7=64;function rh({isLoading:e,libraryItems:o,onAddToLibrary:t,onInsertLibraryItems:n,pendingElements:r,theme:i,id:a,libraryReturnUrl:l,onSelectItems:s,selectedItems:c}){let m=de(),p=a2(null),d=Ly(p);oh(()=>{d>0&&p.current?.scrollTo(0,d)},[]);let{svgCache:h}=_i(),[f,b]=l2(null),[E,w]=l2(""),y=!o.length&&!r.length,x=!y&&!!E.trim(),v=nh(()=>{let D=dr(E.trim().toLowerCase());return D?o.filter(O=>{let Q=O.name||"";return Q.trim()&&dr(Q.toLowerCase()).includes(D)}):[]},[o,E]),I=nh(()=>o.filter(D=>D.status!=="published"),[o]),C=nh(()=>o.filter(D=>D.status==="published"),[o]),P=Fi((D,O)=>{let Q=!c.includes(D),ee=[...I,...C];if(Q){if(O.shiftKey&&f){let K=ee.findIndex(yt=>yt.id===f),ae=ee.findIndex(yt=>yt.id===D);if(K===-1||ae===-1){s([...c,D]);return}let be=R7(c),ce=Math.min(K,ae),Oe=Math.max(K,ae),io=ee.reduce((yt,Go,_r)=>((_r>=ce&&_r<=Oe||be.has(Go.id))&&yt.push(Go.id),yt),[]);s(io)}else s([...c,D]);b(D)}else b(null),s(c.filter(K=>K!==D))},[f,s,C,c,I]);oh(()=>{c.length||b(null)},[c]);let k=Fi(D=>{let O;return c.includes(D)?O=o.filter(Q=>c.includes(Q.id)):O=o.filter(Q=>Q.id===D),O.map(Q=>({...Q,elements:B7({type:"everything",elements:Q.elements,randomizeSeed:!0}).duplicatedElements}))},[o,c]),N=Fi((D,O)=>{let Q={itemIds:c.includes(D)?c:[D]};O.dataTransfer.setData(D7.excalidrawlibIds,JSON.stringify(Q))},[c]),_=Fi(D=>D?c.includes(D):!1,[c]),L=Fi(()=>{t(r)},[r,t]),B=Fi(D=>{D&&n(k(D))},[k,n]),G=h.size>=(v.length?v:o).length?z7:O7,j=a2(null);oh(()=>{N7(()=>{j.current?.focus()})},[]);let H=!x&&Mo(s2,{children:[!y&&Je("div",{className:"library-menu-items-container__header",children:g("labels.personalLib")}),!r.length&&!I.length?Mo("div",{className:"library-menu-items__no-items",children:[!C.length&&Je("div",{className:"library-menu-items__no-items__label",children:g("library.noItems")}),Je("div",{className:"library-menu-items__no-items__hint",children:C.length>0?g("library.hint_emptyPrivateLibrary"):g("library.hint_emptyLibrary")})]}):Mo(jc,{children:[r.length>0&&Je(ll,{itemsRenderedPerBatch:G,items:[{id:null,elements:r}],onItemSelectToggle:P,onItemDrag:N,onClick:L,isItemSelected:_,svgCache:h}),Je(ll,{itemsRenderedPerBatch:G,items:I,onItemSelectToggle:P,onItemDrag:N,onClick:B,isItemSelected:_,svgCache:h})]}),C.length>0&&Je("div",{className:"library-menu-items-container__header",style:{marginTop:"0.75rem"},children:g("labels.excalidrawLib")}),C.length>0&&Je(jc,{children:Je(ll,{itemsRenderedPerBatch:G,items:C,onItemSelectToggle:P,onItemDrag:N,onClick:B,isItemSelected:_,svgCache:h})})]}),Y=x&&Mo(s2,{children:[Mo("div",{className:"library-menu-items-container__header",children:[g("library.search.heading"),!e&&Mo("div",{className:"library-menu-items-container__header__hint",style:{cursor:"pointer"},onPointerDown:D=>D.preventDefault(),onClick:D=>{w("")},children:[Je("kbd",{children:"esc"})," to clear"]})]}),v.length>0?Je(jc,{children:Je(ll,{itemsRenderedPerBatch:G,items:v,onItemSelectToggle:P,onItemDrag:N,onClick:B,isItemSelected:_,svgCache:h})}):Mo("div",{className:"library-menu-items__no-items",children:[Je("div",{className:"library-menu-items__no-items__hint",children:g("library.search.noResults")}),Je(Ot,{onPointerDown:D=>D.preventDefault(),onSelect:()=>{w("")},style:{width:"auto",marginTop:"1rem"},children:g("library.search.clearSearch")})]})]});return Mo("div",{className:"library-menu-items-container",style:r.length||I.length||C.length?{justifyContent:"flex-start"}:{borderBottom:0},children:[Mo("div",{className:"library-menu-items-header",children:[!y&&Je(Pn,{ref:j,type:"search",className:F7("library-menu-items-container__search",{hideCancelButton:m.formFactor!=="phone"}),placeholder:g("library.search.inputPlaceholder"),value:E,onChange:D=>w(D)}),Je(e2,{selectedItems:c,onSelectItems:s,className:"library-menu-dropdown-container--in-heading"})]}),Mo(Tt.Col,{className:"library-menu-items-container__items",align:"start",gap:1,style:{flex:C.length>0?1:"0 1 auto",margin:y?"auto":0},ref:p,children:[e&&Je("div",{style:{position:"absolute",top:"var(--container-padding-y)",right:"var(--container-padding-x)",transform:"translateY(50%)"},children:Je(Dt,{})}),H,Y,y&&Je(Uc,{style:{padding:"16px 0",width:"100%"},id:a,libraryReturnUrl:l,theme:i})]})]})}import{jsx as Ln,jsxs as m2}from"react/jsx-runtime";var Ni=Se(!1),d2=({children:e})=>Ln("div",{className:"layer-ui__library",children:e}),Z7=h2(({onInsertLibraryItems:e,pendingElements:o,onAddToLibrary:t,setAppState:n,libraryReturnUrl:r,library:i,id:a,theme:l,selectedItems:s,onSelectItems:c})=>{let[m]=ue(jo),p=ah(f=>{(async(E,w)=>{le("element","addToLibrary","ui");for(let x of G7)if(E.some(v=>v.type===x))return n({errorMessage:g(`errors.libraryElementTypeError.${x}`)});let y=[{status:"unpublished",elements:E,id:U7(),created:Date.now()},...w];t(),i.setLibrary(y).catch(()=>{n({errorMessage:g("alerts.errorAddingToLibrary")})})})(f,m.libraryItems)},[t,i,n,m.libraryItems]),d=u2(()=>m.libraryItems,[m]);if(m.status==="loading"&&!m.isInitialized)return Ln(d2,{children:Ln("div",{className:"layer-ui__library-message",children:m2("div",{children:[Ln(Dt,{size:"2em"}),Ln("span",{children:g("labels.libraryLoadingMessage")})]})})});let h=m.libraryItems.length>0||o.length>0;return m2(d2,{children:[Ln(rh,{isLoading:m.status==="loading",libraryItems:d,onAddToLibrary:p,onInsertLibraryItems:e,pendingElements:o,id:a,libraryReturnUrl:r,theme:l,onSelectItems:c,selectedItems:s}),h&&Ln(Uc,{className:"library-menu-control-buttons--at-bottom",style:{padding:"16px 12px 0 12px"},id:a,libraryReturnUrl:r,theme:l})]})}),ih=(e,o)=>({elements:e,pending:q(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}),selectedElementIds:o}),$7=(e,o)=>{let t=En(),[n,r]=p2(()=>ih(t,e.selectedElementIds)),i=H7(new Map);return lh(()=>{for(let a of n.pending)i.current.set(a.id,a.version)},[n.pending]),lh(()=>{o.state.cursorButton==="up"&&o.state.activeTool.type==="selection"&&r(a=>{if(!W7(a.selectedElementIds,e.selectedElementIds))return i.current.clear(),ih(t,e.selectedElementIds);let l=o.scene.getNonDeletedElementsMap();for(let s of Object.keys(e.selectedElementIds)){let c=l.get(s)?.version;if(c&&c!==i.current.get(s))return ih(t,e.selectedElementIds)}return a})},[o,o.state.cursorButton,o.state.activeTool.type,e.selectedElementIds,t]),n.pending},g2=h2(()=>{let e=qe(),{onInsertElements:o}=e,t=Io(),n=Te(),r=he(),[i,a]=p2([]),l=u2(()=>e.library,[e.library]),s=$7(n,e);lh(()=>X7(document,K7.KEYDOWN,p=>{if(p.key===Y7.ESCAPE&&p.target instanceof HTMLElement){let d=p.target;if(d.closest(`.${c2.SIDEBAR}`))i.length>0?(p.stopPropagation(),a([])):V7(d)&&d instanceof HTMLInputElement&&!d.value&&(p.stopPropagation(),r({openSidebar:null}),e.focusContainer());else if(i.length>0){let{x:h,y:f}=e.lastViewportPosition;document.elementFromPoint(h,f)?.closest(`.${c2.SIDEBAR}`)&&(p.stopPropagation(),a([]))}}},{capture:!0}),[i,r,e]);let c=ah(p=>{o(Ri(p)),e.focusContainer()},[o,e]),m=ah(()=>{r({selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null})},[r]);return Ln(Z7,{pendingElements:s,onInsertLibraryItems:c,onAddToLibrary:m,setAppState:r,libraryReturnUrl:t.libraryReturnUrl,library:l,id:e.id,theme:n.theme,selectedItems:i,onSelectItems:a})});import j7 from"clsx";import{useRef as q7}from"react";import{createPortal as J7}from"react-dom";import{KEYS as Q7}from"@excalidraw/common";import{jsx as f2,jsxs as e8}from"react/jsx-runtime";var b2=e=>{let{closeOnClickOutside:o=!0}=e,t=zs({className:"excalidraw-modal-container"}),n=q7(document.body.classList.contains("excalidraw-animations-disabled"));if(!t)return null;let r=i=>{i.key===Q7.ESCAPE&&(i.nativeEvent.stopImmediatePropagation(),i.stopPropagation(),e.onCloseRequest())};return J7(e8("div",{className:j7("Modal",e.className,{"animations-disabled":n.current}),role:"dialog","aria-modal":"true",onKeyDown:r,"aria-labelledby":e.labelledBy,children:[f2("div",{className:"Modal__background",onClick:o?e.onCloseRequest:void 0}),f2("div",{className:"Modal__content",style:{"--max-width":`${e.maxWidth}px`},tabIndex:0,children:e.children})]}),t)};import{jsx as qc,jsxs as x2}from"react/jsx-runtime";function i8(e){if(e&&typeof e=="number")return e;switch(e){case"small":return 550;case"wide":return 1024;case"regular":default:return 800}}var We=e=>{let[o,t]=fy(),[n]=n8(document.activeElement),{id:r}=ke(),i=de().formFactor==="phone";o8(()=>{if(!o)return;let c=E2(o);setTimeout(()=>{c.length>0&&e.autofocus!==!1&&(c[1]||c[0]).focus()});let m=p=>{if(p.key===r8.TAB){let d=E2(o),{activeElement:h}=document,f=d.findIndex(b=>b===h);f===0&&p.shiftKey?(d[d.length-1].focus(),p.preventDefault()):f===d.length-1&&!p.shiftKey&&(d[0].focus(),p.preventDefault())}};return o.addEventListener("keydown",m),()=>o.removeEventListener("keydown",m)},[o,e.autofocus]);let a=he(),l=Hr(Ni),s=()=>{a({openMenu:null}),l(!1),n.focus(),e.onCloseRequest()};return qc(b2,{className:t8("Dialog",e.className,{"Dialog--fullscreen":i}),labelledBy:"dialog-title",maxWidth:i8(e.size),onCloseRequest:s,closeOnClickOutside:e.closeOnClickOutside,children:x2(ze,{ref:t,children:[e.title&&x2("h2",{id:`${r}-dialog-title`,className:"Dialog__title",children:[qc("span",{className:"Dialog__titleContent",children:e.title}),e.titleButton]}),i&&qc("button",{className:"Dialog__close",onClick:s,title:g("buttons.close"),"aria-label":g("buttons.close"),type:"button",children:Ut}),qc("div",{className:"Dialog__content",children:e.children})]})})};import{SHAPES as k8}from"@excalidraw/element/shapes";import Po from"clsx";import{useMemo as h8,useRef as g8,useState as f8}from"react";import*as Lo from"@radix-ui/react-popover";import{CLASSES as T2,KEYS as b8,capitalizeString as Qo,isTransparent as td}from"@excalidraw/common";import{shouldAllowVerticalAlign as S2,suppportsHorizontalAlign as C2,hasBoundTextElement as od,isElbowArrow as sh,isImageElement as k2,isLinearElement as ch,isTextElement as rd,isArrowElement as v2,hasStrokeColor as I2,toolIsArrow as nd}from"@excalidraw/element";import{CODES as a8,KEYS as l8}from"@excalidraw/common";import s8 from"clsx";import{CaptureUpdateAction as c8}from"@excalidraw/element";import{jsx as d8}from"react/jsx-runtime";var Jc=F({name:"viewMode",label:"labels.viewMode",icon:Qn,viewMode:!0,trackEvent:{category:"canvas",predicate:e=>!e.viewModeEnabled},perform(e,o){return{appState:{...o,viewModeEnabled:!this.checked(o)},captureUpdate:c8.EVENTUALLY}},checked:e=>e.viewModeEnabled,predicate:(e,o,t)=>typeof t.viewModeEnabled>"u",keyTest:e=>!e[l8.CTRL_OR_CMD]&&e.altKey&&e.code===a8.R,PanelComponent:({data:e,updateData:o,appState:t})=>d8(V,{type:"button",icon:Qn,"aria-label":g("labels.viewMode"),onClick:()=>o(null),size:e?.size||"medium","data-testid":"button-view-mode",className:s8({enabled:t.viewModeEnabled})})});import{getToolbarTools as E8,SHAPES as x8}from"@excalidraw/element/shapes";import{useEffect as m8,useState as p8}from"react";import y2 from"clsx";import{capitalizeString as w2}from"@excalidraw/common";import*as Oi from"@radix-ui/react-popover";import{jsx as Qc,jsxs as u8}from"react/jsx-runtime";var ed=({app:e,options:o,activeTool:t,defaultOption:n,className:r="Shape",namePrefix:i,title:a,"data-testid":l,onToolChange:s,displayedOption:c,fillable:m=!1})=>{let[p,d]=p8(!1),h=t.type,f=c.type===h,b=32/2+10,{container:E}=ke();return!o.some(w=>w.type===h)&&p&&d(!1),m8(()=>{let w=e.onPointerDownEmitter.on(()=>{d(!1)});return()=>w?.()},[e]),u8(Oi.Root,{open:p,children:[Qc(Oi.Trigger,{asChild:!0,children:Qc(V,{className:y2(r,{fillable:m,active:o.some(w=>w.type===t.type)}),type:"radio",icon:c.icon,checked:f,name:"editor-current-shape",title:a,"aria-label":a,"data-testid":l,onPointerDown:()=>{d(w=>!w),s(n)}})}),Qc(Oi.Content,{className:"tool-popover-content",sideOffset:b,collisionBoundary:E??void 0,children:o.map(({type:w,icon:y,title:x})=>Qc(V,{className:y2(r,{active:h===w}),type:"radio",icon:y,checked:h===w,name:`${i}-option`,title:x||w2(w),keyBindingLabel:"","aria-label":x||w2(w),"data-testid":`toolbar-${w}`,onChange:()=>{e.state.activeTool.type!==w&&le("toolbar",w,"ui"),e.setActiveTool({type:w}),s?.(w)}},w))})]})};import{Fragment as zt,jsx as Z,jsxs as se}from"react/jsx-runtime";var dh=Po([T2.SHAPE_ACTIONS_THEME_SCOPE,"properties-content"]),sl=(e,o)=>{let t=o[0]?.type||null;for(let n of o)if(n.type!==t){t=null;break}return I2(e.activeTool.type)&&e.activeTool.type!=="image"&&t!=="image"&&t!=="frame"&&t!=="magicframe"||o.some(n=>I2(n.type))},cl=(e,o)=>yo(e.activeTool.type)||o.some(t=>yo(t.type)),M2=({appState:e,elementsMap:o,renderAction:t,app:n})=>{let r=Dr(o,e),i=!1;r.length===2&&(od(r[0])||od(r[1]))&&(i=!0);let a=!!(e.editingTextElement||e.newElement),l=de(),s=document.documentElement.getAttribute("dir")==="rtl",c=yo(e.activeTool.type)&&!td(e.currentItemBackgroundColor)||r.some(f=>yo(f.type)&&!td(f.backgroundColor)),m=r.length===1||i,p=!e.selectedLinearElement?.isEditing&&r.length===1&&ch(r[0])&&!sh(r[0]),d=!e.croppingElementId&&r.length===1&&k2(r[0]),h=!i&&Ze(e,n);return se("div",{className:"selected-shape-actions",children:[Z("div",{children:sl(e,r)&&t("changeStrokeColor")}),cl(e,r)&&Z("div",{children:t("changeBackgroundColor")}),c&&t("changeFillStyle"),(da(e.activeTool.type)||r.some(f=>da(f.type)))&&t("changeStrokeWidth"),(e.activeTool.type==="freedraw"||r.some(f=>f.type==="freedraw"))&&t("changeStrokeShape"),(ma(e.activeTool.type)||r.some(f=>ma(f.type)))&&se(zt,{children:[t("changeStrokeStyle"),t("changeSloppiness")]}),(pa(e.activeTool.type)||r.some(f=>pa(f.type)))&&Z(zt,{children:t("changeRoundness")}),(nd(e.activeTool.type)||r.some(f=>nd(f.type)))&&Z(zt,{children:t("changeArrowType")}),(e.activeTool.type==="text"||r.some(rd))&&se(zt,{children:[t("changeFontFamily"),t("changeFontSize"),(e.activeTool.type==="text"||C2(r,o))&&t("changeTextAlign")]}),S2(r,o)&&t("changeVerticalAlign"),(Rr(e.activeTool.type)||r.some(f=>Rr(f.type)))&&Z(zt,{children:t("changeArrowhead")}),t("changeOpacity"),se("fieldset",{children:[Z("legend",{children:g("labels.layers")}),se("div",{className:"buttonList",children:[t("sendToBack"),t("sendBackward"),t("bringForward"),t("bringToFront")]})]}),h&&!i&&se("fieldset",{children:[Z("legend",{children:g("labels.align")}),se("div",{className:"buttonList",children:[s?se(zt,{children:[t("alignRight"),t("alignHorizontallyCentered"),t("alignLeft")]}):se(zt,{children:[t("alignLeft"),t("alignHorizontallyCentered"),t("alignRight")]}),r.length>2&&t("distributeHorizontally"),Z("div",{style:{flexBasis:"100%",height:0}}),se("div",{style:{display:"flex",flexWrap:"wrap",gap:".5rem",marginTop:"-0.5rem"},children:[t("alignTop"),t("alignVerticallyCentered"),t("alignBottom"),r.length>2&&t("distributeVertically"),Z("div",{style:{flexBasis:"100%",height:0}}),t("arrangeElements"),t("normaliseElements")]})]})]}),!a&&r.length>0&&se("fieldset",{children:[Z("legend",{children:g("labels.actions")}),se("div",{className:"buttonList",children:[l.formFactor!=="phone"&&t("duplicateSelection"),l.formFactor!=="phone"&&t("deleteSelectedElements"),t("group"),t("ungroup"),m&&t("hyperlink"),d&&t("cropEditor"),p&&t("toggleLinearEditor"),t("smartZoom")]})]})]})},P2=({appState:e,renderAction:o,setAppState:t,targetElements:n,container:r})=>{let i=yo(e.activeTool.type)&&!td(e.currentItemBackgroundColor)||n.some(s=>yo(s.type)&&!td(s.backgroundColor)),a=n.length>0||e.activeTool.type!=="selection"&&e.activeTool.type!=="eraser"&&e.activeTool.type!=="hand"&&e.activeTool.type!=="laser"&&e.activeTool.type!=="lasso",l=e.openPopup==="compactStrokeStyles";return a?Z("div",{className:"compact-action-item",children:se(Lo.Root,{open:l,onOpenChange:s=>{t(s?{openPopup:"compactStrokeStyles"}:{openPopup:null})},children:[Z(Lo.Trigger,{asChild:!0,children:Z("button",{type:"button",className:Po("compact-action-button properties-trigger",{active:l}),title:g("labels.stroke"),onClick:s=>{s.preventDefault(),s.stopPropagation(),t({openPopup:l?null:"compactStrokeStyles"})},children:cb})}),l&&Z(Vo,{className:dh,container:r,style:{maxWidth:"13rem"},onClose:()=>{},children:se("div",{className:"selected-shape-actions",children:[i&&o("changeFillStyle"),(da(e.activeTool.type)||n.some(s=>da(s.type)))&&o("changeStrokeWidth"),(ma(e.activeTool.type)||n.some(s=>ma(s.type)))&&se(zt,{children:[o("changeStrokeStyle"),o("changeSloppiness")]}),(pa(e.activeTool.type)||n.some(s=>pa(s.type)))&&o("changeRoundness"),o("changeOpacity")]})})]})}):null},L2=({appState:e,renderAction:o,setAppState:t,targetElements:n,container:r,app:i})=>{let a=nd(e.activeTool.type)||n.some(s=>nd(s.type)),l=e.openPopup==="compactArrowProperties";return a?Z("div",{className:"compact-action-item",children:se(Lo.Root,{open:l,onOpenChange:s=>{t(s?{openPopup:"compactArrowProperties"}:{openPopup:null})},children:[Z(Lo.Trigger,{asChild:!0,children:Z("button",{type:"button",className:Po("compact-action-button properties-trigger",{active:l}),title:g("labels.arrowtypes"),onClick:s=>{s.preventDefault(),s.stopPropagation(),t({openPopup:l?null:"compactArrowProperties"})},children:(()=>{let s=st(n,i,c=>v2(c)?c.elbowed?"elbow":c.roundness?"round":"sharp":null,c=>v2(c),c=>c?null:e.currentItemArrowType);return s==="elbow"?$r:s==="round"?jr:Zr})()})}),l&&Z(Vo,{container:r,className:"properties-content",style:{maxWidth:"13rem"},onClose:()=>{},children:o("changeArrowProperties")})]})}):null},A2=({appState:e,renderAction:o,setAppState:t,targetElements:n,container:r,elementsMap:i})=>{let{saveCaretPosition:a,restoreCaretPosition:l}=kb(),s=e.openPopup==="compactTextProperties";return Z("div",{className:"compact-action-item",children:se(Lo.Root,{open:s,onOpenChange:c=>{c?(e.editingTextElement&&a(),t({openPopup:"compactTextProperties"})):(t({openPopup:null}),e.editingTextElement&&l())},children:[Z(Lo.Trigger,{asChild:!0,children:Z("button",{type:"button",className:Po("compact-action-button properties-trigger",{active:s}),title:g("labels.textAlign"),onClick:c=>{c.preventDefault(),c.stopPropagation(),s?t({openPopup:null}):(e.editingTextElement&&a(),t({openPopup:"compactTextProperties"}))},children:B1})}),e.openPopup==="compactTextProperties"&&Z(Vo,{className:dh,container:r,style:{maxWidth:"13rem"},preventAutoFocusOnTouch:!!e.editingTextElement,onClose:()=>{e.editingTextElement&&l()},children:se("div",{className:"selected-shape-actions",children:[(e.activeTool.type==="text"||n.some(rd))&&o("changeFontSize"),(e.activeTool.type==="text"||C2(n,i))&&o("changeTextAlign"),S2(n,i)&&o("changeVerticalAlign")]})})]})})},_2=({appState:e,renderAction:o,targetElements:t,setAppState:n,container:r,app:i,showDuplicate:a,showDelete:l})=>{let s=!!(e.editingTextElement||e.newElement),c=!e.croppingElementId&&t.length===1&&k2(t[0]),m=t.length===1,p=Ze(e,i),d=!1;t.length===2&&(od(t[0])||od(t[1]))&&(d=!0);let h=document.documentElement.getAttribute("dir")==="rtl",f=e.openPopup==="compactOtherProperties";return s||t.length===0?null:Z("div",{className:"compact-action-item",children:se(Lo.Root,{open:f,onOpenChange:b=>{n(b?{openPopup:"compactOtherProperties"}:{openPopup:null})},children:[Z(Lo.Trigger,{asChild:!0,children:Z("button",{type:"button",className:Po("compact-action-button properties-trigger",{active:f}),title:g("labels.actions"),onClick:b=>{b.preventDefault(),b.stopPropagation(),n({openPopup:f?null:"compactOtherProperties"})},children:M1})}),f&&Z(Vo,{className:dh,container:r,style:{maxWidth:"12rem",justifyContent:"center",alignItems:"center"},onClose:()=>{},children:se("div",{className:"selected-shape-actions",children:[se("fieldset",{children:[Z("legend",{children:g("labels.layers")}),se("div",{className:"buttonList",children:[o("sendToBack"),o("sendBackward"),o("bringForward"),o("bringToFront")]})]}),p&&!d&&se("fieldset",{children:[Z("legend",{children:g("labels.align")}),se("div",{className:"buttonList",children:[h?se(zt,{children:[o("alignRight"),o("alignHorizontallyCentered"),o("alignLeft")]}):se(zt,{children:[o("alignLeft"),o("alignHorizontallyCentered"),o("alignRight")]}),t.length>2&&o("distributeHorizontally"),Z("div",{style:{flexBasis:"100%",height:0}}),se("div",{style:{display:"flex",flexWrap:"wrap",gap:".5rem",marginTop:"-0.5rem"},children:[o("alignTop"),o("alignVerticallyCentered"),o("alignBottom"),t.length>2&&o("distributeVertically"),Z("div",{style:{flexBasis:"100%",height:0}}),o("arrangeElements"),o("normaliseElements")]})]})]}),se("fieldset",{children:[Z("legend",{children:g("labels.actions")}),se("div",{className:"buttonList",children:[o("group"),o("ungroup"),m&&o("hyperlink"),c&&o("cropEditor"),a&&o("duplicateSelection"),l&&o("deleteSelectedElements")]})]})]})})]})})},y8=({appState:e,renderAction:o,targetElements:t})=>!e.selectedLinearElement?.isEditing&&t.length===1&&ch(t[0])&&!sh(t[0])?Z("div",{className:"compact-action-item",children:o("toggleLinearEditor")}):null,D2=({appState:e,elementsMap:o,renderAction:t,app:n,setAppState:r})=>{let i=Dr(o,e),{container:a}=ke(),l=!!(e.editingTextElement||e.newElement),s=!e.selectedLinearElement?.isEditing&&i.length===1&&ch(i[0])&&!sh(i[0]);return se("div",{className:"compact-shape-actions",children:[sl(e,i)&&Z("div",{className:Po("compact-action-item"),children:t("changeStrokeColor")}),cl(e,i)&&Z("div",{className:"compact-action-item",children:t("changeBackgroundColor")}),Z(P2,{appState:e,renderAction:t,setAppState:r,targetElements:i,container:a}),Z(L2,{appState:e,renderAction:t,setAppState:r,targetElements:i,container:a,app:n}),s&&Z("div",{className:"compact-action-item",children:t("toggleLinearEditor")}),(e.activeTool.type==="text"||i.some(rd))&&se(zt,{children:[Z("div",{className:"compact-action-item",children:t("changeFontFamily")}),Z(A2,{appState:e,renderAction:t,setAppState:r,targetElements:i,container:a,elementsMap:o})]}),!l&&i.length>0&&Z("div",{className:"compact-action-item",children:t("duplicateSelection")}),!l&&i.length>0&&Z("div",{className:"compact-action-item",children:t("deleteSelectedElements")}),Z(_2,{appState:e,renderAction:t,targetElements:i,setAppState:r,container:a,app:n})]})},R2=({appState:e,elementsMap:o,renderAction:t,app:n,setAppState:r})=>{let i=Dr(o,e),{container:a}=ke(),l=g8(null),s=l.current?.getBoundingClientRect()?.width??0,c=9,m=6,p=32,d=c*p+(c-1)*m,h=p+m,f=s>=d+h,b=s>=d+2*h;return se(ze,{className:"compact-shape-actions mobile-shape-actions",style:{flexDirection:"row",boxShadow:"none",padding:0,zIndex:2,backgroundColor:"transparent",height:p*1.35,marginBottom:4,alignItems:"center",gap:m,pointerEvents:"none"},ref:l,children:[se("div",{style:{display:"flex",flexDirection:"row",gap:m,flex:1},children:[sl(e,i)&&Z("div",{className:Po("compact-action-item"),children:t("changeStrokeColor")}),cl(e,i)&&Z("div",{className:"compact-action-item",children:t("changeBackgroundColor")}),Z(P2,{appState:e,renderAction:t,setAppState:r,targetElements:i,container:a}),Z(L2,{appState:e,renderAction:t,setAppState:r,targetElements:i,container:a,app:n}),Z(y8,{appState:e,renderAction:t,targetElements:i}),(e.activeTool.type==="text"||i.some(rd))&&se(zt,{children:[Z("div",{className:"compact-action-item",children:t("changeFontFamily")}),Z(A2,{appState:e,renderAction:t,setAppState:r,targetElements:i,container:a,elementsMap:o})]}),Z(_2,{appState:e,renderAction:t,targetElements:i,setAppState:r,container:a,app:n,showDuplicate:!b,showDelete:!f})]}),se("div",{style:{display:"flex",flexDirection:"row",gap:m},children:[Z("div",{className:"compact-action-item",children:t("undo")}),Z("div",{className:"compact-action-item",children:t("redo")}),b&&Z("div",{className:"compact-action-item",children:t("duplicateSelection")}),f&&Z("div",{className:"compact-action-item",children:t("deleteSelectedElements")})]})]})},N2=({activeTool:e,setAppState:o,app:t,UIOptions:n})=>{let[r,i]=f8(!1),a=je(),l=a==="full",s=a==="compact",c=[{type:"selection",icon:gs,title:Qo(g("toolBar.selection"))},{type:"lasso",icon:mn,title:Qo(g("toolBar.lasso"))}],m=e.type==="frame",p=e.type==="laser",d=l&&e.type==="lasso"&&t.state.preferredSelectionTool.type!=="lasso",h=e.type==="embeddable",f=x8.filter(E=>E.myocSimplifiedMode===!1),b=h8(()=>{switch(e.type){case"frame":return{icon:hn,highlight:!1};case"lasso":return{icon:mn,highlight:!0};case"embeddable":return{icon:ws,highlight:!0};case"laser":return t.props.isCollaborating?{icon:Xr,highlight:!0}:{icon:Kr,highlight:!0};case"diamond":return{icon:bs,highlight:!0};case"rectangle":return{icon:fs,highlight:!0};case"ellipse":return{icon:Es,highlight:!0};case"arrow":return{icon:R1,highlight:!0};case"line":return{icon:xs,highlight:!0};default:return{icon:Xr,highlight:!1}}},[e.type,t.props.isCollaborating]);return se(zt,{children:[E8(t).filter(E=>!t.state.myocSimplifiedMode||E.myocSimplifiedMode).map(({value:E,icon:w,key:y,fillable:x},v)=>{if(n.tools?.[E]===!1)return null;let I=g(`toolBar.${E}`),C=y&&Qo(typeof y=="string"?y:y[0]),P=C;return(E==="selection"||E==="lasso")&&s?Z(ed,{app:t,options:c,activeTool:e,defaultOption:t.state.preferredSelectionTool.type,namePrefix:"selectionType",title:Qo(g("toolBar.selection")),"data-testid":"toolbar-selection",onToolChange:k=>{(k==="selection"||k==="lasso")&&(t.setActiveTool({type:k}),o({preferredSelectionTool:{type:k,initialized:!0}}))},displayedOption:c.find(k=>k.type===t.state.preferredSelectionTool.type)||c[0],fillable:e.type==="selection"},"selection-popover"):Z(V,{className:Po("Shape",{fillable:x}),type:"radio",icon:w,checked:e.type===E,name:"editor-current-shape",title:`${Qo(I)} \u2014 ${P}`,keyBindingLabel:C,"aria-label":Qo(I),"aria-keyshortcuts":P,"data-testid":`toolbar-${E}`,onPointerDown:({pointerType:k})=>{!t.state.penDetected&&k==="pen"&&t.togglePenMode(!0),E==="selection"&&(t.state.activeTool.type==="selection"?t.setActiveTool({type:"lasso"}):t.setActiveTool({type:"selection"}))},onChange:({pointerType:k})=>{t.state.activeTool.type!==E&&le("toolbar",E,"ui"),E==="image"?t.setActiveTool({type:E}):t.setActiveTool({type:E})}},E)}),Z("div",{className:"App-toolbar__divider"}),se(ge,{open:r,children:[Z(ge.Trigger,{className:Po("App-toolbar__extra-tools-trigger",{"App-toolbar__extra-tools-trigger--selected":b.highlight}),onToggle:()=>{i(!r),o({openMenu:null,openPopup:null})},title:g("toolBar.extraTools"),children:b.icon}),se(ge.Content,{onClickOutside:()=>i(!1),onSelect:()=>i(!1),className:"App-toolbar__extra-tools-dropdown",children:[Z(ge.Item,{onSelect:()=>t.setActiveTool({type:"lasso"}),icon:mn,"data-testid":"toolbar-lasso",selected:d,children:g("toolBar.lasso")}),f.map(({value:E,icon:w,key:y,fillable:x})=>{let v=g(`toolBar.${E}`),I=y&&Qo(typeof y=="string"?y:y[0]);return Z(ge.Item,{onSelect:()=>t.setActiveTool({type:E}),icon:w,"data-testid":`toolbar-${E}`,selected:e.type===E,shortcut:I??void 0,children:Qo(v)},E)}),Z("div",{className:"App-toolbar__dropdown-divider"}),Z(ge.Item,{onSelect:()=>t.toggleLock(),icon:t.state.activeTool.locked?dn:Wo,"data-testid":"toolbar-lock",selected:t.state.activeTool.locked,shortcut:b8.Q,children:Qo(g("toolBar.lock-short"))})]})]})]})},B2=({renderAction:e,zoom:o})=>Z(Tt.Col,{gap:1,className:T2.ZOOM_ACTIONS,children:se(Tt.Row,{align:"center",children:[e("zoomOut"),e("resetZoom"),e("zoomIn")]})}),F2=({renderAction:e,className:o})=>se("div",{className:`undo-redo-buttons ${o}`,children:[Z("div",{className:"undo-button-container",children:Z(ct,{label:g("buttons.undo"),children:e("undo")})}),Z("div",{className:"redo-button-container",children:se(ct,{label:g("buttons.redo"),children:[" ",e("redo")]})})]}),O2=({actionManager:e,showExitZenModeBtn:o})=>Z("button",{type:"button",className:Po("disable-zen-mode",{"disable-zen-mode--visible":o}),onClick:()=>e.executeAction(vi),children:g("buttons.exitZenMode")});import{useRef as w8}from"react";var mh=e=>{let o=w8({userFn:e});return o.current.userFn=e,o.current.stableFn||(o.current.stableFn=(...t)=>o.current.userFn(...t)),o.current.stableFn};var ph={};qf(ph,{toggleTheme:()=>v8});var v8={...nr,category:"App",label:"Toggle theme",perform:({actionManager:e})=>{e.executeAction(nr,"commandPalette")}};import{jsx as Qe,jsxs as Ao}from"react/jsx-runtime";var M8=Se(null),He={app:"App",export:"Export",tools:"Tools",editor:"Editor",elements:"Elements",links:"Links",library:"Library"},H2=e=>{switch(e){case He.app:return 1;case He.export:return 2;case He.editor:return 3;case He.tools:return 4;case He.elements:return 5;case He.links:return 6;default:return 10}},ld=({shortcut:e,className:o,children:t})=>{let n=e.replace("++","+$").split("+");return Ao("div",{className:U2("shortcut",o),children:[n.map((r,i)=>Qe("div",{className:"shortcut-wrapper",children:Qe("div",{className:"shortcut-key",children:r==="$"?"+":r})},r)),Qe("div",{className:"shortcut-desc",children:t})]})},Y2=e=>!e.altKey&&e[ho.CTRL_OR_CMD]&&(e.shiftKey&&e.key.toLowerCase()===ho.P||e.key===ho.SLASH),Mde=Object.assign(e=>{let o=Te(),t=he();return ad(()=>{let n=r=>{Y2(r)&&(r.preventDefault(),r.stopPropagation(),t(i=>{let a=i.openDialog?.name==="commandPalette"?null:{name:"commandPalette"};return a&&le("command_palette","open","shortcut"),{openDialog:a}}))};return window.addEventListener(sd.KEYDOWN,n,{capture:!0}),()=>window.removeEventListener(sd.KEYDOWN,n,{capture:!0})},[t]),o.openDialog?.name!=="commandPalette"?null:Qe(P8,{...e})},{defaultItems:ph});function P8({customCommandPaletteItems:e}){let o=qe(),t=Te(),n=he(),r=Io(),i=at(),[a,l]=ue(M8),[s,c]=id(null),m=W2(null),p=gn({uiAppState:t,customCommandPaletteItems:e,appProps:r}),[d]=ue(jo),h=T8(()=>d.libraryItems?.filter(k=>!!k.name).map(k=>({label:k.name,icon:Qe(L8,{id:k.id,elements:k.elements}),category:"Library",order:H2("Library"),haystack:dr(k.name),perform:()=>{o.onInsertElements(Ri([k]))}}))||[],[o,d.libraryItems]);ad(()=>{let{uiAppState:k,customCommandPaletteItems:N,appProps:_}=p,L=H=>{let Y="";return H.label&&(typeof H.label=="function"?Y=g(H.label(o.scene.getNonDeletedElements(),k,o)):Y=g(H.label)),Y},B=H=>typeof H.icon=="function"?H.icon(k,o.scene.getNonDeletedElements()):H.icon,G=[],j=(H,Y,D)=>{let O={label:L(H),icon:B(H),category:Y,shortcut:Ae(H.name),keywords:H.keywords,predicate:H.predicate,viewMode:H.viewMode,perform:()=>{i.executeAction(H,"commandPalette")}};return D?D(O,H):O};if(k&&o.scene&&i){let H=[i.actions.group,i.actions.ungroup,i.actions.cut,i.actions.copy,i.actions.deleteSelectedElements,i.actions.wrapSelectionInFrame,i.actions.copyStyles,i.actions.pasteStyles,i.actions.bringToFront,i.actions.bringForward,i.actions.sendBackward,i.actions.sendToBack,i.actions.alignTop,i.actions.alignBottom,i.actions.alignLeft,i.actions.alignRight,i.actions.alignVerticallyCentered,i.actions.alignHorizontallyCentered,i.actions.arrangeElements,i.actions.normaliseElements,i.actions.duplicateSelection,i.actions.smartZoom,i.actions.flipHorizontal,i.actions.flipVertical,i.actions.zoomToFitSelection,i.actions.zoomToFitSelectionInViewport,i.actions.increaseFontSize,i.actions.decreaseFontSize,i.actions.toggleLinearEditor,i.actions.cropEditor,i.actions.togglePolygon,qa,Fc,hy].map(K=>j(K,He.elements,(ae,be)=>({...ae,predicate:be.predicate?be.predicate:(ce,Oe,io,yt)=>q(ce,Oe).length>0}))),Y=[i.actions.toggleHandTool,i.actions.setFrameAsActiveTool,i.actions.toggleLassoTool].map(K=>j(K,He.tools)),D=[i.actions.undo,i.actions.redo,i.actions.zoomIn,i.actions.zoomOut,i.actions.resetZoom,i.actions.zoomToFit,i.actions.smartZoom,i.actions.zenMode,i.actions.viewMode,i.actions.gridMode,i.actions.objectsSnapMode,i.actions.toggleShortcuts,i.actions.selectAll,i.actions.toggleElementLock,i.actions.unlockAllElements,i.actions.stats].map(K=>j(K,He.editor)),O=[i.actions.saveToActiveFile,i.actions.saveFileToDisk,i.actions.copyAsPng,i.actions.copyAsSvg].map(K=>j(K,He.export));G=[...H,...D,{label:g("buttons.exportImage"),category:He.export,icon:Is,shortcut:Ae("imageExport"),keywords:["export","image","png","jpeg","svg","clipboard","picture"],perform:()=>{n({openDialog:{name:"imageExport"}})}},...O];let Q=[{label:g("toolBar.library"),category:He.app,icon:hs,viewMode:!1,perform:()=>{k.openSidebar?n({openSidebar:null}):n({openSidebar:{name:z2.name,tab:z2.defaultTab}})}},{label:g("search.title"),category:He.app,icon:_t,viewMode:!0,perform:()=>{i.executeAction(dl)}},{label:g("labels.shapeSwitch"),category:He.elements,icon:va,perform:()=>{i.executeAction(uy)}},{label:g("labels.changeStroke"),keywords:["color","outline"],category:He.elements,icon:vs,viewMode:!1,predicate:(K,ae)=>{let be=q(K,ae);return be.length>0&&sl(ae,be)},perform:()=>{n(K=>({openPopup:"elementStroke"}))}},{label:g("labels.changeBackground"),keywords:["color","fill"],icon:vs,category:He.elements,viewMode:!1,predicate:(K,ae)=>{let be=q(K,ae);return be.length>0&&cl(ae,be)},perform:()=>{n(K=>({openPopup:"elementBackground"}))}},{label:g("labels.canvasBackground"),keywords:["color"],icon:vs,category:He.editor,viewMode:!1,perform:()=>{n(K=>({openMenu:K.openMenu==="canvas"?null:"canvas",openPopup:"canvasBackground"}))}},...k8.reduce((K,ae)=>{let{value:be,icon:ce,key:Oe}=ae;if(_.UIOptions.tools?.[be]===!1)return K;let yt=Oe&&S8(typeof Oe=="string"?Oe:Oe[0]),Go={label:g(`toolBar.${be}`),category:He.tools,shortcut:yt,icon:ce,keywords:["toolbar"],viewMode:!1,perform:({event:_r})=>{be==="image"?o.setActiveTool({type:be}):o.setActiveTool({type:be})}};return K.push(Go),K},[]),...Y,{label:g("toolBar.lock"),category:He.tools,icon:k.activeTool.locked?dn:Wo,shortcut:ho.Q.toLocaleUpperCase(),viewMode:!1,perform:()=>{o.toggleLock()}}],ee=[...G,...Q,...N||[]].map(K=>({...K,icon:K.icon||va,order:K.order??H2(K.category),haystack:`${dr(K.label.toLocaleLowerCase())} ${K.keywords?.join(" ")||""}`}));c(ee),l([...ee,...h].find(K=>K.label===a?.label)??null)}},[p,o,i,c,a?.label,l,n,h]);let[f,b]=id(""),[E,w]=id(null),[y,x]=id({}),v=k=>{n({openDialog:null},k),b("")},I=(k,N)=>{t.openDialog?.name==="commandPalette"&&(N.stopPropagation(),N.preventDefault(),document.body.classList.add("excalidraw-animations-disabled"),v(()=>{k.perform({actionManager:i,event:N}),l(k),requestAnimationFrame(()=>{document.body.classList.remove("excalidraw-animations-disabled")})}))},C=mh(k=>k.viewMode===!1&&t.viewModeEnabled?!1:typeof k.predicate=="function"?k.predicate(o.scene.getNonDeletedElements(),t,r,o):k.predicate===void 0||k.predicate),P=mh(k=>{let N=C8(k.target)||Y2(k)||k.key===ho.ESCAPE;if(N&&k.key!==ho.ARROW_UP&&k.key!==ho.ARROW_DOWN&&k.key!==ho.ENTER)return;let _=Object.values(y).flat(),L=a&&!f&&C(a);if(k.key===ho.ARROW_UP){k.preventDefault();let B=_.findIndex(H=>H.label===E?.label);if(L){if(B===0){w(a);return}if(E===a){let H=_[_.length-1];H&&w(H);return}}let G;B===-1?G=_.length-1:G=B===0?_.length-1:(B-1)%_.length;let j=_[G];j&&w(j);return}if(k.key===ho.ARROW_DOWN){k.preventDefault();let B=_.findIndex(H=>H.label===E?.label);if(L){if(!E||B===_.length-1){w(a);return}if(E===a){let H=_[0];H&&w(H);return}}let G=(B+1)%_.length,j=_[G];j&&w(j);return}if(k.key===ho.ENTER&&E&&setTimeout(()=>{I(E,k)}),!N){if(k.stopPropagation(),/^[a-zA-Z0-9]$/.test(k.key)){m?.current?.focus();return}k.preventDefault()}});return ad(()=>(window.addEventListener(sd.KEYDOWN,P,{capture:!0}),()=>window.removeEventListener(sd.KEYDOWN,P,{capture:!0})),[P]),ad(()=>{if(!s)return;let k=B=>{let G={};for(let j of B)G[j.category]?G[j.category].push(j):G[j.category]=[j];return G},N=f?.length>1?[...s.filter(C).sort((B,G)=>B.order-G.order),...h]:s.filter(C).sort((B,G)=>B.order-G.order),_=!f&&a&&C(a);if(!f){x(k(_?N.filter(B=>B.label!==a?.label):N)),w(_?a:N[0]||null);return}let L=dr(f.toLocaleLowerCase().replace(/[<>_| -]/g,""));N=I8.filter(L,N,{extract:B=>B.haystack??""}).sort((B,G)=>G.score-B.score).map(B=>B.original),x(k(N)),w(N[0]??null)},[f,s,C,a,h]),Ao(We,{onCloseRequest:()=>v(),closeOnClickOutside:!0,title:!1,size:720,autofocus:!0,className:"command-palette-dialog",children:[Qe(Pn,{value:f,placeholder:g("commandPalette.search.placeholder"),onChange:k=>{b(k)},selectOnRender:!0,ref:m}),o.editorInterface.formFactor!=="phone"&&Ao("div",{className:"shortcuts-wrapper",children:[Qe(ld,{shortcut:"\u2191\u2193",children:g("commandPalette.shortcuts.select")}),Qe(ld,{shortcut:"\u21B5",children:g("commandPalette.shortcuts.confirm")}),Qe(ld,{shortcut:A("Esc"),children:g("commandPalette.shortcuts.close")})]}),Ao("div",{className:"commands",children:[a&&!f&&Ao("div",{className:"command-category",children:[Ao("div",{className:"command-category-title",children:[g("commandPalette.recents"),Qe("div",{className:"icon",style:{marginLeft:"6px"},children:K0})]}),Qe(G2,{command:a,isSelected:a.label===E?.label,onClick:k=>I(a,k),disabled:!C(a),onMouseMove:()=>w(a),showShortcut:o.editorInterface.formFactor!=="phone",appState:t})]}),Object.keys(y).length>0?Object.keys(y).map((k,N)=>Ao("div",{className:"command-category",children:[Qe("div",{className:"command-category-title",children:k}),y[k].map(_=>Qe(G2,{command:_,isSelected:_.label===E?.label,onClick:L=>I(_,L),onMouseMove:()=>w(_),showShortcut:o.editorInterface.formFactor!=="phone",appState:t,size:k==="Library"?"large":"small"},_.label))]},k)):s?Ao("div",{className:"no-match",children:[Qe("div",{className:"icon",children:_t})," ",g("commandPalette.search.noMatch")]}):null]})]})}var L8=({id:e,elements:o})=>{let t=W2(null),{svgCache:n}=_i();return Oc(e,o,n,t),Qe("div",{className:"library-item-icon",ref:t})},G2=({command:e,isSelected:o,disabled:t,onMouseMove:n,onClick:r,showShortcut:i,appState:a,size:l="small"})=>{let s=()=>{};return Ao("div",{className:U2("command-item",{"item-selected":o,"item-disabled":t,"command-item-large":l==="large"}),ref:c=>{o&&!t&&c?.scrollIntoView?.({block:"nearest"})},onClick:t?s:r,onMouseMove:t?s:n,title:t?g("commandPalette.itemNotAvailable"):"",children:[Ao("div",{className:"name",children:[e.icon&&Qe(si,{className:"icon",size:"var(--icon-size, 1rem)",icon:typeof e.icon=="function"?e.icon(a,[]):e.icon}),Qe(Da,{children:e.label})]}),i&&e.shortcut&&Qe(ld,{shortcut:e.shortcut})]})};import{getSizeFromPoints as G0e,randomInteger as M_,getUpdatedTimestamp as P_}from"@excalidraw/common";import{simplify as u_}from"points-on-curve";import{getStroke as h_}from"perfect-freehand";import{pointsOnBezierCurves as Dde}from"points-on-curve";import{invariant as Nde}from"@excalidraw/common";import{curve as Fde,lineSegment as Ode,pointFrom as zde,pointDistance as Hde,pointFromArray as Gde,pointFromVector as Ude,pointRotateRads as Wde,polygon as Yde,polygonFromPoints as Vde,PRECISION as Xde,segmentsIntersectAt as Kde,vector as Zde,vectorAdd as $de,vectorFromPoint as jde,vectorScale as qde}from"@excalidraw/math";import{getElementAbsoluteCoords as Qde}from"@excalidraw/element";var uh=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 g_,pointDistance as sw,pointRotateRads as C0e}from"@excalidraw/math";import{ROUGHNESS as f_,THEME as Lh,isTransparent as hl,assertNever as b_,COLOR_PALETTE as E_,LINE_POLYGON_POINT_MERGE_DISTANCE as M0e,applyDarkModeFilter as xd}from"@excalidraw/common";import{RoughGenerator as x_}from"roughjs/bin/generator";import F1e from"roughjs/bin/rough";import{isRightAngleRads as z1e,lineSegment as H1e,pointFrom as G1e,pointRotateRads as U1e}from"@excalidraw/math";import{BOUND_TEXT_PADDING as Y1e,DEFAULT_REDUCED_GLOBAL_ALPHA as V1e,ELEMENT_READY_TO_ERASE_OPACITY as X1e,FRAME_STYLE as K1e,DARK_THEME_FILTER as Z1e,MIME_TYPES as aw,THEME as $1e,distance as j1e,getFontString as q1e,isRTL as J1e,getVerticalOffset as Q1e,invariant as e0e,applyDarkModeFilter as t0e}from"@excalidraw/common";import $ge from"roughjs/bin/rough";import{arrayToMap as qge,invariant as Q2,rescalePoints as Jge,sizeOf as Qge}from"@excalidraw/common";import{degreesToRadians as Th,lineSegment as tfe,pointDistance as ofe,pointFrom as lt,pointFromArray as $8,pointRotateRads as Wi}from"@excalidraw/math";import{pointsOnBezierCurves as ife}from"points-on-curve";import{pointCenter as dge,pointFrom as mge,pointRotateRads as pge,pointsEqual as uge,pointDistance as hge,vectorFromPoint as gge,curveLength as fge,curvePointAtLength as bge,lineSegment as Ege}from"@excalidraw/math";import{DRAGGING_THRESHOLD as wge,KEYS as vge,shouldRotateWithDiscreteAngle as Ige,getGridPoint as Tge,invariant as Sge,isShallowEqual as Cge,getFeatureFlag as kge}from"@excalidraw/common";import{deconstructLinearOrFreeDrawElement as Pge,isPathALoop as Lge,moveArrowAboveBindable as Age,projectFixedPointOntoDiagonal as _ge}from"@excalidraw/element";import{KEYS as phe,arrayToMap as uhe,getFeatureFlag as hhe,invariant as ghe,isTransparent as fhe}from"@excalidraw/common";import{PRECISION as Ehe,clamp as xhe,lineSegment as yhe,pointDistance as whe,pointDistanceSq as vhe,pointFrom as Ihe,pointFromVector as The,pointRotateRads as She,pointsEqual as Che,vectorFromPoint as khe,vectorNormalize as Mhe,vectorScale as Phe}from"@excalidraw/math";import{invariant as Fpe,isTransparent as Ope}from"@excalidraw/common";import{curveIntersectLineSegment as Hpe,isPointWithinBounds as Gpe,lineSegment as Upe,lineSegmentIntersectionPoints as Wpe,pointFrom as Ype,pointFromVector as Vpe,pointRotateRads as Xpe,pointsEqual as Kpe,vectorFromPoint as Zpe,vectorNormalize as $pe,vectorScale as jpe}from"@excalidraw/math";import{ellipse as Jpe,ellipseSegmentInterceptPoints as Qpe}from"@excalidraw/math/ellipse";import{DEFAULT_ADAPTIVE_RADIUS as D8,DEFAULT_PROPORTIONAL_RADIUS as gh,invariant as dme,LINE_CONFIRM_THRESHOLD as R8,ROUNDNESS as fh}from"@excalidraw/common";import{curve as pme,curveCatmullRomCubicApproxPoints as ume,curveOffsetPoints as hme,lineSegment as gme,lineSegmentIntersectionPoints as fme,pointDistance as N8,pointFrom as bme,pointFromArray as Eme,pointFromVector as xme,pointRotateRads as yme,pointTranslate as wme,rectangle as vme,vectorFromPoint as Ime,vectorNormalize as Tme,vectorScale as Sme}from"@excalidraw/math";import{ROUNDNESS as nme,assertNever as rme}from"@excalidraw/common";import{pointsEqual as ame}from"@excalidraw/math";var V2=e=>!!e&&e.type==="embeddable",X2=e=>!!e&&e.type==="iframe",hh=e=>!!e&&(e.type==="iframe"||e.type==="embeddable"),pr=e=>e!=null&&e.type==="text";var cd=e=>e!=null&&(e.type==="frame"||e.type==="magicframe");var ur=e=>e!=null&&A8(e.type);var hr=e=>e!=null&&e.type==="arrow",ml=e=>hr(e)&&e.elbowed;var A8=e=>e==="arrow"||e==="line";var zi=e=>e!==null&&"containerId"in e&&e.containerId!==null&&pr(e);var dd=(e,o=1)=>{if(e.length>=3){let[t,n]=[e[0],e[e.length-1]];return N8(t,n)<=R8/o}return!1},pl=(e,o)=>{if(o.roundness?.type===fh.PROPORTIONAL_RADIUS||o.roundness?.type===fh.LEGACY)return e*gh;if(o.roundness?.type===fh.ADAPTIVE_RADIUS){let t=o.roundness?.value??D8,n=t/gh;return e<=n?e*gh:t}return 0};import{ARROW_LABEL_FONT_SIZE_TO_MIN_WIDTH_RATIO as ape,ARROW_LABEL_WIDTH_FRACTION as lpe,BOUND_TEXT_PADDING as spe,DEFAULT_FONT_SIZE as cpe,TEXT_ALIGN as dpe,VERTICAL_ALIGN as mpe,getFontString as ppe,isProdEnv as upe,invariant as hpe}from"@excalidraw/common";import{pointFrom as fpe,pointRotateRads as bpe}from"@excalidraw/math";import{BOUND_TEXT_PADDING as Fme,DEFAULT_FONT_SIZE as Ome,DEFAULT_FONT_FAMILY as zme,getFontString as Hme,isTestEnv as Gme,normalizeEOL as Ume}from"@excalidraw/common";var Wme="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".toLocaleUpperCase();import{isDevEnv as jme,isTestEnv as qme}from"@excalidraw/common";import{curvePointDistance as Cpe,distanceToLineSegment as kpe,pointRotateRads as Mpe}from"@excalidraw/math";import{ellipse as Lpe,ellipseDistanceFromPoint as Ape}from"@excalidraw/math/ellipse";import{invariant as mue,isDevEnv as pue,isTestEnv as uue}from"@excalidraw/common";import{pointFrom as gue,pointFromVector as fue,pointRotateRads as bue,pointScaleFromOrigin as Eue,pointsEqual as xue,triangleIncludesPoint as yue,vectorCross as wue,vectorFromPoint as U8,vectorScale as vue}from"@excalidraw/math";var vh=[1,0],$2=[0,1],Ih=[-1,0],j2=[0,-1],hd=e=>{let[o,t]=e,n=Math.abs(o),r=Math.abs(t);return o>r?vh:o<=-r?Ih:t>n?$2:j2},q2=(e,o)=>hd(U8(e,o)),gd=(e,o)=>fd(q2(e,o)),wh=(e,o)=>e[0]===o[0]&&e[1]===o[1],fd=e=>wh(e,vh)||wh(e,Ih);import{clamp as Mue,pointDistance as Pue,pointFrom as Lue,pointScaleFromOrigin as Aue,pointsEqual as _ue,pointTranslate as Due,vector as Rue,vectorCross as Nue,vectorFromPoint as Bue,vectorScale as Fue}from"@excalidraw/math";import{BinaryHeap as zue,invariant as Hue,isAnyTrue as Gue,getSizeFromPoints as Uue,isDevEnv as Wue,arrayToMap as Yue}from"@excalidraw/common";import{SHIFT_LOCKING_ANGLE as Vhe,viewportCoordsToSceneCoords as Xhe}from"@excalidraw/common";import{normalizeRadians as Zhe,radiansBetweenAngles as $he,radiansDifference as jhe}from"@excalidraw/math";import{pointsEqual as Jhe}from"@excalidraw/math";var md=e=>{let o=Math.floor(e.width/2)+1,t=0,n=e.width,r=Math.floor(e.height/2)+1,i=o,a=e.height;return[o,t,n,r,i,a,0,r]};var j8=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}},q8=e=>{switch(e){case"bar":return 90;case"arrow":return 20;default:return 25}},Sh=(e,o,t,n)=>{if(o.length<1)return null;let r=uh(o[0]);if(r.length<1)return null;let i=t==="start"?1:r.length-1,a=r[i].data;Q2(a.length===6,"Op data length is not 6");let l=lt(a[4],a[5]),s=lt(a[2],a[3]),c=lt(a[0],a[1]),m=r[i-1],p=lt(0,0);if(m.op==="move"){let H=$8(m.data);Q2(H!=null,"Op data is not a point"),p=H}else m.op==="bcurveTo"&&(p=lt(m.data[4],m.data[5]));let d=(H,Y)=>Math.pow(1-H,3)*l[Y]+3*H*Math.pow(1-H,2)*s[Y]+3*Math.pow(H,2)*(1-H)*c[Y]+p[Y]*Math.pow(H,3),[h,f]=t==="start"?p:l,[b,E]=[d(.3,0),d(.3,1)],w=Math.hypot(h-b,f-E),y=(h-b)/w,x=(f-E)/w,v=j8(n),I=0;{let[H,Y]=t==="end"?e.points[e.points.length-1]:e.points[0],[D,O]=e.points.length>1?t==="end"?e.points[e.points.length-2]:e.points[1]:[0,0];I=Math.hypot(H-D,Y-O)}let P=Math.min(v,I*(n==="diamond"||n==="diamond_outline"?.25:.5)),k=h-y*P,N=f-x*P;if(n==="dot"||n==="circle"||n==="circle_outline"){let H=Math.hypot(N-f,k-h)+e.strokeWidth-2;return[h,f,H]}let _=q8(n);if(n==="crowfoot_many"||n==="crowfoot_one_or_many"){let[H,Y]=Wi(lt(h,f),lt(k,N),Th(-_)),[D,O]=Wi(lt(h,f),lt(k,N),Th(_));return[k,N,H,Y,D,O]}let[L,B]=Wi(lt(k,N),lt(h,f),-_*Math.PI/180),[G,j]=Wi(lt(k,N),lt(h,f),Th(_));if(n==="diamond"||n==="diamond_outline"){let H,Y;if(t==="start"){let[D,O]=e.points.length>1?e.points[1]:[0,0];[H,Y]=Wi(lt(h+P*2,f),lt(h,f),Math.atan2(O-f,D-h))}else{let[D,O]=e.points.length>1?e.points[e.points.length-2]:[0,0];[H,Y]=Wi(lt(h-P*2,f),lt(h,f),Math.atan2(f-O,h-D))}return[h,f,L,B,H,Y,G,j]}return[h,f,L,B,G,j]};import{pointFrom as xfe,pointCenter as yfe,pointRotateRads as wfe,vectorFromPoint as vfe,vectorNormalize as Ife,vectorSubtract as Tfe,vectorAdd as Sfe,vectorScale as Cfe,pointFromVector as kfe,clamp as Mfe,isCloseTo as Pfe}from"@excalidraw/math";import{arrayToMap as g1e}from"@excalidraw/common";import{isPointWithinBounds as b1e,pointFrom as E1e}from"@excalidraw/math";import{vectorCross as Rfe,vectorFromPoint as Nfe}from"@excalidraw/math";import{arrayToMap as J8}from"@excalidraw/common";import{getElementBounds as Q8}from"@excalidraw/element";import{isArrowElement as e_,isExcalidrawElement as t_,isFreeDrawElement as o_,isLinearElement as n_,isTextElement as r_}from"@excalidraw/element";import{rangeIncludesValue as bd,pointFrom as tn,pointRotateRads as i_,rangeInclusive as Ed}from"@excalidraw/math";var a_=e=>e.type==="diamond"?[tn(e.width/2,0),tn(e.width,e.height/2),tn(e.width/2,e.height),tn(0,e.height/2)]:[tn(0,0),tn(0+e.width,0),tn(0+e.width,e.height),tn(0,e.height)],l_=e=>n_(e)||o_(e)?e.points:a_(e),tw=e=>{let o=e.reduce((t,[n,r])=>(t.minY=Math.min(t.minY,r),t.minX=Math.min(t.minX,n),t.maxX=Math.max(t.maxX,n),t.maxY=Math.max(t.maxY,r),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},ow=e=>{let o=l_(e),{cx:t,cy:n}=tw(o),r=tn(t,n),i=o.map(m=>i_(m,r,e.angle)),{minX:a,minY:l,maxX:s,maxY:c}=tw(i);return[a+e.x,l+e.y,s+e.x,c+e.y]},Ch=(e,o,t=!1)=>{let n=ow(e),r=o[0]<=n[0]&&o[2]>=n[2]&&o[1]<=n[1]&&o[3]>=n[3];return t?r?!0:n[0]<=o[0]&&n[2]>=o[2]&&n[1]<=o[1]&&n[3]>=o[3]:r},nw=(e,o)=>{let t=ow(e);return(bd(t[0],Ed(o[0],o[2]))||bd(o[0],Ed(t[0],t[2])))&&(bd(t[1],Ed(o[1],o[3]))||bd(o[1],Ed(t[1],t[3])))},rw=({elements:e,bounds:o,type:t,errorMargin:n=0})=>{t_(o)&&(o=Q8(o,J8(e)));let r=[o[0]-n,o[1]-n,o[2]+n,o[3]+n],i=new Set;for(let a of e){if(i.has(a.id))continue;if(t==="overlap"?nw(a,r):t==="inside"?Ch(a,r):Ch(a,r,!0)){if(i.add(a.id),a.boundElements)for(let s of a.boundElements)i.add(s.id);r_(a)&&a.containerId&&i.add(a.containerId),e_(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 qfe,isShallowEqual as c_}from"@excalidraw/common";var s_=function(){let e=null,o=null,t=null,n=(i,a,l,s)=>{if(t!==void 0&&a===o&&i===e&&l.editingGroupId===t?.editingGroupId)return t;let c={};for(let d of i){let h=d.groupIds;if(l.editingGroupId){let f=h.indexOf(l.editingGroupId);f>-1&&(h=h.slice(0,f))}if(h.length>0){let f=h[h.length-1];c[f]=!0}}let m={},p=a.reduce((d,h)=>{if(h.isDeleted)return d;let f=h.groupIds.find(b=>c[b]);return f&&(d[h.id]=!0,Array.isArray(m[f])?m[f].push(h.id):m[f]=[h.id]),d},{});for(let d of Object.keys(m))m[d].length<2&&c[d]&&(c[d]=!1);return o=a,e=i,t={editingGroupId:l.editingGroupId,selectedGroupIds:c,selectedElementIds:kh({...l.selectedElementIds,...p},s)},t},r=(i,a,l,s)=>{let c=s?s.scene.getSelectedElements({selectedElementIds:i.selectedElementIds,elements:a}):Mh(a,i);return c.length?n(c,a,i,l):{selectedGroupIds:{},editingGroupId:null,selectedElementIds:kh(i.selectedElementIds,l)}};return r.clearCache=()=>{o=null,e=null,t=null},r}();var r1e=function(){let e=null,o=null,t=null,n=(r,i)=>(t!=null&&r===e&&i.selectedElementIds===o||(t=r.some(a=>i.selectedElementIds[a.id]),e=r,o=i.selectedElementIds),t);return n.clearCache=()=>{e=null,o=null,t=null},n}(),Mh=(e,o,t)=>{let n=new Set,r=[];for(let i of e.values()){if(o.selectedElementIds[i.id]){r.push(i),n.add(i.id);continue}if(t?.includeBoundTextElement&&zi(i)&&o.selectedElementIds[i?.containerId]){r.push(i),n.add(i.id);continue}}if(t?.includeElementsInFrames){let i=[];return r.forEach(a=>{cd(a)&&iw(e,a.id).forEach(l=>!n.has(l.id)&&i.push(l)),i.push(a)}),i}return r};var kh=(e,o)=>c_(o.selectedElementIds,e)?o.selectedElementIds:e;var iw=(e,o)=>{let t=[];for(let n of e.values())n.frameId===o&&t.push(n);return t};var m_=typeof document<"u"?document.createElement("img"):{src:""};m_.src=`data:${aw.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:${aw.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 Ph=new WeakMap;var lw=e=>e==="rectangle"||e==="iframe"||e==="embeddable"||e==="line"||e==="diamond"||e==="image";var Ct=class Ct{};S(Ct,"rg",new x_),S(Ct,"cache",new WeakMap),S(Ct,"get",(o,t)=>{let n=Ct.cache.get(o);if(n&&(t===null||n.theme===t))return n.shape}),S(Ct,"delete",o=>{Ct.cache.delete(o),Ph.delete(o)}),S(Ct,"destroy",()=>{Ct.cache=new WeakMap}),S(Ct,"generateElementShape",(o,t)=>{let n=t?.isExporting?void 0:Ct.get(o,t?t.theme:null);if(n!==void 0)return n;Ph.delete(o);let r=v_(o,Ct.rg,t||{isExporting:!1,canvasBackgroundColor:E_.white,embedsValidationStatus:null,theme:Lh.LIGHT});return t?.isExporting||Ct.cache.set(o,{shape:r,theme:t?.theme||Lh.LIGHT}),r});var Ui=Ct,y_=e=>[8,8+e],pw=e=>[1.5,6+e];function w_(e){let o=e.roughness,t=Math.max(e.width,e.height),n=Math.min(e.width,e.height);return n>=20&&t>=50||n>=15&&e.roundness&&lw(e.type)||ur(e)&&t>=50?o:Math.min(o/(t<10?3:2),2.5)}var en=(e,o=!1,t=!1)=>{let n={seed:e.seed,strokeLineDash:e.strokeStyle==="dashed"?y_(e.strokeWidth):e.strokeStyle==="dotted"?pw(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:w_(e),stroke:t?xd(e.strokeColor):e.strokeColor,preserveVertices:o||e.roughness<f_.cartoonist};switch(e.type){case"rectangle":case"iframe":case"embeddable":case"diamond":case"ellipse":return n.fillStyle=e.fillStyle,n.fill=hl(e.backgroundColor)?void 0:t?xd(e.backgroundColor):e.backgroundColor,e.type==="ellipse"&&(n.curveFitting=1),n;case"line":case"freedraw":return dd(e.points)&&(n.fillStyle=e.fillStyle,n.fill=e.backgroundColor==="transparent"?void 0:t?xd(e.backgroundColor):e.backgroundColor),n;case"arrow":return n;default:throw new Error(`Unimplemented type ${e.type}`)}},cw=(e,o,t)=>hh(e)&&(o||V2(e)&&t?.get(e.id)!==!0)&&hl(e.backgroundColor)&&hl(e.strokeColor)?{...e,roughness:0,backgroundColor:"#d3d3d3",fillStyle:"solid"}:X2(e)?{...e,strokeColor:hl(e.strokeColor)?"#000000":e.strokeColor,backgroundColor:hl(e.backgroundColor)?"#f4f4f6":e.backgroundColor}:e,dw=(e,o,t,n,r,i,a,l)=>{let s=Sh(e,o,t,n);if(s===null)return[];let c=(p,d)=>{if(p===null)return[];let[,,h,f,b,E]=p;return[r.line(h,f,b,E,d)]},m=l?xd(e.strokeColor):e.strokeColor;switch(n){case"dot":case"circle":case"circle_outline":{let[p,d,h]=s;return delete i.strokeLineDash,[r.circle(p,d,h,{...i,fill:n==="circle_outline"?a:m,fillStyle:"solid",stroke:m,roughness:Math.min(.5,i.roughness||0)})]}case"triangle":case"triangle_outline":{let[p,d,h,f,b,E]=s;return delete i.strokeLineDash,[r.polygon([[p,d],[h,f],[b,E],[p,d]],{...i,fill:n==="triangle_outline"?a:m,fillStyle:"solid",roughness:Math.min(1,i.roughness||0)})]}case"diamond":case"diamond_outline":{let[p,d,h,f,b,E,w,y]=s;return delete i.strokeLineDash,[r.polygon([[p,d],[h,f],[b,E],[w,y],[p,d]],{...i,fill:n==="diamond_outline"?a:m,fillStyle:"solid",roughness:Math.min(1,i.roughness||0)})]}case"crowfoot_one":return c(s,i);case"bar":case"arrow":case"crowfoot_many":case"crowfoot_one_or_many":default:{let[p,d,h,f,b,E]=s;if(e.strokeStyle==="dotted"){let w=pw(e.strokeWidth-1);i.strokeLineDash=[w[0],w[1]-1]}else delete i.strokeLineDash;return i.roughness=Math.min(1,i.roughness||0),[r.line(h,f,p,d,i),r.line(b,E,p,d,i),...n==="crowfoot_one_or_many"?c(Sh(e,o,t,"crowfoot_one"),i):[]]}}};var v_=(e,o,{isExporting:t,canvasBackgroundColor:n,embedsValidationStatus:r,theme:i})=>{let a=i===Lh.DARK;switch(e.type){case"rectangle":case"iframe":case"embeddable":{let l;if(e.roundness){let s=e.width,c=e.height,m=pl(Math.min(s,c),e);l=o.path(`M ${m} 0 L ${s-m} 0 Q ${s} 0, ${s} ${m} L ${s} ${c-m} Q ${s} ${c}, ${s-m} ${c} L ${m} ${c} Q 0 ${c}, 0 ${c-m} L 0 ${m} Q 0 0, ${m} 0`,en(cw(e,t,r),!0,a))}else l=o.rectangle(0,0,e.width,e.height,en(cw(e,t,r),!1,a));return l}case"diamond":{let l,[s,c,m,p,d,h,f,b]=md(e);if(e.roundness){let E=pl(Math.abs(s-f),e),w=pl(Math.abs(p-c),e);l=o.path(`M ${s+E} ${c+w} L ${m-E} ${p-w}
|