403Webshell
Server IP : 192.64.112.168  /  Your IP : 18.119.118.237
Web Server : Apache
System : Linux nc-ph-2300-85.bluforrest.com 4.18.0-513.9.1.el8_9.x86_64 #1 SMP Sat Dec 2 05:23:44 EST 2023 x86_64
User : expressoneac ( 1128)
PHP Version : 8.0.30
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/expressoneac/www/wp-content/plugins/header-footer-elementor/build/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/expressoneac/www/wp-content/plugins/header-footer-elementor/build/main.js
/*! For license information please see main.js.LICENSE.txt */
(()=>{var e={282:function(e){"undefined"!=typeof self&&self,e.exports=function(){"use strict";var e={316:function(e,t,n){n.d(t,{A:function(){return o}});var r=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,o=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return r.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}))},20:function(e,t,n){var r=n(609),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:s.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},848:function(e,t,n){e.exports=n(20)},609:function(e){e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};n.r(r),n.d(r,{Alert:function(){return dh},Avatar:function(){return Uo},Badge:function(){return Fo},Breadcrumb:function(){return v_},Button:function(){return ue},ButtonGroup:function(){return ui},Checkbox:function(){return Pe},Container:function(){return uh},DatePicker:function(){return TN},Dialog:function(){return U_},Drawer:function(){return wS},DropdownMenu:function(){return $E},EditorInput:function(){return Sx},Input:function(){return Xo},Label:function(){return ei},Loader:function(){return ri},Menu:function(){return Yx},Pagination:function(){return $S},ProgressBar:function(){return oi},ProgressSteps:function(){return Ax},RadioButton:function(){return Ao},SearchBox:function(){return CE},Select:function(){return Yf},Sidebar:function(){return o_},Skeleton:function(){return Fx},Switch:function(){return ye},Tabs:function(){return Sf},TextArea:function(){return Vo},Title:function(){return ti},Toaster:function(){return Tm},Tooltip:function(){return xo},Topbar:function(){return Z_},toast:function(){return lm}});var o={};n.r(o),n.d(o,{Button:function(){return HS},CaptionLabel:function(){return YS},Chevron:function(){return qS},Day:function(){return KS},DayButton:function(){return GS},Dropdown:function(){return XS},DropdownNav:function(){return ZS},Footer:function(){return JS},Month:function(){return QS},MonthCaption:function(){return ek},MonthGrid:function(){return tk},Months:function(){return nk},MonthsDropdown:function(){return ik},Nav:function(){return ak},NextMonthButton:function(){return sk},Option:function(){return lk},PreviousMonthButton:function(){return ck},Root:function(){return uk},Select:function(){return dk},Week:function(){return fk},WeekNumber:function(){return pk},WeekNumberHeader:function(){return gk},Weekday:function(){return mk},Weekdays:function(){return hk},Weeks:function(){return yk},YearsDropdown:function(){return vk}});var i={};n.r(i),n.d(i,{formatCaption:function(){return OC},formatDay:function(){return RC},formatMonthCaption:function(){return MC},formatMonthDropdown:function(){return DC},formatWeekNumber:function(){return AC},formatWeekNumberHeader:function(){return jC},formatWeekdayName:function(){return IC},formatYearCaption:function(){return LC},formatYearDropdown:function(){return FC}});var a={};n.r(a),n.d(a,{labelCaption:function(){return BC},labelDay:function(){return UC},labelDayButton:function(){return VC},labelGrid:function(){return zC},labelGridcell:function(){return WC},labelMonthDropdown:function(){return HC},labelNav:function(){return $C},labelNext:function(){return YC},labelPrevious:function(){return qC},labelWeekNumber:function(){return GC},labelWeekNumberHeader:function(){return XC},labelWeekday:function(){return KC},labelYearDropdown:function(){return ZC}});var s=n(609),l=n.n(s);const c=e=>{const t=m(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),u(n,t)||f(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},u=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?u(e.slice(1),r):void 0;if(o)return o;if(0===t.validators.length)return;const i=e.join("-");return t.validators.find((({validator:e})=>e(i)))?.classGroupId},d=/^\[(.+)\]$/,f=e=>{if(d.test(e)){const t=d.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},m=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return y(Object.entries(e.classGroups),n).forEach((([e,n])=>{h(n,r,e,t)})),r},h=(e,t,n,r)=>{e.forEach((e=>{if("string"!=typeof e){if("function"==typeof e)return g(e)?void h(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach((([e,o])=>{h(o,p(t,e),n,r)}))}else(""===e?t:p(t,e)).classGroupId=n}))},p=(e,t)=>{let n=e;return t.split("-").forEach((e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)})),n},g=e=>e.isThemeGetter,y=(e,t)=>t?e.map((([e,n])=>[e,n.map((e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,n])=>[t+e,n]))):e))])):e,v=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},b=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],i=t.length,a=e=>{const n=[];let a,s=0,l=0;for(let c=0;c<e.length;c++){let u=e[c];if(0===s){if(u===o&&(r||e.slice(c,c+i)===t)){n.push(e.slice(l,c)),l=c+i;continue}if("/"===u){a=c;continue}}"["===u?s++:"]"===u&&s--}const c=0===n.length?e:e.substring(l),u=c.startsWith("!");return{modifiers:n,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:a&&a>l?a-l:void 0}};return n?e=>n({className:e,parseClassName:a}):a},w=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach((e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)})),t.push(...n.sort()),t},x=/\s+/;function _(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=E(e))&&(r&&(r+=" "),r+=t);return r}const E=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=E(e[r]))&&(n&&(n+=" "),n+=t);return n};const S=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},k=/^\[(?:([a-z-]+):)?(.+)\]$/i,C=/^\d+\/\d+$/,N=new Set(["px","full","screen"]),P=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,T=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,O=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,M=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,R=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,D=e=>j(e)||N.has(e)||C.test(e),A=e=>K(e,"length",G),j=e=>Boolean(e)&&!Number.isNaN(Number(e)),I=e=>K(e,"number",j),F=e=>Boolean(e)&&Number.isInteger(Number(e)),L=e=>e.endsWith("%")&&j(e.slice(0,-1)),z=e=>k.test(e),B=e=>P.test(e),W=new Set(["length","size","percentage"]),V=e=>K(e,W,X),U=e=>K(e,"position",X),$=new Set(["image","url"]),H=e=>K(e,$,J),Y=e=>K(e,"",Z),q=()=>!0,K=(e,t,n)=>{const r=k.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},G=e=>T.test(e)&&!O.test(e),X=()=>!1,Z=e=>M.test(e),J=e=>R.test(e),Q=(Symbol.toStringTag,()=>{const e=S("colors"),t=S("spacing"),n=S("blur"),r=S("brightness"),o=S("borderColor"),i=S("borderRadius"),a=S("borderSpacing"),s=S("borderWidth"),l=S("contrast"),c=S("grayscale"),u=S("hueRotate"),d=S("invert"),f=S("gap"),m=S("gradientColorStops"),h=S("gradientColorStopPositions"),p=S("inset"),g=S("margin"),y=S("opacity"),v=S("padding"),b=S("saturate"),w=S("scale"),x=S("sepia"),_=S("skew"),E=S("space"),k=S("translate"),C=()=>["auto",z,t],N=()=>[z,t],P=()=>["",D,A],T=()=>["auto",j,z],O=()=>["","0",z],M=()=>[j,z];return{cacheSize:500,separator:":",theme:{colors:[q],spacing:[D,A],blur:["none","",B,z],brightness:M(),borderColor:[e],borderRadius:["none","","full",B,z],borderSpacing:N(),borderWidth:P(),contrast:M(),grayscale:O(),hueRotate:M(),invert:O(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[L,A],inset:C(),margin:C(),opacity:M(),padding:N(),saturate:M(),scale:M(),sepia:O(),skew:M(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",z]}],container:["container"],columns:[{columns:[B]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",z]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",F,z]}],basis:[{basis:C()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",z]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",F,z]}],"grid-cols":[{"grid-cols":[q]}],"col-start-end":[{col:["auto",{span:["full",F,z]},z]}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":[q]}],"row-start-end":[{row:["auto",{span:[F,z]},z]}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",z]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",z]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",z,t]}],"min-w":[{"min-w":[z,t,"min","max","fit"]}],"max-w":[{"max-w":[z,t,"none","full","min","max","fit","prose",{screen:[B]},B]}],h:[{h:[z,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[z,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[z,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[z,t,"auto","min","max","fit"]}],"font-size":[{text:["base",B,A]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",I]}],"font-family":[{font:[q]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",z]}],"line-clamp":[{"line-clamp":["none",j,I]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",D,z]}],"list-image":[{"list-image":["none",z]}],"list-style-type":[{list:["none","disc","decimal",z]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",D,A]}],"underline-offset":[{"underline-offset":["auto",D,z]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",U]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",V]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},H]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[D,z]}],"outline-w":[{outline:[D,A]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[D,A]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",B,Y]}],"shadow-color":[{shadow:[q]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",B,z]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",z]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",z]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",z]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[F,z]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",z]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",z]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",z]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[D,A,I]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}),ee=function(e,...t){let n,r,o,i=function(s){const l=t.reduce(((e,t)=>t(e)),e());return n=(e=>({cache:v(e.cacheSize),parseClassName:b(e),...c(e)}))(l),r=n.cache.get,o=n.cache.set,i=a,a(s)};function a(e){const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(x);let s="";for(let e=a.length-1;e>=0;e-=1){const t=a[e],{modifiers:l,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(t);let f=Boolean(d),m=r(f?u.substring(0,d):u);if(!m){if(!f){s=t+(s.length>0?" "+s:s);continue}if(m=r(u),!m){s=t+(s.length>0?" "+s:s);continue}f=!1}const h=w(l).join(":"),p=c?h+"!":h,g=p+m;if(i.includes(g))continue;i.push(g);const y=o(m,f);for(let e=0;e<y.length;++e){const t=y[e];i.push(p+t)}s=t+(s.length>0?" "+s:s)}return s})(e,n);return o(e,i),i}return function(){return i(_.apply(null,arguments))}}(Q);function te(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=te(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ne(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=te(e))&&(r&&(r+=" "),r+=t);return r}var re=function(){return ee(ne.apply(void 0,arguments))},oe=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.forEach((function(e){return null==e?void 0:e.apply(void 0,n)}))}},ie=function(e){var t={0:"gap-0",xxs:"gap-1",xs:"gap-2",sm:"gap-3",md:"gap-4",lg:"gap-5",xl:"gap-6","2xl":"gap-8"};return t[e]||t.md},ae={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},se=["variant","size","type","tag","className","children","disabled","destructive","icon","iconPosition","loading"];function le(){return le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},le.apply(null,arguments)}var ce=(0,s.forwardRef)((function(e,t){var n,r,o,i,a=e.variant,s=void 0===a?"primary":a,c=e.size,u=void 0===c?"md":c,d=e.type,f=void 0===d?"button":d,m=e.tag,h=void 0===m?"button":m,p=e.className,g=e.children,y=e.disabled,v=void 0!==y&&y,b=e.destructive,w=void 0!==b&&b,x=e.icon,_=void 0===x?null:x,E=e.iconPosition,S=void 0===E?"left":E,k=e.loading,C=void 0!==k&&k,N=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,se),P=C?"opacity-50 disabled:cursor-not-allowed":"",T=null===(n={primary:"text-text-on-color bg-button-primary hover:bg-button-primary-hover outline-button-primary hover:outline-button-primary-hover disabled:bg-button-disabled disabled:outline-button-disabled",secondary:"text-text-on-color bg-button-secondary hover:bg-button-secondary-hover outline-button-secondary hover:outline-button-secondary-hover disabled:bg-button-disabled disabled:outline-button-disabled",outline:"text-button-tertiary-color outline-border-subtle bg-button-tertiary hover:bg-button-tertiary-hover hover:outline-border-subtle disabled:bg-button-tertiary disabled:outline-border-disabled",ghost:"text-text-primary bg-transparent outline-transparent hover:bg-button-tertiary-hover",link:"outline-none text-link-primary bg-transparent hover:text-link-primary-hover hover:underline p-0 border-0 leading-none"})||void 0===n?void 0:n[s],O=w&&!v?null===(r={primary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",outline:"text-button-danger outline outline-1 outline-button-danger hover:outline-button-danger bg-button-tertiary hover:bg-field-background-error",ghost:"text-button-danger hover:bg-field-background-error",link:"text-button-danger hover:text-button-danger-secondary"})||void 0===r?void 0:r[s]:"",M=null===(o={xs:"p-1 rounded [&>svg]:size-4",sm:"p-2 rounded [&>svg]:size-4 gap-0.5",md:"p-2.5 rounded-md text-sm [&>svg]:size-5 gap-1",lg:"p-3 rounded-lg text-base [&>svg]:size-6 gap-1"})||void 0===o?void 0:o[u],R=null,D="";_&&(D="flex items-center justify-center","left"===S?i=_:R=_);var A=h;return l().createElement(A,le({ref:t,type:f,className:re(D,"outline outline-1 border-none cursor-pointer transition-colors duration-300 ease-in-out text-xs font-semibold focus:ring-2 focus:ring-toggle-on focus:ring-offset-2 disabled:text-text-disabled",M,T,O,P,p),disabled:v},N),i,l().createElement("span",{className:"px-1"},g),R)})),ue=ce;let de=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};var fe=["id","onChange","value","defaultValue","size","disabled","label","name","className"];function me(){return me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},me.apply(null,arguments)}function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var pe=function(e){var t=e.label,n=e.switchId,r=e.disabled,o=void 0!==r&&r,i=e.children,a=e.size;if((0,s.isValidElement)(t))return React.createElement("div",{className:re("inline-flex items-center gap-3","items-start")},i,t);var l,c,u,d,f,m=!(null!=t&&t.heading||null!=t&&t.description),h=null!=t&&t.heading&&null!=t&&t.description?"items-start":"items-center";return m?i:React.createElement("div",{className:re("inline-flex",h,"gap-3")},i,React.createElement("label",{htmlFor:n,className:re(!o&&"cursor-pointer")},(u=void 0===(c=(l=t||{}).heading)?"":c,f=void 0===(d=l.description)?"":d,React.createElement("div",{className:"space-y-1.5"},u&&React.createElement("p",{className:re("text-text-primary m-0",{sm:"text-sm leading-4 font-medium",md:"text-base leading-5 font-medium",lg:"text-lg leading-6 font-medium"}[a],o&&"text-text-disabled")},u),f&&React.createElement("p",{className:re("text-text-secondary text-sm font-normal leading-5 m-0",o&&"text-text-disabled")},f)))))},ge=(0,s.forwardRef)((function(e,t){var n,r=e.id,o=e.onChange,i=e.value,a=e.defaultValue,l=void 0!==a&&a,c=e.size,u=void 0===c?"lg":c,d=e.disabled,f=void 0!==d&&d,m=e.label,h=void 0===m?{heading:"",description:""}:m,p=e.name,g=e.className,y=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,fe),v=(0,s.useMemo)((function(){return void 0!==i}),[i]),b=(0,s.useMemo)((function(){return r||"switch-".concat(de())}),[]),w=function(e){if(Array.isArray(e))return e}(n=(0,s.useState)(l))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next,!2;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){l=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(n)||function(e){if(e){if("string"==typeof e)return he(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?he(e,2):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),x=w[0],_=w[1],E="primary",S=(0,s.useCallback)((function(){return v?i:x}),[v,i,x]),k={primary:{input:"bg-toggle-off hover:bg-toggle-off-hover checked:bg-toggle-on focus:ring focus:ring-toggle-on focus:ring-offset-4 checked:hover:bg-toggle-on border border-solid border-toggle-off-border checked:border-toggle-on-border shadow-toggleContainer focus:outline-none checked:focus:border-toggle-on-border focus:border-toggle-off-border",toggleDial:"bg-toggle-dial-background shadow-toggleDial"}},C={lg:{container:"w-11 h-6",toggleDial:"size-4 peer-checked:translate-x-5"},md:{container:"w-10 h-5",toggleDial:"size-3 peer-checked:translate-x-5"},sm:{container:"w-8 h-4",toggleDial:"size-2.5 peer-checked:translate-x-3.5"}};return React.createElement(pe,{label:h,switchId:b,disabled:f,size:u},React.createElement("div",{className:re("relative inline-block cursor-pointer rounded-full shrink-0",C[u].container,g)},React.createElement("input",me({ref:t,id:b,type:"checkbox",className:re("peer appearance-none absolute bg-blue-gray-100 rounded-full cursor-pointer transition-colors duration-300 h-full w-full  before:content-[''] checked:before:content-[''] m-0 checked:[background-image:none]",k[E].input,f&&"bg-toggle-off-disabled disabled:border-transparent shadow-none disabled:cursor-not-allowed"),checked:S(),onChange:function(e){if(!f){var t=e.target.checked;v||_(t),"function"==typeof o&&o(t)}},disabled:f,name:p},y)),React.createElement("label",{htmlFor:b,className:re("bg-white border border-blue-gray-100 rounded-full absolute cursor-pointer shadow-md before:content[''] before:transition-opacity before:opacity-0 hover:before:opacity-10 before:hidden border-none transition-all duration-300 top-2/4 left-1 -translate-y-2/4 before:w-10 before:h-10 before:rounded-full before:absolute before:top-2/4 before:left-2/4 before:-translate-y-2/4 before:-translate-x-2/4",C[u].toggleDial,k[E].toggleDial,f&&"peer-disabled:cursor-not-allowed")})))}));ge.displayName="Switch";var ye=ge;const ve=(...e)=>e.filter(((e,t,n)=>Boolean(e)&&n.indexOf(e)===t)).join(" ");var be={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const we=(0,s.forwardRef)((({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...l},c)=>(0,s.createElement)("svg",{ref:c,...be,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:ve("lucide",o),...l},[...a.map((([e,t])=>(0,s.createElement)(e,t))),...Array.isArray(i)?i:[i]]))),xe=(e,t)=>{const n=(0,s.forwardRef)((({className:n,...r},o)=>{return(0,s.createElement)(we,{ref:o,iconNode:t,className:ve(`lucide-${i=e,i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...r});var i}));return n.displayName=`${e}`,n},_e=xe("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),Ee=xe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var Se=["id","label","defaultChecked","checked","onChange","value","indeterminate","disabled","size"];function ke(){return ke=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ke.apply(null,arguments)}function Ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ne=(0,s.forwardRef)((function(e,t){var n,r,o,i=e.id,a=e.label,l=e.defaultChecked,c=void 0!==l&&l,u=e.checked,d=e.onChange,f=(e.value,e.indeterminate),m=e.disabled,h=e.size,p=void 0===h?"md":h,g=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Se),y=(0,s.useMemo)((function(){return i||"checkbox-".concat(de())}),[i]),v=(0,s.useMemo)((function(){return void 0!==u}),[u]),b=function(e){if(Array.isArray(e))return e}(o=(0,s.useState)(c||!1))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next,!2;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){l=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(o)||function(e){if(e){if("string"==typeof e)return Ce(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ce(e,2):void 0}}(o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),w=b[0],x=b[1],_="primary",E={sm:{checkbox:"size-4 rounded gap-1",icon:"size-3",text:"text-sm",description:"text-xs",gap:"gap-0.5"},md:{checkbox:"size-5 rounded gap-1",icon:"size-4",text:"text-base",description:"text-sm",gap:"gap-1"}},S={primary:{checkbox:"border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-4 focus:ring-focus",icon:"text-white"}},k=(0,s.useCallback)((function(){return v?u:w}),[v,u,w]),C=(0,s.useCallback)((function(){return(0,s.isValidElement)(a)?a:a.heading||a.description?React.createElement("div",{className:E[p].gap},a.heading&&React.createElement("p",{className:re("text-text-primary font-medium leading-4 m-0",E[p].text,E[p].gap)},a.heading),a.description&&React.createElement("p",{className:re("text-text-secondary font-normal leading-5 m-0",E[p].description)},a.description)):null}),[a,p]);return React.createElement("div",{className:re("inline-flex items-center gap-2",!!a&&"items-start")},React.createElement("label",{className:re("relative flex items-center rounded-full p-0.5",!m&&"cursor-pointer"),htmlFor:y},React.createElement("input",ke({ref:t,id:y,type:"checkbox",className:re("peer relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid",S[_].checkbox,E[p].checkbox,m&&"disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled"),checked:k(),onChange:function(e){if(!m){var t=e.target.checked;v||x(t),"function"==typeof d&&d(t)}},disabled:m},g)),React.createElement("span",{className:re("pointer-events-none inline-flex items-center absolute top-2/4 left-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",S[_].icon,m&&"peer-disabled:text-border-disabled")},f?React.createElement(_e,{className:re(null===(n=E[p])||void 0===n?void 0:n.icon)}):React.createElement(Ee,{className:re(null===(r=E[p])||void 0===r?void 0:r.icon)}))),!!a&&React.createElement("label",{className:re(!m&&"cursor-pointer"),htmlFor:y},C()))}));Ne.displayName="Checkbox";var Pe=Ne;const Te=xe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var Oe={primary:{checkbox:"border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-4 focus:ring-focus",icon:"text-white"}},Me={sm:"text-sm leading-5",md:"text-base leading-6"},Re={sm:{checkbox:"size-4",icon:"size-1.5",info:"size-4"},md:{checkbox:"size-5",icon:"size-2",info:"size-5"}},De={xs:"py-1 px-1 text-sm gap-0.5 [&>svg]:size-4",sm:"py-1 px-1.5 text-base gap-1 [&>svg]:size-4",md:"py-2 px-2.5 text-base gap-1 [&>svg]:size-5",lg:"py-2.5 px-3 text-base gap-1 [&>svg]:size-6"};function Ae(e){return Fe(e)?(e.nodeName||"").toLowerCase():"#document"}function je(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ie(e){var t;return null==(t=(Fe(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Fe(e){return e instanceof Node||e instanceof je(e).Node}function Le(e){return e instanceof Element||e instanceof je(e).Element}function ze(e){return e instanceof HTMLElement||e instanceof je(e).HTMLElement}function Be(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof je(e).ShadowRoot)}function We(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=qe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Ve(e){return["table","td","th"].includes(Ae(e))}function Ue(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function $e(e){const t=He(),n=Le(e)?qe(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function He(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ye(e){return["html","body","#document"].includes(Ae(e))}function qe(e){return je(e).getComputedStyle(e)}function Ke(e){return Le(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ge(e){if("html"===Ae(e))return e;const t=e.assignedSlot||e.parentNode||Be(e)&&e.host||Ie(e);return Be(t)?t.host:t}function Xe(e){const t=Ge(e);return Ye(t)?e.ownerDocument?e.ownerDocument.body:e.body:ze(t)&&We(t)?t:Xe(t)}function Ze(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Xe(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=je(o);if(i){const e=Je(a);return t.concat(a,a.visualViewport||[],We(o)?o:[],e&&n?Ze(e):[])}return t.concat(o,Ze(o,[],n))}function Je(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qe(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function et(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Be(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function tt(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function nt(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}function rt(e){return!(0!==e.mozInputSource||!e.isTrusted)||(at()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function ot(e){return!nt().includes("jsdom/")&&(!at()&&0===e.width&&0===e.height||at()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function it(){return/apple/i.test(navigator.vendor)}function at(){const e=/android/i;return e.test(tt())||e.test(nt())}function st(){return tt().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function lt(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function ct(e){return(null==e?void 0:e.ownerDocument)||document}function ut(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function dt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function ft(e){return ze(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function mt(e){e.preventDefault(),e.stopPropagation()}function ht(e){return!!e&&"combobox"===e.getAttribute("role")&&ft(e)}const pt=Math.min,gt=Math.max,yt=Math.round,vt=Math.floor,bt=e=>({x:e,y:e}),wt={left:"right",right:"left",bottom:"top",top:"bottom"},xt={start:"end",end:"start"};function _t(e,t,n){return gt(e,pt(t,n))}function Et(e,t){return"function"==typeof e?e(t):e}function St(e){return e.split("-")[0]}function kt(e){return e.split("-")[1]}function Ct(e){return"x"===e?"y":"x"}function Nt(e){return"y"===e?"height":"width"}function Pt(e){return["top","bottom"].includes(St(e))?"y":"x"}function Tt(e){return Ct(Pt(e))}function Ot(e){return e.replace(/start|end/g,(e=>xt[e]))}function Mt(e){return e.replace(/left|right|bottom|top/g,(e=>wt[e]))}function Rt(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Dt(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var At=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),jt="undefined"==typeof Element,It=jt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ft=!jt&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Lt=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},zt=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Lt(a,!1))if("SLOT"===a.tagName){var s=a.assignedElements(),l=e(s.length?s:a.children,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:a,candidates:l})}else{It.call(a,At)&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var c=a.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(a),u=!Lt(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(c&&u){var d=e(!0===c?a.children:c.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:a,candidates:d})}else i.unshift.apply(i,a.children)}}return o},Bt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Wt=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!Bt(e)?0:e.tabIndex},Vt=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ut=function(e){return"INPUT"===e.tagName},$t=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},Ht=function(e,t){return!(function(e){return function(e){return Ut(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Ft(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)}(t)||Wt(t)<0||!function(e,t){return!(t.disabled||Lt(t)||function(e){return Ut(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=It.call(e,"details>summary:first-of-type")?e.parentElement:e;if(It.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return $t(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,s=Ft(e);if(a&&!a.shadowRoot&&!0===r(a))return $t(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=i}if(function(e){var t,n,r,o,i=e&&Ft(e),a=null===(t=i)||void 0===t?void 0:t.host,s=!1;if(i&&i!==e)for(s=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!s&&a;){var l,c,u;s=!(null===(c=a=null===(l=i=Ft(a))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(a))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!It.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))}(e,t))},Yt=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},qt=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,a=i?t.scopeParent:t,s=function(e,t){var n=Wt(e);return n<0&&t&&!Bt(e)?0:n}(a,i),l=i?e(t.candidates):a;0===s?i?n.push.apply(n,l):n.push(a):r.push({documentOrder:o,tabIndex:s,item:t,isScope:i,content:l})})),r.sort(Vt).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},Kt=function(e,t){var n;return n=(t=t||{}).getShadowRoot?zt([e],t.includeContainer,{filter:Ht.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Yt}):function(e,t,n){if(Lt(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(At));return t&&It.call(e,At)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,Ht.bind(null,t)),qt(n)},Gt=window.ReactDOM;function Xt(e,t,n){let{reference:r,floating:o}=e;const i=Pt(t),a=Tt(t),s=Nt(a),l=St(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let m;switch(l){case"top":m={x:u,y:r.y-o.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(kt(t)){case"start":m[a]-=f*(n&&c?-1:1);break;case"end":m[a]+=f*(n&&c?-1:1)}return m}async function Zt(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=Et(t,e),h=Rt(m),p=s[f?"floating"===d?"reference":"floating":d],g=Dt(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(p)))||n?p:p.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},w=Dt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-w.top+h.top)/b.y,bottom:(w.bottom-g.bottom+h.bottom)/b.y,left:(g.left-w.left+h.left)/b.x,right:(w.right-g.right+h.right)/b.x}}function Jt(e){const t=qe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ze(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=yt(n)!==i||yt(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Qt(e){return Le(e)?e:e.contextElement}function en(e){const t=Qt(e);if(!ze(t))return bt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Jt(t);let a=(i?yt(n.width):n.width)/r,s=(i?yt(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const tn=bt(0);function nn(e){const t=je(e);return He()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:tn}function rn(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Qt(e);let a=bt(1);t&&(r?Le(r)&&(a=en(r)):a=en(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==je(e))&&t}(i,n,r)?nn(i):bt(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=je(i),t=r&&Le(r)?je(r):r;let n=e,o=Je(n);for(;o&&r&&t!==n;){const e=en(o),t=o.getBoundingClientRect(),r=qe(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=je(o),o=Je(n)}}return Dt({width:u,height:d,x:l,y:c})}function on(e){return rn(Ie(e)).left+Ke(e).scrollLeft}function an(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=je(e),r=Ie(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=He();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Ie(e),n=Ke(e),r=e.ownerDocument.body,o=gt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=gt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+on(e);const s=-n.scrollTop;return"rtl"===qe(r).direction&&(a+=gt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(Ie(e));else if(Le(t))r=function(e,t){const n=rn(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ze(e)?en(e):bt(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=nn(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return Dt(r)}function sn(e,t){const n=Ge(e);return!(n===t||!Le(n)||Ye(n))&&("fixed"===qe(n).position||sn(n,t))}function ln(e,t,n){const r=ze(t),o=Ie(t),i="fixed"===n,a=rn(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=bt(0);if(r||!r&&!i)if(("body"!==Ae(t)||We(o))&&(s=Ke(t)),r){const e=rn(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=on(o));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function cn(e){return"static"===qe(e).position}function un(e,t){return ze(e)&&"fixed"!==qe(e).position?t?t(e):e.offsetParent:null}function dn(e,t){const n=je(e);if(Ue(e))return n;if(!ze(e)){let t=Ge(e);for(;t&&!Ye(t);){if(Le(t)&&!cn(t))return t;t=Ge(t)}return n}let r=un(e,t);for(;r&&Ve(r)&&cn(r);)r=un(r,t);return r&&Ye(r)&&cn(r)&&!$e(r)?n:r||function(e){let t=Ge(e);for(;ze(t)&&!Ye(t);){if($e(t))return t;if(Ue(t))return null;t=Ge(t)}return null}(e)||n}const fn={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Ie(r),s=!!t&&Ue(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=bt(1);const u=bt(0),d=ze(r);if((d||!d&&!i)&&(("body"!==Ae(r)||We(a))&&(l=Ke(r)),ze(r))){const e=rn(r);c=en(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}},getDocumentElement:Ie,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Ue(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Ze(e,[],!1).filter((e=>Le(e)&&"body"!==Ae(e))),o=null;const i="fixed"===qe(e).position;let a=i?Ge(e):e;for(;Le(a)&&!Ye(a);){const t=qe(a),n=$e(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||We(a)&&!n&&sn(e,a))?r=r.filter((e=>e!==a)):o=t,a=Ge(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],s=i.reduce(((e,n)=>{const r=an(t,n,o);return e.top=gt(r.top,e.top),e.right=pt(r.right,e.right),e.bottom=pt(r.bottom,e.bottom),e.left=gt(r.left,e.left),e}),an(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:dn,getElementRects:async function(e){const t=this.getOffsetParent||dn,n=this.getDimensions,r=await n(e.floating);return{reference:ln(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Jt(e);return{width:t,height:n}},getScale:en,isElement:Le,isRTL:function(e){return"rtl"===qe(e).direction}};function mn(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Qt(e),u=o||i?[...c?Ze(c):[],...Ze(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=Ie(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const m={rootMargin:-vt(u)+"px "+-vt(o.clientWidth-(c+d))+"px "+-vt(o.clientHeight-(u+f))+"px "+-vt(c)+"px",threshold:gt(0,pt(1,l))||1};let h=!0;function p(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}h=!1}try{r=new IntersectionObserver(p,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(p,m)}r.observe(e)}(!0),i}(c,n):null;let f,m=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let p=l?rn(e):null;return l&&function t(){const r=rn(e);!p||r.x===p.x&&r.y===p.y&&r.width===p.width&&r.height===p.height||n(),p=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const hn=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=St(n),s=kt(n),l="y"===Pt(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=Et(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof h&&(m="end"===s?-1*h:h),l?{x:m*u,y:f*c}:{x:f*c,y:m*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},pn=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Et(e,t),c={x:n,y:r},u=await Zt(t,l),d=Pt(St(o)),f=Ct(d);let m=c[f],h=c[d];if(i){const e="y"===f?"bottom":"right";m=_t(m+u["y"===f?"top":"left"],m,m-u[e])}if(a){const e="y"===d?"bottom":"right";h=_t(h+u["y"===d?"top":"left"],h,h-u[e])}const p=s.fn({...t,[f]:m,[d]:h});return{...p,data:{x:p.x-n,y:p.y-r}}}}},gn=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:p=!0,...g}=Et(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=St(o),v=Pt(s),b=St(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=f||(b||!p?[Mt(s)]:function(e){const t=Mt(e);return[Ot(e),t,Ot(t)]}(s)),_="none"!==h;!f&&_&&x.push(...function(e,t,n,r){const o=kt(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(St(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Ot)))),i}(s,p,h,w));const E=[s,...x],S=await Zt(t,g),k=[];let C=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&k.push(S[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=kt(e),o=Tt(e),i=Nt(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Mt(a)),[a,Mt(a)]}(o,a,w);k.push(S[e[0]],S[e[1]])}if(C=[...C,{placement:o,overflows:k}],!k.every((e=>e<=0))){var N,P;const e=((null==(N=i.flip)?void 0:N.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(P=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:P.placement;if(!n)switch(m){case"bestFit":{var T;const e=null==(T=C.filter((e=>{if(_){const t=Pt(e.placement);return t===v||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:T[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},yn=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Et(e,t),l=await Zt(t,s),c=St(n),u=kt(n),d="y"===Pt(n),{width:f,height:m}=r.floating;let h,p;"top"===c||"bottom"===c?(h=c,p=u===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(p=c,h="end"===u?"top":"bottom");const g=m-l.top-l.bottom,y=f-l.left-l.right,v=pt(m-l[h],g),b=pt(f-l[p],y),w=!t.middlewareData.shift;let x=v,_=b;if(d?_=u||w?pt(b,y):y:x=u||w?pt(v,g):g,w&&!u){const e=gt(l.left,0),t=gt(l.right,0),n=gt(l.top,0),r=gt(l.bottom,0);d?_=f-2*(0!==e||0!==t?e+t:gt(l.left,l.right)):x=m-2*(0!==n||0!==r?n+r:gt(l.top,l.bottom))}await a({...t,availableWidth:_,availableHeight:x});const E=await o.getDimensions(i.floating);return f!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}},vn=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Et(e,t)||{};if(null==c)return{};const d=Rt(u),f={x:n,y:r},m=Tt(o),h=Nt(m),p=await a.getDimensions(c),g="y"===m,y=g?"top":"left",v=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[m]-f[m]-i.floating[h],x=f[m]-i.reference[m],_=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let E=_?_[b]:0;E&&await(null==a.isElement?void 0:a.isElement(_))||(E=s.floating[b]||i.floating[h]);const S=w/2-x/2,k=E/2-p[h]/2-1,C=pt(d[y],k),N=pt(d[v],k),P=C,T=E-p[h]-N,O=E/2-p[h]/2+S,M=_t(P,O,T),R=!l.arrow&&null!=kt(o)&&O!==M&&i.reference[h]/2-(O<P?C:N)-p[h]/2<0,D=R?O<P?O-P:O-T:0;return{[m]:f[m]+D,data:{[m]:M,centerOffset:O-M-D,...R&&{alignmentOffset:D}},reset:R}}});var bn="undefined"!=typeof document?s.useLayoutEffect:s.useEffect;function wn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!wn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||wn(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function xn(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _n(e,t){const n=xn(e);return Math.round(t*n)/n}function En(e){const t=s.useRef(e);return bn((()=>{t.current=e})),t}const Sn=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?vn({element:n.current,padding:r}).fn(t):{}:n?vn({element:n,padding:r}).fn(t):{};var o}}),kn=(e,t)=>({...hn(e),options:[e,t]}),Cn=(e,t)=>({...pn(e),options:[e,t]}),Nn=(e,t)=>({...gn(e),options:[e,t]}),Pn=(e,t)=>({...yn(e),options:[e,t]}),Tn={...s},On=Tn.useInsertionEffect||(e=>e());function Mn(e){const t=s.useRef((()=>{}));return On((()=>{t.current=e})),s.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}const Rn="ArrowUp",Dn="ArrowDown",An="ArrowLeft",jn="ArrowRight";function In(e,t,n){return Math.floor(e/t)!==n}function Fn(e,t){return t<0||t>=e.current.length}function Ln(e,t){return Bn(e,{disabledIndices:t})}function zn(e,t){return Bn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Bn(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=void 0===t?{}:t;const a=e.current;let s=n;do{s+=r?-i:i}while(s>=0&&s<=a.length-1&&Un(a,s,o));return s}function Wn(e,t,n,r,o){if(-1===e)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function Vn(e,t){return t.flatMap(((t,n)=>e.includes(t)?[n]:[]))}function Un(e,t,n){if(n)return n.includes(t);const r=e[t];return null==r||r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")}let $n=0;function Hn(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame($n);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():$n=requestAnimationFrame(i)}var Yn="undefined"!=typeof document?s.useLayoutEffect:s.useEffect;function qn(){return qn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qn.apply(this,arguments)}let Kn=!1,Gn=0;const Xn=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Gn++,Zn=Tn.useId||function(){const[e,t]=s.useState((()=>Kn?Xn():void 0));return Yn((()=>{null==e&&t(Xn())}),[]),s.useEffect((()=>{Kn=!0}),[]),e},Jn=s.forwardRef((function(e,t){const{context:{placement:n,elements:{floating:r},middlewareData:{arrow:o,shift:i}},width:a=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:m,style:{transform:h,...p}={},...g}=e,y=Zn(),[v,b]=s.useState(!1);if(Yn((()=>{r&&"rtl"===qe(r).direction&&b(!0)}),[r]),!r)return null;const[w,x]=n.split("-"),_="top"===w||"bottom"===w;let E=d;(_&&null!=i&&i.x||!_&&null!=i&&i.y)&&(E=null);const S=2*u,k=S/2,C=a/2*(c/-8+1),N=l/2*c/4,P=!!m,T=E&&"end"===x?"bottom":"top";let O=E&&"end"===x?"right":"left";E&&v&&(O="end"===x?"left":"right");const M=null!=(null==o?void 0:o.x)?E||o.x:"",R=null!=(null==o?void 0:o.y)?E||o.y:"",D=m||"M0,0 H"+a+" L"+(a-C)+","+(l-N)+" Q"+a/2+","+l+" "+C+","+(l-N)+" Z",A={top:P?"rotate(180deg)":"",left:P?"rotate(90deg)":"rotate(-90deg)",bottom:P?"":"rotate(180deg)",right:P?"rotate(-90deg)":"rotate(90deg)"}[w];return s.createElement("svg",qn({},g,{"aria-hidden":!0,ref:t,width:P?a:a+S,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[O]:M,[T]:R,[w]:_||P?"100%":"calc(100% - "+S/2+"px)",transform:""+A+(null!=h?h:""),...p}}),S>0&&s.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:S+(m?0:1),d:D}),s.createElement("path",{stroke:S&&!m?g.fill:"none",d:D}),s.createElement("clipPath",{id:y},s.createElement("rect",{x:-k,y:k*(P?-1:1),width:a+S,height:a})))})),Qn=s.createContext(null),er=s.createContext(null),tr=()=>{var e;return(null==(e=s.useContext(Qn))?void 0:e.id)||null},nr=()=>s.useContext(er);function rr(e){return"data-floating-ui-"+e}function or(e){const t=(0,s.useRef)(e);return Yn((()=>{t.current=e})),t}const ir=rr("safe-polygon");function ar(e,t,n){return n&&!lt(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}function sr(e,t){let n=e.filter((e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)})),r=n;for(;r.length;)r=e.filter((e=>{var t;return null==(t=r)?void 0:t.some((t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)}))})),n=n.concat(r);return n}let lr=new WeakMap,cr=new WeakSet,ur={},dr=0;const fr=e=>e&&(e.host||fr(e.parentNode));function mr(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=ct(e[0]).body;return function(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=((e,t)=>t.map((t=>{if(e.contains(t))return t;const n=fr(t);return e.contains(n)?n:null})).filter((e=>null!=e)))(t,e),s=new Set,l=new Set(a),c=[];ur[o]||(ur[o]=new WeakMap);const u=ur[o];return a.forEach((function e(t){t&&!s.has(t)&&(s.add(t),t.parentNode&&e(t.parentNode))})),function e(t){t&&!l.has(t)&&[].forEach.call(t.children,(t=>{if("script"!==Ae(t))if(s.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=(lr.get(t)||0)+1,a=(u.get(t)||0)+1;lr.set(t,r),u.set(t,a),c.push(t),1===r&&n&&cr.add(t),1===a&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}}))}(t),s.clear(),dr++,()=>{c.forEach((e=>{const t=(lr.get(e)||0)-1,n=(u.get(e)||0)-1;lr.set(e,t),u.set(e,n),t||(!cr.has(e)&&i&&e.removeAttribute(i),cr.delete(e)),n||e.removeAttribute(o)})),dr--,dr||(lr=new WeakMap,lr=new WeakMap,cr=new WeakSet,ur={})}}(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const hr=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function pr(e,t){const n=Kt(e,hr());"prev"===t&&n.reverse();const r=n.indexOf(Qe(ct(e)));return n.slice(r+1)[0]}function gr(){return pr(document.body,"next")}function yr(){return pr(document.body,"prev")}function vr(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!et(n,r)}function br(e){Kt(e,hr()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function wr(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const xr={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function _r(e){"Tab"===e.key&&(e.target,clearTimeout(void 0))}const Er=s.forwardRef((function(e,t){const[n,r]=s.useState();Yn((()=>(it()&&r("button"),document.addEventListener("keydown",_r),()=>{document.removeEventListener("keydown",_r)})),[]);const o={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[rr("focus-guard")]:"",style:xr};return s.createElement("span",qn({},e,o))})),Sr=s.createContext(null),kr=rr("portal");function Cr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=function(e){void 0===e&&(e={});const{id:t,root:n}=e,r=Zn(),o=Nr(),[i,a]=s.useState(null),l=s.useRef(null);return Yn((()=>()=>{null==i||i.remove(),queueMicrotask((()=>{l.current=null}))}),[i]),Yn((()=>{if(!r)return;if(l.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=r,n.setAttribute(kr,""),e.appendChild(n),l.current=n,a(n)}),[t,r]),Yn((()=>{if(!r)return;if(l.current)return;let e=n||(null==o?void 0:o.portalNode);e&&!Le(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const s=document.createElement("div");s.id=r,s.setAttribute(kr,""),e=i||e,e.appendChild(s),l.current=s,a(s)}),[t,n,r,o]),i}({id:n,root:r}),[a,l]=s.useState(null),c=s.useRef(null),u=s.useRef(null),d=s.useRef(null),f=s.useRef(null),m=null==a?void 0:a.modal,h=null==a?void 0:a.open,p=!!a&&!a.modal&&a.open&&o&&!(!r&&!i);return s.useEffect((()=>{if(i&&o&&!m)return i.addEventListener("focusin",e,!0),i.addEventListener("focusout",e,!0),()=>{i.removeEventListener("focusin",e,!0),i.removeEventListener("focusout",e,!0)};function e(e){i&&vr(e)&&("focusin"===e.type?wr:br)(i)}}),[i,o,m]),s.useEffect((()=>{i&&(h||wr(i))}),[h,i]),s.createElement(Sr.Provider,{value:s.useMemo((()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:u,beforeInsideRef:d,afterInsideRef:f,portalNode:i,setFocusManagerState:l})),[o,i])},p&&i&&s.createElement(Er,{"data-type":"outside",ref:c,onFocus:e=>{if(vr(e,i)){var t;null==(t=d.current)||t.focus()}else{const e=yr()||(null==a?void 0:a.refs.domReference.current);null==e||e.focus()}}}),p&&i&&s.createElement("span",{"aria-owns":i.id,style:xr}),i&&Gt.createPortal(t,i),p&&i&&s.createElement(Er,{"data-type":"outside",ref:u,onFocus:e=>{if(vr(e,i)){var t;null==(t=f.current)||t.focus()}else{const t=gr()||(null==a?void 0:a.refs.domReference.current);null==t||t.focus(),(null==a?void 0:a.closeOnFocusOut)&&(null==a||a.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))}const Nr=()=>s.useContext(Sr),Pr="data-floating-ui-focusable";function Tr(e){return e?e.hasAttribute(Pr)?e:e.querySelector("["+Pr+"]")||e:null}let Or=[];function Mr(e){Or=Or.filter((e=>e.isConnected));let t=e;if(t&&"body"!==Ae(t)){if(!function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==It.call(e,At)&&Ht(t,e)}(t,hr())){const e=Kt(t,hr())[0];e&&(t=e)}Or.push(t),Or.length>20&&(Or=Or.slice(-20))}}function Rr(){return Or.slice().reverse().find((e=>e.isConnected))}const Dr=s.forwardRef((function(e,t){return s.createElement("button",qn({},e,{type:"button",ref:t,tabIndex:-1,style:xr}))}));function Ar(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:l=!0,restoreFocus:c=!1,modal:u=!0,visuallyHiddenDismiss:d=!1,closeOnFocusOut:f=!0}=e,{open:m,refs:h,nodeId:p,onOpenChange:g,events:y,dataRef:v,floatingId:b,elements:{domReference:w,floating:x}}=t,_="number"==typeof a&&a<0,E=ht(w)&&_,S=!("undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype)||i,k=or(o),C=or(a),N=or(l),P=nr(),T=Nr(),O=s.useRef(null),M=s.useRef(null),R=s.useRef(!1),D=s.useRef(!1),A=s.useRef(-1),j=null!=T,I=Tr(x),F=Mn((function(e){return void 0===e&&(e=I),e?Kt(e,hr()):[]})),L=Mn((e=>{const t=F(e);return k.current.map((e=>w&&"reference"===e?w:I&&"floating"===e?I:t)).filter(Boolean).flat()}));function z(e){return!r&&d&&u?s.createElement(Dr,{ref:"start"===e?O:M,onClick:e=>g(!1,e.nativeEvent)},"string"==typeof d?d:"Dismiss"):null}s.useEffect((()=>{R.current=!1}),[r]),s.useEffect((()=>{if(r)return;if(!u)return;function e(e){if("Tab"===e.key){et(I,Qe(ct(I)))&&0===F().length&&!E&&mt(e);const t=L(),n=dt(e);"reference"===k.current[0]&&n===w&&(mt(e),e.shiftKey?Hn(t[t.length-1]):Hn(t[1])),"floating"===k.current[1]&&n===I&&e.shiftKey&&(mt(e),Hn(t[0]))}}const t=ct(I);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[r,w,I,u,k,E,F,L]),s.useEffect((()=>{if(!r&&x)return x.addEventListener("focusin",e),()=>{x.removeEventListener("focusin",e)};function e(e){const t=dt(e),n=F().indexOf(t);-1!==n&&(A.current=n)}}),[r,x,F]),s.useEffect((()=>{if(!r&&f)return x&&ze(w)?(w.addEventListener("focusout",t),w.addEventListener("pointerdown",e),x.addEventListener("focusout",t),()=>{w.removeEventListener("focusout",t),w.removeEventListener("pointerdown",e),x.removeEventListener("focusout",t)}):void 0;function e(){D.current=!0,setTimeout((()=>{D.current=!1}))}function t(e){const t=e.relatedTarget;queueMicrotask((()=>{const n=!(et(w,t)||et(x,t)||et(t,x)||et(null==T?void 0:T.portalNode,t)||null!=t&&t.hasAttribute(rr("focus-guard"))||P&&(sr(P.nodesRef.current,p).find((e=>{var n,r;return et(null==(n=e.context)?void 0:n.elements.floating,t)||et(null==(r=e.context)?void 0:r.elements.domReference,t)}))||function(e,t){var n;let r=[],o=null==(n=e.find((e=>e.id===t)))?void 0:n.parentId;for(;o;){const t=e.find((e=>e.id===o));o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}(P.nodesRef.current,p).find((e=>{var n,r;return(null==(n=e.context)?void 0:n.elements.floating)===t||(null==(r=e.context)?void 0:r.elements.domReference)===t}))));if(c&&n&&Qe(ct(I))===ct(I).body){ze(I)&&I.focus();const e=A.current,t=F(),n=t[e]||t[t.length-1]||I;ze(n)&&n.focus()}!E&&u||!t||!n||D.current||t===Rr()||(R.current=!0,g(!1,e,"focus-out"))}))}}),[r,w,x,I,u,p,P,T,g,f,c,F,E]),s.useEffect((()=>{var e;if(r)return;const t=Array.from((null==T||null==(e=T.portalNode)?void 0:e.querySelectorAll("["+rr("portal")+"]"))||[]);if(x){const e=[x,...t,O.current,M.current,k.current.includes("reference")||E?w:null].filter((e=>null!=e)),n=u||E?mr(e,S,!S):mr(e);return()=>{n()}}}),[r,w,x,u,k,T,E,S]),Yn((()=>{if(r||!ze(I))return;const e=Qe(ct(I));queueMicrotask((()=>{const t=L(I),n=C.current,r=("number"==typeof n?t[n]:n.current)||I,o=et(I,e);_||o||!m||Hn(r,{preventScroll:r===I})}))}),[r,m,I,_,L,C]),Yn((()=>{if(r||!I)return;let e=!1;const t=ct(I),n=Qe(t);let o=v.current.openEvent;const i=h.domReference.current;function a(t){let{open:n,reason:r,event:i,nested:a}=t;n&&(o=i),"escape-key"===r&&h.domReference.current&&Mr(h.domReference.current),"hover"===r&&"mouseleave"===i.type&&(R.current=!0),"outside-press"===r&&(a?(R.current=!1,e=!0):R.current=!(rt(i)||ot(i)))}return Mr(n),y.on("openchange",a),()=>{y.off("openchange",a);const r=Qe(t),s=et(x,r)||P&&sr(P.nodesRef.current,p).some((e=>{var t;return et(null==(t=e.context)?void 0:t.elements.floating,r)}));(s||o&&["click","mousedown"].includes(o.type))&&h.domReference.current&&Mr(h.domReference.current);const l=i||n,c=Kt(ct(l).body,hr());queueMicrotask((()=>{let n=Rr();!n&&ze(l)&&x&&(n=function(e,t,n){const r=e.indexOf(t);function o(t){const o=rr("focus-guard");let i=r+(t?1:0),a=e[i];for(;a&&(!a.isConnected||a.hasAttribute(o)||et(n,a));)t?i++:i--,a=e[i];return a}return o(!0)||o(!1)}(c,l,x)),N.current&&!R.current&&ze(n)&&(n===r||r===t.body||s)&&n.focus({preventScroll:e})}))}}),[r,x,I,N,v,h,y,P,p]),Yn((()=>{if(!r&&T)return T.setFocusManagerState({modal:u,closeOnFocusOut:f,open:m,onOpenChange:g,refs:h}),()=>{T.setFocusManagerState(null)}}),[r,T,u,m,g,h,f]),Yn((()=>{if(r)return;if(!I)return;if("function"!=typeof MutationObserver)return;if(_)return;const e=()=>{const e=I.getAttribute("tabindex"),t=F(),n=Qe(ct(x)),r=t.indexOf(n);-1!==r&&(A.current=r),k.current.includes("floating")||n!==h.domReference.current&&0===t.length?"0"!==e&&I.setAttribute("tabindex","0"):"-1"!==e&&I.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(I,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}}),[r,x,I,h,k,F,_]);const B=!r&&S&&(!u||!E)&&(j||u);return s.createElement(s.Fragment,null,B&&s.createElement(Er,{"data-type":"inside",ref:null==T?void 0:T.beforeInsideRef,onFocus:e=>{if(u){const e=L();Hn("reference"===o[0]?e[0]:e[e.length-1])}else if(null!=T&&T.preserveTabOrder&&T.portalNode)if(R.current=!1,vr(e,T.portalNode)){const e=gr()||w;null==e||e.focus()}else{var t;null==(t=T.beforeOutsideRef.current)||t.focus()}}}),!E&&z("start"),n,z("end"),B&&s.createElement(Er,{"data-type":"inside",ref:null==T?void 0:T.afterInsideRef,onFocus:e=>{if(u)Hn(L()[0]);else if(null!=T&&T.preserveTabOrder&&T.portalNode)if(f&&(R.current=!0),vr(e,T.portalNode)){const e=yr()||w;null==e||e.focus()}else{var t;null==(t=T.afterOutsideRef.current)||t.focus()}}}))}function jr(e){return ze(e.target)&&"BUTTON"===e.target.tagName}function Ir(e){return ft(e)}function Fr(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:l="click",toggle:c=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0}=t,f=s.useRef(),m=s.useRef(!1),h=s.useMemo((()=>({onPointerDown(e){f.current=e.pointerType},onMouseDown(e){const t=f.current;0===e.button&&"click"!==l&&(lt(t,!0)&&u||(!n||!c||o.current.openEvent&&"mousedown"!==o.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent,"click")):r(!1,e.nativeEvent,"click")))},onClick(e){const t=f.current;"mousedown"===l&&f.current?f.current=void 0:lt(t,!0)&&u||(!n||!c||o.current.openEvent&&"click"!==o.current.openEvent.type?r(!0,e.nativeEvent,"click"):r(!1,e.nativeEvent,"click"))},onKeyDown(e){f.current=void 0,e.defaultPrevented||!d||jr(e)||(" "!==e.key||Ir(i)||(e.preventDefault(),m.current=!0),"Enter"===e.key&&r(!n||!c,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!d||jr(e)||Ir(i)||" "===e.key&&m.current&&(m.current=!1,r(!n||!c,e.nativeEvent,"click"))}})),[o,i,l,u,d,r,n,c]);return s.useMemo((()=>a?{reference:h}:{}),[a,h])}const Lr={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},zr={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Br=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function Wr(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:f="pointerdown",ancestorScroll:m=!1,bubbles:h,capture:p}=t,g=nr(),y=Mn("function"==typeof c?c:()=>!1),v="function"==typeof c?y:c,b=s.useRef(!1),w=s.useRef(!1),{escapeKey:x,outsidePress:_}=Br(h),{escapeKey:E,outsidePress:S}=Br(p),k=Mn((e=>{var t;if(!n||!a||!l||"Escape"!==e.key)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,s=g?sr(g.nodesRef.current,o):[];if(!x&&(e.stopPropagation(),s.length>0)){let e=!0;if(s.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),C=Mn((e=>{var t;const n=()=>{var t;k(e),null==(t=dt(e))||t.removeEventListener("keydown",n)};null==(t=dt(e))||t.addEventListener("keydown",n)})),N=Mn((e=>{var t;const n=b.current;b.current=!1;const a=w.current;if(w.current=!1,"click"===u&&a)return;if(n)return;if("function"==typeof v&&!v(e))return;const s=dt(e),l="["+rr("inert")+"]",c=ct(o.floating).querySelectorAll(l);let d=Le(s)?s:null;for(;d&&!Ye(d);){const e=Ge(d);if(Ye(e)||!Le(e))break;d=e}if(c.length&&Le(s)&&!s.matches("html,body")&&!et(s,o.floating)&&Array.from(c).every((e=>!et(d,e))))return;if(ze(s)&&O){const t=s.clientWidth>0&&s.scrollWidth>s.clientWidth,n=s.clientHeight>0&&s.scrollHeight>s.clientHeight;let r=n&&e.offsetX>s.clientWidth;if(n&&"rtl"===qe(s).direction&&(r=e.offsetX<=s.offsetWidth-s.clientWidth),r||t&&e.offsetY>s.clientHeight)return}const f=null==(t=i.current.floatingContext)?void 0:t.nodeId,m=g&&sr(g.nodesRef.current,f).some((t=>{var n;return ut(e,null==(n=t.context)?void 0:n.elements.floating)}));if(ut(e,o.floating)||ut(e,o.domReference)||m)return;const h=g?sr(g.nodesRef.current,f):[];if(h.length>0){let e=!0;if(h.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),P=Mn((e=>{var t;const n=()=>{var t;N(e),null==(t=dt(e))||t.removeEventListener(u,n)};null==(t=dt(e))||t.addEventListener(u,n)}));s.useEffect((()=>{if(!n||!a)return;function e(e){r(!1,e,"ancestor-scroll")}i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=_;const t=ct(o.floating);l&&t.addEventListener("keydown",E?C:k,E),v&&t.addEventListener(u,S?P:N,S);let s=[];return m&&(Le(o.domReference)&&(s=Ze(o.domReference)),Le(o.floating)&&(s=s.concat(Ze(o.floating))),!Le(o.reference)&&o.reference&&o.reference.contextElement&&(s=s.concat(Ze(o.reference.contextElement)))),s=s.filter((e=>{var n;return e!==(null==(n=t.defaultView)?void 0:n.visualViewport)})),s.forEach((t=>{t.addEventListener("scroll",e,{passive:!0})})),()=>{l&&t.removeEventListener("keydown",E?C:k,E),v&&t.removeEventListener(u,S?P:N,S),s.forEach((t=>{t.removeEventListener("scroll",e)}))}}),[i,o,l,v,u,n,r,m,a,x,_,k,E,C,N,S,P]),s.useEffect((()=>{b.current=!1}),[v,u]);const T=s.useMemo((()=>({onKeyDown:k,[Lr[f]]:e=>{d&&r(!1,e.nativeEvent,"reference-press")}})),[k,r,d,f]),O=s.useMemo((()=>({onKeyDown:k,onMouseDown(){w.current=!0},onMouseUp(){w.current=!0},[zr[u]]:()=>{b.current=!0}})),[k,u]);return s.useMemo((()=>a?{reference:T,floating:O}:{}),[a,T,O])}function Vr(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Zn(),i=s.useRef({}),[a]=s.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),l=null!=tr(),[c,u]=s.useState(r.reference),d=Mn(((e,t,r)=>{i.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)})),f=s.useMemo((()=>({setPositionReference:u})),[]),m=s.useMemo((()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference})),[c,r.reference,r.floating]);return s.useMemo((()=>({dataRef:i,open:t,onOpenChange:d,elements:m,events:a,floatingId:o,refs:f})),[t,d,m,a,o,f])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=s.useState(null),[l,c]=s.useState(null),u=(null==o?void 0:o.reference)||i,d=s.useRef(null),f=nr();Yn((()=>{u&&(d.current=u)}),[u]);const m=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=s.useState(r);wn(m,r)||h(r);const[p,g]=s.useState(null),[y,v]=s.useState(null),b=s.useCallback((e=>{e!==E.current&&(E.current=e,g(e))}),[]),w=s.useCallback((e=>{e!==S.current&&(S.current=e,v(e))}),[]),x=i||p,_=a||y,E=s.useRef(null),S=s.useRef(null),k=s.useRef(d),C=null!=c,N=En(c),P=En(o),T=s.useCallback((()=>{if(!E.current||!S.current)return;const e={placement:t,strategy:n,middleware:m};P.current&&(e.platform=P.current),((e,t,n)=>{const r=new Map,o={platform:fn,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Xt(c,r,l),f=r,m={},h=0;for(let n=0;n<s.length;n++){const{name:i,fn:p}=s[n],{x:g,y,data:v,reset:b}=await p({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,m={...m,[i]:{...m[i],...v}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=Xt(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:m}})(e,t,{...o,platform:i})})(E.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};O.current&&!wn(k.current,t)&&(k.current=t,Gt.flushSync((()=>{f(t)})))}))}),[m,t,n,P]);bn((()=>{!1===u&&k.current.isPositioned&&(k.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[u]);const O=s.useRef(!1);bn((()=>(O.current=!0,()=>{O.current=!1})),[]),bn((()=>{if(x&&(E.current=x),_&&(S.current=_),x&&_){if(N.current)return N.current(x,_,T);T()}}),[x,_,T,N,C]);const M=s.useMemo((()=>({reference:E,floating:S,setReference:b,setFloating:w})),[b,w]),R=s.useMemo((()=>({reference:x,floating:_})),[x,_]),D=s.useMemo((()=>{const e={position:n,left:0,top:0};if(!R.floating)return e;const t=_n(R.floating,d.x),r=_n(R.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...xn(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,R.floating,d.x,d.y]);return s.useMemo((()=>({...d,update:T,refs:M,elements:R,floatingStyles:D})),[d,T,M,R,D])}({...e,elements:{...o,...l&&{reference:l}}}),h=s.useCallback((e=>{const t=Le(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),m.refs.setReference(t)}),[m.refs]),p=s.useCallback((e=>{(Le(e)||null===e)&&(d.current=e,a(e)),(Le(m.refs.reference.current)||null===m.refs.reference.current||null!==e&&!Le(e))&&m.refs.setReference(e)}),[m.refs]),g=s.useMemo((()=>({...m.refs,setReference:p,setPositionReference:h,domReference:d})),[m.refs,p,h]),y=s.useMemo((()=>({...m.elements,domReference:u})),[m.elements,u]),v=s.useMemo((()=>({...m,...r,refs:g,elements:y,nodeId:t})),[m,g,y,t,r]);return Yn((()=>{r.dataRef.current.floatingContext=v;const e=null==f?void 0:f.nodesRef.current.find((e=>e.id===t));e&&(e.context=v)})),s.useMemo((()=>({...m,context:v,refs:g,elements:y})),[m,g,y,v])}const Ur="active",$r="selected";function Hr(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[Ur]:t,[$r]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[Pr]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var a;o&&[Ur,$r].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(a=r.get(n))||a.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}function Yr(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=s.useCallback((t=>Hr(t,e,"reference")),t),i=s.useCallback((t=>Hr(t,e,"floating")),n),a=s.useCallback((t=>Hr(t,e,"item")),r);return s.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a})),[o,i,a])}let qr=!1;function Kr(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Gr(e,t){return Kr(t,e===Rn||e===Dn,e===An||e===jn)}function Xr(e,t,n){return Kr(t,e===Dn,n?e===An:e===jn)||"Enter"===e||" "===e||""===e}function Zr(e,t,n){return Kr(t,n?e===jn:e===An,e===Rn)}const Jr=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Qr(e,t){var n;void 0===t&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,l=null!=(n=Jr.get(a))?n:a,c=Zn(),u=null!=tr(),d=s.useMemo((()=>"tooltip"===l||"label"===a?{["aria-"+("label"===a?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":"alertdialog"===l?"dialog":l,"aria-controls":r?o:void 0,..."listbox"===l&&{role:"combobox"},..."menu"===l&&{id:c},..."menu"===l&&u&&{role:"menuitem"},..."select"===a&&{"aria-autocomplete":"none"},..."combobox"===a&&{"aria-autocomplete":"list"}}),[l,o,u,r,c,a]),f=s.useMemo((()=>{const e={id:o,...l&&{role:l}};return"tooltip"===l||"label"===a?e:{...e,..."menu"===l&&{"aria-labelledby":c}}}),[l,o,c,a]),m=s.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:o+"-option"}};switch(a){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}}),[o,a]);return s.useMemo((()=>i?{reference:d,floating:f,item:m}:{}),[i,d,f,m])}const eo=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()));function to(e,t){return"function"==typeof e?e(t):e}function no(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,l=e.placement,c=l.split("-")[0],u=s.useMemo((()=>({side:c,placement:l})),[c,l]),d="number"==typeof a,f=(d?a:a.open)||0,m=(d?a:a.close)||0,[h,p]=s.useState((()=>({...to(i,u),...to(n,u)}))),{isMounted:g,status:y}=function(e,t){void 0===t&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=("number"==typeof o?o:o.close)||0,[a,l]=s.useState("unmounted"),c=function(e,t){const[n,r]=s.useState(e);return e&&!n&&r(!0),s.useEffect((()=>{if(!e&&n){const e=setTimeout((()=>r(!1)),t);return()=>clearTimeout(e)}}),[e,n,t]),n}(n,i);return c||"close"!==a||l("unmounted"),Yn((()=>{if(r){if(n){l("initial");const e=requestAnimationFrame((()=>{l("open")}));return()=>{cancelAnimationFrame(e)}}l("close")}}),[n,r]),{isMounted:c,status:a}}(e,{duration:a}),v=or(n),b=or(r),w=or(o),x=or(i);return Yn((()=>{const e=to(v.current,u),t=to(w.current,u),n=to(x.current,u),r=to(b.current,u)||Object.keys(e).reduce(((e,t)=>(e[t]="",e)),{});if("initial"===y&&p((t=>({transitionProperty:t.transitionProperty,...n,...e}))),"open"===y&&p({transitionProperty:Object.keys(r).map(eo).join(","),transitionDuration:f+"ms",...n,...r}),"close"===y){const r=t||e;p({transitionProperty:Object.keys(r).map(eo).join(","),transitionDuration:m+"ms",...n,...r})}}),[m,w,v,b,x,f,y,u]),{isMounted:g,styles:h}}function ro(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,a=i-1;e<i;a=e++){const[i,s]=t[e]||[0,0],[l,c]=t[a]||[0,0];s>=r!=c>=r&&n<=(l-i)*(r-s)/(c-s)+i&&(o=!o)}return o}function oo(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();const c=e=>{let{x:n,y:c,placement:u,elements:d,onClose:f,nodeId:m,tree:h}=e;return function(e){function p(){clearTimeout(o),f()}if(clearTimeout(o),!d.domReference||!d.floating||null==u||null==n||null==c)return;const{clientX:g,clientY:y}=e,v=[g,y],b=dt(e),w="mouseleave"===e.type,x=et(d.floating,b),_=et(d.domReference,b),E=d.domReference.getBoundingClientRect(),S=d.floating.getBoundingClientRect(),k=u.split("-")[0],C=n>S.right-S.width/2,N=c>S.bottom-S.height/2,P=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(v,E),T=S.width>E.width,O=S.height>E.height,M=(T?E:S).left,R=(T?E:S).right,D=(O?E:S).top,A=(O?E:S).bottom;if(x&&(i=!0,!w))return;if(_&&(i=!1),_&&!w)return void(i=!0);if(w&&Le(e.relatedTarget)&&et(d.floating,e.relatedTarget))return;if(h&&sr(h.nodesRef.current,m).some((e=>{let{context:t}=e;return null==t?void 0:t.open})))return;if("top"===k&&c>=E.bottom-1||"bottom"===k&&c<=E.top+1||"left"===k&&n>=E.right-1||"right"===k&&n<=E.left+1)return p();let j=[];switch(k){case"top":j=[[M,E.top+1],[M,S.bottom-1],[R,S.bottom-1],[R,E.top+1]];break;case"bottom":j=[[M,S.top+1],[M,E.bottom-1],[R,E.bottom-1],[R,S.top+1]];break;case"left":j=[[S.right-1,A],[S.right-1,D],[E.left+1,D],[E.left+1,A]];break;case"right":j=[[E.right-1,A],[E.right-1,D],[S.left+1,D],[S.left+1,A]]}if(!ro([g,y],j)){if(i&&!P)return p();if(!w&&r){const t=function(e,t){const n=performance.now(),r=n-l;if(null===a||null===s||0===r)return a=e,s=t,l=n,null;const o=e-a,i=t-s,c=Math.sqrt(o*o+i*i);return a=e,s=t,l=n,c/r}(e.clientX,e.clientY);if(null!==t&&t<.1)return p()}ro([g,y],function(e){let[n,r]=e;switch(k){case"top":return[[T?n+t/2:C?n+4*t:n-4*t,r+t+1],[T?n-t/2:C?n+4*t:n-4*t,r+t+1],[S.left,C||T?S.bottom-t:S.top],[S.right,C?T?S.bottom-t:S.top:S.bottom-t]];case"bottom":return[[T?n+t/2:C?n+4*t:n-4*t,r-t],[T?n-t/2:C?n+4*t:n-4*t,r-t],[S.left,C||T?S.top+t:S.bottom],[S.right,C?T?S.top+t:S.bottom:S.top+t]];case"left":{const e=[n+t+1,O?r+t/2:N?r+4*t:r-4*t],o=[n+t+1,O?r-t/2:N?r+4*t:r-4*t];return[[N||O?S.right-t:S.left,S.top],[N?O?S.right-t:S.left:S.right-t,S.bottom],e,o]}case"right":return[[n-t,O?r+t/2:N?r+4*t:r-4*t],[n-t,O?r-t/2:N?r+4*t:r-4*t],[N||O?S.left+t:S.right,S.top],[N?O?S.left+t:S.right:S.left+t,S.bottom]]}}([n,c]))?!i&&r&&(o=window.setTimeout(p,40)):p()}}};return c.__options={blockPointerEvents:n},c}const io=xe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),ao=xe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);var so="light",lo="neutral",co=function(e){var t=e.icon,n=void 0===t?null:t,r=e.theme,o=void 0===r?so:r,i=e.variant,a=void 0===i?lo:i,l="[&>svg]:h-5 [&>svg]:w-5",c=function(e){var t=e.theme,n=void 0===t?so:t,r=e.variant;return{info:"light"===n?"text-support-info":"text-support-info-inverse",success:"light"===n?"text-support-success":"text-support-success-inverse",warning:"light"===n?"text-support-warning":"text-support-warning-inverse",error:"light"===n?"text-support-error":"text-support-error-inverse"}[void 0===r?lo:r]||("light"===n?"text-icon-secondary":"text-icon-inverse")}({theme:o,variant:a});if(n&&(0,s.isValidElement)(n))return(0,s.cloneElement)(n,{className:re(l,c,n.props.className)});var u={neutral:React.createElement(Te,{className:re(l,c)}),info:React.createElement(Te,{className:re(l,c)}),success:React.createElement(Ee,{className:re(l,c)}),warning:React.createElement(io,{className:re(l,c)}),error:React.createElement(ao,{className:re(l,c)})};return u[a]||u.neutral},uo=function(e){var t=e.actionType,n=void 0===t?"button":t,r=e.onAction,o=void 0===r?function(){}:r,i=e.actionLabel,a=void 0===i?"":i,s=e.theme,l=void 0===s?so:s,c="focus:ring-0 focus:ring-offset-0 ring-offset-0 focus:outline-none",u="text-button-primary border-button-primary hover:border-button-primary hover:text-button-primary-hover";switch("dark"===l&&(u="text-text-inverse border-text-inverse hover:border-text-inverse hover:text-text-inverse"),n){case"button":return React.createElement(ue,{variant:"outline",size:"xs",onClick:o,className:re("rounded",c,u,"dark"===l?"bg-transparent hover:bg-transparent":"bg-white hover:bg-white")},a);case"link":return React.createElement(ue,{variant:"link",size:"xs",onClick:o,className:re(c,u)},a);default:return null}},fo=function(e){var t=e.theme,n=void 0===t?so:t,r=e.title,o=void 0===r?"":r;return!o&&isNaN(o)?null:React.createElement("span",{className:re("block",{light:"text-text-primary",dark:"text-text-inverse"}[n],"text-sm leading-5 font-semibold")},o)},mo=function(e){var t=e.theme,n=void 0===t?so:t,r=e.content,o=void 0===r?"":r;return!o&&isNaN(o)?null:React.createElement("span",{className:re({light:"text-text-primary",dark:"text-text-inverse"}[n],"block text-sm [&_*]:text-sm leading-5 [&_*]:leading-5 font-normal")},o)},ho=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}};function po(e){return po="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},po(e)}function go(){return go=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},go.apply(null,arguments)}function yo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yo(Object(n),!0).forEach((function(t){bo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bo(e,t,n){return(t=function(e){var t=function(e){if("object"!=po(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=po(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==po(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var xo=function(e){var t,n,r,o=e.variant,i=void 0===o?"dark":o,a=e.placement,c=void 0===a?"bottom":a,u=e.title,d=void 0===u?"":u,f=e.content,m=e.arrow,h=void 0!==m&&m,p=e.open,g=e.setOpen,y=e.children,v=e.className,b=e.tooltipPortalRoot,w=void 0===b?null:b,x=e.tooltipPortalId,_=void 0===x?"":x,E=e.boundary,S=void 0===E?"clippingAncestors":E,k=e.strategy,C=void 0===k?"fixed":k,N=e.offset,P=void 0===N?8:N,T=e.triggers,O=void 0===T?["hover","focus"]:T,M=e.interactive,R=void 0!==M&&M,D=(0,s.useMemo)((function(){return"boolean"==typeof p&&"function"==typeof g}),[p,g]),A=function(e){if(Array.isArray(e))return e}(r=(0,s.useState)(!1))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next,!2;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){l=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(r)||function(e){if(e){if("string"==typeof e)return wo(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?wo(e,2):void 0}}(r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),j=A[0],I=A[1],F=(0,s.useRef)(null),L=Vr({open:D?p:j,onOpenChange:D?g:I,placement:c,strategy:C,middleware:[kn(P),Nn({boundary:S}),Cn({boundary:S}),(n={element:F},{...Sn(n),options:[n,void 0]})],whileElementsMounted:mn}),z=L.refs,B=L.floatingStyles,W=L.context,V=Fr(W,{enabled:!D&&O.includes("click")}),U=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:l=!0,delay:c=0,handleClose:u=null,mouseOnly:d=!1,restMs:f=0,move:m=!0}=t,h=nr(),p=tr(),g=or(u),y=or(c),v=or(n),b=s.useRef(),w=s.useRef(-1),x=s.useRef(),_=s.useRef(-1),E=s.useRef(!0),S=s.useRef(!1),k=s.useRef((()=>{})),C=s.useCallback((()=>{var e;const t=null==(e=o.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}),[o]);s.useEffect((()=>{if(l)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(w.current),clearTimeout(_.current),E.current=!0)}}),[l,i]),s.useEffect((()=>{if(!l)return;if(!g.current)return;if(!n)return;function e(e){C()&&r(!1,e,"hover")}const t=ct(a.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[a.floating,n,r,l,g,C]);const N=s.useCallback((function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const o=ar(y.current,"close",b.current);o&&!x.current?(clearTimeout(w.current),w.current=window.setTimeout((()=>r(!1,e,n)),o)):t&&(clearTimeout(w.current),r(!1,e,n))}),[y,r]),P=Mn((()=>{k.current(),x.current=void 0})),T=Mn((()=>{if(S.current){const e=ct(a.floating).body;e.style.pointerEvents="",e.removeAttribute(ir),S.current=!1}}));s.useEffect((()=>{if(l&&Le(a.domReference)){var e;const t=a.domReference;return n&&t.addEventListener("mouseleave",c),null==(e=a.floating)||e.addEventListener("mouseleave",c),m&&t.addEventListener("mousemove",i,{once:!0}),t.addEventListener("mouseenter",i),t.addEventListener("mouseleave",s),()=>{var e;n&&t.removeEventListener("mouseleave",c),null==(e=a.floating)||e.removeEventListener("mouseleave",c),m&&t.removeEventListener("mousemove",i),t.removeEventListener("mouseenter",i),t.removeEventListener("mouseleave",s)}}function t(){return!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type)}function i(e){if(clearTimeout(w.current),E.current=!1,d&&!lt(b.current)||f>0&&!ar(y.current,"open"))return;const t=ar(y.current,"open",b.current);t?w.current=window.setTimeout((()=>{v.current||r(!0,e,"hover")}),t):r(!0,e,"hover")}function s(e){if(t())return;k.current();const r=ct(a.floating);if(clearTimeout(_.current),g.current&&o.current.floatingContext){n||clearTimeout(w.current),x.current=g.current({...o.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){T(),P(),N(e,!0,"safe-polygon")}});const t=x.current;return r.addEventListener("mousemove",t),void(k.current=()=>{r.removeEventListener("mousemove",t)})}("touch"!==b.current||!et(a.floating,e.relatedTarget))&&N(e)}function c(e){t()||o.current.floatingContext&&(null==g.current||g.current({...o.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){T(),P(),N(e)}})(e))}}),[a,l,e,d,f,m,N,P,T,r,n,v,h,y,g,o]),Yn((()=>{var e;if(l&&n&&null!=(e=g.current)&&e.__options.blockPointerEvents&&C()){S.current=!0;const e=a.floating;if(Le(a.domReference)&&e){var t;const n=ct(a.floating).body;n.setAttribute(ir,"");const r=a.domReference,o=null==h||null==(t=h.nodesRef.current.find((e=>e.id===p)))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}}),[l,n,p,a,h,g,C]),Yn((()=>{n||(b.current=void 0,P(),T())}),[n,P,T]),s.useEffect((()=>()=>{P(),clearTimeout(w.current),clearTimeout(_.current),T()}),[l,a.domReference,P,T]);const O=s.useMemo((()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function o(){E.current||v.current||r(!0,t,"hover")}d&&!lt(b.current)||n||0===f||(clearTimeout(_.current),"touch"===b.current?o():_.current=window.setTimeout(o,f))}}}),[d,r,n,v,f]),M=s.useMemo((()=>({onMouseEnter(){clearTimeout(w.current)},onMouseLeave(e){N(e.nativeEvent,!1)}})),[N]);return s.useMemo((()=>l?{reference:O,floating:M}:{}),[l,O,M])}(W,vo({move:!1,enabled:!D&&O.includes("hover")},R&&{handleClose:oo()})),$=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:l=!0,visibleOnly:c=!0}=t,u=s.useRef(!1),d=s.useRef(),f=s.useRef(!0);s.useEffect((()=>{if(!l)return;const e=je(a.domReference);function t(){!n&&ze(a.domReference)&&a.domReference===Qe(ct(a.domReference))&&(u.current=!0)}function r(){f.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",r,!0)}}),[a.domReference,n,l]),s.useEffect((()=>{if(l)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(u.current=!0)}}),[o,l]),s.useEffect((()=>()=>{clearTimeout(d.current)}),[]);const m=s.useMemo((()=>({onPointerDown(e){ot(e.nativeEvent)||(f.current=!1)},onMouseLeave(){u.current=!1},onFocus(e){if(u.current)return;const t=dt(e.nativeEvent);if(c&&Le(t))try{if(it()&&st())throw Error();if(!t.matches(":focus-visible"))return}catch(e){if(!f.current&&!ft(t))return}r(!0,e.nativeEvent,"focus")},onBlur(e){u.current=!1;const t=e.relatedTarget,n=e.nativeEvent,o=Le(t)&&t.hasAttribute(rr("focus-guard"))&&"outside"===t.getAttribute("data-type");d.current=window.setTimeout((()=>{var e;const s=Qe(a.domReference?a.domReference.ownerDocument:document);(t||s!==a.domReference)&&(et(null==(e=i.current.floatingContext)?void 0:e.refs.floating.current,s)||et(a.domReference,s)||o||r(!1,n,"focus"))}))}})),[i,a.domReference,r,c]);return s.useMemo((()=>l?{reference:m}:{}),[l,m])}(W,{enabled:!D&&O.includes("focus")}),H=Yr([V,U,$,Wr(W),Qr(W,{role:"tooltip"})]),Y=H.getReferenceProps,q=H.getFloatingProps,K=no(W,{duration:150,initial:{opacity:0},open:{opacity:1},close:{opacity:0}}),G=K.isMounted,X=K.styles,Z=null===(t={light:"bg-tooltip-background-light text-text-primary",dark:"bg-tooltip-background-dark text-text-on-color"})||void 0===t?void 0:t[i],J="dark"===i?"text-tooltip-background-dark":"text-tooltip-background-light";return l().createElement(l().Fragment,null,(0,s.isValidElement)(y)&&(0,s.cloneElement)(y,vo(vo({},y.props),{},{ref:ho(y.ref,z.setReference),className:re(y.props.className)},Y())),l().createElement(Cr,{id:_,root:w},G&&l().createElement("div",go({className:re("absolute z-20 py-2 px-3 rounded-md text-xs leading-4 shadow-soft-shadow-lg",Z,"max-w-80 w-fit",v),ref:z.setFloating,style:vo(vo({},B),X)},q()),l().createElement("div",null,!!d&&l().createElement("span",{className:"font-semibold"},d),!!f&&l().createElement("div",{className:"font-normal"},f)),h&&l().createElement(Jn,{ref:F,context:W,placement:c,className:re("fill-current",J)}))))},_o=["id","label","value","children","disabled","icon","inlineIcon","hideSelection","reversePosition","borderOn","borderOnActive","badgeItem","useSwitch","info","minWidth"],Eo=["id","children","value","disabled","size"];function So(){return So=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},So.apply(null,arguments)}function ko(e){return ko="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ko(e)}function Co(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function No(e,t){if(e){if("string"==typeof e)return Po(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Po(e,t):void 0}}function Po(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var To=(0,s.createContext)(),Oo=function(){return(0,s.useContext)(To)},Mo=function(e){var t,n=e.children,r=e.name,o=e.style,i=void 0===o?"simple":o,a=e.size,c=void 0===a?"md":a,u=e.value,d=e.defaultValue,f=e.by,m=void 0===f?"id":f,h=e.as,p=void 0===h?"div":h,g=e.onChange,y=e.className,v=e.disableGroup,b=void 0!==v&&v,w=e.vertical,x=void 0!==w&&w,_=e.columns,E=void 0===_?4:_,S=e.multiSelection,k=void 0!==S&&S,C=e.gapClassname,N=void 0===C?"gap-2":C,P=(0,s.useMemo)((function(){return void 0!==u}),[u]),T=(0,s.useMemo)((function(){return r||"radio-button-group-".concat(de())}),[r]);t=P?u:k?null!=d?d:[]:d;var O,M=function(e){if(Array.isArray(e))return e}(O=(0,s.useState)(t))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next,!2;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){l=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(O)||No(O,2)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),R=M[0],D=M[1],A=(0,s.useCallback)((function(e){if(k)D((function(t){var n=t.includes(e)?t.filter((function(t){return t!==e})):[].concat(function(e){return function(e){if(Array.isArray(e))return Po(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||No(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t),[e]);return"function"==typeof g&&g(n),n}));else{if(P||D(e),"function"!=typeof g)return;g(e)}}),[g]);y=re("grid grid-cols-4",ae[E],N,"tile"===i&&"gap-0",x&&"grid-cols-1",y);var j=re("tile"===i?"border border-border-subtle border-solid rounded-md shadow-sm":"gap-6",y),I=function(){return l().createElement(To.Provider,{value:{name:T,value:P?u:R,by:m,onChange:A,isControlled:P,disableAll:b,style:i,columns:E,multiSelection:k,size:c}},l().Children.map(n,(function(e){return(0,s.isValidElement)(e)?e:null})))};return l().createElement(l().Fragment,null,"tile"===i?l().createElement("div",{className:j},I()):l().createElement(p,p===s.Fragment?{}:{className:y},I()))};Mo.displayName="RadioButton.Group";var Ro=(0,s.forwardRef)((function(e,t){var n,r,o=e.id,i=e.label,a=e.value,c=e.children,u=e.disabled,d=e.icon,f=void 0===d?null:d,m=e.inlineIcon,h=void 0!==m&&m,p=e.hideSelection,g=void 0!==p&&p,y=e.reversePosition,v=void 0!==y&&y,b=e.borderOn,w=void 0!==b&&b,x=e.borderOnActive,_=void 0===x||x,E=e.badgeItem,S=void 0===E?null:E,k=e.useSwitch,C=void 0!==k&&k,N=e.info,P=void 0===N?null:N,T=e.minWidth,O=void 0===T||T,M=Co(e,_o),R=M.buttonWrapperClasses,D=Oo(),A=D.name,j=D.value,I=D.by,F=D.onChange,L=D.disableAll,z=D.checked,B=D.multiSelection,W=D.size,V="primary",U=(0,s.useMemo)((function(){return o||"radio-button-".concat(de())}),[o]),$=(0,s.useMemo)((function(){return L||u}),[L,u]),H=(0,s.useMemo)((function(){return B?Array.isArray(j)&&j.includes(a):void 0!==z?z:ko(j)===ko(a)&&("string"==typeof j?j===a:Array.isArray(j)?j.includes(a):j[I]===a[I])}),[j,a,z]),Y=(0,s.useCallback)((function(){return(0,s.isValidElement)(i)?i:i.heading?l().createElement("div",{className:re(!h&&"space-y-1.5 mt-[2px]",v&&(C?"ml-10":"ml-4"),h&&"flex gap-2",h&&!i.description&&"items-center")},f&&l().createElement(l().Fragment,null,f),l().createElement("div",{className:re("space-y-1.5")},l().createElement("p",{className:re("text-text-primary font-medium m-0",Me[W],u&&"text-text-disabled cursor-not-allowed")},i.heading),i.description&&l().createElement("p",{className:"text-text-tertiary text-sm font-normal leading-5 m-0"},i.description))):null}),[i]);if("tile"===D.style)return l().createElement(Do,{id:o,label:i,value:a,disabled:u,size:W},c);var q=function(){$||(B?C&&F(a,!H):F(a))};return l().createElement("label",{className:re("inline-flex items-center relative cursor-pointer transition-all duration-300",!!i&&"items-start justify-between",O&&"min-w-[180px]",w&&"border border-border-subtle border-solid rounded-md shadow-sm hover:ring-2 hover:ring-border-interactive",_&&w&&H&&"ring-2 ring-border-interactive","sm"===W?"px-3 py-3":"px-4 py-4","pr-12",$&&"cursor-not-allowed opacity-40",R),htmlFor:U,onClick:q},!!i&&l().createElement("label",{className:re("cursor-pointer",$&&"cursor-not-allowed"),htmlFor:U},Y()),!!P&&l().createElement("div",{className:"absolute mr-0.5 bottom-1.5 right-3"},l().createElement(xo,{arrow:!0,triggers:["hover","focus"],placement:"top",title:null==P?void 0:P.heading,content:null==P?void 0:P.description},l().createElement(Te,{className:re("text-text-primary",null===(n=Re[W])||void 0===n?void 0:n.info)}))),l().createElement("label",{className:re("absolute mr-0.5 right-3 flex items-center cursor-pointer rounded-full gap-2",v&&"left-0",$&&"cursor-not-allowed",h&&"mr-3"),onClick:q},!!S&&S,!g&&(C?l().createElement(ye,{defaultValue:!1,size:"md"===W?"lg":"sm",onChange:function(){B?F(a,!H):F(a)},checked:H}):l().createElement("span",{className:"relative p-0.5"},l().createElement("input",So({ref:t,id:U,type:B?"checkbox":"radio",className:re("peer flex relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid",!B&&"rounded-full",Oe[V].checkbox,Re[W].checkbox,$&&"disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled cursor-not-allowed"),name:A,value:a,onChange:function(e){return F(e.target.value)},checked:H,disabled:$},M)),l().createElement("span",{className:re("inline-flex items-center absolute top-2/4 left-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",Oe[V].icon,$&&"peer-disabled:text-border-disabled cursor-not-allowed")},B?l().createElement(Ee,{className:"sm"===W?"size-3":"size-4"}):l().createElement("div",{className:re("rounded-full bg-current","sm"===W&&"mt-[0.5px]",null===(r=Re[W])||void 0===r?void 0:r.icon)}))))))}));Ro.displayName="RadioButton.Button";var Do=function(e){var t=e.id,n=e.children,r=e.value,o=e.disabled,i=e.size,a=void 0===i?"md":i,c=Co(e,Eo),u=Oo()||{},d=u.name,f=u.value,m=u.by,h=u.onChange,p=u.disableAll,g=u.checked,y=(0,s.useMemo)((function(){return t||"radio-button-".concat(de())}),[t]),v=(0,s.useMemo)((function(){return p||o}),[p,o]),b=(0,s.useMemo)((function(){return void 0!==g?g:ko(f)===ko(r)&&("string"==typeof f?f===r:Array.isArray(f)?f.includes(r):f[m]===r[m])}),[f,r,g,m]),w=re("bg-background-primary text-primary cursor-pointer flex items-center justify-center","hover:bg-button-tertiary-hover","focus:outline-none",v?"text-text-disabled cursor-not-allowed":"",De[a],"border-0 border-r border-border-subtle border-solid");return l().createElement(l().Fragment,null,l().createElement("button",So({type:"button",id:y,className:re(w,"first:rounded-tl first:rounded-bl first:border-0 first:border-r first:border-border-subtle last:rounded-tr last:rounded-br last:border-0",b&&"bg-button-disabled"),onClick:function(){h&&h(r)},disabled:v},c),l().createElement("input",{type:"hidden",value:r,name:d,checked:b,onChange:h}),n))},Ao=Object.assign(Ro,{Group:Mo,Button:Ro});const jo=xe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var Io=(0,s.forwardRef)((function(e,t){var n=e.label,r=void 0===n?"":n,o=e.size,i=void 0===o?"sm":o,a=e.className,s=void 0===a?"":a,l=e.type,c=void 0===l?"pill":l,u=e.variant,d=void 0===u?"neutral":u,f=e.icon,m=void 0===f?null:f,h=e.disabled,p=void 0!==h&&h,g=e.onClose,y=void 0===g?function(){}:g,v=e.closable,b=void 0!==v&&v,w=e.onMouseDown,x=void 0===w?function(){}:w,_={neutral:"bg-badge-background-gray hover:bg-badge-hover-gray text-badge-color-gray border-badge-border-gray",red:"bg-badge-background-red hover:bg-badge-hover-red text-badge-color-red border-badge-border-red",yellow:"bg-badge-background-yellow hover:bg-badge-hover-yellow text-badge-color-yellow border-badge-border-yellow",green:"bg-badge-background-green hover:bg-badge-hover-green text-badge-color-green border-badge-border-green",blue:"bg-badge-background-sky hover:bg-badge-hover-sky text-badge-color-sky border-badge-border-sky",inverse:"bg-background-inverse hover:bg-badge-hover-inverse text-text-inverse border-background-inverse",disabled:"bg-badge-background-disabled hover:bg-badge-hover-disabled text-badge-color-disabled border-badge-border-disabled disabled cursor-not-allowed"},E="",S="group relative justify-center flex items-center cursor-pointer",k={xxs:"[&>svg]:size-3",xs:"[&>svg]:size-3",sm:"[&>svg]:size-3",md:"[&>svg]:size-4",lg:"[&>svg]:size-5"};return p?(E=_.disabled,S+=" cursor-not-allowed disabled"):E=_[d],r?React.createElement("span",{className:re("font-medium border-badge-border-gray flex items-center justify-center border border-solid box-border",{xxs:"py-0.5 px-0.5 text-xs h-4",xs:"py-0.5 px-1 text-xs h-5",sm:"py-1 px-1.5 text-xs h-6",md:"py-1 px-1.5 text-sm h-7",lg:"py-1 px-1.5 text-base h-8"}[i],{pill:"rounded-full",rounded:"rounded"}[c],"gap-0.5",E,s),ref:t},m?React.createElement("span",{className:re("justify-center flex items-center",k[i])},m):null,React.createElement("span",{className:"px-1"},r),b&&React.createElement("span",{className:re(S,k[i]),onClick:p?null:y,onMouseDown:x,role:"button",tabIndex:0},React.createElement("span",{className:"sr-only"},"Remove ".concat(r)),React.createElement(jo,null),React.createElement("span",{className:"absolute -inset-1"}))):null}));Io.displayName="Badge";var Fo=Io,Lo=["id","defaultValue","value","size","className","disabled","onChange","error","onError"];function zo(){return zo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zo.apply(null,arguments)}function Bo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Wo=(0,s.forwardRef)((function(e,t){var n,r=e.id,o=e.defaultValue,i=void 0===o?"":o,a=e.value,l=e.size,c=void 0===l?"sm":l,u=e.className,d=void 0===u?"":u,f=e.disabled,m=void 0!==f&&f,h=e.onChange,p=void 0===h?function(){}:h,g=e.error,y=void 0!==g&&g,v=e.onError,b=void 0===v?function(){}:v,w=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Lo),x=(0,s.useMemo)((function(){return r||"input-textarea-".concat(de())}),[r]),_=(0,s.useMemo)((function(){return void 0!==a}),[a]),E=function(e){if(Array.isArray(e))return e}(n=(0,s.useState)(i))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next,!2;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){l=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(n)||function(e){if(e){if("string"==typeof e)return Bo(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Bo(e,2):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),S=E[0],k=E[1],C=(0,s.useCallback)((function(){return _?a:S}),[_,a,S]),N=m?"hover:border-border-disabled":"hover:border-border-strong",P=y?"focus:border-focus-error-border focus:ring-field-color-error border-focus-error-border":"",T=m?"border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"";return React.createElement("textarea",zo({ref:t,id:x,className:re("py-2 rounded border border-solid border-border-subtle bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary focus:outline-none",T,{sm:"px-3 rounded text-xs",md:"px-3 rounded-md text-sm",lg:"px-4 rounded-lg text-base"}[c],"focus:border-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",N,P,d),disabled:m,onChange:function(e){if(!m){var t=e.target.value;_||k(t),"function"==typeof p&&p(t)}},onInvalid:b,value:C()},w))}));Wo.displayName="TextArea";var Vo=Wo,Uo=function(e){var t,n,r,o,i=e.variant,a=void 0===i?"primary":i,s=e.size,l=void 0===s?"md":s,c=e.border,u=void 0===c?"subtle":c,d=e.url,f=void 0===d?"":d,m=e.children,h=e.className,p=null===(t={white:"text-text-primary bg-background-primary",gray:"text-text-primary bg-background-secondary",primary:"text-text-on-color bg-background-brand",primaryLight:"text-text-primary bg-brand-background-50",dark:"text-text-on-color bg-button-secondary"})||void 0===t?void 0:t[a],g=null===(n={xxs:"size-5 [&>svg]:size-3 text-xs",xs:"size-6 [&>svg]:size-4 text-sm",sm:"size-8 [&>svg]:size-5 text-base",md:"size-10 [&>svg]:size-6 text-lg",lg:"size-12 [&>svg]:size-12 text-lg"})||void 0===n?void 0:n[l],y=null===(r={none:"",subtle:"ring-1 ring-border-transparent-subtle",ring:"ring ring-border-subtle"})||void 0===r?void 0:r[f&&"none"===u?"subtle":u],v=f?"bg-cover bg-center":"";return React.createElement("div",{className:re("rounded-full overflow-hidden flex items-center justify-center",!f&&p,g,y,v,h),style:f?{backgroundImage:"url(".concat(f,")")}:{}},m?"string"==typeof m?null==m||null===(o=m[0])||void 0===o?void 0:o.toUpperCase():m:null)};const $o=xe("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);var Ho=["id","type","defaultValue","value","size","className","disabled","onChange","error","onError","prefix","suffix","label"];function Yo(){return Yo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yo.apply(null,arguments)}function qo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ko(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ko(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ko(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Go=(0,s.forwardRef)((function(e,t){var n=e.id,r=e.type,o=void 0===r?"text":r,i=e.defaultValue,a=void 0===i?"":i,l=e.value,c=e.size,u=void 0===c?"sm":c,d=e.className,f=void 0===d?"":d,m=e.disabled,h=void 0!==m&&m,p=e.onChange,g=void 0===p?function(){}:p,y=e.error,v=void 0!==y&&y,b=e.onError,w=void 0===b?function(){}:b,x=e.prefix,_=void 0===x?null:x,E=e.suffix,S=void 0===E?null:E,k=e.label,C=void 0===k?"":k,N=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Ho),P=(0,s.useRef)(null),T=(0,s.useMemo)((function(){return n||"input-".concat(o,"-").concat(de())}),[n]),O=(0,s.useMemo)((function(){return void 0!==l}),[l]),M=qo((0,s.useState)(a),2),R=M[0],D=M[1],A=qo((0,s.useState)(null),2),j=A[0],I=A[1],F=(0,s.useCallback)((function(){return O?l:R}),[O,l,R]),L=function(e){var t;h||("file"===o?(t=e.target.files).length>0?I(t[0].name):I(null):t=e.target.value,O||"file"===o||D(t),"function"==typeof g&&g(t))},z=function(){I(null),P.current&&(P.current.value=null),g(null)},B="bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary w-full outline outline-1 outline-border-subtle border-none",W={xs:"px-2 py-1 rounded",sm:"p-3 py-2 rounded",md:"p-3.5 py-2.5 rounded-md",lg:"p-4 py-3 rounded-lg"},V={xs:"text-xs font-medium",sm:"text-sm font-medium",md:"text-sm font-medium",lg:"text-base font-medium"},U={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-base"},$={sm:_?"pl-8":"",md:_?"pl-9":"",lg:_?"pl-10":""},H={sm:S?"pr-8":"",md:S?"pr-9":"",lg:S?"pr-10":""},Y=h?"hover:outline-border-disabled":"hover:outline-border-strong",q="focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",K=v?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",G=v?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",X=h?"outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",Z=h?"outline-border-disabled cursor-not-allowed text-text-disabled file:text-text-tertiary":"",J="font-normal placeholder-text-tertiary text-text-primary pointer-events-none absolute inset-y-0 flex flex-1 items-center [&>svg]:h-4 [&>svg]:w-4",Q=h?"font-normal placeholder-text-tertiary text-icon-disabled pointer-events-none absolute inset-y-0 flex flex-1 items-center":"font-normal placeholder-text-tertiary text-field-placeholder pointer-events-none absolute inset-y-0 flex flex-1 items-center",ee={xs:"[&>svg]:size-4",sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6"},te=j?"file:border-0 file:bg-transparent pr-10":"text-text-tertiary file:border-0 file:bg-transparent pr-10";return"file"===o?React.createElement("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border"},React.createElement("label",{className:re(V[u],"text-field-label"),htmlFor:T},C),React.createElement("div",{className:re("w-full relative flex focus-within:z-10",f)},React.createElement("input",Yo({ref:t,id:T,type:"file",className:re(B,Z,W[u],U[u],q,Y,G,te),disabled:h,onChange:L,onInvalid:w},N)),React.createElement("div",{className:re(Q,"right-0 pr-3",ee[u])},React.createElement($o,null)))):React.createElement("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border"},React.createElement("label",{className:re(V[u],"text-field-label"),htmlFor:T},C),React.createElement("div",{className:re("w-full relative flex focus-within:z-10",f)},_?React.createElement("div",{className:re(J,"left-0 pl-3",U[u])},_):null,React.createElement("input",Yo({ref:P,id:T,type:o,className:re(B,X,W[u],U[u],$[u],H[u],q,Y,K),disabled:h,onChange:L,onInvalid:w,value:F()},N)),"file"===o?j?React.createElement("div",{className:re(Q,"right-0 pr-3 cursor-pointer z-20 pointer-events-auto",ee[u]),onClick:z,role:"button",tabIndex:0,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||z()}},React.createElement(jo,null)):React.createElement("div",{className:re(Q,"right-0 pr-3",ee[u])},React.createElement($o,null)):S?React.createElement("div",{className:re(J,"right-0 pr-3",U[u])},S):null))}));Go.displayName="Input";var Xo=Go,Zo=["children","tag","size","className","variant","required"];function Jo(){return Jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jo.apply(null,arguments)}var Qo=(0,s.forwardRef)((function(e,t){var n=e.children,r=void 0===n?null:n,o=e.tag,i=void 0===o?"label":o,a=e.size,s=void 0===a?"sm":a,c=e.className,u=void 0===c?"":c,d=e.variant,f=void 0===d?"neutral":d,m=e.required,h=void 0!==m&&m,p=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Zo);if(!r)return null;var g="";h&&(g="after:content-['*'] after:text-field-required after:ml-0.5");var y=i;return l().createElement(y,Jo({ref:t,className:re("font-medium text-field-label flex items-center gap-0.5",{xs:"text-xs [&>*]:text-xs [&>svg]:h-3 [&>svg]:w-3",sm:"text-sm [&>*]:text-sm [&>svg]:h-4 [&>svg]:w-4",md:"text-base [&>*]:text-base [&>svg]:h-5 [&>svg]:w-5"}[s],{neutral:"text-field-label [&>*]:text-field-label",help:"text-field-helper [&>*]:text-field-helper",error:"text-support-error [&>*]:text-support-error",disabled:"text-field-color-disabled disabled cursor-not-allowed [&>*]:text-field-color-disabled"}[f],g,u)},p),r)})),ei=Qo,ti=function(e){var t=e.title,n=void 0===t?null:t,r=e.description,o=void 0===r?null:r,i=e.icon,a=void 0===i?null:i,s=e.iconPosition,l=void 0===s?"right":s,c=e.tag,u=void 0===c?"h2":c,d=e.size,f=void 0===d?"sm":d,m=e.className,h=void 0===m?"":m,p={xs:"gap-1 [&>svg]:size-3.5",sm:"gap-1 [&>svg]:size-4",md:"gap-1.5 [&>svg]:size-5",lg:"gap-1.5 [&>svg]:size-5"};if(!n)return null;var g=function(){var e=u;return React.createElement(e,{className:re("font-semibold p-0 m-0",{xs:"text-base [&>*]:text-base gap-1",sm:"text-lg [&>*]:text-lg gap-1",md:"text-xl [&>*]:text-xl gap-1.5",lg:"text-2xl [&>*]:text-2xl gap-1.5"}[f])},n)};return o?React.createElement("div",{className:h},React.createElement("div",null,a&&"left"===l&&React.createElement("div",{className:re("flex items-center",p[f])},a,g()),a&&"right"===l&&React.createElement("div",{className:re("flex items-center",p[f])},g(),a),!a&&g()),React.createElement("p",{className:re("text-text-secondary font-normal my-0",{xs:"text-sm",sm:"text-sm",md:"text-base",lg:"text-base"}[f])},o)):React.createElement("div",{className:h},a&&"left"===l&&React.createElement("div",{className:re("flex items-center",p[f])},a,g()),a&&"right"===l&&React.createElement("div",{className:re("flex items-center",p[f])},g(),a),!a&&g())};const ni=xe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);var ri=function(e){var t,n,r=e.variant,o=void 0===r?"primary":r,i=e.size,a=void 0===i?"md":i,s=e.icon,l=void 0===s?null:s,c=e.className,u=void 0===c?"":c,d=null===(t={primary:"text-brand-primary-600 bg-background-primary",secondary:"text-background-primary bg-brand-primary-600"})||void 0===t?void 0:t[o],f=null===(n={sm:"[&>svg]:h-4 [&>svg]:w-4",md:"[&>svg]:h-5 [&>svg]:w-5",lg:"[&>svg]:h-6 [&>svg]:w-6",xl:"[&>svg]:h-8 [&>svg]:w-8"})||void 0===n?void 0:n[a];return React.createElement("span",{className:re("flex",f,d,u)},l||React.createElement(ni,{className:"animate-spin"}))},oi=function(e){var t=e.progress,n=void 0===t?0:t,r=e.speed,o=void 0===r?200:r,i=e.className,a=void 0===i?"":i;if(!n)return null;var s=n;n<0&&(s=0),n>100&&(s=100);var l="translateX(-".concat(100-s,"%)"),c="h-2 rounded-full bg-background-brand absolute left-0 top-0 w-full bottom-0 origin-left transition-transform duration-".concat(o," ease-linear");return React.createElement("div",{className:re("h-2 rounded-full bg-misc-progress-background overflow-hidden relative",a),role:"progressbar","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},React.createElement("div",{className:c,style:{transform:l}}))},ii=["slug","text","icon","className","disabled","isFirstChild","isLastChild"];function ai(){return ai=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ai.apply(null,arguments)}var si=(0,s.createContext)(),li=(0,s.forwardRef)((function(e,t){var n=(0,s.useContext)(si),r=e.slug,o=e.text,i=e.icon,a=e.className,c=e.disabled,u=void 0!==c&&c,d=e.isFirstChild,f=e.isLastChild,m=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,ii);if(!n)throw new Error("Button should be used inside Button Group");var h=n.activeItem,p=n.onChange,g=n.size,y=n.iconPosition,v=re("bg-background-primary text-primary cursor-pointer flex items-center justify-center","hover:bg-button-tertiary-hover","focus:outline-none",u?"text-text-disabled cursor-not-allowed":"",{xs:"py-1 px-1 text-sm gap-0.5 [&>svg]:size-4",sm:"py-2 px-2 text-base gap-1 [&>svg]:size-4",md:"py-2.5 px-2.5 text-base gap-1 [&>svg]:size-5"}[g],"border-0 border-r border-border-subtle border-solid",h===r?"bg-button-disabled":"",d?"rounded-tl rounded-bl border-0 border-r border-border-subtle":"",f?"rounded-tr rounded-br border-0":"",a);return l().createElement("button",ai({ref:t,className:v,disabled:u,onClick:function(e){p(e,{slug:r,text:o})}},m),"left"===y&&i&&l().createElement("span",{className:"mr-1"},i),o,"right"===y&&i&&l().createElement("span",{className:"ml-1"},i))}));li.displayName="Button";var ci={Group:function(e){var t=e.children,n=e.activeItem,r=void 0===n?null:n,o=e.onChange,i=e.className,a=e.size,c=void 0===a?"md":a,u=e.iconPosition,d=void 0===u?"left":u,f=(0,s.useCallback)((function(e,t){o&&o({event:e,value:t})}),[o]),m=re("box-border flex border border-border-subtle border-solid rounded",i);return l().createElement("div",{className:m},l().createElement(si.Provider,{value:{activeItem:r,onChange:f,size:c,iconPosition:d}},l().Children.map(t,(function(e,n){if(!(0,s.isValidElement)(e))return null;var r=0===n,o=n===l().Children.count(t)-1;return l().cloneElement(e,{index:n,isFirstChild:r,isLastChild:o})}))))},Button:li},ui=ci;function di(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const fi=e=>Array.isArray(e);function mi(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function hi(e){return"string"==typeof e||Array.isArray(e)}function pi(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function gi(e,t,n,r){if("function"==typeof t){const[o,i]=pi(r);t=t(void 0!==n?n:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=pi(r);t=t(void 0!==n?n:e.custom,o,i)}return t}function yi(e,t,n){const r=e.getProps();return gi(r,t,void 0!==n?n:r.custom,e)}const vi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bi=["initial",...vi],wi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],xi=new Set(wi),_i=e=>1e3*e,Ei=e=>e/1e3,Si={type:"spring",stiffness:500,damping:25,restSpeed:10},ki={type:"keyframes",duration:.8},Ci={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ni=(e,{keyframes:t})=>t.length>2?ki:xi.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Si:Ci;function Pi(e,t){return e[t]||e.default||e}const Ti=e=>null!==e;function Oi(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(Ti),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}const Mi=e=>e,Ri=["read","resolveKeyframes","update","preRender","render","postRender"];function Di(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Ri.reduce(((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(t){i.has(t)&&(l.schedule(t),e()),t(a)}const l={schedule:(e,o=!1,a=!1)=>{const s=a&&r?t:n;return o&&i.add(e),s.has(e)||s.add(e),e},cancel:e=>{n.delete(e),i.delete(e)},process:e=>{a=e,r?o=!0:(r=!0,[t,n]=[n,t],n.clear(),t.forEach(s),r=!1,o&&(o=!1,l.process(e)))}};return l}(i),e)),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=a,m=()=>{const i=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:Ri.reduce(((t,i)=>{const s=a[i];return t[i]=(t,i=!1,a=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(m)),s.schedule(t,i,a)),t}),{}),cancel:e=>{for(let t=0;t<Ri.length;t++)a[Ri[t]].cancel(e)},state:o,steps:a}}const{schedule:Ai,cancel:ji,state:Ii,steps:Fi}=Di("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Mi,!0),Li=e=>/^0[^.\s]+$/u.test(e);let zi=Mi,Bi=Mi;const Wi=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Vi=e=>t=>"string"==typeof t&&t.startsWith(e),Ui=Vi("--"),$i=Vi("var(--"),Hi=e=>!!$i(e)&&Yi.test(e.split("/*")[0].trim()),Yi=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,qi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ki(e,t,n=1){Bi(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=qi.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${null!=n?n:r}`,o]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return Wi(e)?parseFloat(e):e}return Hi(o)?Ki(o,t,n+1):o}const Gi=(e,t,n)=>n>t?t:n<e?e:n,Xi={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Zi={...Xi,transform:e=>Gi(0,1,e)},Ji={...Xi,default:1},Qi=e=>Math.round(1e5*e)/1e5,ea=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,ta=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,na=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function ra(e){return"string"==typeof e}const oa=e=>({test:t=>ra(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),ia=oa("deg"),aa=oa("%"),sa=oa("px"),la=oa("vh"),ca=oa("vw"),ua={...aa,parse:e=>aa.parse(e)/100,transform:e=>aa.transform(100*e)},da=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),fa=e=>e===Xi||e===sa,ma=(e,t)=>parseFloat(e.split(", ")[t]),ha=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return ma(o[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?ma(t[1],e):0}},pa=new Set(["x","y","z"]),ga=wi.filter((e=>!pa.has(e))),ya={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:ha(4,13),y:ha(5,14)};ya.translateX=ya.x,ya.translateY=ya.y;const va=e=>t=>t.test(e),ba=[Xi,sa,aa,ia,ca,la,{test:e=>"auto"===e,parse:e=>e}],wa=e=>ba.find(va(e)),xa=new Set;let _a=!1,Ea=!1;function Sa(){if(Ea){const e=Array.from(xa).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return ga.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}Ea=!1,_a=!1,xa.forEach((e=>e.complete())),xa.clear()}function ka(){xa.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(Ea=!0)}))}class Ca{constructor(e,t,n,r,o,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(xa.add(this),_a||(_a=!0,Ai.read(ka),Ai.resolveKeyframes(Sa))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let o=0;o<e.length;o++)if(null===e[o])if(0===o){const o=null==r?void 0:r.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===o&&r.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),xa.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,xa.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Na=(e,t)=>n=>Boolean(ra(n)&&na.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Pa=(e,t,n)=>r=>{if(!ra(r))return r;const[o,i,a,s]=r.match(ea);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},Ta={...Xi,transform:e=>Math.round((e=>Gi(0,255,e))(e))},Oa={test:Na("rgb","red"),parse:Pa("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ta.transform(e)+", "+Ta.transform(t)+", "+Ta.transform(n)+", "+Qi(Zi.transform(r))+")"},Ma={test:Na("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:Oa.transform},Ra={test:Na("hsl","hue"),parse:Pa("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+aa.transform(Qi(t))+", "+aa.transform(Qi(n))+", "+Qi(Zi.transform(r))+")"},Da={test:e=>Oa.test(e)||Ma.test(e)||Ra.test(e),parse:e=>Oa.test(e)?Oa.parse(e):Ra.test(e)?Ra.parse(e):Ma.parse(e),transform:e=>ra(e)?e:e.hasOwnProperty("red")?Oa.transform(e):Ra.transform(e)},Aa="number",ja="color",Ia=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Fa(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(Ia,(e=>(Da.test(e)?(r.color.push(i),o.push(ja),n.push(Da.parse(e))):e.startsWith("var(")?(r.var.push(i),o.push("var"),n.push(e)):(r.number.push(i),o.push(Aa),n.push(parseFloat(e))),++i,"${}"))).split("${}");return{values:n,split:a,indexes:r,types:o}}function La(e){return Fa(e).values}function za(e){const{split:t,types:n}=Fa(e),r=t.length;return e=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],void 0!==e[i]){const t=n[i];o+=t===Aa?Qi(e[i]):t===ja?Da.transform(e[i]):e[i]}return o}}const Ba=e=>"number"==typeof e?0:e,Wa={test:function(e){var t,n;return isNaN(e)&&ra(e)&&((null===(t=e.match(ea))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(ta))||void 0===n?void 0:n.length)||0)>0},parse:La,createTransformer:za,getAnimatableNone:function(e){const t=La(e);return za(e)(t.map(Ba))}},Va=new Set(["brightness","contrast","saturate","opacity"]);function Ua(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(ea)||[];if(!r)return e;const o=n.replace(r,"");let i=Va.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const $a=/\b([a-z-]*)\(.*?\)/gu,Ha={...Wa,getAnimatableNone:e=>{const t=e.match($a);return t?t.map(Ua).join(" "):e}},Ya={...Xi,transform:Math.round},qa={borderWidth:sa,borderTopWidth:sa,borderRightWidth:sa,borderBottomWidth:sa,borderLeftWidth:sa,borderRadius:sa,radius:sa,borderTopLeftRadius:sa,borderTopRightRadius:sa,borderBottomRightRadius:sa,borderBottomLeftRadius:sa,width:sa,maxWidth:sa,height:sa,maxHeight:sa,size:sa,top:sa,right:sa,bottom:sa,left:sa,padding:sa,paddingTop:sa,paddingRight:sa,paddingBottom:sa,paddingLeft:sa,margin:sa,marginTop:sa,marginRight:sa,marginBottom:sa,marginLeft:sa,rotate:ia,rotateX:ia,rotateY:ia,rotateZ:ia,scale:Ji,scaleX:Ji,scaleY:Ji,scaleZ:Ji,skew:ia,skewX:ia,skewY:ia,distance:sa,translateX:sa,translateY:sa,translateZ:sa,x:sa,y:sa,z:sa,perspective:sa,transformPerspective:sa,opacity:Zi,originX:ua,originY:ua,originZ:sa,zIndex:Ya,backgroundPositionX:sa,backgroundPositionY:sa,fillOpacity:Zi,strokeOpacity:Zi,numOctaves:Ya},Ka={...qa,color:Da,backgroundColor:Da,outlineColor:Da,fill:Da,stroke:Da,borderColor:Da,borderTopColor:Da,borderRightColor:Da,borderBottomColor:Da,borderLeftColor:Da,filter:Ha,WebkitFilter:Ha},Ga=e=>Ka[e];function Xa(e,t){let n=Ga(e);return n!==Ha&&(n=Wa),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Za=new Set(["auto","none","0"]);class Ja extends Ca{constructor(e,t,n,r,o){super(e,t,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&(r=r.trim(),Hi(r))){const o=Ki(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!da.has(n)||2!==e.length)return;const[r,o]=e,i=wa(r),a=wa(o);if(i!==a)if(fa(i)&&fa(a))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)("number"==typeof(r=e[t])?0===r:null===r||"none"===r||"0"===r||Li(r))&&n.push(t);var r;n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!Za.has(t)&&Fa(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=Xa(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ya[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=ya[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}function Qa(e){let t;return()=>(void 0===t&&(t=e()),t)}let es;function ts(){es=void 0}const ns={now:()=>(void 0===es&&ns.set(Ii.isProcessing?Ii.timestamp:performance.now()),es),set:e=>{es=e,queueMicrotask(ts)}},rs=(e,t)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!Wa.test(e)&&"0"!==e||e.startsWith("url(")));class os{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=ns.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(ka(),Sa()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=ns.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:o,delay:i,onComplete:a,onUpdate:s,isGenerator:l}=this.options;if(!l&&!function(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],a=rs(o,t),s=rs(i,t);return zi(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!(!a||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||"spring"===n&&r)}(e,n,r,o)){if(!i)return null==s||s(Oi(e,this.options,t)),null==a||a(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}function is(e,t){return t?e*(1e3/t):0}function as(e,t,n){const r=Math.max(t-5,0);return is(n-e(r),t-r)}const ss=.001;function ls(e,t){return e*Math.sqrt(1-t*t)}const cs=["duration","bounce"],us=["stiffness","damping","mass"];function ds(e,t){return t.some((t=>void 0!==e[t]))}function fs({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],a={done:!1,value:o},{stiffness:s,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:f}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!ds(e,us)&&ds(e,cs)){const n=function({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;zi(e<=_i(10),"Spring duration must be 10 seconds or less");let a=1-t;a=Gi(.05,1,a),e=Gi(.01,10,Ei(e)),a<1?(o=t=>{const r=t*a,o=r*e,i=r-n,s=ls(t,a),l=Math.exp(-o);return ss-i/s*l},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=ls(Math.pow(t,2),a);return(-o(t)+ss>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-ss,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=_i(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...r,velocity:-Ei(r.velocity||0)}),m=d||0,h=l/(2*Math.sqrt(s*c)),p=i-o,g=Ei(Math.sqrt(s/c)),y=Math.abs(p)<5;let v;if(n||(n=y?.01:2),t||(t=y?.005:.5),h<1){const e=ls(g,h);v=t=>{const n=Math.exp(-h*g*t);return i-n*((m+h*g*p)/e*Math.sin(e*t)+p*Math.cos(e*t))}}else if(1===h)v=e=>i-Math.exp(-g*e)*(p+(m+g*p)*e);else{const e=g*Math.sqrt(h*h-1);v=t=>{const n=Math.exp(-h*g*t),r=Math.min(e*t,300);return i-n*((m+h*g*p)*Math.sinh(r)+e*p*Math.cosh(r))/e}}return{calculatedDuration:f&&u||null,next:e=>{const r=v(e);if(f)a.done=e>=u;else{let o=0;h<1&&(o=0===e?_i(m):as(v,e,r));const s=Math.abs(o)<=n,l=Math.abs(i-r)<=t;a.done=s&&l}return a.value=a.done?i:r,a}}}function ms({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},m=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let h=n*t;const p=d+h,g=void 0===a?p:a(p);g!==p&&(h=g-d);const y=e=>-h*Math.exp(-e/r),v=e=>g+y(e),b=e=>{const t=y(e),n=v(e);f.done=Math.abs(t)<=c,f.value=f.done?g:n};let w,x;const _=e=>{(e=>void 0!==s&&e<s||void 0!==l&&e>l)(f.value)&&(w=e,x=fs({keyframes:[f.value,m(f.value)],velocity:as(v,e,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return _(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==w||(t=!0,b(e),_(e)),void 0!==w&&e>=w?x.next(e-w):(!t&&b(e),f)}}}const hs=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function ps(e,t,n,r){return e===t&&n===r?Mi:o=>0===o||1===o?o:hs(function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=hs(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<12);return a}(o,0,1,e,n),t,r)}const gs=ps(.42,0,1,1),ys=ps(0,0,.58,1),vs=ps(.42,0,.58,1),bs=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ws=e=>t=>1-e(1-t),xs=e=>1-Math.sin(Math.acos(e)),_s=ws(xs),Es=bs(xs),Ss=ps(.33,1.53,.69,.99),ks=ws(Ss),Cs=bs(ks),Ns={linear:Mi,easeIn:gs,easeInOut:vs,easeOut:ys,circIn:xs,circInOut:Es,circOut:_s,backIn:ks,backInOut:Cs,backOut:Ss,anticipate:e=>(e*=2)<1?.5*ks(e):.5*(2-Math.pow(2,-10*(e-1)))},Ps=e=>{if(Array.isArray(e)){Bi(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return ps(t,n,r,o)}return"string"==typeof e?(Bi(void 0!==Ns[e],`Invalid easing type '${e}'`),Ns[e]):e},Ts=(e,t)=>n=>t(e(n)),Os=(...e)=>e.reduce(Ts),Ms=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Rs=(e,t,n)=>e+(t-e)*n;function Ds(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function As(e,t){return n=>n>0?t:e}const js=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Is=[Ma,Oa,Ra];function Fs(e){const t=(e=>Is.find((t=>t.test(e))))(e);if(zi(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let n=t.parse(e);return t===Ra&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=Ds(s,r,e+1/3),i=Ds(s,r,e),a=Ds(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}(n)),n}const Ls=(e,t)=>{const n=Fs(e),r=Fs(t);if(!n||!r)return As(e,t);const o={...n};return e=>(o.red=js(n.red,r.red,e),o.green=js(n.green,r.green,e),o.blue=js(n.blue,r.blue,e),o.alpha=Rs(n.alpha,r.alpha,e),Oa.transform(o))},zs=new Set(["none","hidden"]);function Bs(e,t){return n=>Rs(e,t,n)}function Ws(e){return"number"==typeof e?Bs:"string"==typeof e?Hi(e)?As:Da.test(e)?Ls:$s:Array.isArray(e)?Vs:"object"==typeof e?Da.test(e)?Ls:Us:As}function Vs(e,t){const n=[...e],r=n.length,o=e.map(((e,n)=>Ws(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function Us(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=Ws(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const $s=(e,t)=>{const n=Wa.createTransformer(t),r=Fa(e),o=Fa(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?zs.has(e)&&!o.values.length||zs.has(t)&&!r.values.length?function(e,t){return zs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Os(Vs(function(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=null!==(n=e.values[s])&&void 0!==n?n:0;r[i]=l,o[a]++}return r}(r,o),o.values),n):(zi(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),As(e,t))};function Hs(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?Rs(e,t,n):Ws(e)(e,t)}function Ys({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Ps):Ps(r),i={done:!1,value:t[0]},a=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:function(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Ms(0,t,r);e.push(Rs(n,1,o))}}(t,e.length-1),t}(t),e),s=function(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Bi(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];if(2===i&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=function(e,t,n){const r=[],o=n||Hs,i=e.length-1;for(let n=0;n<i;n++){let i=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||Mi:t;i=Os(e,i)}r.push(i)}return r}(t,r,o),s=a.length,l=t=>{let n=0;if(s>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=Ms(e[n],e[n+1],t);return a[n](r)};return n?t=>l(Gi(e[0],e[i-1],t)):l}(a,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map((()=>c||vs)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=s(t),i.done=t>=e,i)}}const qs=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Ai.update(t,!0),stop:()=>ji(t),now:()=>Ii.isProcessing?Ii.timestamp:ns.now()}},Ks={decay:ms,inertia:ms,tween:Ys,keyframes:Ys,spring:fs},Gs=e=>e/100;class Xs extends os{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:o}=this.options,i=(null==r?void 0:r.KeyframeResolver)||Ca;this.resolver=new i(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=this.options,a=Ks[t]||Ys;let s,l;a!==Ys&&"number"!=typeof e[0]&&(s=Os(Gs,Hs(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});"mirror"===o&&(l=a({...this.options,keyframes:[...e].reverse(),velocity:-i})),null===c.calculatedDuration&&(c.calculatedDuration=function(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}(c));const{calculatedDuration:u}=c,d=u+r;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:s,calculatedDuration:u,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:s,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return o.next(0);const{delay:d,repeat:f,repeatType:m,repeatDelay:h,onUpdate:p}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-d*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let v=this.currentTime,b=o;if(f){const e=Math.min(this.currentTime,c)/u;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,f+1),Boolean(t%2)&&("reverse"===m?(n=1-n,h&&(n-=h/u)):"mirror"===m&&(b=i)),v=Gi(0,1,n)*u}const w=y?{done:!1,value:s[0]}:b.next(v);a&&(w.value=a(w.value));let{done:x}=w;y||null===l||(x=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const _=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return _&&void 0!==r&&(w.value=Oi(s,this.options,r)),p&&p(w.value),_&&this.finish(),w}get duration(){const{resolved:e}=this;return e?Ei(e.calculatedDuration):0}get time(){return Ei(this.currentTime)}set time(e){e=_i(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Ei(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=qs,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Zs=new Set(["opacity","clipPath","filter","transform"]),Js=e=>Array.isArray(e)&&"number"==typeof e[0];function Qs(e){return Boolean(!e||"string"==typeof e&&e in tl||Js(e)||Array.isArray(e)&&e.every(Qs))}const el=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,tl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:el([0,.65,.55,1]),circOut:el([.55,0,1,.45]),backIn:el([.31,.01,.66,-.59]),backOut:el([.33,1.53,.69,.99])};function nl(e){return rl(e)||tl.easeOut}function rl(e){return e?Js(e)?el(e):Array.isArray(e)?e.map(nl):tl[e]:void 0}const ol=Qa((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));class il extends os{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:o}=this.options;this.resolver=new Ja(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){var n;let{duration:r=300,times:o,ease:i,type:a,motionValue:s,name:l,startTime:c}=this.options;if(!(null===(n=s.owner)||void 0===n?void 0:n.current))return!1;if("spring"===(u=this.options).type||!Qs(u.ease)){const{onComplete:t,onUpdate:n,motionValue:s,element:l,...c}=this.options,u=function(e,t){const n=new Xs({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<2e4;)r=n.sample(i),o.push(r.value),i+=10;return{times:void 0,keyframes:o,duration:i-10,ease:"linear"}}(e,c);1===(e=u.keyframes).length&&(e[1]=e[0]),r=u.duration,o=u.times,i=u.ease,a="keyframes"}var u;const d=function(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=rl(s);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"})}(s.owner.current,l,e,{...this.options,duration:r,times:o,ease:i});return d.startTime=null!=c?c:this.calcStartTime(),this.pendingTimeline?(d.timeline=this.pendingTimeline,this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:n}=this.options;s.set(Oi(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:o,type:a,ease:i,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return Ei(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return Ei(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=_i(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return Mi;const{animation:n}=t;n.timeline=e,n.onfinish=null}else this.pendingTimeline=e;return Mi}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:o,ease:i,times:a}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:s,element:l,...c}=this.options,u=new Xs({...c,keyframes:n,duration:r,type:o,ease:i,times:a,isGenerator:!0}),d=_i(this.time);e.setWithVelocity(u.sample(d-10).value,u.sample(d).value,10)}const{onStop:s}=this.options;s&&s(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;return ol()&&n&&Zs.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!r&&"mirror"!==o&&0!==i&&"inertia"!==a}}const al=Qa((()=>void 0!==window.ScrollTimeline));class sl{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,t){return Promise.all(this.animations).then(e).catch(t)}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){const t=this.animations.map((t=>{if(!al()||!t.attachTimeline)return t.pause(),function(e,n){let r;const o=()=>{const{currentTime:e}=n,o=(null===e?0:e.value)/100;r!==o&&(e=>{t.time=t.duration*e})(o),r=o};return Ai.update(o,!0),()=>ji(o)}(0,e);t.attachTimeline(e)}));return()=>{t.forEach(((e,t)=>{e&&e(),this.animations[t].stop()}))}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach((t=>t[e]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const ll=(e,t,n,r={},o,i,a)=>s=>{const l=Pi(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u-=_i(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:e=>{t.set(e),l.onUpdate&&l.onUpdate(e)},onComplete:()=>{s(),l.onComplete&&l.onComplete(),a&&a()},onStop:a,name:e,motionValue:t,element:i?void 0:o};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(l)||(d={...d,...Ni(e,d)}),d.duration&&(d.duration=_i(d.duration)),d.repeatDelay&&(d.repeatDelay=_i(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let f=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(f=!0)),f&&!i&&void 0!==t.get()){const e=Oi(d.keyframes,l);if(void 0!==e)return Ai.update((()=>{d.onUpdate(e),d.onComplete()})),new sl([])}return!i&&il.supports(d)?new il(d):new Xs(d)},cl=e=>fi(e)?e[e.length-1]||0:e;function ul(e,t){-1===e.indexOf(t)&&e.push(t)}function dl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class fl{constructor(){this.subscriptions=[]}add(e){return ul(this.subscriptions,e),()=>dl(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ml={current:void 0};class hl{constructor(e,t={}){this.version="11.4.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=ns.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=ns.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new fl);const n=this.events[e].add(t);return"change"===e?()=>{n(),Ai.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return ml.current&&ml.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=ns.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return is(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function pl(e,t){return new hl(e,t)}function gl(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,pl(n))}const yl=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),vl="data-"+yl("framerAppearId");function bl(e){return e.props[vl]}function wl(e){return xi.has(e)?"transform":Zs.has(e)?yl(e):void 0}class xl extends hl{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(e){const t=wl(e);if(!t)return;const n=this.counts.get(t)||0;this.counts.set(t,n+1),0===n&&(this.output.push(t),this.update());let r=!1;return()=>{if(r)return;r=!0;const e=this.counts.get(t)-1;this.counts.set(t,e),0===e&&(dl(this.output,t),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}const _l=e=>Boolean(e&&e.getVelocity);function El(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");return r||(null===(n=e.props.style)||void 0===n?void 0:n.willChange)||(r=new xl("auto"),e.addValue("willChange",r)),o=r,Boolean(_l(o)&&o.add)?r.add(t):void 0;var o}function Sl({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function kl(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const t in l){const r=e.getValue(t,null!==(i=e.latestValues[t])&&void 0!==i?i:null),o=l[t];if(void 0===o||u&&Sl(u,t))continue;const s={delay:n,...Pi(a||{},t)};let d=!1;if(window.MotionHandoffAnimation){const n=bl(e);if(n){const e=window.MotionHandoffAnimation(n,t,Ai);null!==e&&(s.startTime=e,d=!0)}}r.start(ll(t,r,o,e.shouldReduceMotion&&xi.has(t)?{type:!1}:s,e,d,El(e,t)));const f=r.animation;f&&c.push(f)}return s&&Promise.all(c).then((()=>{Ai.update((()=>{s&&function(e,t){const n=yi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const t in i)gl(e,t,cl(i[t]))}(e,s)}))})),c}function Cl(e,t,n={}){var r;const o=yi(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(kl(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=i;return function(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(Nl).forEach(((e,r)=>{e.notify("AnimationStart",t),a.push(Cl(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(a)}(e,t,o+r,a,s,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[a,s]:[s,a];return e().then((()=>t()))}return Promise.all([a(),s(n.delay)])}function Nl(e,t){return e.sortNodePosition(t)}const Pl=[...vi].reverse(),Tl=vi.length;function Ol(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ml(){return{animate:Ol(!0),whileInView:Ol(),whileHover:Ol(),whileTap:Ol(),whileDrag:Ol(),whileFocus:Ol(),exit:Ol()}}class Rl{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Dl=0;const Al={animation:{Feature:class extends Rl{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=function(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>Cl(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=Cl(e,t,n);else{const o="function"==typeof t?yi(e,t,n.custom):t;r=Promise.all(kl(e,o,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}(e),n=Ml(),r=!0;const o=t=>(n,r)=>{var o;const i=yi(e,r,"exit"===t?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function i(i){const a=e.getProps(),s=e.getVariantContext(!0)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<Tl;t++){const h=Pl[t],p=n[h],g=void 0!==a[h]?a[h]:s[h],y=hi(g),v=h===i?p.isActive:null;!1===v&&(d=t);let b=g===s[h]&&g!==a[h]&&y;if(b&&r&&e.manuallyAnimateOnMount&&(b=!1),p.protectedKeys={...u},!p.isActive&&null===v||!g&&!p.prevProp||di(g)||"boolean"==typeof g)continue;let w=(f=p.prevProp,("string"==typeof(m=g)?m!==f:!!Array.isArray(m)&&!mi(m,f))||h===i&&p.isActive&&!b&&y||t>d&&y),x=!1;const _=Array.isArray(g)?g:[g];let E=_.reduce(o(h),{});!1===v&&(E={});const{prevResolvedValues:S={}}=p,k={...S,...E},C=t=>{w=!0,c.has(t)&&(x=!0,c.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in k){const t=E[e],n=S[e];if(u.hasOwnProperty(e))continue;let r=!1;r=fi(t)&&fi(n)?!mi(t,n):t!==n,r?null!=t?C(e):c.add(e):void 0!==t&&c.has(e)?C(e):p.protectedKeys[e]=!0}p.prevProp=g,p.prevResolvedValues=E,p.isActive&&(u={...u,...E}),r&&e.blockInitialAnimation&&(w=!1),!w||b&&!x||l.push(..._.map((e=>({animation:e,options:{type:h}}))))}var f,m;if(c.size){const t={};c.forEach((n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=null!=r?r:null})),l.push({animation:t})}let h=Boolean(l.length);return!r||!1!==a.initial&&a.initial!==a.animate||e.manuallyAnimateOnMount||(h=!1),r=!1,h?t(l):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const a=i(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Ml(),r=!0}}}(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();di(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends Rl{constructor(){super(...arguments),this.id=Dl++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},jl=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function Il(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}function Fl(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ll(e,t,n,r){return Fl(e,t,(e=>t=>jl(t)&&e(t,Il(t)))(n),r)}const zl=(e,t)=>Math.abs(e-t);class Bl{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Ul(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=zl(e.x,t.x),r=zl(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=Ii;this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Wl(t,this.transformPagePoint),Ai.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=Ul("pointercancel"===e.type?this.lastMoveEventInfo:Wl(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!jl(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const i=Wl(Il(e),this.transformPagePoint),{point:a}=i,{timestamp:s}=Ii;this.history=[{...a,timestamp:s}];const{onSessionStart:l}=t;l&&l(e,Ul(i,this.history)),this.removeListeners=Os(Ll(this.contextWindow,"pointermove",this.handlePointerMove),Ll(this.contextWindow,"pointerup",this.handlePointerUp),Ll(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ji(this.updatePoint)}}function Wl(e,t){return t?{point:t(e.point)}:e}function Vl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ul({point:e},t){return{point:e,delta:Vl(e,Hl(t)),offset:Vl(e,$l(t)),velocity:Yl(t,.1)}}function $l(e){return e[0]}function Hl(e){return e[e.length-1]}function Yl(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Hl(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>_i(t)));)n--;if(!r)return{x:0,y:0};const i=Ei(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ql(e){let t=null;return()=>null===t&&(t=e,()=>{t=null})}const Kl=ql("dragHorizontal"),Gl=ql("dragVertical");function Xl(e){let t=!1;if("y"===e)t=Gl();else if("x"===e)t=Kl();else{const e=Kl(),n=Gl();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function Zl(){const e=Xl(!0);return!e||(e(),!1)}function Jl(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Ql(e){return e.max-e.min}function ec(e,t,n,r=.5){e.origin=r,e.originPoint=Rs(t.min,t.max,e.origin),e.scale=Ql(n)/Ql(t),e.translate=Rs(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function tc(e,t,n,r){ec(e.x,t.x,n.x,r?r.originX:void 0),ec(e.y,t.y,n.y,r?r.originY:void 0)}function nc(e,t,n){e.min=n.min+t.min,e.max=e.min+Ql(t)}function rc(e,t,n){e.min=t.min-n.min,e.max=e.min+Ql(t)}function oc(e,t,n){rc(e.x,t.x,n.x),rc(e.y,t.y,n.y)}function ic(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function ac(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const sc=.35;function lc(e,t,n){return{min:cc(e,t),max:cc(e,n)}}function cc(e,t){return"number"==typeof e?e:e[t]||0}const uc=()=>({x:{min:0,max:0},y:{min:0,max:0}});function dc(e){return[e("x"),e("y")]}function fc({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function mc(e){return void 0===e||1===e}function hc({scale:e,scaleX:t,scaleY:n}){return!mc(e)||!mc(t)||!mc(n)}function pc(e){return hc(e)||gc(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function gc(e){return yc(e.x)||yc(e.y)}function yc(e){return e&&"0%"!==e}function vc(e,t,n){return n+t*(e-n)}function bc(e,t,n,r,o){return void 0!==o&&(e=vc(e,o,r)),vc(e,n,r)+t}function wc(e,t=0,n=1,r,o){e.min=bc(e.min,t,n,r,o),e.max=bc(e.max,t,n,r,o)}function xc(e,{x:t,y:n}){wc(e.x,t.translate,t.scale,t.originPoint),wc(e.y,n.translate,n.scale,n.originPoint)}const _c=.999999999999,Ec=1.0000000000001;function Sc(e,t){e.min=e.min+t,e.max=e.max+t}function kc(e,t,n,r,o=.5){wc(e,t,n,Rs(e.min,e.max,o),r)}function Cc(e,t){kc(e.x,t.x,t.scaleX,t.scale,t.originX),kc(e.y,t.y,t.scaleY,t.scale,t.originY)}function Nc(e,t){return fc(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const Pc=({current:e})=>e?e.ownerDocument.defaultView:null,Tc=new WeakMap;class Oc{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new Bl(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Il(e,"page").point)},onStart:(e,t)=>{var n;const{drag:r,dragPropagation:o,onDragStart:i}=this.getProps();if(r&&!o&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Xl(r),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),dc((e=>{let t=this.getAxisMotionValue(e).get()||0;if(aa.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=Ql(r)*(parseFloat(t)/100))}}this.originPoint[e]=t})),i&&Ai.postRender((()=>i(e,t))),null===(n=this.removeWillChange)||void 0===n||n.call(this),this.removeWillChange=El(this.visualElement,"transform");const{animationState:a}=this.visualElement;a&&a.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>dc((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:Pc(this.visualElement)})}stop(e,t){var n;null===(n=this.removeWillChange)||void 0===n||n.call(this);const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=t;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&Ai.postRender((()=>i(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Mc(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?Rs(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Rs(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&Jl(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:ic(e.x,n,o),y:ic(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=sc){return!1===e?e=0:!0===e&&(e=sc),{x:lc(e,"left","right"),y:lc(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&dc((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Jl(e))return!1;const n=e.current;Bi(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=Nc(e,n),{scroll:o}=t;return o&&(Sc(r.x,o.offset.x),Sc(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:ac(e.x,t.x),y:ac(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=fc(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=dc((a=>{if(!Mc(a,t,this.currentDirection))return;let l=s&&s[a]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,d)}));return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(ll(e,n,0,t,this.visualElement,!1,El(this.visualElement,e)))}stopAnimation(){dc((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){dc((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){dc((t=>{const{drag:n}=this.getProps();if(!Mc(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-Rs(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Jl(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};dc((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Ql(e),o=Ql(t);return o>r?n=Ms(t.min,t.max-r,e.min):r>o&&(n=Ms(e.min,e.max-o,t.min)),Gi(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),dc((t=>{if(!Mc(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(Rs(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;Tc.set(this.visualElement,this);const e=Ll(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Jl(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Ai.read(t);const o=Fl(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(dc((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=sc,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function Mc(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Rc=e=>(t,n)=>{e&&Ai.postRender((()=>e(t,n)))};var Dc=n(848);const Ac=(0,s.createContext)(null),jc=(0,s.createContext)({}),Ic=(0,s.createContext)({}),Fc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Lc(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const zc={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!sa.test(e))return e;e=parseFloat(e)}return`${Lc(e,t.target.x)}% ${Lc(e,t.target.y)}%`}},Bc={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Wa.parse(e);if(o.length>5)return r;const i=Wa.createTransformer(e),a="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=Rs(s,l,.5);return"number"==typeof o[2+a]&&(o[2+a]/=c),"number"==typeof o[3+a]&&(o[3+a]/=c),i(o)}},Wc={},{schedule:Vc,cancel:Uc}=Di(queueMicrotask,!1);class $c extends s.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=Yc,Object.assign(Wc,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Fc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||Ai.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Vc.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Hc(e){const[t,n]=function(){const e=(0,s.useContext)(Ac);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=(0,s.useId)();(0,s.useEffect)((()=>r(o)),[]);const i=(0,s.useCallback)((()=>n&&n(o)),[o,n]);return!t&&n?[!1,i]:[!0]}(),r=(0,s.useContext)(jc);return(0,Dc.jsx)($c,{...e,layoutGroup:r,switchLayoutGroup:(0,s.useContext)(Ic),isPresent:t,safeToRemove:n})}const Yc={borderRadius:{...zc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zc,borderTopRightRadius:zc,borderBottomLeftRadius:zc,borderBottomRightRadius:zc,boxShadow:Bc},qc=["TopLeft","TopRight","BottomLeft","BottomRight"],Kc=qc.length,Gc=e=>"string"==typeof e?parseFloat(e):e,Xc=e=>"number"==typeof e||sa.test(e);function Zc(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Jc=eu(0,.5,_s),Qc=eu(.5,.95,Mi);function eu(e,t,n){return r=>r<e?0:r>t?1:n(Ms(e,t,r))}function tu(e,t){e.min=t.min,e.max=t.max}function nu(e,t){tu(e.x,t.x),tu(e.y,t.y)}function ru(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ou(e,t,n,r,o){return e=vc(e-=t,1/n,r),void 0!==o&&(e=vc(e,1/o,r)),e}function iu(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){if(aa.test(t)&&(t=parseFloat(t),t=Rs(a.min,a.max,t/100)-a.min),"number"!=typeof t)return;let s=Rs(i.min,i.max,r);e===i&&(s-=t),e.min=ou(e.min,t,n,s,o),e.max=ou(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const au=["x","scaleX","originX"],su=["y","scaleY","originY"];function lu(e,t,n,r){iu(e.x,t,au,n?n.x:void 0,r?r.x:void 0),iu(e.y,t,su,n?n.y:void 0,r?r.y:void 0)}function cu(e){return 0===e.translate&&1===e.scale}function uu(e){return cu(e.x)&&cu(e.y)}function du(e,t){return e.min===t.min&&e.max===t.max}function fu(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function mu(e,t){return fu(e.x,t.x)&&fu(e.y,t.y)}function hu(e){return Ql(e.x)/Ql(e.y)}function pu(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class gu{constructor(){this.members=[]}add(e){ul(this.members,e),e.scheduleRender()}remove(e){if(dl(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const yu=(e,t)=>e.depth-t.depth;class vu{constructor(){this.children=[],this.isDirty=!1}add(e){ul(this.children,e),this.isDirty=!0}remove(e){dl(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(yu),this.isDirty=!1,this.children.forEach(e)}}function bu(e){const t=_l(e)?e.get():e;return(e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue))(t)?t.toValue():t}const wu={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},xu="undefined"!=typeof window&&void 0!==window.MotionDebug,_u=["","X","Y","Z"],Eu={visibility:"hidden"};let Su=0;function ku(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Cu(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=bl(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ai,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Cu(r)}function Nu({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=Su++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,xu&&(wu.totalNodes=wu.resolvedTargetDeltas=wu.recalculatedProjection=0),this.nodes.forEach(Ou),this.nodes.forEach(Fu),this.nodes.forEach(Lu),this.nodes.forEach(Mu),xu&&window.MotionDebug.record(wu)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new vu)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new fl),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e){const t=ns.now(),n=({timestamp:r})=>{const o=r-t;o>=250&&(ji(n),e(o-250))};return Ai.read(n,!0),()=>ji(n)}(r),Fc.hasAnimatedSinceResize&&(Fc.hasAnimatedSinceResize=!1,this.nodes.forEach(Iu))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&a&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||a.getDefaultTransition()||$u,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!mu(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...Pi(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Iu(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ji(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(zu),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Cu(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Du);this.isUpdating||this.nodes.forEach(Au),this.isUpdating=!1,this.nodes.forEach(ju),this.nodes.forEach(Pu),this.nodes.forEach(Tu),this.clearAllSnapshots();const e=ns.now();Ii.delta=Gi(0,1e3/60,e-Ii.timestamp),Ii.timestamp=e,Ii.isProcessing=!0,Fi.update.process(Ii),Fi.preRender.process(Ii),Fi.render.process(Ii),Ii.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ru),this.sharedNodes.forEach(Bu)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ai.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ai.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!uu(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||pc(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),qu((r=n).x),qu(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!(null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)&&!this.path.some(Gu)){const{scroll:e}=this.root;e&&(Sc(n.x,e.offset.x),Sc(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(nu(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let t=0;t<this.path.length;t++){const r=this.path[t],{scroll:o,options:i}=r;r!==this.root&&o&&i.layoutScroll&&(o.wasRoot&&nu(n,e),Sc(n.x,o.offset.x),Sc(n.y,o.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};nu(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Cc(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),pc(r.latestValues)&&Cc(n,r.latestValues)}return pc(this.latestValues)&&Cc(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};nu(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!pc(n.latestValues))continue;hc(n.latestValues)&&n.updateSnapshot();const r={x:{min:0,max:0},y:{min:0,max:0}};nu(r,n.measurePageBox()),lu(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return pc(this.latestValues)&&lu(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ii.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=Ii.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},oc(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),nu(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var a,s,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),a=this.target,s=this.relativeTarget,l=this.relativeParent.target,nc(a.x,s.x,l.x),nc(a.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):nu(this.target,this.layout.layoutBox),xc(this.target,this.targetDelta)):nu(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},oc(this.relativeTargetOrigin,this.target,e.target),nu(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}xu&&wu.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!hc(this.parent.latestValues)&&!gc(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Ii.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;nu(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,a;t.x=t.y=1;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const{visualElement:o}=i.options;o&&o.props.style&&"contents"===o.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Cc(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,xc(e,a)),r&&pc(i.latestValues)&&Cc(e,i.latestValues))}t.x<Ec&&t.x>_c&&(t.x=1),t.y<Ec&&t.y>_c&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(ru(this.prevProjectionDelta.x,this.projectionDelta.x),ru(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),tc(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===a&&this.treeScale.y===s&&pu(this.projectionDelta.x,this.prevProjectionDelta.x)&&pu(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),xu&&wu.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(s&&!c&&!0===this.options.crossfade&&!this.path.some(Uu));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,f,m,h,p,g;Wu(i.x,e.x,n),Wu(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(oc(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),m=this.relativeTarget,h=this.relativeTargetOrigin,p=a,g=n,Vu(m.x,h.x,p.x,g),Vu(m.y,h.y,p.y,g),d&&(l=this.relativeTarget,f=d,du(l.x,f.x)&&du(l.y,f.y))&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),nu(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=Rs(0,void 0!==n.opacity?n.opacity:1,Jc(r)),e.opacityExit=Rs(void 0!==t.opacity?t.opacity:1,0,Qc(r))):i&&(e.opacity=Rs(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<Kc;o++){const i=`border${qc[o]}Radius`;let a=Zc(t,i),s=Zc(n,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||Xc(a)===Xc(s)?(e[i]=Math.max(Rs(Gc(a),Gc(s),r),0),(aa.test(s)||aa.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=Rs(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ji(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ai.update((()=>{Fc.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=_l(0)?0:pl(0);return r.start(ll("",r,1e3,n)),r.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Ku(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Ql(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Ql(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}nu(t,n),Cc(t,o),tc(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new gu),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&ku("z",e,r,this.animationValues);for(let t=0;t<_u.length;t++)ku(`rotate${_u[t]}`,e,r,this.animationValues),ku(`skew${_u[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Eu;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=bu(null==e?void 0:e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=bu(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!pc(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const a=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(null==n?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:a,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),a&&(r+=`skewX(${a}deg) `),s&&(r+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,a),o&&(r.transform=o(a,r.transform));const{x:s,y:l}=this.projectionDelta;r.transformOrigin=`${100*s.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=a.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:r.opacity=i===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const e in Wc){if(void 0===a[e])continue;const{correct:t,applyTo:n}=Wc[e],o="none"===r.transform?a[e]:t(a[e],i);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=o}else r[e]=o}return this.options.layoutId&&(r.pointerEvents=i===this?bu(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Du),this.root.sharedNodes.clear()}}}function Pu(e){e.updateLayout()}function Tu(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?dc((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=Ql(r);r.min=t[e].min,r.max=r.min+o})):Ku(o,n.layoutBox,t)&&dc((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],a=Ql(t[r]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)}));const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};tc(a,t,n.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?tc(s,e.applyTransform(r,!0),n.measuredBox):tc(s,t,n.layoutBox);const l=!uu(a);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const a={x:{min:0,max:0},y:{min:0,max:0}};oc(a,n.layoutBox,o.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};oc(s,t,i.layoutBox),mu(a,s)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Ou(e){xu&&wu.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Mu(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ru(e){e.clearSnapshot()}function Du(e){e.clearMeasurements()}function Au(e){e.isLayoutDirty=!1}function ju(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Iu(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Fu(e){e.resolveTargetDelta()}function Lu(e){e.calcProjection()}function zu(e){e.resetSkewAndRotation()}function Bu(e){e.removeLeadSnapshot()}function Wu(e,t,n){e.translate=Rs(t.translate,0,n),e.scale=Rs(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Vu(e,t,n,r){e.min=Rs(t.min,n.min,r),e.max=Rs(t.max,n.max,r)}function Uu(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const $u={duration:.45,ease:[.4,0,.1,1]},Hu=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Yu=Hu("applewebkit/")&&!Hu("chrome/")?Math.round:Mi;function qu(e){e.min=Yu(e.min),e.max=Yu(e.max)}function Ku(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=hu(t),o=hu(n),!(Math.abs(r-o)<=.2));var r,o}function Gu(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Xu=Nu({attachResizeListener:(e,t)=>Fl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Zu={current:void 0},Ju=Nu({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Zu.current){const e=new Xu({});e.mount(window),e.setOptions({layoutScroll:!0}),Zu.current=e}return Zu.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Qu={pan:{Feature:class extends Rl{constructor(){super(...arguments),this.removePointerDownListener=Mi}onPointerDown(e){this.session=new Bl(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Pc(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Rc(e),onStart:Rc(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Ai.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=Ll(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Rl{constructor(e){super(e),this.removeGroupControls=Mi,this.removeListeners=Mi,this.controls=new Oc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Mi}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Ju,MeasureLayout:Hc}};function ed(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd";return Ll(e.current,n,((n,o)=>{if("touch"===n.pointerType||Zl())return;const i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t);const a=i[r];a&&Ai.postRender((()=>a(n,o)))}),{passive:!e.getProps()[r]})}const td=(e,t)=>!!t&&(e===t||td(e,t.parentElement));function nd(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Il(n))}const rd=new WeakMap,od=new WeakMap,id=e=>{const t=rd.get(e.target);t&&t(e)},ad=e=>{e.forEach(id)},sd={some:0,all:1},ld={inView:{Feature:class extends Rl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:sd[r]};return function(e,t,n){const r=function({root:e,...t}){const n=e||document;od.has(n)||od.set(n,{});const r=od.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(ad,{root:e,...t})),r[o]}(t);return rd.set(e,n),r.observe(e),()=>{rd.delete(e),r.unobserve(e)}}(this.node.current,i,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Rl{constructor(){super(...arguments),this.removeStartListeners=Mi,this.removeEndListeners=Mi,this.removeAccessibleListeners=Mi,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),r=Ll(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r,globalTapTarget:o}=this.node.getProps(),i=o||td(this.node.current,e.target)?n:r;i&&Ai.update((()=>i(e,t)))}),{passive:!(n.onTap||n.onPointerUp)}),o=Ll(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Os(r,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=Fl(this.node.current,"keydown",(e=>{"Enter"!==e.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=Fl(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&nd("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&Ai.postRender((()=>n(e,t)))}))})),nd("down",((e,t)=>{this.startPress(e,t)})))})),t=Fl(this.node.current,"blur",(()=>{this.isPressing&&nd("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=Os(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Ai.postRender((()=>n(e,t)))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Zl()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Ai.postRender((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=Ll(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=Fl(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Os(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Rl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Os(Fl(this.node.current,"focus",(()=>this.onFocus())),Fl(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Rl{mount(){this.unmount=Os(ed(this.node,!0),ed(this.node,!1))}unmount(){}}}},cd={layout:{ProjectionNode:Ju,MeasureLayout:Hc}},ud=(0,s.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),dd=(0,s.createContext)({}),fd="undefined"!=typeof window,md=fd?s.useLayoutEffect:s.useEffect,hd=(0,s.createContext)({strict:!1});let pd=!1;function gd(e,t,n,r,o){var i;const{visualElement:a}=(0,s.useContext)(dd),l=(0,s.useContext)(hd),c=(0,s.useContext)(Ac),u=(0,s.useContext)(ud).reducedMotion,d=(0,s.useRef)();r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:u}));const f=d.current,m=(0,s.useContext)(Ic);!f||f.projection||!o||"html"!==f.type&&"svg"!==f.type||function(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:vd(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:Boolean(a)||s&&Jl(s),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}(d.current,n,o,m),(0,s.useInsertionEffect)((()=>{f&&f.update(n,c)}));const h=n[vl],p=(0,s.useRef)(Boolean(h)&&!window.MotionHandoffIsComplete&&(null===(i=window.MotionHasOptimisedAnimation)||void 0===i?void 0:i.call(window,h)));return md((()=>{f&&(f.updateFeatures(),Vc.render(f.render),p.current&&f.animationState&&f.animationState.animateChanges())})),(0,s.useEffect)((()=>{f&&(!p.current&&f.animationState&&f.animationState.animateChanges(),p.current=!1,pd||(pd=!0,queueMicrotask(yd)))})),f}function yd(){window.MotionHandoffIsComplete=!0}function vd(e){if(e)return!1!==e.options.allowProjection?e.projection:vd(e.parent)}function bd(e,t,n){return(0,s.useCallback)((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):Jl(n)&&(n.current=r))}),[t])}function wd(e){return di(e.animate)||bi.some((t=>hi(e[t])))}function xd(e){return Boolean(wd(e)||e.variants)}function _d(e){return Array.isArray(e)?e.join(" "):e}const Ed={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Sd={};for(const e in Ed)Sd[e]={isEnabled:t=>Ed[e].some((e=>!!t[e]))};const kd=Symbol.for("motionComponentSymbol");function Cd({layoutId:e}){const t=(0,s.useContext)(jc).id;return t&&void 0!==e?t+"-"+e:e}const Nd=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Pd(e){return"string"==typeof e&&!e.includes("-")&&!!(Nd.indexOf(e)>-1||/[A-Z]/u.test(e))}function Td(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const Od=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Md(e,t,n,r){Td(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Od.has(n)?n:yl(n),t.attrs[n])}function Rd(e,{layout:t,layoutId:n}){return xi.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Wc[e]||"opacity"===e)}function Dd(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(_l(o[a])||t.style&&_l(t.style[a])||Rd(a,e)||void 0!==(null===(r=null==n?void 0:n.getValue(a))||void 0===r?void 0:r.liveStyle))&&(i[a]=o[a]);return n&&o&&"string"==typeof o.willChange&&(n.applyWillChange=!1),i}function Ad(e,t,n){const r=Dd(e,t,n);for(const n in e)(_l(e[n])||_l(t[n]))&&(r[-1!==wi.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}function jd(e){const t=(0,s.useRef)(null);return null===t.current&&(t.current=e()),t.current}const Id=e=>(t,n)=>{const r=(0,s.useContext)(dd),o=(0,s.useContext)(Ac),i=()=>function({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,i,a,s){const l={latestValues:zd(o,i,a,!s&&e,t),renderState:n()};return r&&(l.mount=e=>r(o,e,l)),l}(e,t,r,o,n);return n?i():jd(i)};function Fd(e,t){const n=wl(t);n&&ul(e,n)}function Ld(e,t,n){const r=Array.isArray(t)?t:[t];for(let t=0;t<r.length;t++){const o=gi(e,r[t]);if(o){const{transitionEnd:e,transition:t,...r}=o;n(r,e)}}}function zd(e,t,n,r,o){var i;const a={},s=[],l=r&&void 0===(null===(i=e.style)||void 0===i?void 0:i.willChange),c=o(e,{});for(const e in c)a[e]=bu(c[e]);let{initial:u,animate:d}=e;const f=wd(e),m=xd(e);t&&m&&!f&&!1!==e.inherit&&(void 0===u&&(u=t.initial),void 0===d&&(d=t.animate));let h=!!n&&!1===n.initial;h=h||!1===u;const p=h?d:u;return p&&"boolean"!=typeof p&&!di(p)&&Ld(e,p,((e,t)=>{for(const t in e){let n=e[t];Array.isArray(n)&&(n=n[h?n.length-1:0]),null!==n&&(a[t]=n)}for(const e in t)a[e]=t[e]})),l&&(d&&!1!==u&&!di(d)&&Ld(e,d,(e=>{for(const t in e)Fd(s,t)})),s.length&&(a.willChange=s.join(","))),a}const Bd=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Wd=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Vd=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Ud={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$d=wi.length;function Hd(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const e in t){const n=t[e];if(xi.has(e))a=!0;else if(Ui(e))o[e]=n;else{const t=Vd(n,qa[e]);e.startsWith("origin")?(s=!0,i[e]=t):r[e]=t}}if(t.transform||(a||n?r.transform=function(e,t,n){let r="",o=!0;for(let i=0;i<$d;i++){const a=wi[i],s=e[a];if(void 0===s)continue;let l=!0;if(l="number"==typeof s?s===(a.startsWith("scale")?1:0):0===parseFloat(s),!l||n){const e=Vd(s,qa[a]);l||(o=!1,r+=`${Ud[a]||a}(${e}) `),n&&(t[a]=e)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=i;r.transformOrigin=`${e} ${t} ${n}`}}function Yd(e,t,n){return"string"==typeof e?e:sa.transform(t+n*e)}const qd={offset:"stroke-dashoffset",array:"stroke-dasharray"},Kd={offset:"strokeDashoffset",array:"strokeDasharray"};function Gd(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(Hd(e,c,d),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:f,style:m,dimensions:h}=e;f.transform&&(h&&(m.transform=f.transform),delete f.transform),h&&(void 0!==o||void 0!==i||m.transform)&&(m.transformOrigin=function(e,t,n){return`${Yd(t,e.x,e.width)} ${Yd(n,e.y,e.height)}`}(h,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(f.x=t),void 0!==n&&(f.y=n),void 0!==r&&(f.scale=r),void 0!==a&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?qd:Kd;e[i.offset]=sa.transform(-r);const a=sa.transform(t),s=sa.transform(n);e[i.array]=`${a} ${s}`}(f,a,s,l,!1)}const Xd=e=>"string"==typeof e&&"svg"===e.toLowerCase(),Zd={useVisualState:Id({scrapeMotionValuesFromProps:Ad,createRenderState:Wd,onMount:(e,t,{renderState:n,latestValues:r})=>{Ai.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}})),Ai.render((()=>{Gd(n,r,Xd(t.tagName),e.transformTemplate),Md(t,n)}))}})},Jd={useVisualState:Id({applyWillChange:!0,scrapeMotionValuesFromProps:Dd,createRenderState:Bd})};function Qd(e,t,n){for(const r in t)_l(t[r])||Rd(r,n)||(e[r]=t[r])}function ef(e,t){const n={},r=function(e,t){const n={};return Qd(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return(0,s.useMemo)((()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Hd(n,t,e),Object.assign({},n.vars,n.style)}),[t])}(e,t)),n}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const tf=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function nf(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||tf.has(e)}let rf=e=>!nf(e);try{(of=n(316).A)&&(rf=e=>e.startsWith("on")?!nf(e):of(e))}catch(e){}var of;function af(e,t,n,r){const o=(0,s.useMemo)((()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Gd(n,t,Xd(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};Qd(t,e.style,e),o.style={...t,...o.style}}return o}function sf(e=!1){return(t,n,r,{latestValues:o},i)=>{const a=(Pd(t)?af:ef)(n,o,i,t),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(rf(o)||!0===n&&nf(o)||!t&&!nf(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),c=t!==s.Fragment?{...l,...a,ref:r}:{},{children:u}=n,d=(0,s.useMemo)((()=>_l(u)?u.get():u),[u]);return(0,s.createElement)(t,{...c,children:d})}}const lf={current:null},cf={current:!1},uf=new WeakMap,df=[...ba,Da,Wa],ff=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],mf=bi.length;class hf{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},a={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ca,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,Ai.render(this.render,!1,!0))};const{latestValues:s,renderState:l}=i;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=wd(t),this.isVariantNode=xd(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in u){const t=u[e];void 0!==s[e]&&_l(t)&&t.set(s[e],!1)}}mount(e){this.current=e,uf.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),cf.current||function(){if(cf.current=!0,fd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>lf.current=e.matches;e.addListener(t),t()}else lf.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||lf.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){uf.delete(this.current),this.projection&&this.projection.unmount(),ji(this.notifyUpdate),ji(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=xi.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Ai.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{r(),o(),i&&i(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Sd){const t=Sd[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<ff.length;t++){const n=ff[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],i=n[r];if(_l(o))e.addValue(r,o);else if(_l(i))e.addValue(r,pl(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,pl(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const t={};for(let e=0;e<mf;e++){const n=bi[e],r=this.props[n];(hi(r)||!1===r)&&(t[n]=r)}return t}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=pl(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(Wi(r)||Li(r))?r=parseFloat(r):!(e=>df.find(va(e)))(r)&&Wa.test(t)&&(r=Xa(e,t)),this.setBaseTarget(e,_l(r)?r.get():r)),_l(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=gi(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||_l(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new fl),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class pf extends hf{constructor(){super(...arguments),this.KeyframeResolver=Ja}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}}class gf extends pf{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Td}readValueFromInstance(e,t){if(xi.has(t)){const e=Ga(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=(Ui(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Nc(e,t)}build(e,t,n){Hd(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Dd(e,t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;_l(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}class yf extends pf{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=uc}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(xi.has(t)){const e=Ga(t);return e&&e.default||0}return t=Od.has(t)?t:yl(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Ad(e,t,n)}build(e,t,n){Gd(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){Md(e,t,0,r)}mount(e){this.isSVGTag=Xd(e.tagName),super.mount(e)}}const vf=function(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy(e,{get:(n,r)=>(t.has(r)||t.set(r,e(r)),t.get(r))})}(function(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return function({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&function(e){for(const t in e)Sd[t]={...Sd[t],...e[t]}}(e);const i=(0,s.forwardRef)((function(e,i){let a;const l={...(0,s.useContext)(ud),...e,layoutId:Cd(e)},{isStatic:c}=l,u=function(e){const{initial:t,animate:n}=function(e,t){if(wd(e)){const{initial:t,animate:n}=e;return{initial:!1===t||hi(t)?t:void 0,animate:hi(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,s.useContext)(dd));return(0,s.useMemo)((()=>({initial:t,animate:n})),[_d(t),_d(n)])}(e),d=r(e,c);if(!c&&fd){(0,s.useContext)(hd).strict;const e=function(e){const{drag:t,layout:n}=Sd;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(l);a=e.MeasureLayout,u.visualElement=gd(o,d,l,t,e.ProjectionNode)}return(0,Dc.jsxs)(dd.Provider,{value:u,children:[a&&u.visualElement?(0,Dc.jsx)(a,{visualElement:u.visualElement,...l}):null,n(o,e,bd(d,u.visualElement,i),d,c,u.visualElement)]})}));return i[kd]=o,i}({...Pd(n)?Zd:Jd,preloadedFeatures:e,useRender:sf(r),createVisualElement:t,Component:n})}}({...Al,...ld,...Qu,...cd},((e,t)=>Pd(e)?new yf(t):new gf(t,{allowProjection:e!==s.Fragment}))));var bf=["slug","text","icon","className","disabled","badge"];function wf(){return wf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wf.apply(null,arguments)}var xf=(0,s.createContext)(),_f=function(e){var t,n=e.children,r=e.activeItem,o=void 0===r?null:r,i=e.onChange,a=e.className,c=e.size,u=void 0===c?"sm":c,d=e.orientation,f=void 0===d?"horizontal":d,m=e.variant,h=void 0===m?"pill":m,p=e.iconPosition,g=void 0===p?"left":p,y=e.width,v=void 0===y?"full":y,b=(0,s.useCallback)((function(e,t){i&&i({event:e,value:t})}),[i]),w="rounded-full",x="p-1",_="ring-1 ring-tab-border";"vertical"===f?t="gap-0.5":"rounded"!==h&&"pill"!==h||("xs"===u||"sm"===u?t="gap-0.5":"md"!==u&&"lg"!==u||(t="gap-1")),"rounded"===h||"vertical"===f?w="rounded-md":"underline"===h&&(w="rounded-none",x="p-0",_="border-t-0 border-r-0 border-l-0 border-b border-solid border-tab-border","xs"===u?t="gap-0":"sm"===u?t="gap-2.5":"md"!==u&&"lg"!==u||(t="gap-3"));var E="vertical"===f?"flex-col":"",S="box-border [&>*]:box-border flex items-center ".concat("full"===v?"w-full":""," ").concat(E),k=re(S,w,x,t,_,"underline"!==h?"bg-tab-background":"",a);return l().createElement("div",{className:k},l().createElement(xf.Provider,{value:{activeItem:o,onChange:b,size:u,variant:h,orientation:f,iconPosition:g,width:v}},l().Children.map(n,(function(e){return(0,s.isValidElement)(e)?l().cloneElement(e):null}))))};_f.displayName="Tabs.Group";var Ef=(0,s.forwardRef)((function(e,t){var n=(0,s.useContext)(xf),r=e.slug,o=e.text,i=e.icon,a=e.className,c=e.disabled,u=void 0!==c&&c,d=e.badge,f=void 0===d?null:d,m=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,bf);if(!n)throw new Error("Tab should be used inside Tabs Group");var h=n.activeItem,p=n.onChange,g=n.size,y=n.variant,v=n.orientation,b=n.iconPosition,w=n.width,x={xs:"px-1.5 py-0.5 text-xs [&_svg]:size-3",sm:"underline"===y?"py-1.5 text-sm [&_svg]:size-4":"px-3 py-1.5 text-sm [&_svg]:size-4",md:"underline"===y?"py-2 text-base [&_svg]:size-5":"px-3.5 py-1.5 text-base [&_svg]:size-5",lg:"underline"===y?"p-2.5 text-lg [&_svg]:size-6":"px-3.5 py-1.5 text-lg [&_svg]:size-6"}[g],_=re("relative border-none bg-transparent text-text-secondary cursor-pointer flex items-center justify-center transition-[box-shadow,color,background-color] duration-200","full"===w?"flex-1":"","vertical"===v?"w-full justify-between":""),E="rounded-full";"rounded"===y?E="rounded-md":"underline"===y&&(E="rounded-none");var S=re(_,"border-none",E,"hover:text-text-primary group","focus:outline-none",u?"text-text-disabled cursor-not-allowed":"",x,h===r?"bg-background-primary text-text-primary shadow-sm":"",a);return l().createElement("button",wf({ref:t,className:S,disabled:u,onClick:function(e){p(e,{slug:r,text:o})}},m),h===r&&"underline"===y&&l().createElement(vf.span,{layoutId:"underline",className:"absolute right-0 left-0 -bottom-px h-px bg-border-interactive"}),l().createElement("span",{className:"flex items-center gap-1"},"left"===b&&i&&l().createElement("span",{className:"mr-1 contents center-center group-hover:text-text-primary"},i),o,"right"===b&&i&&l().createElement("span",{className:"ml-1 contents center-center group-hover:text-text-primary"},i)),f&&(0,s.isValidElement)(f)&&f)}));Ef.displayName="Tabs.Tab";var Sf={Group:_f,Tab:Ef};const kf=xe("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),Cf=xe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Nf=xe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);var Pf={sm:{icon:"[&>svg]:size-4",searchIcon:"[&>svg]:size-4",selectButton:"px-2.5 py-2 rounded text-sm font-medium leading-4 min-h-[2rem]",multiSelect:"pl-2 pr-2 py-1.5",displaySelected:"text-sm font-normal",dropdown:"rounded-md",dropdownItemsWrapper:"p-1.5",searchbarWrapper:"p-3 flex items-center gap-0.5",searchbar:"font-medium text-sm",searchbarIcon:"[&>svg]:size-4",label:"text-sm font-medium"},md:{icon:"[&>svg]:size-5",searchIcon:"[&>svg]:size-5",selectButton:"px-3.5 py-2.5 rounded-md text-xs font-medium leading-4 min-h-[2.5rem]",multiSelect:"pl-2 pr-2.5 py-2",displaySelected:"text-sm font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"[&>svg]:size-5",label:"text-sm font-medium"},lg:{icon:"[&>svg]:size-6",searchIcon:"[&>svg]:size-5",selectButton:"px-4 py-3 rounded-lg text-sm font-medium leading-5 min-h-[3rem]",multiSelect:"pl-2.5 pr-3 py-2.5",displaySelected:"text-base font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"[&>svg]:size-5",label:"text-base font-medium"}},Tf="group-disabled:text-field-color-disabled",Of=["value","selected","children","className"];function Mf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||Af(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rf(){return Rf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rf.apply(null,arguments)}function Df(e){return function(e){if(Array.isArray(e))return jf(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Af(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Af(e,t){if(e){if("string"==typeof e)return jf(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jf(e,t):void 0}}function jf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function If(e){return If="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},If(e)}function Ff(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ff(Object(n),!0).forEach((function(t){zf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ff(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function zf(e,t,n){return(t=function(e){var t=function(e){if("object"!=If(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=If(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==If(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bf=(0,s.createContext)(),Wf=function(){return(0,s.useContext)(Bf)};function Vf(e){var t,n,r,o=e.children,i=e.icon,a=void 0===i?null:i,l=e.placeholder,c=void 0===l?"Select an option":l,u=e.optionIcon,d=void 0===u?null:u,f=e.displayBy,m=void 0===f?"name":f,h=e.label,p=e.className,g=Wf(),y=g.sizeValue,v=g.getReferenceProps,b=g.getValues,w=g.selectId,x=g.refs,_=g.isOpen,E=g.multiple,S=g.combobox,k=g.setSelected,C=g.onChange,N=g.isControlled,P=g.disabled,T=g.by,O=null===(t={sm:"xs",md:"sm",lg:"md"})||void 0===t?void 0:t[y],M=(0,s.useCallback)((function(){if(a)return a;var e="text-field-placeholder group-disabled:text-icon-disabled";return S?React.createElement(kf,{className:e}):React.createElement(Cf,{className:e})}),[a]),R=(0,s.useCallback)((function(){var e=b();if(!e)return null;if("function"==typeof o){var t=Lf({value:e},E?{onClose:D}:{});return o(t)}if(E)return e.map((function(e,t){return React.createElement(Fo,{icon:d,type:"rounded",key:t,size:O,onMouseDown:D(e),label:"object"===If(e)?e[m]:e,closable:!0,disabled:P})}));var n="object"===If(e)?e[m]:e;return(0,s.isValidElement)(o)&&(n=o),React.createElement("span",{className:re("truncate",Pf[y].displaySelected,Tf)},n)}),[b]),D=function(e){return function(t){var n;null==t||t.preventDefault(),null==t||t.stopPropagation();var r=Df(null!==(n=b())&&void 0!==n?n:[]),o=r.findIndex((function(t){return"object"===If(t)?t[T]===e[T]:t===e}));-1!==o&&(r.splice(o,1),N||k(r),"function"==typeof C&&C(r))}};return React.createElement("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border"},!!h&&React.createElement("label",{className:re(null===(n=Pf[y])||void 0===n?void 0:n.label,"text-field-label"),htmlFor:w},h),React.createElement("button",Rf({id:w,ref:x.setReference,className:re("flex items-center justify-between w-full box-border transition-colors duration-150 bg-white","outline outline-1 outline-field-border border-none",!_&&"focus:ring-2 focus:ring-offset-4 focus:outline-focus-border focus:ring-focus [&:hover:not(:focus):not(:disabled)]:outline-border-strong",Pf[y].selectButton,E&&Pf[y].multiSelect,"group disabled:outline-field-border-disabled [&:hover:has(:disabled)]:outline-field-border-disabled",p),"aria-labelledby":"select-label",tabIndex:0,disabled:P},v()),React.createElement("div",{className:re("flex-1 grid items-center justify-start gap-1.5 overflow-hidden",b()&&"flex flex-wrap")},R(),(E?!(null!==(r=b())&&void 0!==r&&r.length):!b())&&React.createElement("div",{className:re("[grid-area:1/1/2/3] text-field-input px-1",Pf[y].displaySelected,Tf)},c)),React.createElement("div",{className:re("flex items-center [&>svg]:shrink-0",Pf[y].icon)},M())))}function Uf(e){var t=e.children,n=e.searchBy,r=void 0===n?"id":n,o=e.searchPlaceholder,i=void 0===o?"Search...":o,a=e.dropdownPortalRoot,l=void 0===a?null:a,c=e.dropdownPortalId,u=void 0===c?"":c,d=e.className,f=Wf(),m=f.isOpen,h=f.context,p=f.refs,g=f.combobox,y=f.floatingStyles,v=f.getFloatingProps,b=f.sizeValue,w=f.setSearchKeyword,x=f.setActiveIndex,_=f.setSelectedIndex,E=f.value,S=f.selected,k=f.getValues,C=f.searchKeyword,N=f.listContentRef,P=f.by,T=(0,s.useMemo)((function(){var e=k(),n=0;return e&&(n=s.Children.toArray(t).findIndex((function(t){return"object"===If(t.props.value)?t.props.value[P]===e[P]:t.props.value===e}))),-1===n?0:n}),[E,S,t]);(0,s.useLayoutEffect)((function(){x(T),_(T)}),[]);var O=(0,s.useMemo)((function(){return s.Children.map(t,(function(e,t){if(!(0,s.isValidElement)(e))return null;if(C){var n=e.props.value;if("object"===If(n)){if(-1===n[r].toLowerCase().indexOf(C.toLowerCase()))return null}else if(-1===n.toLowerCase().indexOf(C.toLowerCase()))return null}return(0,s.cloneElement)(e,Lf(Lf({},e.props),{},{index:t}))}))}),[C,E,S,t]),M=s.Children.count(O);return(0,s.useEffect)((function(){N.current=[],s.Children.forEach(t,(function(e){if((0,s.isValidElement)(e)&&e.props.value){if(C){var t=e.props.value;if("object"===If(t)){if(-1===t[r].toLowerCase().indexOf(C.toLowerCase()))return}else if(-1===t.toLowerCase().indexOf(C.toLowerCase()))return}N.current.push(e.props.value)}}))}),[C]),React.createElement(React.Fragment,null,m&&React.createElement(Cr,{id:u,root:l},React.createElement(Ar,{context:h,modal:!1},React.createElement("div",Rf({ref:p.setFloating,className:re("box-border [&_*]:box-border w-full bg-white outline-none shadow-lg outline outline-1 outline-border-subtle",g&&"grid grid-cols-1 grid-rows-[auto_1fr] divide-y divide-x-0 divide-solid divide-border-subtle",Pf[b].dropdown,!g&&"h-auto",g?"overflow-hidden":"overflow-y-auto",d),style:Lf({},y)},v()),g&&React.createElement("div",{className:re(Pf[b].searchbarWrapper)},React.createElement(Nf,{className:re("text-icon-secondary shrink-0",Pf[b].searchbarIcon)}),React.createElement("input",{className:re("px-1 w-full placeholder:text-field-placeholder border-0 focus:outline-none focus:shadow-none",Pf[b].searchbar),type:"search",name:"keyword",placeholder:i,onChange:function(e){return w(e.target.value)},autoComplete:"off"})),React.createElement("div",{className:re("overflow-y-auto",!g&&"w-full h-full",Pf[b].dropdownItemsWrapper)},!!M&&O,!M&&React.createElement("div",{className:"p-2 text-center text-base font-medium text-field-placeholder"},"No items found"))))))}function $f(e){var t=e.value,n=e.selected,r=e.children,o=e.className,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Of),a=Wf(),l=a.sizeValue,c=a.getItemProps,u=a.onKeyDownItem,d=a.onClickItem,f=a.activeIndex,m=a.selectedIndex,h=a.updateListRef,p=a.getValues,g=a.by,y=a.multiple,v=i.index,b=(0,s.useMemo)((function(){if(!y)return!1;var e=p();return!!e&&e.some((function(e){return"object"===If(e)?e[g]===t[g]:e===t}))}),[t,p]),w=(0,s.useMemo)((function(){return"boolean"==typeof n?n:y?b:v===m}),[b,m,n]);return React.createElement("div",Rf({className:re("w-full flex items-center justify-between text-text-primary hover:bg-button-tertiary-hover rounded-md transition-all duration-150 cursor-pointer focus:outline-none focus-within:outline-none outline-none",{sm:"py-1.5 px-2 text-sm font-normal",md:"p-2 text-sm font-normal",lg:"p-2 text-base font-normal"}[l],v===f&&"bg-button-tertiary-hover",o),ref:function(e){h(v,e)},role:"option",tabIndex:v===f?0:-1,"aria-selected":w&&v===f},c({onClick:function(){d(v,t)},onKeyDown:function(e){u(e,v,t)}})),React.createElement("span",{className:"w-full truncate"},r),w&&React.createElement(Ee,{className:re("text-icon-on-color-disabled",{sm:"size-4",md:"size-4",lg:"size-5"}[l])}))}Vf.displayName="Select.Button",Uf.displayName="Select.Options",$f.displayName="Select.Option";var Hf=function(e){var t=e.id,n=e.size,r=void 0===n?"md":n,o=e.value,i=e.defaultValue,a=e.onChange,l=e.by,c=void 0===l?"id":l,u=e.children,d=e.multiple,f=void 0!==d&&d,m=e.combobox,h=void 0!==m&&m,p=e.disabled,g=void 0!==p&&p,y=(0,s.useMemo)((function(){return t||"select-".concat(de())}),[t]),v=(0,s.useMemo)((function(){return void 0!==o}),[o]),b=Mf((0,s.useState)(i),2),w=b[0],x=b[1],_=Mf((0,s.useState)(""),2),E=_[0],S=_[1],k=(0,s.useCallback)((function(){return v?o:w}),[v,o,w]),C=Mf((0,s.useState)(!1),2),N=C[0],P=C[1],T=Mf((0,s.useState)(),2),O=T[0],M=T[1],R=Mf((0,s.useState)(),2),D=R[0],A=R[1],j={sm:h?256:172,md:h?256:216,lg:h?256:216},I=Vr({placement:"bottom-start",open:N,onOpenChange:P,whileElementsMounted:mn,middleware:[kn(5),Nn({padding:10}),Pn({apply:function(e){var t=e.rects,n=e.elements,o=e.availableHeight;Object.assign(n.floating.style,{maxHeight:"min(".concat(o,"px, ").concat(j[r],"px)"),maxWidth:"".concat(t.reference.width,"px")})},padding:10})]}),F=I.refs,L=I.floatingStyles,z=I.context,B=(0,s.useRef)([]),W=(0,s.useRef)([]),V=(0,s.useRef)(!1),U=Fr(z,{event:"mousedown"}),$=Wr(z),H=Qr(z,{role:"listbox"}),Y=function(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:f=!1,nested:m=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:g="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:v=!0,disabledIndices:b,orientation:w="vertical",cols:x=1,scrollItemIntoView:_=!0,virtualItemRef:E,itemSizes:S,dense:k=!1}=t,C=or(Tr(o.floating)),N=tr(),P=nr(),T=Mn(l),O=s.useRef(g),M=s.useRef(null!=u?u:-1),R=s.useRef(null),D=s.useRef(!0),A=s.useRef(T),j=s.useRef(!!o.floating),I=s.useRef(n),F=s.useRef(!1),L=s.useRef(!1),z=or(b),B=or(n),W=or(_),V=or(u),[U,$]=s.useState(),[H,Y]=s.useState(),q=Mn((function(e,t,n){function r(e){p?($(e.id),null==P||P.events.emit("virtualfocus",e),E&&(E.current=e)):Hn(e,{preventScroll:!0,sync:!(!st()||!it())&&(qr||F.current)})}void 0===n&&(n=!1);const o=e.current[t.current];o&&r(o),requestAnimationFrame((()=>{const i=e.current[t.current]||o;if(!i)return;o||r(i);const a=W.current;a&&G&&(n||!D.current)&&(null==i.scrollIntoView||i.scrollIntoView("boolean"==typeof a?{block:"nearest",inline:"nearest"}:a))}))}));Yn((()=>{document.createElement("div").focus({get preventScroll(){return qr=!0,!1}})}),[]),Yn((()=>{c&&(n&&o.floating?O.current&&null!=u&&(L.current=!0,M.current=u,T(u)):j.current&&(M.current=-1,A.current(null)))}),[c,n,o.floating,u,T]),Yn((()=>{if(c&&n&&o.floating)if(null==a){if(F.current=!1,null!=V.current)return;if(j.current&&(M.current=-1,q(i,M)),(!I.current||!j.current)&&O.current&&(null!=R.current||!0===O.current&&null==R.current)){let e=0;const t=()=>{null==i.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e++):(M.current=null==R.current||Xr(R.current,w,h)||m?Ln(i,z.current):zn(i,z.current),R.current=null,T(M.current))};t()}}else Fn(i,a)||(M.current=a,q(i,M,L.current),L.current=!1)}),[c,n,o.floating,a,V,m,i,w,h,T,q,z]),Yn((()=>{var e;if(!c||o.floating||!P||p||!j.current)return;const t=P.nodesRef.current,n=null==(e=t.find((e=>e.id===N)))||null==(e=e.context)?void 0:e.elements.floating,r=Qe(ct(o.floating)),i=t.some((e=>e.context&&et(e.context.elements.floating,r)));n&&!i&&D.current&&n.focus({preventScroll:!0})}),[c,o.floating,P,N,p]),Yn((()=>{if(c&&P&&p&&!N)return P.events.on("virtualfocus",e),()=>{P.events.off("virtualfocus",e)};function e(e){Y(e.id),E&&(E.current=e)}}),[c,P,p,N,E]),Yn((()=>{A.current=T,j.current=!!o.floating})),Yn((()=>{n||(R.current=null)}),[n]),Yn((()=>{I.current=n}),[n]);const K=null!=a,G=s.useMemo((()=>{function e(e){if(!n)return;const t=i.current.indexOf(e);-1!==t&&T(t)}return{onFocus(t){let{currentTarget:n}=t;e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...y&&{onMouseMove(t){let{currentTarget:n}=t;e(n)},onPointerLeave(e){let{pointerType:t}=e;D.current&&"touch"!==t&&(M.current=-1,q(i,M),T(null),p||Hn(C.current,{preventScroll:!0}))}}}}),[n,C,q,y,i,T,p]),X=Mn((e=>{if(D.current=!1,F.current=!0,!B.current&&e.currentTarget===C.current)return;if(m&&Zr(e.key,w,h))return mt(e),r(!1,e.nativeEvent,"list-navigation"),void(ze(o.domReference)&&!p&&o.domReference.focus());const t=M.current,a=Ln(i,b),s=zn(i,b);if("Home"===e.key&&(mt(e),M.current=a,T(M.current)),"End"===e.key&&(mt(e),M.current=s,T(M.current)),x>1){const t=S||Array.from({length:i.current.length},(()=>({width:1,height:1}))),n=function(e,t,n){const r=[];let o=0;return e.forEach(((e,i)=>{let{width:a,height:s}=e,l=!1;for(n&&(o=0);!l;){const e=[];for(let n=0;n<a;n++)for(let r=0;r<s;r++)e.push(o+n+r*t);o%t+a<=t&&e.every((e=>null==r[e]))?(e.forEach((e=>{r[e]=i})),l=!0):o++}})),[...r]}(t,x,k),r=n.findIndex((e=>null!=e&&!Un(i.current,e,b))),o=n.reduce(((e,t,n)=>null==t||Un(i.current,t,b)?e:n),-1),l=n[function(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===Rn){if(u&&mt(n),-1===c)d=l;else if(d=Bn(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||d<0)){const e=c%i,t=l%i,n=l-(t-e);d=t===e?l:t>e?n:n-i}Fn(e,d)&&(d=c)}if(n.key===Dn&&(u&&mt(n),-1===c?d=s:(d=Bn(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=Bn(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),Fn(e,d)&&(d=c)),"both"===r){const t=vt(c/i);n.key===jn&&(u&&mt(n),c%i!=i-1?(d=Bn(e,{startingIndex:c,disabledIndices:a}),o&&In(d,i,t)&&(d=Bn(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=Bn(e,{startingIndex:c-c%i-1,disabledIndices:a})),In(d,i,t)&&(d=c)),n.key===An&&(u&&mt(n),c%i!=0?(d=Bn(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&In(d,i,t)&&(d=Bn(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=Bn(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),In(d,i,t)&&(d=c));const r=vt(l/i)===t;Fn(e,d)&&(d=o&&r?n.key===An?l:Bn(e,{startingIndex:c-c%i-1,disabledIndices:a}):c)}return d}({current:n.map((e=>null!=e?i.current[e]:null))},{event:e,orientation:w,loop:f,cols:x,disabledIndices:Vn([...b||i.current.map(((e,t)=>Un(i.current,t)?t:void 0)),void 0],n),minIndex:r,maxIndex:o,prevIndex:Wn(M.current>s?a:M.current,t,n,x,e.key===Dn?"bl":e.key===jn?"tr":"tl"),stopEvent:!0})];if(null!=l&&(M.current=l,T(M.current)),"both"===w)return}if(Gr(e.key,w)){if(mt(e),n&&!p&&Qe(e.currentTarget.ownerDocument)===e.currentTarget)return M.current=Xr(e.key,w,h)?a:s,void T(M.current);Xr(e.key,w,h)?M.current=f?t>=s?d&&t!==i.current.length?-1:a:Bn(i,{startingIndex:t,disabledIndices:b}):Math.min(s,Bn(i,{startingIndex:t,disabledIndices:b})):M.current=f?t<=a?d&&-1!==t?i.current.length:s:Bn(i,{startingIndex:t,decrement:!0,disabledIndices:b}):Math.max(a,Bn(i,{startingIndex:t,decrement:!0,disabledIndices:b})),Fn(i,M.current)?T(null):T(M.current)}})),Z=s.useMemo((()=>p&&n&&K&&{"aria-activedescendant":H||U}),[p,n,K,H,U]),J=s.useMemo((()=>({"aria-orientation":"both"===w?void 0:w,...!ht(o.domReference)&&Z,onKeyDown:X,onPointerMove(){D.current=!0}})),[Z,X,o.domReference,w]),Q=s.useMemo((()=>{function e(e){"auto"===g&&rt(e.nativeEvent)&&(O.current=!0)}return{...Z,onKeyDown(e){D.current=!1;const t=0===e.key.indexOf("Arrow"),o=function(e,t,n){return Kr(t,n?e===An:e===jn,e===Dn)}(e.key,w,h),a=Zr(e.key,w,h),s=Gr(e.key,w),l=(m?o:s)||"Enter"===e.key||""===e.key.trim();if(p&&n){const n=null==P?void 0:P.nodesRef.current.find((e=>null==e.parentId)),r=P&&n?function(e,t){let n,r=-1;return function t(o,i){i>r&&(n=o,r=i),sr(e,o).forEach((e=>{t(e.id,i+1)}))}(t,0),e.find((e=>e.id===n))}(P.nodesRef.current,n.id):null;if(t&&r&&E){const t=new KeyboardEvent("keydown",{key:e.key,bubbles:!0});if(o||a){var c,d;const n=(null==(c=r.context)?void 0:c.elements.domReference)===e.currentTarget,s=a&&!n?null==(d=r.context)?void 0:d.elements.domReference:o?i.current.find((e=>(null==e?void 0:e.id)===U)):null;s&&(mt(e),s.dispatchEvent(t),Y(void 0))}var f;if(s&&r.context&&r.context.open&&r.parentId&&e.currentTarget!==r.context.elements.domReference)return mt(e),void(null==(f=r.context.elements.domReference)||f.dispatchEvent(t))}return X(e)}(n||v||!t)&&(l&&(R.current=m&&s?null:e.key),m?o&&(mt(e),n?(M.current=Ln(i,z.current),T(M.current)):r(!0,e.nativeEvent,"list-navigation")):s&&(null!=u&&(M.current=u),mt(e),!n&&v?r(!0,e.nativeEvent,"list-navigation"):X(e),n&&T(M.current)))},onFocus(){n&&!p&&T(null)},onPointerDown:function(e){O.current=g,"auto"===g&&ot(e.nativeEvent)&&(O.current=!0)},onMouseDown:e,onClick:e}}),[U,Z,X,z,g,i,m,T,r,n,v,w,h,u,P,p,E]);return s.useMemo((()=>c?{reference:Q,floating:J,item:G}:{}),[c,Q,J,G])}(z,{listRef:B,activeIndex:O,selectedIndex:D,onNavigate:M,loop:!0}),q=function(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:l,onTypingChange:c,enabled:u=!0,findMatch:d=null,resetMs:f=750,ignoreKeys:m=[],selectedIndex:h=null}=t,p=s.useRef(),g=s.useRef(""),y=s.useRef(null!=(n=null!=h?h:a)?n:-1),v=s.useRef(null),b=Mn(l),w=Mn(c),x=or(d),_=or(m);Yn((()=>{r&&(clearTimeout(p.current),v.current=null,g.current="")}),[r]),Yn((()=>{var e;r&&""===g.current&&(y.current=null!=(e=null!=h?h:a)?e:-1)}),[r,h,a]);const E=Mn((e=>{e?o.current.typing||(o.current.typing=e,w(e)):o.current.typing&&(o.current.typing=e,w(e))})),S=Mn((e=>{function t(e,t,n){const r=x.current?x.current(t,n):t.find((e=>0===(null==e?void 0:e.toLocaleLowerCase().indexOf(n.toLocaleLowerCase()))));return r?e.indexOf(r):-1}const n=i.current;if(g.current.length>0&&" "!==g.current[0]&&(-1===t(n,n,g.current)?E(!1):" "===e.key&&mt(e)),null==n||_.current.includes(e.key)||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;r&&" "!==e.key&&(mt(e),E(!0)),n.every((e=>{var t,n;return!e||(null==(t=e[0])?void 0:t.toLocaleLowerCase())!==(null==(n=e[1])?void 0:n.toLocaleLowerCase())}))&&g.current===e.key&&(g.current="",y.current=v.current),g.current+=e.key,clearTimeout(p.current),p.current=setTimeout((()=>{g.current="",y.current=v.current,E(!1)}),f);const o=y.current,a=t(n,[...n.slice((o||0)+1),...n.slice(0,(o||0)+1)],g.current);-1!==a?(b(a),v.current=a):" "!==e.key&&(g.current="",E(!1))})),k=s.useMemo((()=>({onKeyDown:S})),[S]),C=s.useMemo((()=>({onKeyDown:S,onKeyUp(e){" "===e.key&&E(!1)}})),[S,E]);return s.useMemo((()=>u?{reference:k,floating:C}:{}),[u,k,C])}(z,{listRef:W,activeIndex:O,selectedIndex:D,onMatch:N?M:A,onTypingChange:function(e){V.current=e}}),K=Yr([$,H,Y,U].concat(Df(h?[]:[q]))),G=K.getReferenceProps,X=K.getFloatingProps,Z=K.getItemProps,J=function(e,t){if(f)return function(e,t){var n,r=Df(null!==(n=k())&&void 0!==n?n:[]);-1===r.findIndex((function(e){return"object"===If(e)?e[c]===t[c]:e===t}))&&(r.push(t),v||x(r),A(e),F.reference.current.focus(),P(!1),S(""),"function"==typeof a&&a(r))}(e,t);A(e),v||x(t),F.reference.current.focus(),P(!1),S(""),"function"==typeof a&&a(t)},Q=(0,s.useCallback)((function(e,t){B.current[e]=t}),[]);return React.createElement(Bf.Provider,{value:{selectedIndex:D,setSelectedIndex:A,activeIndex:O,setActiveIndex:M,selected:w,setSelected:x,handleSelect:J,combobox:h,sizeValue:r,multiple:f,onChange:a,isTypingRef:V,getItemProps:Z,onClickItem:function(e,t){J(e,t)},onKeyDownItem:function(e,t,n){"Enter"===e.key&&(e.preventDefault(),J(t,n))," "!==e.key||V.current||(e.preventDefault(),J(t,n))},getValues:k,selectId:y,getReferenceProps:G,isOpen:N,value:o,updateListRef:Q,refs:F,listContentRef:W,by:c,getFloatingProps:X,floatingStyles:L,context:z,searchKeyword:E,setSearchKeyword:S,disabled:g}},u)};Vf.displayName="Select.Button",Uf.displayName="Select.Options",$f.displayName="Select.Item",Hf.Button=Vf,Hf.Options=Uf,Hf.Option=$f;var Yf=Hf,qf=["id","message","jsx"];function Kf(e){return Kf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kf(e)}function Gf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gf(Object(n),!0).forEach((function(t){Zf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zf(e,t,n){return(t=Jf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jf(e){var t=function(e){if("object"!=Kf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Kf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kf(t)?t:t+""}function Qf(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function em(e,t){return e.get(nm(e,t))}function tm(e,t,n){return e.set(nm(e,t),n),n}function nm(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var rm=1,om=new WeakMap,im=new WeakMap,am=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Qf(this,om,void 0),Qf(this,im,void 0),tm(om,this,[]),tm(im,this,[])},t=[{key:"subscribe",value:function(e){var t=this;return em(im,this).push(e),function(){tm(im,t,em(im,t).filter((function(t){return t!==e})))}}},{key:"notify",value:function(){var e=this;em(im,this).forEach((function(t){return t(em(om,e))}))}},{key:"publish",value:function(e){em(im,this).forEach((function(t){return t(e)}))}},{key:"add",value:function(e){em(om,this).push(e),this.publish(e)}},{key:"remove",value:function(e){return tm(om,this,em(om,this).filter((function(t){return t.id!==e}))),e}},{key:"create",value:function(e){var t=this,n=e.id,r=void 0===n?void 0:n,o=e.message,i=void 0===o?"":o,a=e.jsx,s=void 0===a?void 0:a,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,qf);if(i||"function"==typeof s){var c="number"==typeof r?r:rm++,u=em(om,this).find((function(e){return e.id===c}));return u&&tm(om,this,em(om,this).map((function(e){return e.id===c?(t.publish(Xf(Xf({},e),{},{title:i,jsx:s},l)),Xf(Xf({},e),{},{title:i,jsx:s},l)):e}))),this.add(Xf({id:c,title:i,jsx:s},l)),c}}},{key:"update",value:function(e,t){var n=this,r=t.render,o=void 0===r?void 0:r,i=t;switch(Kf(o)){case"function":i=Xf({jsx:o},t);break;case"string":i=Xf({title:o},t)}tm(om,this,em(om,this).map((function(t){return t.id===e?(n.publish(Xf(Xf({},t),i)),Xf(Xf({},t),i)):t})))}},{key:"dismiss",value:function(e){var t=this;return e||em(om,this).forEach((function(e){return em(im,t).forEach((function(t){return t({id:e.id,dismiss:!0})}))})),em(im,this).forEach((function(t){return t({id:e,dismiss:!0})})),e}},{key:"history",value:function(){return em(om,this)}},{key:"default",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.create(Xf({message:e,type:"neutral"},t))}},{key:"success",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.create(Xf({message:e,type:"success"},t))}},{key:"error",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.create(Xf({message:e,type:"error"},t))}},{key:"warning",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.create(Xf({message:e,type:"warning"},t))}},{key:"info",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.create(Xf({message:e,type:"info"},t))}},{key:"custom",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.create(Xf({jsx:e,type:"custom"},t))}}],t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Jf(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),sm=new am,lm=Object.seal(Object.assign((function(e,t){return sm.default(e,t)}),{success:sm.success.bind(sm),error:sm.error.bind(sm),warning:sm.warning.bind(sm),info:sm.info.bind(sm),custom:sm.custom.bind(sm),dismiss:sm.dismiss.bind(sm),update:sm.update.bind(sm)},{getHistory:sm.history.bind(sm)})),cm=!1,um={"top-left":"top-0 bottom-0 left-0 justify-start items-start","top-right":"top-0 bottom-0 right-0 justify-start items-end","bottom-left":"top-0 bottom-0 left-0 justify-end items-start","bottom-right":"top-0 bottom-0 right-0 justify-end items-end"},dm={neutral:"border-alert-border-neutral bg-alert-background-neutral",custom:"border-alert-border-neutral bg-alert-background-neutral",info:"border-alert-border-info bg-alert-background-info",success:"border-alert-border-green bg-alert-background-green",warning:"border-alert-border-warning bg-alert-background-warning",error:"border-alert-border-danger bg-alert-background-danger"},fm="bg-background-inverse border-background-inverse",mm={light:"text-icon-secondary",dark:"text-icon-inverse"};class hm extends s.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function pm({children:e,isPresent:t}){const n=(0,s.useId)(),r=(0,s.useRef)(null),o=(0,s.useRef)({width:0,height:0,top:0,left:0}),{nonce:i}=(0,s.useContext)(ud);return(0,s.useInsertionEffect)((()=>{const{width:e,height:a,top:s,left:l}=o.current;if(t||!r.current||!e||!a)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return i&&(c.nonce=i),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n          [data-motion-pop-id="${n}"] {\n            position: absolute !important;\n            width: ${e}px !important;\n            height: ${a}px !important;\n            top: ${s}px !important;\n            left: ${l}px !important;\n          }\n        `),()=>{document.head.removeChild(c)}}),[t]),(0,Dc.jsx)(hm,{isPresent:t,childRef:r,sizeRef:o,children:s.cloneElement(e,{ref:r})})}const gm=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a})=>{const l=jd(ym),c=(0,s.useId)(),u=(0,s.useMemo)((()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:e=>{l.set(e,!0);for(const e of l.values())if(!e)return;r&&r()},register:e=>(l.set(e,!1),()=>l.delete(e))})),i?[Math.random()]:[n]);return(0,s.useMemo)((()=>{l.forEach(((e,t)=>l.set(t,!1)))}),[n]),s.useEffect((()=>{!n&&!l.size&&r&&r()}),[n]),"popLayout"===a&&(e=(0,Dc.jsx)(pm,{isPresent:n,children:e})),(0,Dc.jsx)(Ac.Provider,{value:u,children:e})};function ym(){return new Map}const vm=e=>e.key||"";function bm(e){const t=[];return s.Children.forEach(e,(e=>{(0,s.isValidElement)(e)&&t.push(e)})),t}const wm=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:o,presenceAffectsLayout:i=!0,mode:a="sync"})=>{Bi(!t,"Replace exitBeforeEnter with mode='wait'");const l=(0,s.useMemo)((()=>bm(e)),[e]),c=l.map(vm),u=(0,s.useRef)(!0),d=(0,s.useRef)(l),f=jd((()=>new Map)),[m,h]=(0,s.useState)(l),[p,g]=(0,s.useState)(l);md((()=>{u.current=!1,d.current=l;for(let e=0;e<p.length;e++){const t=vm(p[e]);c.includes(t)?f.delete(t):!0!==f.get(t)&&f.set(t,!1)}}),[p,c.length,c.join("-")]);const y=[];if(l!==m){let e=[...l];for(let t=0;t<p.length;t++){const n=p[t],r=vm(n);c.includes(r)||(e.splice(t,0,n),y.push(n))}return"wait"===a&&y.length&&(e=y),g(bm(e)),void h(l)}const{forceRender:v}=(0,s.useContext)(jc);return(0,Dc.jsx)(Dc.Fragment,{children:p.map((e=>{const t=vm(e),s=l===p||c.includes(t);return(0,Dc.jsx)(gm,{isPresent:s,initial:!(u.current&&!r)&&void 0,custom:s?void 0:n,presenceAffectsLayout:i,mode:a,onExitComplete:s?void 0:()=>{if(!f.has(t))return;f.set(t,!0);let e=!0;f.forEach((t=>{t||(e=!1)})),e&&(null==v||v(),g(d.current),o&&o())},children:e},t)}))})};function xm(e){return xm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xm(e)}function _m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Em(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_m(Object(n),!0).forEach((function(t){Sm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Sm(e,t,n){return(t=function(e){var t=function(e){if("object"!=xm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xm(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function km(e,t){if(e){if("string"==typeof e)return Cm(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cm(e,t):void 0}}function Cm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Nm,Pm=function(e){var t=e.toastItem,n=e.title,r=void 0===n?null:n,o=e.content,i=void 0===o?null:o,a=e.autoDismiss,l=void 0===a||a,c=e.dismissAfter,u=void 0===c?5e3:c,d=e.theme,f=void 0===d?"light":d,m=e.design,h=void 0===m?"stack":m,p=e.icon,g=void 0===p?null:p,y=e.variant,v=void 0===y?"neutral":y,b=e.removeToast,w=(0,s.useRef)(0),x=(0,s.useRef)(0),_=(0,s.useRef)(0),E=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u;if(l&&!(u<0))return w.current=(new Date).getTime(),setTimeout((function(){b(e.id)}),t)};(0,s.useEffect)((function(){var e=u;return _.current=E(t,e),function(){clearTimeout(_.current)}}),[]),(0,s.useEffect)((function(){null!=t&&t.dismiss&&b(t.id)}),[t]);var S,k,C,N,P,T,O,M,R,D,A=function(){var e,n;null==t||null===(e=t.action)||void 0===e||null===(n=e.onClick)||void 0===n||n.call(e,(function(){return b(t.id)}))},j=null;return"stack"===h&&(j=React.createElement("div",{className:re("flex items-center justify-start p-4 gap-2 relative border border-solid rounded-md shadow-lg","dark"===f?fm:null===(S=dm)||void 0===S?void 0:S[v],"w-[22.5rem]"),onMouseEnter:function(){clearTimeout(_.current),x.current=(new Date).getTime()},onMouseLeave:function(){_.current=E(t,u-(x.current-w.current))}},"custom"!==t.type?React.createElement(React.Fragment,null,React.createElement("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0"},co({variant:v,icon:g,theme:f})),React.createElement("div",{className:"flex flex-col items-start justify-start gap-0.5"},fo({title:r,theme:f}),mo({content:i,theme:f}),(null==t||null===(k=t.action)||void 0===k?void 0:k.label)&&"function"==typeof(null==t||null===(C=t.action)||void 0===C?void 0:C.onClick)&&React.createElement("div",{className:"mt-2.5"},uo({actionLabel:null==t||null===(N=t.action)||void 0===N?void 0:N.label,actionType:null!==(P=null==t||null===(T=t.action)||void 0===T?void 0:T.type)&&void 0!==P?P:"button",onAction:A,theme:f}))),React.createElement("div",{className:"absolute right-4 top-4 [&_svg]:size-5"},React.createElement("button",{className:re("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",null!==(O=mm[f])&&void 0!==O?O:mm.light),onClick:function(){return b(t.id)}},React.createElement(jo,null)))):null==t||null===(M=t.jsx)||void 0===M?void 0:M.call(t,{close:function(){return b(t.id)},action:null!=t&&t.action?Em(Em({},null==t?void 0:t.action),{},{onClick:A}):null}))),"inline"===h&&(j=React.createElement("div",{className:re("flex items-center justify-start p-3 gap-2 relative border border-solid rounded-md shadow-lg","dark"===f?fm:null===(R=dm)||void 0===R?void 0:R[v],"lg:w-[47.5rem] w-full")},React.createElement("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0"},co({variant:v,icon:g,theme:f})),React.createElement("div",{className:"flex items-start justify-start gap-1 mr-10 [&>span:first-child]:shrink-0"},fo({title:r,theme:f}),mo({content:i,theme:f})),React.createElement("div",{className:"absolute right-3 top-3 [&_svg]:size-5"},React.createElement("button",{className:re("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",null!==(D=mm[f])&&void 0!==D?D:mm.light),onClick:function(){return b(t.id)}},React.createElement(jo,null))))),j},Tm=(Nm=function(e){var t,n,r=e.position,o=void 0===r?"top-right":r,i=e.design,a=void 0===i?"stack":i,l=e.theme,c=void 0===l?"light":l,u=e.className,d=void 0===u?"":u,f=e.autoDismiss,m=void 0===f||f,h=e.dismissAfter,p=void 0===h?5e3:h,g=function(e){if(Array.isArray(e))return e}(n=(0,s.useState)([]))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next,!2;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){l=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(n)||km(n,2)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),y=g[0],v=g[1];(0,s.useEffect)((function(){sm.subscribe((function(e){null!=e&&e.dismiss?v((function(t){return t.map((function(t){return t.id===e.id?Em(Em({},t),{},{dismiss:!0}):t}))})):setTimeout((function(){(0,Gt.flushSync)((function(){return v((function(t){return-1!==t.findIndex((function(t){return t.id===e.id}))?t.map((function(t){return t.id===e.id?Em(Em({},t),e):t})):[].concat(function(e){return function(e){if(Array.isArray(e))return Cm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||km(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t),[e])}))}))}))}))}),[]);var b=function(e){v((function(t){return t.filter((function(t){return t.id!==e}))}))};return React.createElement("ul",{className:re("fixed flex flex-col list-none z-20 p-10 pointer-events-none [&>li]:pointer-events-auto gap-3",null!==(t=um[o])&&void 0!==t?t:um["top-right"],d)},React.createElement(wm,{initial:!1},y.map((function(e){var t,n,r,o,i;return React.createElement(vf.li,{key:e.id,positionTransition:!0,initial:{opacity:0,y:50,scale:.7},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.6,transition:{duration:.15}},layoutId:"toast-".concat(e.id)},React.createElement(Pm,{toastItem:e,title:e.title,content:null==e?void 0:e.description,icon:null!==(t=null==e?void 0:e.icon)&&void 0!==t?t:null,design:null!==(n=null==e?void 0:e.design)&&void 0!==n?n:a,autoDismiss:null!==(r=null==e?void 0:e.autoDismiss)&&void 0!==r?r:m,dismissAfter:null!==(o=null==e?void 0:e.dismissAfter)&&void 0!==o?o:p,removeToast:b,variant:e.type,theme:null!==(i=null==e?void 0:e.theme)&&void 0!==i?i:c}))}))))},(0,s.memo)((function(e){var t=e.singleTon;return cm&&t?null:(cm=!0,React.createElement(Nm,e))}))),Om={sm:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},md:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},lg:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"}},Mm={sm:{xs:"gap-2",sm:"gap-4",md:"gap-5",lg:"gap-6",xl:"gap-6","2xl":"gap-8"},md:{xs:"md:gap-2",sm:"md:gap-4",md:"md:gap-5",lg:"md:gap-6",xl:"md:gap-6","2xl":"md:gap-8"},lg:{xs:"lg:gap-2",sm:"lg:gap-4",md:"lg:gap-5",lg:"lg:gap-6",xl:"lg:gap-6","2xl":"lg:gap-8"}},Rm={sm:{xs:"gap-x-2",sm:"gap-x-4",md:"gap-x-5",lg:"gap-x-6",xl:"gap-x-6","2xl":"gap-x-8"},md:{xs:"md:gap-x-2",sm:"md:gap-x-4",md:"md:gap-x-5",lg:"md:gap-x-6",xl:"md:gap-x-6","2xl":"md:gap-x-8"},lg:{xs:"lg:gap-x-2",sm:"lg:gap-x-4",md:"lg:gap-x-5",lg:"lg:gap-x-6",xl:"lg:gap-x-6","2xl":"lg:gap-x-8"}},Dm={sm:{xs:"gap-y-2",sm:"gap-y-4",md:"gap-y-5",lg:"gap-y-6",xl:"gap-y-6","2xl":"gap-y-8"},md:{xs:"md:gap-y-2",sm:"md:gap-y-4",md:"md:gap-y-5",lg:"md:gap-y-6",xl:"md:gap-y-6","2xl":"md:gap-y-8"},lg:{xs:"lg:gap-y-2",sm:"lg:gap-y-4",md:"lg:gap-y-5",lg:"lg:gap-y-6",xl:"lg:gap-y-6","2xl":"lg:gap-y-8"}},Am={sm:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"},md:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12"},lg:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12"}},jm={sm:{1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12"},md:{1:"md:col-start-1",2:"md:col-start-2",3:"md:col-start-3",4:"md:col-start-4",5:"md:col-start-5",6:"md:col-start-6",7:"md:col-start-7",8:"md:col-start-8",9:"md:col-start-9",10:"md:col-start-10",11:"md:col-start-11",12:"md:col-start-12"},lg:{1:"lg:col-start-1",2:"lg:col-start-2",3:"lg:col-start-3",4:"lg:col-start-4",5:"lg:col-start-5",6:"lg:col-start-6",7:"lg:col-start-7",8:"lg:col-start-8",9:"lg:col-start-9",10:"lg:col-start-10",11:"lg:col-start-11",12:"lg:col-start-12"}},Im={sm:{row:"grid-flow-row",column:"grid-flow-col","row-dense":"grid-flow-row-dense","column-dense":"grid-flow-col-dense"},md:{row:"md:grid-flow-row",column:"md:grid-flow-col","row-dense":"md:grid-flow-row-dense","column-dense":"md:grid-flow-col-dense"},lg:{row:"lg:grid-flow-row",column:"lg:grid-flow-col","row-dense":"lg:grid-flow-row-dense","column-dense":"lg:grid-flow-col-dense"}},Fm={sm:{normal:"justify-normal",start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch"},md:{normal:"md:justify-normal",start:"md:justify-start",end:"md:justify-end",center:"md:justify-center",between:"md:justify-between",around:"md:justify-around",evenly:"md:justify-evenly",stretch:"md:justify-stretch"},lg:{normal:"lg:justify-normal",start:"lg:justify-start",end:"lg:justify-end",center:"lg:justify-center",between:"lg:justify-between",around:"lg:justify-around",evenly:"lg:justify-evenly",stretch:"lg:justify-stretch"}},Lm={sm:{start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},md:{start:"md:items-start",end:"md:items-end",center:"md:items-center",baseline:"md:items-baseline",stretch:"md:items-stretch"},lg:{start:"lg:items-start",end:"lg:items-end",center:"lg:items-center",baseline:"lg:items-baseline",stretch:"lg:items-stretch"}},zm={sm:{start:"self-start",end:"self-end",center:"self-center",baseline:"self-baseline",stretch:"self-stretch"},md:{start:"md:self-start",end:"md:self-end",center:"md:self-center",baseline:"md:self-baseline",stretch:"md:self-stretch"},lg:{start:"lg:self-start",end:"lg:self-end",center:"lg:self-center",baseline:"lg:self-baseline",stretch:"lg:self-stretch"}},Bm={sm:{auto:"justify-self-auto",start:"justify-self-start",end:"justify-self-end",center:"justify-self-center",baseline:"justify-self-baseline",stretch:"justify-self-stretch"},md:{auto:"md:justify-self-auto",start:"md:justify-self-start",end:"md:justify-self-end",center:"md:justify-self-center",baseline:"md:justify-self-baseline",stretch:"md:justify-self-stretch"},lg:{auto:"lg:justify-self-auto",start:"lg:justify-self-start",end:"lg:justify-self-end",center:"lg:justify-self-center",baseline:"lg:justify-self-baseline",stretch:"lg:justify-self-stretch"}},Wm={sm:{row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},md:{row:"md:flex-row","row-reverse":"md:flex-row-reverse",column:"md:flex-col","column-reverse":"md:flex-col-reverse"},lg:{row:"lg:flex-row","row-reverse":"lg:flex-row-reverse",column:"lg:flex-col","column-reverse":"lg:flex-col-reverse"}},Vm={sm:{wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},md:{wrap:"md:flex-wrap","wrap-reverse":"md:flex-wrap-reverse",nowrap:"md:flex-nowrap"},lg:{wrap:"lg:flex-wrap","wrap-reverse":"lg:flex-wrap-reverse",nowrap:"lg:flex-nowrap"}},Um={sm:{1:"w-full",2:"w-1/2",3:"w-1/3",4:"w-1/4",5:"w-1/5",6:"w-1/6",7:"w-1/7",8:"w-1/8",9:"w-1/9",10:"w-1/10",11:"w-1/11",12:"w-1/12"},md:{1:"md:w-full",2:"md:w-1/2",3:"md:w-1/3",4:"md:w-1/4",5:"md:w-1/5",6:"md:w-1/6",7:"md:w-1/7",8:"md:w-1/8",9:"md:w-1/9",10:"md:w-1/10",11:"md:w-1/11",12:"md:w-1/12"},lg:{1:"lg:w-full",2:"lg:w-1/2",3:"lg:w-1/3",4:"lg:w-1/4",5:"lg:w-1/5",6:"lg:w-1/6",7:"lg:w-1/7",8:"lg:w-1/8",9:"lg:w-1/9",10:"lg:w-1/10",11:"lg:w-1/11",12:"lg:w-1/12"}},$m={sm:{1:"order-1",2:"order-2",3:"order-3",4:"order-4",5:"order-5",6:"order-6",7:"order-7",8:"order-8",9:"order-9",10:"order-10",11:"order-11",12:"order-12",first:"order-first",last:"order-last",none:"order-none"},md:{1:"md:order-1",2:"md:order-2",3:"md:order-3",4:"md:order-4",5:"md:order-5",6:"md:order-6",7:"md:order-7",8:"md:order-8",9:"md:order-9",10:"md:order-10",11:"md:order-11",12:"md:order-12",first:"md:order-first",last:"md:order-last",none:"md:order-none"},lg:{1:"lg:order-1",2:"lg:order-2",3:"lg:order-3",4:"lg:order-4",5:"lg:order-5",6:"lg:order-6",7:"lg:order-7",8:"lg:order-8",9:"lg:order-9",10:"lg:order-10",11:"lg:order-11",12:"lg:order-12",first:"lg:order-first",last:"lg:order-last",none:"lg:order-none"}},Hm={sm:{0:"grow-0",1:"grow"},md:{0:"md:grow-0",1:"md:grow"},lg:{0:"lg:grow-0",1:"lg:grow"}},Ym={sm:{0:"shrink-0",1:"shrink"},md:{0:"md:shrink-0",1:"md:shrink"},lg:{0:"lg:shrink-0",1:"lg:shrink"}};function qm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Km(e){return Km="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Km(e)}var Gm=function(e,t,n){var r,o,i,a,s,l,c,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"sm",d=[];switch(Km(e)){case"object":for(var f=0,m=Object.entries(e);f<m.length;f++){var h,p,g,y,v=function(e){if(Array.isArray(e))return e}(c=m[f])||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next,!2;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){l=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(c)||function(e){if(e){if("string"==typeof e)return qm(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?qm(e,2):void 0}}(c)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),b=v[0],w=v[1];t[b]&&d.push(null!==(h=null!==(p=null==t||null===(g=t[b])||void 0===g?void 0:g[w])&&void 0!==p?p:null==t||null===(y=t[b])||void 0===y?void 0:y[null==n?void 0:n[b]])&&void 0!==h?h:"")}break;case"string":case"number":var x=u;d.push(null!==(r=null!==(o=null==t||null===(i=t[x])||void 0===i?void 0:i[e])&&void 0!==o?o:null==t||null===(a=t[x])||void 0===a?void 0:a[null==n?void 0:n[x]])&&void 0!==r?r:"");break;default:d.push(null!==(s=null==t||null===(l=t[u])||void 0===l?void 0:l[n])&&void 0!==s?s:"")}return d.join(" ")},Xm=["className","cols","gap","gapX","gapY","align","justify","gridFlow","colsSubGrid","rowsSubGrid","autoRows","autoCols","children"],Zm=["className","children","colSpan","colStart","alignSelf","justifySelf"];function Jm(){return Jm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jm.apply(null,arguments)}function Qm(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var eh=function(e){var t=e.className,n=e.cols,r=e.gap,o=e.gapX,i=e.gapY,a=e.align,s=e.justify,c=e.gridFlow,u=void 0===c?"":c,d=e.colsSubGrid,f=void 0!==d&&d,m=e.rowsSubGrid,h=void 0!==m&&m,p=e.autoRows,g=void 0!==p&&p,y=e.autoCols,v=void 0!==y&&y,b=e.children,w=Qm(e,Xm),x=Gm(n,Om,1),_=Gm(r,Mm,"sm"),E=Gm(o,Rm,""),S=Gm(i,Dm,""),k=Gm(a,Lm,""),C=Gm(s,Fm,""),N=Gm(u,Im,"");return l().createElement("div",Jm({className:re("grid",{"grid-cols-subgrid":f,"grid-rows-subgrid":h,"auto-cols-auto":v,"auto-rows-auto":g},x,_,E,S,k,C,N,t)},w),b)};Object.assign(eh,{Item:function(e){var t=e.className,n=e.children,r=e.colSpan,o=e.colStart,i=e.alignSelf,a=e.justifySelf,s=Qm(e,Zm),c=Gm(r,Am,0),u=Gm(o,jm,0),d=Gm(i,zm,""),f=Gm(a,Bm,"");return l().createElement("div",Jm({className:re(c,u,d,f,t)},s),n)}});var th=eh,nh=["containerType","gap","gapX","gapY","direction","justify","align","wrap","cols","className","children"],rh=["containerType"],oh=["grow","shrink","order","alignSelf","justifySelf","className","children"];function ih(){return ih=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ih.apply(null,arguments)}function ah(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var sh=(0,s.createContext)(),lh=function(e){var t=e.containerType,n=void 0===t?"flex":t,r=e.gap,o=void 0===r?"sm":r,i=e.gapX,a=void 0===i?"":i,s=e.gapY,c=void 0===s?"":s,u=e.direction,d=void 0===u?"":u,f=e.justify,m=void 0===f?"":f,h=e.align,p=void 0===h?"":h,g=e.wrap,y=e.cols,v=void 0===y?"":y,b=e.className,w=e.children,x=ah(e,nh);if("grid"===n){var _=e.containerType,E=ah(e,rh);return l().createElement(sh.Provider,{value:{containerType:_}},l().createElement(th,E))}var S=Gm(g,Vm,""),k=Gm(o,Mm,"sm"),C=Gm(a,Rm,""),N=Gm(c,Dm,""),P=Gm(d,Wm,""),T=Gm(m,Fm,""),O=Gm(p,Lm,""),M=re("flex",S,k,C,N,P,T,O,b);return l().createElement(sh.Provider,{value:{containerType:n,cols:v}},"grid"===n?l().createElement(th,e):l().createElement("div",ih({className:M},x),w))};lh.Item=function(e){var t=e.grow,n=e.shrink,r=e.order,o=e.alignSelf,i=e.justifySelf,a=e.className,c=e.children,u=ah(e,oh),d=(0,s.useContext)(sh),f=d.containerType,m=d.cols;if("grid"===f){var h=ih({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return l().createElement(th.Item,h)}var p=Gm(o,zm,""),g=Gm(i,Bm,""),y=Gm(t,Hm,0),v=Gm(n,Ym,0),b=Gm(r,$m,0),w=Gm(m,Um,1);return l().createElement("div",ih({className:re("box-border",y,v,b,p,g,w,a)},u),c)},lh.displayName="Container",lh.Item.displayName="Container.Item";var ch,uh=lh,dh=function(e){var t,n,r,o,i,a,s=e.design,l=void 0===s?"inline":s,c=e.theme,u=void 0===c?"light":c,d=e.variant,f=void 0===d?"neutral":d,m=e.className,h=void 0===m?"":m,p=e.title,g=void 0===p?"Title":p,y=e.content,v=void 0===y?"Description":y,b=e.icon,w=void 0===b?null:b,x=e.onClose,_=void 0===x?function(){}:x,E=e.action,S=void 0===E?{label:"",onClick:function(){},type:"link"}:E,k=function(){_()},C={neutral:"ring-alert-border-neutral bg-alert-background-neutral",custom:"ring-alert-border-neutral bg-alert-background-neutral",info:"ring-alert-border-info bg-alert-background-info",success:"ring-alert-border-green bg-alert-background-green",warning:"ring-alert-border-warning bg-alert-background-warning",error:"ring-alert-border-danger bg-alert-background-danger"},N="bg-background-inverse ring-background-inverse",P={light:"text-icon-secondary",dark:"text-icon-inverse"},T=function(){var e;null==S||null===(e=S.onClick)||void 0===e||e.call(S,(function(){return k()}))};return"stack"===l?React.createElement("div",{className:re("flex items-center justify-start p-4 gap-2 relative ring-1 rounded-md shadow-lg","dark"===u?N:null===(o=C)||void 0===o?void 0:o[f],h)},React.createElement(React.Fragment,null,React.createElement("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0"},co({variant:f,icon:w,theme:u})),React.createElement("div",{className:"flex flex-col items-start justify-start gap-0.5"},fo({title:g,theme:u}),mo({content:v,theme:u}),(null==S?void 0:S.label)&&"function"==typeof(null==S?void 0:S.onClick)&&React.createElement("div",{className:"mt-2.5"},uo({actionLabel:null==S?void 0:S.label,actionType:null!==(i=null==S?void 0:S.type)&&void 0!==i?i:"button",onAction:T,theme:u}))),React.createElement("div",{className:"absolute right-4 top-4 [&_svg]:size-5"},React.createElement("button",{className:re("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",null!==(a=P[u])&&void 0!==a?a:P.light),onClick:function(){return k()}},React.createElement(jo,null))))):React.createElement("div",{className:re("flex items-center justify-between p-3 gap-2 relative ring-1 rounded-lg shadow-lg","dark"===u?N:null===(t=C)||void 0===t?void 0:t[f],h)},React.createElement("div",{className:"flex items-center justify-start gap-2"},React.createElement("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0"},co({variant:f,icon:w,theme:u})),React.createElement("div",{className:"flex items-start justify-start gap-1 mr-10 [&>span:first-child]:shrink-0 px-1"},fo({title:g,theme:u}),mo({content:v,theme:u}))),React.createElement("div",{className:"flex items-center justify-start gap-4 [&_svg]:size-4"},(null==S?void 0:S.label)&&"function"==typeof(null==S?void 0:S.onClick)&&React.createElement("div",{className:"flex h-5"},uo({actionLabel:null==S?void 0:S.label,actionType:null!==(n=null==S?void 0:S.type)&&void 0!==n?n:"button",onAction:T,theme:u})),React.createElement("button",{className:re("bg-transparent m-0 border-none p-0.5 focus:outline-none active:outline-none cursor-pointer size-5",null!==(r=P[u])&&void 0!==r?r:P.light),onClick:function(){return k()}},React.createElement(jo,null))))},fh=(ch=function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)},ch&&ch.__esModule&&Object.prototype.hasOwnProperty.call(ch,"default")?ch.default:ch);const mh=(0,s.createContext)(null);function hh(){const e=(0,s.useContext)(mh);return null==e&&fh(8),e}function ph({defaultSelection:e}){const[t]=hh();return(0,s.useEffect)((()=>{t.focus((()=>{const e=document.activeElement,n=t.getRootElement();null===n||null!==e&&n.contains(e)||n.focus({preventScroll:!0})}),{defaultSelection:e})}),[e,t]),null}const gh={},yh={},vh={},bh={},wh={},xh={},_h={},Eh={},Sh={},kh={},Ch={},Nh={},Ph={},Th={},Oh={},Mh={},Rh={},Dh={},Ah={},jh={},Ih={},Fh={},Lh={},zh={},Bh={},Wh={},Vh={},Uh={},$h={},Hh={},Yh={},qh={},Kh={},Gh={},Xh={},Zh={},Jh={},Qh={},ep={},tp={},np="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,rp=np&&"documentMode"in document?document.documentMode:null,op=np&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ip=np&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ap=!(!np||!("InputEvent"in window)||rp)&&"getTargetRanges"in new window.InputEvent("input"),sp=np&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),lp=np&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,cp=np&&/Android/.test(navigator.userAgent),up=np&&/^(?=.*Chrome).*/i.test(navigator.userAgent),dp=np&&cp&&up,fp=np&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!up,mp=0,hp=1,pp=2,gp=1,yp=2,vp=3,bp=4,wp=5,xp=6,_p=sp||lp||fp?" ":"​",Ep="\n\n",Sp=ip?" ":_p,kp="֑-߿יִ-﷽ﹰ-ﻼ",Cp="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",Np=new RegExp("^[^"+Cp+"]*["+kp+"]"),Pp=new RegExp("^[^"+kp+"]*["+Cp+"]"),Tp={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},Op={directionless:1,unmergeable:2},Mp={center:2,end:6,justify:4,left:1,right:3,start:5},Rp={[yp]:"center",[xp]:"end",[bp]:"justify",[gp]:"left",[vp]:"right",[wp]:"start"},Dp={normal:0,segmented:2,token:1},Ap={[mp]:"normal",[pp]:"segmented",[hp]:"token"};var jp,Ip=(jp=function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)},jp&&jp.__esModule&&Object.prototype.hasOwnProperty.call(jp,"default")?jp.default:jp);function Fp(...e){const t=[];for(const n of e)if(n&&"string"==typeof n)for(const[e]of n.matchAll(/\S+/g))t.push(e);return t}let Lp=!1,zp=0;function Bp(e){zp=e.timeStamp}function Wp(e,t,n){return t.__lexicalLineBreak===e||void 0!==e[`__lexicalKey_${n._key}`]}function Vp(e,t,n){const r=Zg(n._window);let o=null,i=null;null!==r&&r.anchorNode===e&&(o=r.anchorOffset,i=r.focusOffset);const a=e.nodeValue;null!==a&&Ng(t,a,o,i,!1)}function Up(e,t,n){if(Vv(e)){const t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return 3===t.nodeType&&n.isAttached()}function $p(e,t,n){Lp=!0;const r=performance.now()-zp>100;try{Ob(e,(()=>{const o=tb()||function(e){return e.getEditorState().read((()=>{const e=tb();return null!==e?e.clone():null}))}(e),i=new Map,a=e.getRootElement(),s=e._editorState,l=e._blockCursorElement;let c=!1,u="";for(let n=0;n<t.length;n++){const d=t[n],f=d.type,m=d.target;let h=hg(m,s);if(!(null===h&&m!==a||jb(h)))if("characterData"===f)r&&Rv(h)&&Up(o,m,h)&&Vp(m,h,e);else if("childList"===f){c=!0;const t=d.addedNodes;for(let n=0;n<t.length;n++){const r=t[n],o=mg(r),i=r.parentNode;if(null!=i&&r!==l&&null===o&&("BR"!==r.nodeName||!Wp(r,i,e))){if(ip){const e=r.innerText||r.nodeValue;e&&(u+=e)}i.removeChild(r)}}const n=d.removedNodes,r=n.length;if(r>0){let t=0;for(let o=0;o<r;o++){const r=n[o];("BR"===r.nodeName&&Wp(r,m,e)||l===r)&&(m.appendChild(r),t++)}r!==t&&(m===a&&(h=vg(s)),i.set(m,h))}}}if(i.size>0)for(const[t,n]of i)if(Rb(n)){const r=n.getChildrenKeys();let o=t.firstChild;for(let n=0;n<r.length;n++){const i=r[n],a=e.getElementByKey(i);null!==a&&(null==o?(t.appendChild(a),o=a):o!==a&&t.replaceChild(a,o),o=o.nextSibling)}}else Rv(n)&&n.markDirty();const d=n.takeRecords();if(d.length>0){for(let t=0;t<d.length;t++){const n=d[t],r=n.addedNodes,o=n.target;for(let t=0;t<r.length;t++){const n=r[t],i=n.parentNode;null==i||"BR"!==n.nodeName||Wp(n,o,e)||i.removeChild(n)}}n.takeRecords()}null!==o&&(c&&(o.dirty=!0,bg(o)),ip&&zg(e)&&o.insertRawText(u))}))}finally{Lp=!1}}function Hp(e){const t=e._observer;null!==t&&$p(e,t.takeRecords(),t)}function Yp(e){!function(e){0===zp&&Hg(e).addEventListener("textInput",Bp,!0)}(e),e._observer=new MutationObserver(((t,n)=>{$p(e,t,n)}))}function qp(e,t){const n=e.__mode,r=e.__format,o=e.__style,i=t.__mode,a=t.__format,s=t.__style;return!(null!==n&&n!==i||null!==r&&r!==a||null!==o&&o!==s)}function Kp(e,t){const n=e.mergeWithSibling(t),r=bb()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function Gp(e){let t,n,r=e;if(""!==r.__text||!r.isSimpleText()||r.isUnmergeable()){for(;null!==(t=r.getPreviousSibling())&&Rv(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){if(qp(t,r)){r=Kp(t,r);break}break}t.remove()}for(;null!==(n=r.getNextSibling())&&Rv(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){if(qp(r,n)){r=Kp(r,n);break}break}n.remove()}}else r.remove()}function Xp(e){for(;"element"===e.type;){const t=e.getNode(),n=e.offset;let r,o;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),o=!0):(r=t.getChildAtIndex(n),o=!1),Rv(r)){e.set(r.__key,o?r.getTextContentSize():0,"text");break}if(!Rb(r))break;e.set(r.__key,o?r.getChildrenSize():0,"element")}}let Zp=1;const Jp="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function Qp(e){const t=document.activeElement;if(null===t)return!1;const n=t.nodeName;return jb(hg(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==rg(t))}function eg(e,t,n){const r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(n)&&null!==t&&!Qp(t)&&ng(t)===e}catch(e){return!1}}function tg(e){return e instanceof qb}function ng(e){let t=e;for(;null!=t;){const e=rg(t);if(tg(e))return e;t=Ug(t)}return null}function rg(e){return e?e.__lexicalEditor:null}function og(e){return e.isToken()||e.isSegmented()}function ig(e){return 3===e.nodeType}function ag(e){let t=e;for(;null!=t;){if(ig(t))return t;t=t.firstChild}return null}function sg(e,t,n){const r=Tp[t];if(null!==n&&(e&r)==(n&r))return e;let o=e^r;return"subscript"===t?o&=~Tp.superscript:"superscript"===t&&(o&=~Tp.subscript),o}function lg(e){const t=e.getParent();if(null!==t){const n=e.getWritable(),r=t.getWritable(),o=e.getPreviousSibling(),i=e.getNextSibling();if(null===o)if(null!==i){const e=i.getWritable();r.__first=i.__key,e.__prev=null}else r.__first=null;else{const e=o.getWritable();if(null!==i){const t=i.getWritable();t.__prev=e.__key,e.__next=t.__key}else e.__next=null;n.__prev=null}if(null===i)if(null!==o){const e=o.getWritable();r.__last=o.__key,e.__next=null}else r.__last=null;else{const e=i.getWritable();if(null!==o){const t=o.getWritable();t.__next=e.__key,e.__prev=t.__key}else e.__prev=null;n.__next=null}r.__size--,n.__parent=null}}function cg(e){yb();const t=e.getLatest(),n=t.__parent,r=vb(),o=bb(),i=r._nodeMap,a=o._dirtyElements;null!==n&&function(e,t,n){let r=e;for(;null!==r;){if(n.has(r))return;const e=t.get(r);if(void 0===e)break;n.set(r,!1),r=e.__parent}}(n,i,a);const s=t.__key;o._dirtyType=1,Rb(e)?a.set(s,!0):o._dirtyLeaves.add(s)}function ug(e){gb();const t=bb(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,null!==n){const e=fg(n);null!==e&&e.getWritable()}if(null!==e){const t=fg(e);null!==t&&t.getWritable()}}}function dg(){return pb()?null:bb()._compositionKey}function fg(e,t){const n=(t||vb())._nodeMap.get(e);return void 0===n?null:n}function mg(e,t){const n=e[`__lexicalKey_${bb()._key}`];return void 0!==n?fg(n,t):null}function hg(e,t){let n=e;for(;null!=n;){const e=mg(n,t);if(null!==e)return e;n=Ug(n)}return null}function pg(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function gg(e){return e.read((()=>yg().getTextContent()))}function yg(){return vg(vb())}function vg(e){return e._nodeMap.get("root")}function bg(e){gb();const t=vb();null!==e&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function wg(e){const t=bb(),n=function(e,t){let n=e;for(;null!=n;){const e=n[`__lexicalKey_${t._key}`];if(void 0!==e)return e;n=Ug(n)}return null}(e,t);return null===n?e===t.getRootElement()?fg("root"):null:fg(n)}function xg(e,t){return t?e.getTextContentSize():0}function _g(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Eg(e){const t=[];let n=e;for(;null!==n;)t.push(n),n=n._parentEditor;return t}function Sg(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function kg(e){return 3===e.nodeType?e.nodeValue:null}function Cg(e,t,n){const r=Zg(t._window);if(null===r)return;const o=r.anchorNode;let{anchorOffset:i,focusOffset:a}=r;if(null!==o){let t=kg(o);const r=hg(o);if(null!==t&&Rv(r)){if(t===_p&&n){const e=n.length;t=n,i=e,a=e}null!==t&&Ng(r,t,i,a,e)}}}function Ng(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){const a=i.isComposing();let s=t;(a||o)&&t[t.length-1]===_p&&(s=t.slice(0,-1));const l=i.getTextContent();if(o||s!==l){if(""===s){if(ug(null),sp||lp||fp)i.remove();else{const e=bb();setTimeout((()=>{e.update((()=>{i.isAttached()&&i.remove()}))}),20)}return}const t=i.getParent(),o=nb(),l=i.getTextContentSize(),c=dg(),u=i.getKey();if(i.isToken()||null!==c&&u===c&&!a||Vv(o)&&(null!==t&&!t.canInsertTextBefore()&&0===o.anchor.offset||o.anchor.key===e.__key&&0===o.anchor.offset&&!i.canInsertTextBefore()&&!a||o.focus.key===e.__key&&o.focus.offset===l&&!i.canInsertTextAfter()&&!a))return void i.markDirty();const d=tb();if(!Vv(d)||null===n||null===r)return void i.setTextContent(s);if(d.setTextNodeRange(i,n,i,r),i.isSegmented()){const e=Mv(i.getTextContent());i.replace(e),i=e}i.setTextContent(s)}}}function Pg(e){return"ArrowLeft"===e}function Tg(e){return"ArrowRight"===e}function Og(e,t){return op?e:t}function Mg(e){return"Enter"===e}function Rg(e){return"Backspace"===e}function Dg(e){return"Delete"===e}function Ag(e,t,n){return"a"===e.toLowerCase()&&Og(t,n)}function jg(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(void 0!==r)return r;const o=e[t];if("string"==typeof o){const e=Fp(o);return n[t]=e,e}return o}function Ig(e,t,n,r,o){if(0===n.size)return;const i=r.__type,a=r.__key,s=t.get(i);void 0===s&&Ip(33,i);const l=s.klass;let c=e.get(l);void 0===c&&(c=new Map,e.set(l,c));const u=c.get(a),d="destroyed"===u&&"created"===o;(void 0===u||d)&&c.set(a,d?"updated":o)}function Fg(e,t,n){const r=e.getParent();let o=n,i=e;return null!==r&&(t&&0===n?(o=i.getIndexWithinParent(),i=r):t||n!==i.getChildrenSize()||(o=i.getIndexWithinParent()+1,i=r)),i.getChildAtIndex(t?o-1:o)}function Lg(e,t){const n=e.offset;if("element"===e.type)return Fg(e.getNode(),t,n);{const r=e.getNode();if(t&&0===n||!t&&n===r.getTextContentSize()){const e=t?r.getPreviousSibling():r.getNextSibling();return null===e?Fg(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):e}}return null}function zg(e){const t=Hg(e).event,n=t&&t.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function Bg(e,t,n){return Nb(e,t,n)}function Wg(e){return!Fb(e)&&!e.isLastChild()&&!e.isInline()}function Vg(e,t){const n=e._keyToDOMMap.get(t);return void 0===n&&Ip(75,t),n}function Ug(e){const t=e.assignedSlot||e.parentElement;return null!==t&&11===t.nodeType?t.host:t}function $g(e,t){let n=e.getParent();for(;null!==n;){if(n.is(t))return!0;n=n.getParent()}return!1}function Hg(e){const t=e._window;return null===t&&Ip(78),t}function Yg(e){return Fb(e)||Rb(e)&&e.isShadowRoot()}function qg(e){const t=bb(),n=e.constructor.getType(),r=t._nodes.get(n);void 0===r&&Ip(97);const o=r.replace;if(null!==o){const t=o(e);return t instanceof e.constructor||Ip(98),t}return e}function Kg(e,t){!Fb(e.getParent())||Rb(t)||jb(t)||Ip(99)}function Gg(e){return(jb(e)||Rb(e)&&!e.canBeEmpty())&&!e.isInline()}function Xg(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;null!==r&&r.removeChild(e)}function Zg(e){return np?(e||window).getSelection():null}function Jg(e){return 1===e.nodeType}function Qg(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return null!==e.nodeName.match(t)}function ey(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return null!==e.nodeName.match(t)}function ty(e){if(Fb(e)||jb(e)&&!e.isInline())return!0;if(!Rb(e)||Yg(e))return!1;const t=e.getFirstChild(),n=null===t||hv(t)||Rv(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function ny(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const ry=new WeakMap,oy=new Map;function iy(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function ay(e,t,n,r,o,i){let a=e.getFirstChild();for(;null!==a;){const e=a.__key;a.__parent===t&&(Rb(a)&&ay(a,e,n,r,o,i),n.has(e)||i.delete(e),o.push(e)),a=a.getNextSibling()}}let sy,ly,cy,uy,dy,fy,my,hy,py,gy,yy="",vy="",by=null,wy="",xy="",_y=!1,Ey=!1,Sy=null;function ky(e,t){const n=my.get(e);if(null!==t){const n=By(e);n.parentNode===t&&t.removeChild(n)}if(hy.has(e)||ly._keyToDOMMap.delete(e),Rb(n)){const e=Iy(n,my);Cy(e,0,e.length-1,null)}void 0!==n&&Ig(gy,cy,uy,n,"destroyed")}function Cy(e,t,n,r){let o=t;for(;o<=n;++o){const t=e[o];void 0!==t&&ky(t,r)}}function Ny(e,t){e.setProperty("text-align",t)}const Py="40px";function Ty(e,t){const n=sy.theme.indent;if("string"==typeof n){const r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}const r=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||Py;e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * ${r})`)}function Oy(e,t){const n=e.style;0===t?Ny(n,""):1===t?Ny(n,"left"):2===t?Ny(n,"center"):3===t?Ny(n,"right"):4===t?Ny(n,"justify"):5===t?Ny(n,"start"):6===t&&Ny(n,"end")}function My(e,t,n){const r=hy.get(e);void 0===r&&Ip(60);const o=r.createDOM(sy,ly);if(function(e,t,n){const r=n._keyToDOMMap;t["__lexicalKey_"+n._key]=e,r.set(e,t)}(e,o,ly),Rv(r)?o.setAttribute("data-lexical-text","true"):jb(r)&&o.setAttribute("data-lexical-decorator","true"),Rb(r)){const e=r.__indent,t=r.__size;if(0!==e&&Ty(o,e),0!==t){const e=t-1;!function(e,t,n,r){const o=vy;vy="",Ry(e,n,0,t,r,null),jy(n,r),vy=o}(Iy(r,hy),e,r,o)}const n=r.__format;0!==n&&Oy(o,n),r.isInline()||Ay(null,r,o),Wg(r)&&(yy+=Ep,xy+=Ep)}else{const t=r.getTextContent();if(jb(r)){const t=r.decorate(ly,sy);null!==t&&Ly(e,t),o.contentEditable="false"}else Rv(r)&&(r.isDirectionless()||(vy+=t));yy+=t,xy+=t}if(null!==t)if(null!=n)t.insertBefore(o,n);else{const e=t.__lexicalLineBreak;null!=e?t.insertBefore(o,e):t.appendChild(o)}return Ig(gy,cy,uy,r,"created"),o}function Ry(e,t,n,r,o,i){const a=yy;yy="";let s=n;for(;s<=r;++s){My(e[s],o,i);const t=hy.get(e[s]);null!==t&&Rv(t)&&(null===by&&(by=t.getFormat()),""===wy&&(wy=t.getStyle()))}Wg(t)&&(yy+=Ep),o.__lexicalTextContent=yy,yy=a+yy}function Dy(e,t){const n=t.get(e);return hv(n)||jb(n)&&n.isInline()}function Ay(e,t,n){const r=null!==e&&(0===e.__size||Dy(e.__last,my)),o=0===t.__size||Dy(t.__last,hy);if(r){if(!o){const e=n.__lexicalLineBreak;if(null!=e)try{n.removeChild(e)}catch(t){if("object"==typeof t&&null!=t){const r=`${t.toString()} Parent: ${n.tagName}, child: ${e.tagName}.`;throw new Error(r)}throw t}n.__lexicalLineBreak=null}}else if(o){const e=document.createElement("br");n.__lexicalLineBreak=e,n.appendChild(e)}}function jy(e,t){const n=t.__lexicalDirTextContent,r=t.__lexicalDir;if(n!==vy||r!==Sy){const n=""===vy,i=n?Sy:(o=vy,Np.test(o)?"rtl":Pp.test(o)?"ltr":null);if(i!==r){const o=t.classList,a=sy.theme;let s=null!==r?a[r]:void 0,l=null!==i?a[i]:void 0;if(void 0!==s){if("string"==typeof s){const e=Fp(s);s=a[r]=e}o.remove(...s)}if(null===i||n&&"ltr"===i)t.removeAttribute("dir");else{if(void 0!==l){if("string"==typeof l){const e=Fp(l);l=a[i]=e}void 0!==l&&o.add(...l)}t.dir=i}Ey||(e.getWritable().__dir=i)}Sy=i,t.__lexicalDirTextContent=vy,t.__lexicalDir=i}var o}function Iy(e,t){const n=[];let r=e.__first;for(;null!==r;){const e=t.get(r);void 0===e&&Ip(101),n.push(r),r=e.__next}return n}function Fy(e,t){const n=my.get(e);let r=hy.get(e);void 0!==n&&void 0!==r||Ip(61);const o=_y||fy.has(e)||dy.has(e),i=Vg(ly,e);if(n===r&&!o){if(Rb(n)){const e=i.__lexicalTextContent;void 0!==e&&(yy+=e,xy+=e);const t=i.__lexicalDirTextContent;void 0!==t&&(vy+=t)}else{const e=n.getTextContent();Rv(n)&&!n.isDirectionless()&&(vy+=e),xy+=e,yy+=e}return i}if(n!==r&&o&&Ig(gy,cy,uy,r,"updated"),r.updateDOM(n,i,sy)){const n=My(e,null,null);return null===t&&Ip(62),t.replaceChild(n,i),ky(e,null),n}if(Rb(n)&&Rb(r)){const e=r.__indent;e!==n.__indent&&Ty(i,e);const t=r.__format;t!==n.__format&&Oy(i,t),o&&(function(e,t,n){const r=vy;var o;vy="",by=null,wy="",function(e,t,n){const r=yy,o=e.__size,i=t.__size;if(yy="",1===o&&1===i){const r=e.__first,o=t.__first;if(r===o)Fy(r,n);else{const e=By(r),t=My(o,null,null);try{n.replaceChild(t,e)}catch(i){if("object"==typeof i&&null!=i){const a=`${i.toString()} Parent: ${n.tagName}, new child: {tag: ${t.tagName} key: ${o}}, old child: {tag: ${e.tagName}, key: ${r}}.`;throw new Error(a)}throw i}ky(r,null)}const a=hy.get(o);Rv(a)&&(null===by&&(by=a.getFormat()),""===wy&&(wy=a.getStyle()))}else{const r=Iy(e,my),a=Iy(t,hy);if(0===o)0!==i&&Ry(a,t,0,i-1,n,null);else if(0===i){if(0!==o){const e=null==n.__lexicalLineBreak;Cy(r,0,o-1,e?null:n),e&&(n.textContent="")}}else!function(e,t,n,r,o,i){const a=r-1,s=o-1;let l,c,u=i.firstChild,d=0,f=0;for(;d<=a&&f<=s;){const e=t[d],r=n[f];if(e===r)u=zy(Fy(r,i)),d++,f++;else{void 0===l&&(l=new Set(t)),void 0===c&&(c=new Set(n));const o=c.has(e),a=l.has(r);if(o)if(a){const e=Vg(ly,r);e===u?u=zy(Fy(r,i)):(null!=u?i.insertBefore(e,u):i.appendChild(e),Fy(r,i)),d++,f++}else My(r,i,u),f++;else u=zy(By(e)),ky(e,i),d++}const o=hy.get(r);null!==o&&Rv(o)&&(null===by&&(by=o.getFormat()),""===wy&&(wy=o.getStyle()))}const m=d>a,h=f>s;if(m&&!h){const t=n[s+1];Ry(n,e,f,s,i,void 0===t?null:ly.getElementByKey(t))}else h&&!m&&Cy(t,d,a,i)}(t,r,a,o,i,n)}Wg(t)&&(yy+=Ep),n.__lexicalTextContent=yy,yy=r+yy}(e,t,n),jy(t,n),Hb(o=t)&&null!=by&&by!==o.__textFormat&&!Ey&&(o.setTextFormat(by),o.setTextStyle(wy)),function(e){Hb(e)&&""!==wy&&wy!==e.__textStyle&&!Ey&&e.setTextStyle(wy)}(t),vy=r}(n,r,i),Fb(r)||r.isInline()||Ay(n,r,i)),Wg(r)&&(yy+=Ep,xy+=Ep)}else{const t=r.getTextContent();if(jb(r)){const t=r.decorate(ly,sy);null!==t&&Ly(e,t)}else Rv(r)&&!r.isDirectionless()&&(vy+=t);yy+=t,xy+=t}if(!Ey&&Fb(r)&&r.__cachedText!==xy){const e=r.getWritable();e.__cachedText=xy,r=e}return i}function Ly(e,t){let n=ly._pendingDecorators;const r=ly._decorators;if(null===n){if(r[e]===t)return;n=pg(ly)}n[e]=t}function zy(e){let t=e.nextSibling;return null!==t&&t===ly._blockCursorElement&&(t=t.nextSibling),t}function By(e){const t=py.get(e);return void 0===t&&Ip(75,e),t}const Wy=Object.freeze({}),Vy=[["keydown",function(e,t){if(Uy=e.timeStamp,$y=e.key,t.isComposing())return;const{key:n,shiftKey:r,ctrlKey:o,metaKey:i,altKey:a}=e;Bg(t,Th,e)||null!=n&&(function(e,t,n,r){return Tg(e)&&!t&&!r&&!n}(n,o,a,i)?Bg(t,Oh,e):function(e,t,n,r,o){return Tg(e)&&!r&&!n&&(t||o)}(n,o,r,a,i)?Bg(t,Mh,e):function(e,t,n,r){return Pg(e)&&!t&&!r&&!n}(n,o,a,i)?Bg(t,Rh,e):function(e,t,n,r,o){return Pg(e)&&!r&&!n&&(t||o)}(n,o,r,a,i)?Bg(t,Dh,e):function(e,t,n){return function(e){return"ArrowUp"===e}(e)&&!t&&!n}(n,o,i)?Bg(t,Ah,e):function(e,t,n){return function(e){return"ArrowDown"===e}(e)&&!t&&!n}(n,o,i)?Bg(t,jh,e):function(e,t){return Mg(e)&&t}(n,r)?(Xy=!0,Bg(t,Ih,e)):function(e){return" "===e}(n)?Bg(t,Fh,e):function(e,t){return op&&t&&"o"===e.toLowerCase()}(n,o)?(e.preventDefault(),Xy=!0,Bg(t,bh,!0)):function(e,t){return Mg(e)&&!t}(n,r)?(Xy=!1,Bg(t,Ih,e)):function(e,t,n,r){return op?!t&&!n&&(Rg(e)||"h"===e.toLowerCase()&&r):!(r||t||n)&&Rg(e)}(n,a,i,o)?Rg(n)?Bg(t,Lh,e):(e.preventDefault(),Bg(t,vh,!0)):function(e){return"Escape"===e}(n)?Bg(t,zh,e):function(e,t,n,r,o){return op?!(n||r||o)&&(Dg(e)||"d"===e.toLowerCase()&&t):!(t||r||o)&&Dg(e)}(n,o,r,a,i)?Dg(n)?Bg(t,Bh,e):(e.preventDefault(),Bg(t,vh,!1)):function(e,t,n){return Rg(e)&&(op?t:n)}(n,a,o)?(e.preventDefault(),Bg(t,Sh,!0)):function(e,t,n){return Dg(e)&&(op?t:n)}(n,a,o)?(e.preventDefault(),Bg(t,Sh,!1)):function(e,t){return op&&t&&Rg(e)}(n,i)?(e.preventDefault(),Bg(t,kh,!0)):function(e,t){return op&&t&&Dg(e)}(n,i)?(e.preventDefault(),Bg(t,kh,!1)):function(e,t,n,r){return"b"===e.toLowerCase()&&!t&&Og(n,r)}(n,a,i,o)?(e.preventDefault(),Bg(t,Ch,"bold")):function(e,t,n,r){return"u"===e.toLowerCase()&&!t&&Og(n,r)}(n,a,i,o)?(e.preventDefault(),Bg(t,Ch,"underline")):function(e,t,n,r){return"i"===e.toLowerCase()&&!t&&Og(n,r)}(n,a,i,o)?(e.preventDefault(),Bg(t,Ch,"italic")):function(e,t,n,r){return"Tab"===e&&!t&&!n&&!r}(n,a,o,i)?Bg(t,Wh,e):function(e,t,n,r){return"z"===e.toLowerCase()&&!t&&Og(n,r)}(n,r,i,o)?(e.preventDefault(),Bg(t,Nh,void 0)):function(e,t,n,r){return op?"z"===e.toLowerCase()&&n&&t:"y"===e.toLowerCase()&&r||"z"===e.toLowerCase()&&r&&t}(n,r,i,o)?(e.preventDefault(),Bg(t,Ph,void 0)):$v(t._editorState._selection)?function(e,t,n,r){return!t&&"c"===e.toLowerCase()&&(op?n:r)}(n,r,i,o)?(e.preventDefault(),Bg(t,Yh,e)):function(e,t,n,r){return!t&&"x"===e.toLowerCase()&&(op?n:r)}(n,r,i,o)?(e.preventDefault(),Bg(t,qh,e)):Ag(n,i,o)&&(e.preventDefault(),Bg(t,Kh,e)):!ip&&Ag(n,i,o)&&(e.preventDefault(),Bg(t,Kh,e)),function(e,t,n,r){return e||t||n||r}(o,r,a,i)&&Bg(t,tp,e))}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;n instanceof Node&&"touch"!==r&&Ob(t,(()=>{jb(hg(n))||(Gy=!0)}))}],["compositionstart",function(e,t){Ob(t,(()=>{const n=tb();if(Vv(n)&&!t.isComposing()){const r=n.anchor,o=n.anchor.getNode();ug(r.key),(e.timeStamp<Uy+30||"element"===r.type||!n.isCollapsed()||o.getFormat()!==n.format||Rv(o)&&o.getStyle()!==n.style)&&Bg(t,xh,Sp)}}))}],["compositionend",function(e,t){ip?Zy=!0:Ob(t,(()=>{rv(t,e.data)}))}],["input",function(e,t){e.stopPropagation(),Ob(t,(()=>{const n=tb(),r=e.data,o=nv(e);if(null!=r&&Vv(n)&&Qy(n,o,r,e.timeStamp,!1)){Zy&&(rv(t,r),Zy=!1);const o=n.anchor.getNode(),i=Zg(t._window);if(null===i)return;const a=n.isBackward(),s=a?n.anchor.offset:n.focus.offset,l=a?n.focus.offset:n.anchor.offset;ap&&!n.isCollapsed()&&Rv(o)&&null!==i.anchorNode&&o.getTextContent().slice(0,s)+r+o.getTextContent().slice(s+l)===kg(i.anchorNode)||Bg(t,xh,r);const c=r.length;ip&&c>1&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=c),sp||lp||fp||!t.isComposing()||(Uy=0,ug(null))}else Cg(!1,t,null!==r?r:void 0),Zy&&(rv(t,r||void 0),Zy=!1);gb(),Hp(bb())})),Yy=null}],["click",function(e,t){Ob(t,(()=>{const n=tb(),r=Zg(t._window),o=nb();if(r)if(Vv(n)){const t=n.anchor,i=t.getNode();"element"===t.type&&0===t.offset&&n.isCollapsed()&&!Fb(i)&&1===yg().getChildrenSize()&&i.getTopLevelElementOrThrow().isEmpty()&&null!==o&&n.is(o)?(r.removeAllRanges(),n.dirty=!0):3!==e.detail||n.isCollapsed()||i!==n.focus.getNode()&&(Rb(i)?i.select(0):i.getParentOrThrow().select(0))}else if("touch"===e.pointerType){const n=r.anchorNode;if(null!==n){const i=n.nodeType;1!==i&&3!==i||bg(eb(o,r,t,e))}}Bg(t,yh,e)}))}],["cut",Wy],["copy",Wy],["dragstart",Wy],["dragover",Wy],["dragend",Wy],["paste",Wy],["focus",Wy],["blur",Wy],["drop",Wy]];ap&&Vy.push(["beforeinput",(e,t)=>function(e,t){const n=e.inputType,r=nv(e);"deleteCompositionText"===n||ip&&zg(t)||"insertCompositionText"!==n&&Ob(t,(()=>{const o=tb();if("deleteContentBackward"===n){if(null===o){const e=nb();if(!Vv(e))return;bg(e.clone())}if(Vv(o)){const n=o.anchor.key===o.focus.key;if(i=e.timeStamp,"MediaLast"===$y&&i<Uy+30&&t.isComposing()&&n){if(ug(null),Uy=0,setTimeout((()=>{Ob(t,(()=>{ug(null)}))}),30),Vv(o)){const e=o.anchor.getNode();e.markDirty(),o.format=e.getFormat(),Rv(e)||Ip(142),o.style=e.getStyle()}}else{ug(null),e.preventDefault();const r=o.anchor.getNode().getTextContent(),i=0===o.anchor.offset&&o.focus.offset===r.length;dp&&n&&!i||Bg(t,vh,!0)}return}}var i;if(!Vv(o))return;const a=e.data;null!==Yy&&Cg(!1,t,Yy),o.dirty&&null===Yy||!o.isCollapsed()||Fb(o.anchor.getNode())||null===r||o.applyDOMRange(r),Yy=null;const s=o.anchor,l=o.focus,c=s.getNode(),u=l.getNode();if("insertText"!==n&&"insertTranspose"!==n)switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Bg(t,xh,e);break;case"insertFromComposition":ug(null),Bg(t,xh,e);break;case"insertLineBreak":ug(null),Bg(t,bh,!1);break;case"insertParagraph":ug(null),Xy&&!lp?(Xy=!1,Bg(t,bh,!1)):Bg(t,wh,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Bg(t,_h,e);break;case"deleteByComposition":(function(e,t){return e!==t||Rb(e)||Rb(t)||!e.isToken()||!t.isToken()})(c,u)&&Bg(t,Eh,e);break;case"deleteByDrag":case"deleteByCut":Bg(t,Eh,e);break;case"deleteContent":Bg(t,vh,!1);break;case"deleteWordBackward":Bg(t,Sh,!0);break;case"deleteWordForward":Bg(t,Sh,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Bg(t,kh,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Bg(t,kh,!1);break;case"formatStrikeThrough":Bg(t,Ch,"strikethrough");break;case"formatBold":Bg(t,Ch,"bold");break;case"formatItalic":Bg(t,Ch,"italic");break;case"formatUnderline":Bg(t,Ch,"underline");break;case"historyUndo":Bg(t,Nh,void 0);break;case"historyRedo":Bg(t,Ph,void 0)}else{if("\n"===a)e.preventDefault(),Bg(t,bh,!1);else if(a===Ep)e.preventDefault(),Bg(t,wh,void 0);else if(null==a&&e.dataTransfer){const t=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(t)}else null!=a&&Qy(o,r,a,e.timeStamp,!0)?(e.preventDefault(),Bg(t,xh,a)):Yy=a;Hy=e.timeStamp}}))}(e,t)]);let Uy=0,$y=null,Hy=0,Yy=null;const qy=new WeakMap;let Ky=!1,Gy=!1,Xy=!1,Zy=!1,Jy=[0,"",0,"root",0];function Qy(e,t,n,r,o){const i=e.anchor,a=e.focus,s=i.getNode(),l=bb(),c=Zg(l._window),u=null!==c?c.anchorNode:null,d=i.key,f=l.getElementByKey(d),m=n.length;return d!==a.key||!Rv(s)||(!o&&(!ap||Hy<r+50)||s.isDirty()&&m<2||_g(n))&&i.offset!==a.offset&&!s.isComposing()||og(s)||s.isDirty()&&m>1||(o||!ap)&&null!==f&&!s.isComposing()&&u!==ag(f)||null!==c&&null!==t&&(!t.collapsed||t.startContainer!==c.anchorNode||t.startOffset!==c.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;const n=e.anchor.offset,r=t.getParentOrThrow(),o=t.isToken();return 0===n?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||o||function(e){const t=e.getPreviousSibling();return(Rv(t)||Rb(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||o)}(e,s)}function ev(e,t){return null!==e&&null!==e.nodeValue&&3===e.nodeType&&0!==t&&t!==e.nodeValue.length}function tv(e,t,n){const{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:a}=e;Ky&&(Ky=!1,ev(r,o)&&ev(i,a))||Ob(t,(()=>{if(!n)return void bg(null);if(!eg(t,r,i))return;const s=tb();if(Vv(s)){const n=s.anchor,r=n.getNode();if(s.isCollapsed()){"Range"===e.type&&e.anchorNode===e.focusNode&&(s.dirty=!0);const o=Hg(t).event,i=o?o.timeStamp:performance.now(),[a,l,c,u,d]=Jy,f=yg(),m=!1===t.isComposing()&&""===f.getTextContent();if(i<d+200&&n.offset===c&&n.key===u)s.format=a,s.style=l;else if("text"===n.type)Rv(r)||Ip(141),s.format=r.getFormat(),s.style=r.getStyle();else if("element"===n.type&&!m){const e=n.getNode();s.style="",e instanceof Vb&&0===e.getChildrenSize()?(s.format=e.getTextFormat(),s.style=e.getTextStyle()):s.format=0}}else{const e=n.key,t=s.focus.key,r=s.getNodes(),i=r.length,l=s.isBackward(),c=l?a:o,u=l?o:a,d=l?t:e,f=l?e:t;let m=255,h=!1;for(let e=0;e<i;e++){const t=r[e],n=t.getTextContentSize();if(Rv(t)&&0!==n&&!(0===e&&t.__key===d&&c===n||e===i-1&&t.__key===f&&0===u)&&(h=!0,m&=t.getFormat(),0===m))break}s.format=h?m:0}}Bg(t,gh,void 0)}))}function nv(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return 0===t.length?null:t[0]}function rv(e,t){const n=e._compositionKey;if(ug(null),null!==n&&null!=t){if(""===t){const t=fg(n),r=ag(e.getElementByKey(n));return void(null!==r&&null!==r.nodeValue&&Rv(t)&&Ng(t,r.nodeValue,null,null,!0))}if("\n"===t[t.length-1]){const t=tb();if(Vv(t)){const n=t.focus;return t.anchor.set(n.key,n.offset,n.type),void Bg(e,Ih,null)}}}Cg(!0,e,t)}function ov(e){let t=e.__lexicalEventHandles;return void 0===t&&(t=[],e.__lexicalEventHandles=t),t}const iv=new Map;function av(e){const t=e.target,n=Zg(null==t?null:9===t.nodeType?t.defaultView:t.ownerDocument.defaultView);if(null===n)return;const r=ng(n.anchorNode);if(null===r)return;Gy&&(Gy=!1,Ob(r,(()=>{const t=nb(),o=n.anchorNode;if(null===o)return;const i=o.nodeType;1!==i&&3!==i||bg(eb(t,n,r,e))})));const o=Eg(r),i=o[o.length-1],a=i._key,s=iv.get(a),l=s||i;l!==r&&tv(n,l,!1),tv(n,r,!0),r!==i?iv.set(a,r):s&&iv.delete(a)}function sv(e){e._lexicalHandled=!0}function lv(e){return!0===e._lexicalHandled}function cv(e,t,n){gb();const r=e.__key,o=e.getParent();if(null===o)return;const i=function(e){const t=tb();if(!Vv(t)||!Rb(e))return t;const{anchor:n,focus:r}=t,o=n.getNode(),i=r.getNode();return $g(o,e)&&n.set(e.__key,0,"element"),$g(i,e)&&r.set(e.__key,0,"element"),t}(e);let a=!1;if(Vv(i)&&t){const t=i.anchor,n=i.focus;t.key===r&&(ib(t,e,o,e.getPreviousSibling(),e.getNextSibling()),a=!0),n.key===r&&(ib(n,e,o,e.getPreviousSibling(),e.getNextSibling()),a=!0)}else $v(i)&&t&&e.isSelected()&&e.selectPrevious();if(Vv(i)&&t&&!a){const t=e.getIndexWithinParent();lg(e),rb(i,o,t,-1)}else lg(e);n||Yg(o)||o.canBeEmpty()||!o.isEmpty()||cv(o,t),t&&Fb(o)&&o.isEmpty()&&o.selectEnd()}class uv{static getType(){Ip(64,this.name)}static clone(e){Ip(65,this.name)}afterCloneFrom(e){this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev}constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,function(e,t){if(null!=t)return void(e.__key=t);gb(),yb();const n=bb(),r=vb(),o=""+Zp++;r._nodeMap.set(o,e),Rb(e)?n._dirtyElements.set(o,!0):n._dirtyLeaves.add(o),n._cloneNotNeeded.add(o),n._dirtyType=1,e.__key=o}(this,e)}getType(){return this.__type}isInline(){Ip(137,this.constructor.name)}isAttached(){let e=this.__key;for(;null!==e;){if("root"===e)return!0;const t=fg(e);if(null===t)break;e=t.__parent}return!1}isSelected(e){const t=e||tb();if(null==t)return!1;const n=t.getNodes().some((e=>e.__key===this.__key));if(Rv(this))return n;if(Vv(t)&&"element"===t.anchor.type&&"element"===t.focus.type){if(t.isCollapsed())return!1;const e=this.getParent();if(jb(this)&&this.isInline()&&e){const n=t.isBackward()?t.focus:t.anchor,r=n.getNode();if(n.offset===r.getChildrenSize()&&r.is(e)&&r.getLastChildOrThrow().is(this))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(null===e)return-1;let t=e.getFirstChild(),n=0;for(;null!==t;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return null===e?null:fg(e)}getParentOrThrow(){const e=this.getParent();return null===e&&Ip(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){const t=e.getParent();if(Yg(t))return Rb(e)||e===this&&jb(e)||Ip(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return null===e&&Ip(67,this.__key),e}getParents(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return null===e?null:fg(e)}getPreviousSiblings(){const e=[],t=this.getParent();if(null===t)return e;let n=t.getFirstChild();for(;null!==n&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return null===e?null:fg(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=this.getParents(),n=e.getParents();Rb(this)&&t.unshift(this),Rb(e)&&n.unshift(e);const r=t.length,o=n.length;if(0===r||0===o||t[r-1]!==n[o-1])return null;const i=new Set(n);for(let e=0;e<r;e++){const n=t[e];if(i.has(n))return n}return null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;const t=this.getCommonAncestor(e);let n=0,r=0,o=this;for(;;){const e=o.getParentOrThrow();if(e===t){n=o.getIndexWithinParent();break}o=e}for(o=e;;){const e=o.getParentOrThrow();if(e===t){r=o.getIndexWithinParent();break}o=e}return n<r}isParentOf(e){const t=this.__key;if(t===e.__key)return!1;let n=e;for(;null!==n;){if(n.__key===t)return!0;n=n.getParent()}return!1}getNodesBetween(e){const t=this.isBefore(e),n=[],r=new Set;let o=this;for(;null!==o;){const i=o.__key;if(r.has(i)||(r.add(i),n.push(o)),o===e)break;const a=Rb(o)?t?o.getFirstChild():o.getLastChild():null;if(null!==a){o=a;continue}const s=t?o.getNextSibling():o.getPreviousSibling();if(null!==s){o=s;continue}const l=o.getParentOrThrow();if(r.has(l.__key)||n.push(l),l===e)break;let c=null,u=l;do{if(null===u&&Ip(68),c=t?u.getNextSibling():u.getPreviousSibling(),u=u.getParent(),null===u)break;null!==c||r.has(u.__key)||n.push(u)}while(null===c);o=c}return t||n.reverse(),n}isDirty(){const e=bb()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){const e=fg(this.__key);return null===e&&Ip(113),e}getWritable(){gb();const e=vb(),t=bb(),n=e._nodeMap,r=this.__key,o=this.getLatest(),i=t._cloneNotNeeded,a=tb();if(null!==a&&a.setCachedNodes(null),i.has(r))return cg(o),o;const s=iy(o);return i.add(r),cg(s),n.set(r,s),s}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){Ip(70)}updateDOM(e,t,n){Ip(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){Ip(72)}static importJSON(e){Ip(18,this.name)}static transform(){return null}remove(e){cv(this,!0,e)}replace(e,t){gb();let n=tb();null!==n&&(n=n.clone()),Kg(this,e);const r=this.getLatest(),o=this.__key,i=e.__key,a=e.getWritable(),s=this.getParentOrThrow().getWritable(),l=s.__size;lg(a);const c=r.getPreviousSibling(),u=r.getNextSibling(),d=r.__prev,f=r.__next,m=r.__parent;if(cv(r,!1,!0),null===c?s.__first=i:c.getWritable().__next=i,a.__prev=d,null===u?s.__last=i:u.getWritable().__prev=i,a.__next=f,a.__parent=m,s.__size=l,t&&(Rb(this)&&Rb(a)||Ip(139),this.getChildren().forEach((e=>{a.append(e)}))),Vv(n)){bg(n);const e=n.anchor,t=n.focus;e.key===o&&zv(e,a),t.key===o&&zv(t,a)}return dg()===o&&ug(i),a}insertAfter(e,t=!0){gb(),Kg(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.getParent(),i=tb();let a=!1,s=!1;if(null!==o){const t=e.getIndexWithinParent();if(lg(r),Vv(i)){const e=o.__key,n=i.anchor,r=i.focus;a="element"===n.type&&n.key===e&&n.offset===t+1,s="element"===r.type&&r.key===e&&r.offset===t+1}}const l=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),u=r.__key,d=n.__next;if(null===l?c.__last=u:l.getWritable().__prev=u,c.__size++,n.__next=u,r.__next=d,r.__prev=n.__key,r.__parent=n.__parent,t&&Vv(i)){const e=this.getIndexWithinParent();rb(i,c,e+1);const t=c.__key;a&&i.anchor.set(t,e+2,"element"),s&&i.focus.set(t,e+2,"element")}return e}insertBefore(e,t=!0){gb(),Kg(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.__key;lg(r);const i=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),s=n.__prev,l=this.getIndexWithinParent();null===i?a.__first=o:i.getWritable().__next=o,a.__size++,n.__prev=o,r.__prev=s,r.__next=n.__key,r.__parent=n.__parent;const c=tb();return t&&Vv(c)&&rb(c,this.getParentOrThrow(),l),e}isParentRequired(){return!1}createParentElementNode(){return $b()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){gb();const n=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===n)return r.select(0,0);if(Rb(n))return n.select();if(!Rv(n)){const e=n.getIndexWithinParent()+1;return r.select(e,e)}return n.select(e,t)}selectNext(e,t){gb();const n=this.getNextSibling(),r=this.getParentOrThrow();if(null===n)return r.select();if(Rb(n))return n.select(0,0);if(!Rv(n)){const e=n.getIndexWithinParent();return r.select(e,e)}return n.select(e,t)}markDirty(){this.getWritable()}}class dv extends uv{static getType(){return"linebreak"}static clone(e){return new dv(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>function(e){const t=e.parentElement;if(null!==t&&ey(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&pv(n)){const n=t.lastChild;if(n===e||n.previousSibling===e&&pv(n))return!0}}return!1}(e)||function(e){const t=e.parentElement;if(null!==t&&ey(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&pv(n))return!1;const r=t.lastChild;if(r===e||r.previousSibling===e&&pv(r))return!0}return!1}(e)?null:{conversion:fv,priority:0}}}static importJSON(e){return mv()}exportJSON(){return{type:"linebreak",version:1}}}function fv(e){return{node:mv()}}function mv(){return qg(new dv)}function hv(e){return e instanceof dv}function pv(e){return 3===e.nodeType&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function gv(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function yv(e,t){return 1&t?"strong":2&t?"em":"span"}function vv(e,t,n,r,o){const i=r.classList;let a=jg(o,"base");void 0!==a&&i.add(...a),a=jg(o,"underlineStrikethrough");let s=!1;const l=8&t&&4&t;void 0!==a&&(8&n&&4&n?(s=!0,l||i.add(...a)):l&&i.remove(...a));for(const e in Tp){const r=Tp[e];if(a=jg(o,e),void 0!==a)if(n&r){if(s&&("underline"===e||"strikethrough"===e)){t&r&&i.remove(...a);continue}t&r&&(!l||"underline"!==e)&&"strikethrough"!==e||i.add(...a)}else t&r&&i.remove(...a)}}function bv(e,t,n){const r=t.firstChild,o=n.isComposing(),i=e+(o?_p:"");if(null==r)t.textContent=i;else{const e=r.nodeValue;if(e!==i)if(o||ip){const[t,n,o]=function(e,t){const n=e.length,r=t.length;let o=0,i=0;for(;o<n&&o<r&&e[o]===t[o];)o++;for(;i+o<n&&i+o<r&&e[n-i-1]===t[r-i-1];)i++;return[o,n-o-i,t.slice(o,r-i)]}(e,i);0!==n&&r.deleteData(t,n),r.insertData(t,o)}else r.nodeValue=i}}function wv(e,t,n,r,o,i){bv(o,e,t);const a=i.theme.text;void 0!==a&&vv(0,0,r,e,a)}function xv(e,t){const n=document.createElement(t);return n.appendChild(e),n}class _v extends uv{static getType(){return"text"}static clone(e){return new _v(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e,t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return Ap[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===dg()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const t=Tp[e];return!!(this.getFormat()&t)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return sg(this.getLatest().__format,e,t)}canHaveFormat(){return!0}createDOM(e,t){const n=this.__format,r=gv(0,n),o=yv(0,n),i=null===r?o:r,a=document.createElement(i);let s=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),null!==r&&(s=document.createElement(o),a.appendChild(s)),wv(s,this,0,n,this.__text,e);const l=this.__style;return""!==l&&(a.style.cssText=l),a}updateDOM(e,t,n){const r=this.__text,o=e.__format,i=this.__format,a=gv(0,o),s=gv(0,i),l=yv(0,o),c=yv(0,i);if((null===a?l:a)!==(null===s?c:s))return!0;if(a===s&&l!==c){const e=t.firstChild;null==e&&Ip(48);const o=document.createElement(c);return wv(o,this,0,i,r,n),t.replaceChild(o,e),!1}let u=t;null!==s&&null!==a&&(u=t.firstChild,null==u&&Ip(49)),bv(r,u,this);const d=n.theme.text;void 0!==d&&o!==i&&vv(0,o,i,u,d);const f=e.__style,m=this.__style;return f!==m&&(t.style.cssText=m),!1}static importDOM(){return{"#text":()=>({conversion:Nv,priority:0}),b:()=>({conversion:Sv,priority:0}),code:()=>({conversion:Ov,priority:0}),em:()=>({conversion:Ov,priority:0}),i:()=>({conversion:Ov,priority:0}),s:()=>({conversion:Ov,priority:0}),span:()=>({conversion:Ev,priority:0}),strong:()=>({conversion:Ov,priority:0}),sub:()=>({conversion:Ov,priority:0}),sup:()=>({conversion:Ov,priority:0}),u:()=>({conversion:Ov,priority:0})}}static importJSON(e){const t=Mv(e.text);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportDOM(e){let{element:t}=super.exportDOM(e);return null!==t&&Jg(t)||Ip(132),t.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(t=xv(t,"b")),this.hasFormat("italic")&&(t=xv(t,"i")),this.hasFormat("strikethrough")&&(t=xv(t,"s")),this.hasFormat("underline")&&(t=xv(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(e,t){}setFormat(e){const t=this.getWritable();return t.__format="string"==typeof e?Tp[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail="string"==typeof e?Op[e]:e,t}setStyle(e){const t=this.getWritable();return t.__style=e,t}toggleFormat(e){const t=sg(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const t=Dp[e];if(this.__mode===t)return this;const n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.__text===e)return this;const t=this.getWritable();return t.__text=e,t}select(e,t){gb();let n=e,r=t;const o=tb(),i=this.getTextContent(),a=this.__key;if("string"==typeof i){const e=i.length;void 0===n&&(n=e),void 0===r&&(r=e)}else n=0,r=0;if(!Vv(o))return Jv(a,n,a,r,"text","text");{const e=dg();e!==o.anchor.key&&e!==o.focus.key||ug(a),o.setTextNodeRange(this,n,this,r)}return o}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){const o=this.getWritable(),i=o.__text,a=n.length;let s=e;s<0&&(s=a+s,s<0&&(s=0));const l=tb();if(r&&Vv(l)){const t=e+a;l.setTextNodeRange(o,t,o,t)}const c=i.slice(0,s)+n+i.slice(s+t);return o.__text=c,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){gb();const t=this.getLatest(),n=t.getTextContent(),r=t.__key,o=dg(),i=new Set(e),a=[],s=n.length;let l="";for(let e=0;e<s;e++)""!==l&&i.has(e)&&(a.push(l),l=""),l+=n[e];""!==l&&a.push(l);const c=a.length;if(0===c)return[];if(a[0]===n)return[t];const u=a[0],d=t.getParent();let f;const m=t.getFormat(),h=t.getStyle(),p=t.__detail;let g=!1;t.isSegmented()?(f=Mv(u),f.__format=m,f.__style=h,f.__detail=p,g=!0):(f=t.getWritable(),f.__text=u);const y=tb(),v=[f];let b=u.length;for(let e=1;e<c;e++){const t=a[e],n=t.length,i=Mv(t).getWritable();i.__format=m,i.__style=h,i.__detail=p;const s=i.__key,l=b+n;if(Vv(y)){const e=y.anchor,t=y.focus;e.key===r&&"text"===e.type&&e.offset>b&&e.offset<=l&&(e.key=s,e.offset-=b,y.dirty=!0),t.key===r&&"text"===t.type&&t.offset>b&&t.offset<=l&&(t.key=s,t.offset-=b,y.dirty=!0)}o===r&&ug(s),b=l,v.push(i)}if(null!==d){!function(e){const t=e.getPreviousSibling(),n=e.getNextSibling();null!==t&&cg(t),null!==n&&cg(n)}(this);const e=d.getWritable(),t=this.getIndexWithinParent();g?(e.splice(t,0,v),this.remove()):e.splice(t,1,v),Vv(y)&&rb(y,d,t,c-1)}return v}mergeWithSibling(e){const t=e===this.getPreviousSibling();t||e===this.getNextSibling()||Ip(50);const n=this.__key,r=e.__key,o=this.__text,i=o.length;dg()===r&&ug(n);const a=tb();if(Vv(a)){const o=a.anchor,s=a.focus;null!==o&&o.key===r&&(ab(o,t,n,e,i),a.dirty=!0),null!==s&&s.key===r&&(ab(s,t,n,e,i),a.dirty=!0)}const s=e.__text,l=t?s+o:o+s;this.setTextContent(l);const c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}}function Ev(e){return{forChild:Dv(e.style),node:null}}function Sv(e){const t=e,n="normal"===t.style.fontWeight;return{forChild:Dv(t.style,n?void 0:"bold"),node:null}}const kv=new WeakMap;function Cv(e){return"PRE"===e.nodeName||1===e.nodeType&&void 0!==e.style&&void 0!==e.style.whiteSpace&&e.style.whiteSpace.startsWith("pre")}function Nv(e){const t=e;null===e.parentElement&&Ip(129);let n=t.textContent||"";if(null!==function(e){let t,n=e.parentNode;const r=[e];for(;null!==n&&void 0===(t=kv.get(n))&&!Cv(n);)r.push(n),n=n.parentNode;const o=void 0===t?n:t;for(let e=0;e<r.length;e++)kv.set(r[e],o);return o}(t)){const e=n.split(/(\r?\n|\t)/),t=[],r=e.length;for(let n=0;n<r;n++){const r=e[n];"\n"===r||"\r\n"===r?t.push(mv()):"\t"===r?t.push(jv()):""!==r&&t.push(Mv(r))}return{node:t}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),""===n)return{node:null};if(" "===n[0]){let e=t,r=!0;for(;null!==e&&null!==(e=Pv(e,!1));){const t=e.textContent||"";if(t.length>0){/[ \t\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(" "===n[n.length-1]){let e=t,r=!0;for(;null!==e&&null!==(e=Pv(e,!0));)if((e.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return""===n?{node:null}:{node:Mv(n)}}function Pv(e,t){let n=e;for(;;){let e;for(;null===(e=t?n.nextSibling:n.previousSibling);){const e=n.parentElement;if(null===e)return null;n=e}if(n=e,1===n.nodeType){const e=n.style.display;if(""===e&&!Qg(n)||""!==e&&!e.startsWith("inline"))return null}let r=n;for(;null!==(r=t?n.firstChild:n.lastChild);)n=r;if(3===n.nodeType)return n;if("BR"===n.nodeName)return null}}const Tv={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Ov(e){const t=Tv[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:Dv(e.style,t),node:null}}function Mv(e=""){return qg(new _v(e))}function Rv(e){return e instanceof _v}function Dv(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),o="700"===n||"bold"===n,i=r.includes("line-through"),a="italic"===e.fontStyle,s=r.includes("underline"),l=e.verticalAlign;return e=>Rv(e)?(o&&!e.hasFormat("bold")&&e.toggleFormat("bold"),i&&!e.hasFormat("strikethrough")&&e.toggleFormat("strikethrough"),a&&!e.hasFormat("italic")&&e.toggleFormat("italic"),s&&!e.hasFormat("underline")&&e.toggleFormat("underline"),"sub"!==l||e.hasFormat("subscript")||e.toggleFormat("subscript"),"super"!==l||e.hasFormat("superscript")||e.toggleFormat("superscript"),t&&!e.hasFormat(t)&&e.toggleFormat(t),e):e}class Av extends _v{static getType(){return"tab"}static clone(e){return new Av(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text}constructor(e){super("\t",e),this.__detail=2}static importDOM(){return null}static importJSON(e){const t=jv();return t.setFormat(e.format),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(e){Ip(126)}setDetail(e){Ip(127)}setMode(e){Ip(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function jv(){return qg(new Av)}class Iv{constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){let t=this.getNode(),n=e.getNode();const r=this.offset,o=e.offset;if(Rb(t)){const e=t.getDescendantByIndex(r);t=null!=e?e:t}if(Rb(n)){const e=n.getDescendantByIndex(o);n=null!=e?e:n}return t===n?r<o:t.isBefore(n)}getNode(){const e=fg(this.key);return null===e&&Ip(20),e}set(e,t,n){const r=this._selection,o=this.key;this.key=e,this.offset=t,this.type=n,pb()||(dg()===o&&ug(e),null!==r&&(r.setCachedNodes(null),r.dirty=!0))}}function Fv(e,t,n){return new Iv(e,t,n)}function Lv(e,t){let n=t.__key,r=e.offset,o="element";if(Rv(t)){o="text";const e=t.getTextContentSize();r>e&&(r=e)}else if(!Rb(t)){const e=t.getNextSibling();if(Rv(e))n=e.__key,r=0,o="text";else{const e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,o)}function zv(e,t){if(Rb(t)){const n=t.getLastDescendant();Rb(n)||Rv(n)?Lv(e,n):Lv(e,t)}else Lv(e,t)}function Bv(e,t,n,r){e.key=t,e.offset=n,e.type=r}class Wv{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!$v(e))return!1;const t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every((e=>n.has(e)))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new Wv(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes(),n=t.length,r=t[n-1];let o;if(Rv(r))o=r.select();else{const e=r.getIndexWithinParent()+1;o=r.getParentOrThrow().select(e,e)}o.insertNodes(e);for(let e=0;e<n;e++)t[e].remove()}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=this._nodes,n=[];for(const e of t){const t=fg(e);null!==t&&n.push(t)}return pb()||(this._cachedNodes=n),n}getTextContent(){const e=this.getNodes();let t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}}function Vv(e){return e instanceof Uv}class Uv{constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!Vv(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=this.anchor,n=this.focus,r=t.isBefore(n),o=r?t:n,i=r?n:t;let a=o.getNode(),s=i.getNode();const l=o.offset,c=i.offset;if(Rb(a)){const e=a.getDescendantByIndex(l);a=null!=e?e:a}if(Rb(s)){let e=s.getDescendantByIndex(c);null!==e&&e!==a&&s.getChildAtIndex(c)===e&&(e=e.getPreviousSibling()),s=null!=e?e:s}let u;return u=a.is(s)?Rb(a)&&a.getChildrenSize()>0?[]:[a]:a.getNodesBetween(s),pb()||(this._cachedNodes=u),u}setTextNodeRange(e,t,n,r){Bv(this.anchor,e.__key,t,"text"),Bv(this.focus,n.__key,r,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const e=this.getNodes();if(0===e.length)return"";const t=e[0],n=e[e.length-1],r=this.anchor,o=this.focus,i=r.isBefore(o),[a,s]=Yv(this);let l="",c=!0;for(let u=0;u<e.length;u++){const d=e[u];if(Rb(d)&&!d.isInline())c||(l+="\n"),c=!d.isEmpty();else if(c=!1,Rv(d)){let e=d.getTextContent();d===t?d===n?"element"===r.type&&"element"===o.type&&o.offset!==r.offset||(e=a<s?e.slice(a,s):e.slice(s,a)):e=i?e.slice(a):e.slice(s):d===n&&(e=i?e.slice(0,s):e.slice(0,a)),l+=e}else!jb(d)&&!hv(d)||d===n&&this.isCollapsed()||(l+=d.getTextContent())}return l}applyDOMRange(e){const t=bb(),n=t.getEditorState()._selection,r=Zv(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(null===r)return;const[o,i]=r;Bv(this.anchor,o.key,o.offset,o.type),Bv(this.focus,i.key,i.offset,i.type),this._cachedNodes=null}clone(){const e=this.anchor,t=this.focus;return new Uv(Fv(e.key,e.offset,e.type),Fv(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=sg(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=Tp[e];return!!(this.format&t)}insertRawText(e){const t=e.split(/(\r?\n|\t)/),n=[],r=t.length;for(let e=0;e<r;e++){const r=t[e];"\n"===r||"\r\n"===r?n.push(mv()):"\t"===r?n.push(jv()):n.push(Mv(r))}this.insertNodes(n)}insertText(e){const t=this.anchor,n=this.focus,r=this.format,o=this.style;let i=t,a=n;!this.isCollapsed()&&n.isBefore(t)&&(i=n,a=t),"element"===i.type&&function(e,t,n,r){const o=e.getNode(),i=o.getChildAtIndex(e.offset),a=Mv(),s=Fb(o)?$b().append(a):a;a.setFormat(n),a.setStyle(r),null===i?o.append(s):i.insertBefore(s),e.is(t)&&t.set(a.__key,0,"text"),e.set(a.__key,0,"text")}(i,a,r,o);const s=i.offset;let l=a.offset;const c=this.getNodes(),u=c.length;let d=c[0];Rv(d)||Ip(26);const f=d.getTextContent().length,m=d.getParentOrThrow();let h=c[u-1];if(1===u&&"element"===a.type&&(l=f,a.set(i.key,l,"text")),this.isCollapsed()&&s===f&&(d.isSegmented()||d.isToken()||!d.canInsertTextAfter()||!m.canInsertTextAfter()&&null===d.getNextSibling())){let t=d.getNextSibling();if(Rv(t)&&t.canInsertTextBefore()&&!og(t)||(t=Mv(),t.setFormat(r),t.setStyle(o),m.canInsertTextAfter()?d.insertAfter(t):m.insertAfter(t)),t.select(0,0),d=t,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===s&&(d.isSegmented()||d.isToken()||!d.canInsertTextBefore()||!m.canInsertTextBefore()&&null===d.getPreviousSibling())){let t=d.getPreviousSibling();if(Rv(t)&&!og(t)||(t=Mv(),t.setFormat(r),m.canInsertTextBefore()?d.insertBefore(t):m.insertBefore(t)),t.select(),d=t,""!==e)return void this.insertText(e)}else if(d.isSegmented()&&s!==f){const e=Mv(d.getTextContent());e.setFormat(r),d.replace(e),d=e}else if(!this.isCollapsed()&&""!==e){const t=h.getParent();if(!m.canInsertTextBefore()||!m.canInsertTextAfter()||Rb(t)&&(!t.canInsertTextBefore()||!t.canInsertTextAfter()))return this.insertText(""),Xv(this.anchor,this.focus,null),void this.insertText(e)}if(1===u){if(d.isToken()){const t=Mv(e);return t.select(),void d.replace(t)}const t=d.getFormat(),n=d.getStyle();if(s!==l||t===r&&n===o){if(function(e){return e instanceof Av}(d)){const t=Mv(e);return t.setFormat(r),t.setStyle(o),t.select(),void d.replace(t)}}else{if(""!==d.getTextContent()){const t=Mv(e);if(t.setFormat(r),t.setStyle(o),t.select(),0===s)d.insertBefore(t,!1);else{const[e]=d.splitText(s);e.insertAfter(t,!1)}return void(t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length))}d.setFormat(r),d.setStyle(o)}const i=l-s;d=d.spliceText(s,i,e,!0),""===d.getTextContent()?d.remove():"text"===this.anchor.type&&(d.isComposing()?this.anchor.offset-=e.length:(this.format=t,this.style=n))}else{const t=new Set([...d.getParentKeys(),...h.getParentKeys()]),n=Rb(d)?d:d.getParentOrThrow();let r=Rb(h)?h:h.getParentOrThrow(),o=h;if(!n.is(r)&&r.isInline())do{o=r,r=r.getParentOrThrow()}while(r.isInline());if("text"===a.type&&(0!==l||""===h.getTextContent())||"element"===a.type&&h.getIndexWithinParent()<l)if(Rv(h)&&!h.isToken()&&l!==h.getTextContentSize()){if(h.isSegmented()){const e=Mv(h.getTextContent());h.replace(e),h=e}Fb(a.getNode())||"text"!==a.type||(h=h.spliceText(0,l,"")),t.add(h.__key)}else{const e=h.getParentOrThrow();e.canBeEmpty()||1!==e.getChildrenSize()?h.remove():e.remove()}else t.add(h.__key);const i=r.getChildren(),m=new Set(c),p=n.is(r),g=n.isInline()&&null===d.getNextSibling()?n:d;for(let e=i.length-1;e>=0;e--){const t=i[e];if(t.is(d)||Rb(t)&&t.isParentOf(d))break;t.isAttached()&&(!m.has(t)||t.is(o)?p||g.insertAfter(t,!1):t.remove())}if(!p){let e=r,n=null;for(;null!==e;){const r=e.getChildren(),o=r.length;(0===o||r[o-1].is(n))&&(t.delete(e.__key),n=e),e=e.getParent()}}if(d.isToken())if(s===f)d.select();else{const t=Mv(e);t.select(),d.replace(t)}else d=d.spliceText(s,f-s,e,!0),""===d.getTextContent()?d.remove():d.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length);for(let e=1;e<u;e++){const n=c[e],r=n.__key;t.has(r)||n.remove()}}}removeText(){this.insertText("")}formatText(e){if(this.isCollapsed())return this.toggleFormat(e),void ug(null);const t=this.getNodes(),n=[];for(const e of t)Rv(e)&&n.push(e);const r=n.length;if(0===r)return this.toggleFormat(e),void ug(null);const o=this.anchor,i=this.focus,a=this.isBackward(),s=a?i:o,l=a?o:i;let c=0,u=n[0],d="element"===s.type?0:s.offset;if("text"===s.type&&d===u.getTextContentSize()&&(c=1,u=n[1],d=0),null==u)return;const f=u.getFormatFlags(e,null),m=r-1;let h=n[m];const p="text"===l.type?l.offset:h.getTextContentSize();if(u.is(h)){if(d===p)return;if(og(u)||0===d&&p===u.getTextContentSize())u.setFormat(f);else{const e=u.splitText(d,p),t=0===d?e[0]:e[1];t.setFormat(f),"text"===s.type&&s.set(t.__key,0,"text"),"text"===l.type&&l.set(t.__key,p-d,"text")}return void(this.format=f)}0===d||og(u)||([,u]=u.splitText(d),d=0),u.setFormat(f);const g=h.getFormatFlags(e,f);p>0&&(p===h.getTextContentSize()||og(h)||([h]=h.splitText(p)),h.setFormat(g));for(let t=c+1;t<m;t++){const r=n[t],o=r.getFormatFlags(e,g);r.setFormat(o)}"text"===s.type&&s.set(u.__key,d,"text"),"text"===l.type&&l.set(h.__key,p,"text"),this.format=f|g}insertNodes(e){if(0===e.length)return;if("root"===this.anchor.key){this.insertParagraph();const t=tb();return Vv(t)||Ip(134),t.insertNodes(e)}const t=ny((this.isBackward()?this.focus:this.anchor).getNode(),ty),n=e[e.length-1];if("__language"in t&&Rb(t)){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const r=sb(this);t.splice(r,0,e),n.selectEnd()}return}if(!e.some((e=>(Rb(e)||jb(e))&&!e.isInline()))){Rb(t)||Ip(135);const r=sb(this);return t.splice(r,0,e),void n.selectEnd()}const r=function(e){const t=$b();let n=null;for(let r=0;r<e.length;r++){const o=e[r],i=hv(o);if(i||jb(o)&&o.isInline()||Rb(o)&&o.isInline()||Rv(o)||o.isParentRequired()){if(null===n&&(n=o.createParentElementNode(),t.append(n),i))continue;null!==n&&n.append(o)}else t.append(o),n=null}return t}(e),o=r.getLastDescendant(),i=r.getChildren(),a=Rb(t)&&t.isEmpty()?null:this.insertParagraph(),s=i[i.length-1];let l=i[0];var c;Rb(c=l)&&ty(c)&&!c.isEmpty()&&Rb(t)&&(!t.isEmpty()||t.canMergeWhenEmpty())&&(Rb(t)||Ip(135),t.append(...l.getChildren()),l=i[1]),l&&function(e,t){const n=t.getParentOrThrow().getLastChild();let r=t;const o=[t];for(;r!==n;)r.getNextSibling()||Ip(140),r=r.getNextSibling(),o.push(r);let i=e;for(const e of o)i=i.insertAfter(e)}(t,l);const u=ny(o,ty);a&&Rb(u)&&(a.canMergeWhenEmpty()||ty(s))&&(u.append(...a.getChildren()),a.remove()),Rb(t)&&t.isEmpty()&&t.remove(),o.selectEnd();const d=Rb(t)?t.getLastChild():null;hv(d)&&u!==t&&d.remove()}insertParagraph(){if("root"===this.anchor.key){const e=$b();return yg().splice(this.anchor.offset,0,[e]),e.select(),e}const e=sb(this),t=ny(this.anchor.getNode(),ty);Rb(t)||Ip(136);const n=t.getChildAtIndex(e),r=n?[n,...n.getNextSiblings()]:[],o=t.insertNewAfter(this,!1);return o?(o.append(...r),o.selectStart(),o):null}insertLineBreak(e){const t=mv();if(this.insertNodes([t]),e){const e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){const e=this.getNodes(),t=e.length,n=t-1,r=this.anchor,o=this.focus;let i=e[0],a=e[n];const[s,l]=Yv(this);if(0===t)return[];if(1===t){if(Rv(i)&&!this.isCollapsed()){const e=s>l?l:s,t=s>l?s:l,n=i.splitText(e,t),r=0===e?n[0]:n[1];return null!=r?[r]:[]}return[i]}const c=r.isBefore(o);if(Rv(i)){const t=c?s:l;t===i.getTextContentSize()?e.shift():0!==t&&([,i]=i.splitText(t),e[0]=i)}if(Rv(a)){const t=a.getTextContent().length,r=c?l:s;0===r?e.pop():r!==t&&([a]=a.splitText(r),e[n]=a)}return e}modify(e,t,n){const r=this.focus,o=this.anchor,i="move"===e,a=Lg(r,t);if(jb(a)&&!a.isIsolated()){if(i&&a.isKeyboardSelectable()){const e=Qv();return e.add(a.__key),void bg(e)}const e=t?a.getPreviousSibling():a.getNextSibling();if(Rv(e)){const n=e.__key,a=t?e.getTextContent().length:0;return r.set(n,a,"text"),void(i&&o.set(n,a,"text"))}{const n=a.getParentOrThrow();let s,l;return Rb(e)?(l=e.__key,s=t?e.getChildrenSize():0):(s=a.getIndexWithinParent(),l=n.__key,t||s++),r.set(l,s,"element"),void(i&&o.set(l,s,"element"))}}const s=bb(),l=Zg(s._window);if(!l)return;const c=s._blockCursorElement,u=s._rootElement;if(null===u||null===c||!Rb(a)||a.isInline()||a.canBeEmpty()||Xg(c,s,u),function(e,t,n,r){e.modify(t,n,r)}(l,e,t?"backward":"forward",n),l.rangeCount>0){const e=l.getRangeAt(0),n=this.anchor.getNode(),r=Fb(n)?n:function(e){let t=e.getParentOrThrow();for(;null!==t;){if(Yg(t))return t;t=t.getParentOrThrow()}return t}(n);if(this.applyDOMRange(e),this.dirty=!0,!i){const n=this.getNodes(),o=[];let i=!1;for(let e=0;e<n.length;e++){const t=n[e];$g(t,r)?o.push(t):i=!0}if(i&&o.length>0)if(t){const e=o[0];Rb(e)?e.selectStart():e.getParentOrThrow().selectStart()}else{const e=o[o.length-1];Rb(e)?e.selectEnd():e.getParentOrThrow().selectEnd()}l.anchorNode===e.startContainer&&l.anchorOffset===e.startOffset||function(e){const t=e.focus,n=e.anchor,r=n.key,o=n.offset,i=n.type;Bv(n,t.key,t.offset,t.type),Bv(t,r,o,i),e._cachedNodes=null}(this)}}}forwardDeletion(e,t,n){if(!n&&("element"===e.type&&Rb(t)&&e.offset===t.getChildrenSize()||"text"===e.type&&e.offset===t.getTextContentSize())){const e=t.getParent(),n=t.getNextSibling()||(null===e?null:e.getNextSibling());if(Rb(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const t=this.anchor;let n=t.getNode();if(this.forwardDeletion(t,n,e))return;const r=this.focus,o=Lg(r,e);if(jb(o)&&!o.isIsolated()){if(o.isKeyboardSelectable()&&Rb(n)&&0===n.getChildrenSize()){n.remove();const e=Qv();e.add(o.__key),bg(e)}else o.remove(),bb().dispatchCommand(gh,void 0);return}if(!e&&Rb(o)&&Rb(n)&&n.isEmpty())return n.remove(),void o.selectStart();if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&0===t.offset&&("element"===t.type?t.getNode():t.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const o="text"===r.type?r.getNode():null;if(n="text"===t.type?t.getNode():null,null!==o&&o.isSegmented()){const t=r.offset,i=o.getTextContentSize();if(o.is(n)||e&&t!==i||!e&&0!==t)return void qv(o,e,t)}else if(null!==n&&n.isSegmented()){const r=t.offset,i=n.getTextContentSize();if(n.is(o)||e&&0!==r||!e&&r!==i)return void qv(n,e,r)}!function(e,t){const n=e.anchor,r=e.focus,o=n.getNode();if(o===r.getNode()&&"text"===n.type&&"text"===r.type){const e=n.offset,i=r.offset,a=e<i,s=a?e:i,l=a?i:e,c=l-1;s!==c&&(_g(o.getTextContent().slice(s,l))||(t?r.offset=c:n.offset=c))}}(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset){const e=this.anchor.getNode();e.isEmpty()&&Fb(e.getParent())&&0===e.getIndexWithinParent()&&e.collapseAtStart(this)}}deleteLine(e){if(this.isCollapsed()){const t="element"===this.anchor.type;if(t&&this.insertText(" "),this.modify("extend",e,"lineboundary"),0===(e?this.focus:this.anchor).offset&&this.modify("extend",e,"character"),t){const t=e?this.anchor:this.focus;t.set(t.key,t.offset+1,t.type)}}this.removeText()}deleteWord(e){if(this.isCollapsed()){const t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function $v(e){return e instanceof Wv}function Hv(e){const t=e.offset;if("text"===e.type)return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function Yv(e){const t=e.getStartEndPoints();if(null===t)return[0,0];const[n,r]=t;return"element"===n.type&&"element"===r.type&&n.key===r.key&&n.offset===r.offset?[0,0]:[Hv(n),Hv(r)]}function qv(e,t,n){const r=e,o=r.getTextContent().split(/(?=\s)/g),i=o.length;let a=0,s=0;for(let e=0;e<i;e++){const r=e===i-1;if(s=a,a+=o[e].length,t&&a===n||a>n||r){o.splice(e,1),r&&(s=void 0);break}}const l=o.join("").trim();""===l?r.remove():(r.setTextContent(l),r.select(s,s))}function Kv(e,t,n,r){let o,i=t;if(1===e.nodeType){let a=!1;const s=e.childNodes,l=s.length,c=r._blockCursorElement;i===l&&(a=!0,i=l-1);let u=s[i],d=!1;if(u===c)u=s[i+1],d=!0;else if(null!==c){const n=c.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,c)&&i--}if(o=wg(u),Rv(o))i=xg(o,a);else{let r=wg(e);if(null===r)return null;if(Rb(r)){i=Math.min(r.getChildrenSize(),i);let e=r.getChildAtIndex(i);if(Rb(e)&&function(e,t,n){const r=e.getParent();return null===n||null===r||!r.canBeEmpty()||r!==n.getNode()}(e,0,n)){const t=a?e.getLastDescendant():e.getFirstDescendant();null===t?r=e:(e=t,r=Rb(e)?e:e.getParentOrThrow()),i=0}Rv(e)?(o=e,r=null,i=xg(e,a)):e!==r&&a&&!d&&i++}else{const n=r.getIndexWithinParent();i=0===t&&jb(r)&&wg(e)===r?n:n+1,r=r.getParentOrThrow()}if(Rb(r))return Fv(r.__key,i,"element")}}else o=wg(e);return Rv(o)?Fv(o.__key,i,"text"):null}function Gv(e,t,n){const r=e.offset,o=e.getNode();if(0===r){const r=o.getPreviousSibling(),i=o.getParent();if(t){if((n||!t)&&null===r&&Rb(i)&&i.isInline()){const t=i.getPreviousSibling();Rv(t)&&(e.key=t.__key,e.offset=t.getTextContent().length)}}else Rb(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):Rv(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)}else if(r===o.getTextContent().length){const r=o.getNextSibling(),i=o.getParent();if(t&&Rb(r)&&r.isInline())e.key=r.__key,e.offset=0,e.type="element";else if((n||t)&&null===r&&Rb(i)&&i.isInline()&&!i.canInsertTextAfter()){const t=i.getNextSibling();Rv(t)&&(e.key=t.__key,e.offset=0)}}}function Xv(e,t,n){if("text"===e.type&&"text"===t.type){const r=e.isBefore(t),o=e.is(t);Gv(e,r,o),Gv(t,!r,o),o&&(t.key=e.key,t.offset=e.offset,t.type=e.type);const i=bb();if(i.isComposing()&&i._compositionKey!==e.key&&Vv(n)){const r=n.anchor,o=n.focus;Bv(e,r.key,r.offset,r.type),Bv(t,o.key,o.offset,o.type)}}}function Zv(e,t,n,r,o,i){if(null===e||null===n||!eg(o,e,n))return null;const a=Kv(e,t,Vv(i)?i.anchor:null,o);if(null===a)return null;const s=Kv(n,r,Vv(i)?i.focus:null,o);if(null===s)return null;if("element"===a.type&&"element"===s.type){const t=wg(e),r=wg(n);if(jb(t)&&jb(r))return null}return Xv(a,s,i),[a,s]}function Jv(e,t,n,r,o,i){const a=vb(),s=new Uv(Fv(e,t,o),Fv(n,r,i),0,"");return s.dirty=!0,a._selection=s,s}function Qv(){return new Wv(new Set)}function eb(e,t,n,r){const o=n._window;if(null===o)return null;const i=r||o.event,a=i?i.type:void 0,s="selectionchange"===a,l=!Lp&&(s||"beforeinput"===a||"compositionstart"===a||"compositionend"===a||"click"===a&&i&&3===i.detail||"drop"===a||void 0===a);let c,u,d,f;if(Vv(e)&&!l)return e.clone();if(null===t)return null;if(c=t.anchorNode,u=t.focusNode,d=t.anchorOffset,f=t.focusOffset,s&&Vv(e)&&!eg(n,c,u))return e.clone();const m=Zv(c,d,u,f,n,e);if(null===m)return null;const[h,p]=m;return new Uv(h,p,Vv(e)?e.format:0,Vv(e)?e.style:"")}function tb(){return vb()._selection}function nb(){return bb()._editorState._selection}function rb(e,t,n,r=1){const o=e.anchor,i=e.focus,a=o.getNode(),s=i.getNode();if(!t.is(a)&&!t.is(s))return;const l=t.__key;if(e.isCollapsed()){const t=o.offset;if(n<=t&&r>0||n<t&&r<0){const n=Math.max(0,t+r);o.set(l,n,"element"),i.set(l,n,"element"),ob(e)}}else{const a=e.isBackward(),s=a?i:o,c=s.getNode(),u=a?o:i,d=u.getNode();if(t.is(c)){const e=s.offset;(n<=e&&r>0||n<e&&r<0)&&s.set(l,Math.max(0,e+r),"element")}if(t.is(d)){const e=u.offset;(n<=e&&r>0||n<e&&r<0)&&u.set(l,Math.max(0,e+r),"element")}}ob(e)}function ob(e){const t=e.anchor,n=t.offset,r=e.focus,o=r.offset,i=t.getNode(),a=r.getNode();if(e.isCollapsed()){if(!Rb(i))return;const e=i.getChildrenSize(),o=n>=e,a=o?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(Rv(a)){let e=0;o&&(e=a.getTextContentSize()),t.set(a.__key,e,"text"),r.set(a.__key,e,"text")}}else{if(Rb(i)){const e=i.getChildrenSize(),r=n>=e,o=r?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(Rv(o)){let e=0;r&&(e=o.getTextContentSize()),t.set(o.__key,e,"text")}}if(Rb(a)){const e=a.getChildrenSize(),t=o>=e,n=t?a.getChildAtIndex(e-1):a.getChildAtIndex(o);if(Rv(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,"text")}}}}function ib(e,t,n,r,o){let i=null,a=0,s=null;null!==r?(i=r.__key,Rv(r)?(a=r.getTextContentSize(),s="text"):Rb(r)&&(a=r.getChildrenSize(),s="element")):null!==o&&(i=o.__key,Rv(o)?s="text":Rb(o)&&(s="element")),null!==i&&null!==s?e.set(i,a,s):(a=t.getIndexWithinParent(),-1===a&&(a=n.getChildrenSize()),e.set(n.__key,a,"element"))}function ab(e,t,n,r,o){"text"===e.type?(e.key=n,t||(e.offset+=o)):e.offset>r.getIndexWithinParent()&&(e.offset-=1)}function sb(e){let t=e;e.isCollapsed()||t.removeText();const n=tb();Vv(n)&&(t=n),Vv(t)||Ip(161);const r=t.anchor;let o=r.getNode(),i=r.offset;for(;!ty(o);)[o,i]=lb(o,i);return i}function lb(e,t){const n=e.getParent();if(!n){const e=$b();return yg().append(e),e.select(),[yg(),0]}if(Rv(e)){const r=e.splitText(t);if(0===r.length)return[n,e.getIndexWithinParent()];const o=0===t?0:1;return[n,r[0].getIndexWithinParent()+o]}if(!Rb(e)||0===t)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const n=new Uv(Fv(e.__key,t,"element"),Fv(e.__key,t,"element"),0,""),o=e.insertNewAfter(n);o&&o.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}let cb=null,ub=null,db=!1,fb=!1,mb=0;const hb={characterData:!0,childList:!0,subtree:!0};function pb(){return db||null!==cb&&cb._readOnly}function gb(){db&&Ip(13)}function yb(){mb>99&&Ip(14)}function vb(){return null===cb&&Ip(195,wb()),cb}function bb(){return null===ub&&Ip(196,wb()),ub}function wb(){let e=0;const t=new Set,n=qb.version;if("undefined"!=typeof window)for(const r of document.querySelectorAll("[contenteditable]")){const o=rg(r);if(tg(o))e++;else if(o){let e=String(o.constructor.version||"<0.17.1");e===n&&(e+=" (separately built, likely a bundler configuration issue)"),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function xb(e,t,n){const r=t.__type,o=function(e,t){const n=e._nodes.get(t);return void 0===n&&Ip(30,t),n}(e,r);let i=n.get(r);void 0===i&&(i=Array.from(o.transforms),n.set(r,i));const a=i.length;for(let e=0;e<a&&(i[e](t),t.isAttached());e++);}function _b(e,t){return void 0!==e&&e.__key!==t&&e.isAttached()}function Eb(e,t){const n=e.type,r=t.get(n);void 0===r&&Ip(17,n);const o=r.klass;e.type!==o.getType()&&Ip(18,o.name);const i=o.importJSON(e),a=e.children;if(Rb(i)&&Array.isArray(a))for(let e=0;e<a.length;e++){const n=Eb(a[e],t);i.append(n)}return i}function Sb(e,t,n){const r=cb,o=db,i=ub;cb=t,db=!0,ub=e;try{return n()}finally{cb=r,db=o,ub=i}}function kb(e,t){const n=e._pendingEditorState,r=e._rootElement,o=e._headless||null===r;if(null===n)return;const i=e._editorState,a=i._selection,s=n._selection,l=0!==e._dirtyType,c=cb,u=db,d=ub,f=e._updating,m=e._observer;let h=null;if(e._pendingEditorState=null,e._editorState=n,!o&&l&&null!==m){ub=e,cb=n,db=!1,e._updating=!0;try{const t=e._dirtyType,r=e._dirtyElements,o=e._dirtyLeaves;m.disconnect(),h=function(e,t,n,r,o,i){yy="",xy="",vy="",_y=2===r,Sy=null,ly=n,sy=n._config,cy=n._nodes,uy=ly._listeners.mutation,dy=o,fy=i,my=e._nodeMap,hy=t._nodeMap,Ey=t._readOnly,py=new Map(n._keyToDOMMap);const a=new Map;return gy=a,Fy("root",null),ly=void 0,cy=void 0,dy=void 0,fy=void 0,my=void 0,hy=void 0,sy=void 0,py=void 0,gy=void 0,a}(i,n,e,t,r,o)}catch(t){if(t instanceof Error&&e._onError(t),fb)throw t;return Yb(e,null,r,n),Yp(e),e._dirtyType=2,fb=!0,kb(e,i),void(fb=!1)}finally{m.observe(r,hb),e._updating=f,cb=c,db=u,ub=d}}n._readOnly||(n._readOnly=!0);const p=e._dirtyLeaves,g=e._dirtyElements,y=e._normalizedNodes,v=e._updateTags,b=e._deferred;l&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(e,t){const n=e._decorators;let r=e._pendingDecorators||n;const o=t._nodeMap;let i;for(i in r)o.has(i)||(r===n&&(r=pg(e)),delete r[i])}(e,n);const w=o?null:Zg(e._window);if(e._editable&&null!==w&&(l||null===s||s.dirty)){ub=e,cb=n;try{if(null!==m&&m.disconnect(),l||null===s||s.dirty){const t=e._blockCursorElement;null!==t&&Xg(t,e,r),function(e,t,n,r,o,i){const a=r.anchorNode,s=r.focusNode,l=r.anchorOffset,c=r.focusOffset,u=document.activeElement;if(o.has("collaboration")&&u!==i||null!==u&&Qp(u))return;if(!Vv(t))return void(null!==e&&eg(n,a,s)&&r.removeAllRanges());const d=t.anchor,f=t.focus,m=d.key,h=f.key,p=Vg(n,m),g=Vg(n,h),y=d.offset,v=f.offset,b=t.format,w=t.style,x=t.isCollapsed();let _=p,E=g,S=!1;if("text"===d.type){_=ag(p);const e=d.getNode();S=e.getFormat()!==b||e.getStyle()!==w}else Vv(e)&&"text"===e.anchor.type&&(S=!0);var k,C,N,P,T;if("text"===f.type&&(E=ag(g)),null!==_&&null!==E&&(x&&(null===e||S||Vv(e)&&(e.format!==b||e.style!==w))&&(k=b,C=w,N=y,P=m,T=performance.now(),Jy=[k,C,N,P,T]),l!==y||c!==v||a!==_||s!==E||"Range"===r.type&&x||(null!==u&&i.contains(u)||i.focus({preventScroll:!0}),"element"===d.type))){try{r.setBaseAndExtent(_,y,E,v)}catch(e){}if(!o.has("skip-scroll-into-view")&&t.isCollapsed()&&null!==i&&i===document.activeElement){const e=t instanceof Uv&&"element"===t.anchor.type?_.childNodes[y]||null:r.rangeCount>0?r.getRangeAt(0):null;if(null!==e){let t;if(e instanceof Text){const n=document.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();!function(e,t,n){const r=n.ownerDocument,o=r.defaultView;if(null===o)return;let{top:i,bottom:a}=t,s=0,l=0,c=n;for(;null!==c;){const t=c===r.body;if(t)s=0,l=Hg(e).innerHeight;else{const e=c.getBoundingClientRect();s=e.top,l=e.bottom}let n=0;if(i<s?n=-(s-i):a>l&&(n=a-l),0!==n)if(t)o.scrollBy(0,n);else{const e=c.scrollTop;c.scrollTop+=n;const t=c.scrollTop-e;i-=t,a-=t}if(t)break;c=Ug(c)}}(n,t,i)}}Ky=!0}}(a,s,e,w,v,r)}(function(e,t,n){let r=e._blockCursorElement;if(Vv(n)&&n.isCollapsed()&&"element"===n.anchor.type&&t.contains(document.activeElement)){const o=n.anchor,i=o.getNode(),a=o.offset;let s=!1,l=null;if(a===i.getChildrenSize())Gg(i.getChildAtIndex(a-1))&&(s=!0);else{const t=i.getChildAtIndex(a);if(Gg(t)){const n=t.getPreviousSibling();(null===n||Gg(n))&&(s=!0,l=e.getElementByKey(t.__key))}}if(s){const n=e.getElementByKey(i.__key);return null===r&&(e._blockCursorElement=r=function(e){const t=e.theme,n=document.createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let r=t.blockCursor;if(void 0!==r){if("string"==typeof r){const e=Fp(r);r=t.blockCursor=e}void 0!==r&&n.classList.add(...r)}return n}(e._config)),t.style.caretColor="transparent",void(null===l?n.appendChild(r):n.insertBefore(r,l))}}null!==r&&Xg(r,e,t)})(e,r,s),null!==m&&m.observe(r,hb)}finally{ub=d,cb=c}}null!==h&&function(e,t,n,r,o){const i=Array.from(e._listeners.mutation),a=i.length;for(let e=0;e<a;e++){const[a,s]=i[e],l=t.get(s);void 0!==l&&a(l,{dirtyLeaves:r,prevEditorState:o,updateTags:n})}}(e,h,v,p,i),Vv(s)||null===s||null!==a&&a.is(s)||e.dispatchCommand(gh,void 0);const x=e._pendingDecorators;null!==x&&(e._decorators=x,e._pendingDecorators=null,Cb("decorator",e,!0,x)),function(e,t,n){const r=gg(t),o=gg(n);r!==o&&Cb("textcontent",e,!0,o)}(e,t||i,n),Cb("update",e,!0,{dirtyElements:g,dirtyLeaves:p,editorState:n,normalizedNodes:y,prevEditorState:t||i,tags:v}),function(e,t){if(e._deferred=[],0!==t.length){const n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}(e,b),function(e){const t=e._updates;if(0!==t.length){const n=t.shift();if(n){const[t,r]=n;Tb(e,t,r)}}}(e)}function Cb(e,t,n,...r){const o=t._updating;t._updating=n;try{const n=Array.from(t._listeners[e]);for(let e=0;e<n.length;e++)n[e].apply(null,r)}finally{t._updating=o}}function Nb(e,t,n){if(!1===e._updating||ub!==e){let r=!1;return e.update((()=>{r=Nb(e,t,n)})),r}const r=Eg(e);for(let o=4;o>=0;o--)for(let i=0;i<r.length;i++){const a=r[i]._commands.get(t);if(void 0!==a){const t=a[o];if(void 0!==t){const r=Array.from(t),o=r.length;for(let t=0;t<o;t++)if(!0===r[t](n,e))return!0}}}return!1}function Pb(e,t){const n=e._updates;let r=t||!1;for(;0!==n.length;){const t=n.shift();if(t){const[n,o]=t;let i,a;if(void 0!==o){if(i=o.onUpdate,a=o.tag,o.skipTransforms&&(r=!0),o.discrete){const t=e._pendingEditorState;null===t&&Ip(191),t._flushSync=!0}i&&e._deferred.push(i),a&&e._updateTags.add(a)}n()}}return r}function Tb(e,t,n){const r=e._updateTags;let o,i,a=!1,s=!1;void 0!==n&&(o=n.onUpdate,i=n.tag,null!=i&&r.add(i),a=n.skipTransforms||!1,s=n.discrete||!1),o&&e._deferred.push(o);const l=e._editorState;let c=e._pendingEditorState,u=!1;(null===c||c._readOnly)&&(c=e._pendingEditorState=new Bb(new Map((c||l)._nodeMap)),u=!0),c._flushSync=s;const d=cb,f=db,m=ub,h=e._updating;cb=c,db=!1,e._updating=!0,ub=e;try{u&&(e._headless?null!==l._selection&&(c._selection=l._selection.clone()):c._selection=function(e){const t=e.getEditorState()._selection,n=Zg(e._window);return Vv(t)||null==t?eb(t,n,e,null):t.clone()}(e));const n=e._compositionKey;t(),a=Pb(e,a),function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(Vv(r)){const e=r.anchor,t=r.focus;let o;if("text"===e.type&&(o=e.getNode(),o.selectionTransform(n,r)),"text"===t.type){const e=t.getNode();o!==e&&e.selectionTransform(n,r)}}}(c,e),0!==e._dirtyType&&(a?function(e,t){const n=t._dirtyLeaves,r=e._nodeMap;for(const e of n){const t=r.get(e);Rv(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&Gp(t)}}(c,e):function(e,t){const n=t._dirtyLeaves,r=t._dirtyElements,o=e._nodeMap,i=dg(),a=new Map;let s=n,l=s.size,c=r,u=c.size;for(;l>0||u>0;){if(l>0){t._dirtyLeaves=new Set;for(const e of s){const r=o.get(e);Rv(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&Gp(r),void 0!==r&&_b(r,i)&&xb(t,r,a),n.add(e)}if(s=t._dirtyLeaves,l=s.size,l>0){mb++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(const e of c){const n=e[0],s=e[1];if("root"!==n&&!s)continue;const l=o.get(n);void 0!==l&&_b(l,i)&&xb(t,l,a),r.set(n,s)}s=t._dirtyLeaves,l=s.size,c=t._dirtyElements,u=c.size,mb++}t._dirtyLeaves=n,t._dirtyElements=r}(c,e),Pb(e),function(e,t,n,r){const o=e._nodeMap,i=t._nodeMap,a=[];for(const[e]of r){const t=i.get(e);void 0!==t&&(t.isAttached()||(Rb(t)&&ay(t,e,o,i,a,r),o.has(e)||r.delete(e),a.push(e)))}for(const e of a)i.delete(e);for(const e of n){const t=i.get(e);void 0===t||t.isAttached()||(o.has(e)||n.delete(e),i.delete(e))}}(l,c,e._dirtyLeaves,e._dirtyElements)),n!==e._compositionKey&&(c._flushSync=!0);const r=c._selection;if(Vv(r)){const e=c._nodeMap,t=r.anchor.key,n=r.focus.key;void 0!==e.get(t)&&void 0!==e.get(n)||Ip(19)}else $v(r)&&0===r._nodes.size&&(c._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=l,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void kb(e)}finally{cb=d,db=f,ub=m,e._updating=h,mb=0}const p=0!==e._dirtyType||function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(null!==r){if(r.dirty||!r.is(n))return!0}else if(null!==n)return!0;return!1}(c,e);p?c._flushSync?(c._flushSync=!1,kb(e)):u&&Jp((()=>{kb(e)})):(c._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Ob(e,t,n){e._updating?e._updates.push([t,n]):Tb(e,t,n)}class Mb extends uv{constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return Rp[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){const e=[];let t=this.getFirstChild();for(;null!==t;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()}isDirty(){const e=bb()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){const e=[];let t=this.getFirstChild();for(;null!==t;){if(Rv(t)&&e.push(t),Rb(t)){const n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;Rb(e);){const t=e.getFirstChild();if(null===t)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;Rb(e);){const t=e.getLastChild();if(null===t)break;e=t}return e}getDescendantByIndex(e){const t=this.getChildren(),n=t.length;if(e>=n){const e=t[n-1];return Rb(e)&&e.getLastDescendant()||e||null}const r=t[e];return Rb(r)&&r.getFirstDescendant()||r||null}getFirstChild(){const e=this.getLatest().__first;return null===e?null:fg(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return null===e&&Ip(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return null===e?null:fg(e)}getLastChildOrThrow(){const e=this.getLastChild();return null===e&&Ip(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;null!==n&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;null!==n&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e="";const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContent(),Rb(o)&&r!==n-1&&!o.isInline()&&(e+=Ep)}return e}getTextContentSize(){let e=0;const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContentSize(),Rb(o)&&r!==n-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}hasFormat(e){if(""!==e){const t=Mp[e];return!!(this.getFormat()&t)}return!1}select(e,t){gb();const n=tb();let r=e,o=t;const i=this.getChildrenSize();if(!this.canBeEmpty())if(0===e&&0===t){const e=this.getFirstChild();if(Rv(e)||Rb(e))return e.select(0,0)}else if(!(void 0!==e&&e!==i||void 0!==t&&t!==i)){const e=this.getLastChild();if(Rv(e)||Rb(e))return e.select()}void 0===r&&(r=i),void 0===o&&(o=i);const a=this.__key;return Vv(n)?(n.anchor.set(a,r,"element"),n.focus.set(a,o,"element"),n.dirty=!0,n):Jv(a,r,a,o,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach((e=>e.remove())),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?Mp[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){const r=n.length,o=this.getChildrenSize(),i=this.getWritable(),a=i.__key,s=[],l=[],c=this.getChildAtIndex(e+t);let u=null,d=o-t+r;if(0!==e)if(e===o)u=this.getLastChild();else{const t=this.getChildAtIndex(e);null!==t&&(u=t.getPreviousSibling())}if(t>0){let e=null===u?this.getFirstChild():u.getNextSibling();for(let n=0;n<t;n++){null===e&&Ip(100);const t=e.getNextSibling(),n=e.__key;lg(e.getWritable()),l.push(n),e=t}}let f=u;for(let e=0;e<r;e++){const t=n[e];null!==f&&t.is(f)&&(u=f=f.getPreviousSibling());const r=t.getWritable();r.__parent===a&&d--,lg(r);const o=t.__key;if(null===f)i.__first=o,r.__prev=null;else{const e=f.getWritable();e.__next=o,r.__prev=e.__key}t.__key===a&&Ip(76),r.__parent=a,s.push(o),f=t}if(e+t===o)null!==f&&(f.getWritable().__next=null,i.__last=f.__key);else if(null!==c){const e=c.getWritable();if(null!==f){const t=f.getWritable();e.__prev=f.__key,t.__next=c.__key}else e.__prev=null}if(i.__size=d,l.length){const e=tb();if(Vv(e)){const t=new Set(l),n=new Set(s),{anchor:r,focus:o}=e;Db(r,t,n)&&ib(r,r.getNode(),this,u,c),Db(o,t,n)&&ib(o,o.getNode(),this,u,c),0!==d||this.canBeEmpty()||Yg(this)||this.remove()}}return i}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}}function Rb(e){return e instanceof Mb}function Db(e,t,n){let r=e.getNode();for(;r;){const e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}class Ab extends uv{constructor(e){super(e)}decorate(e,t){Ip(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function jb(e){return e instanceof Ab}class Ib extends Mb{static getType(){return"root"}static clone(){return new Ib}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){Ip(51)}getTextContent(){const e=this.__cachedText;return!pb()&&0!==bb()._dirtyType||null===e?super.getTextContent():e}remove(){Ip(52)}replace(e){Ip(53)}insertBefore(e){Ip(54)}insertAfter(e){Ip(55)}updateDOM(e,t){return!1}append(...e){for(let t=0;t<e.length;t++){const n=e[t];Rb(n)||jb(n)||Ip(56)}return super.append(...e)}static importJSON(e){const t=yg();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function Fb(e){return e instanceof Ib}function Lb(){return new Bb(new Map([["root",new Ib]]))}function zb(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&Ip(130,n.name),Rb(e)){const r=t.children;Array.isArray(r)||Ip(59,n.name);const o=e.getChildren();for(let e=0;e<o.length;e++){const t=zb(o[e]);r.push(t)}}return t}class Bb{constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e,t){return Sb(t&&t.editor||null,this,e)}clone(e){const t=new Bb(this._nodeMap,void 0===e?this._selection:e);return t._readOnly=!0,t}toJSON(){return Sb(null,this,(()=>({root:zb(yg())})))}}class Wb extends Mb{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class Vb extends Mb{constructor(e){super(e),this.__textFormat=0,this.__textStyle=""}static getType(){return"paragraph"}getTextFormat(){return this.getLatest().__textFormat}setTextFormat(e){const t=this.getWritable();return t.__textFormat=e,t}hasTextFormat(e){const t=Tp[e];return!!(this.getTextFormat()&t)}getTextStyle(){return this.getLatest().__textStyle}setTextStyle(e){const t=this.getWritable();return t.__textStyle=e,t}static clone(e){return new Vb(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}createDOM(e){const t=document.createElement("p"),n=jg(e.theme,"paragraph");return void 0!==n&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}static importDOM(){return{p:e=>({conversion:Ub,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(t&&Jg(t)){this.isEmpty()&&t.append(document.createElement("br"));const e=this.getFormatType();t.style.textAlign=e;const n=this.getDirection();n&&(t.dir=n);const r=this.getIndent();r>0&&(t.style.textIndent=20*r+"px")}return{element:t}}static importJSON(e){const t=$b();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t.setTextFormat(e.textFormat),t}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle(),type:"paragraph",version:1}}insertNewAfter(e,t){const n=$b();n.setTextFormat(e.format),n.setTextStyle(e.style);const r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getTextStyle()),this.insertAfter(n,t),n}collapseAtStart(){const e=this.getChildren();if(0===e.length||Rv(e[0])&&""===e[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function Ub(e){const t=$b();if(e.style){t.setFormat(e.style.textAlign);const n=parseInt(e.style.textIndent,10)/20;n>0&&t.setIndent(n)}return{node:t}}function $b(){return qg(new Vb)}function Hb(e){return e instanceof Vb}function Yb(e,t,n,r){const o=e._keyToDOMMap;o.clear(),e._editorState=Lb(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const i=e._observer;null!==i&&(i.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",o.set("root",n))}class qb{constructor(e,t,n,r,o,i,a){this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Sg(),this._onError=o,this._htmlConversions=i,this._editable=a,this._headless=null!==t&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){const t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){const t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){const t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){const t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){const t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,n){void 0===n&&Ip(35);const r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);const o=r.get(e);void 0===o&&Ip(36,String(e));const i=o[n];return i.add(t),()=>{i.delete(t),o.every((e=>0===e.size))&&r.delete(e)}}registerMutationListener(e,t,n){const r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,o=this._listeners.mutation;o.set(t,r);const i=n&&n.skipInitialization;return void 0===i||i||this.initializeMutationListener(t,r),()=>{o.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return void 0===t&&Ip(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const n=this._editorState,r=function(e){if(!e._readOnly&&e.isEmpty())return oy;e._readOnly||Ip(192);let t=ry.get(e);if(!t){t=new Map,ry.set(e,t);for(const[n,r]of e._nodeMap){const e=r.__type;let o=t.get(e);o||(o=new Map,t.set(e,o)),o.set(n,r)}}return t}(n).get(t.getType());if(!r)return;const o=new Map;for(const e of r.keys())o.set(e,"created");o.size>0&&e(o,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){const n=this.registerNodeTransformToKlass(e,t),r=[n],o=n.replaceWithKlass;if(null!=o){const e=this.registerNodeTransformToKlass(o,t);r.push(e)}var i;return i=e.getType(),Ob(this,(()=>{const e=vb();if(e.isEmpty())return;if("root"===i)return void yg().markDirty();const t=e._nodeMap;for(const[,e]of t)e.markDirty()}),null===this._pendingEditorState?{tag:"history-merge"}:void 0),()=>{r.forEach((e=>e.transforms.delete(t)))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return Bg(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const t=this._rootElement;if(e!==t){const n=jg(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,Yb(this,t,e,r),null!==t&&(this._config.disableEvents||function(e){const t=e.ownerDocument,n=qy.get(t);void 0===n&&Ip(162);const r=n-1;r>=0||Ip(164),qy.set(t,r),0===r&&t.removeEventListener("selectionchange",av);const o=rg(e);tg(o)?(function(e){if(null!==e._parentEditor){const t=Eg(e),n=t[t.length-1]._key;iv.get(n)===e&&iv.delete(n)}else iv.delete(e._key)}(o),e.__lexicalEditor=null):o&&Ip(198);const i=ov(e);for(let e=0;e<i.length;e++)i[e]();e.__lexicalEventHandles=[]}(t),null!=n&&t.classList.remove(...n)),null!==e){const t=function(e){const t=e.ownerDocument;return t&&t.defaultView||null}(e),r=e.style;r.userSelect="text",r.whiteSpace="pre-wrap",r.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=t,this._dirtyType=2,Yp(this),this._updateTags.add("history-merge"),kb(this),this._config.disableEvents||function(e,t){const n=e.ownerDocument,r=qy.get(n);(void 0===r||r<1)&&n.addEventListener("selectionchange",av),qy.set(n,(r||0)+1),e.__lexicalEditor=t;const o=ov(e);for(let n=0;n<Vy.length;n++){const[r,i]=Vy[n],a="function"==typeof i?e=>{lv(e)||(sv(e),(t.isEditable()||"click"===r)&&i(e,t))}:e=>{if(lv(e))return;sv(e);const n=t.isEditable();switch(r){case"cut":return n&&Bg(t,qh,e);case"copy":return Bg(t,Yh,e);case"paste":return n&&Bg(t,_h,e);case"dragstart":return n&&Bg(t,Uh,e);case"dragover":return n&&Bg(t,$h,e);case"dragend":return n&&Bg(t,Hh,e);case"focus":return n&&Bg(t,Qh,e);case"blur":return n&&Bg(t,ep,e);case"drop":return n&&Bg(t,Vh,e)}};e.addEventListener(r,a),o.push((()=>{e.removeEventListener(r,a)}))}}(e,this),null!=n&&e.classList.add(...n)}else this._editorState=r,this._pendingEditorState=null,this._window=null;Cb("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&Ip(38),Hp(this);const n=this._pendingEditorState,r=this._updateTags,o=void 0!==t?t.tag:null;null===n||n.isEmpty()||(null!=o&&r.add(o),kb(this)),this._pendingEditorState=e,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=o&&r.add(o),kb(this)}parseEditorState(e,t){return function(e,t,n){const r=Lb(),o=cb,i=db,a=ub,s=t._dirtyElements,l=t._dirtyLeaves,c=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,cb=r,db=!1,ub=t;try{const o=t._nodes;Eb(e.root,o),n&&n(),r._readOnly=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=l,t._cloneNotNeeded=c,t._dirtyType=u,cb=o,db=i,ub=a}return r}("string"==typeof e?JSON.parse(e):e,this,t)}read(e){return kb(this),this.getEditorState().read(e,{editor:this})}update(e,t){Ob(this,e,t)}focus(e,t={}){const n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),Ob(this,(()=>{const e=tb(),n=yg();null!==e?e.dirty=!0:0!==n.getChildrenSize()&&("rootStart"===t.defaultSelection?n.selectStart():n.selectEnd())}),{onUpdate:()=>{n.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;null!==e&&e.blur();const t=Zg(this._window);null!==t&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Cb("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}qb.version="0.17.1+prod.esm";const Kb="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Gb=Kb?s.useLayoutEffect:s.useEffect,Xb={tag:"history-merge"};function Zb({initialConfig:e,children:t}){const n=(0,s.useMemo)((()=>{const{theme:t,namespace:n,nodes:r,onError:o,editorState:i,html:a}=e,s=function(e,t){return{getTheme:function(){return null!=t?t:null}}}(0,t),l=function(e){const t=e||{},n=ub,r=t.theme||{},o=void 0===e?n:t.parentEditor||null,i=t.disableEvents||!1,a=Lb(),s=t.namespace||(null!==o?o._config.namespace:Sg()),l=t.editorState,c=[Ib,_v,dv,Av,Vb,Wb,...t.nodes||[]],{onError:u,html:d}=t,f=void 0===t.editable||t.editable;let m;if(void 0===e&&null!==n)m=n._nodes;else{m=new Map;for(let e=0;e<c.length;e++){let t=c[e],n=null,r=null;if("function"!=typeof t){const e=t;t=e.replace,n=e.with,r=e.withKlass||null}const o=t.getType(),i=t.transform(),a=new Set;null!==i&&a.add(i),m.set(o,{exportDOM:d&&d.export?d.export.get(t):void 0,klass:t,replace:n,replaceWithKlass:r,transforms:a})}}const h=new qb(a,o,m,{disableEvents:i,namespace:s,theme:r},u||console.error,function(e,t){const n=new Map,r=new Set,o=e=>{Object.keys(e).forEach((t=>{let r=n.get(t);void 0===r&&(r=[],n.set(t,r)),r.push(e[t])}))};return e.forEach((e=>{const t=e.klass.importDOM;if(null==t||r.has(t))return;r.add(t);const n=t.call(e.klass);null!==n&&o(n)})),t&&o(t),n}(m,d?d.import:void 0),f);return void 0!==l&&(h._pendingEditorState=l,h._dirtyType=2),h}({editable:e.editable,html:a,namespace:n,nodes:r,onError:e=>o(e,l),theme:t});return function(e,t){if(null!==t)if(void 0===t)e.update((()=>{const t=yg();if(t.isEmpty()){const n=$b();t.append(n);const r=Kb?document.activeElement:null;(null!==tb()||null!==r&&r===e.getRootElement())&&n.select()}}),Xb);else if(null!==t)switch(typeof t){case"string":{const n=e.parseEditorState(t);e.setEditorState(n,Xb);break}case"object":e.setEditorState(t,Xb);break;case"function":e.update((()=>{yg().isEmpty()&&t(e)}),Xb)}}(l,i),[l,s]}),[]);return Gb((()=>{const t=e.editable,[r]=n;r.setEditable(void 0===t||t)}),[]),(0,Dc.jsx)(mh.Provider,{value:n,children:t})}const Jb="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?s.useLayoutEffect:s.useEffect;function Qb(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function ew(e){return()=>function(e){if(!function(e,t=!0){if(e)return!1;let n=yg().getTextContent();return t&&(n=n.trim()),""===n}(e,!1))return!1;const t=yg().getChildren(),n=t.length;if(n>1)return!1;for(let e=0;e<n;e++){const n=t[e];if(jb(n))return!1;if(Rb(n)){if(!Hb(n))return!1;if(0!==n.__indent)return!1;const t=n.getChildren(),r=t.length;for(let n=0;n<r;n++)if(!Rv(t[e]))return!1}}return!0}(e)}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})),function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const tw="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,nw=tw&&"documentMode"in document?document.documentMode:null;function rw(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function ow(e,t){const n=Lg(e.focus,t);return jb(n)&&!n.isIsolated()||Rb(n)&&!n.isInline()&&!n.canBeEmpty()}function iw(e,t,n){const r=function(e){const t=e.anchor.getNode();return"rtl"===(Fb(t)?t:t.getParentOrThrow()).getDirection()}(e);!function(e,t,n){e.modify(t?"extend":"move",n,"character")}(e,t,n?!r:r)}function aw(e,t,n,r=null){let o=null===r||t.isSelected(r);const i=Rb(t)&&t.excludeFromCopy("html");let a=t;if(null!==r){let e=iy(t);e=Rv(e)&&null!==r?function(e,t){const n=e.getStartEndPoints();if(t.isSelected(e)&&!t.isSegmented()&&!t.isToken()&&null!==n){const[r,o]=n,i=e.isBackward(),a=r.getNode(),s=o.getNode(),l=t.is(a),c=t.is(s);if(l||c){const[n,r]=Yv(e),o=a.is(s),l=t.is(i?s:a),c=t.is(i?a:s);let u,d=0;return o?(d=n>r?r:n,u=n>r?n:r):l?(d=i?r:n,u=void 0):c&&(d=0,u=i?n:r),t.__text=t.__text.slice(d,u),t}}return t}(r,e):e,a=e}const s=Rb(a)?a.getChildren():[],l=e._nodes.get(a.getType());let c;c=l&&void 0!==l.exportDOM?l.exportDOM(e,a):a.exportDOM(e);const{element:u,after:d}=c;if(!u)return!1;const f=document.createDocumentFragment();for(let n=0;n<s.length;n++){const i=s[n],a=aw(e,i,f,r);!o&&Rb(t)&&a&&t.extractWithChild(i,r,"html")&&(o=!0)}if(o&&!i){if(Jg(u)&&u.append(f),n.append(u),d){const e=d.call(a,u);e&&u.replaceWith(e)}}else n.append(f);return o}tw&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),tw&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),!(!tw||!("InputEvent"in window)||nw)&&new window.InputEvent("input"),tw&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),tw&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&window.MSStream,tw&&/Android/.test(navigator.userAgent),tw&&/^(?=.*Chrome).*/i.test(navigator.userAgent),tw&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent),function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})),new Map,new Set(["STYLE","SCRIPT"]);var sw=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function lw(e,t){const n=e.getData("text/plain")||e.getData("text/uri-list");null!=n&&t.insertRawText(n)}"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement;const cw="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,uw=cw&&"documentMode"in document?document.documentMode:null,dw=!(!cw||!("InputEvent"in window)||uw)&&"getTargetRanges"in new window.InputEvent("input"),fw=cw&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),mw=cw&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,hw=cw&&/^(?=.*Chrome).*/i.test(navigator.userAgent),pw=cw&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!hw;function gw(e,t){t.update((()=>{if(null!==e){const r=function(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name}(e,KeyboardEvent)?null:e.clipboardData,o=tb();if(null!==o&&null!=r){e.preventDefault();const i=function(e,t=tb()){return null==t&&sw(166),Vv(t)&&t.isCollapsed()||0===t.getNodes().length?"":function(e,t){if("undefined"==typeof document||"undefined"==typeof window&&void 0===n.g.window)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const r=document.createElement("div"),o=yg().getChildren();for(let n=0;n<o.length;n++)aw(e,o[n],r,t);return r.innerHTML}(e,t)}(t);null!==i&&r.setData("text/html",i),r.setData("text/plain",o.getTextContent())}}}))}const yw="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?s.useLayoutEffect:s.useEffect;function vw(e){return e.getEditorState().read(ew(e.isComposing()))}function bw({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=hh(),o=function(e,t){const[n,r]=(0,s.useState)((()=>e.getDecorators()));return yw((()=>e.registerDecoratorListener((e=>{(0,Gt.flushSync)((()=>{r(e)}))}))),[e]),(0,s.useEffect)((()=>{r(e.getDecorators())}),[e]),(0,s.useMemo)((()=>{const r=[],o=Object.keys(n);for(let i=0;i<o.length;i++){const a=o[i],l=(0,Dc.jsx)(t,{onError:t=>e._onError(t),children:(0,Dc.jsx)(s.Suspense,{fallback:null,children:n[a]})}),c=e.getElementByKey(a);null!==c&&r.push((0,Gt.createPortal)(l,c,a))}return r}),[t,n,e])}(r,n);return function(e){yw((()=>rw(function(e){return rw(e.registerCommand(vh,(e=>{const t=tb();return!!Vv(t)&&(t.deleteCharacter(e),!0)}),0),e.registerCommand(Sh,(e=>{const t=tb();return!!Vv(t)&&(t.deleteWord(e),!0)}),0),e.registerCommand(kh,(e=>{const t=tb();return!!Vv(t)&&(t.deleteLine(e),!0)}),0),e.registerCommand(xh,(e=>{const t=tb();if(!Vv(t))return!1;if("string"==typeof e)t.insertText(e);else{const n=e.dataTransfer;if(null!=n)lw(n,t);else{const n=e.data;n&&t.insertText(n)}}return!0}),0),e.registerCommand(Eh,(()=>{const e=tb();return!!Vv(e)&&(e.removeText(),!0)}),0),e.registerCommand(bh,(e=>{const t=tb();return!!Vv(t)&&(t.insertLineBreak(e),!0)}),0),e.registerCommand(wh,(()=>{const e=tb();return!!Vv(e)&&(e.insertLineBreak(),!0)}),0),e.registerCommand(Rh,(e=>{const t=tb();if(!Vv(t))return!1;const n=e,r=n.shiftKey;return!!ow(t,!0)&&(n.preventDefault(),iw(t,r,!0),!0)}),0),e.registerCommand(Oh,(e=>{const t=tb();if(!Vv(t))return!1;const n=e,r=n.shiftKey;return!!ow(t,!1)&&(n.preventDefault(),iw(t,r,!1),!0)}),0),e.registerCommand(Lh,(t=>!!Vv(tb())&&(t.preventDefault(),e.dispatchCommand(vh,!0))),0),e.registerCommand(Bh,(t=>!!Vv(tb())&&(t.preventDefault(),e.dispatchCommand(vh,!1))),0),e.registerCommand(Ih,(t=>{if(!Vv(tb()))return!1;if(null!==t){if((mw||fw||pw)&&dw)return!1;t.preventDefault()}return e.dispatchCommand(bh,!1)}),0),e.registerCommand(Kh,(()=>(function(){const e=yg();bg(function(e){return Xp(e.anchor),Xp(e.focus),e}(e.select(0,e.getChildrenSize())))}(),!0)),0),e.registerCommand(Yh,(t=>!!Vv(tb())&&(gw(t,e),!0)),0),e.registerCommand(qh,(t=>!!Vv(tb())&&(function(e,t){gw(e,t),t.update((()=>{const e=tb();Vv(e)&&e.removeText()}))}(t,e),!0)),0),e.registerCommand(_h,(t=>!!Vv(tb())&&(function(e,t){e.preventDefault(),t.update((()=>{const t=tb(),{clipboardData:n}=e;null!=n&&Vv(t)&&lw(n,t)}),{tag:"paste"})}(t,e),!0)),0),e.registerCommand(Vh,(e=>!!Vv(tb())&&(e.preventDefault(),!0)),0),e.registerCommand(Uh,(e=>!!Vv(tb())&&(e.preventDefault(),!0)),0))}(e),function(e){const t=window.location.origin,n=n=>{if(n.origin!==t)return;const r=e.getRootElement();if(document.activeElement!==r)return;const o=n.data;if("string"==typeof o){let t;try{t=JSON.parse(o)}catch(e){return}if(t&&"nuanria_messaging"===t.protocol&&"request"===t.type){const r=t.payload;if(r&&"makeChanges"===r.functionId){const t=r.args;if(t){const[r,o,i,a,s,l]=t;e.update((()=>{const e=tb();if(Vv(e)){const t=e.anchor;let l=t.getNode(),c=0,u=0;if(Rv(l)&&r>=0&&o>=0&&(c=r,u=r+o,e.setTextNodeRange(l,c,l,u)),c===u&&""===i||(e.insertRawText(i),l=t.getNode()),Rv(l)){c=a,u=a+s;const t=l.getTextContentSize();c=c>t?t:c,u=u>t?t:u,e.setTextNodeRange(l,c,l,u)}n.stopImmediatePropagation()}}))}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}(e))),[e])}(r),(0,Dc.jsxs)(Dc.Fragment,{children:[e,(0,Dc.jsx)(ww,{content:t}),o]})}function ww({content:e}){const[t]=hh(),n=function(e){const[t,n]=(0,s.useState)((()=>vw(e)));return yw((()=>{function t(){const t=vw(e);n(t)}return t(),rw(e.registerUpdateListener((()=>{t()})),e.registerEditableListener((()=>{t()})))}),[e]),t}(t),r=function(e){const[t]=hh(),n=(0,s.useMemo)((()=>e(t)),[t,e]),r=(0,s.useRef)(n.initialValueFn()),[o,i]=(0,s.useState)(r.current);return Jb((()=>{const{initialValueFn:e,subscribe:t}=n,o=e();return r.current!==o&&(r.current=o,i(o)),t((e=>{r.current=e,i(e)}))}),[n,e]),o}(Qb);return n?"function"==typeof e?e(r):e:null}const xw="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?s.useLayoutEffect:s.useEffect,_w=(0,s.forwardRef)((function({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:o,ariaExpanded:i,ariaLabel:a,ariaLabelledBy:l,ariaMultiline:c,ariaOwns:u,ariaRequired:d,autoCapitalize:f,className:m,id:h,role:p="textbox",spellCheck:g=!0,style:y,tabIndex:v,"data-testid":b,...w},x){const[_,E]=(0,s.useState)(e.isEditable()),S=(0,s.useCallback)((t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)}),[e]),k=(0,s.useMemo)((()=>function(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}(x,S)),[S,x]);return xw((()=>(E(e.isEditable()),e.registerEditableListener((e=>{E(e)})))),[e]),(0,Dc.jsx)("div",{...w,"aria-activedescendant":_?t:void 0,"aria-autocomplete":_?n:"none","aria-controls":_?r:void 0,"aria-describedby":o,"aria-expanded":_&&"combobox"===p?!!i:void 0,"aria-label":a,"aria-labelledby":l,"aria-multiline":c,"aria-owns":_?u:void 0,"aria-readonly":!_||void 0,"aria-required":d,autoCapitalize:f,className:m,contentEditable:_,"data-testid":b,id:h,ref:k,role:_?p:void 0,spellCheck:g,style:y,tabIndex:v})}));function Ew(e){return e.getEditorState().read(ew(e.isComposing()))}const Sw=(0,s.forwardRef)((function(e,t){const{placeholder:n,...r}=e,[o]=hh();return(0,Dc.jsxs)(Dc.Fragment,{children:[(0,Dc.jsx)(_w,{editor:o,...r,ref:t}),null!=n&&(0,Dc.jsx)(kw,{editor:o,content:n})]})}));function kw({content:e,editor:t}){const n=function(e){const[t,n]=(0,s.useState)((()=>Ew(e)));return xw((()=>{function t(){const t=Ew(e);n(t)}return t(),rw(e.registerUpdateListener((()=>{t()})),e.registerEditableListener((()=>{t()})))}),[e]),t}(t),[r,o]=(0,s.useState)(t.isEditable());if((0,s.useLayoutEffect)((()=>(o(t.isEditable()),t.registerEditableListener((e=>{o(e)})))),[t]),!n)return null;let i=null;return"function"==typeof e?i=e(r):null!==e&&(i=e),null===i?null:(0,Dc.jsx)("div",{"aria-hidden":!0,children:i})}function Cw(e){e.undoStack=[],e.redoStack=[],e.current=null}function Nw({delay:e,externalHistoryState:t}){const[n]=hh();return function(e,t,n=1e3){const r=(0,s.useMemo)((()=>t||{current:null,redoStack:[],undoStack:[]}),[t]);(0,s.useEffect)((()=>function(e,t,n){const r=function(e,t){let n=Date.now(),r=0;return(o,i,a,s,l,c)=>{const u=Date.now();if(c.has("historic"))return r=0,n=u,2;const d=function(e,t,n,r,o){if(null===e||0===n.size&&0===r.size&&!o)return 0;const i=t._selection,a=e._selection;if(o)return 1;if(!(Vv(i)&&Vv(a)&&a.isCollapsed()&&i.isCollapsed()))return 0;const s=function(e,t,n){const r=e._nodeMap,o=[];for(const e of t){const t=r.get(e);void 0!==t&&o.push(t)}for(const[e,t]of n){if(!t)continue;const n=r.get(e);void 0===n||Fb(n)||o.push(n)}return o}(t,n,r);if(0===s.length)return 0;if(s.length>1){const n=t._nodeMap,r=n.get(i.anchor.key),o=n.get(a.anchor.key);return r&&o&&!e._nodeMap.has(r.__key)&&Rv(r)&&1===r.__text.length&&1===i.anchor.offset?2:0}const l=s[0],c=e._nodeMap.get(l.__key);if(!Rv(c)||!Rv(l)||c.__mode!==l.__mode)return 0;const u=c.__text,d=l.__text;if(u===d)return 0;const f=i.anchor,m=a.anchor;if(f.key!==m.key||"text"!==f.type)return 0;const h=f.offset,p=m.offset,g=d.length-u.length;return 1===g&&p===h-1?2:-1===g&&p===h+1?3:-1===g&&p===h?4:0}(o,i,s,l,e.isComposing()),f=(()=>{const f=null===a||a.editor===e,m=c.has("history-push");if(!m&&f&&c.has("history-merge"))return 0;if(null===o)return 1;const h=i._selection;return s.size>0||l.size>0?!1===m&&0!==d&&d===r&&u<n+t&&f||1===s.size&&function(e,t,n){const r=t._nodeMap.get(e),o=n._nodeMap.get(e),i=t._selection,a=n._selection;return!(Vv(i)&&Vv(a)&&"element"===i.anchor.type&&"element"===i.focus.type&&"text"===a.anchor.type&&"text"===a.focus.type||!Rv(r)||!Rv(o)||r.__parent!==o.__parent)&&JSON.stringify(t.read((()=>r.exportJSON())))===JSON.stringify(n.read((()=>o.exportJSON())))}(Array.from(s)[0],o,i)?0:1:null!==h?0:2})();return n=u,r=d,f}}(e,n),o=rw(e.registerCommand(Nh,(()=>(function(e,t){const n=t.redoStack,r=t.undoStack;if(0!==r.length){const o=t.current,i=r.pop();null!==o&&(n.push(o),e.dispatchCommand(Zh,!0)),0===r.length&&e.dispatchCommand(Jh,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:"historic"})}}(e,t),!0)),0),e.registerCommand(Ph,(()=>(function(e,t){const n=t.redoStack,r=t.undoStack;if(0!==n.length){const o=t.current;null!==o&&(r.push(o),e.dispatchCommand(Jh,!0));const i=n.pop();0===n.length&&e.dispatchCommand(Zh,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:"historic"})}}(e,t),!0)),0),e.registerCommand(Gh,(()=>(Cw(t),!1)),0),e.registerCommand(Xh,(()=>(Cw(t),e.dispatchCommand(Zh,!1),e.dispatchCommand(Jh,!1),!0)),0),e.registerUpdateListener((({editorState:n,prevEditorState:o,dirtyLeaves:i,dirtyElements:a,tags:s})=>{const l=t.current,c=t.redoStack,u=t.undoStack,d=null===l?null:l.editorState;if(null!==l&&n===d)return;const f=r(o,n,l,i,a,s);if(1===f)0!==c.length&&(t.redoStack=[],e.dispatchCommand(Zh,!1)),null!==l&&(u.push({...l}),e.dispatchCommand(Jh,!0));else if(2===f)return;t.current={editor:e,editorState:n}})));return o}(e,r,n)),[n,e,r])}(n,t,e),null}function Pw(e,t){return Pw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pw(e,t)}var Tw={error:null},Ow=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state=Tw,t.resetErrorBoundary=function(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null==t.props.onReset||(e=t.props).onReset.apply(e,r),t.reset()},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Pw(t,n),r.getDerivedStateFromError=function(e){return{error:e}};var o=r.prototype;return o.reset=function(){this.setState(Tw)},o.componentDidCatch=function(e,t){var n,r;null==(n=(r=this.props).onError)||n.call(r,e,t)},o.componentDidUpdate=function(e,t){var n,r,o,i,a=this.state.error,s=this.props.resetKeys;null!==a&&null!==t.error&&(void 0===(o=e.resetKeys)&&(o=[]),void 0===(i=s)&&(i=[]),o.length!==i.length||o.some((function(e,t){return!Object.is(e,i[t])})))&&(null==(n=(r=this.props).onResetKeysChange)||n.call(r,e.resetKeys,s),this.reset())},o.render=function(){var e=this.state.error,t=this.props,n=t.fallbackRender,r=t.FallbackComponent,o=t.fallback;if(null!==e){var i={error:e,resetErrorBoundary:this.resetErrorBoundary};if(s.isValidElement(o))return o;if("function"==typeof n)return n(i);if(r)return s.createElement(r,i);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},r}(s.Component);function Mw({children:e,onError:t}){return(0,Dc.jsx)(Ow,{fallback:(0,Dc.jsx)("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}const Rw="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?s.useLayoutEffect:s.useEffect;function Dw({ignoreHistoryMergeTagChange:e=!0,ignoreSelectionChange:t=!1,onChange:n}){const[r]=hh();return Rw((()=>{if(n)return r.registerUpdateListener((({editorState:o,dirtyElements:i,dirtyLeaves:a,prevEditorState:s,tags:l})=>{t&&0===i.size&&0===a.size||e&&l.has("history-merge")||s.isEmpty()||n(o,r,l)}))}),[r,e,t,n]),null}function Aw({editorRef:e}){const[t]=hh();return s.useEffect((()=>{"function"==typeof e?e(t):"object"==typeof e&&(e.current=t)}),[t]),null}var jw={xs:"py-1 px-2 pr-2 rounded [&_.editor-content>p]:text-xs [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-xs",sm:"px-3 py-2 rounded [&_.editor-content>p]:text-xs [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-xs [&_.pointer-events-none]:font-normal",md:"px-3.5 py-2.5 rounded-md [&_.editor-content>p]:text-sm [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-sm [&_.pointer-events-none]:font-normal",lg:"px-4 py-3 rounded-md [&_.editor-content>p]:text-base [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-base [&_.pointer-events-none]:font-normal"},Iw={xs:"p-1 rounded-md max-h-[8.75rem]",sm:"p-1.5 rounded-md max-h-[10.75rem]",md:"p-2 rounded-lg max-h-[13.5rem]",lg:"p-2 rounded-lg max-h-[13.5rem]"},Fw={xs:"p-1 rounded text-xs leading-4 font-normal",sm:"p-1.5 rounded text-xs leading-5 font-normal",md:"p-2 rounded-md text-sm leading-6 font-normal",lg:"p-2 rounded-md text-base leading-6 font-normal"};const Lw="startTransition",zw="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?s.useLayoutEffect:s.useEffect,Bw=e=>{const t=document.getElementById("typeahead-menu");if(!t)return;const n=t.getBoundingClientRect();n.top+n.height>window.innerHeight&&t.scrollIntoView({block:"center"}),n.top<0&&t.scrollIntoView({block:"center"}),e.scrollIntoView({block:"nearest"})};function Ww(e,t){const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top>r.top&&n.top<r.bottom}const Vw={};function Uw({close:e,editor:t,anchorElementRef:n,resolution:r,options:o,menuRenderFn:i,onSelectOption:a,shouldSplitNodeWithQuery:l=!1,commandPriority:c=1}){const[u,d]=(0,s.useState)(null),f=r.match&&r.match.matchingString;(0,s.useEffect)((()=>{d(0)}),[f]);const m=(0,s.useCallback)((n=>{t.update((()=>{const t=null!=r.match&&l?function(e){const t=tb();if(!Vv(t)||!t.isCollapsed())return null;const n=t.anchor;if("text"!==n.type)return null;const r=n.getNode();if(!r.isSimpleText())return null;const o=n.offset,i=r.getTextContent().slice(0,o),a=e.replaceableString.length,s=o-function(e,t,n){let r=n;for(let n=r;n<=t.length;n++)e.substr(-n)===t.substr(0,n)&&(r=n);return r}(i,e.matchingString,a);if(s<0)return null;let l;return 0===s?[l]=r.splitText(o):[,l]=r.splitText(s,o),l}(r.match):null;a(n,t,e,r.match?r.match.matchingString:"")}))}),[t,l,r.match,a,e]),h=(0,s.useCallback)((e=>{const n=t.getRootElement();null!==n&&(n.setAttribute("aria-activedescendant","typeahead-item-"+e),d(e))}),[t]);return(0,s.useEffect)((()=>()=>{const e=t.getRootElement();null!==e&&e.removeAttribute("aria-activedescendant")}),[t]),zw((()=>{null===o?d(null):null===u&&h(0)}),[o,u,h]),(0,s.useEffect)((()=>rw(t.registerCommand(Vw,(({option:e})=>!(!e.ref||null==e.ref.current||(Bw(e.ref.current),0))),c))),[t,h,c]),(0,s.useEffect)((()=>rw(t.registerCommand(jh,(e=>{const n=e;if(null!==o&&o.length&&null!==u){const e=u!==o.length-1?u+1:0;h(e);const r=o[e];null!=r.ref&&r.ref.current&&t.dispatchCommand(Vw,{index:e,option:r}),n.preventDefault(),n.stopImmediatePropagation()}return!0}),c),t.registerCommand(Ah,(e=>{const t=e;if(null!==o&&o.length&&null!==u){const e=0!==u?u-1:o.length-1;h(e);const n=o[e];null!=n.ref&&n.ref.current&&Bw(n.ref.current),t.preventDefault(),t.stopImmediatePropagation()}return!0}),c),t.registerCommand(zh,(t=>{const n=t;return n.preventDefault(),n.stopImmediatePropagation(),e(),!0}),c),t.registerCommand(Wh,(e=>{const t=e;return null!==o&&null!==u&&null!=o[u]&&(t.preventDefault(),t.stopImmediatePropagation(),m(o[u]),!0)}),c),t.registerCommand(Ih,(e=>null!==o&&null!==u&&null!=o[u]&&(null!==e&&(e.preventDefault(),e.stopImmediatePropagation()),m(o[u]),!0)),c))),[m,e,t,o,u,h,c]),i(n,(0,s.useMemo)((()=>({options:o,selectOptionAndCleanUp:m,selectedIndex:u,setHighlightedIndex:d})),[m,u,o]),r.match?r.match.matchingString:"")}function $w({options:e,onQueryChange:t,onSelectOption:n,onOpen:r,onClose:o,menuRenderFn:i,triggerFn:a,anchorClassName:c,commandPriority:u=1,parent:d}){const[f]=hh(),[m,h]=(0,s.useState)(null),p=function(e,t,n,r=document.body){const[o]=hh(),i=(0,s.useRef)(document.createElement("div")),a=(0,s.useCallback)((()=>{i.current.style.top=i.current.style.bottom;const t=o.getRootElement(),a=i.current,s=a.firstChild;if(null!==t&&null!==e){const{left:o,top:l,width:c,height:u}=e.getRect(),d=i.current.offsetHeight;if(a.style.top=`${l+window.pageYOffset+d+3}px`,a.style.left=`${o+window.pageXOffset}px`,a.style.height=`${u}px`,a.style.width=`${c}px`,null!==s){s.style.top=`${l}`;const e=s.getBoundingClientRect(),n=e.height,r=e.width,i=t.getBoundingClientRect();o+r>i.right&&(a.style.left=`${i.right-r+window.pageXOffset}px`),(l+n>window.innerHeight||l+n>i.bottom)&&l-i.top>n+u&&(a.style.top=l-n+window.pageYOffset-u+"px")}a.isConnected||(null!=n&&(a.className=n),a.setAttribute("aria-label","Typeahead menu"),a.setAttribute("id","typeahead-menu"),a.setAttribute("role","listbox"),a.style.display="block",a.style.position="absolute",r.append(a)),i.current=a,t.setAttribute("aria-controls","typeahead-menu")}}),[o,e,n,r]);(0,s.useEffect)((()=>{const t=o.getRootElement();if(null!==e)return a(),()=>{null!==t&&t.removeAttribute("aria-controls");const e=i.current;null!==e&&e.isConnected&&e.remove()}}),[o,a,e]);const l=(0,s.useCallback)((n=>{null!==e&&(n||t(null))}),[e,t]);return function(e,t,n,r){const[o]=hh();(0,s.useEffect)((()=>{if(null!=t&&null!=e){const e=o.getRootElement(),i=null!=e?function(e){let t=getComputedStyle(e);const n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.body;for(let o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.body}(e):document.body;let a=!1,s=Ww(t,i);const l=function(){a||(window.requestAnimationFrame((function(){n(),a=!1})),a=!0);const e=Ww(t,i);e!==s&&(s=e,null!=r&&r(e))},c=new ResizeObserver(n);return window.addEventListener("resize",n),document.addEventListener("scroll",l,{capture:!0,passive:!0}),c.observe(t),()=>{c.unobserve(t),window.removeEventListener("resize",n),document.removeEventListener("scroll",l,!0)}}}),[t,o,r,n,e])}(e,i.current,a,l),i}(m,h,c,d),g=(0,s.useCallback)((()=>{h(null),null!=o&&null!==m&&o()}),[o,m]),y=(0,s.useCallback)((e=>{h(e),null!=r&&null===m&&r(e)}),[r,m]);return(0,s.useEffect)((()=>{const e=f.registerUpdateListener((()=>{f.getEditorState().read((()=>{const e=f._window||window,n=e.document.createRange(),r=tb(),o=function(e){let t=null;return e.getEditorState().read((()=>{const e=tb();Vv(e)&&(t=function(e){const t=e.anchor;if("text"!==t.type)return null;const n=t.getNode();if(!n.isSimpleText())return null;const r=t.offset;return n.getTextContent().slice(0,r)}(e))})),t}(f);if(!Vv(r)||!r.isCollapsed()||null===o||null===n)return void g();const i=a(o,f);if(t(i?i.matchingString:null),null!==i&&!function(e,t){return 0===t&&e.getEditorState().read((()=>{const e=tb();if(Vv(e)){const t=e.anchor.getNode().getPreviousSibling();return Rv(t)&&t.isTextEntity()}return!1}))}(f,i.leadOffset)){const t=function(e,t,n){const r=n.getSelection();if(null===r||!r.isCollapsed)return!1;const o=r.anchorNode,i=e,a=r.anchorOffset;if(null==o||null==a)return!1;try{t.setStart(o,i),t.setEnd(o,a)}catch(e){return!1}return!0}(i.leadOffset,n,e);if(null!==t)return s=()=>y({getRect:()=>n.getBoundingClientRect(),match:i}),void(Lw in l()?l()[Lw](s):s())}var s;g()}))}));return()=>{e()}}),[f,a,t,m,g,y]),null===m||null===f?null:(0,Dc.jsx)(Uw,{close:g,resolution:m,editor:f,anchorElementRef:p,options:e,menuRenderFn:i,shouldSplitNodeWithQuery:!0,onSelectOption:n,commandPriority:u})}function Hw(e){return Hw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hw(e)}function Yw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var qw=function(e){switch(e){case"sm":return"xs";case"md":default:return"sm";case"lg":return"md"}},Kw=function(e){var t=e.data,n=e.by,r=e.size,o=e.nodeKey,i=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next,!1;!(s=(n=o.call(t)).done)&&(a.push(n.value),1!==a.length);s=!0);}catch(e){l=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(e)||function(e){if(e){if("string"==typeof e)return Yw(e,1);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Yw(e,1):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(hh())[0],a=!i.isEditable(),l=t;"object"===Hw(t)&&(l=t[n]);var c=(0,s.useCallback)((function(e){var t=fg(o);if(!t||!t.isSelected())return!1;var n=!1,r=t.getPreviousSibling();return Rb(r)&&(r.selectEnd(),n=!0),Rv(r)&&(r.select(),n=!0),jb(r)&&(r.selectNext(),n=!0),null===r&&(t.selectPrevious(),n=!0),n&&e.preventDefault(),n}),[o]),u=(0,s.useCallback)((function(e){var t=fg(o);if(!t||!t.isSelected())return!1;var n=!1,r=t.getNextSibling();return Rb(r)&&(r.selectStart(),n=!0),Rv(r)&&(r.select(0,0),n=!0),jb(r)&&(r.selectPrevious(),n=!0),null===r&&(t.selectNext(),n=!0),n&&e.preventDefault(),n}),[o]);return(0,s.useEffect)((function(){var e=rw(i.registerCommand(Rh,c,1),i.registerCommand(Oh,u,1));return function(){e()}}),[i,c,u]),React.createElement(Fo,{className:"inline-flex mr-0.5",type:"rounded",size:qw(r),label:l,icon:null,closable:!0,onClose:function(e){e.stopPropagation(),e.preventDefault(),a||i.update((function(){var e=fg(o);e&&e.remove()}))},disabled:a})};function Gw(e){return Gw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gw(e)}function Xw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tx(r.key),r)}}function Zw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Zw=function(){return!!e})()}function Jw(e){return Jw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Jw(e)}function Qw(e,t){return Qw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Qw(e,t)}function ex(e,t,n){return(t=tx(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tx(e){var t=function(e){if("object"!=Gw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Gw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Gw(t)?t:t+""}var nx=function(e){function t(e,n,r,o){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ex(i=function(e,t,n){return t=Jw(t),function(e,t){if(t&&("object"==Gw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Zw()?Reflect.construct(t,n||[],Jw(e).constructor):t.apply(e,n))}(this,t,[o]),"__data",void 0),ex(i,"__by",void 0),ex(i,"__size",void 0),i.__data=e,i.__by=n,i.__size=r,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qw(e,t)}(t,e),function(e,t,n){return t&&Xw(e.prototype,t),n&&Xw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createDOM",value:function(){return document.createElement("span")}},{key:"updateDOM",value:function(){return!1}},{key:"exportDOM",value:function(){return{element:document.createElement("span")}}},{key:"exportJSON",value:function(){return{type:t.getType(),data:this.__data,by:this.__by,size:this.__size,version:1}}},{key:"decorate",value:function(){return React.createElement(Kw,{data:this.__data,by:this.__by,size:this.__size,nodeKey:this.__key})}}],[{key:"getType",value:function(){return"mention"}},{key:"clone",value:function(e){return new t(e.__data,e.__by,e.__size,e.__key)}},{key:"importJSON",value:function(e){return rx(e.data,e.by,e.size)}}])}(Ab),rx=function(e,t,n){return new nx(e,t,n)},ox=nx;function ix(e){return ix="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ix(e)}function ax(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lx(r.key),r)}}function sx(e,t,n){return(t=lx(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lx(e){var t=function(e){if("object"!=ix(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ix(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ix(t)?t:t+""}var cx=function(e,t,n){return t&&ax(e.prototype,t),n&&ax(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),sx(this,"data",void 0),sx(this,"ref",{current:null}),this.data=t}));function ux(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var dx=new Map,fx=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"name",r=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next,!2;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){l=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(e)||function(e){if(e){if("string"==typeof e)return ux(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ux(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,s.useState)([])),o=r[0],i=r[1];return(0,s.useEffect)((function(){if(null!==t){var r=dx.get(t);null!==r&&(void 0===r?(dx.set(t,null),function(e,t,n,r){setTimeout((function(){var o=e.filter((function(e){var n;if("string"==typeof e)return e.toLowerCase().includes(t.toLowerCase());var o=null==e||null===(n=e[r])||void 0===n?void 0:n.toString();return!!o&&o.toLowerCase().includes(t.toLowerCase())}));n(o)}),500)}(e,t,(function(e){dx.set(t,e),i(e)}),n)):i(r))}else i([])}),[t]),o},mx=["size","children","selected","className"];function hx(){return hx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hx.apply(null,arguments)}var px=(0,s.forwardRef)((function(e,t){var n=e.size,r=e.children,o=e.selected,i=void 0!==o&&o,a=e.className,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,mx);return React.createElement("li",hx({role:"option",ref:t,className:re("m-0 text-text-primary cursor-pointer",Fw[n],i&&"bg-button-tertiary-hover",a)},s),r)}));px.displayName="Item";var gx=Object.assign((function(e){var t=e.size,n=e.className,r=e.children;return React.createElement("ul",{role:"menu",className:re("absolute inset-x-0 top-full mt-2 mx-0 mb-0 w-full h-auto overflow-y-auto overflow-x-hidden z-10 bg-background-primary border border-solid border-border-subtle shadow-lg",Iw[t],n)},r)}),{Item:px});function yx(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return vx(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vx(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var bx=function(e){var t=e.optionsArray,n=e.by,r=void 0===n?"name":n,o=e.size,i=void 0===o?"md":o,a=e.trigger,l=void 0===a?"@":a,c=e.menuComponent,u=void 0===c?gx:c,d=e.menuItemComponent,f=void 0===d?gx.Item:d,m=e.autoSpace,h=void 0===m||m,p=(0,s.useRef)(!1),g="\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;",y=[l].join(""),v="[^"+y+g+"\\s]",b="(?:\\.[ |$]| |["+g+"]|)",w=new RegExp("(^|\\s|\\()([".concat(y,"]((?:").concat(v).concat(b,"){0,").concat(75,"}))$")),x=new RegExp("(^|\\s|\\()([".concat(y,"]((?:").concat(v,"){0,").concat(50,"}))$")),_=yx(hh(),1)[0],E=yx((0,s.useState)(null),2),S=E[0],k=E[1],C=fx(t,S,r),N=(0,s.useCallback)((function(e,t,n){_.update((function(){var o=rx(e.data,r,i);t&&t.replace(o),n()}))}),[_]),P=(0,s.useMemo)((function(){return C.map((function(e){return new cx(e)}))}),[_,C]),T=(0,s.useCallback)((function(e){if(!h)return!1;var t=e.key,n=e.ctrlKey,r=e.metaKey;if(n||r||" "===t||t.length>1||p.current)return p.current&&(p.current=!1),!1;var o=tb(),i=o.focus,a=o.anchor,s=yx(o.getNodes(),1)[0];if(!a||!i||(null==a?void 0:a.key)!==(null==i?void 0:i.key)||(null==a?void 0:a.offset)!==(null==i?void 0:i.offset)||!s)return!1;if(function(e){return e instanceof nx}(s)){var l=Mv(" ");s.insertAfter(l)}}),[_,l,h]),O=(0,s.useCallback)((function(e){"Backspace"===e.key&&(p.current=!0)}),[p]);return(0,s.useEffect)((function(){if(_)return rw(_.registerCommand(Th,T,1),_.registerCommand(Lh,O,1))}),[_,T]),React.createElement($w,{onQueryChange:k,onSelectOption:N,triggerFn:function(e){var t=w.exec(e);if(null===t&&(t=x.exec(e)),null!==t){var n=t[1],r=t[3];if(r.length>=0)return{leadOffset:t.index+n.length,matchingString:r,replaceableString:t[2]}}return null},options:P,menuRenderFn:function(e,t){var n=t.selectedIndex,o=t.selectOptionAndCleanUp,a=t.setHighlightedIndex;return e.current&&!(null==P||!P.length)&&React.createElement(u,{size:i},P.map((function(e,t){var s;return React.createElement(f,{key:t,ref:e.ref,size:i,selected:t===n,onMouseEnter:function(){a(t)},onClick:function(){return o(e)}},"string"==typeof e.data?e.data:null===(s=e.data)||void 0===s?void 0:s[r])})))}})},wx={ltr:"ltr",rtl:"rtl",paragraph:"editor-paragraph",quote:"editor-quote",heading:{h1:"editor-heading-h1",h2:"editor-heading-h2",h3:"editor-heading-h3",h4:"editor-heading-h4",h5:"editor-heading-h5",h6:"editor-heading-h6"},list:{nested:{listitem:"editor-nested-listitem"},ol:"editor-list-ol",ul:"editor-list-ul",listitem:"editor-listItem",listitemChecked:"editor-listItemChecked",listitemUnchecked:"editor-listItemUnchecked"},hashtag:"editor-hashtag",image:"editor-image",link:"editor-link",text:{bold:"editor-textBold",code:"editor-textCode",italic:"editor-textItalic",strikethrough:"editor-textStrikethrough",subscript:"editor-textSubscript",superscript:"editor-textSuperscript",underline:"editor-textUnderline",underlineStrikethrough:"editor-textUnderlineStrikethrough"},code:"editor-code",codeHighlight:{atrule:"editor-tokenAttr",attr:"editor-tokenAttr",boolean:"editor-tokenProperty",builtin:"editor-tokenSelector",cdata:"editor-tokenComment",char:"editor-tokenSelector",class:"editor-tokenFunction","class-name":"editor-tokenFunction",comment:"editor-tokenComment",constant:"editor-tokenProperty",deleted:"editor-tokenProperty",doctype:"editor-tokenComment",entity:"editor-tokenOperator",function:"editor-tokenFunction",important:"editor-tokenVariable",inserted:"editor-tokenSelector",keyword:"editor-tokenAttr",namespace:"editor-tokenVariable",number:"editor-tokenProperty",operator:"editor-tokenOperator",prolog:"editor-tokenComment",property:"editor-tokenProperty",punctuation:"editor-tokenPunctuation",regex:"editor-tokenVariable",selector:"editor-tokenSelector",string:"editor-tokenSelector",symbol:"editor-tokenProperty",tag:"editor-tokenProperty",url:"editor-tokenOperator",variable:"editor-tokenVariable"}},xx=function(e){var t=e.content;return React.createElement("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-start text-field-placeholder"},t)};function _x(e){console.error(e)}var Ex=(0,s.forwardRef)((function(e,t){var n,r,o=e.defaultValue,i=void 0===o?"":o,a=e.placeholder,l=void 0===a?"Press @ to view variable suggestions":a,c=e.onChange,u=e.size,d=void 0===u?"md":u,f=e.autoFocus,m=void 0!==f&&f,h=e.options,p=void 0===h?[]:h,g=e.by,y=void 0===g?"name":g,v=e.trigger,b=void 0===v?"@":v,w=e.menuComponent,x=e.menuItemComponent,_=e.className,E=e.wrapperClassName,S=e.disabled,k=void 0!==S&&S,C=e.autoSpaceAfterMention,N=void 0!==C&&C,P={namespace:"Editor",editorTheme:wx,onError:_x,nodes:[ox],editorState:i||'{\n    "root": {\n        "children": [\n            {\n                "children": [],\n                "direction": null,\n                "format": "",\n                "indent": 0,\n                "type": "paragraph",\n                "version": 1,\n                "textFormat": 0,\n                "textStyle": ""\n            }\n        ],\n        "direction": null,\n        "format": "",\n        "indent": 0,\n        "type": "root",\n        "version": 1\n    }\n}',editable:!k};return(0,s.isValidElement)(w)&&(n=w),(0,s.isValidElement)(x)&&(r=x),React.createElement("div",{className:re("relative w-full","focus-within:ring-2 focus-within:ring-offset-2 hover:border-border-strong focus-within:!border-focus-border focus-within:ring-focus transition duration-150 ease-in-out outline outline-1 outline-field-border",jw[d],k&&"bg-field-secondary-background border-field-border-disabled hover:border-field-border-disabled [&_p]:text-badge-color-disabled cursor-not-allowed",E)},React.createElement(Zb,{initialConfig:P},React.createElement("div",{className:"relative w-full [&_p]:m-0"},React.createElement(bw,{contentEditable:React.createElement(Sw,{className:re("editor-content focus-visible:outline-none outline-none","w-full [&>p]:w-full [&>p]:m-0",_)}),placeholder:React.createElement(xx,{content:l}),ErrorBoundary:Mw})),React.createElement(Nw,null),React.createElement(bx,{menuComponent:n,menuItemComponent:r,size:d,by:y,optionsArray:p,trigger:b,autoSpace:N}),React.createElement(Dw,{onChange:function(e,t){"function"==typeof c&&c(e,t)},ignoreSelectionChange:!0}),t&&React.createElement(Aw,{editorRef:t}),m&&React.createElement(ph,null)))}));Ex.displayName="EditorInput";var Sx=Ex;const kx=xe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);var Cx=function(e,t){return re("rounded-full text-brand-primary-600 transition-colors duration-300",e[t].dot,e[t].ring)},Nx=["variant","size","type","currentStep","children","className","lineProps"],Px=["labelText","icon","stepClasses","isCurrent","isCompleted","className","type","variant","sizeClasses","size","isLast","index","lineProps"];function Tx(){return Tx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tx.apply(null,arguments)}function Ox(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Mx=function(e){var t=e.variant,n=void 0===t?"dot":t,r=e.size,o=void 0===r?"sm":r,i=e.type,a=void 0===i?"inline":i,s=e.currentStep,c=void 0===s?1:s,u=e.children,d=e.className,f=e.lineProps,m=void 0===f?"min-w-10":f,h=Ox(e,Nx),p=l().Children.count(u),g={sm:{dot:"size-2.5",ring:"size-5",numberIcon:"size-5 text-tiny",icon:"size-5",label:"text-xs"},md:{dot:"size-3",ring:"size-6",numberIcon:"size-6 text-sm",icon:"size-6",label:"text-sm"},lg:{dot:"size-3.5",ring:"size-7",numberIcon:"size-7 text-md",icon:"size-7",label:"text-sm"}},y=l().Children.map(u,(function(e,t){var r={isCompleted:t+1<c,isCurrent:t+1===c,sizeClasses:g,size:o,variant:n,type:a,isLast:t+1===p,index:t,lineProps:m};return l().createElement(l().Fragment,{key:t},l().cloneElement(e,r))}));return l().createElement("div",Tx({className:re("flex w-full",d,"inline"===a?"items-center justify-between":"")},h),y)},Rx=function(e){var t=e.labelText,n=void 0===t?"":t,r=e.icon,o=void 0===r?l().createElement(kx,null):r,i=(e.stepClasses,e.isCurrent),a=e.isCompleted,s=e.className,c=e.type,u=e.variant,d=e.sizeClasses,f=e.size,m=e.isLast,h=e.index,p=e.lineProps,g=Ox(e,Px),y=Dx(u,a,i,d,f,o,h),v={lg:"left-[calc(50%+14px)] right-[calc(-50%+14px)]",md:"left-[calc(50%+12px)] right-[calc(-50%+12px)]",sm:"left-[calc(50%+10px)] right-[calc(-50%+10px)]"},b={lg:"top-3.5",md:"top-3",sm:"top-2.5"},w=function(){if(n){var e=re(d[f].label,"text-text-tertiary",i?"text-brand-primary-600":"","break-word","stack"===c?"mt-2 transform max-w-xs":"mx-2 max-w-32");return l().createElement("span",{className:e},n)}return null},x=function(){if(!m){var e=re("block",a?"border-brand-primary-600":"border-border-subtle",p);return"stack"===c?l().createElement("div",{className:re("relative","flex","border-solid","border-y","absolute",a?"border-brand-primary-600":"border-border-subtle",b[f],v[f])},l().createElement("span",{className:"block"})):l().createElement("div",{className:"flex-1"},l().createElement("span",{className:re(e,"mr-2 border-y border-solid",!n&&"ml-2")}))}return null};return"stack"===c?l().createElement("div",{className:"relative flex-1 justify-center"},l().createElement("div",Tx({className:re("flex items-center flex-col",s)},g),y,w()),x()):l().createElement(l().Fragment,null,l().createElement("div",Tx({className:re("flex items-center",s)},g),y,w()),x())};Rx.displayName="ProgressSteps.Step";var Dx=function(e,t,n,r,o,i,a){if(t)return l().createElement(Ee,{className:Cx(r,o)});var s=function(e,t,n){return re("relative flex items-center rounded-full justify-center transition-colors z-10 duration-500 ring-1",e?"ring-brand-primary-600":"ring-border-subtle",t[n].ring)}(n,r,o),c=function(e,t,n,r){var o="absolute rounded-full transition-colors duration-500 ".concat(n[r].dot);return"dot"===e?re(o,n[r].dot,t?"bg-brand-primary-600":"bg-text-tertiary"):"number"===e?re(o,n[r].dot,t?"text-brand-primary-600":"text-text-tertiary","flex items-center justify-center"):"icon"===e?re(o,t?"text-brand-primary-600":"text-text-tertiary","flex items-center justify-center"):""}(e,n,r,o),u=null;return"number"===e?u=a+1:"icon"===e&&i&&(u=i),l().createElement("span",{className:s},l().createElement("span",{className:c},u))};Mx.Step=Rx;var Ax=Mx,jx=["variant","className"];function Ix(){return Ix=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ix.apply(null,arguments)}var Fx=function(e){var t,n,r=e.variant,o=void 0===r?"rectangular":r,i=e.className,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,jx),s=null===(t={circular:"rounded-full bg-gray-200 ",rectangular:"rounded-md bg-gray-200"})||void 0===t?void 0:t[o],c=null===(n={circular:"size-10",rectangular:"w-96 h-3"})||void 0===n?void 0:n[o];return l().createElement("div",Ix({className:re(s,"animate-pulse",c,i)},a))};function Lx(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return zx(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zx(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Bx=(0,s.createContext)(),Wx=function(){return(0,s.useContext)(Bx)},Vx=function(e){var t=e.size,n=void 0===t?"md":t,r=e.children,o=e.className;return l().createElement(Bx.Provider,{value:{size:n}},l().createElement("div",{className:re("flex flex-col bg-background-primary p-2",o)},r))};Vx.displayName="Menu";var Ux=function(e){var t,n,r=e.heading,o=e.arrow,i=void 0!==o&&o,a=e.showArrowOnHover,c=void 0===a||a,u=e.open,d=void 0===u||u,f=e.onClick,m=e.children,h=e.className,p=Lx((0,s.useState)(d),2),g=p[0],y=p[1],v=Lx((0,s.useState)(!1),2),b=v[0],w=v[1],x=Wx().size,_=null===(t={sm:"text-xs",md:"text-sm"})||void 0===t?void 0:t[x],E=null===(n={sm:"[&>svg]:size-4",md:"[&>svg]:size-5"})||void 0===n?void 0:n[x],S=function(){y(!g),f&&f(!g)};return l().createElement("div",null,l().createElement("div",{role:"button",tabIndex:"0",onClick:S,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||S()},onMouseEnter:function(){return c&&w(!0)},onMouseLeave:function(){return c&&w(!1)},className:re("text-text-primary bg-transparent cursor-pointer flex justify-between items-center gap-1",_,r?"p-1":"p-0",h),"aria-expanded":g},l().createElement("span",{className:"text-text-tertiary"},r),i&&l().createElement(vf.span,{variants:{open:{rotate:180},closed:{rotate:0}},animate:g?"open":"closed",transition:{duration:.15},className:re("flex items-center text-border-strong",E)},l().createElement(vf.div,{initial:"hidden",animate:g||b?"visible":"hidden",exit:"hidden",variants:{visible:{opacity:1},hidden:{opacity:0}},transition:{duration:.15}},l().createElement(Cf,null)))),l().createElement(wm,{initial:!1},g&&l().createElement(vf.ul,{variants:{open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},initial:"closed",animate:"open",exit:"closed",transition:{duration:.3,ease:"easeInOut"},className:"overflow flex gap-0.5 flex-col m-0 bg-white rounded p-0"},m)))};Ux.displayName="Menu.List";var $x=function(e){var t,n=e.disabled,r=void 0!==n&&n,o=e.active,i=e.onClick,a=e.children,s=e.className,c=Wx().size,u=null===(t={sm:"[&>svg]:size-4 [&>svg]:m-1 [&>*:not(svg)]:mx-1 [&>*:not(svg)]:my-0.5 text-sm",md:"[&>svg]:size-5 [&>svg]:m-1.5 [&>*:not(svg)]:m-1 text-base"})||void 0===t?void 0:t[c],d=r?"text-text-disabled hover:text-text-disabled cursor-not-allowed hover:bg-transparent":"",f=o?"text-icon-primary [&>svg]:text-icon-interactive bg-background-secondary":"";return l().createElement("li",{role:"menuitem",tabIndex:"0",onClick:i,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||i()},className:re("flex p-1 gap-1 items-center bg-transparent border-none rounded text-text-secondary cursor-pointer m-0",u,"hover:bg-background-secondary hover:text-text-primary",d,f,"transition-colors duration-300 ease-in-out",s)},a)};$x.displayName="Menu.Item";var Hx=function(e){var t,n=e.variant,r=void 0===n?"solid":n,o=e.className,i=null===(t={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted",double:"border-double",hidden:"border-hidden",none:"border-none"})||void 0===t?void 0:t[r];return l().createElement(l().Fragment,null,l().createElement("hr",{className:re("w-full border-0 border-t border-border-subtle",i,o)}))};Hx.displayName="Menu.Separator";var Yx=Object.assign(Vx,{List:Ux,Item:$x,Separator:Hx});const qx=xe("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]),Kx=xe("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);var Gx=["children","className","onCollapseChange","collapsible","screenHeight","borderOn"];function Xx(){return Xx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xx.apply(null,arguments)}function Zx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Jx=(0,s.createContext)(),Qx=function(e){var t=e.children,n=e.className,r=e.onCollapseChange,o=e.collapsible,i=void 0===o||o,a=e.screenHeight,c=void 0===a||a,u=e.borderOn,d=void 0===u||u,f=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Gx),m=(0,s.useRef)(null),h=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next,!2;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){l=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(e)||function(e){if(e){if("string"==typeof e)return Zx(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Zx(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,s.useState)((function(){var e=localStorage.getItem("sidebar-collapsed"),t=window.innerWidth<1280;return e?JSON.parse(e):t}))),p=h[0],g=h[1];return(0,s.useEffect)((function(){r&&r(p)}),[p,r]),(0,s.useEffect)((function(){var e=function(){var e=window.innerWidth<1280;if(i)if(e)g(!0),localStorage.setItem("sidebar-collapsed",JSON.stringify(!0));else{var t=localStorage.getItem("sidebar-collapsed");g(!!t&&JSON.parse(t))}else g(!1),localStorage.removeItem("sidebar-collapsed");m.current&&(m.current.style.height=c?"".concat(window.innerHeight,"px"):"auto")};return window.addEventListener("resize",e),e(),function(){window.removeEventListener("resize",e)}}),[c,i]),l().createElement(Jx.Provider,{value:{isCollapsed:p,setIsCollapsed:g,collapsible:i}},l().createElement("div",Xx({ref:m,className:re("overflow-auto w-72 px-4 py-4 gap-4 flex flex-col bg-background-primary",d&&"border-0 border-r border-solid border-border-subtle",!!c&&"h-screen","transition-all duration-200",p&&"w-16 px-2",n)},f),t))};Qx.displayName="Sidebar";var e_=function(e){var t=e.children;return l().createElement("div",{className:"space-y-2"},t)};e_.displayName="Sidebar.Header";var t_=function(e){var t=e.children;return l().createElement("div",{className:re("space-y-4 grow items-start")},t)};t_.displayName="Sidebar.Body";var n_=function(e){var t=e.children,n=(0,s.useContext)(Jx),r=n.isCollapsed,o=n.setIsCollapsed,i=n.collapsible;return l().createElement("div",{className:"space-y-4"},t,i&&l().createElement("button",{className:re("bg-transparent w-full border-0 p-0 m-0 flex items-center gap-2 text-base cursor-pointer",r&&"justify-center"),onClick:function(){o(!r),localStorage.setItem("sidebar-collapsed",JSON.stringify(!r))},"aria-label":r?"Expand sidebar":"Collapse sidebar"},r?l().createElement(l().Fragment,null,l().createElement(xo,{title:"Expand",placement:"right"},l().createElement(qx,{className:"size-5"}))):l().createElement(l().Fragment,null,l().createElement(Kx,{className:"size-5"})," Collapse")))};n_.displayName="Sidebar.Footer";var r_=function(e){var t=e.children,n=e.className;return l().createElement("div",{className:re("w-full",n)},t)};r_.displayName="Sidebar.Item";var o_=Object.assign(Qx,{Header:e_,Body:t_,Footer:n_,Item:r_});const i_=xe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),a_=xe("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);var s_=["href","children","className","as"];function l_(){return l_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l_.apply(null,arguments)}var c_=(0,s.createContext)(),u_={sm:{text:"text-sm",separator:"text-sm",separatorIconSize:16},md:{text:"text-base",separator:"text-base",separatorIconSize:18}},d_=function(e){var t=e.children,n=e.size,r=u_[void 0===n?"sm":n]||u_.sm;return l().createElement(c_.Provider,{value:{sizes:r}},l().createElement("nav",{className:"flex m-0","aria-label":"Breadcrumb"},l().createElement("ul",{className:"m-0 inline-flex items-center space-x-1 md:space-x-1"},t)))};d_.displayName="Breadcrumb";var f_=function(e){var t=e.children;return l().createElement(l().Fragment,null,t)};f_.displayName="Breadcrumb.List";var m_=function(e){var t=e.children;return l().createElement("li",{className:"m-0 inline-flex items-center gap-2"},t)};m_.displayName="Breadcrumb.Item";var h_=function(e){var t=e.href,n=e.children,r=e.className,o=e.as,i=void 0===o?"a":o,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,s_),c=(0,s.useContext)(c_).sizes;return l().createElement(i,l_({href:t,className:re(c.text,"px-1 font-medium no-underline text-text-tertiary hover:text-text-primary hover:underline","focus:outline-none focus:ring-1 focus:ring-border-interactive focus:border-border-interactive focus:rounded-sm","transition-all duration-200",r)},a),n)};h_.displayName="Breadcrumb.Link";var p_=function(e){var t=e.type,n=(0,s.useContext)(c_).sizes,r={slash:l().createElement("span",{className:re("mx-1",n.separator)},"/"),arrow:l().createElement(i_,{size:n.separatorIconSize})};return l().createElement("span",{className:"flex items-center text-text-tertiary mx-2"},r[t]||r.arrow)};p_.displayName="Breadcrumb.Separator";var g_=function(){var e=(0,s.useContext)(c_).sizes;return l().createElement(a_,{className:"mt-[2px] cursor-pointer text-text-tertiary hover:text-text-primary",size:e.separatorIconSize+4})};g_.displayName="Breadcrumb.Ellipsis";var y_=function(e){var t=e.children,n=(0,s.useContext)(c_).sizes;return l().createElement("span",{className:re(n.text,"font-medium text-text-primary")},t)};y_.displayName="Breadcrumb.Page";var v_=Object.assign(d_,{List:f_,Item:m_,Link:h_,Separator:p_,Ellipsis:g_,Page:y_}),b_=["className"],w_=["children","className"],x_=["children","as","className"],__=["children","as","className"],E_=["className"],S_=["children","as"],k_=["children","className"];function C_(){return C_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C_.apply(null,arguments)}function N_(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function P_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var T_=(0,s.createContext)(),O_=function(){return(0,s.useContext)(T_)},M_={open:{opacity:1},exit:{opacity:0}},R_={duration:.2},D_=function(e){var t=e.open,n=e.setOpen,r=e.children,o=e.trigger,i=e.className,a=e.exitOnClickOutside,l=void 0!==a&&a,c=e.exitOnEsc,u=void 0===c||c,d=e.design,f=void 0===d?"simple":d,m=e.scrollLock,h=void 0===m||m,p=void 0!==t&&void 0!==n,g=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next,!2;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){l=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(e)||function(e){if(e){if("string"==typeof e)return P_(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?P_(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,s.useState)(!1)),y=g[0],v=g[1],b=(0,s.useRef)(null),w=(0,s.useRef)(null),x=(0,s.useMemo)((function(){return p?t:y}),[t,y]),_=(0,s.useMemo)((function(){return p?n:v}),[v,v]),E=function(){x||_(!0)},S=function(){x&&_(!1)},k=(0,s.useCallback)((function(){return(0,s.isValidElement)(o)?(0,s.cloneElement)(o,{onClick:oe(E,o.props.onClick)}):"function"==typeof o?o({onClick:E}):null}),[o,E,S]),C=function(e){"Escape"===e.key&&u&&S()},N=function(e){l&&b.current&&!b.current.contains(e.target)&&S()};return(0,s.useEffect)((function(){return window.addEventListener("keydown",C),document.addEventListener("mousedown",N),function(){window.removeEventListener("keydown",C),document.removeEventListener("mousedown",N)}}),[x]),(0,s.useEffect)((function(){if(h)return x&&(document.querySelector("html").style.overflow="hidden"),function(){document.querySelector("html").style.overflow=""}}),[x]),React.createElement(React.Fragment,null,k(),React.createElement(T_.Provider,{value:{open:x,setOpen:_,handleClose:S,design:f,dialogContainerRef:w,dialogRef:b}},React.createElement("div",{ref:w,className:re("fixed z-999999 w-0 h-0 overflow-visible",i)},r)))};D_.displayName="Dialog";var A_=function(e){var t=e.children,n=e.className,r=O_(),o=r.open,i=r.handleClose,a=r.dialogRef;return React.createElement(wm,null,o&&React.createElement(vf.div,{className:"fixed inset-0 overflow-y-auto",initial:"exit",animate:"open",exit:"exit",variants:M_,role:"dialog",transition:R_},React.createElement("div",{className:"flex items-center justify-center min-h-full"},React.createElement("div",{ref:a,className:re("flex flex-col gap-5 w-120 h-fit bg-background-primary border border-solid border-border-subtle rounded-xl shadow-soft-shadow-2xl my-5 overflow-hidden",n)},"function"==typeof t?t({close:i}):t))))};A_.displayName="Dialog.Panel";var j_=function(e){var t=e.className,n=N_(e,b_),r=O_(),o=r.open,i=r.dialogContainerRef;return i.current&&(0,Gt.createPortal)(React.createElement(wm,null,o&&React.createElement(vf.div,C_({className:re("fixed inset-0 -z-10 bg-background-inverse/90 backdrop-blur-sm",t)},n,{initial:"exit",animate:"open",exit:"exit",variants:M_,transition:R_}))),i.current)};j_.displayName="Dialog.Backdrop";var I_=function(e){var t=e.children,n=e.className,r=N_(e,w_);return React.createElement("div",C_({className:re("space-y-2 px-5 pt-5 pb-1",n)},r),t)};I_.displayName="Dialog.Header";var F_=function(e){var t=e.children,n=e.as,r=void 0===n?"h3":n,o=e.className,i=N_(e,x_);return React.createElement(r,C_({className:re("text-base font-semibold text-text-primary m-0 p-0",o)},i),t)};F_.displayName="Dialog.Title";var L_=function(e){var t=e.children,n=e.as,r=void 0===n?"p":n,o=e.className,i=N_(e,__);return React.createElement(r,C_({className:re("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",o)},i),t)};L_.displayName="Dialog.Description";var z_=function(e){var t=e.className,n=N_(e,E_);return React.createElement("button",C_({className:re("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",t),"aria-label":"Close dialog"},n),React.createElement(jo,{className:"size-4 text-text-primary shrink-0"}))},B_=function(e){var t=e.children,n=e.as,r=void 0===n?s.Fragment:n,o=N_(e,S_),i=O_().handleClose;return(0,s.isValidElement)(t)&&t?r===s.Fragment?"function"==typeof t?t({close:i}):(0,s.cloneElement)(t,{onClick:i}):React.createElement(r,C_({},o,{onClick:i}),t):React.createElement(z_,C_({onClick:i},o))};B_.displayName="Dialog.CloseButton";var W_=function(e){var t=e.children,n=e.className,r=N_(e,k_);return React.createElement("div",C_({className:re("px-5",n)},r),t)};W_.displayName="Dialog.Body";var V_=function(e){var t=e.children,n=e.className,r=O_(),o=r.design,i=r.handleClose;return React.createElement("div",{className:re("p-4 flex justify-end gap-3",{"bg-background-secondary":"footer-divided"===o},n)},t?"function"==typeof t?t({close:i}):t:null)};V_.displayName="Dialog.Footer";var U_=Object.assign(D_,{Panel:A_,Backdrop:j_,Title:F_,Description:L_,CloseButton:B_,Header:I_,Body:W_,Footer:V_}),$_=["children","gap","className"];function H_(){return H_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},H_.apply(null,arguments)}var Y_=function(e){var t=e.children,n=e.gap,r=void 0===n?"lg":n,o=e.className,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,$_);return l().createElement("div",H_({className:re("w-full box-border flex items-center justify-between bg-background-primary p-5 min-h-16",ie(r),o)},i),t)};Y_.displayName="Topbar";var q_=function(e){var t=e.gap,n=void 0===t?"sm":t,r=e.children,o=e.className;return l().createElement("div",{className:re("flex items-center",ie(n),o)},r)};q_.displayName="Topbar.Left";var K_=function(e){var t,n=e.gap,r=void 0===n?"md":n,o=e.children,i=e.align,a=void 0===i?"center":i,s=e.className,c=null===(t={left:"justify-start",center:"justify-center",right:"justify-end"})||void 0===t?void 0:t[a];return l().createElement("div",{className:re("flex items-center grow",ie(r),c,s)},o)};K_.displayName="Topbar.Middle";var G_=function(e){var t=e.gap,n=void 0===t?"sm":t,r=e.children,o=e.className;return l().createElement("div",{className:re("flex items-center",ie(n),o)},r)};G_.displayName="Topbar.Right";var X_=function(e){var t=e.children,n=e.className;return l().createElement("div",{className:re("flex items-center [&>svg]:block h-full",n)},t)};X_.displayName="Topbar.Item";var Z_=Object.assign(Y_,{Left:q_,Middle:K_,Right:G_,Item:X_}),J_={sm:"text-xs [&>svg]:size-4 rounded",md:"text-sm [&>svg]:size-5 rounded-md",lg:"text-base [&>svg]:size-6 rounded-md"},Q_={input:{sm:"py-1.5 px-2 rounded",md:"p-2.5 rounded-md",lg:"p-3 rounded-md"},content:{sm:"p-1.5",md:"p-1.5",lg:"p-2"},title:{sm:"p-2 text-xs",md:"p-2 text-sm",lg:"p-2 text-sm"},item:{sm:"text-sm text-text-secondary rounded",md:"text-base text-text-secondary rounded-md",lg:"text-base text-text-secondary rounded-md"},icon:{sm:"p-1 text-sm [&>svg]:size-4 text-icon-secondary",md:"p-2 text-base [&>svg]:size-5 text-icon-secondary",lg:"p-2 text-base [&>svg]:size-5 text-icon-secondary"},dialog:{sm:"mt-1 rounded-md",md:"mt-1.5 rounded-lg",lg:"mt-1.5 rounded-lg"},slashIcon:{sm:"px-2 py-0.5",md:"px-3 py-1",lg:"px-3.5 py-1"}},eE={primary:"bg-field-primary-background outline outline-1 outline-field-border hover:outline-border-strong",secondary:"bg-field-secondary-background outline outline-1 outline-field-border hover:outline-border-strong",ghost:"bg-field-secondary-background outline outline-1 outline-transparent"},tE={ghost:"cursor-not-allowed text-text-disabled placeholder:text-text-disabled",primary:"border-border-disabled hover:border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled placeholder:text-text-disabled",secondary:"border-border-disabled hover:border-border-disabled cursor-not-allowed text-text-disabled placeholder:text-text-disabled"};function nE(e){return nE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nE(e)}var rE=["className","size","open","onOpenChange","loading"],oE=["className","type","placeholder","variant","disabled","onChange"],iE=["className","dropdownPortalRoot","dropdownPortalId","children"],aE=["className","icon","children"],sE=["className"];function lE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lE(Object(n),!0).forEach((function(t){uE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function uE(e,t,n){return(t=function(e){var t=function(e){if("object"!=nE(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=nE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nE(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dE(){return dE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dE.apply(null,arguments)}function fE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return mE(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mE(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function hE(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var pE=(0,s.createContext)(),gE=function(){return(0,s.useContext)(pE)},yE=(0,s.forwardRef)((function(e,t){var n=e.className,r=e.size,o=void 0===r?"sm":r,i=e.open,a=void 0!==i&&i,l=e.onOpenChange,c=void 0===l?function(){}:l,u=e.loading,d=void 0!==u&&u,f=hE(e,rE),m=fE((0,s.useState)(""),2),h=m[0],p=m[1],g=fE((0,s.useState)(null!=d&&d),2),y=g[0],v=g[1],b=Vr({open:a,onOpenChange:c,placement:"bottom-start",whileElementsMounted:mn,middleware:[kn("sm"===o?4:6),Nn({padding:10}),Pn({apply:function(e){var t=e.rects,n=e.elements,r=e.availableHeight;n.floating.style.maxHeight="".concat(r,"px"),n.floating.style.width="".concat(t.reference.width,"px"),n.floating.style.fontFamily=window.getComputedStyle(n.reference).fontFamily}})]}),w=b.refs,x=b.floatingStyles,_=b.context,E=Yr([Wr(_)]),S=E.getReferenceProps,k=E.getFloatingProps;return React.createElement(pE.Provider,{value:{size:o,open:a,onOpenChange:c,refs:w,floatingStyles:x,context:_,getReferenceProps:S,getFloatingProps:k,searchTerm:h,setSearchTerm:p,isLoading:y,setIsLoading:v}},React.createElement("div",dE({className:re("searchbox-wrapper box-border relative w-full",n)},f,{ref:t})))}));yE.displayName="SearchBox";var vE=(0,s.forwardRef)((function(e,t){var n=e.className,r=e.type,o=void 0===r?"text":r,i=e.placeholder,a=void 0===i?"Search...":i,s=e.variant,l=void 0===s?"primary":s,c=e.disabled,u=void 0!==c&&c,d=e.onChange,f=void 0===d?function(){}:d,m=hE(e,oE),h=gE(),p=h.size,g=h.onOpenChange,y=h.refs,v=h.getReferenceProps,b=h.searchTerm,w=h.setSearchTerm,x="lg"===p?"sm":"xs";return React.createElement("div",dE({tabIndex:0,ref:y.setReference,className:re("w-full group relative flex justify-center items-center gap-1.5 focus-within:z-10 transition-colors ease-in-out duration-150",eE[l],Q_.input[p],u?tE[l]:"focus-within:ring-2 focus-within:ring-focus focus-within:ring-offset-2 focus-within:border-focus-border focus-within:hover:border-focus-border")},v),React.createElement("span",{className:re(J_[p],u?"text-icon-disabled":"text-icon-secondary group-hover:text-icon-primary group-focus-within:text-icon-primary","flex justify-center items-center")},React.createElement(Nf,null)),React.createElement("input",dE({type:o,ref:t,className:re(J_[p],"flex-grow font-medium bg-transparent border-none outline-none border-transparent focus:ring-0 py-0",u?tE[l]:["text-field-placeholder focus-within:text-field-input group-hover:text-field-input","placeholder:text-field-placeholder"],n),disabled:u,value:b,onChange:function(e){var t=e.target.value;w(t),f(t),"function"==typeof g&&(t.trim()?g(!0):g(!1))},placeholder:a},m)),React.createElement(Fo,{label:"/",size:x,type:"rounded",variant:"neutral"}))}));vE.displayName="SearchBox.Input";var bE=function(e){var t=e.className,n=e.dropdownPortalRoot,r=void 0===n?null:n,o=e.dropdownPortalId,i=void 0===o?"":o,a=e.children,s=hE(e,iE),l=gE(),c=l.size,u=l.open,d=l.refs,f=l.floatingStyles,m=l.getFloatingProps;return u?React.createElement(Cr,{id:i,root:r},React.createElement("div",dE({ref:d.setFloating,style:cE({},f),className:re("bg-background-primary rounded-md border border-solid border-border-subtle shadow-soft-shadow-lg overflow-y-auto text-wrap",Q_.dialog[c],t)},m(),s),a)):null};bE.displayName="SearchBox.Content";var wE=function(e){var t=e.filter,n=void 0===t||t,r=e.children,o=gE(),i=o.searchTerm,a=o.isLoading;if(!n)return React.createElement("div",null,r);var l=s.Children.toArray(r).map((function(e){if(e.type===_E){var t=s.Children.toArray(e.props.children).filter((function(e){return e.props.children.toLowerCase().includes(i.toLowerCase())}));return t.length>0?(0,s.cloneElement)(e,{children:t}):null}return e})).filter(Boolean);return a?React.createElement(SE,null):React.createElement("div",null,l.some((function(e){return e.type!==kE}))?l:React.createElement(xE,null))};wE.displayName="SearchBox.List";var xE=function(e){var t=e.children,n=void 0===t?"No results found.":t,r=gE().size;return React.createElement("div",{className:re("flex justify-center items-center",Q_.item[r],"text-text-tertiary p-4")},n)};xE.displayName="SearchBox.Empty";var _E=function(e){var t=e.heading,n=e.children,r=gE().size;return React.createElement("div",{className:re(Q_.content[r],Q_.item[r])},t&&React.createElement("div",{className:re(Q_.title[r],"text-text-secondary")},t),n)};_E.displayName="SearchBox.Group";var EE=(0,s.forwardRef)((function(e,t){var n=e.className,r=e.icon,o=e.children,i=hE(e,aE),a=gE().size;return React.createElement("div",dE({ref:t,className:re("flex items-center justify-start gap-1 p-1 hover:bg-background-secondary focus:bg-background-secondary cursor-pointer",Q_.item[a])},i),r&&React.createElement("span",{className:re(Q_.icon[a],"flex items-center justify-center")},r),React.createElement("span",{className:re("flex-grow p-1 font-normal cursor-pointer",Q_.item[a],n)},o))}));EE.displayName="SearchBox.Item";var SE=function(e){var t=e.loadingIcon,n=void 0===t?React.createElement(ri,null):t,r=gE().size,o=(0,s.cloneElement)(n,{size:r});return React.createElement("div",{className:re("flex justify-center p-4",J_[r],Q_.item[r])},o)};SE.displayName="SearchBox.Loading";var kE=(0,s.forwardRef)((function(e,t){var n=e.className,r=hE(e,sE);return React.createElement("hr",dE({ref:t,className:re("border-0 border-t border-border-subtle border-solid m-0",n)},r))}));kE.displayName="SearchBox.Separator",yE.Input=vE,yE.Loading=SE,yE.Separator=kE,yE.Content=bE,yE.List=wE,yE.Empty=xE,yE.Group=_E,yE.Item=EE;var CE=yE;function NE(e){return NE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},NE(e)}var PE=["children","className"],TE=["children"],OE=["children","as"];function ME(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function RE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function DE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RE(Object(n),!0).forEach((function(t){AE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function AE(e,t,n){return(t=function(e){var t=function(e){if("object"!=NE(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=NE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==NE(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jE(){return jE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jE.apply(null,arguments)}function IE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var FE=(0,s.createContext)(),LE=function(e){var t=e.placement,n=void 0===t?"bottom":t,r=e.offset,o=void 0===r?10:r,i=e.boundary,a=void 0===i?"clippingAncestors":i,c=e.dropdownPortalRoot,u=void 0===c?null:c,d=e.dropdownPortalId,f=void 0===d?"":d,m=e.children,h=e.className,p=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next,!2;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){l=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(e)||function(e){if(e){if("string"==typeof e)return IE(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?IE(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,s.useState)(!1)),g=p[0],y=p[1],v=Vr({open:g,onOpenChange:y,placement:n,strategy:"absolute",middleware:[kn(o),Nn({boundary:a}),Cn({boundary:a})],whileElementsMounted:mn}),b=v.refs,w=v.floatingStyles,x=v.context,_=Yr([Fr(x),Wr(x),Qr(x,{role:"menu"})]),E=_.getReferenceProps,S=_.getFloatingProps,k=no(x,{duration:150,initial:{opacity:0,scale:.95},open:{opacity:1,scale:1},close:{opacity:0,scale:.95}}),C=k.isMounted,N=k.styles;return l().createElement(FE.Provider,{value:{handleClose:function(){return y(!1)}}},l().createElement("div",{className:re("relative inline-block",h)},l().createElement("div",jE({ref:b.setReference,onClick:function(){return y((function(e){return!e}))},role:"button",tabIndex:0},E(),{className:"cursor-pointer"}),l().Children.map(m,(function(e){var t;return"DropdownMenu.Trigger"===(null===(t=e.type)||void 0===t?void 0:t.displayName)?e:null}))),C&&l().createElement(Cr,{id:f,root:u},l().createElement("div",jE({ref:b.setFloating,style:DE(DE({},w),N)},S()),l().Children.map(m,(function(e){var t;return"DropdownMenu.Content"===(null===(t=e.type)||void 0===t?void 0:t.displayName)?e:null}))))))};LE.displayName="DropdownMenu";var zE=l().forwardRef((function(e,t){var n=e.children,r=e.className;return l().createElement("div",{ref:t,role:"button",tabIndex:0,className:r},n)}));zE.displayName="DropdownMenu.Trigger";var BE=function(e){var t=e.children,n=e.className,r=ME(e,PE);return l().createElement("div",{className:re("border border-solid border-border-subtle rounded-md shadow-lg overflow-hidden",n)},l().createElement(Yx,r,t))};BE.displayName="DropdownMenu.Content";var WE=function(e){var t=e.children,n=ME(e,TE);return l().createElement(Yx.List,n,t)};WE.displayName="DropdownMenu.List";var VE=function(e){var t,n=e.children,r=e.as,o=void 0===r?Yx.Item:r,i=ME(e,OE),a=(0,s.useContext)(FE).handleClose;return n?o===s.Fragment?(0,s.cloneElement)(n,{onClick:oe(null===(t=n.props)||void 0===t?void 0:t.onClick,a)}):l().createElement(o,jE({},i,{className:"px-2",onClick:oe(i.onClick,a)}),n):null};VE.displayName="DropdownMenu.Item";var UE=function(e){var t=jE({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return l().createElement(Yx.Separator,t)};UE.displayName="DropdownMenu.Separator";var $E=Object.assign(LE,{Trigger:zE,Content:BE,List:WE,Item:VE,Separator:UE});function HE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var YE=(0,s.createContext)(),qE=function(){return(0,s.useContext)(YE)},KE=Object.assign((function(e){var t=e.open,n=e.setOpen,r=e.children,o=e.trigger,i=e.className,a=e.exitOnClickOutside,l=void 0!==a&&a,c=e.exitOnEsc,u=void 0===c||c,d=e.design,f=void 0===d?"simple":d,m=e.position,h=void 0===m?"right":m,p=e.transitionDuration,g=void 0===p?.2:p,y=e.scrollLock,v=void 0===y||y,b=void 0!==t&&void 0!==n,w=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next,!2;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){l=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(e)||function(e){if(e){if("string"==typeof e)return HE(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?HE(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,s.useState)(!1)),x=w[0],_=w[1],E=(0,s.useRef)(null),S=(0,s.useRef)(null),k=(0,s.useMemo)((function(){return b?t:x}),[t,x]),C=(0,s.useMemo)((function(){return b?n:_}),[_,_]),N=function(){k||C(!0)},P=function(){k&&C(!1)},T=(0,s.useCallback)((function(){return(0,s.isValidElement)(o)?(0,s.cloneElement)(o,{onClick:oe(N,o.props.onClick)}):"function"==typeof o?o({onClick:N}):null}),[o,N,P]),O=function(e){"Escape"===e.key&&u&&P()},M=function(e){l&&E.current&&!E.current.contains(e.target)&&P()};return(0,s.useEffect)((function(){return window.addEventListener("keydown",O),document.addEventListener("mousedown",M),function(){window.removeEventListener("keydown",O),document.removeEventListener("mousedown",M)}}),[k]),(0,s.useEffect)((function(){if(v)return k&&(document.querySelector("html").style.overflow="hidden"),function(){document.querySelector("html").style.overflow=""}}),[k]),React.createElement(React.Fragment,null,T(),React.createElement(YE.Provider,{value:{open:k,setOpen:C,handleClose:P,design:f,position:h,drawerContainerRef:S,drawerRef:E,transitionDuration:{duration:g}}},React.createElement("div",{className:re("fixed z-999999 w-0 h-0 overflow-visible",i),role:"dialog",ref:S},r)))}),{displayName:"Drawer"}),GE={left:{open:{x:0},exit:{x:"-100%"}},right:{open:{x:0},exit:{x:"100%"}}},XE=Object.assign((function(e){var t=e.children,n=e.className,r=qE(),o=r.open,i=r.position,a=r.handleClose,s=r.drawerRef,l=r.transitionDuration;return React.createElement(wm,null,o&&React.createElement("div",{className:"fixed inset-0"},React.createElement("div",{className:re("flex items-center justify-center h-full",{"justify-start":"left"===i,"justify-end":"right"===i})},React.createElement(vf.div,{ref:s,className:re("flex flex-col gap-5 w-120 h-full bg-background-primary shadow-2xl my-5 overflow-hidden",n),initial:"exit",animate:"open",exit:"exit",variants:GE[i],transition:l},"function"==typeof t?t({close:a}):t))))}),{displayName:"Drawer.Panel"}),ZE=["children","className"];function JE(){return JE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JE.apply(null,arguments)}var QE=Object.assign((function(e){var t=e.children,n=e.className,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,ZE);return React.createElement("div",JE({className:re("space-y-2 px-5 pt-5 pb-1",n)},r),t)}),{displayName:"Drawer.Header"}),eS=["children","as","className"];function tS(){return tS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tS.apply(null,arguments)}var nS=Object.assign((function(e){var t=e.children,n=e.as,r=void 0===n?"h3":n,o=e.className,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,eS);return React.createElement(r,tS({className:re("text-base font-semibold text-text-primary m-0 p-0",o)},i),t)}),{displayName:"Drawer.Title"}),rS=["children","as","className"];function oS(){return oS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oS.apply(null,arguments)}var iS=Object.assign((function(e){var t=e.children,n=e.as,r=void 0===n?"p":n,o=e.className,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,rS);return React.createElement(r,oS({className:re("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",o)},i),t)}),{displayName:"Drawer.Description"}),aS=["children","className"];function sS(){return sS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sS.apply(null,arguments)}var lS=Object.assign((function(e){var t=e.children,n=e.className,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,aS);return React.createElement("div",sS({className:re("px-5 flex flex-col flex-1 overflow-y-auto overflow-x-hidden",n)},r),t)}),{displayName:"Drawer.Body"}),cS=Object.assign((function(e){var t=e.children,n=e.className,r=qE(),o=r.design,i=r.handleClose;return React.createElement("div",{className:re("p-5 flex justify-end gap-3 mt-auto",{"bg-background-secondary":"footer-divided"===o},n)},t?"function"==typeof t?t({close:i}):t:null)}),{displayName:"Drawer.Footer"}),uS=["className"],dS=["children","as"];function fS(){return fS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fS.apply(null,arguments)}function mS(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var hS=function(e){var t=e.className,n=mS(e,uS);return React.createElement("button",fS({className:re("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",t),"aria-label":"Close drawer"},n),React.createElement(jo,{className:"size-4 text-text-primary shrink-0"}))},pS=Object.assign((function(e){var t=e.children,n=e.as,r=void 0===n?s.Fragment:n,o=mS(e,dS),i=qE().handleClose;return(0,s.isValidElement)(t)&&t?r===s.Fragment?"function"==typeof t?t({close:i}):(0,s.cloneElement)(t,{onClick:i}):React.createElement(r,fS({},o,{onClick:i}),t):React.createElement(hS,fS({onClick:i},o))}),{displayName:"Drawer.CloseButton"}),gS=["className"];function yS(){return yS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yS.apply(null,arguments)}var vS={open:{opacity:1},exit:{opacity:0}},bS=Object.assign((function(e){var t=e.className,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,gS),r=qE(),o=r.open,i=r.drawerContainerRef,a=r.transitionDuration;return i.current&&(0,Gt.createPortal)(React.createElement(wm,null,o&&React.createElement(vf.div,yS({className:re("fixed inset-0 -z-10 bg-background-inverse/90 backdrop-blur-sm",t)},n,{initial:"exit",animate:"open",exit:"exit",variants:vS,transition:a}))),i.current)}),{displayName:"Drawer.Backdrop"}),wS=Object.assign(KE,{Panel:XE,Header:QE,Title:nS,Description:iS,Body:lS,CloseButton:pS,Footer:cS,Backdrop:bS});const xS=xe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var _S={xs:{general:"px-2 text-xs",ellipse:"px-1.5 text-xs",icon:"px-1 text-xs"},sm:{general:"px-3 text-xs",ellipse:"px-2.5 text-xs",icon:"px-2 text-xs"},md:{general:"px-4 text-sm",ellipse:"px-2.5 text-sm",icon:"px-2.5 text-sm"},lg:{general:"px-5 text-base",ellipse:"px-4 text-base",icon:"px-3 text-base"}},ES="group disabled:border-field-border-disabled opacity-50",SS=["size","disabled","children","className"],kS=["className"],CS=["isActive","className","children"],NS=["icon","isActive","tag","children","className"],PS=["icon"],TS=["icon"];function OS(){return OS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OS.apply(null,arguments)}function MS(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var RS=(0,s.createContext)(),DS=function(){return(0,s.useContext)(RS)},AS=function(e){var t=e.size,n=void 0===t?"sm":t,r=e.disabled,o=void 0!==r&&r,i=e.children,a=e.className,s=MS(e,SS);return React.createElement(RS.Provider,{value:{size:n,disabled:o}},React.createElement("nav",OS({role:"navigation","aria-label":"pagination",className:re("flex w-full justify-center box-border m-0",a)},s),i))};AS.displayName="Pagination";var jS=(0,s.forwardRef)((function(e,t){var n=e.className,r=MS(e,kS);return React.createElement("ul",OS({ref:t,className:re("m-0 p-0 w-full flex justify-center flex-row items-center gap-1","list-none",n)},r))}));jS.displayName="Pagination.Content";var IS=(0,s.forwardRef)((function(e,t){var n=e.isActive,r=void 0!==n&&n,o=e.className,i=e.children,a=MS(e,CS),s=DS().disabled;return React.createElement("li",{ref:t,tabIndex:0,className:re("flex",s&&ES)},React.createElement(FS,OS({isActive:r,disabled:s,className:o},a),i))}));IS.displayName="Pagination.Item";var FS=function(e){var t=e.icon,n=void 0===t?null:t,r=e.isActive,o=void 0!==r&&r,i=e.tag,a=void 0===i?"a":i,s=e.children,l=e.className,c=MS(e,NS),u=DS(),d=u.size,f=u.disabled;return React.createElement(ue,OS({tag:a,size:d,variant:"ghost",className:re("no-underline bg-transparent p-0 m-0 border-none","flex justify-center items-center rounded text-button-secondary","focus:outline focus:outline-1 focus:outline-border-subtle focus:bg-button-tertiary-hover",_S[d].general,!f&&o&&"text-button-primary active:text-button-primary bg-brand-background-50",f&&[ES,"group-disabled:text-icon-disabled","group-disabled:text-field-color-disabled","focus:ring-transparent cursor-not-allowed"],l),disabled:f,icon:n},c),s)},LS=function(e){var t=e.icon,n=void 0===t?React.createElement(xS,null):t,r=MS(e,PS),o=DS(),i=o.size,a=o.disabled;return React.createElement("li",{tabIndex:0,className:re("flex",a&&ES)},React.createElement(FS,OS({icon:n,"aria-label":"Go to previous page",className:_S[i].icon},r)))};LS.displayName="Pagination.Previous";var zS=function(e){var t=e.icon,n=void 0===t?React.createElement(i_,null):t,r=MS(e,TS),o=DS(),i=o.size,a=o.disabled;return React.createElement("li",{tabIndex:0,className:re("flex",a&&ES)},React.createElement(FS,OS({icon:n,"aria-label":"Go to next page",className:_S[i].icon},r)))};zS.displayName="Pagination.Next";var BS=function(e){var t=DS(),n=t.size,r=t.disabled;return React.createElement("li",{tabIndex:0,className:re("flex",r&&ES)},React.createElement("span",OS({className:re(_S[n].ellipse,r&&ES)},e),"..."))};BS.displayName="Pagination.Ellipsis",AS.Content=jS,AS.Item=IS,AS.Previous=LS,AS.Next=zS,AS.Ellipsis=BS;var WS,VS,US,$S=AS;function HS(e){return s.createElement("button",{...e})}function YS(e){return s.createElement("span",{...e})}function qS(e){const{size:t=24,orientation:n="left",className:r}=e;return s.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},"up"===n&&s.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),"down"===n&&s.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),"left"===n&&s.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),"right"===n&&s.createElement("polygon",{points:"8 18.612 14.1888889 12.5 8 6.37733333 9.91111111 4.5 18 12.5 9.91111111 20.5"}))}function KS(e){const{day:t,modifiers:n,...r}=e;return s.createElement("td",{...r})}function GS(e){const{day:t,modifiers:n,...r}=e,o=s.useRef(null);return s.useEffect((()=>{n.focused&&o.current?.focus()}),[n.focused]),s.createElement("button",{ref:o,...r})}function XS(e){const{options:t,className:n,components:r,classNames:o,...i}=e,a=[o[WS.Dropdown],n].join(" "),l=t?.find((({value:e})=>e===i.value));return s.createElement("span",{"data-disabled":i.disabled,className:o[WS.DropdownRoot]},s.createElement(r.Select,{className:a,...i},t?.map((({value:e,label:t,disabled:n})=>s.createElement(r.Option,{key:e,value:e,disabled:n},t)))),s.createElement("span",{className:o[WS.CaptionLabel],"aria-hidden":!0},l?.label,s.createElement(r.Chevron,{orientation:"down",size:18,className:o[WS.Chevron]})))}function ZS(e){return s.createElement("div",{...e})}function JS(e){return s.createElement("div",{...e})}function QS(e){const{calendarMonth:t,displayIndex:n,...r}=e;return s.createElement("div",{...r},e.children)}function ek(e){const{calendarMonth:t,displayIndex:n,...r}=e;return s.createElement("div",{...r})}function tk(e){return s.createElement("table",{...e})}function nk(e){return s.createElement("div",{...e})}!function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"}(WS||(WS={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(VS||(VS={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(US||(US={}));const rk=(0,s.createContext)(void 0);function ok(){const e=(0,s.useContext)(rk);if(void 0===e)throw new Error("useDayPicker() must be used within a custom component.");return e}function ik(e){const{components:t}=ok();return s.createElement(t.Dropdown,{...e})}function ak(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...i}=e,{components:a,classNames:l,labels:{labelPrevious:c,labelNext:u}}=ok();return s.createElement("nav",{...i},s.createElement(a.PreviousMonthButton,{type:"button",className:l[WS.PreviousMonthButton],tabIndex:r?void 0:-1,disabled:!r||void 0,"aria-label":c(r),onClick:e.onPreviousClick},s.createElement(a.Chevron,{disabled:!r||void 0,className:l[WS.Chevron],orientation:"left"})),s.createElement(a.NextMonthButton,{type:"button",className:l[WS.NextMonthButton],tabIndex:o?void 0:-1,disabled:!o||void 0,"aria-label":u(o),onClick:e.onNextClick},s.createElement(a.Chevron,{disabled:!o||void 0,orientation:"right",className:l[WS.Chevron]})))}function sk(e){const{components:t}=ok();return s.createElement(t.Button,{...e})}function lk(e){return s.createElement("option",{...e})}function ck(e){const{components:t}=ok();return s.createElement(t.Button,{...e})}function uk(e){return s.createElement("div",{...e})}function dk(e){return s.createElement("select",{...e})}function fk(e){const{week:t,...n}=e;return s.createElement("tr",{...n})}function mk(e){return s.createElement("th",{...e})}function hk(e){return s.createElement("thead",null,s.createElement("tr",{...e}))}function pk(e){const{week:t,...n}=e;return s.createElement("th",{...n})}function gk(e){return s.createElement("th",{...e})}function yk(e){return s.createElement("tbody",{...e})}function vk(e){const{components:t}=ok();return s.createElement(t.Dropdown,{...e})}Math.pow(10,8);const bk=6048e5,wk=Symbol.for("constructDateFrom");function xk(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&wk in e?e[wk](t):e instanceof Date?new e.constructor(t):new Date(t)}function _k(e,t){return xk(t||e,e)}function Ek(e,t,n){const r=_k(e,n?.in);return isNaN(t)?xk(n?.in||e,NaN):t?(r.setDate(r.getDate()+t),r):r}function Sk(e,t,n){const r=_k(e,n?.in);if(isNaN(t))return xk(n?.in||e,NaN);if(!t)return r;const o=r.getDate(),i=xk(n?.in||e,r.getTime());return i.setMonth(r.getMonth()+t+1,0),o>=i.getDate()?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function kk(e,t,n){return Ek(e,7*t,n)}function Ck(e){const t=_k(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Nk(e,...t){const n=xk.bind(null,e||t.find((e=>"object"==typeof e)));return t.map(n)}function Pk(e,t){const n=_k(e,t?.in);return n.setHours(0,0,0,0),n}function Tk(e,t,n){const[r,o]=Nk(n?.in,e,t),i=Pk(r),a=Pk(o),s=+i-Ck(i),l=+a-Ck(a);return Math.round((s-l)/864e5)}let Ok={};function Mk(){return Ok}function Rk(e,t){const n=Mk(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=_k(e,t?.in),i=o.getDay(),a=6+(i<r?-7:0)-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function Dk(e,t){const n=_k(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}const Ak={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function jk(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Ik={date:jk({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:jk({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:jk({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Fk={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Lk(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const zk={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Lk({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Lk({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Lk({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Lk({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Lk({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Bk(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e){for(let t=0;t<e.length;t++)if(e[t].test(a))return t}(s):function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].test(a))return t}(s);let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(a.length)}}}const Wk={ordinalNumber:(Vk={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(Vk.matchPattern);if(!n)return null;const r=n[0],o=e.match(Vk.parsePattern);if(!o)return null;let i=Vk.valueCallback?Vk.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(r.length)}}),era:Bk({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Bk({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Bk({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Bk({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Bk({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var Vk;const Uk={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=Ak[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Ik,formatRelative:(e,t,n,r)=>Fk[e],localize:zk,match:Wk,options:{weekStartsOn:0,firstWeekContainsDate:1}};function $k(e,t){const n=_k(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Hk(e,t){const n=Mk(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=_k(e,t?.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function Yk(e,t){return Hk(e,{...t,weekStartsOn:1})}function qk(e,t){const n=_k(e,t?.in),r=n.getFullYear(),o=xk(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Yk(o),a=xk(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Yk(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Kk(e,t){const n=_k(e,t?.in),r=+Yk(n)-+function(e,t){const n=qk(e,t),r=xk(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Yk(r)}(n);return Math.round(r/bk)+1}function Gk(e,t){const n=_k(e,t?.in),r=n.getFullYear(),o=Mk(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=xk(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Hk(a,t),l=xk(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Hk(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function Xk(e,t){const n=_k(e,t?.in),r=+Hk(n,t)-+function(e,t){const n=Mk(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Gk(e,t),i=xk(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Hk(i,t)}(n,t);return Math.round(r/bk)+1}function Zk(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const Jk={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Zk("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Zk(n+1,2)},d:(e,t)=>Zk(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>Zk(e.getHours()%12||12,t.length),H:(e,t)=>Zk(e.getHours(),t.length),m:(e,t)=>Zk(e.getMinutes(),t.length),s:(e,t)=>Zk(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Zk(Math.trunc(r*Math.pow(10,n-3)),t.length)}},Qk={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return Jk.y(e,t)},Y:function(e,t,n,r){const o=Gk(e,r),i=o>0?o:1-o;return"YY"===t?Zk(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):Zk(i,t.length)},R:function(e,t){return Zk(qk(e),t.length)},u:function(e,t){return Zk(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Zk(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Zk(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Jk.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Zk(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Xk(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):Zk(o,t.length)},I:function(e,t,n){const r=Kk(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Zk(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):Jk.d(e,t)},D:function(e,t,n){const r=function(e){const t=_k(e,undefined);return Tk(t,$k(t))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Zk(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Zk(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Zk(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return Zk(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return Jk.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):Jk.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Zk(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Zk(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Jk.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Jk.s(e,t)},S:function(e,t){return Jk.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return tC(r);case"XXXX":case"XX":return nC(r);default:return nC(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return tC(r);case"xxxx":case"xx":return nC(r);default:return nC(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+eC(r,":");default:return"GMT"+nC(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+eC(r,":");default:return"GMT"+nC(r,":")}},t:function(e,t,n){return Zk(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Zk(+e,t.length)}};function eC(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+Zk(i,2)}function tC(e,t){return e%60==0?(e>0?"-":"+")+Zk(Math.abs(e)/60,2):nC(e,t)}function nC(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Zk(Math.trunc(r/60),2)+t+Zk(r%60,2)}const rC=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},oC=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},iC={p:oC,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return rC(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",rC(r,t)).replace("{{time}}",oC(o,t))}},aC=/^D+$/,sC=/^Y+$/,lC=["D","DD","YY","YYYY"];function cC(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}const uC=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,dC=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fC=/^'([^]*?)'?$/,mC=/''/g,hC=/[a-zA-Z]/;function pC(e,t,n){const r=Mk(),o=n?.locale??r.locale??Uk,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=_k(e,n?.in);if(!function(e){return!(!cC(e)&&"number"!=typeof e||isNaN(+_k(e)))}(s))throw new RangeError("Invalid time value");let l=t.match(dC).map((e=>{const t=e[0];return"p"===t||"P"===t?(0,iC[t])(e,o.formatLong):e})).join("").match(uC).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:gC(e)};if(Qk[t])return{isToken:!0,value:e};if(t.match(hC))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map((r=>{if(!r.isToken)return r.value;const i=r.value;return(!n?.useAdditionalWeekYearTokens&&function(e){return sC.test(e)}(i)||!n?.useAdditionalDayOfYearTokens&&function(e){return aC.test(e)}(i))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),lC.includes(e))throw new RangeError(r)}(i,t,String(e)),(0,Qk[i[0]])(s,i,o.localize,c)})).join("")}function gC(e){const t=e.match(fC);return t?t[1].replace(mC,"'"):e}function yC(e,t){const n=_k(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}const vC={addDays:Ek,addMonths:Sk,addWeeks:kk,addYears:function(e,t,n){return Sk(e,12*t,n)},differenceInCalendarDays:Tk,differenceInCalendarMonths:function(e,t,n){const[r,o]=Nk(n?.in,e,t);return 12*(r.getFullYear()-o.getFullYear())+(r.getMonth()-o.getMonth())},endOfISOWeek:function(e,t){return Rk(e,{...t,weekStartsOn:1})},endOfMonth:Dk,endOfWeek:Rk,endOfYear:function(e,t){const n=_k(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n},format:pC,getISOWeek:Kk,getWeek:Xk,isAfter:function(e,t){return+_k(e)>+_k(t)},isBefore:function(e,t){return+_k(e)<+_k(t)},isDate:cC,isSameDay:function(e,t,n){const[r,o]=Nk(n?.in,e,t);return+Pk(r)==+Pk(o)},isSameMonth:function(e,t,n){const[r,o]=Nk(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()},isSameYear:function(e,t,n){const[r,o]=Nk(n?.in,e,t);return r.getFullYear()===o.getFullYear()},max:function(e,t){let n,r=t?.in;return e.forEach((e=>{r||"object"!=typeof e||(r=xk.bind(null,e));const t=_k(e,r);(!n||n<t||isNaN(+t))&&(n=t)})),xk(r,n||NaN)},min:function(e,t){let n,r=t?.in;return e.forEach((e=>{r||"object"!=typeof e||(r=xk.bind(null,e));const t=_k(e,r);(!n||n>t||isNaN(+t))&&(n=t)})),xk(r,n||NaN)},setMonth:function(e,t,n){const r=_k(e,n?.in),o=r.getFullYear(),i=r.getDate(),a=xk(n?.in||e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=function(e){const t=_k(e,undefined),n=t.getFullYear(),r=t.getMonth(),o=xk(t,0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}(a);return r.setMonth(t,Math.min(i,s)),r},setYear:function(e,t,n){const r=_k(e,n?.in);return isNaN(+r)?xk(n?.in||e,NaN):(r.setFullYear(t),r)},startOfDay:Pk,startOfISOWeek:Yk,startOfMonth:yC,startOfWeek:Hk,startOfYear:$k};function bC(){const e={};for(const t in WS)e[WS[t]]=`rdp-${WS[t]}`;for(const t in VS)e[VS[t]]=`rdp-${VS[t]}`;for(const t in US)e[US[t]]=`rdp-${US[t]}`;return e}Symbol.for("constructDateFrom");const wC={},xC={};function _C(e,t){try{const n=(wC[e]||=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format)(t).split("GMT")[1]||"";return n in xC?xC[n]:SC(n,n.split(":"))}catch{if(e in xC)return xC[e];const t=e?.match(EC);return t?SC(e,t.slice(1)):NaN}}const EC=/([+-]\d\d):?(\d\d)?/;function SC(e,t){const n=+t[0],r=+(t[1]||0);return xC[e]=n>0?60*n+r:60*n-r}class kC extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(_C(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),PC(this)):this.setTime(Date.now()),NC(this)}static tz(e,...t){return t.length?new kC(...t,e):new kC(Date.now(),e)}withTimeZone(e){return new kC(+this,e)}getTimezoneOffset(){return-_C(this.timeZone,this)}[Symbol.for("constructDateFrom")](e){return new kC(+new Date(e),this.timeZone)}}const CC=/^(get|set)(?!UTC)/;function NC(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function PC(e){const t=_C(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=r- -new Date(+n).getTimezoneOffset(),i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();o&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+o);const a=r-t;a&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+a);const s=_C(e.timeZone,e),l=-new Date(+e).getTimezoneOffset()-s-a;if(s!==t&&l){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const t=s-_C(e.timeZone,e);t&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+t),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+t))}}Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!CC.test(e))return;const t=e.replace(CC,"$1UTC");kC.prototype[t]&&(e.startsWith("get")?kC.prototype[e]=function(){return this.internal[t]()}:(kC.prototype[e]=function(){var e;return Date.prototype[t].apply(this.internal,arguments),e=this,Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),PC(e),+this},kC.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),NC(this),+this}))}));class TC extends kC{static tz(e,...t){return t.length?new TC(...t,e):new TC(Date.now(),e)}toISOString(){const[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,n,r]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${o=this.timeZone,new Intl.DateTimeFormat("en-GB",{timeZone:o,timeZoneName:"long"}).format(this).slice(12)})`;var o}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),String(Math.abs(e)%60).padStart(2,"0")]}withTimeZone(e){return new TC(+this,e)}[Symbol.for("constructDateFrom")](e){return new TC(+new Date(e),this.timeZone)}}function OC(e,t,n=vC){return n.format(e,"LLLL y",t)}const MC=OC;function RC(e,t,n=vC){return n.format(e,"d",t)}function DC(e,t=Uk){return t.localize?.month(e)}function AC(e){return e<10?`0${e.toLocaleString()}`:`${e.toLocaleString()}`}function jC(){return""}function IC(e,t,n=vC){return n.format(e,"cccccc",t)}function FC(e){return e.toString()}const LC=FC;function zC(e,t,n=vC){return n.format(e,"LLLL y",t)}const BC=zC;function WC(e,t,n,r=vC){let o=r.format(e,"PPPP",n);return t?.today&&(o=`Today, ${o}`),o}function VC(e,t,n,r=vC){let o=r.format(e,"PPPP",n);return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const UC=VC;function $C(){return""}function HC(e){return"Choose the Month"}function YC(e){return"Go to the Next Month"}function qC(e){return"Go to the Previous Month"}function KC(e,t,n=vC){return n.format(e,"cccc",t)}function GC(e,t){return`Week ${e}`}function XC(e){return"Week Number"}function ZC(e){return"Choose the Year"}function JC(e,t){const{month:n,defaultMonth:r,today:o=(e.timeZone?TC.tz(e.timeZone):t.Date?new t.Date:new Date),numberOfMonths:i=1,endMonth:a,startMonth:s}=e;let l=n||r||o;const{differenceInCalendarMonths:c,addMonths:u,startOfMonth:d}=t;return a&&c(a,l)<0&&(l=u(a,-1*(i-1))),s&&c(l,s)<0&&(l=s),d(l)}class QC{constructor(e,t,n=vC){this.date=e,this.displayMonth=t,this.outside=Boolean(t&&!n.isSameMonth(e,t)),this.dateLib=n}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}}class eN{constructor(e,t){this.date=e,this.weeks=t}}class tN{constructor(e,t){this.days=t,this.weekNumber=e}}function nN(e,t){const[n,r]=(0,s.useState)(e);return[void 0===t?n:t,r]}function rN(e,t,n=!1,r=vC){let{from:o,to:i}=e;const{differenceInCalendarDays:a,isSameDay:s}=r;return o&&i?(a(i,o)<0&&([o,i]=[i,o]),a(t,o)>=(n?1:0)&&a(i,t)>=(n?1:0)):!n&&i?s(i,t):!(n||!o)&&s(o,t)}function oN(e){return Boolean(e&&"object"==typeof e&&"from"in e)}function iN(e,t,n=vC){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:i,isAfter:a}=n;return r.some((t=>{if("boolean"==typeof t)return t;if(n.isDate(t))return o(e,t);if(function(e,t){return Array.isArray(e)&&e.every(t.isDate)}(t,n))return t.includes(e);if(oN(t))return rN(t,e,!1,n);if(r=t,Boolean(r&&"object"==typeof r&&"dayOfWeek"in r))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();var r;if(function(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){const n=i(t.before,e)>0,r=i(t.after,e)<0;return a(t.before,t.after)?r&&n:n||r}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?i(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?i(t.before,e)>0:"function"==typeof t&&t(e)}))}function aN(e,t,n,r,o,i,a,s=0){if(s>365)return;const l=function(e,t,n,r,o,i,a){const{weekStartsOn:s,locale:l,ISOWeek:c}=i,{addDays:u,addMonths:d,addYears:f,addWeeks:m,startOfISOWeek:h,endOfISOWeek:p,startOfWeek:g,endOfWeek:y,max:v,min:b}=a;let w={day:u,week:m,month:d,year:f,startOfWeek:e=>c?h(e):g(e,{locale:l,weekStartsOn:s}),endOfWeek:e=>c?p(e):y(e,{locale:l,weekStartsOn:s})}[e](n,"after"===t?1:-1);return"before"===t&&r?w=v([r,w]):"after"===t&&o&&(w=b([o,w])),w}(e,t,n.date,r,o,i,a),c=Boolean(i.disabled&&iN(l,i.disabled,a)),u=Boolean(i.hidden&&iN(l,i.hidden,a)),d=new QC(l,l,a);return c||u?aN(e,t,d,r,o,i,a,s+1):d}function sN(e,t,n,r,o){const{autoFocus:i}=e,[a,l]=(0,s.useState)(),c=function(e,t,n,r){let o,i=0,a=!1;for(;i<e.length&&!a;){const s=e[i],l=t(s);l[VS.disabled]||l[VS.hidden]||l[VS.outside]||(l[VS.focused]||r?.isEqualTo(s)||n(s.date)||l[VS.today])&&(o=s,a=!0),i++}return o||(o=e.find((e=>{const n=t(e);return!n[VS.disabled]&&!n[VS.hidden]&&!n[VS.outside]}))),o}(t.days,n,r||(()=>!1),a),[u,d]=(0,s.useState)(i?c:void 0);return{isFocusTarget:e=>Boolean(c?.isEqualTo(e)),setFocused:d,focused:u,blur:()=>{l(u),d(void 0)},moveFocus:(n,r)=>{if(!u)return;const i=aN(n,r,u,t.navStart,t.navEnd,e,o);i&&(t.goToDay(i),d(i))}}}function lN(e){const{components:t,formatters:n,labels:r,dateLib:l,locale:c,classNames:u}=(0,s.useMemo)((()=>{return{dateLib:(r=e.dateLib,{...vC,...r}),components:(n=e.components,{...o,...n}),formatters:(t=e.formatters,t?.formatMonthCaption&&!t.formatCaption&&(t.formatCaption=t.formatMonthCaption),t?.formatYearCaption&&!t.formatYearDropdown&&(t.formatYearDropdown=t.formatYearCaption),{...i,...t}),labels:{...a,...e.labels},locale:{...Uk,...e.locale},classNames:{...bC(),...e.classNames}};var t,n,r}),[e.classNames,e.components,e.dateLib,e.formatters,e.labels,e.locale]),{captionLayout:d,firstWeekContainsDate:f,mode:m,onDayBlur:h,onDayClick:p,onDayFocus:g,onDayKeyDown:y,onDayMouseEnter:v,onDayMouseLeave:b,onNextClick:w,onPrevClick:x,showWeekNumber:_,styles:E,useAdditionalDayOfYearTokens:S,useAdditionalWeekYearTokens:k,weekStartsOn:C}=e,N={locale:c,weekStartsOn:C,firstWeekContainsDate:f,useAdditionalWeekYearTokens:k,useAdditionalDayOfYearTokens:S},P=N,{formatCaption:T,formatDay:O,formatMonthDropdown:M,formatWeekNumber:R,formatWeekNumberHeader:D,formatWeekdayName:A,formatYearDropdown:j}=n,I=function(e,t){const[n,r]=function(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:i,startOfMonth:a,endOfMonth:s,addYears:l,endOfYear:c}=t,{fromYear:u,toYear:d,fromMonth:f,toMonth:m}=e;!n&&f&&(n=f),!n&&u&&(n=new Date(u,0,1)),!r&&m&&(r=m),!r&&d&&(r=new Date(d,11,31));const h=e.captionLayout?.startsWith("dropdown");return n?n=a(n):u?n=new Date(u,0,1):!n&&h&&(n=o(l(e.today??(e.timeZone?TC.tz(e.timeZone):t.Date?new t.Date:new Date),-100))),r?r=s(r):d?r=new Date(d,11,31):!r&&h&&(r=c(e.today??(e.timeZone?TC.tz(e.timeZone):t.Date?new t.Date:new Date))),[n?i(n):n,r?i(r):r]}(e,t),{startOfMonth:o,endOfMonth:i}=t,a=JC(e,t),[l,c]=nN(a,e.month?o(e.month):void 0);(0,s.useEffect)((()=>{const n=JC(e,t);c(n)}),[e.timeZone]);const u=function(e,t,n,r){const{numberOfMonths:o=1}=n,i=[];for(let n=0;n<o;n++){const o=r.addMonths(e,n);if(t&&o>t)break;i.push(o)}return i}(l,r,e,t),d=function(e,t,n,r){const o=e[0],i=e[e.length-1],{ISOWeek:a,fixedWeeks:s,locale:l,weekStartsOn:c}=n??{},{startOfWeek:u,endOfWeek:d,startOfISOWeek:f,endOfISOWeek:m,addDays:h,differenceInCalendarDays:p,differenceInCalendarMonths:g,isAfter:y,endOfMonth:v}=r,b=a?f(o):u(o,{weekStartsOn:c,locale:l}),w=p(a?m(v(i)):d(v(i),{weekStartsOn:c,locale:l}),b),x=g(i,o)+1,_=[];for(let e=0;e<=w;e++){const n=h(b,e);if(t&&y(n,t))break;_.push(n)}const E=42*x;if(s&&_.length<E)for(let e=0;e<7;e++){const e=h(_[_.length-1],1);_.push(e)}return _}(u,e.endMonth?i(e.endMonth):void 0,e,t),f=function(e,t,n,r){const{startOfWeek:o,endOfWeek:i,startOfISOWeek:a,endOfISOWeek:s,endOfMonth:l,addDays:c,getWeek:u,getISOWeek:d}=r,f=e.reduce(((e,f)=>{const m=n.ISOWeek?a(f):o(f,{locale:n.locale,weekStartsOn:n.weekStartsOn}),h=n.ISOWeek?s(l(f)):i(l(f),{locale:n.locale,weekStartsOn:n.weekStartsOn}),p=t.filter((e=>e>=m&&e<=h));if(n.fixedWeeks&&p.length<42){const e=t.filter((e=>e>h&&e<=c(h,7)));p.push(...e)}const g=p.reduce(((e,t)=>{const o=n.ISOWeek?d(t):u(t,{locale:n.locale,weekStartsOn:n.weekStartsOn,firstWeekContainsDate:n.firstWeekContainsDate}),i=e.find((e=>e.weekNumber===o)),a=new QC(t,f,r);return i?i.days.push(a):e.push(new tN(o,[a])),e}),[]),y=new eN(f,g);return e.push(y),e}),[]);return n.reverseMonths?f.reverse():f}(u,d,e,t),m=function(e){return e.reduce(((e,t)=>[...e,...t.weeks]),[])}(f),h=f.reduce(((e,t)=>[...e,...t.weeks.reduce(((e,t)=>[...e,...t.days]),[])]),[]),p=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i}=n,{startOfMonth:a,addMonths:s,differenceInCalendarMonths:l}=r,c=o?i??1:1,u=a(e);return t&&l(u,t)<=0?void 0:s(u,-c)}(l,n,e,t),g=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i=1}=n,{startOfMonth:a,addMonths:s,differenceInCalendarMonths:l}=r,c=o?i:1,u=a(e);return t&&l(t,e)<i?void 0:s(u,c)}(l,r,e,t),{disableNavigation:y,onMonthChange:v}=e,b=e=>{if(y)return;let t=o(e);n&&t<o(n)&&(t=o(n)),r&&t>o(r)&&(t=o(r)),c(t),v?.(t)};return{months:f,weeks:m,days:h,navStart:n,navEnd:r,previousMonth:p,nextMonth:g,goToMonth:b,goToDay:e=>{(e=>m.some((t=>t.days.some((t=>t.isEqualTo(e))))))(e)||b(e.date)}}}(e,l),{days:F,months:L,navStart:z,navEnd:B,previousMonth:W,nextMonth:V,goToMonth:U}=I,$=function(e,t,n){const{disabled:r,hidden:o,modifiers:i,showOutsideDays:a,today:s}=t,{isSameDay:l,isSameMonth:c}=n,u={[VS.focused]:[],[VS.outside]:[],[VS.disabled]:[],[VS.hidden]:[],[VS.today]:[]},d={},f={[US.range_end]:[],[US.range_middle]:[],[US.range_start]:[],[US.selected]:[]};for(const f of e){const{date:e,displayMonth:m}=f,h=Boolean(m&&!c(e,m)),p=Boolean(r&&iN(e,r,n)),g=Boolean(o&&iN(e,o,n))||!a&&h,y=l(e,s??(t.timeZone?TC.tz(t.timeZone):n.Date?new n.Date:new Date));h&&u.outside.push(f),p&&u.disabled.push(f),g&&u.hidden.push(f),y&&u.today.push(f),i&&Object.keys(i).forEach((t=>{const r=i?.[t];r&&iN(e,r,n)&&(d[t]?d[t].push(f):d[t]=[f])}))}return e=>{const t={[VS.focused]:!1,[VS.disabled]:!1,[VS.hidden]:!1,[VS.outside]:!1,[VS.today]:!1},n={[US.range_end]:!1,[US.range_middle]:!1,[US.range_start]:!1,[US.selected]:!1},r={};for(const n in u){const r=u[n];t[n]=r.some((t=>t===e))}for(const t in f){const r=f[t];n[t]=r.some((t=>t===e))}for(const t in d)r[t]=d[t].some((t=>t===e));return{...n,...t,...r}}}(F,e,l),{isSelected:H,select:Y,selected:q}=function(e,t){const n=function(e,t){const{selected:n,required:r,onSelect:o}=e,[i,a]=nN(n,o?n:void 0),s=o?n:i,{isSameDay:l}=t;return{selected:s,select:(e,t,n)=>{let i=e;return!r&&s&&s&&l(e,s)&&(i=void 0),o||a(i),o?.(i,e,t,n),i},isSelected:e=>!!s&&l(s,e)}}(e,t),r=function(e,t){const{selected:n,required:r,onSelect:o}=e,[i,a]=nN(n,o?n:void 0),s=o?n:i,{isSameDay:l}=t,c=e=>s?.some((t=>l(t,e)))??!1,{min:u,max:d}=e;return{selected:s,select:(e,t,n)=>{let i=[...s??[]];if(c(e)){if(s?.length===u)return;if(r&&1===s?.length)return;i=s?.filter((t=>!l(t,e)))}else i=s?.length===d?[e]:[...i,e];return o||a(i),o?.(i,e,t,n),i},isSelected:c}}(e,t),o=function(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:i,onSelect:a}=e,[s,l]=nN(o,a?o:void 0),c=a?o:s;return{selected:c,select:(o,s,u)=>{const{min:d,max:f}=e,m=o?function(e,t,n=0,r=0,o=!1,i=vC){const{from:a,to:s}=t||{},{isSameDay:l,isAfter:c,isBefore:u}=i;let d;if(a||s){if(a&&!s)d=l(a,e)?o?{from:a,to:void 0}:void 0:u(e,a)?{from:e,to:a}:{from:a,to:e};else if(a&&s)if(l(a,e)&&l(s,e))d=o?{from:a,to:s}:void 0;else if(l(a,e))d={from:a,to:n>0?void 0:e};else if(l(s,e))d={from:e,to:n>0?void 0:e};else if(u(e,a))d={from:e,to:s};else if(c(e,a))d={from:a,to:e};else{if(!c(e,s))throw new Error("Invalid range");d={from:a,to:e}}}else d={from:e,to:n>0?void 0:e};if(d?.from&&d?.to){const t=i.differenceInCalendarDays(d.to,d.from);(r>0&&t>r||n>1&&t<n)&&(d={from:e,to:void 0})}return d}(o,c,d,f,i,t):void 0;if(m?.from&&m.to){let e=m.from;for(;t.differenceInCalendarDays(m.to,e)>0;)if(e=t.addDays(e,1),r&&n&&iN(e,n,t)){m.from=o,m.to=void 0;break}}return a||l(m),a?.(m,o,s,u),m},isSelected:e=>c&&rN(c,e,!1,t)}}(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}(e,l)??{},{blur:K,focused:G,isFocusTarget:X,moveFocus:Z,setFocused:J}=sN(e,I,$,H??(()=>!1),l),{labelDayButton:Q,labelGridcell:ee,labelGrid:te,labelMonthDropdown:ne,labelNav:re,labelWeekday:oe,labelWeekNumber:ie,labelWeekNumberHeader:ae,labelYearDropdown:se}=r,le=(0,s.useMemo)((()=>function(e,t,n,r,o=vC){const i=r?TC.tz(r):o.Date?new o.Date:new Date,a=n?o.startOfISOWeek(i):o.startOfWeek(i,{locale:e,weekStartsOn:t}),s=[];for(let e=0;e<7;e++){const t=o.addDays(a,e);s.push(t)}return s}(c,e.weekStartsOn,e.ISOWeek,e.timeZone,l)),[l,c,e.ISOWeek,e.timeZone,e.weekStartsOn]),ce=void 0!==m||void 0!==p,ue=(0,s.useCallback)((()=>{W&&(U(W),x?.(W))}),[W,U,x]),de=(0,s.useCallback)((()=>{V&&(U(V),w?.(V))}),[U,V,w]),fe=(0,s.useCallback)(((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),J(e),Y?.(e.date,t,n),p?.(e.date,t,n)}),[Y,p,J]),me=(0,s.useCallback)(((e,t)=>n=>{J(e),g?.(e.date,t,n)}),[g,J]),he=(0,s.useCallback)(((e,t)=>n=>{K(),h?.(e.date,t,n)}),[K,h]),pe=(0,s.useCallback)(((t,n)=>r=>{const o={ArrowLeft:["day","rtl"===e.dir?"after":"before"],ArrowRight:["day","rtl"===e.dir?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[r.shiftKey?"year":"month","before"],PageDown:[r.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(o[r.key]){r.preventDefault(),r.stopPropagation();const[e,t]=o[r.key];Z(e,t)}y?.(t.date,n,r)}),[Z,y,e.dir]),ge=(0,s.useCallback)(((e,t)=>n=>{v?.(e.date,t,n)}),[v]),ye=(0,s.useCallback)(((e,t)=>n=>{b?.(e.date,t,n)}),[b]),{className:ve,style:be}=(0,s.useMemo)((()=>({className:[u[WS.Root],e.className].filter(Boolean).join(" "),style:{...E?.[WS.Root],...e.style}})),[u,e.className,e.style,E]),we=function(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0};return Object.entries(e).forEach((([e,n])=>{e.startsWith("data-")&&(t[e]=n)})),t}(e),xe={selected:q,select:Y,isSelected:H,months:L,nextMonth:V,previousMonth:W,goToMonth:U,getModifiers:$,components:t,classNames:u,styles:E,labels:r,formatters:n};return s.createElement(rk.Provider,{value:xe},s.createElement(t.Root,{className:ve,style:be,dir:e.dir,id:e.id,lang:e.lang,nonce:e.nonce,title:e.title,...we},s.createElement(t.Months,{className:u[WS.Months],style:E?.[WS.Months]},!e.hideNavigation&&s.createElement(t.Nav,{className:u[WS.Nav],style:E?.[WS.Nav],"aria-label":re(),onPreviousClick:ue,onNextClick:de,previousMonth:W,nextMonth:V}),L.map(((r,o)=>{const i=function(e,t,n,r,o,i){if(!t)return;if(!n)return;const{addMonths:a,startOfMonth:s,isBefore:l}=i,c=e.getFullYear(),u=[];let d=t;for(;u.length<12&&l(d,a(n,1));)u.push(d.getMonth()),d=a(d,1);const f=u.sort(((e,t)=>e-t)).map((e=>{const a=r.formatMonthDropdown(e,o),l=i.Date?new i.Date(c,e):new Date(c,e);return{value:e,label:a,disabled:t&&l<s(t)||n&&l>s(n)||!1}}));return f}(r.date,z,B,n,c,l),a=function(e,t,n,r,o){if(!t)return;if(!n)return;const{startOfMonth:i,startOfYear:a,endOfYear:s,addYears:l,isBefore:c,isSameYear:u}=o,d=e.getMonth(),f=a(t),m=s(n),h=[];let p=f;for(;c(p,m)||u(p,m);)h.push(p.getFullYear()),p=l(p,1);return h.map((e=>{const a=o.Date?new o.Date(e,d):new Date(e,d),s=t&&a<i(t)||d&&n&&a>i(n)||!1;return{value:e,label:r.formatYearDropdown(e),disabled:s}}))}(L[0].date,z,B,n,l);return s.createElement(t.Month,{className:u[WS.Month],style:E?.[WS.Month],key:o,displayIndex:o,calendarMonth:r},s.createElement(t.MonthCaption,{className:u[WS.MonthCaption],style:E?.[WS.MonthCaption],calendarMonth:r,displayIndex:o},d?.startsWith("dropdown")?s.createElement(t.DropdownNav,{className:u[WS.Dropdowns],style:E?.[WS.Dropdowns]},"dropdown"===d||"dropdown-months"===d?s.createElement(t.MonthsDropdown,{className:u[WS.MonthsDropdown],"aria-label":ne(),classNames:u,components:t,disabled:Boolean(e.disableNavigation),onChange:e=>{const t=Number(e.target.value),n=l.setMonth(l.startOfMonth(r.date),t);U(n)},options:i,style:E?.[WS.Dropdown],value:r.date.getMonth()}):s.createElement("span",{role:"status","aria-live":"polite"},M(r.date.getMonth())),"dropdown"===d||"dropdown-years"===d?s.createElement(t.YearsDropdown,{className:u[WS.YearsDropdown],"aria-label":se(P),classNames:u,components:t,disabled:Boolean(e.disableNavigation),onChange:e=>{const t=l.setYear(l.startOfMonth(r.date),Number(e.target.value));U(t)},options:a,style:E?.[WS.Dropdown],value:r.date.getFullYear()}):s.createElement("span",{role:"status","aria-live":"polite"},j(r.date.getFullYear()))):s.createElement(t.CaptionLabel,{className:u[WS.CaptionLabel],role:"status","aria-live":"polite"},T(r.date,N,l))),s.createElement(t.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===m||"range"===m,"aria-label":te(r.date,P,l)||void 0,className:u[WS.MonthGrid],style:E?.[WS.MonthGrid]},!e.hideWeekdays&&s.createElement(t.Weekdays,{className:u[WS.Weekdays],style:E?.[WS.Weekdays]},_&&s.createElement(t.WeekNumberHeader,{"aria-label":ae(P),className:u[WS.WeekNumberHeader],style:E?.[WS.WeekNumberHeader],scope:"col"},D()),le.map(((e,n)=>s.createElement(t.Weekday,{"aria-label":oe(e,P,l),className:u[WS.Weekday],key:n,style:E?.[WS.Weekday],scope:"col"},A(e,N,l))))),s.createElement(t.Weeks,{className:u[WS.Weeks],style:E?.[WS.Weeks]},r.weeks.map(((n,r)=>s.createElement(t.Week,{className:u[WS.Week],key:n.weekNumber,style:E?.[WS.Week],week:n},_&&s.createElement(t.WeekNumber,{week:n,style:E?.[WS.WeekNumber],"aria-label":ie(n.weekNumber,{locale:c}),className:u[WS.WeekNumber],scope:"row"},R(n.weekNumber)),n.days.map((n=>{const{date:r}=n,o=$(n);if(o[VS.focused]=!o.hidden&&Boolean(G?.isEqualTo(n)),o[US.selected]=!o.disabled&&(H?.(r)||o.selected),oN(q)){const{from:e,to:t}=q;o[US.range_start]=Boolean(e&&t&&l.isSameDay(r,e)),o[US.range_end]=Boolean(e&&t&&l.isSameDay(r,t)),o[US.range_middle]=rN(q,r,!0,l)}const i=function(e,t={},n={}){let r={...t?.[WS.Day]};return Object.entries(e).filter((([,e])=>!0===e)).forEach((([e])=>{r={...r,...n?.[e]}})),r}(o,E,e.modifiersStyles),a=function(e,t,n={}){return Object.entries(e).filter((([,e])=>!0===e)).reduce(((e,[r])=>(n[r]?e.push(n[r]):t[VS[r]]?e.push(t[VS[r]]):t[US[r]]&&e.push(t[US[r]]),e)),[t[WS.Day]])}(o,u,e.modifiersClassNames),c=ce?void 0:ee(r,o,P,l);return s.createElement(t.Day,{key:`${l.format(r,"yyyy-MM-dd")}_${l.format(n.displayMonth,"yyyy-MM")}`,day:n,modifiers:o,className:a.join(" "),style:i,"aria-hidden":o.hidden||void 0,"aria-selected":o.selected||void 0,"aria-label":c,"data-day":l.format(r,"yyyy-MM-dd"),"data-month":n.outside?l.format(r,"yyyy-MM"):void 0,"data-selected":o.selected||void 0,"data-disabled":o.disabled||void 0,"data-hidden":o.hidden||void 0,"data-outside":n.outside||void 0,"data-focused":o.focused||void 0,"data-today":o.today||void 0},ce?s.createElement(t.DayButton,{className:u[WS.DayButton],style:E?.[WS.DayButton],type:"button",day:n,modifiers:o,disabled:o.disabled||void 0,tabIndex:X(n)?0:-1,"aria-label":Q(r,o,P,l),onClick:fe(n,o),onBlur:he(n,o),onFocus:me(n,o),onKeyDown:pe(n,o),onMouseEnter:ge(n,o),onMouseLeave:ye(n,o)},O(r,N,l)):O(n.date,N,l))}))))))))}))),e.footer&&s.createElement(t.Footer,{className:u[WS.Footer],style:E?.[WS.Footer],role:"status","aria-live":"polite"},e.footer)))}function cN(e,t,n){return Sk(e,-t,n)}var uN=function(){return React.createElement("span",{className:"bg-icon-interactive h-1 w-1 absolute rounded-full inline-block bottom-0 left-1/2 right-1/2"})},dN=function(e){return pC(e,"E").slice(0,1)};function fN(e){return fN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fN(e)}var mN=["width","className","classNames","selectedDates","setSelectedDates","showOutsideDays","mode","variant","alignment","onBlur","onChange"];function hN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hN(Object(n),!0).forEach((function(t){gN(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hN(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gN(e,t,n){return(t=function(e){var t=function(e){if("object"!=fN(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fN(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yN(){return yN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yN.apply(null,arguments)}function vN(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||bN(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bN(e,t){if(e){if("string"==typeof e)return wN(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wN(e,t):void 0}}function wN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var xN=function(e){var t=e.width,n=e.className,r=e.classNames,o=e.selectedDates,i=e.setSelectedDates,a=e.showOutsideDays,c=void 0===a||a,u=e.mode,d=void 0===u?"single":u,f=e.variant,m=void 0===f?"normal":f,h=e.alignment,p=void 0===h?"horizontal":h,g=(e.onBlur,e.onChange,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,mN)),y=g.numberOfMonths,v=vN((0,s.useState)(!1),2),b=v[0],w=v[1],x=vN((0,s.useState)(!1),2),_=x[0],E=x[1],S=vN((0,s.useState)((new Date).getFullYear()),2),k=S[0],C=S[1],N=vN((0,s.useState)(k-k%24),2),P=N[0],T=N[1];null==o&&(o="multiple"===d?[]:"range"===d?{from:null,to:null}:null);var O=function(e){var t=e.weekdays;return l().createElement("div",{className:"flex justify-between"},t.map((function(e,t){return l().createElement("button",{key:t,className:"h-10 w-10 px-1.5 py-2 text-center text-muted-foreground text-[0.8rem] font-normal content-center bg-transparent border-none"},e)})))},M=function(e){var t,n=e.day,r=e.modifiers,i=e.onSelect,a=r.selected,s=r.today,u=r.disabled,d=r.outside,f=r.range_middle,m=r.range_start,h=r.range_end,p=m||h||f,g=new Date,y=null===(t=o)||void 0===t?void 0:t.to,v=pC(n.displayMonth,"yyyy-MM")===pC(g,"yyyy-MM"),b=y&&pC(y,"yyyy-MM")===pC(n.date,"yyyy-MM"),w=cN(g,1),x=pC(n.date,"yyyy-MM")===pC(w,"yyyy-MM"),_=v||b||p,E=!c&&d,S=re("h-10 w-10 flex items-center justify-center transition text-text-secondary relative","border-none rounded",!a&&!p||d&&!x?"bg-transparent hover:bg-button-tertiary-hover":"bg-background-brand text-text-on-color",f&&_&&(!d||p)?"bg-brand-background-50 text-text-secondary rounded-none":"",u?"opacity-50 cursor-not-allowed text-text-disabled":"cursor-pointer",d&&!p||!_&&d||d&&!x?"bg-transperant opacity-50 text-text-disabled cursor-auto":"");return l().createElement("button",{onClick:function(){return!u&&i(n.date)},className:S,disabled:u||d,"aria-label":pC(n.date,"EEEE, MMMM do, yyyy")},(!E||p&&_)&&pC(n.date,"d"),s&&l().createElement("span",{className:"absolute h-1 w-1 bg-background-brand rounded-full bottom-1"}))},R=function(e){var t=e.day,n=e.modifiers,r=e.className,o=e.onSelect;return l().createElement("td",{className:r},l().createElement(M,{day:t,modifiers:n,onSelect:o}))},D=function(e){var t=e.monthGridProps,n=e.onSelect;return l().createElement("div",{className:"flex flex-col"},t.children[1].props.children.map((function(e,t){return l().createElement("div",{key:t,className:"flex flex-row justify-between"},e.props.children[1].map((function(e,t){return l().createElement("div",{key:t,className:"flex gap-1"},l().createElement(M,yN({},e.props,{onSelect:n})))})))})))},A=function(e){var t;"range"===d?!o.from||o.from&&o.to?i({from:e,to:null}):i({from:o.from,to:e}):"multiple"===d?o.some((function(t){return pC(t,"yyyy-MM-dd")===pC(e,"yyyy-MM-dd")}))?i(o.filter((function(t){return pC(t,"yyyy-MM-dd")!==pC(e,"yyyy-MM-dd")}))):i([].concat(function(e){if(Array.isArray(e))return wN(e)}(t=o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||bN(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[e])):"single"===d&&i([e])},j=re("relative bg-background-primary shadow-datepicker-wrapper",t,"vertical"===p?"flex flex-col":"flex flex-row  gap-3","normal"===m?"rounded-md border border-solid border-border-subtle":"","presets"===m?"rounded-tr-md border border-solid border-border-subtle":"","dualdate"===m?"rounded-tr-md rounded-tl-md border border-solid border-border-subtle":"");return l().createElement(l().Fragment,null,l().createElement(lN,yN({mode:d,selected:o,onSelect:A,hideNavigation:!0,captionLayout:"label",className:re(n),formatters:{formatWeekdayName:dN},showHead:!1,classNames:pN({months:j,month:"flex flex-col p-2 gap-1 text-center border border-border-subtle rounded-md w-full",caption:"relative flex justify-center items-center",table:"w-full border-separate border-spacing-[0_0.25rem] border-spacing-0",head_row:"flex mb-1",head_cell:"text-muted-foreground rounded-md w-10 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-10 w-10 text-center text-sm p-0 relative",day:"h-10 w-10 p-0 font-normal bg-background-primary text-current"},r),components:{MonthCaption:function(e){var t=ok(),n=t.goToMonth,r=t.nextMonth,o=t.previousMonth,i=pC(e.calendarMonth.date,"yyyy"),a=pC(e.calendarMonth.date,"MMMM"),s=new Date(e.calendarMonth.date);s.setDate(s.getDate()-s.getDay());var c,u=Array.from({length:7},(function(e,t){var n=new Date(s);return n.setDate(s.getDate()+t),dN(n)}));return c=_?"".concat(P," - ").concat(P+23):b?i:"".concat(a," ").concat(i),l().createElement(l().Fragment,null,l().createElement("div",{className:"flex justify-between"},l().createElement(ue,{variant:"ghost",onClick:function(){if(_)T(P-24);else if(b){var t=new Date(k-1,e.calendarMonth.date.getMonth());C(t.getFullYear()),n(t)}else n(o)},className:"bg-background-primary border-none cursor-pointer"},l().createElement(xS,{className:"h-4 w-4"})),l().createElement(ue,{variant:"ghost",onClick:function(){y>1||(b?(E(!0),w(!1)):_?E(!1):w(!b))}},c),l().createElement(ue,{variant:"ghost",onClick:function(){if(_)T(P+24);else if(b){var t=new Date(k+1,e.calendarMonth.date.getMonth());C(t.getFullYear()),n(t)}else n(r)},className:"bg-background-primary border-none cursor-pointer"},l().createElement(i_,{className:"h-4 w-4"}))),_&&l().createElement("div",{className:"grid grid-cols-4 w-full"},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24;return Array.from({length:t},(function(t,n){return e+n}))}(P).map((function(t){return l().createElement(ue,{key:t,variant:"ghost",onClick:function(){return function(t){C(t),E(!1),w(!0),n(new Date(t,e.calendarMonth.date.getMonth()))}(t)},className:re("h-10 w-full text-center font-normal relative",t===k&&t!==(new Date).getFullYear()&&"bg-background-brand text-text-on-color hover:bg-background-brand hover:text-black")},t,t===(new Date).getFullYear()&&uN())}))),b&&!_&&l().createElement("div",{className:"grid grid-cols-4 gap-2 my-12"},Array.from({length:12},(function(t,r){return l().createElement(ue,{key:r,variant:"ghost",onClick:function(){w(!1),n(new Date(k,r))},className:re("px-1.5 py-2 h-10 w-[4.375rem] text-center font-normal relative",r===e.calendarMonth.date.getMonth()&&r!==(new Date).getMonth()&&k===e.calendarMonth.date.getFullYear()&&e.calendarMonth.date.getFullYear()!==(new Date).getFullYear()&&"bg-background-brand text-text-on-color hover:bg-background-brand hover:text-black")},pC(new Date(0,r),"MMM"),(new Date).getMonth()===r&&(new Date).getFullYear()===k&&uN())}))),!b&&!_&&l().createElement(O,{weekdays:u}))},Day:function(e){return l().createElement(R,yN({},e,{onSelect:A}))},Weekdays:function(){return null},Months:function(e){return l().createElement(l().Fragment,null,l().createElement("div",{className:j},e.children.map((function(e,t){return e?l().createElement(l().Fragment,{key:t},e.map((function(e,t){return l().createElement(l().Fragment,{key:t},t>0&&l().createElement("div",{className:"border border-solid border-border-subtle border-l-0"}),e)}))):null}))))},MonthGrid:function(e){return!b&&!_&&l().createElement(D,{monthGridProps:e,onSelect:A})}}},g)))};function _N(e){return Pk(Date.now(),e)}function EN(e){return xk(e,Date.now())}function SN(e){const t=EN(e?.in),n=t.getFullYear(),r=t.getMonth(),o=t.getDate(),i=EN(e?.in);return i.setFullYear(n,r,o-1),i.setHours(0,0,0,0),i}function kN(e,t,n){return kk(e,-t,n)}var CN=["selectionType","variant","presets","onCancel","onApply","applyButtonText","cancelButtonText","showOutsideDays"];function NN(){return NN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NN.apply(null,arguments)}function PN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var TN=function(e){var t=e.selectionType,n=void 0===t?"single":t,r=e.variant,o=void 0===r?"normal":r,i=e.presets,a=void 0===i?[]:i,c=e.onCancel,u=e.onApply,d=e.applyButtonText,f=void 0===d?"Apply":d,m=e.cancelButtonText,h=void 0===m?"Cancel":m,p=e.showOutsideDays,g=void 0===p||p,y=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,CN),v=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next,!2;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){l=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(e)||function(e){if(e){if("string"==typeof e)return PN(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?PN(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,s.useState)((function(){return"multiple"===n?[]:"range"===n?{from:null,to:null}:null}))),b=v[0],w=v[1],x=[{label:"Today",range:{from:_N(),to:_N()}},{label:"Yesterday",range:{from:SN(),to:SN()}},{label:"This Week",range:{from:Hk(new Date,{weekStartsOn:1}),to:Rk(new Date,{weekStartsOn:1})}},{label:"Last Week",range:{from:Hk(kN(new Date,1),{weekStartsOn:1}),to:Rk(kN(new Date,1),{weekStartsOn:1})}},{label:"This Month",range:{from:yC(new Date),to:Dk(new Date)}},{label:"Last Month",range:{from:yC(cN(new Date,1)),to:Dk(cN(new Date,1))}}],_=a.length>0?a:x,E=function(){w("multiple"===n?[]:{from:null,to:null}),c&&c()},S=function(){u&&u(b)};return"normal"===o?l().createElement(xN,NN({},y,{mode:n,variant:o,width:"w-[18.5rem]",selectedDates:b,showOutsideDays:g,setSelectedDates:w})):"dualdate"===o?l().createElement(xN,{mode:n,numberOfMonths:2,alignment:"horizontal",selectedDates:b,setSelectedDates:w,showOutsideDays:g,variant:o,width:"w-auto",footer:l().createElement("div",{className:"flex justify-end p-2 gap-3 border border-solid border-border-subtle border-t-0 rounded-md rounded-tl-none rounded-tr-none"},l().createElement(ue,{variant:"outline",onClick:E},h),l().createElement(ue,{onClick:S},f))}):"presets"===o?l().createElement("div",{className:"flex flex-row shadow-datepicker-wrapper"},l().createElement("div",{className:"flex flex-col gap-1 p-3 items-start border border-solid border-border-subtle border-r-0 rounded-tl-md rounded-bl-md"},_.map((function(e,t){return l().createElement(ue,{key:t,onClick:function(){return t=e.range,void w(t);var t},variant:"ghost",className:"font-medium text-sm"},e.label)}))),l().createElement(xN,NN({},y,{mode:n,selectedDates:b,setSelectedDates:w,variant:o,showOutsideDays:g,width:"w-auto",numberOfMonths:2,footer:l().createElement("div",{className:"flex justify-end p-2 gap-3 border border-solid border-border-subtle border-t-0 rounded-br-md"},l().createElement(ue,{variant:"outline",onClick:E},h),l().createElement(ue,{onClick:S},f))}))):void 0};return r}()},67:(e,t)=>{"use strict";t.YW=function(e,t={}){const{decode:m=decodeURIComponent,delimiter:h=n}=t,{regexp:p,keys:g}=function(e,t={}){const{delimiter:m=n,end:h=!0,sensitive:p=!1,trailing:g=!0}=t,y=[],v=[],b=p?"":"i",w=(Array.isArray(e)?e:[e]).map((e=>e instanceof u?e:function(e,t={}){const{encodePath:n=r}=t,l=new c(function*(e){const t=[...e];let n=0;function r(){let e="";if(o.test(t[++n]))for(e+=t[n];i.test(t[++n]);)e+=t[n];else if('"'===t[n]){let r=n;for(;n<t.length;){if('"'===t[++n]){n++,r=0;break}e+="\\"===t[n]?t[++n]:t[n]}if(r)throw new TypeError(`Unterminated quote at ${r}: ${a}`)}if(!e)throw new TypeError(`Missing parameter name at ${n}: ${a}`);return e}for(;n<t.length;){const e=t[n],o=s[e];if(o)yield{type:o,index:n++,value:e};else if("\\"===e)yield{type:"ESCAPED",index:n++,value:t[n++]};else if(":"===e){const e=r();yield{type:"PARAM",index:n,value:e}}else if("*"===e){const e=r();yield{type:"WILDCARD",index:n,value:e}}else yield{type:"CHAR",index:n,value:t[n++]}}return{type:"END",index:n,value:""}}(e)),d=function e(t){const r=[];for(;;){const o=l.text();o&&r.push({type:"text",value:n(o)});const i=l.tryConsume("PARAM");if(i){r.push({type:"param",name:i});continue}const a=l.tryConsume("WILDCARD");if(a)r.push({type:"wildcard",name:a});else{if(!l.tryConsume("{"))return l.consume(t),r;r.push({type:"group",tokens:e("}")})}}}("END");return new u(d)}(e,t)));for(const{tokens:e}of w)for(const t of d(e,0,[])){const e=f(t,m,y);v.push(e)}let x=`^(?:${v.join("|")})`;return g&&(x+=`(?:${l(m)}$)?`),x+=h?"$":`(?=${l(m)}|$)`,{regexp:new RegExp(x,b),keys:y}}(e,t),y=g.map((e=>!1===m?r:"param"===e.type?m:e=>e.split(h).map(m)));return function(e){const t=p.exec(e);if(!t)return!1;const n=t[0],r=Object.create(null);for(let e=1;e<t.length;e++){if(void 0===t[e])continue;const n=g[e-1],o=y[e-1];r[n.name]=o(t[e])}return{path:n,params:r}}};const n="/",r=e=>e,o=/^[$_\p{ID_Start}]$/u,i=/^[$\u200c\u200d\p{ID_Continue}]$/u,a="https://git.new/pathToRegexpError",s={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function l(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class c{constructor(e){this.tokens=e}peek(){if(!this._peek){const e=this.tokens.next();this._peek=e.value}return this._peek}tryConsume(e){const t=this.peek();if(t.type===e)return this._peek=void 0,t.value}consume(e){const t=this.tryConsume(e);if(void 0!==t)return t;const{type:n,index:r}=this.peek();throw new TypeError(`Unexpected ${n} at ${r}, expected ${e}: ${a}`)}text(){let e,t="";for(;e=this.tryConsume("CHAR")||this.tryConsume("ESCAPED");)t+=e;return t}}class u{constructor(e){this.tokens=e}}function*d(e,t,n){if(t===e.length)return yield n;const r=e[t];if("group"===r.type){const o=n.slice();for(const n of d(r.tokens,0,o))yield*d(e,t+1,n)}else n.push(r);yield*d(e,t+1,n)}function f(e,t,n){let r="",o="",i=!0;for(let s=0;s<e.length;s++){const c=e[s];if("text"!==c.type)if("param"!==c.type&&"wildcard"!==c.type);else{if(!i&&!o)throw new TypeError(`Missing text after "${c.name}": ${a}`);"param"===c.type?r+=`(${m(t,i?"":o)}+)`:r+="([\\s\\S]+)",n.push(c),o="",i=!1}else r+=l(c.value),o+=c.value,i||(i=c.value.includes(t))}return r}function m(e,t){return t.length<2?e.length<2?`[^${l(e+t)}]`:`(?:(?!${l(e)})[^${l(t)}])`:e.length<2?`(?:(?!${l(t)})[^${l(e)}])`:`(?:(?!${l(t)}|${l(e)})[\\s\\S])`}},992:(e,t)=>{"use strict";var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function o(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,i,a=[];for(i in"string"!=typeof t&&(t="?"),e)if(n.call(e,i)){if((r=e[i])||null!=r&&!isNaN(r)||(r=""),i=o(i),r=o(r),null===i||null===r)continue;a.push(i+"="+r)}return a.length?t+a.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,o={};t=n.exec(e);){var i=r(t[1]),a=r(t[2]);null===i||null===a||i in o||(o[i]=a)}return o}},338:(e,t,n)=>{"use strict";var r=n(795);t.H=r.createRoot,r.hydrateRoot},795:e=>{"use strict";e.exports=window.ReactDOM},942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=n(338);const t=window.wp.domReady;var r=n.n(t);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const s=window.React;var l=n.n(s);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function h(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=window.wp.element;var g,y=n(992);function v(e){return{path:e.pathname,hash:e.hash,query:y.parse(e.search)}}function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(null,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(g||(g={}));var w="beforeunload";function x(e){e.preventDefault(),e.returnValue=""}function _(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}var E=function(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,r=n.history;function o(){var e=n.location,t=e.pathname,o=e.search,i=e.hash,a=r.state||{};return[a.idx,{pathname:t,search:o,hash:i,state:a.usr||null,key:a.key||"default"}]}var i=null;n.addEventListener("popstate",(function(){if(i)d.call(i),i=null;else{var e=g.Pop,t=o(),n=t[0],r=t[1];if(d.length){if(null!=n){var a=l-n;a&&(i={action:e,location:r,retry:function(){v(-1*a)}},v(a))}}else y(e)}}));var a=g.Pop,s=o(),l=s[0],c=s[1],u=_(),d=_();function f(e){return"string"==typeof e?e:(n=(t=e).pathname,r=void 0===n?"/":n,o=t.search,i=void 0===o?"":o,a=t.hash,s=void 0===a?"":a,i&&"?"!==i&&(r+="?"===i.charAt(0)?i:"?"+i),s&&"#"!==s&&(r+="#"===s.charAt(0)?s:"#"+s),r);var t,n,r,o,i,a,s}function m(e,t){return void 0===t&&(t=null),b({pathname:c.pathname,hash:"",search:""},"string"==typeof e?function(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}(e):e,{state:t,key:Math.random().toString(36).substr(2,8)})}function h(e,t){return[{usr:e.state,key:e.key,idx:t},f(e)]}function p(e,t,n){return!d.length||(d.call({action:e,location:t,retry:n}),!1)}function y(e){a=e;var t=o();l=t[0],c=t[1],u.call({action:a,location:c})}function v(e){r.go(e)}return null==l&&(l=0,r.replaceState(b({},r.state,{idx:l}),"")),{get action(){return a},get location(){return c},createHref:f,push:function e(t,o){var i=g.Push,a=m(t,o);if(p(i,a,(function(){e(t,o)}))){var s=h(a,l+1),c=s[0],u=s[1];try{r.pushState(c,"",u)}catch(e){n.location.assign(u)}y(i)}},replace:function e(t,n){var o=g.Replace,i=m(t,n);if(p(o,i,(function(){e(t,n)}))){var a=h(i,l),s=a[0],c=a[1];r.replaceState(s,"",c),y(o)}},go:v,back:function(){v(-1)},forward:function(){v(1)},listen:function(e){return u.push(e)},block:function(e){var t=d.push(e);return 1===d.length&&n.addEventListener(w,x),function(){t(),d.length||n.removeEventListener(w,x)}}}}(),S=wp.element.createContext({route:v(E.location)}),k=n(67),C=wp.element.useContext,N="";function P(e){var t=e.path,n=e.onRoute,r=e.children,o=C(S).route,i=(0,k.YW)("".concat(t))("".concat(o.hash.substr(1)));return i?(n&&(N!==i.path&&n(),N=i.path),React.createElement("div",null,wp.element.cloneElement(r,{route:i}))):null}var T=n(942),O=n.n(T);function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var R=wp.element.useContext;function D(e){var t=e.to,n=e.onClick,r=e.children,o=e.activeClassName,i=R(S).route,a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);return delete a.activeClassName,React.createElement("a",b({},a,{className:O()(h({},o,(0,k.YW)("".concat(t))("".concat(i.hash.substr(1)))),e.className),onClick:function(e){if(e.preventDefault(),i.path!==t||e.target.classList.contains("hfe-user-icon"))if(n&&n(e),"elementor-hf"===t&&hfeSettingsData.header_footer_builder)window.location.href=hfeSettingsData.header_footer_builder;else{var r=E.location.search,o=window.location.hash;if(r.includes("admin.php?page=hfe")&&o.includes(t))if(t.includes("settings")){var a=r+"&tab=1";e.target.classList.contains("hfe-user-icon")&&window.location.hash.includes("settings")?window.location.href="".concat(a,"#").concat(t):E.push("".concat(r,"#").concat(t))}else{var s=r.replace(/&tab=[^&]*/,"");E.push("".concat(s,"#").concat(t))}else window.location.href="".concat(hfeSettingsData.hfe_settings_url,"#").concat(t)}}}),r)}function A(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(A=function(){return!!e})()}var j=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t,n){return t=f(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,A()?Reflect.construct(t,n||[],f(e).constructor):t.apply(e,n))}(this,t,[e]),h(n,"handleRouteChange",(function(e){localStorage.setItem("hfeSelectedItemId","1");var t=v(null==e?void 0:e.location);n.setState({route:t})})),n.routes=Object.keys(e.routes).map((function(t){return e.routes[t].path})),n.unlisten=E.listen(n.handleRouteChange);var r=v(E.location),o=E.location.search;return n.state={route:r,defaultRoute:null!=e&&e.defaultRoute?"".concat(o,"#").concat(null==e?void 0:e.defaultRoute):"".concat(o,"#/")},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(t,e),function(e,t){return t&&d(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"componentWillUnmount",value:function(){this.unlisten()}},{key:"render",value:function(){var e=this.props,t=e.children,n=(e.NotFound,this.state),r=n.route,o=n.defaultRoute;if(!r.hash)return E.push(o),React.createElement("div",null);var i=!1;(this.routes||[]).forEach((function(e){var t=(0,k.YW)(r.hash.substr(1))("".concat(r.hash.substr(1)));t&&(i={name:e,data:t})}));var a={route:r,matched:i},s=!i;return React.createElement(S.Provider,{value:a},s?React.createElement("div",null,"Not found"):t)}}])}(p.Component),I=n(282);const F=(...e)=>e.filter(((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t)).join(" ").trim();var L={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const z=(0,s.forwardRef)((({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...l},c)=>(0,s.createElement)("svg",{ref:c,...L,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:F("lucide",o),...l},[...a.map((([e,t])=>(0,s.createElement)(e,t))),...Array.isArray(i)?i:[i]]))),B=(e,t)=>{const n=(0,s.forwardRef)((({className:n,...r},o)=>{return(0,s.createElement)(z,{ref:o,iconNode:t,className:F(`lucide-${i=e,i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...r});var i}));return n.displayName=`${e}`,n},W=B("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]),V=B("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),U=B("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),$=B("Headset",[["path",{d:"M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z",key:"12oyoe"}],["path",{d:"M21 16v2a4 4 0 0 1-4 4h-5",key:"1x7m43"}]]),H=B("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),Y=window.wp.i18n;var q={dashboard:{path:"dashboard"},widgets:{path:"widgets"},templates:{path:"templates"},settings:{path:"settings"},upgrade:{path:"upgrade"},headerFooterBuilder:{path:"elementor-hf"}},K=function(){return K=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},K.apply(this,arguments)},G=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},X=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},Z={rssFeedURL:"",selector:"",loaderIcon:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">\n\t<circle cx="50" cy="50" fill="none" stroke="#9f9f9f" stroke-width="10" r="35" stroke-dasharray="164.93361431346415 56.97787143782138">\n\t\t<animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 50 50;360 50 50" keyTimes="0;1"></animateTransform>\n\t</circle>\n\t</svg>',viewAll:{link:"",label:"View All"},triggerButton:{icon:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.61703 13.1998C8.04294 13.1503 7.46192 13.125 6.875 13.125H6.25C4.17893 13.125 2.5 11.4461 2.5 9.375C2.5 7.30393 4.17893 5.625 6.25 5.625H6.875C7.46192 5.625 8.04294 5.59972 8.61703 5.55018M8.61703 13.1998C8.82774 14.0012 9.1031 14.7764 9.43719 15.5195C9.64341 15.9782 9.48685 16.5273 9.05134 16.7787L8.50441 17.0945C8.04492 17.3598 7.45466 17.1921 7.23201 16.7106C6.70983 15.5811 6.30451 14.3866 6.03155 13.1425M8.61703 13.1998C8.29598 11.9787 8.125 10.6968 8.125 9.375C8.125 8.05316 8.29598 6.77125 8.61703 5.55018M8.61703 13.1998C11.25 13.427 13.737 14.1643 15.9789 15.3124M8.61703 5.55018C11.25 5.323 13.737 4.58569 15.9789 3.43757M15.9789 3.43757C15.8808 3.12162 15.7751 2.80903 15.662 2.5M15.9789 3.43757C16.4247 4.87356 16.7131 6.37885 16.8238 7.93326M15.9789 15.3124C15.8808 15.6284 15.7751 15.941 15.662 16.25M15.9789 15.3124C16.4247 13.8764 16.7131 12.3711 16.8238 10.8167M16.8238 7.93326C17.237 8.2772 17.5 8.79539 17.5 9.375C17.5 9.95461 17.237 10.4728 16.8238 10.8167M16.8238 7.93326C16.8578 8.40942 16.875 8.8902 16.875 9.375C16.875 9.8598 16.8578 10.3406 16.8238 10.8167" stroke="#94A3B8" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',beforeBtn:"",afterBtn:"",className:"",onClick:function(){}},notification:{setLastPostUnixTime:null,getLastPostUnixTime:null},flyout:{title:"What's New?",innerContent:{titleLink:!0,additionalClasses:[]},excerpt:{wordLimit:500,moreSymbol:"&hellip;",readMore:{label:"Read More",className:""}},className:"",closeOnEsc:!0,closeOnOverlayClick:!0,closeBtnIcon:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 18L18 6M6 6L18 18" stroke="#94A3B8" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',formatDate:null,onOpen:function(){},onClose:function(){},onReady:function(){}}},J=function(){function e(e){this.rssFeedURLs=[],this.lastPostUnixTime=0,this.multiLastPostUnixTime={},this.notificationsCount=0,this.multiNotificationCount={},this.hasNewFeeds=!1,this.multiHasNewFeeds={},this.validateArgs(e),this.parseDefaults(e),this.setElement(),this.getElement()?(this.setID(),this.setRSSFeedURLs(),Q.setInstanceID(this.getID()),this.RSS_Fetch_Instance=new ee(this),this.RSS_View_Instance=new te(this),this.setNotificationsCount(),this.setTriggers()):console.warn("WNR: Cannot find element with",this.getArgs().selector)}return e.prototype.validateArgs=function(e){["rssFeedURL","selector"].map((function(t){if(!e[t])throw new Error("".concat(t," is a required argument. It cannot be empty or undefined."));if("rssFeedURL"===t){var n=e[t];Array.isArray(n)&&n.forEach((function(e){if(!(null==e?void 0:e.key))throw new Error('The parameter "key" is required for "'.concat(t,'" parameter in multi-feed mode.'));if(e.key.includes(" "))throw new Error('The parameter "key" cannot have spaces for "'.concat(t,'" parameter in multi-feed mode. Ref Key: "').concat(e.key,'"'))}))}}))},e.prototype.parseDefaults=function(e){var t,n;this.args=K(K(K({},Z),e),{viewAll:K(K({},Z.viewAll),null==e?void 0:e.viewAll),triggerButton:K(K({},Z.triggerButton),null==e?void 0:e.triggerButton),flyout:K(K(K({},Z.flyout),null==e?void 0:e.flyout),{innerContent:K(K({},Z.flyout.innerContent),null===(t=null==e?void 0:e.flyout)||void 0===t?void 0:t.innerContent),excerpt:K(K({},Z.flyout.excerpt),null===(n=null==e?void 0:e.flyout)||void 0===n?void 0:n.excerpt)})})},e.prototype.getArgs=function(){return this.args},e.prototype.setElement=function(){this.element=document.querySelector(this.args.selector)},e.prototype.getElement=function(){return this.element},e.prototype.setID=function(){var e=[this.getArgs().selector],t=this.getArgs().rssFeedURL;Array.isArray(t)?t.forEach((function(t){e.push(t.key)})):e.push(t),this.ID=btoa(e.join("-")).slice(-12).replace(/=/g,"")},e.prototype.isMultiFeedRSS=function(){return"string"!=typeof this.getArgs().rssFeedURL},e.prototype.setRSSFeedURLs=function(){var e=this,t=this.getArgs().rssFeedURL;this.isMultiFeedRSS()?Array.isArray(t)&&t.forEach((function(t){e.rssFeedURLs.push(t)})):this.rssFeedURLs.push({key:null,label:"",url:t.toString()})},e.prototype.getRSSFeedURLs=function(){return this.rssFeedURLs},e.prototype.getID=function(){return this.ID},e.prototype.setNotificationsCount=function(){return G(this,void 0,void 0,(function(){var e=this;return X(this,(function(t){switch(t.label){case 0:return[4,Promise.all(this.getRSSFeedURLs().map((function(t){var n=t.key;return G(e,void 0,void 0,(function(){var e;return X(this,(function(t){switch(t.label){case 0:return e=0,"function"!=typeof this.getArgs().notification.getLastPostUnixTime?[3,2]:[4,this.getArgs().notification.getLastPostUnixTime(n,this)];case 1:return e=t.sent(),[3,3];case 2:e=Q.getLastPostUnixTime(n),t.label=3;case 3:return this.isMultiFeedRSS()?this.multiLastPostUnixTime[n]=+e:this.lastPostUnixTime=+e,[2]}}))}))})))];case 1:return t.sent(),[4,this.RSS_Fetch_Instance.fetchData().then((function(t){Object.keys(t).forEach((function(n){var r=t[n];if(r.length){e.multiNotificationCount[n]=0;var o=+r[0].date,i=e.isMultiFeedRSS()?e.multiLastPostUnixTime[n]:e.lastPostUnixTime;o>i&&(r.forEach((function(t){t.date>i&&(e.isMultiFeedRSS()&&(e.multiNotificationCount[n]++,e.multiHasNewFeeds[n]=!0),e.notificationsCount++,e.hasNewFeeds=!0)})),e.RSS_View_Instance.setNotification(e.notificationsCount))}}))}))];case 2:return t.sent(),[2]}}))}))},e.prototype.getNotificationsCount=function(){return this.notificationsCount},e.prototype.setTriggers=function(){var e=this,t=document.getElementById(this.RSS_View_Instance.getTriggerButtonID()),n=document.getElementById(this.RSS_View_Instance.getFlyoutID()),r=n.querySelector(".whats-new-rss-flyout-inner-content"),o=document.getElementById(this.RSS_View_Instance.getFlyoutCloseBtnID()),i=document.getElementById(this.RSS_View_Instance.getFlyoutMultiFeedNavID()),a=function(t){e.RSS_Fetch_Instance.fetchData().then((function(o){r.innerHTML="";var i=o[t];if(i.length){var a=+i[0].date,s=e.isMultiFeedRSS()?e.multiLastPostUnixTime[t]:e.lastPostUnixTime;i.forEach((function(n){var o=!!s&&n.date>s,i=e.getArgs().flyout.innerContent.titleLink?'<a href="'.concat(n.postLink,'" target="_blank">\n\t\t\t\t\t\t\t\t<h2>').concat(n.title,"</h2>\n\t\t\t\t\t\t\t</a>"):"<h2>".concat(n.title,"</h2>"),a='\n\t\t\t\t\t\t\t\t<div class="rss-content-header">\n\t\t\t\t\t\t\t\t\t<p>'.concat(e.RSS_View_Instance.formatDate(new Date(n.date)),"</p>\n\t\t\t\t\t\t\t\t\t").concat(i,"\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t").concat(e.RSS_View_Instance.createExcerpt(n.description,n.postLink,e.getArgs().flyout.excerpt),"\n\t\t\t\t\t\t\t\t").concat(e.RSS_View_Instance.listChildrenPosts(n.children),"\n\t\t\t\t\t\t\t"),l=e.getArgs().flyout.innerContent.additionalClasses;t&&l.push("`inner-content-item-feed-key-${key}`"),r.innerHTML+=e.RSS_View_Instance.innerContentWrapper(a,o,l.join(" "))})),e.getArgs().viewAll.link&&(r.innerHTML+=e.RSS_View_Instance.innerContentWrapper('\n\t\t\t\t\t\t\t<a href="'.concat(e.getArgs().viewAll.link,'" class="button view-all">').concat(e.getArgs().viewAll.label,"</a>\n\t\t\t\t\t\t\t"))),e.RSS_View_Instance.setIsLoading(!1),n.classList.add("ready"),e.getArgs().flyout.onReady(e),n.focus(),e.isMultiFeedRSS()||(e.lastPostUnixTime=a,e.hasNewFeeds&&("function"==typeof e.getArgs().notification.setLastPostUnixTime?e.getArgs().notification.setLastPostUnixTime(a,t):Q.setLastPostUnixTime(a,t)))}}))};t.addEventListener("click",(function(t){if(t.preventDefault(),e.getArgs().triggerButton.onClick(e),e.RSS_View_Instance.setIsLoading(!0),n.classList.remove("closed"),n.classList.add("open"),document.body.classList.add("whats-new-rss-is-active"),e.getArgs().flyout.onOpen(e),!e.isMultiFeedRSS())return a(null);var r=i.querySelectorAll("button");r.forEach((function(t){e.RSS_View_Instance.setMultiFeedTabNotificationCount(t.dataset.feedKey,e.multiNotificationCount[t.dataset.feedKey]),t.addEventListener("click",(function(n){n.preventDefault();var o=t.dataset.feedKey;e.multiNotificationCount[o]=0,e.RSS_Fetch_Instance.fetchData().then((function(t){var n=t[o][0].date;e.multiLastPostUnixTime[o]=n,!0===e.multiHasNewFeeds[o]&&("function"==typeof e.getArgs().notification.setLastPostUnixTime?e.getArgs().notification.setLastPostUnixTime(n,o):Q.setLastPostUnixTime(n,o)),e.multiHasNewFeeds[o]=!1})),r.forEach((function(e){e.classList.remove("selected");var t=e.dataset.feedKey,n=".inner-content-item-feed-key-".concat(t);document.querySelectorAll(n).forEach((function(e){o!==t?e.classList.add("hidden"):e.classList.remove("hidden")}))})),t.classList.add("selected"),a(o)}))})),r[0].click()}));var s=function(){n.classList.add("closed"),n.classList.remove("open"),n.classList.remove("ready"),document.body.classList.remove("whats-new-rss-is-active"),e.isMultiFeedRSS()?e.RSS_View_Instance.setNotification(Object.values(e.multiNotificationCount).filter(Boolean).length):(e.hasNewFeeds=!1,e.RSS_View_Instance.setNotification(!1)),r.innerHTML="",e.getArgs().flyout.onClose(e),t.focus()};this.getArgs().flyout.closeOnEsc&&document.addEventListener("keydown",(function(e){"Escape"===e.key&&n.classList.contains("open")&&s()})),this.getArgs().flyout.closeOnOverlayClick&&n.querySelector(".whats-new-rss-flyout-overlay").addEventListener("click",s),o.addEventListener("click",s)},e}(),Q=function(){function e(){}return e.setInstanceID=function(e){this.instanceID||(this.instanceID=e)},e.prefixer=function(e,t){if(void 0===t&&(t=""),!this.instanceID)throw new Error("Instance ID not set.");return t?"".concat(this.keys[e],"-").concat(this.instanceID,"-").concat(t):"".concat(this.keys[e],"-").concat(this.instanceID)},e._setDataExpiry=function(e){void 0===e&&(e="");var t=(new Date).getTime()+864e5;sessionStorage.setItem(this.prefixer("SESSION_DATA_EXPIRY",e),JSON.stringify(t))},e._isDataExpired=function(e){void 0===e&&(e="");var t=this.prefixer("SESSION_DATA_EXPIRY",e),n=window.sessionStorage.getItem(t);if(!n)return!0;var r=JSON.parse(n);return(new Date).getTime()>r&&(window.sessionStorage.removeItem(t),!0)},e.setSessionData=function(e,t){return void 0===t&&(t=""),this._setDataExpiry(t),window.sessionStorage.setItem(this.prefixer("SESSION",t),e)},e.getSessionData=function(e){return void 0===e&&(e=""),this._isDataExpired(e)?"{}":window.sessionStorage.getItem(this.prefixer("SESSION",e))},e.setLastPostUnixTime=function(e,t){return void 0===t&&(t=""),window.localStorage.setItem(this.prefixer("LAST_LATEST_POST",t),e.toString())},e.getLastPostUnixTime=function(e){return void 0===e&&(e=""),+window.localStorage.getItem(this.prefixer("LAST_LATEST_POST",e))},e.keys={SESSION_DATA_EXPIRY:"whats-new-cache-expiry",LAST_LATEST_POST:"whats-new-last-unixtime",SESSION:"whats-new-cache"},e}(),ee=function(){function e(e){var t=this;this.data={},this.RSS=e,this.RSS.getRSSFeedURLs().forEach((function(e){var n=JSON.parse(Q.getSessionData(e.key));n&&n.length&&(t.data[e.key]=n)}))}return e.prototype.fetchData=function(){return G(this,void 0,void 0,(function(){var e,t=this;return X(this,(function(n){switch(n.label){case 0:return Object.keys(this.data).length?[2,this.data]:(e=this.RSS.getRSSFeedURLs().map((function(e){return G(t,void 0,void 0,(function(){var t,n,r=this;return X(this,(function(o){switch(o.label){case 0:return this.data[e.key]=[],[4,fetch(e.url)];case 1:return[4,o.sent().text()];case 2:return t=(t=o.sent()).replace(/&raquo;/g,"&amp;raquo;"),n=new DOMParser,n.parseFromString(t,"text/xml").querySelectorAll("item").forEach((function(t){var n,o=t.querySelector("title").textContent,i=t.querySelector("link").textContent,a=t.querySelector("content\\:encoded, encoded"),s=a?a.textContent:"",l=t.querySelector("pubDate").innerHTML;r.data[e.key].push({title:o,date:l?+new Date(l):null,postLink:i,description:s.replace(/<a\b((?:(?!target=)[^>])*)>/g,'<a$1 target="_blank">').replace(/<p>\s*<\/p>/g,""),children:JSON.parse((null===(n=t.querySelector("children"))||void 0===n?void 0:n.innerHTML)||"{}")})})),Q.setSessionData(JSON.stringify(this.data[e.key]),e.key),[2]}}))}))})),[4,Promise.all(e)]);case 1:return n.sent(),[2,this.data]}}))}))},e}(),te=function(){function e(e){this.RSS=e,this.createTriggerButton(),this.createFlyOut()}return e.prototype.getTriggerButtonID=function(){return"whats-new-rss-btn-".concat(this.RSS.getID())},e.prototype.getFlyoutID=function(){return"whats-new-rss-flyout-".concat(this.RSS.getID())},e.prototype.getFlyoutCloseBtnID=function(){return"whats-new-rss-flyout-close-".concat(this.RSS.getID())},e.prototype.getFlyoutMultiFeedNavID=function(){return"whats-new-rss-flyout-multi-feed-nav-".concat(this.RSS.getID())},e.prototype.setIsLoading=function(e){void 0===e&&(e=!1);var t=document.getElementById(this.getFlyoutID());e?t.classList.add("is-loading"):t.classList.remove("is-loading")},e.prototype.setNotification=function(e){var t=document.querySelector("#".concat(this.getTriggerButtonID()," .whats-new-rss-notification-badge"));e?(this.RSS.isMultiFeedRSS()?(t.innerHTML="",t.classList.add("is-multi-feed")):t.innerHTML=e>9?"9+":e.toString(),t.classList.remove("hide")):t.classList.add("hide")},e.prototype.createTriggerButton=function(){var e="\n\t\t".concat(this.RSS.getArgs().triggerButton.beforeBtn,'\n\t\t<a class="whats-new-rss-trigger-button" id="').concat(this.getTriggerButtonID(),'">\n\t\t\t').concat(this.RSS.getArgs().triggerButton.icon,'\n\t\t\t<div class="whats-new-rss-notification-badge hide">0</div>\n\t\t</a>\n\t\t').concat(this.RSS.getArgs().triggerButton.afterBtn,"\n\t\t");this.RSS.getElement().innerHTML+=e},e.prototype.createFlyOut=function(){var e=["whats-new-rss-flyout","closed"];this.RSS.getArgs().flyout.className&&e.push(this.RSS.getArgs().flyout.className);var t=[];this.RSS.isMultiFeedRSS()&&(t.push('<nav id="'.concat(this.getFlyoutMultiFeedNavID(),'" class="whats-new-rss-multi-feed-nav">')),this.RSS.getRSSFeedURLs().forEach((function(e){t.push('<button type="button" data-feed-key="'.concat(e.key,'">\n\t\t\t\t\t\t').concat(e.label,'\n\t\t\t\t\t\t<div class="new-notification-count"></div>\n\t\t\t\t\t</button>\n\t\t\t\t\t'))})),t.push("</nav>"));var n=document.createElement("div");n.setAttribute("id",this.getFlyoutID()),n.setAttribute("class",e.join(" ")),n.setAttribute("role","dialog"),n.innerHTML='\n\t\t<div class="whats-new-rss-flyout-contents">\n\n\t\t\t<div class="whats-new-rss-flyout-inner-header">\n\n\t\t\t\t<div class="whats-new-rss-flyout-inner-header__title-icon-wrapper">\n\t\t\t\t\t<h3>'.concat(this.RSS.getArgs().flyout.title,'</h3>\n\n\t\t\t\t\t<span class="whats-new-rss-flyout-inner-header__loading-icon">\n\t\t\t\t\t').concat(this.RSS.getArgs().loaderIcon,'\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\n\t\t\t\t<button type="button" id="').concat(this.getFlyoutCloseBtnID(),'">').concat(this.RSS.getArgs().flyout.closeBtnIcon,"</button>\n\t\t\t</div>\n\n\t\t\t").concat(t.join(""),'\n\n\t\t\t<div class="whats-new-rss-flyout-inner-content">\n\t\t\t\t<div class="skeleton-container">\n\t\t\t\t\t<div class="skeleton-row whats-new-rss-flyout-inner-content-item"></div>\n\t\t\t\t\t<div class="skeleton-row whats-new-rss-flyout-inner-content-item"></div>\n\t\t\t\t\t<div class="skeleton-row whats-new-rss-flyout-inner-content-item"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t</div>\n\n\t\t<div class="whats-new-rss-flyout-overlay"></div>\n\t\t'),document.body.appendChild(n)},e.prototype.setMultiFeedTabNotificationCount=function(e,t){void 0===t&&(t=0);var n=document.querySelector("#".concat(this.getFlyoutMultiFeedNavID(),' button[data-feed-key="').concat(e,'"]'));if(n){var r=n.querySelector(".new-notification-count");if(t){var o=t>9?"9+":t;r.innerHTML=o.toString()}else r.innerHTML=""}},e.prototype.innerContentWrapper=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n="");var r=["whats-new-rss-flyout-inner-content-item"];return t&&r.push("rss-new-post"),n&&r.push(n),'\n\t\t<div class="'.concat(r.join(" "),'">\n\t\t\t').concat(t?'<small class="new-post-badge">New ✨</small>':"","\n\t\t\t").concat(e,"\n\t\t</div>\n\t\t")},e.prototype.createExcerpt=function(e,t,n){var r=n.wordLimit,o=n.moreSymbol,i=n.readMore;if(!r)return e;var a=e.replace(/<[^>]*>/g,"").split(/\s+/),s=a.slice(0,r).join(" ");return o&&(s+=o),r>a.length?e:t&&(null==i?void 0:i.label)?"<p>".concat(s,' <a href="').concat(t,'" target="_blank" class="').concat(i.className,'">').concat(i.label,"</a></p>"):"<p>".concat(s,"</p>")},e.prototype.listChildrenPosts=function(e){var t=this,n=Object.values(e);if(!n.length)return"";var r=document.createElement("details"),o=document.createElement("summary"),i=document.createElement("div");return n.forEach((function(e){var n=(new DOMParser).parseFromString(e.post_content,"text/html"),r=document.createElement("div");r.classList.add("sub-version-item"),r.innerHTML='\n\t\t\t\t<div class="sub-version-header">\n\t\t\t\t\t<h4 class="sub-version-title">'.concat(e.post_title,'</h4>\n\t\t\t\t\t<span class="sub-version-date">').concat(t.formatDate(new Date(e.post_date)),'</span>\n\t\t\t\t</div>\n\t\t\t\t<div class="sub-version-content">').concat(n.documentElement.textContent,"</div>\n\t\t\t"),i.appendChild(r)})),o.innerHTML='<p class="text-see-more">See More</p><p class="text-see-less">See Less</p>',r.appendChild(o),r.appendChild(i),i.classList.add("sub-version-items-wrapper"),r.classList.add("whats-new-rss-sub-version-details"),r.outerHTML},e.prototype.formatDate=function(e){if("function"==typeof this.RSS.getArgs().flyout.formatDate)return this.RSS.getArgs().flyout.formatDate(e);var t=new Date,n=e.getTime(),r=t.getTime()-n,o=36e5,i=24*o,a=7*i,s=30*i;if(r<6e4)return"Just now";if(r<o){var l=Math.floor(r/6e4);return"".concat(l," minute").concat(l>1?"s":""," ago")}if(r<i){var c=Math.floor(r/o);return"".concat(c," hour").concat(c>1?"s":""," ago")}if(r<a){var u=Math.floor(r/i);return"".concat(u," day").concat(u>1?"s":""," ago")}if(r<s){var d=Math.floor(r/a);return"".concat(d," week").concat(d>1?"s":""," ago")}var f=Math.floor(r/s);return"".concat(f," month").concat(f>1?"s":""," ago")},e}();function ne(){var e=window.location.hash;document.querySelectorAll("#adminmenu #toplevel_page_hfe a").forEach((function(t){var n=t.getAttribute("href"),r=t.closest("li"),o=t.textContent.trim();n&&(e.includes(n.split("#")[1])||"#dashboard"===e&&"Dashboard"===o)?r.classList.add("current"):r.classList.remove("current")}))}const re=function(){var e=a((0,s.useState)(!1),2),t=e[0],n=e[1];(0,s.useEffect)((function(){return ne(),window.addEventListener("hashchange",ne),function(){window.removeEventListener("hashchange",ne)}}),[]);var r=window.location.hash,o=function(e){return r.includes(e)},i=function(e){return{color:o(e)?"#111827":"#4B5563",borderBottom:o(e)?"2px solid #6005FF":"none",paddingBottom:"22px",marginBottom:"-16px"}},c=function(e){window.open(e,"_blank"),n(!1)};return function({selector:e,...t}){const n=(0,s.useRef)(null);(0,s.useEffect)((()=>{var r;return async function(){const e="whats-new-rss-styles";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.innerHTML=await async function(){return".whats-new-rss-is-active{overflow:hidden}.whats-new-rss-trigger-button{display:flex;align-items:center;position:relative;width:auto;padding:5px;cursor:pointer}.whats-new-rss-trigger-button .whats-new-rss-notification-badge{position:absolute;top:-8px;right:-5px;width:20px;font-size:10px;line-height:20px;text-align:center;border-radius:10px;color:#fff;background:red;transition:transform .2s ease-in-out}.whats-new-rss-trigger-button .whats-new-rss-notification-badge.is-multi-feed{top:-2px;right:-2px;font-size:0;width:10px;height:10px}.whats-new-rss-trigger-button .whats-new-rss-notification-badge.hide{display:none}.whats-new-rss-trigger-button:hover .whats-new-rss-notification-badge{transform:scale(1.2)}.whats-new-rss-flyout{position:fixed;top:0;right:0;bottom:0;width:100%;z-index:99999;transition:visibility .3s ease-in-out;font-family:Arial,Helvetica,sans-serif}.whats-new-rss-flyout .lightbox-trigger,.whats-new-rss-flyout.hidden{display:none}.whats-new-rss-flyout.is-loading .whats-new-rss-flyout-inner-header__loading-icon{display:block;margin:auto}.whats-new-rss-flyout.is-loading .whats-new-rss-flyout-inner-header__loading-icon svg{display:block;background:0 0;width:25px;height:25px}.whats-new-rss-flyout .whats-new-rss-flyout-contents{position:fixed;display:flex;right:0;width:30%;height:100%;flex-direction:column;background-color:#fff;transition:transform .3s ease-in-out;z-index:9999}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px 16px 24px;border-bottom:1px solid #ccc}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header button{border:none;background:0 0;font-size:30px;cursor:pointer;color:#94a3b8;padding:0;margin:0;box-shadow:none}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header .whats-new-rss-flyout-inner-header__title-icon-wrapper{display:flex;gap:10px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header .whats-new-rss-flyout-inner-header__title-icon-wrapper h3{margin:0;padding:0;color:#0f172a;font-weight:600;font-size:16px;line-height:24px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav{display:flex;padding:0 30px;border-bottom:1px solid #ccc;gap:2em;overflow:auto;white-space:nowrap}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button{position:relative;background:0 0;color:inherit;padding:15px 0;border-bottom:2px solid transparent}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button:focus,.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button:hover{border-color:inherit}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button.selected{border-color:#5d5d5d}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button .new-notification-count{position:absolute;top:0;right:-10px;width:20px;font-size:10px;line-height:20px;text-align:center;border-radius:10px;color:#fff;background:red}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content{flex:1;overflow-y:auto}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .skeleton-container{margin:30px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item{border-bottom:1px solid #d8dfe9;padding:30px 24px;color:#475569;font-weight:400;font-size:14px;line-height:20px;display:flex;flex-direction:column;gap:13px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item>*{margin:0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item.skeleton-row{height:25vh;margin:40px 0;background:linear-gradient(90deg,#eee 25%,#ddd 50%,#eee 75%);background-size:200% 100%;animation:shimmer 1.5s infinite}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item.rss-new-post{position:relative}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item.rss-new-post .new-post-badge{background:#ff3d3d;border-radius:5px;position:absolute;right:45px;padding:0 5px;color:#fff}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item .rss-content-header{display:flex;flex-direction:column;gap:15px;padding:0 0 8px 0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item .rss-content-header p{color:#94a3b8;margin:0;padding:0;font-weight:600;font-size:14px;line-height:16px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item .rss-content-header h2{margin:0;color:#0f172a;font-weight:700;line-height:28px;font-size:20px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h2{font-weight:700;font-size:18px;line-height:24px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h3{font-weight:700;font-size:16px;line-height:22px;margin-top:12px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h4{font-weight:700;font-size:15px;line-height:20px;margin-top:12px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h5{font-weight:700;font-size:14px;line-height:18px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h6{font-weight:700;font-size:13px;line-height:16px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item p{padding:0;font-size:14px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item p:last-child{margin-bottom:0;padding-bottom:0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item a{color:#1170ff;text-decoration:none}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item figure{margin:10px 0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item figure.wp-block-embed.is-type-video{position:relative;width:100%;height:0;padding-bottom:56.25%}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item figure iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item img{box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item video{vertical-align:middle;width:100%}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item strong{font-weight:600}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ol,.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ul{padding-inline-start:20px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ol li,.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ul li{margin-bottom:5px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ul{list-style-type:disc}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ol{list-style-type:decimal}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details{line-height:20px;font-size:.9em;margin:10px 0;background:#f9fafb}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details summary{display:flex;justify-content:space-between;cursor:pointer;padding:20px 15px;height:1em;line-height:20px;font-weight:800}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details summary::after{content:'⌃';font-size:20px;transform:rotateX(180deg);font-weight:800}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details summary .text-see-more{display:block}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details summary .text-see-less{display:none}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details[open] summary{border-bottom:1px solid #e2e8f0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details[open] summary::after{transform:rotateX(45deg)}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details[open] summary .text-see-more{display:none}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details[open] summary .text-see-less{display:block}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details .sub-version-item{position:relative;padding:1em;border-bottom:1px solid #e2e8f0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details .sub-version-item .sub-version-header{display:flex;justify-content:space-between}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details .sub-version-item .sub-version-content{margin-top:1em}.whats-new-rss-flyout .whats-new-rss-flyout-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.5);transition:all .3s ease-in-out}.whats-new-rss-flyout.closed{visibility:hidden}.whats-new-rss-flyout.closed .whats-new-rss-flyout-overlay{opacity:0;visibility:hidden}.whats-new-rss-flyout.closed .whats-new-rss-flyout-contents{transform:translateX(100%)}.whats-new-rss-flyout .whats-new-rss-flyout-inner-header__loading-icon{display:none}@keyframes shimmer{0%{background-position:-200% 0}100%{background-position:200% 0}}@media screen and (max-width:1024px){.whats-new-rss-flyout .whats-new-rss-flyout-contents{width:40%}}@media screen and (max-width:768px){.whats-new-rss-flyout .whats-new-rss-flyout-contents{width:85%}}"}(),document.head.appendChild(t)}}(),n.current||(n.current=(r={selector:e,...t},new J(r))),()=>{n.current&&"function"==typeof n.current.destroy&&n.current.destroy()}}),[e,...Object.values(t)]),n.current}({rssFeedURL:"https://ultimateelementor.com/whats-new/feed/",selector:"#hfe-whats-new",triggerButton:{beforeBtn:'<div class="w-4 sm:w-8 h-8 sm:h-10 flex items-center whitespace-nowrap justify-center cursor-pointer rounded-full border border-slate-200">',icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#434141" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-megaphone"><path d="m3 11 18-5v12L3 14v-3z"></path><path d="M11.6 16.8a3 3 0 1 1-5.8-1.6"></path></svg>',afterBtn:"</div>"},flyout:{title:(0,Y.__)("What's New?","astra-sites"),formatDate:function(e){var t=e.toLocaleDateString("en-US",{weekday:"long"}),n=e.toLocaleDateString("en-US",{month:"long"}),r=e.getDate(),o=e.getFullYear();return"".concat(t," ").concat(n," ").concat(r,", ").concat(o)}}}),l().createElement(I.Topbar,{className:"hfe-nav-menu relative",style:{width:"unset",padding:"0.5rem",zIndex:"9",paddingTop:"1rem"}},l().createElement("div",{className:"flex flex-col lg:flex-row items-start md:items-center w-full"},l().createElement("div",{className:"flex flex-row md:items-center md:gap-8 w-full"},l().createElement(I.Topbar.Left,null,l().createElement(I.Topbar.Item,null,l().createElement(D,{to:q.dashboard.path},l().createElement("img",{src:"".concat(hfeSettingsData.icon_url),alt:"Icon",className:"ml-4 cursor-pointer",style:{height:"35px",width:"35px"}})))),l().createElement(I.Topbar.Middle,{className:"flex-grow",align:"left"},l().createElement(I.Topbar.Item,null,l().createElement("nav",{className:"flex flex-wrap gap-6 mt-2 md:mt-0 cursor-pointer"},l().createElement(D,{to:q.dashboard.path,className:"".concat(o("dashboard")?"active-link":""),style:i("dashboard")},(0,Y.__)("Dashboard","header-footer-elementor")),l().createElement(D,{to:q.headerFooterBuilder.path,className:"".concat(o("edit.php?post_type=elementor-hf")?"active-link":""),style:i("edit.php?post_type=elementor-hf"),onClick:function(){console.log("Navigating to Header & Footer Builder")}},(0,Y.__)("Header & Footer Builder","header-footer-elementor")),l().createElement(D,{to:q.widgets.path,className:"".concat(o("widgets")?"active-link":""),style:i("widgets")},(0,Y.__)("Widgets","header-footer-elementor")),l().createElement(D,{to:q.templates.path,className:"".concat(o("templates")?"active-link":""),style:i("templates")},(0,Y.__)("Templates","header-footer-elementor")),l().createElement(D,{to:q.settings.path,className:"".concat(o("settings")?"active-link":""),style:i("settings")},(0,Y.__)("Settings","header-footer-elementor")),l().createElement(D,{to:q.upgrade.path,className:"".concat(o("upgrade")?"active-link":""),style:i("upgrade")},(0,Y.__)("Free vs Pro","header-footer-elementor")))),l().createElement(I.Topbar.Item,null,l().createElement(I.Button,{icon:l().createElement(W,null),iconPosition:"right",variant:"ghost",className:"hfe-remove-ring mb-2",style:{color:"#6005FF",background:"none",border:"none",padding:0,cursor:"pointer"},onClick:function(){return c("https://ultimateelementor.com/pricing/?utm_source=uae-lite-dashboard&utm_medium=navigation-bar&utm_campaign=uae-lite-upgrade")}},(0,Y.__)("Get Pro","header-footer-elementor")))),l().createElement(I.Topbar.Right,{className:"gap-4"},l().createElement(I.Topbar.Item,null,l().createElement(I.DropdownMenu,{placement:"bottom-start",isOpen:t,onOpenChange:n},l().createElement(I.DropdownMenu.Trigger,null,l().createElement(I.Badge,{label:(0,Y.__)("Free","header-footer-elementor"),size:"xs",variant:"neutral"})),l().createElement(I.DropdownMenu.Content,{className:"w-52"},l().createElement(I.DropdownMenu.List,null,l().createElement(I.DropdownMenu.Item,null,(0,Y.__)("Version","header-footer-elementor")),l().createElement(I.DropdownMenu.Item,null,l().createElement("div",{className:"flex justify-between w-full"},"".concat(hfeSettingsData.uaelite_current_version),l().createElement(I.Badge,{label:(0,Y.__)("Free","header-footer-elementor"),size:"xs",variant:"neutral"}))))))),l().createElement(I.Topbar.Item,{className:"gap-4 cursor-pointer"},l().createElement(I.DropdownMenu,{placement:"bottom-start",isOpen:t,onOpenChange:n},l().createElement(I.DropdownMenu.Trigger,null,l().createElement(V,null)),l().createElement(I.DropdownMenu.Content,{className:"w-60"},l().createElement(I.DropdownMenu.List,null,l().createElement(I.DropdownMenu.Item,null,(0,Y.__)("Useful Resources","header-footer-elementor")),l().createElement(I.DropdownMenu.Item,{className:"text-text-primary",style:{color:"black"},onClick:function(){return c("https://ultimateelementor.com/docs/getting-started-with-ultimate-addons-for-elementor-lite/")}},l().createElement(U,{style:{color:"black"}}),(0,Y.__)("Getting Started","header-footer-elementor")),l().createElement(I.DropdownMenu.Item,{onClick:function(){return c("https://ultimateelementor.com/docs-category/widgets/")}},l().createElement(U,null),(0,Y.__)("How to use widgets","header-footer-elementor")),l().createElement(I.DropdownMenu.Item,{onClick:function(){return c("https://ultimateelementor.com/docs-category/features/")}},l().createElement(U,null),(0,Y.__)("How to use features","header-footer-elementor")),l().createElement(I.DropdownMenu.Item,{onClick:function(){return c("https://ultimateelementor.com/docs-category/templates/")}},l().createElement(U,null),(0,Y.__)("How to use templates","header-footer-elementor")),l().createElement(I.DropdownMenu.Item,{onClick:function(){return c("https://ultimateelementor.com/contact/")}},l().createElement($,null),(0,Y.__)("Contact us","header-footer-elementor"))))),l().createElement("div",{className:"pb-1",id:"hfe-whats-new"})),l().createElement(D,{to:q.settings.path},l().createElement(H,{className:"cursor-pointer hfe-user-icon",style:{color:"black"}}))))))};function oe(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const ie=B("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),ae=window.wp.apiFetch;var se=n.n(ae),le=[],ce=function(){0!==le.length&&le.shift()()};const ue=function(e){var t=e.widget,n=e.updateCounter,r=t.id,o=t.icon,i=t.title,c=(t.infoText,t.is_pro),u=(t.is_active,t.slug,t.demo_url),d=t.doc_url,f=t.description,m=(t.is_new,a((0,s.useState)(t.is_active),2)),h=m[0],p=m[1],g=a((0,s.useState)(!1),2),y=g[0],v=g[1];(0,s.useEffect)((function(){p(t.is_active)}),[t.is_active,n]);var b=function(e){var t=e?"hfe_deactivate_widget":"hfe_activate_widget",n=new window.FormData;n.append("action",t),n.append("nonce",hfe_admin_data.nonce),n.append("module_id",r),n.append("is_pro",c);try{var o=se()({url:hfe_admin_data.ajax_url,method:"POST",body:n});o.success?p(h):o.error}catch(e){}finally{v(!1),ce()}};return l().createElement(I.Container,{align:"center",containerType:"flex",direction:"column",justify:"between",gap:""},l().createElement("div",{className:"flex items-center justify-between w-full"},l().createElement("div",{className:"h-10 w-10 mb-5 ".concat(null==o?void 0:o.props),style:{fontSize:"22px"}},o),l().createElement("div",{className:"flex items-center gap-x-2",style:{marginBottom:"15px"}},c&&l().createElement(I.Badge,{label:"PRO",size:"xs",type:"pill",variant:"inverse"}),!c&&l().createElement(I.Switch,{onChange:function(){y||(v(!0),h?(p(!1),le.push((function(){return b(h)}))):(p(!0),le.push((function(){return b(h)}))),1===le.length&&ce())},size:"sm",value:h,className:"hfe-remove-ring"}))),l().createElement("div",{className:"flex flex-col w-full"},l().createElement("p",{className:"text-sm font-medium text-text-primary pt-3 m-0 pb-1"},i),l().createElement("div",{className:"flex items-center justify-between w-full"},u&&l().createElement("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-text-tertiary m-0 mb-1 hfe-remove-ring",style:{textDecoration:"none",lineHeight:"1.5rem"}},(0,Y.__)("View Demo","header-footer-elementor")),l().createElement("div",{className:"".concat(u?"":"hfe-tooltip-wrap")},l().createElement(I.Tooltip,{arrow:!0,content:l().createElement("div",null,l().createElement("span",{className:"font-semibold block mb-2"},i),l().createElement("span",{className:"block mb-2"},f),d&&l().createElement("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"cursor-pointer",style:{color:"#B498E5",textDecoration:"none"}},l().createElement(U,{style:{color:"#B498E5",width:"11px",height:"11px",marginRight:"3px"}}),(0,Y.__)("Read Documentation","header-footer-elementor"))),placement:"bottom",title:"",triggers:["click"],variant:"dark",size:"xs"},l().createElement(ie,{className:"h-5 w-5",size:18,color:"#A0A5B2"}))))))},de=function(){var e=a((0,s.useState)(null),2),t=e[0],n=e[1],r=a((0,s.useState)(!0),2),o=r[0],i=r[1];return(0,s.useEffect)((function(){i(!0),se()({path:"/hfe/v1/widgets",headers:{"Content-Type":"application/json","X-WP-Nonce":hfeSettingsData.hfe_nonce_action}}).then((function(e){var t=function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t.push({id:n,slug:r.slug,title:r.title,keywords:r.keywords,icon:l().createElement("i",{className:r.icon}),title_url:r.title_url,default:r.default,doc_url:r.doc_url,is_pro:r.is_pro,description:r.description,is_active:void 0===r.is_activate||r.is_activate,demo_url:void 0!==r.demo_url?r.demo_url:r.doc_url})}return t}(e);n(t),i(!1)})).catch((function(e){i(!1)}))}),[]),l().createElement("div",{className:"rounded-lg bg-white w-full mb-6"},l().createElement("div",{className:"flex items-center justify-between p-4",style:{paddingBottom:"0"}},l().createElement("p",{className:"m-0 text-sm font-semibold text-text-primary"},"Widgets / Features"),l().createElement("div",{className:"flex items-center gap-x-2 mr-7"},l().createElement(D,{to:q.widgets.path,className:"text-sm text-text-primary cursor-pointer",style:{lineHeight:"1rem"}},"View All",l().createElement(W,{className:"ml-1",size:13})))),l().createElement("div",{className:"flex bg-black flex-col rounded-lg p-4"},o?l().createElement(I.Container,{align:"stretch",className:"p-2 gap-1.5 grid grid-cols-2 md:grid-cols-4",style:{backgroundColor:"#F9FAFB"},containerType:"grid",gap:"",justify:"start"},oe(Array(16)).map((function(e,t){return l().createElement(I.Container.Item,{key:t,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-6 space-y-2"},l().createElement(I.Skeleton,{className:"w-12 h-2 rounded-md"}),l().createElement(I.Skeleton,{className:"w-16 h-2 rounded-md"}),l().createElement(I.Skeleton,{className:"w-12 h-2 rounded-md"}))}))):l().createElement(I.Container,{align:"stretch",className:"p-2 gap-1.5 grid grid-cols-2 md:grid-cols-4",style:{backgroundColor:"#F9FAFB"},containerType:"grid",gap:"",justify:"start"},null==t?void 0:t.slice(0,16).map((function(e){return l().createElement(I.Container.Item,{key:e.id,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-4"},l().createElement(ue,{widget:e,key:e.id,updateCounter:0}))})))))},fe=function(){var e=a((0,s.useState)(!0),2),t=e[0],n=e[1],r=a((0,s.useState)(null),2),o=r[0],i=r[1],c=a((0,s.useState)(null),2),u=c[0],d=c[1];if((0,s.useEffect)((function(){n(!0),se()({path:"/hfe/v1/templates",headers:{"Content-Type":"application/json","X-WP-Nonce":hfeSettingsData.uael_nonce_action}}).then((function(e){i(e.templates_status),e.redirect_url&&d(e.redirect_url),n(!1)})).catch((function(e){n(!1)}))}),[]),!t)return l().createElement("div",{className:"box-border hfe-dashboard-templates p-4 bg-white rounded-lg shadow-md mb-6 hfe-subheading"},l().createElement("div",{className:"mb-4"},l().createElement("img",{src:"".concat(hfeSettingsData.templates_url),alt:"Template Showcase",className:"w-full h-auto rounded"})),l().createElement(I.Title,{className:"mt-2",icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,Y.__)("Build Websites 10x Faster with Templates","header-footer-elementor")}),l().createElement("p",{className:"text-text-secondary text-text-tertiary mt-2 mb-2 text-sm"},(0,Y.__)("Choose from our professionally designed websites to build your site faster, with easy customization options.","header-footer-elementor")),"Activated"!==o?l().createElement(D,{to:q.templates.path,className:"w-full"},l().createElement(I.Button,{className:"w-full mt-4",icon:null,iconPosition:"left",size:"md",variant:"secondary"},(0,Y.__)("View Templates","header-footer-elementor"))):l().createElement(I.Button,{className:"w-full mt-4",icon:null,iconPosition:"left",size:"md",variant:"secondary",onClick:function(e){"Activated"===o&&u&&window.open(u,"_blank")}},(0,Y.__)("View Templates","header-footer-elementor")))},me=B("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]),he=B("NotepadText",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"16",height:"18",x:"4",y:"4",rx:"2",key:"1u9h20"}],["path",{d:"M8 10h6",key:"3oa6kw"}],["path",{d:"M8 14h8",key:"1fgep2"}],["path",{d:"M8 18h5",key:"17enja"}]]),pe=function(){return l().createElement("div",{className:"box-border hfe-dashboard-quick-access p-4 bg-white rounded-lg shadow-md",style:{width:"-webkit-fill-available"}},l().createElement(I.Title,{className:"mb-2",icon:null,iconPosition:"right",size:"xs",tag:"h3",title:(0,Y.__)("Quick Access","header-footer-elementor")}),l().createElement(I.Container,{align:"stretch",className:"p-1 rounded-lg gap-1",containerType:"flex",direction:"column",gap:"",justify:"start",style:{width:"100%",backgroundColor:"#F9FAFB"}},l().createElement(I.Container.Item,{alignSelf:"auto",className:"p-4 bg-white rounded-lg shadow-container-item",order:"none",shrink:1},l().createElement(I.Button,{className:"text-black hfe-remove-ring",icon:l().createElement(me,null),iconPosition:"left",variant:"link",onClick:function(){window.open("https://ultimateelementor.com/contact/","_blank")}},(0,Y.__)("Contact Us","header-footer-elementor"))),l().createElement(I.Container.Item,{className:"p-4 bg-white rounded-lg shadow-container-item"},l().createElement(I.Button,{className:"text-black hfe-remove-ring",icon:l().createElement(V,null),iconPosition:"left",variant:"link",onClick:function(){window.open("https://ultimateelementor.com/docs/","_blank")}},(0,Y.__)("Help Centre","header-footer-elementor"))),l().createElement(I.Container.Item,{className:"p-4 bg-white rounded-lg shadow-container-item"},l().createElement(I.Button,{className:"text-black hfe-remove-ring",icon:l().createElement(he,null),iconPosition:"left",variant:"link",onClick:function(){window.open("https://ideas.ultimateelementor.com/boards/feature-requests","_blank")}},(0,Y.__)("Request a Feature","header-footer-elementor")))))},ge=B("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),ye=B("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),ve=function(){return l().createElement(I.Title,{className:"hfe-header-title my-4",description:"",icon:null,iconPosition:"right",size:"xs",tag:"h6",title:(0,Y.__)("Formerly Elementor Header & Footer Builder","header-footer-elementor")})},be=function(){return l().createElement("div",null,l().createElement(I.Container,{align:"center",className:"bg-background-primary border-[0.5px] border-subtle rounded-xl shadow-sm mb-6 p-8 flex flex-col lg:flex-row",containerType:"flex",direction:"row",gap:"sm"},l().createElement(I.Container.Item,{shrink:1},l().createElement(I.Title,{description:"",icon:null,iconPosition:"right",className:"max-w-lg",size:"lg",tag:"h3",title:(0,Y.__)("Welcome to Ultimate Addons for Elementor!","header-footer-elementor")}),l().createElement(ve,null),l().createElement("p",{className:"text-sm font-medium text-text-tertiary m-0 mt-2"},(0,Y.__)("We're excited to help you supercharge your website-building experience. Effortlessly design stunning websites with our comprehensive range of free and premium widgets and features.","header-footer-elementor")),l().createElement("div",{className:"flex items-center pt-6 gap-2"},l().createElement(I.Button,{iconPosition:"right",variant:"primary",className:"bg-[#6005FF] hfe-remove-ring",style:{backgroundColor:"#6005FF",transition:"background-color 0.3s ease"},onMouseEnter:function(e){return e.currentTarget.style.backgroundColor="#4B00CC"},onMouseLeave:function(e){return e.currentTarget.style.backgroundColor="#6005FF"},onClick:function(){window.open(hfeSettingsData.hfe_post_url,"_blank")}},(0,Y.__)("Create Header/Footer","header-footer-elementor")),l().createElement(I.Button,{icon:l().createElement(ge,null),iconPosition:"right",variant:"outline",className:"hfe-remove-ring",style:{color:"#7D4CDB",borderColor:"#E9DFFC"},onMouseEnter:function(e){return e.currentTarget.style.color="#000000"},onMouseLeave:function(e){return(e.currentTarget.style.color="#7D4CDB")&&(e.currentTarget.style.borderColor="#E9DFFC")},onClick:function(){window.open(hfeSettingsData.elementor_page_url,"_blank")}},(0,Y.__)("Create New Page","header-footer-elementor")),l().createElement("div",{style:{color:"black",background:"none",border:"none",padding:0,cursor:"pointer"},onMouseEnter:function(e){return e.currentTarget.style.color="#6005ff"},onMouseLeave:function(e){return e.currentTarget.style.color="black"},onClick:function(){window.open("https://ultimateelementor.com/docs/getting-started-with-ultimate-addons-for-elementor-lite/","_blank")}},l().createElement(I.Button,{icon:l().createElement(ye,null),iconPosition:"right",variant:"link",className:"hfe-remove-ring text-black"},(0,Y.__)("Read full guide","header-footer-elementor")))))))},we=B("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),xe=B("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),_e=function(){var e=[{id:1,icon:"",title:(0,Y.__)("Modal Popup","header-footer-elementor")},{id:2,icon:"",title:(0,Y.__)("Advanced Heading","header-footer-elementor")},{id:3,icon:"",title:(0,Y.__)("Post Layouts","header-footer-elementor")},{id:4,icon:"",title:(0,Y.__)("Info Box","header-footer-elementor")},{id:5,icon:"",title:(0,Y.__)("Pricing Cards","header-footer-elementor")},{id:6,icon:"",title:(0,Y.__)("Form Stylers and more...","header-footer-elementor")}];return l().createElement("div",null,l().createElement(I.Container,{className:"bg-background-primary p-4 border-[0.5px] border-subtle rounded-xl shadow-sm",containerType:"flex",direction:"row",justify:"between",gap:"xs"},l().createElement(I.Container.Item,{className:"flex flex-col pt-6 pb-3 justify-between",style:{width:"65%"}},l().createElement("div",null,l().createElement(I.Title,{description:"",icon:l().createElement(we,null),iconPosition:"left",size:"xs",tag:"h6",title:(0,Y.__)("Unlock Ultimate Features","header-footer-elementor"),className:"text-xs font-semibold text-brand-primary-600"}),l().createElement(I.Title,{description:"",icon:"",iconPosition:"left",tag:"h6",title:(0,Y.__)("Create Stunning Designs with the Pro Version!","header-footer-elementor"),className:"py-1 text-[12px]"}),l().createElement("p",{className:"text-sm m-0 text-text-secondary"},(0,Y.__)("Get access to advanced widgets and features to create the website that stands out!","header-footer-elementor"))),l().createElement("div",{className:"grid grid-cols-2 grid-flow-row gap-1 my-4"},e.map((function(e){return l().createElement(I.Title,{key:e.id,description:"",icon:l().createElement(xe,{className:"text-brand-primary-600 mr-1 h-3 w-3"}),iconPosition:"left",size:"xs",tag:"h6",title:(0,Y.__)(e.title,"header-footer-elementor"),className:"text-[14px]"})}))),l().createElement("div",{className:"flex items-center pb-3 gap-4"},l().createElement(I.Button,{variant:"secondary",className:"hfe-remove-ring",onClick:function(){window.open("https://ultimateelementor.com/pricing/?utm_source=uae-lite-dashboard&utm_medium=unlock-ultimate-feature&utm_campaign=uae-lite-upgrade","_blank")}},(0,Y.__)("Upgrade Now","header-footer-elementor")),l().createElement(D,{className:"text-black cursor-pointer",to:q.upgrade.path},(0,Y.__)("Compare Free vs Pro","header-footer-elementor")))),l().createElement(I.Container.Item,{className:"flex justify-center items-center",style:{width:"34%"}},l().createElement("img",{src:"".concat(hfeSettingsData.column_url),alt:(0,Y.__)("Column Showcase","header-footer-elementor"),className:"w-full h-auto rounded"}))))};function Ee(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function Se(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ee(i,r,o,a,s,"next",e)}function s(e){Ee(i,r,o,a,s,"throw",e)}a(void 0)}))}}const ke=window.regeneratorRuntime;var Ce=n.n(ke);const Ne=function(e){var t=e.plugin,n=e.setUpdateCounter,r=t.path,o=t.slug,i=t.siteUrl,c=t.icon,u=t.type,d=t.name,f=t.zipUrl,m=t.desc,h=(t.wporg,t.isFree),p=(t.action,t.status),g=t.settings_url,y=a((0,s.useState)(!1),2),v=y[0],b=y[1],w=a((0,s.useState)(null),2),x=w[0],_=w[1],E=function(e){b(!1);var t=new window.FormData;t.append("action","hfe_recommended_plugin_activate"),t.append("nonce",hfe_admin_data.nonce),t.append("plugin",e.init),t.append("type",e.type),t.append("slug",e.slug);var r=document.querySelector('[data-slug="'.concat(e.slug,'"]')),o=r.querySelector("span");o.innerText=(0,Y.__)("Activating..","header-footer-elementor"),se()({url:hfe_admin_data.ajax_url,method:"POST",body:t}).then((function(t){if(t.success)o&&(r.style.color="#16A34A",r.dataset.action="site_redirect",r.classList.add("hfe-plugin-activated"),o.innerText=(0,Y.__)("Activated","header-footer-elementor"),window.open(g,"_blank"),setTimeout((function(){n((function(e){return e+1}))}),5e3));else{e.type;var i=document.querySelector('[data-slug="'.concat(e.slug,'"]'));if(i){var a=i.querySelector("span");a&&(a.innerText=(0,Y.__)("Activate","header-footer-elementor"))}}}))};return l().createElement(I.Container,{align:"center",containerType:"flex",direction:"column",justify:"between",gap:"lg"},l().createElement("div",{className:"flex items-center justify-between w-full"},l().createElement("div",{className:"h-5 w-5"},l().createElement("img",{src:c,alt:"Recommended Plugins/Themes",className:"w-full h-auto rounded",style:{width:"24px",height:"24px"}})),l().createElement("div",{className:"flex items-center gap-x-2"},h&&l().createElement(I.Badge,{label:(0,Y.__)("Free","header-footer-elementor"),size:"xs",type:"pill",variant:"green"}),l().createElement(I.Button,{size:"xs",variant:"link",className:"cursor-pointer hfe-remove-ring",onClick:function(e){var t=e.currentTarget.dataset.action,n=new window.FormData,r={init:e.currentTarget.dataset.init,type:e.currentTarget.dataset.type,slug:e.currentTarget.dataset.slug,name:e.currentTarget.dataset.pluginname};switch(t){case"hfe_recommended_plugin_activate":"theme"===r.type?(_(r),b(!0)):E(r);break;case"hfe_recommended_plugin_install":n.append("action","theme"===r.type?"hfe_recommended_theme_install":"hfe_recommended_plugin_install"),n.append("_ajax_nonce",hfe_admin_data.installer_nonce),n.append("slug",r.slug),e.target.innerText=(0,Y.__)("Installing..","header-footer-elementor"),se()({url:hfe_admin_data.ajax_url,method:"POST",body:n}).then((function(t){t.success||"folder_exists"===t.errorCode?(e.target.innerText=(0,Y.__)("Installed","header-footer-elementor"),function(e){var t=(new Date).toISOString().split("T")[0],n=new URLSearchParams({source:"UAE Lite",target_plugin:e.name,date:t});fetch("".concat("https://webhook.suretriggers.com/suretriggers/a7ac4b20-18f9-4ec6-9813-dfac83328d00","?").concat(n.toString()),{method:"GET"}).then((function(e){return e.json()})).then((function(e){})).catch((function(e){}))}(r),"theme"===r.type?(document.querySelector('[data-slug="'.concat(r.slug,'"]')).dataset.action="hfe_recommended_plugin_activate",e.target.innerText=(0,Y.__)("Activate","header-footer-elementor")):E(r)):(e.target.innerText=(0,Y.__)("Install","header-footer-elementor"),alert("theme"===r.type?(0,Y.__)("Theme Installation failed, Please try again later.","header-footer-elementor"):(0,Y.__)("Plugin Installation failed, Please try again later.","header-footer-elementor")))}));break;case"site_redirect":window.open(i,"_blank")}},"data-plugin":f,"data-type":u,"data-pluginname":d,"data-slug":o,"data-site":i,"data-init":r,"data-action":function(e){return"Activated"===e?"site_redirect":"Installed"===e?"hfe_recommended_plugin_activate":"hfe_recommended_plugin_install"}(p),style:{color:"Activated"===p?"#16A34A":"#6005FF"}},"Activated"===p?(0,Y.__)("Visit Site","header-footer-elementor"):"Installed"===p?"Activate":p),l().createElement(I.Dialog,{design:"simple",open:v,setOpen:b},l().createElement(I.Dialog.Backdrop,null),l().createElement(I.Dialog.Panel,null,l().createElement(I.Dialog.Header,null,l().createElement("div",{className:"flex items-center justify-between"},l().createElement(I.Dialog.Title,null,(0,Y.__)("Activate Theme","header-footer-elementor"))),l().createElement(I.Dialog.Description,null,(0,Y.__)("Are you sure you want to switch your current theme to Astra?","header-footer-elementor"))),l().createElement(I.Dialog.Footer,null,l().createElement(I.Button,{onClick:function(){return E(x)}},(0,Y.__)("Yes","header-footer-elementor")),l().createElement(I.Button,{variant:"outline",onClick:function(){return b(!1)}},(0,Y.__)("Close","header-footer-elementor"))))))),l().createElement("div",{className:"flex flex-col w-full pb-4"},l().createElement("p",{className:"text-sm font-medium text-text-primary pb-1 m-0 cursor-pointer",onClick:function(){return window.open(t.siteurl,"_blank")}},(0,Y.__)(d,"header-footer-elementor")),l().createElement("p",{className:"text-sm font-medium text-text-tertiary m-0"},(0,Y.__)(m,"header-footer-elementor"))))};function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const Te=function(){var e=a((0,s.useState)([]),2),t=e[0],n=e[1],r=a((0,s.useState)(!0),2),o=r[0],i=r[1],c=a((0,s.useState)(0),2),u=c[0],d=c[1],f=a((0,s.useState)(!1),2),m=f[0],p=f[1];function g(e){return Object.keys(e).map((function(t){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({path:t},e[t])}))}return(0,s.useEffect)((function(){var e=function(){var e=Se(Ce().mark((function e(){var t,r,o;return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i(!0),e.prev=1,e.next=4,se()({path:"/hfe/v1/plugins",headers:{"Content-Type":"application/json","X-WP-Nonce":hfeSettingsData.hfe_nonce_action}});case 4:t=e.sent,r=g(t),n(r),o=r.every((function(e){return e.is_installed})),p(o),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching plugins:",e.t0);case 14:return e.prev=14,i(!1),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})));return function(){return e.apply(this,arguments)}}();e()}),[u]),m?null:l().createElement("div",{className:"rounded-lg bg-white w-full mb-6"},l().createElement("div",{className:"flex items-center justify-between p-4",style:{paddingBottom:"0"}},l().createElement("p",{className:"m-0 text-sm font-semibold text-text-primary"},(0,Y.__)("Extend Your Website","header-footer-elementor")),l().createElement("div",{className:"flex items-center gap-x-2 mr-7"})),l().createElement("div",{className:"flex flex-col rounded-lg p-4",style:{backgroundColor:"#F9FAFB"}},o?l().createElement(I.Container,{align:"stretch",className:"gap-1 p-1 grid grid-cols-1 md:grid-cols-2",containerType:"grid",justify:"start"},oe(Array(2)).map((function(e,t){return l().createElement(I.Container.Item,{key:t,alignSelf:"auto",style:{height:"150px"},className:"text-wrap rounded-md shadow-container-item bg-background-primary p-4"},l().createElement("div",{className:"flex flex-col gap-6",style:{marginTop:"40px"}},l().createElement(I.Skeleton,{className:"w-12 h-2 rounded-md"}),l().createElement(I.Skeleton,{className:"w-16 h-2 rounded-md"}),l().createElement(I.Skeleton,{className:"w-12 h-2 rounded-md"})))}))):l().createElement(I.Container,{align:"stretch",className:"gap-1 p-1 grid grid-cols-1 md:grid-cols-2",containerType:"grid",justify:"start"},t.slice(0,4).map((function(e){return l().createElement(I.Container.Item,{key:e.slug,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-4"},l().createElement(Ne,{plugin:e,setUpdateCounter:d}))})))))},Oe=function(){return l().createElement(l().Fragment,null,l().createElement(re,null),l().createElement("div",null,l().createElement(I.Container,{align:"stretch",className:"p-6 flex-col lg:flex-row box-border",containerType:"flex",direction:"row",gap:"sm",justify:"start",style:{width:"100%"}},l().createElement(I.Container.Item,{className:"p-2 hfe-65-width",alignSelf:"auto",order:"none",shrink:0},l().createElement(be,null),l().createElement(de,null),l().createElement(_e,null)),l().createElement(I.Container.Item,{className:"p-2 w-full hfe-35-width",shrink:1},"  ",l().createElement(fe,null),l().createElement(Te,null),l().createElement(pe,null)))))},Me=function(){var e=[{id:1,icon:"",title:(0,Y.__)("Modal Popup","header-footer-elementor")},{id:2,icon:"",title:(0,Y.__)("Advanced Heading","header-footer-elementor")},{id:1,icon:"",title:(0,Y.__)("Post Layouts","header-footer-elementor")},{id:1,icon:"",title:(0,Y.__)("Info Box","header-footer-elementor")},{id:1,icon:"",title:(0,Y.__)("Pricing Cards","header-footer-elementor")},{id:1,icon:"",title:(0,Y.__)("Form Stylers and more...","header-footer-elementor")}];return l().createElement("div",{className:"pt-4"},l().createElement(I.Container,{className:"bg-background-primary gap-1 p-4 border-[0.5px] border-subtle rounded-xl shadow-sm",containerType:"flex",direction:"column",justify:"between",gap:"xs"},l().createElement(I.Container.Item,{className:"flex flex-col justify-center items-center"},l().createElement("img",{src:"".concat(hfeSettingsData.column_url),alt:(0,Y.__)("Column Showcase","header-footer-elementor"),className:"h-auto rounded w-1/2"})),l().createElement(I.Container.Item,{className:"flex flex-col justify-between"},l().createElement("div",null,l().createElement(I.Title,{description:"",icon:l().createElement(we,null),iconPosition:"left",size:"xs",tag:"h6",title:(0,Y.__)("Unlock Ultimate Features","header-footer-elementor"),className:"text-xs font-semibold text-brand-primary-600"}),l().createElement(I.Title,{description:"",icon:"",iconPosition:"left",tag:"h6",title:(0,Y.__)("Create Stunning Designs with the Pro Version!","header-footer-elementor"),className:"py-1 text-sm"}),l().createElement("p",{className:"text-md m-0 text-text-secondary"},(0,Y.__)("Get access to advanced widgets and features to create the website that stands out!","header-footer-elementor"))),l().createElement("div",{className:"grid grid-cols-2 grid-flow-row gap-1 my-4"},e.map((function(e){return l().createElement(I.Title,{key:e.id,description:"",icon:l().createElement(xe,{className:"text-brand-primary-600 mr-1 h-3 w-3"}),iconPosition:"left",size:"xxs",tag:"h6",title:e.title,className:"text-md m-0 text-text-secondary hfe-compare-section"})}))),l().createElement("div",{className:"flex items-center pb-3 gap-4"},l().createElement(I.Button,{iconPosition:"right",variant:"secondary",className:"hfe-remove-ring",onClick:function(){window.open("https://ultimateelementor.com/pricing/?utm_source=uae-lite-FreevsPro&utm_medium=unlock-ultimate-feature&utm_campaign=uae-lite-upgrade","_blank")}},(0,Y.__)("Upgrade Now","header-footer-elementor")),l().createElement(D,{className:"text-black cursor-pointer",to:q.upgrade.path},(0,Y.__)("Compare Free vs Pro","header-footer-elementor"))))))},Re=B("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),De=B("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);function Ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ie=function(){var e=a((0,s.useState)(null),2),t=e[0],n=e[1],r=a((0,s.useState)(""),2),o=r[0],i=r[1],c=a((0,s.useState)(!1),2),u=c[0],d=c[1],f=a((0,s.useState)(!1),2),m=f[0],h=f[1],p=a((0,s.useState)(!0),2),g=p[0],y=p[1],v=a((0,s.useState)(0),2),b=v[0],w=v[1];(0,s.useEffect)((function(){y(!0),se()({path:"/hfe/v1/widgets",headers:{"Content-Type":"application/json","X-WP-Nonce":hfeSettingsData.hfe_nonce_action}}).then((function(e){var t=function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t.push({id:n,slug:r.slug,title:r.title,keywords:r.keywords,icon:l().createElement("i",{className:r.icon}),title_url:r.title_url,default:r.default,doc_url:r.doc_url,is_pro:r.is_pro,description:r.description,is_active:void 0===r.is_activate||r.is_activate,demo_url:void 0!==r.demo_url?r.demo_url:r.doc_url})}return t}(e);n(t),y(!1)})).catch((function(e){y(!1)}))}),[]);var x=null==t?void 0:t.filter((function(e){var t;return e.title.toLowerCase().includes(o)||(null===(t=e.keywords)||void 0===t?void 0:t.some((function(e){return e.toLowerCase().includes(o)})))})),_=function(){var e=Se(Ce().mark((function e(){var t;return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d(!0),(t=new window.FormData).append("action","hfe_bulk_activate_widgets"),t.append("nonce",hfe_admin_data.nonce),se()({url:hfe_admin_data.ajax_url,method:"POST",body:t}).then((function(e){d(!1),e.success?(n((function(e){return e.map((function(e){return je(je({},e),{},{is_active:!0})}))})),w((function(e){return e+1}))):e.error&&(d(!1),console.error("Error during AJAX request:",error))})).catch((function(e){d(!1),console.error("Error during AJAX request:",e)}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E=function(){var e=Se(Ce().mark((function e(){var t;return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:h(!0),(t=new window.FormData).append("action","hfe_bulk_deactivate_widgets"),t.append("nonce",hfe_admin_data.nonce),se()({url:hfe_admin_data.ajax_url,method:"POST",body:t}).then((function(e){h(!1),e.success?(n((function(e){return e.map((function(e){return je(je({},e),{},{is_active:!1})}))})),w((function(e){return e+1}))):e.error&&console.error("AJAX request failed:",e.error)})).catch((function(e){h(!1),console.error("Error during AJAX request:",e)}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return l().createElement("div",{className:"rounded-lg bg-white w-full mb-4"},l().createElement("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between p-4",style:{paddingBottom:"0"}},l().createElement("p",{className:"m-0 text-sm font-semibold text-text-primary mb-2 md:mb-0"},(0,Y.__)("Widgets / Features","header-footer-elementor")),l().createElement("div",{className:"flex flex-col md:flex-row items-center gap-y-2 md:gap-x-2 md:mr-7 relative"},l().createElement(Re,{className:"absolute top-1/2 transform -translate-y-1/2 text-gray-400",style:{backgroundColor:"#F9FAFB",left:"2%",width:"18px",height:"18px"}}),l().createElement("input",{type:"search",placeholder:(0,Y.__)("Search...","header-footer-elementor"),className:"mr-2 pl-10 w-full md:w-auto",style:{height:"40px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none",backgroundColor:"#F9FAFB"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"},onChange:function(e){i(e.target.value.toLowerCase())}}),l().createElement("div",{className:"flex flex-row gap-2 w-full md:w-auto"},l().createElement(I.Button,{icon:u?l().createElement(De,{className:"animate-spin"}):null,iconPosition:"left",variant:"outline",className:"hfe-bulk-action-button",onClick:_,disabled:!!o},u?(0,Y.__)("Activating...","header-footer-elementor"):(0,Y.__)("Activate All","header-footer-elementor")),l().createElement(I.Button,{icon:m?l().createElement(De,{className:"animate-spin"}):null,iconPosition:"left",variant:"outline",onClick:E,className:"hfe-bulk-action-button",disabled:!!o},m?(0,Y.__)("Deactivating...","header-footer-elementor"):(0,Y.__)("Deactivate All","header-footer-elementor"))))),l().createElement("div",{className:"flex bg-black flex-col rounded-lg p-4",style:{minHeight:"800px"}},g?l().createElement(I.Container,{align:"stretch",className:"p-2 gap-1.5 grid grid-cols-2 md:grid-cols-4",style:{backgroundColor:"#F9FAFB"},containerType:"grid",gap:"",justify:"start"},oe(Array(30)).map((function(e,t){return l().createElement(I.Container.Item,{key:t,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-6 space-y-2"},l().createElement(I.Skeleton,{className:"w-12 h-2 rounded-md"}),l().createElement(I.Skeleton,{className:"w-16 h-2 rounded-md"}),l().createElement(I.Skeleton,{className:"w-12 h-2 rounded-md"}))}))):l().createElement(I.Container,{align:"stretch",className:"p-1 gap-1.5 grid-cols-2 md:grid-cols-4",containerType:"grid",gap:"",justify:"start",style:{backgroundColor:"#F9FAFB"}},null==x?void 0:x.map((function(e){return l().createElement(I.Container.Item,{key:e.id,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-4"},l().createElement(ue,{widget:je(je({},e),{},{updateCounter:b}),key:e.id,updateCounter:b}))})))))},Fe=function(){return l().createElement(l().Fragment,null,l().createElement(re,null),l().createElement("div",null,l().createElement(I.Container,{align:"stretch",className:"p-6 flex flex-col lg:flex-row box-border",containerType:"flex",direction:"row",gap:"sm",justify:"start",style:{width:"100%"}},l().createElement(I.Container.Item,{className:"p-2 hfe-65-width",alignSelf:"auto",order:"none",shrink:1},l().createElement(Ie,null)),l().createElement(I.Container.Item,{className:"p-2 hfe-35-width",shrink:1},l().createElement(fe,null),l().createElement(Te,null),l().createElement(Me,null),l().createElement("div",{className:"",style:{paddingTop:"16px"}},l().createElement(pe,null))))))},Le=function(){var e=a((0,s.useState)(!0),2),t=e[0],n=e[1],r=a((0,s.useState)(null),2),o=r[0],i=r[1],c=a((0,s.useState)(null),2),u=c[0],d=c[1],f=[{id:1,icon:"",title:(0,Y.__)("250+ templates for every niche","header-footer-elementor")},{id:2,icon:"",title:(0,Y.__)("Modern, timeless designs","header-footer-elementor")},{id:3,icon:"",title:(0,Y.__)("Full design flexibility for easy customization","header-footer-elementor")},{id:4,icon:"",title:(0,Y.__)("100% responsive across all devices","header-footer-elementor")}];if((0,s.useEffect)((function(){n(!0),se()({path:"/hfe/v1/templates",headers:{"Content-Type":"application/json","X-WP-Nonce":hfeSettingsData.hfe_nonce_action}}).then((function(e){i(e.templates_status),e.redirect_url&&d(e.redirect_url),n(!1)})).catch((function(e){n(!1)}))}),[]),!t){var m="Install"===o?(0,Y.__)("Install Starter Templates","header-footer-elementor"):(0,Y.__)("Activate Starter Templates","header-footer-elementor"),h=function(){var e=new window.FormData,t="astra-sites/astra-sites.php",n="astra-sites";"Installed"!==hfeSettingsData.st_pro_status||"Install"!==hfeSettingsData.st_status&&"Installed"!==hfeSettingsData.st_status||(t="astra-pro-sites/astra-pro-sites.php",n="astra-pro-sites"),e.append("action","hfe_recommended_plugin_activate"),e.append("nonce",hfe_admin_data.nonce),e.append("plugin",t),e.append("type","plugin"),e.append("slug",n),se()({url:hfe_admin_data.ajax_url,method:"POST",body:e}).then((function(e){if(e.success){var t=document.querySelector(".hfe-starter-template-button");if(t){var n=t.querySelector("span");n&&(n.innerText=(0,Y.__)("Activating Starter Templates...","header-footer-elementor"),t.classList.add("hfe-plugin-activated"),n.innerText=(0,Y.__)("Activated Starter Templates","header-footer-elementor"),location.reload())}}else{var r=document.querySelector(".hfe-starter-template-button");if(r){var o=r.querySelector("span");o&&(o.innerText=(0,Y.__)("Activate Starter Templates","header-footer-elementor"))}}}))};return l().createElement("div",null,l().createElement(I.Container,{className:"flex gap-2 flex-col md:flex-row bg-background-primary p-6 md:p-10 border-[0.5px] border-subtle rounded-xl shadow-sm flex-col-reverse",containerType:"flex",gap:"xs"},l().createElement(I.Container.Item,{className:"flex flex-col justify-between w-full mt-4  md:w-1/2 mb-4 md:mb-0"},l().createElement("div",null,l().createElement(I.Title,{description:"",icon:l().createElement(we,null),iconPosition:"left",size:"xs",tag:"h6",title:(0,Y.__)("Design Your Website in Minutes","header-footer-elementor"),className:"text-xs font-semibold text-brand-primary-600 mb-2"}),l().createElement(I.Title,{description:"",icon:"",iconPosition:"left",tag:"h6",title:(0,Y.__)("Build your website faster using our prebuilt templates","header-footer-elementor"),className:"py-1 text-sm mb-2"}),l().createElement("p",{className:"text-sm md:text-md m-0 text-text-secondary text-text-tertiary"},(0,Y.__)("Stop building your site from scratch. Use our professional templates for your stunning website.It is easy to customize and completely responsive. Explore hundreds of designs and bring your vision to life in no time.","header-footer-elementor"))),l().createElement("div",{className:"grid grid-cols-1 gap-1 my-4"},f.map((function(e){return l().createElement(I.Title,{key:e.id,description:"",icon:l().createElement(xe,{className:"text-brand-primary-600 mr-1 h-3 w-3"}),iconPosition:"left",size:"xs",tag:"h6",title:(0,Y.__)(e.title,"header-footer-elementor"),className:""})}))),l().createElement("div",{className:"flex flex-col md:flex-row items-center pb-3 gap-4",style:{marginTop:"15px"}},l().createElement(I.Button,{icon:l().createElement(ge,null),iconPosition:"right",variant:"secondary",style:{backgroundColor:"#6005FF",outlineWidth:"0px"},className:"w-auto hfe-starter-template-button hfe-remove-ring cursor-pointer",onClick:function(e){if(u)window.open(u,"_blank");else{var t=document.querySelector(".hfe-starter-template-button span"),n=new window.FormData;n.append("action","hfe_recommended_plugin_install"),n.append("_ajax_nonce",hfe_admin_data.installer_nonce),n.append("slug","astra-sites"),t&&"Install"===o&&(t.innerText=(0,Y.__)("Installing Starter Templates...","header-footer-elementor"),se()({url:hfe_admin_data.ajax_url,method:"POST",body:n}).then((function(e){var n,r;e.success||"folder_exists"===e.errorCode?(t.innerText=(0,Y.__)("Installed Starter Templates","header-footer-elementor"),n=(new Date).toISOString().split("T")[0],r=new URLSearchParams({source:"UAE Lite",target_plugin:"Starter Templates",date:n}),fetch("".concat("https://webhook.suretriggers.com/suretriggers/a7ac4b20-18f9-4ec6-9813-dfac83328d00","?").concat(r.toString()),{method:"GET"}).then((function(e){return e.json()})).then((function(e){})).catch((function(e){})),h()):t.innerText=(0,Y.__)("Install Starter Templates","header-footer-elementor")}))),t&&"Installed"===o&&(t.innerText=(0,Y.__)("Activating Starter Templates...","header-footer-elementor"),h())}}},"Activated"===o?(0,Y.__)("Explore Templates","header-footer-elementor"):m),l().createElement(I.Button,{icon:"",iconPosition:"right",variant:"ghost",className:"w-auto hfe-link-color hfe-remove-ring",onClick:function(){window.open("https://startertemplates.com/","_blank")}},(0,Y.__)("Learn More","header-footer-elementor")))),l().createElement(I.Container.Item,{className:"flex justify-center md:justify-end w-full md:w-1/2"},l().createElement("img",{src:"".concat(hfeSettingsData.template_url),alt:"Column Showcase",className:"object-contain w-full md:w-5/6"}))))}},ze=function(){return l().createElement(l().Fragment,null,l().createElement(re,null),l().createElement("div",{className:""},l().createElement(I.Container,{align:"stretch",className:"p-2",containerType:"flex",direction:"row",gap:"sm",justify:"center",style:{width:"100%"}},l().createElement(I.Container.Item,{className:"p-2",alignSelf:"auto",order:"none",shrink:1,style:{width:"90%"}},l().createElement(Le,null)))))},Be=function(e){var t=e.items,n=e.onSelectItem,r=a((0,s.useState)(null),2),o=r[0],i=r[1];return l().createElement("div",{style:{padding:"1rem",width:"100%"}},t.map((function(e){return l().createElement("div",{key:e.id,className:"mb-2"},e.main&&l().createElement("p",{className:"text-sm text-text-tertiary font-normal mb-2"},e.main),l().createElement("div",{className:"h-10 flex items-center justify-start gap-2 px-2 rounded-md cursor-pointer ".concat(o===e.id?"bg-gray-100":"bg-background-primary"),style:{backgroundColor:o===e.id?"#F9FAFB":""},onClick:function(){return function(e){i(e.id),n(e)}(e)}},l().createElement("span",null,o===e.id?e.selected:e.icon),l().createElement("p",{className:"m-0 text-base font-normal"},e.title)))})))},We=function(e){var t=e.selectedItem;return l().createElement("div",{className:"p-6",style:{marginLeft:"4px"}},l().createElement("div",null,null==t?void 0:t.content))};let Ve={data:""},Ue=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Ve,$e=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,He=/\/\*[^]*?\*\/|  +/g,Ye=/\n+/g,qe=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+a+";":r+="f"==i[1]?qe(a,i):i+"{"+qe(a,"k"==i[1]?"":t)+"}":"object"==typeof a?r+=qe(a,t?t.replace(/([^,])+/g,(e=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):i):null!=a&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=qe.p?qe.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},Ke={},Ge=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+Ge(e[n]);return t}return e},Xe=(e,t,n,r,o)=>{let i=Ge(e),a=Ke[i]||(Ke[i]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(i));if(!Ke[a]){let t=i!==e?e:(e=>{let t,n,r=[{}];for(;t=$e.exec(e.replace(He,""));)t[4]?r.shift():t[3]?(n=t[3].replace(Ye," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(Ye," ").trim();return r[0]})(e);Ke[a]=qe(o?{["@keyframes "+a]:t}:t,n?"":"."+a)}let s=n&&Ke.g?Ke.g:null;return n&&(Ke.g=Ke[a]),((e,t,n,r)=>{r?t.data=t.data.replace(r,e):-1===t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(Ke[a],t,r,s),a};function Ze(e){let t=this||{},n=e.call?e(t.p):e;return Xe(n.unshift?n.raw?((e,t,n)=>e.reduce(((e,r,o)=>{let i=t[o];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":qe(e,""):!1===e?"":e}return e+r+(null==i?"":i)}),""))(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,Ue(t.target),t.g,t.o,t.k)}Ze.bind({g:1});let Je,Qe,et,tt=Ze.bind({k:1});function nt(e,t){let n=this||{};return function(){let r=arguments;function o(i,a){let s=Object.assign({},i),l=s.className||o.className;n.p=Object.assign({theme:Qe&&Qe()},s),n.o=/ *go\d+/.test(l),s.className=Ze.apply(n,r)+(l?" "+l:""),t&&(s.ref=a);let c=e;return e[0]&&(c=s.as||e,delete s.as),et&&c[0]&&et(s),Je(c,s)}return t?t(o):o}}var rt=(e,t)=>(e=>"function"==typeof e)(e)?e(t):e,ot=(()=>{let e=0;return()=>(++e).toString()})(),it=(()=>{let e;return()=>{if(void 0===e&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),at=new Map,st=e=>{if(at.has(e))return;let t=setTimeout((()=>{at.delete(e),dt({type:4,toastId:e})}),1e3);at.set(e,t)},lt=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,20)};case 1:return t.toast.id&&(e=>{let t=at.get(e);t&&clearTimeout(t)})(t.toast.id),{...e,toasts:e.toasts.map((e=>e.id===t.toast.id?{...e,...t.toast}:e))};case 2:let{toast:n}=t;return e.toasts.find((e=>e.id===n.id))?lt(e,{type:1,toast:n}):lt(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?st(r):e.toasts.forEach((e=>{st(e.id)})),{...e,toasts:e.toasts.map((e=>e.id===r||void 0===r?{...e,visible:!1}:e))};case 4:return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter((e=>e.id!==t.toastId))};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map((e=>({...e,pauseDuration:e.pauseDuration+o})))}}},ct=[],ut={toasts:[],pausedAt:void 0},dt=e=>{ut=lt(ut,e),ct.forEach((e=>{e(ut)}))},ft={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},mt=e=>(t,n)=>{let r=((e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(null==n?void 0:n.id)||ot()}))(t,e,n);return dt({type:2,toast:r}),r.id},ht=(e,t)=>mt("blank")(e,t);ht.error=mt("error"),ht.success=mt("success"),ht.loading=mt("loading"),ht.custom=mt("custom"),ht.dismiss=e=>{dt({type:3,toastId:e})},ht.remove=e=>dt({type:4,toastId:e}),ht.promise=(e,t,n)=>{let r=ht.loading(t.loading,{...n,...null==n?void 0:n.loading});return e.then((e=>(ht.success(rt(t.success,e),{id:r,...n,...null==n?void 0:n.success}),e))).catch((e=>{ht.error(rt(t.error,e),{id:r,...n,...null==n?void 0:n.error})})),e};var pt=(e,t)=>{dt({type:1,toast:{id:e,height:t}})},gt=()=>{dt({type:5,time:Date.now()})},yt=tt`
from {
  transform: scale(0) rotate(45deg);
	opacity: 0;
}
to {
 transform: scale(1) rotate(45deg);
  opacity: 1;
}`,vt=tt`
from {
  transform: scale(0);
  opacity: 0;
}
to {
  transform: scale(1);
  opacity: 1;
}`,bt=tt`
from {
  transform: scale(0) rotate(90deg);
	opacity: 0;
}
to {
  transform: scale(1) rotate(90deg);
	opacity: 1;
}`,wt=nt("div")`
  width: 20px;
  opacity: 0;
  height: 20px;
  border-radius: 10px;
  background: ${e=>e.primary||"#ff4b4b"};
  position: relative;
  transform: rotate(45deg);

  animation: ${yt} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
  animation-delay: 100ms;

  &:after,
  &:before {
    content: '';
    animation: ${vt} 0.15s ease-out forwards;
    animation-delay: 150ms;
    position: absolute;
    border-radius: 3px;
    opacity: 0;
    background: ${e=>e.secondary||"#fff"};
    bottom: 9px;
    left: 4px;
    height: 2px;
    width: 12px;
  }

  &:before {
    animation: ${bt} 0.15s ease-out forwards;
    animation-delay: 180ms;
    transform: rotate(90deg);
  }
`,xt=tt`
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
`,_t=nt("div")`
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  border: 2px solid;
  border-radius: 100%;
  border-color: ${e=>e.secondary||"#e0e0e0"};
  border-right-color: ${e=>e.primary||"#616161"};
  animation: ${xt} 1s linear infinite;
`,Et=tt`
from {
  transform: scale(0) rotate(45deg);
	opacity: 0;
}
to {
  transform: scale(1) rotate(45deg);
	opacity: 1;
}`,St=tt`
0% {
	height: 0;
	width: 0;
	opacity: 0;
}
40% {
  height: 0;
	width: 6px;
	opacity: 1;
}
100% {
  opacity: 1;
  height: 10px;
}`,kt=nt("div")`
  width: 20px;
  opacity: 0;
  height: 20px;
  border-radius: 10px;
  background: ${e=>e.primary||"#61d345"};
  position: relative;
  transform: rotate(45deg);

  animation: ${Et} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
  animation-delay: 100ms;
  &:after {
    content: '';
    box-sizing: border-box;
    animation: ${St} 0.2s ease-out forwards;
    opacity: 0;
    animation-delay: 200ms;
    position: absolute;
    border-right: 2px solid;
    border-bottom: 2px solid;
    border-color: ${e=>e.secondary||"#fff"};
    bottom: 6px;
    left: 6px;
    height: 10px;
    width: 6px;
  }
`,Ct=nt("div")`
  position: absolute;
`,Nt=nt("div")`
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 20px;
  min-height: 20px;
`,Pt=tt`
from {
  transform: scale(0.6);
  opacity: 0.4;
}
to {
  transform: scale(1);
  opacity: 1;
}`,Tt=nt("div")`
  position: relative;
  transform: scale(0.6);
  opacity: 0.4;
  min-width: 20px;
  animation: ${Pt} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
`,Ot=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return void 0!==t?"string"==typeof t?s.createElement(Tt,null,t):t:"blank"===n?null:s.createElement(Nt,null,s.createElement(_t,{...r}),"loading"!==n&&s.createElement(Ct,null,"error"===n?s.createElement(wt,{...r}):s.createElement(kt,{...r})))},Mt=e=>`\n0% {transform: translate3d(0,${-200*e}%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n`,Rt=e=>`\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,${-150*e}%,-1px) scale(.6); opacity:0;}\n`,Dt=nt("div")`
  display: flex;
  align-items: center;
  background: #fff;
  color: #363636;
  line-height: 1.3;
  will-change: transform;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
  max-width: 350px;
  pointer-events: auto;
  padding: 8px 10px;
  border-radius: 8px;
`,At=nt("div")`
  display: flex;
  justify-content: center;
  margin: 4px 10px;
  color: inherit;
  flex: 1 1 auto;
  white-space: pre-line;
`,jt=s.memo((({toast:e,position:t,style:n,children:r})=>{let o=e.height?((e,t)=>{let n=e.includes("top")?1:-1,[r,o]=it()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[Mt(n),Rt(n)];return{animation:t?`${tt(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${tt(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}})(e.position||t||"top-center",e.visible):{opacity:0},i=s.createElement(Ot,{toast:e}),a=s.createElement(At,{...e.ariaProps},rt(e.message,e));return s.createElement(Dt,{className:e.className,style:{...o,...n,...e.style}},"function"==typeof r?r({icon:i,message:a}):s.createElement(s.Fragment,null,i,a))}));!function(e){qe.p=void 0,Je=e,Qe=void 0,et=void 0}(s.createElement);var It=({id:e,className:t,style:n,onHeightUpdate:r,children:o})=>{let i=s.useCallback((t=>{if(t){let n=()=>{let n=t.getBoundingClientRect().height;r(e,n)};n(),new MutationObserver(n).observe(t,{subtree:!0,childList:!0,characterData:!0})}}),[e,r]);return s.createElement("div",{ref:i,className:t,style:n},o)},Ft=Ze`
  z-index: 9999;
  > * {
    pointer-events: auto;
  }
`,Lt=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,containerStyle:i,containerClassName:a})=>{let{toasts:l,handlers:c}=(e=>{let{toasts:t,pausedAt:n}=((e={})=>{let[t,n]=(0,s.useState)(ut);(0,s.useEffect)((()=>(ct.push(n),()=>{let e=ct.indexOf(n);e>-1&&ct.splice(e,1)})),[t]);let r=t.toasts.map((t=>{var n,r;return{...e,...e[t.type],...t,duration:t.duration||(null==(n=e[t.type])?void 0:n.duration)||(null==e?void 0:e.duration)||ft[t.type],style:{...e.style,...null==(r=e[t.type])?void 0:r.style,...t.style}}}));return{...t,toasts:r}})(e);(0,s.useEffect)((()=>{if(n)return;let e=Date.now(),r=t.map((t=>{if(t.duration===1/0)return;let n=(t.duration||0)+t.pauseDuration-(e-t.createdAt);if(!(n<0))return setTimeout((()=>ht.dismiss(t.id)),n);t.visible&&ht.dismiss(t.id)}));return()=>{r.forEach((e=>e&&clearTimeout(e)))}}),[t,n]);let r=(0,s.useCallback)((()=>{n&&dt({type:6,time:Date.now()})}),[n]),o=(0,s.useCallback)(((e,n)=>{let{reverseOrder:r=!1,gutter:o=8,defaultPosition:i}=n||{},a=t.filter((t=>(t.position||i)===(e.position||i)&&t.height)),s=a.findIndex((t=>t.id===e.id)),l=a.filter(((e,t)=>t<s&&e.visible)).length;return a.filter((e=>e.visible)).slice(...r?[l+1]:[0,l]).reduce(((e,t)=>e+(t.height||0)+o),0)}),[t]);return{toasts:t,handlers:{updateHeight:pt,startPause:gt,endPause:r,calculateOffset:o}}})(n);return s.createElement("div",{style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...i},className:a,onMouseEnter:c.startPause,onMouseLeave:c.endPause},l.map((n=>{let i=n.position||t,a=((e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:it()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...o}})(i,c.calculateOffset(n,{reverseOrder:e,gutter:r,defaultPosition:t}));return s.createElement(It,{id:n.id,key:n.id,onHeightUpdate:c.updateHeight,className:n.visible?Ft:"",style:a},"custom"===n.type?rt(n.message,n):o?o(n):s.createElement(jt,{toast:n,position:i}))})))},zt=ht,Bt=[{id:"1",title:(0,Y.__)("Option 1 (Recommended)","header-footer-elementor"),description:(0,Y.__)("This option will automatically replace your theme's header and footer files with custom templates from the plugin. It works with most themes and is selected by default.","header-footer-elementor"),value:"1"},{id:"2",title:(0,Y.__)("Option 2","header-footer-elementor"),description:(0,Y.__)("This option will automatically replace your theme's header and footer files with custom templates from the plugin. It works with most themes and is selected by default.","header-footer-elementor"),value:"2"}];const Wt=function(){if("no"===hfeSettingsData.show_theme_support)return null;var e=a((0,s.useState)(hfeSettingsData.theme_option),2),t=e[0],n=e[1],r=a((0,s.useState)(!0),2),o=r[0],i=r[1];(0,s.useEffect)((function(){i(!1)}),[]);var c=function(e){var t=e.target.value;n(t),o||u(t)},u=function(){var e=Se(Ce().mark((function e(t){var n;return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(hfe_admin_data.ajax_url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"save_theme_compatibility_option",hfe_compatibility_option:t,nonce:hfe_admin_data.nonce})});case 3:return n=e.sent,e.next=6,n.json();case 6:e.sent.success?zt.success((0,Y.__)("Settings saved successfully!","header-footer-elementor")):zt.error((0,Y.__)("Failed to save settings!","header-footer-elementor")),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),zt.error((0,Y.__)("Failed to save settings!","header-footer-elementor"));case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t){return e.apply(this,arguments)}}();return l().createElement(l().Fragment,null,l().createElement(I.Title,{description:"",icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,Y.__)("Theme Support","header-footer-elementor")}),l().createElement(I.Container,{align:"stretch",className:"bg-background-primary p-6 rounded-lg",containerType:"flex",direction:"column",gap:"sm",justify:"start",style:{marginTop:"24px",maxWidth:"696px"}},l().createElement(I.Container.Item,{className:"flex flex-col space-y-1"},l().createElement("p",{className:"text-base font-semibold m-0"},(0,Y.__)("Select Option to Add Theme Support","header-footer-elementor")),l().createElement("p",{className:"text-sm font-normal m-0"},(0,Y.__)("To ensure compatibility between the header/footer and your theme, please choose one of the following options to enable theme support:","header-footer-elementor"))),l().createElement(I.Container.Item,{className:"p-2 space-y-4",alignSelf:"auto",order:"none"},Bt.map((function(e){return l().createElement("div",{key:e.id,className:"flex items-start gap-1 justify-center cursor-pointer"},l().createElement("input",{id:e.id,value:e.value,type:"radio",className:"mt-1 cursor-pointer hfe-radio-field",name:"theme-support-option",onChange:c,checked:t===e.value}),l().createElement("div",{className:"flex flex-col cursor-pointer"},l().createElement(I.Label,{size:"sm",variant:"neutral",className:"text-sm font-semibold text-text-secondary cursor-pointer flex flex-col items-start justify-start",htmlFor:e.id},e.title,":",l().createElement("p",{className:"m-0 text-sm font-normal text-text-secondary cursor-pointer"},e.description))))}))),l().createElement("div",{className:"flex items-center p-4 border rounded-lg text-start",style:{paddingTop:"16px",paddingBottom:"16px",backgroundColor:"#F3F0FF"}},l().createElement("p",{className:"m-0 text-sm"},l().createElement("strong",null,(0,Y.__)("Note:","header-footer-elementor"))," ",(0,Y.__)("If neither option works, please contact your theme author to add support for this plugin.","header-footer-elementor")))),l().createElement(Lt,{position:"top-right",reverseOrder:!1,gutter:8,containerStyle:{top:20,right:20,marginTop:"80px"},toastOptions:{duration:5e3,style:{background:"white"},success:{duration:3e3,style:{color:""},iconTheme:{primary:"#6005ff",secondary:"#fff"}}}}))},Vt=function(){var e=hfeSettingsData.uaelite_versions,t=(0,s.useRef)(e?e[0].value:""),n=a((0,s.useState)(e?e[0].value:""),2),r=n[0],o=n[1],i=a((0,s.useState)("elementor-header-footer"),2),c=(i[0],i[1]),u=a((0,s.useState)(!1),2),d=u[0],f=u[1];return(0,s.useEffect)((function(){}),[d]),l().createElement(l().Fragment,null,l().createElement(I.Title,{description:"",icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,Y.__)("Version Control","header-footer-elementor")}),l().createElement("div",{className:"box-border bg-background-primary p-6 rounded-lg",style:{marginTop:"24px"}},l().createElement(I.Container,{align:"center",className:"flex flex-col lg:flex-row",containerType:"flex",direction:"column",gap:"sm",justify:"start"},l().createElement(I.Container.Item,{className:"shrink flex flex-col space-y-1"},l().createElement("p",{className:"text-base font-semibold m-0"},(0,Y.__)("Rollback to Previous Version","header-footer-elementor")),l().createElement("p",{className:"text-sm font-normal m-0"},(0,Y.__)("Experiencing an issue with current version? Roll back to a previous version to help troubleshoot the issue.","header-footer-elementor"))),l().createElement(I.Container.Item,{className:"p-2 flex space-y-4",alignSelf:"auto",order:"none"},l().createElement("div",{className:"bsf-rollback-version"},l().createElement("input",{type:"hidden",name:"product-name",id:"bsf-product-name",value:"header-footer-elementor"}),l().createElement("select",{id:"uaeliteVersionRollback",ref:t,onBlur:function(){c("elementor-header-footer")},onChange:function(e){o(e.target.value)},style:{padding:"8px",marginRight:"10px",marginTop:"16px",cursor:"pointer",borderRadius:"4px",height:"40px",width:"100px",outline:"none",boxShadow:"none"},onFocus:function(e){return e.target.style.borderColor="#6005FF"}},e.map((function(e){return l().createElement("option",{key:e.value,value:e.value},e.label)})))),l().createElement("div",{className:"flex flex-col cursor-pointer"},l().createElement(I.Dialog,{design:"simple",exitOnEsc:!0,scrollLock:!0,open:d,setOpen:f,trigger:l().createElement(I.Button,{style:{backgroundColor:"#6005ff"}},(0,Y.__)("Rollback","header-footer-elementor"))},l().createElement(I.Dialog.Backdrop,null),l().createElement(I.Dialog.Panel,null,l().createElement(I.Dialog.Header,null,l().createElement("div",{className:"flex items-center justify-between"},l().createElement(I.Dialog.Title,null,(0,Y.__)("Rollback to Previous Version","header-footer-elementor")),l().createElement(I.Dialog.CloseButton,null))),l().createElement(I.Dialog.Body,null,(0,Y.__)("Are you sure you want to rollback to Ultimate Addons for Elementor v".concat(r,"?"),"header-footer-elementor")),l().createElement(I.Dialog.Footer,null,l().createElement(I.Button,{onClick:function(){var e=hfeSettingsData.uaelite_rollback_url.replace("VERSION",r);f(!1),window.location.href=e}},(0,Y.__)("Rollback","header-footer-elementor")),l().createElement(I.Button,{onClick:function(){f(!1)}},(0,Y.__)("Cancel","header-footer-elementor"))))))))))},Ut=function(){return l().createElement(l().Fragment,null,l().createElement(I.Title,{description:"",icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,Y.__)("My Account","header-footer-elementor")}),l().createElement(I.Container,{align:"stretch",className:"bg-background-primary p-6 rounded-lg",containerType:"flex",direction:"column",gap:"sm",justify:"start",style:{marginTop:"24px"}},l().createElement(I.Container.Item,{className:"flex flex-col space-y-2"},l().createElement("p",{className:"text-base font-semibold m-0"},(0,Y.__)("License Key","header-footer-elementor")),l().createElement("p",{className:"text-sm font-normal m-0"},(0,Y.__)("You are using the free version of Ultimate Addons for Elementor, no license key is needed.. "))),l().createElement("div",{className:"flex items-center justify-between px-4 rounded-xl",style:{paddingTop:"6px",paddingBottom:"6px",backgroundColor:"#F3F0FF"}},l().createElement("span",{className:"flex items-center gap-x-2 text-base font-semibold"},(0,Y.__)("Unlock Pro Features","header-footer-elementor"),l().createElement("p",{className:"text-base font-normal"},(0,Y.__)("Get access to advanced blocks and premium features.","header-footer-elementor"))),l().createElement(I.Button,{icon:l().createElement(W,null),iconPosition:"right",variant:"link",style:{color:"#6005FF",borderColor:"#6005FF",transition:"color 0.3s ease, border-color 0.3s ease",fontSize:"16px"},className:"hfe-remove-ring text-[#6005FF]",onClick:function(){window.open("https://ultimateelementor.com/pricing/?utm_source=uae-lite-settings&utm_medium=My-accounts&utm_campaign=uae-lite-upgrade","_blank")}},(0,Y.__)("Upgrade Now","header-footer-elementor")))))},$t=function(){var e=[{id:1,icon:l().createElement("img",{src:"".concat(hfeSettingsData.user_url),alt:(0,Y.__)("Custom SVG","header-footer-elementor"),className:"object-contain"}),selected:l().createElement("img",{src:"".concat(hfeSettingsData.user__selected_url),alt:(0,Y.__)("Custom SVG","header-footer-elementor"),className:"object-contain"}),title:(0,Y.__)("My Account","header-footer-elementor"),content:l().createElement(Ut,null)},{id:2,icon:l().createElement("img",{src:"".concat(hfeSettingsData.theme_url),alt:(0,Y.__)("Custom SVG","header-footer-elementor"),className:"object-contain"}),selected:l().createElement("img",{src:"".concat(hfeSettingsData.theme_url_selected),alt:(0,Y.__)("Custom SVG","header-footer-elementor"),className:"object-contain"}),main:(0,Y.__)("Editor","header-footer-elementor"),title:(0,Y.__)("Theme Support","header-footer-elementor"),content:l().createElement(Wt,null)},{id:3,icon:l().createElement("img",{src:"".concat(hfeSettingsData.version_url),alt:(0,Y.__)("Custom SVG","header-footer-elementor"),className:"object-contain"}),selected:l().createElement("img",{src:"".concat(hfeSettingsData.version__selected_url),alt:(0,Y.__)("Custom SVG","header-footer-elementor"),className:"object-contain"}),main:(0,Y.__)("Utilities","header-footer-elementor"),title:(0,Y.__)("Version Control","header-footer-elementor"),content:l().createElement(Vt,null)}].filter((function(e){return"no"!==hfeSettingsData.show_theme_support||2!==e.id})),t=a((0,s.useState)((function(){var t=localStorage.getItem("hfeSelectedItemId");return e.find((function(e){return e.id===Number(t)}))||e[0]})),2),n=t[0],r=t[1];return(0,s.useEffect)((function(){localStorage.setItem("hfeSelectedItemId",n.id.toString())}),[n]),(0,s.useEffect)((function(){var t=new URLSearchParams(window.location.search).get("tab");if(t){var n=Number(t),o=e.find((function(e){return e.id===n}));o&&r(o)}}),[]),l().createElement(l().Fragment,null,l().createElement(re,{onSettingsTabClick:function(){r(e[0])}}),l().createElement("div",{className:""},l().createElement(I.Container,{align:"stretch",className:"p-1 flex-col lg:flex-row hfe-settings-page",containerType:"flex",direction:"row",gap:"sm",justify:"start",style:{height:"100%"}},l().createElement(I.Container.Item,{className:"p-2 hfe-sticky-outer-wrapper",alignSelf:"auto",order:"none",shrink:1,style:{backgroundColor:"#ffffff"}},l().createElement("div",{className:"hfe-sticky-sidebar"},l().createElement(Be,{items:e,onSelectItem:function(e){r(e)},selectedItemId:n.id}))),l().createElement(I.Container.Item,{className:"p-2 flex w-full justify-center items-start hfe-hide-scrollbar",alignSelf:"auto",order:"none",shrink:1,style:{height:"calc(100vh - 1px)",overflowY:"auto"}},l().createElement("div",{className:"hfe-78-width"},l().createElement(We,{selectedItem:n}))))))},Ht=B("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Yt=function(){var e=[{title:(0,Y.__)("Essentials","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("White Label Option","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,Y.__)("24/7 Premium Support","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,Y.__)("Cross-Domain Copy-Paste","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,Y.__)("Dynamic Header & Footer Widgets","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("Post Info","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:2,content:(0,Y.__)("Scroll to Top","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:3,content:(0,Y.__)("Breadcrumbs","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:4,content:(0,Y.__)("Retina Logo","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:5,content:(0,Y.__)("Copyright","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:6,content:(0,Y.__)("Page Title","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:7,content:(0,Y.__)("Site Tagline","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:8,content:(0,Y.__)("Site Logo","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:9,content:(0,Y.__)("Search","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:10,content:(0,Y.__)("Navigation Menu","header-footer-elementor"),iconFree:!0,iconPro:!1}]},{title:(0,Y.__)("Creative & Advanced Design Widgets","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("Advanced Heading","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,Y.__)("Dual Color Heading","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,Y.__)("Fancy Heading","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,Y.__)("Multi-Button","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:5,content:(0,Y.__)("Image Hotspots","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,Y.__)("Content & Media Widgets","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("Content Toggle Button","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,Y.__)("Image Gallery","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,Y.__)("Video Gallery","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,Y.__)("Table","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:5,content:(0,Y.__)("Timeline","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:6,content:(0,Y.__)("Google Map","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:7,content:(0,Y.__)("Before & After Slider","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:8,content:(0,Y.__)("Info Box","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:9,content:(0,Y.__)("Video","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:10,content:(0,Y.__)("Conditional Display","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:11,content:(0,Y.__)("Login Form","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:12,content:(0,Y.__)("User Registeration Form","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,Y.__)("Marketing & Engagement Widgets","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("Marketing Button","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,Y.__)("Pricing Table","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,Y.__)("Price List","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,Y.__)("Countdown Timer","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:5,content:(0,Y.__)("Business Hours","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:6,content:(0,Y.__)("Modal Popup","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,Y.__)("E-Commerce Integration","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("WooCommerce: Add to Cart","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,Y.__)("WooCommerce: Product Category","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,Y.__)("WooCommerce: Mini Cart","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,Y.__)("WooCommerce: Product","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:5,content:(0,Y.__)("WooCommerce: Checkout","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,Y.__)("Forms Integration","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("Contact Form 7","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,Y.__)("Gravity Forms","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,Y.__)("WPForms","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,Y.__)("Fluent Forms","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,Y.__)("SEO Widgets","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("FAQ with Schema","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,Y.__)("How-To","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,Y.__)("Table of Contents","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,Y.__)("Business Reviews","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,Y.__)("Creative Features","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("Presets","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,Y.__)("Welcome Music","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,Y.__)("Particles","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,Y.__)("Party Propz","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:5,content:(0,Y.__)("Shape Divider","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,Y.__)("Social Media Integration","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("Instagram Feed","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,Y.__)("Twitter Feed","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,Y.__)("Social Share","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,Y.__)("Advanced Features","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("Retina Image","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,Y.__)("Team Member","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,Y.__)("Post Layout","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,Y.__)("Off Canvas","header-footer-elementor"),iconFree:!1,iconPro:!0}]}],t=function(e){return e?l().createElement(xe,{color:"#16A34A"}):l().createElement(Ht,{color:"#DC2626"})};return l().createElement("div",{className:"rounded-lg bg-white w-full mb-6"},l().createElement("div",{className:"flex items-center justify-between p-5",style:{paddingBottom:"0"}},l().createElement("div",{className:"flex flex-col"},l().createElement("p",{className:"m-0 text-xl font-semibold pt-4 text-text-primary"},(0,Y.__)("Free Vs Pro","header-footer-elementor")),l().createElement("p",{className:"m-0 text-sm font-normal pt-1 text-text-secondary"},(0,Y.__)("Ultimate Addons for Elementor Pro offers 50+ widgets and features!","header-footer-elementor")),l().createElement("p",{className:"m-0 text-sm font-normal pt-1 text-text-secondary"},(0,Y.__)("Compare the popular features/widgets to find the best option for your website.","header-footer-elementor"))),l().createElement("div",{className:"flex items-center gap-x-2 mr-7"},l().createElement(I.Button,{iconPosition:"right",variant:"primary",style:{color:"white",borderColor:"#6005FF",transition:"color 0.3s ease, border-color 0.3s ease",backgroundColor:"#6005ff"},className:"hfe-remove-ring text-[#6005FF]",onClick:function(){window.open("https://ultimateelementor.com/pricing/?utm_source=uae-lite-FreevsPro&utm_medium=get-uae-pro&utm_campaign=uae-lite-upgrade","_blank")}},(0,Y.__)("Upgrade Now","header-footer-elementor")))),l().createElement("div",{className:"px-4"},l().createElement("div",{className:"flex flex-col space-y-2 pt-5"},e.map((function(e){return l().createElement(l().Fragment,{key:e.title},l().createElement("div",{className:"flex fle-row py-4 px-5 items-center h-4 justify-between rounded-lg shadow-container-item",style:{backgroundColor:"#F9FAFB"}},l().createElement("p",{className:"text-sm text-text-primary font-medium"},e.title),l().createElement("div",{className:"flex flex-row items-center",style:{gap:"12rem"}},l().createElement("p",{className:"text-sm text-text-primary font-medium"},(0,Y.__)("Free","header-footer-elementor")),l().createElement("p",{className:"text-sm text-text-primary font-medium",style:{marginRight:"50px"}},(0,Y.__)("Pro","header-footer-elementor")))),e.items.map((function(e){return l().createElement("div",{key:e.id,className:"flex fle-row py-4 px-5 items-center h-4 justify-between rounded-lg shadow-container-item"},l().createElement("p",{className:"text-sm text-text-secondary font-medium"},e.content),l().createElement("div",{className:"flex flex-row items-center justify-between",style:{gap:10===e.id&&e.content===(0,Y.__)("Navigation Menu","header-footer-elementor")?"10.7rem":"12rem"}},l().createElement("p",{className:"text-sm text-text-primary font-medium"},10===e.id&&e.content===(0,Y.__)("Navigation Menu","header-footer-elementor")?e.iconPro?(0,Y.__)("Advanced","header-footer-elementor"):(0,Y.__)("Basic","header-footer-elementor"):t(e.iconFree)),l().createElement("p",{className:"text-sm text-text-primary font-medium",style:{marginRight:10===e.id&&e.content===(0,Y.__)("Navigation Menu","header-footer-elementor")?"25px":"50px"}},10===e.id&&e.content===(0,Y.__)("Navigation Menu","header-footer-elementor")?e.iconPro?(0,Y.__)("Basic","header-footer-elementor"):(0,Y.__)("Advanced","header-footer-elementor"):t(e.iconPro))))})))})))))},qt=function(){var e=[{id:1,icon:"",title:(0,Y.__)("Modal Popup","header-footer-elementor")},{id:2,icon:"",title:(0,Y.__)("Advanced Heading","header-footer-elementor")},{id:3,icon:"",title:(0,Y.__)("Post Layouts","header-footer-elementor")},{id:4,icon:"",title:(0,Y.__)("Info Box","header-footer-elementor")},{id:5,icon:"",title:(0,Y.__)("Pricing Cards","header-footer-elementor")},{id:6,icon:"",title:(0,Y.__)("Form Stylers and more...","header-footer-elementor")}];return l().createElement("div",{className:"",style:{paddingBottom:"16px"}},l().createElement(I.Container,{className:"bg-background-primary gap-1 p-4 border-[0.5px] border-subtle rounded-xl shadow-sm",containerType:"flex",direction:"column",justify:"between",gap:"xs"},l().createElement(I.Container.Item,{className:"flex flex-col justify-center items-center"},l().createElement("img",{src:"".concat(hfeSettingsData.column_url),alt:(0,Y.__)("Column Showcase","header-footer-elementor"),className:"h-auto rounded w-1/2"})),l().createElement(I.Container.Item,{className:"flex flex-col justify-between"},l().createElement("div",null,l().createElement(I.Title,{description:"",icon:l().createElement(we,null),iconPosition:"left",size:"xs",tag:"h6",title:(0,Y.__)("Unlock Ultimate Features","header-footer-elementor"),className:"text-xs font-semibold text-brand-primary-600"}),l().createElement(I.Title,{description:"",icon:"",iconPosition:"left",tag:"h6",title:(0,Y.__)("Create Stunning Designs with the Pro Version!","header-footer-elementor"),className:"py-1 text-sm"}),l().createElement("p",{className:"text-md m-0 text-text-secondary"},(0,Y.__)("Get access to advanced widgets and features to create the website that stands out!","header-footer-elementor"))),l().createElement("div",{className:"grid grid-cols-2 grid-flow-row gap-1 my-4"},e.map((function(e){return l().createElement(I.Title,{key:e.id,description:"",icon:l().createElement(xe,{className:"text-brand-primary-600 mr-1 h-3 w-3"}),iconPosition:"left",size:"xs",tag:"h6",title:e.title,className:"text-md m-0 text-text-secondary hfe-compare-section"})}))),l().createElement("div",{className:""},l().createElement(I.Button,{iconPosition:"right",variant:"secondary",className:"hfe-remove-ring",style:{width:"100%"},onClick:function(){window.open("https://ultimateelementor.com/pricing/?utm_source=uae-lite-free-vs-pro&utm_medium=My-accounts&utm_campaign=uae-lite-upgrade","_blank")}},(0,Y.__)("Upgrade Now","header-footer-elementor"))))))},Kt=function(){return l().createElement(l().Fragment,null,l().createElement(re,null),l().createElement("div",null,l().createElement(I.Container,{align:"stretch",className:"p-6 flex-col lg:flex-row box-border",containerType:"flex",direction:"row",gap:"sm",justify:"start",style:{width:"100%"}},l().createElement(I.Container.Item,{className:"p-2 hfe-65-width",alignSelf:"auto",order:"none",shrink:0},l().createElement(Yt,null)),l().createElement(I.Container.Item,{className:"p-2 w-full hfe-35-width",shrink:1},l().createElement(qt,null),l().createElement(Te,null),l().createElement(pe,null)))))},Gt=function(){var e;return React.createElement(j,{routes:q,defaultRoute:null==q||null===(e=q.dashboard)||void 0===e?void 0:e.path},React.createElement(P,{path:q.dashboard.path},React.createElement(Oe,null)),React.createElement(P,{path:q.widgets.path},React.createElement(Fe,null)),React.createElement(P,{path:q.templates.path},React.createElement(ze,null)),React.createElement(P,{path:q.settings.path},React.createElement($t,null)),React.createElement(P,{path:q.upgrade.path},React.createElement(Kt,null)))},Xt=function(){var e=a((0,s.useState)(!1),2),t=e[0],n=e[1],r=a((0,s.useState)(!0),2);return r[0],r[1],window.onhashchange=function(){window.scrollTo(0,0)},(0,s.useEffect)((function(){setTimeout((function(){n(!0)}),1e3)}),[]),t?React.createElement("div",{className:"app-container font-figtree"},React.createElement(Gt,null)):React.createElement("div",{className:"loading-spinner flex items-center justify-center h-screen",style:{background:"#F9FAFB"}},React.createElement(I.Loader,{icon:null,size:"lg",variant:"primary"}))};r()((function(){var t=document.getElementById("hfe-settings-app");if(t&&(0,e.H)(t).render(React.createElement(Xt,null)),"yes"===hfe_admin_data.show_view_all||window.location.href===hfeSettingsData.header_footer_builder||"yes"===hfeSettingsData.is_hfe_post){var n=document.getElementById("hfe-admin-top-bar-root");if(n){var r=document.createElement("div");r.id="hfe-settings-app",n.appendChild(r),(0,e.H)(r).render(React.createElement(re,null))}}}))})()})();
//# sourceMappingURL=main.js.map

Youez - 2016 - github.com/yon3zu
LinuXploit