@salesforce/ui-design-mode 11.42.1 → 11.42.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring/core/editors/ColorEditor.d.ts.map +1 -1
- package/dist/authoring/core/labels/labels.d.cts +1 -0
- package/dist/authoring/core/labels/labels.d.ts +1 -0
- package/dist/authoring/core/labels/labels.d.ts.map +1 -1
- package/dist/authoring/react/index.js +4 -4
- package/dist/authoring/web-component/index.js +10 -10
- package/dist/protocol/version.cjs +1 -1
- package/dist/protocol/version.js +1 -1
- package/dist/runtime/design-mode-interactions.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var ii=Object.create;var Ga=Object.defineProperty;var si=Object.getOwnPropertyDescriptor;var di=Object.getOwnPropertyNames;var ui=Object.getPrototypeOf,ci=Object.prototype.hasOwnProperty;var fi=(e,t,o)=>t in e?Ga(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var Wt=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(o){throw t=0,o}};var pi=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of di(t))!ci.call(e,r)&&r!==o&&Ga(e,r,{get:()=>t[r],enumerable:!(a=si(t,r))||a.enumerable});return e};var Pn=(e,t,o)=>(o=e!=null?ii(ui(e)):{},pi(t||!e||!e.__esModule?Ga(o,"default",{value:e,enumerable:!0}):o,e));var lt=(e,t,o)=>fi(e,typeof t!="symbol"?t+"":t,o);var Z0=Wt((Xw,A0)=>{"use strict";var A7="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";A0.exports=A7});var U0=Wt((Qw,N0)=>{"use strict";var Z7=Z0();function F0(){}function $0(){}$0.resetWarningCache=F0;N0.exports=function(){function e(a,r,l,n,i,s){if(s!==Z7){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}e.isRequired=e;function t(){return e}var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:$0,resetWarningCache:F0};return o.PropTypes=o,o}});var z0=Wt((eb,q0)=>{q0.exports=U0()();var Jw,Yw});var K0=Wt(xe=>{"use strict";var yl=Symbol.for("react.element"),Ml=Symbol.for("react.portal"),ba=Symbol.for("react.fragment"),Ia=Symbol.for("react.strict_mode"),ya=Symbol.for("react.profiler"),Ma=Symbol.for("react.provider"),Sa=Symbol.for("react.context"),F7=Symbol.for("react.server_context"),Ra=Symbol.for("react.forward_ref"),ka=Symbol.for("react.suspense"),Ha=Symbol.for("react.suspense_list"),Pa=Symbol.for("react.memo"),Ta=Symbol.for("react.lazy"),$7=Symbol.for("react.offscreen"),j0;j0=Symbol.for("react.module.reference");function u1(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case yl:switch(e=e.type,e){case ba:case ya:case Ia:case ka:case Ha:return e;default:switch(e=e&&e.$$typeof,e){case F7:case Sa:case Ra:case Ta:case Pa:case Ma:return e;default:return t}}case Ml:return t}}}xe.ContextConsumer=Sa;xe.ContextProvider=Ma;xe.Element=yl;xe.ForwardRef=Ra;xe.Fragment=ba;xe.Lazy=Ta;xe.Memo=Pa;xe.Portal=Ml;xe.Profiler=ya;xe.StrictMode=Ia;xe.Suspense=ka;xe.SuspenseList=Ha;xe.isAsyncMode=function(){return!1};xe.isConcurrentMode=function(){return!1};xe.isContextConsumer=function(e){return u1(e)===Sa};xe.isContextProvider=function(e){return u1(e)===Ma};xe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===yl};xe.isForwardRef=function(e){return u1(e)===Ra};xe.isFragment=function(e){return u1(e)===ba};xe.isLazy=function(e){return u1(e)===Ta};xe.isMemo=function(e){return u1(e)===Pa};xe.isPortal=function(e){return u1(e)===Ml};xe.isProfiler=function(e){return u1(e)===ya};xe.isStrictMode=function(e){return u1(e)===Ia};xe.isSuspense=function(e){return u1(e)===ka};xe.isSuspenseList=function(e){return u1(e)===Ha};xe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ba||e===ya||e===Ia||e===ka||e===Ha||e===$7||typeof e=="object"&&e!==null&&(e.$$typeof===Ta||e.$$typeof===Pa||e.$$typeof===Ma||e.$$typeof===Sa||e.$$typeof===Ra||e.$$typeof===j0||e.getModuleId!==void 0)};xe.typeOf=u1});var W0=Wt((ob,G0)=>{"use strict";G0.exports=K0()});import{forwardRef as be,createElement as J}from"react";function Ie(e,t){if(e==null)return{};var o={},a=Object.keys(e),r,l;for(l=0;l<a.length;l++)r=a[l],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var Ci=["color"],Tn=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,Ci);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M0 7.5C0 7.22386 0.223858 7 0.5 7H3C3.27614 7 3.5 7.22386 3.5 7.5C3.5 7.77614 3.27614 8 3 8H0.5C0.223858 8 0 7.77614 0 7.5ZM5.75 7.5C5.75 7.22386 5.97386 7 6.25 7H8.75C9.02614 7 9.25 7.22386 9.25 7.5C9.25 7.77614 9.02614 8 8.75 8H6.25C5.97386 8 5.75 7.77614 5.75 7.5ZM12 7C11.7239 7 11.5 7.22386 11.5 7.5C11.5 7.77614 11.7239 8 12 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),mi=["color"],Vn=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,mi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M1.5 6.625C1.01675 6.625 0.625 7.01675 0.625 7.5C0.625 7.98325 1.01675 8.375 1.5 8.375C1.98325 8.375 2.375 7.98325 2.375 7.5C2.375 7.01675 1.98325 6.625 1.5 6.625ZM5.5 6.625C5.01675 6.625 4.625 7.01675 4.625 7.5C4.625 7.98325 5.01675 8.375 5.5 8.375C5.98325 8.375 6.375 7.98325 6.375 7.5C6.375 7.01675 5.98325 6.625 5.5 6.625ZM9.5 6.625C9.01675 6.625 8.625 7.01675 8.625 7.5C8.625 7.98325 9.01675 8.375 9.5 8.375C9.98325 8.375 10.375 7.98325 10.375 7.5C10.375 7.01675 9.98325 6.625 9.5 6.625ZM12.625 7.5C12.625 7.01675 13.0168 6.625 13.5 6.625C13.9832 6.625 14.375 7.01675 14.375 7.5C14.375 7.98325 13.9832 8.375 13.5 8.375C13.0168 8.375 12.625 7.98325 12.625 7.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var hi=["color"],_n=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,hi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M1.25 7.5C1.25 7.22386 1.47386 7 1.75 7H13.25C13.5261 7 13.75 7.22386 13.75 7.5C13.75 7.77614 13.5261 8 13.25 8H1.75C1.47386 8 1.25 7.77614 1.25 7.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var gi=["color"],Dn=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,gi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var vi=["color"],F1=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,vi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var xi=["color"],On=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,xi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M5.67494 3.50017C5.67494 3.25164 5.87641 3.05017 6.12494 3.05017H10.6249C10.8735 3.05017 11.0749 3.25164 11.0749 3.50017C11.0749 3.7487 10.8735 3.95017 10.6249 3.95017H9.00587L7.2309 11.05H8.87493C9.12345 11.05 9.32493 11.2515 9.32493 11.5C9.32493 11.7486 9.12345 11.95 8.87493 11.95H4.37493C4.1264 11.95 3.92493 11.7486 3.92493 11.5C3.92493 11.2515 4.1264 11.05 4.37493 11.05H5.99397L7.76894 3.95017H6.12494C5.87641 3.95017 5.67494 3.7487 5.67494 3.50017Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Li=["color"],En=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,Li);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M4.79993 3.50017C4.79993 3.25164 5.0014 3.05017 5.24993 3.05017H9.74993C9.99845 3.05017 10.1999 3.25164 10.1999 3.50017C10.1999 3.7487 9.99845 3.95017 9.74993 3.95017H8.09993V11.05H9.74994C9.99847 11.05 10.1999 11.2515 10.1999 11.5C10.1999 11.7486 9.99847 11.95 9.74994 11.95H5.24994C5.00141 11.95 4.79994 11.7486 4.79994 11.5C4.79994 11.2515 5.00141 11.05 5.24994 11.05H6.89993V3.95017H5.24993C5.0014 3.95017 4.79993 3.7487 4.79993 3.50017Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),wi=["color"],Bn=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,wi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M2.78233 2.21707C2.70732 2.14206 2.60557 2.09991 2.49949 2.09991C2.3934 2.09991 2.29166 2.14206 2.21664 2.21707L0.216645 4.21707C0.0604351 4.37328 0.0604351 4.62655 0.216645 4.78276C0.372855 4.93897 0.626121 4.93897 0.78233 4.78276L2.09949 3.4656L2.09949 11.5342L0.78233 10.2171C0.62612 10.0609 0.372854 10.0609 0.216645 10.2171C0.0604349 10.3733 0.0604349 10.6265 0.216645 10.7828L2.21664 12.7828C2.29166 12.8578 2.3934 12.8999 2.49949 12.8999C2.60557 12.8999 2.70731 12.8578 2.78233 12.7828L4.78233 10.7828C4.93854 10.6265 4.93854 10.3733 4.78233 10.2171C4.62612 10.0609 4.37285 10.0609 4.21664 10.2171L2.89949 11.5342L2.89949 3.4656L4.21664 4.78276C4.37285 4.93897 4.62612 4.93897 4.78233 4.78276C4.93854 4.62655 4.93854 4.37328 4.78233 4.21707L2.78233 2.21707ZM10.5 2.74997C10.7107 2.74997 10.8988 2.88211 10.9703 3.08036L13.9703 11.3999C14.064 11.6597 13.9293 11.9462 13.6696 12.0399C13.4098 12.1336 13.1233 11.9989 13.0296 11.7392L12.0477 9.016H8.95228L7.97033 11.7392C7.87666 11.9989 7.59013 12.1336 7.33036 12.0399C7.07059 11.9462 6.93595 11.6597 7.02962 11.3999L10.0296 3.08036C10.1011 2.88211 10.2892 2.74997 10.5 2.74997ZM10.5 4.72396L11.7412 8.166H9.25879L10.5 4.72396Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var bi=["color"],An=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,bi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M7.1813 1.68179C7.35704 1.50605 7.64196 1.50605 7.8177 1.68179L10.3177 4.18179C10.4934 4.35753 10.4934 4.64245 10.3177 4.81819C10.142 4.99392 9.85704 4.99392 9.6813 4.81819L7.9495 3.08638L7.9495 11.9136L9.6813 10.1818C9.85704 10.0061 10.142 10.0061 10.3177 10.1818C10.4934 10.3575 10.4934 10.6424 10.3177 10.8182L7.8177 13.3182C7.73331 13.4026 7.61885 13.45 7.4995 13.45C7.38015 13.45 7.26569 13.4026 7.1813 13.3182L4.6813 10.8182C4.50557 10.6424 4.50557 10.3575 4.6813 10.1818C4.85704 10.0061 5.14196 10.0061 5.3177 10.1818L7.0495 11.9136L7.0495 3.08638L5.3177 4.81819C5.14196 4.99392 4.85704 4.99392 4.6813 4.81819C4.50557 4.64245 4.50557 4.35753 4.6813 4.18179L7.1813 1.68179Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Ii=["color"],Zn=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,Ii);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M6.5 1C6.22386 1 6 1.22386 6 1.5C6 1.77614 6.22386 2 6.5 2C7.12671 2 7.45718 2.20028 7.65563 2.47812C7.8781 2.78957 8 3.28837 8 4V11C8 11.7116 7.8781 12.2104 7.65563 12.5219C7.45718 12.7997 7.12671 13 6.5 13C6.22386 13 6 13.2239 6 13.5C6 13.7761 6.22386 14 6.5 14C7.37329 14 8.04282 13.7003 8.46937 13.1031C8.47976 13.0886 8.48997 13.0739 8.5 13.0591C8.51003 13.0739 8.52024 13.0886 8.53063 13.1031C8.95718 13.7003 9.62671 14 10.5 14C10.7761 14 11 13.7761 11 13.5C11 13.2239 10.7761 13 10.5 13C9.87329 13 9.54282 12.7997 9.34437 12.5219C9.1219 12.2104 9 11.7116 9 11V4C9 3.28837 9.1219 2.78957 9.34437 2.47812C9.54282 2.20028 9.87329 2 10.5 2C10.7761 2 11 1.77614 11 1.5C11 1.22386 10.7761 1 10.5 1C9.62671 1 8.95718 1.29972 8.53063 1.89688C8.52024 1.91143 8.51003 1.92611 8.5 1.9409C8.48997 1.92611 8.47976 1.91143 8.46937 1.89688C8.04282 1.29972 7.37329 1 6.5 1ZM14 5H11V4H14C14.5523 4 15 4.44772 15 5V10C15 10.5523 14.5523 11 14 11H11V10H14V5ZM6 4V5H1L1 10H6V11H1C0.447715 11 0 10.5523 0 10V5C0 4.44772 0.447715 4 1 4H6Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var yi=["color"],Fn=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,yi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M3.68979 2.75C3.89667 2.74979 4.08232 2.87701 4.15679 3.07003L7.36662 11.39C7.46602 11.6477 7.33774 11.9371 7.0801 12.0365C6.82247 12.1359 6.53304 12.0076 6.43365 11.75L5.3825 9.02537H2.01133L0.966992 11.749C0.868128 12.0068 0.578964 12.1357 0.321126 12.0369C0.0632878 11.938 -0.0655864 11.6488 0.0332774 11.391L3.22344 3.07099C3.29751 2.87782 3.4829 2.75021 3.68979 2.75ZM3.69174 4.64284L5.05458 8.17537H2.33724L3.69174 4.64284ZM10.8989 5.20703C9.25818 5.20703 8.00915 6.68569 8.00915 8.60972C8.00915 10.6337 9.35818 12.0124 10.8989 12.0124C11.7214 12.0124 12.5744 11.6692 13.1543 11.0219V11.53C13.1543 11.7785 13.3557 11.98 13.6043 11.98C13.8528 11.98 14.0543 11.7785 14.0543 11.53V5.72C14.0543 5.47147 13.8528 5.27 13.6043 5.27C13.3557 5.27 13.1543 5.47147 13.1543 5.72V6.22317C12.6054 5.60095 11.7924 5.20703 10.8989 5.20703ZM13.1543 9.79823V7.30195C12.7639 6.58101 11.9414 6.05757 11.0868 6.05757C10.1088 6.05757 9.03503 6.96581 9.03503 8.60955C9.03503 10.1533 10.0088 11.1615 11.0868 11.1615C11.9701 11.1615 12.7719 10.4952 13.1543 9.79823Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Mi=["color"],$n=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,Mi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M3.69899 5.20703C2.05823 5.20703 0.809204 6.68569 0.809204 8.60972C0.809204 10.6337 2.15823 12.0124 3.69899 12.0124C4.52126 12.0124 5.37402 11.6693 5.9539 11.0223V11.53C5.9539 11.7785 6.15537 11.98 6.4039 11.98C6.65243 11.98 6.8539 11.7785 6.8539 11.53V5.72001C6.8539 5.47149 6.65243 5.27001 6.4039 5.27001C6.15537 5.27001 5.9539 5.47149 5.9539 5.72001V6.22269C5.40506 5.60075 4.59218 5.20703 3.69899 5.20703ZM5.9539 9.799V7.30117C5.56339 6.58064 4.74118 6.05757 3.8868 6.05757C2.9089 6.05757 1.83508 6.96581 1.83508 8.60955C1.83508 10.1533 2.80889 11.1615 3.8868 11.1615C4.76984 11.1615 5.57141 10.4957 5.9539 9.799ZM10.799 5.20703C9.15823 5.20703 7.9092 6.68569 7.9092 8.60972C7.9092 10.6337 9.25823 12.0124 10.799 12.0124C11.6215 12.0124 12.4744 11.6692 13.0543 11.0218V11.53C13.0543 11.7785 13.2558 11.98 13.5043 11.98C13.7529 11.98 13.9543 11.7785 13.9543 11.53V5.72C13.9543 5.47147 13.7529 5.27 13.5043 5.27C13.2558 5.27 13.0543 5.47147 13.0543 5.72V6.22318C12.5055 5.60095 11.6924 5.20703 10.799 5.20703ZM13.0543 9.79822V7.30196C12.664 6.58102 11.8415 6.05757 10.9868 6.05757C10.0089 6.05757 8.93508 6.96581 8.93508 8.60955C8.93508 10.1533 9.90889 11.1615 10.9868 11.1615C11.8702 11.1615 12.672 10.4952 13.0543 9.79822Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Si=["color"],Nn=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,Si);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M3.6255 2.75C3.83478 2.75 4.02192 2.88034 4.09448 3.07664L7.16985 11.3962C7.2656 11.6552 7.13324 11.9428 6.87423 12.0386C6.61522 12.1343 6.32763 12.002 6.23188 11.7429L5.22387 9.01603H2.02712L1.01911 11.7429C0.923362 12.002 0.635774 12.1343 0.376762 12.0386C0.117749 11.9428 -0.0146052 11.6552 0.0811401 11.3962L3.15651 3.07664C3.22908 2.88034 3.41621 2.75 3.6255 2.75ZM3.6255 4.69207L4.90966 8.16603H2.34133L3.6255 4.69207ZM11.3719 2.75C11.5811 2.75 11.7683 2.88034 11.8408 3.07664L14.9162 11.3962C15.012 11.6552 14.8796 11.9428 14.6206 12.0386C14.3616 12.1343 14.074 12.002 13.9782 11.7429L12.9702 9.01603H9.77348L8.76547 11.7429C8.66972 12.002 8.38213 12.1343 8.12312 12.0386C7.86411 11.9428 7.73175 11.6552 7.8275 11.3962L10.9029 3.07664C10.9754 2.88034 11.1626 2.75 11.3719 2.75ZM11.3719 4.69207L12.656 8.16603H10.0877L11.3719 4.69207Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Ri=["color"],Un=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,Ri);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M4.55293 0.999969C4.75295 0.999969 4.93372 1.11917 5.0125 1.30301L8.01106 8.29982C8.11984 8.55363 8.00226 8.84757 7.74844 8.95635C7.49463 9.06512 7.20069 8.94754 7.09191 8.69373L6.11613 6.41685H2.98973L2.01395 8.69373C1.90517 8.94754 1.61123 9.06512 1.35742 8.95635C1.1036 8.84757 0.986023 8.55363 1.0948 8.29982L4.09336 1.30301C4.17214 1.11917 4.35291 0.999969 4.55293 0.999969ZM4.55293 2.76929L5.75186 5.56685H3.354L4.55293 2.76929ZM11.0562 9.00214C11.2617 9.00214 11.4463 8.87633 11.5215 8.68502L14.2733 1.68299C14.3743 1.42598 14.2478 1.13575 13.9908 1.03475C13.7338 0.933747 13.4436 1.06021 13.3426 1.31722L11.0562 7.13514L8.76973 1.31722C8.66873 1.06021 8.3785 0.933747 8.1215 1.03475C7.86449 1.13575 7.73802 1.42598 7.83902 1.68299L10.5908 8.68502C10.666 8.87633 10.8506 9.00214 11.0562 9.00214ZM14.9537 12.4999C14.9537 12.606 14.9115 12.7077 14.8365 12.7828L12.8365 14.7828C12.6803 14.939 12.4271 14.939 12.2708 14.7828C12.1146 14.6265 12.1146 14.3733 12.2708 14.2171L13.588 12.8999H1.51937L2.83653 14.2171C2.99274 14.3733 2.99274 14.6265 2.83653 14.7828C2.68032 14.939 2.42705 14.939 2.27084 14.7828L0.270843 12.7828C0.195828 12.7077 0.153687 12.606 0.153687 12.4999C0.153687 12.3938 0.195828 12.2921 0.270843 12.2171L2.27084 10.2171C2.42705 10.0609 2.68032 10.0609 2.83653 10.2171C2.99274 10.3733 2.99274 10.6265 2.83653 10.7828L1.51937 12.0999L13.588 12.0999L12.2708 10.7828C12.1146 10.6265 12.1146 10.3733 12.2708 10.2171C12.4271 10.0609 12.6803 10.0609 12.8365 10.2171L14.8365 12.2171C14.9115 12.2921 14.9537 12.3938 14.9537 12.4999Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var ki=["color"],qn=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,ki);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M3.78233 2.21713C3.70732 2.14212 3.60557 2.09998 3.49949 2.09998C3.3934 2.09998 3.29166 2.14212 3.21664 2.21713L1.21664 4.21713C1.06044 4.37334 1.06044 4.62661 1.21664 4.78282C1.37285 4.93903 1.62612 4.93903 1.78233 4.78282L3.09949 3.46566L3.09949 11.5343L1.78233 10.2171C1.62612 10.0609 1.37285 10.0609 1.21664 10.2171C1.06043 10.3733 1.06043 10.6266 1.21664 10.7828L3.21664 12.7828C3.29166 12.8578 3.3934 12.9 3.49949 12.9C3.60557 12.9 3.70731 12.8578 3.78233 12.7828L5.78233 10.7828C5.93854 10.6266 5.93854 10.3733 5.78233 10.2171C5.62612 10.0609 5.37285 10.0609 5.21664 10.2171L3.89949 11.5343L3.89949 3.46566L5.21664 4.78282C5.37285 4.93903 5.62612 4.93903 5.78233 4.78282C5.93854 4.62661 5.93854 4.37334 5.78233 4.21713L3.78233 2.21713ZM8.49998 3.99997C8.22383 3.99997 7.99998 4.22382 7.99998 4.49997C7.99998 4.77611 8.22383 4.99997 8.49998 4.99997H14.5C14.7761 4.99997 15 4.77611 15 4.49997C15 4.22382 14.7761 3.99997 14.5 3.99997H8.49998ZM7.99998 7.49997C7.99998 7.22382 8.22383 6.99997 8.49998 6.99997H14.5C14.7761 6.99997 15 7.22382 15 7.49997C15 7.77611 14.7761 7.99997 14.5 7.99997H8.49998C8.22383 7.99997 7.99998 7.77611 7.99998 7.49997ZM8.49998 9.99997C8.22383 9.99997 7.99998 10.2238 7.99998 10.5C7.99998 10.7761 8.22383 11 8.49998 11H14.5C14.7761 11 15 10.7761 15 10.5C15 10.2238 14.7761 9.99997 14.5 9.99997H8.49998Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Hi=["color"],zn=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,Hi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M4.62471 4.00001L4.56402 4.00001C4.04134 3.99993 3.70687 3.99988 3.4182 4.055C2.2379 4.28039 1.29846 5.17053 1.05815 6.33035C0.999538 6.61321 0.999604 6.93998 0.999703 7.43689L0.999711 7.50001L0.999703 7.56313C0.999604 8.06004 0.999538 8.38681 1.05815 8.66967C1.29846 9.8295 2.2379 10.7196 3.4182 10.945C3.70688 11.0001 4.04135 11.0001 4.56403 11L4.62471 11H5.49971C5.77585 11 5.99971 10.7762 5.99971 10.5C5.99971 10.2239 5.77585 10 5.49971 10H4.62471C4.02084 10 3.78907 9.99777 3.60577 9.96277C2.80262 9.8094 2.19157 9.21108 2.03735 8.46678C2.00233 8.29778 1.99971 8.08251 1.99971 7.50001C1.99971 6.91752 2.00233 6.70225 2.03735 6.53324C2.19157 5.78895 2.80262 5.19062 3.60577 5.03725C3.78907 5.00225 4.02084 5.00001 4.62471 5.00001H5.49971C5.77585 5.00001 5.99971 4.77615 5.99971 4.50001C5.99971 4.22387 5.77585 4.00001 5.49971 4.00001H4.62471ZM10.3747 5.00001C10.9786 5.00001 11.2104 5.00225 11.3937 5.03725C12.1968 5.19062 12.8079 5.78895 12.9621 6.53324C12.9971 6.70225 12.9997 6.91752 12.9997 7.50001C12.9997 8.08251 12.9971 8.29778 12.9621 8.46678C12.8079 9.21108 12.1968 9.8094 11.3937 9.96277C11.2104 9.99777 10.9786 10 10.3747 10H9.49971C9.22357 10 8.99971 10.2239 8.99971 10.5C8.99971 10.7762 9.22357 11 9.49971 11H10.3747L10.4354 11C10.9581 11.0001 11.2925 11.0001 11.5812 10.945C12.7615 10.7196 13.701 9.8295 13.9413 8.66967C13.9999 8.38681 13.9998 8.06005 13.9997 7.56314L13.9997 7.50001L13.9997 7.43688C13.9998 6.93998 13.9999 6.61321 13.9413 6.33035C13.701 5.17053 12.7615 4.28039 11.5812 4.055C11.2925 3.99988 10.9581 3.99993 10.4354 4.00001L10.3747 4.00001H9.49971C9.22357 4.00001 8.99971 4.22387 8.99971 4.50001C8.99971 4.77615 9.22357 5.00001 9.49971 5.00001H10.3747ZM5.00038 7C4.72424 7 4.50038 7.22386 4.50038 7.5C4.50038 7.77614 4.72424 8 5.00038 8H10.0004C10.2765 8 10.5004 7.77614 10.5004 7.5C10.5004 7.22386 10.2765 7 10.0004 7H5.00038Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Pi=["color"],jn=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,Pi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M4.56427 3.99988C4.58422 3.99989 4.60445 3.99989 4.62496 3.99989H5.49996C5.7761 3.99989 5.99996 4.22375 5.99996 4.49989C5.99996 4.77603 5.7761 4.99989 5.49996 4.99989H4.62496C4.02108 4.99989 3.78932 5.00213 3.60601 5.03713C2.80287 5.1905 2.19181 5.78883 2.03759 6.53312C2.00257 6.70212 1.99996 6.91739 1.99996 7.49989C1.99996 8.08239 2.00257 8.29766 2.03759 8.46666C2.19181 9.21095 2.80287 9.80928 3.60601 9.96265C3.78932 9.99765 4.02108 9.99989 4.62496 9.99989H5.49996C5.7761 9.99989 5.99996 10.2237 5.99996 10.4999C5.99996 10.776 5.7761 10.9999 5.49996 10.9999H4.62496C4.60445 10.9999 4.58422 10.9999 4.56427 10.9999C4.04159 11 3.70712 11 3.41845 10.9449C2.23814 10.7195 1.29871 9.82937 1.05839 8.66955C0.999782 8.38669 0.999848 8.05992 0.999947 7.56301C0.999951 7.54227 0.999955 7.52123 0.999955 7.49989C0.999955 7.47855 0.999951 7.45751 0.999947 7.43677C0.999848 6.93986 0.999782 6.61309 1.05839 6.33023C1.29871 5.17041 2.23814 4.28027 3.41845 4.05488C3.70712 3.99976 4.04159 3.99981 4.56427 3.99988ZM11.3939 5.03713C11.2106 5.00213 10.9788 4.99989 10.375 4.99989H9.49996C9.22381 4.99989 8.99996 4.77603 8.99996 4.49989C8.99996 4.22375 9.22381 3.99989 9.49996 3.99989H10.375C10.3955 3.99989 10.4157 3.99989 10.4356 3.99988C10.9583 3.99981 11.2928 3.99976 11.5815 4.05488C12.7618 4.28027 13.7012 5.17041 13.9415 6.33023C14.0001 6.61309 14.0001 6.93985 14 7.43676C14 7.4575 14 7.47854 14 7.49989C14 7.52124 14 7.54228 14 7.56302C14.0001 8.05992 14.0001 8.38669 13.9415 8.66955C13.7012 9.82937 12.7618 10.7195 11.5815 10.9449C11.2928 11 10.9583 11 10.4356 10.9999C10.4157 10.9999 10.3955 10.9999 10.375 10.9999H9.49996C9.22381 10.9999 8.99996 10.776 8.99996 10.4999C8.99996 10.2237 9.22381 9.99989 9.49996 9.99989H10.375C10.9788 9.99989 11.2106 9.99765 11.3939 9.96265C12.197 9.80928 12.8081 9.21095 12.9623 8.46666C12.9973 8.29766 13 8.08239 13 7.49989C13 6.91739 12.9973 6.70212 12.9623 6.53312C12.8081 5.78883 12.197 5.1905 11.3939 5.03713Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Ti=["color"],Kn=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,Ti);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M4.85355 2.14645C5.04882 2.34171 5.04882 2.65829 4.85355 2.85355L3.70711 4H9C11.4853 4 13.5 6.01472 13.5 8.5C13.5 10.9853 11.4853 13 9 13H5C4.72386 13 4.5 12.7761 4.5 12.5C4.5 12.2239 4.72386 12 5 12H9C10.933 12 12.5 10.433 12.5 8.5C12.5 6.567 10.933 5 9 5H3.70711L4.85355 6.14645C5.04882 6.34171 5.04882 6.65829 4.85355 6.85355C4.65829 7.04882 4.34171 7.04882 4.14645 6.85355L2.14645 4.85355C1.95118 4.65829 1.95118 4.34171 2.14645 4.14645L4.14645 2.14645C4.34171 1.95118 4.65829 1.95118 4.85355 2.14645Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Vi=["color"],Gn=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,Vi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M5.00003 3.25C5.00003 2.97386 4.77617 2.75 4.50003 2.75C4.22389 2.75 4.00003 2.97386 4.00003 3.25V7.10003H2.49998C2.27906 7.10003 2.09998 7.27912 2.09998 7.50003C2.09998 7.72094 2.27906 7.90003 2.49998 7.90003H4.00003V8.55C4.00003 10.483 5.56703 12.05 7.50003 12.05C9.43303 12.05 11 10.483 11 8.55V7.90003H12.5C12.7209 7.90003 12.9 7.72094 12.9 7.50003C12.9 7.27912 12.7209 7.10003 12.5 7.10003H11V3.25C11 2.97386 10.7762 2.75 10.5 2.75C10.2239 2.75 10 2.97386 10 3.25V7.10003H5.00003V3.25ZM5.00003 7.90003V8.55C5.00003 9.93071 6.11932 11.05 7.50003 11.05C8.88074 11.05 10 9.93071 10 8.55V7.90003H5.00003Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var _i=["color"],Wn=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,_i);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM4 7.5C4 7.22386 4.22386 7 4.5 7H10.5C10.7761 7 11 7.22386 11 7.5C11 7.77614 10.7761 8 10.5 8H4.5C4.22386 8 4 7.77614 4 7.5ZM3 10.5C3 10.2239 3.22386 10 3.5 10H11.5C11.7761 10 12 10.2239 12 10.5C12 10.7761 11.7761 11 11.5 11H3.5C3.22386 11 3 10.7761 3 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Di=["color"],Xn=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,Di);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M2.5 4C2.22386 4 2 4.22386 2 4.5C2 4.77614 2.22386 5 2.5 5H12.5C12.7761 5 13 4.77614 13 4.5C13 4.22386 12.7761 4 12.5 4H2.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Oi=["color"],Qn=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,Oi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H7.5C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H10.5C10.7761 10 11 10.2239 11 10.5C11 10.7761 10.7761 11 10.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Ei=["color"],Jn=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,Ei);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM7 7.5C7 7.22386 7.22386 7 7.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H7.5C7.22386 8 7 7.77614 7 7.5ZM4 10.5C4 10.2239 4.22386 10 4.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H4.5C4.22386 11 4 10.7761 4 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Bi=["color"],Yn=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,Bi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M4 6H11L7.5 10.5L4 6Z",fill:a}))});var Ai=["color"],e9=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,Ai);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M4 9H11L7.5 4.5L4 9Z",fill:a}))});var Zi=["color"],t9=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,Zi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M5.00001 2.75C5.00001 2.47386 4.77615 2.25 4.50001 2.25C4.22387 2.25 4.00001 2.47386 4.00001 2.75V8.05C4.00001 9.983 5.56702 11.55 7.50001 11.55C9.43301 11.55 11 9.983 11 8.05V2.75C11 2.47386 10.7762 2.25 10.5 2.25C10.2239 2.25 10 2.47386 10 2.75V8.05C10 9.43071 8.88072 10.55 7.50001 10.55C6.1193 10.55 5.00001 9.43071 5.00001 8.05V2.75ZM3.49998 13.1001C3.27906 13.1001 3.09998 13.2791 3.09998 13.5001C3.09998 13.721 3.27906 13.9001 3.49998 13.9001H11.5C11.7209 13.9001 11.9 13.721 11.9 13.5001C11.9 13.2791 11.7209 13.1001 11.5 13.1001H3.49998Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Fi=["color"],o9=be(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ie(e,Fi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M4.81812 4.68161C4.99386 4.85734 4.99386 5.14227 4.81812 5.318L3.08632 7.0498H11.9135L10.1817 5.318C10.006 5.14227 10.006 4.85734 10.1817 4.68161C10.3575 4.50587 10.6424 4.50587 10.8181 4.68161L13.3181 7.18161C13.4939 7.35734 13.4939 7.64227 13.3181 7.818L10.8181 10.318C10.6424 10.4937 10.3575 10.4937 10.1817 10.318C10.006 10.1423 10.006 9.85734 10.1817 9.68161L11.9135 7.9498H3.08632L4.81812 9.68161C4.99386 9.85734 4.99386 10.1423 4.81812 10.318C4.64239 10.4937 4.35746 10.4937 4.18173 10.318L1.68173 7.818C1.50599 7.64227 1.50599 7.35734 1.68173 7.18161L4.18173 4.68161C4.35746 4.50587 4.64239 4.50587 4.81812 4.68161Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});import we from"react";import{createRoot as T8}from"react-dom/client";import a9 from"react";import{jsx as Wa,jsxs as r9}from"react/jsx-runtime";function nt({title:e,defaultOpen:t=!0,children:o}){let[a,r]=a9.useState(t),l=a9.useCallback(n=>{r(n.currentTarget.open)},[]);return r9("details",{className:"property-panel-section",open:a,onToggle:l,children:[r9("summary",{className:"property-panel-section-trigger",children:[Wa("span",{children:e}),Wa(Dn,{className:"property-panel-section-chevron",width:12,height:12,"aria-hidden":"true"})]}),Wa("div",{className:"property-panel-section-content",children:o})]})}var l9=["H1","H2","H3","H4","H5","H6","P","SPAN","A","BUTTON","LABEL","DIV"];import C1 from"react";import*as T1 from"react";import{jsx as $i}from"react/jsx-runtime";function Lt(e,t=[]){let o=[];function a(l,n){let i=T1.createContext(n),s=o.length;o=[...o,n];let d=f=>{let{scope:C,children:h,...p}=f,c=C?.[e]?.[s]||i,m=T1.useMemo(()=>p,Object.values(p));return $i(c.Provider,{value:m,children:h})};d.displayName=l+"Provider";function u(f,C){let h=C?.[e]?.[s]||i,p=T1.useContext(h);if(p)return p;if(n!==void 0)return n;throw new Error(`\`${f}\` must be used within \`${l}\``)}return[d,u]}let r=()=>{let l=o.map(n=>T1.createContext(n));return function(i){let s=i?.[e]||l;return T1.useMemo(()=>({[`__scope${e}`]:{...i,[e]:s}}),[i,s])}};return r.scopeName=e,[a,Ni(r,...t)]}function Ni(...e){let t=e[0];if(e.length===1)return t;let o=()=>{let a=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(l){let n=a.reduce((i,{useScope:s,scopeName:d})=>{let f=s(l)[`__scope${d}`];return{...i,...f}},{});return T1.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return o.scopeName=t.scopeName,o}import*as d9 from"react";import*as Gi from"react-dom";import*as De from"react";import*as i9 from"react";function n9(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Xa(...e){return t=>{let o=!1,a=e.map(r=>{let l=n9(r,t);return!o&&typeof l=="function"&&(o=!0),l});if(o)return()=>{for(let r=0;r<a.length;r++){let l=a[r];typeof l=="function"?l():n9(e[r],null)}}}}function Xt(...e){return i9.useCallback(Xa(...e),e)}import{Fragment as pc,jsx as s9}from"react/jsx-runtime";function Qt(e){let t=Ui(e),o=De.forwardRef((a,r)=>{let{children:l,...n}=a,i=De.Children.toArray(l),s=i.find(zi);if(s){let d=s.props.children,u=i.map(f=>f===s?De.Children.count(d)>1?De.Children.only(null):De.isValidElement(d)?d.props.children:null:f);return s9(t,{...n,ref:r,children:De.isValidElement(d)?De.cloneElement(d,void 0,u):null})}return s9(t,{...n,ref:r,children:l})});return o.displayName=`${e}.Slot`,o}function Ui(e){let t=De.forwardRef((o,a)=>{let{children:r,...l}=o;if(De.isValidElement(r)){let n=Ki(r),i=ji(l,r.props);return r.type!==De.Fragment&&(i.ref=a?Xa(a,n):n),De.cloneElement(r,i)}return De.Children.count(r)>1?De.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var qi=Symbol("radix.slottable");function zi(e){return De.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qi}function ji(e,t){let o={...t};for(let a in t){let r=e[a],l=t[a];/^on[A-Z]/.test(a)?r&&l?o[a]=(...i)=>{let s=l(...i);return r(...i),s}:r&&(o[a]=r):a==="style"?o[a]={...r,...l}:a==="className"&&(o[a]=[r,l].filter(Boolean).join(" "))}return{...e,...o}}function Ki(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}import{jsx as Wi}from"react/jsx-runtime";var Xi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$1=Xi.reduce((e,t)=>{let o=Qt(`Primitive.${t}`),a=d9.forwardRef((r,l)=>{let{asChild:n,...i}=r,s=n?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),Wi(s,{...i,ref:l})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});import*as Ee from"react";var vc=!!(typeof window<"u"&&window.document&&window.document.createElement);function V1(e,t,{checkForDefaultPrevented:o=!0}={}){return function(r){if(e?.(r),o===!1||!r.defaultPrevented)return t?.(r)}}import it from"react";import{jsx as Qa}from"react/jsx-runtime";import Hc from"react";import{jsx as Tc}from"react/jsx-runtime";function u9(e){let t=e+"CollectionProvider",[o,a]=Lt(t),[r,l]=o(t,{collectionRef:{current:null},itemMap:new Map}),n=c=>{let{scope:m,children:b}=c,g=it.useRef(null),k=it.useRef(new Map).current;return Qa(r,{scope:m,itemMap:k,collectionRef:g,children:b})};n.displayName=t;let i=e+"CollectionSlot",s=Qt(i),d=it.forwardRef((c,m)=>{let{scope:b,children:g}=c,k=l(i,b),v=Xt(m,k.collectionRef);return Qa(s,{ref:v,children:g})});d.displayName=i;let u=e+"CollectionItemSlot",f="data-radix-collection-item",C=Qt(u),h=it.forwardRef((c,m)=>{let{scope:b,children:g,...k}=c,v=it.useRef(null),_=Xt(m,v),D=l(u,b);return it.useEffect(()=>(D.itemMap.set(v,{ref:v,...k}),()=>{D.itemMap.delete(v)})),Qa(C,{[f]:"",ref:_,children:g})});h.displayName=u;function p(c){let m=l(e+"CollectionConsumer",c);return it.useCallback(()=>{let g=m.collectionRef.current;if(!g)return[];let k=Array.from(g.querySelectorAll(`[${f}]`));return Array.from(m.itemMap.values()).sort((D,U)=>k.indexOf(D.ref.current)-k.indexOf(U.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:n,Slot:d,ItemSlot:h},p,a]}import*as Ja from"react";import*as c9 from"react";var Ho=globalThis?.document?c9.useLayoutEffect:()=>{};var Qi=Ja[" useId ".trim().toString()]||(()=>{}),Ji=0;function f9(e){let[t,o]=Ja.useState(Qi());return Ho(()=>{e||o(a=>a??String(Ji++))},[e]),e||(t?`radix-${t}`:"")}import*as wt from"react";function p9(e){let t=wt.useRef(e);return wt.useEffect(()=>{t.current=e}),wt.useMemo(()=>(...o)=>t.current?.(...o),[])}import*as r1 from"react";import*as Po from"react";var Yi=r1[" useInsertionEffect ".trim().toString()]||Ho;function st({prop:e,defaultProp:t,onChange:o=()=>{},caller:a}){let[r,l,n]=es({defaultProp:t,onChange:o}),i=e!==void 0,s=i?e:r;{let u=r1.useRef(e!==void 0);r1.useEffect(()=>{let f=u.current;f!==i&&console.warn(`${a} is changing from ${f?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=i},[i,a])}let d=r1.useCallback(u=>{if(i){let f=ts(u)?u(e):u;f!==e&&n.current?.(f)}else l(u)},[i,e,l,n]);return[s,d]}function es({defaultProp:e,onChange:t}){let[o,a]=r1.useState(e),r=r1.useRef(o),l=r1.useRef(t);return Yi(()=>{l.current=t},[t]),r1.useEffect(()=>{r.current!==o&&(l.current?.(o),r.current=o)},[o,r]),[o,a,l]}function ts(e){return typeof e=="function"}import*as To from"react";import{jsx as $c}from"react/jsx-runtime";var os=To.createContext(void 0);function Vo(e){let t=To.useContext(os);return e||t||"ltr"}import{jsx as dt}from"react/jsx-runtime";var Ya="rovingFocusGroup.onEntryFocus",as={bubbles:!1,cancelable:!0},Jt="RovingFocusGroup",[er,C9,rs]=u9(Jt),[ls,tr]=Lt(Jt,[rs]),[ns,is]=ls(Jt),m9=Ee.forwardRef((e,t)=>dt(er.Provider,{scope:e.__scopeRovingFocusGroup,children:dt(er.Slot,{scope:e.__scopeRovingFocusGroup,children:dt(ss,{...e,ref:t})})}));m9.displayName=Jt;var ss=Ee.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,orientation:a,loop:r=!1,dir:l,currentTabStopId:n,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:s,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...f}=e,C=Ee.useRef(null),h=Xt(t,C),p=Vo(l),[c,m]=st({prop:n,defaultProp:i??null,onChange:s,caller:Jt}),[b,g]=Ee.useState(!1),k=p9(d),v=C9(o),_=Ee.useRef(!1),[D,U]=Ee.useState(0);return Ee.useEffect(()=>{let M=C.current;if(M)return M.addEventListener(Ya,k),()=>M.removeEventListener(Ya,k)},[k]),dt(ns,{scope:o,orientation:a,dir:p,loop:r,currentTabStopId:c,onItemFocus:Ee.useCallback(M=>m(M),[m]),onItemShiftTab:Ee.useCallback(()=>g(!0),[]),onFocusableItemAdd:Ee.useCallback(()=>U(M=>M+1),[]),onFocusableItemRemove:Ee.useCallback(()=>U(M=>M-1),[]),children:dt($1.div,{tabIndex:b||D===0?-1:0,"data-orientation":a,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:V1(e.onMouseDown,()=>{_.current=!0}),onFocus:V1(e.onFocus,M=>{let O=!_.current;if(M.target===M.currentTarget&&O&&!b){let q=new CustomEvent(Ya,as);if(M.currentTarget.dispatchEvent(q),!q.defaultPrevented){let K=v().filter(x=>x.focusable),X=K.find(x=>x.active),N=K.find(x=>x.id===c),S=[X,N,...K].filter(Boolean).map(x=>x.ref.current);v9(S,u)}}_.current=!1}),onBlur:V1(e.onBlur,()=>g(!1))})})}),h9="RovingFocusGroupItem",g9=Ee.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,focusable:a=!0,active:r=!1,tabStopId:l,children:n,...i}=e,s=f9(),d=l||s,u=is(h9,o),f=u.currentTabStopId===d,C=C9(o),{onFocusableItemAdd:h,onFocusableItemRemove:p,currentTabStopId:c}=u;return Ee.useEffect(()=>{if(a)return h(),()=>p()},[a,h,p]),dt(er.ItemSlot,{scope:o,id:d,focusable:a,active:r,children:dt($1.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:V1(e.onMouseDown,m=>{a?u.onItemFocus(d):m.preventDefault()}),onFocus:V1(e.onFocus,()=>u.onItemFocus(d)),onKeyDown:V1(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){u.onItemShiftTab();return}if(m.target!==m.currentTarget)return;let b=cs(m,u.orientation,u.dir);if(b!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let k=C().filter(v=>v.focusable).map(v=>v.ref.current);if(b==="last")k.reverse();else if(b==="prev"||b==="next"){b==="prev"&&k.reverse();let v=k.indexOf(m.currentTarget);k=u.loop?fs(k,v+1):k.slice(v+1)}setTimeout(()=>v9(k))}}),children:typeof n=="function"?n({isCurrentTabStop:f,hasTabStop:c!=null}):n})})});g9.displayName=h9;var ds={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function us(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function cs(e,t,o){let a=us(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return ds[a]}function v9(e,t=!1){let o=document.activeElement;for(let a of e)if(a===o||(a.focus({preventScroll:t}),document.activeElement!==o))return}function fs(e,t){return e.map((o,a)=>e[(t+a)%e.length])}var x9=m9,L9=g9;import*as w9 from"react";import{jsx as Cs}from"react/jsx-runtime";var b9="Toggle",or=w9.forwardRef((e,t)=>{let{pressed:o,defaultPressed:a,onPressedChange:r,...l}=e,[n,i]=st({prop:o,onChange:r,defaultProp:a??!1,caller:b9});return Cs($1.button,{type:"button","aria-pressed":n,"data-state":n?"on":"off","data-disabled":e.disabled?"":void 0,...l,ref:t,onClick:V1(e.onClick,()=>{e.disabled||i(!n)})})});or.displayName=b9;import{jsx as Ke}from"react/jsx-runtime";var N1="ToggleGroup",[y9,pf]=Lt(N1,[tr]),M9=tr(),ar=C1.forwardRef((e,t)=>{let{type:o,...a}=e;if(o==="single")return Ke(ms,{...a,ref:t});if(o==="multiple")return Ke(hs,{...a,ref:t});throw new Error(`Missing prop \`type\` expected on \`${N1}\``)});ar.displayName=N1;var[S9,R9]=y9(N1),ms=C1.forwardRef((e,t)=>{let{value:o,defaultValue:a,onValueChange:r=()=>{},...l}=e,[n,i]=st({prop:o,defaultProp:a??"",onChange:r,caller:N1});return Ke(S9,{scope:e.__scopeToggleGroup,type:"single",value:C1.useMemo(()=>n?[n]:[],[n]),onItemActivate:i,onItemDeactivate:C1.useCallback(()=>i(""),[i]),children:Ke(k9,{...l,ref:t})})}),hs=C1.forwardRef((e,t)=>{let{value:o,defaultValue:a,onValueChange:r=()=>{},...l}=e,[n,i]=st({prop:o,defaultProp:a??[],onChange:r,caller:N1}),s=C1.useCallback(u=>i((f=[])=>[...f,u]),[i]),d=C1.useCallback(u=>i((f=[])=>f.filter(C=>C!==u)),[i]);return Ke(S9,{scope:e.__scopeToggleGroup,type:"multiple",value:n,onItemActivate:s,onItemDeactivate:d,children:Ke(k9,{...l,ref:t})})});ar.displayName=N1;var[gs,vs]=y9(N1),k9=C1.forwardRef((e,t)=>{let{__scopeToggleGroup:o,disabled:a=!1,rovingFocus:r=!0,orientation:l,dir:n,loop:i=!0,...s}=e,d=M9(o),u=Vo(n),f={role:"group",dir:u,...s};return Ke(gs,{scope:o,rovingFocus:r,disabled:a,children:r?Ke(x9,{asChild:!0,...d,orientation:l,dir:u,loop:i,children:Ke($1.div,{...f,ref:t})}):Ke($1.div,{...f,ref:t})})}),_o="ToggleGroupItem",H9=C1.forwardRef((e,t)=>{let o=R9(_o,e.__scopeToggleGroup),a=vs(_o,e.__scopeToggleGroup),r=M9(e.__scopeToggleGroup),l=o.value.includes(e.value),n=a.disabled||e.disabled,i={...e,pressed:l,disabled:n},s=C1.useRef(null);return a.rovingFocus?Ke(L9,{asChild:!0,...r,focusable:!n,active:l,ref:s,children:Ke(I9,{...i,ref:t})}):Ke(I9,{...i,ref:t})});H9.displayName=_o;var I9=C1.forwardRef((e,t)=>{let{__scopeToggleGroup:o,value:a,...r}=e,l=R9(_o,o),n={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=l.type==="single"?n:void 0;return Ke(or,{...i,...r,ref:t,onPressedChange:s=>{s?l.onItemActivate(a):l.onItemDeactivate(a)}})}),P9=ar,T9=H9;import ys from"react";import{jsx as bs,jsxs as Is}from"react/jsx-runtime";var Ls={border:"none",margin:0,padding:0,minWidth:0},ws={color:"var(--dmp-color-foreground)",fontSize:"var(--dmp-font-size-label)",display:"block",marginBottom:"5px",padding:0};function l1({label:e,id:t,className:o,children:a}){let r=`${t}-legend`;return Is("fieldset",{style:Ls,className:o,"aria-labelledby":r,children:[bs("legend",{id:r,style:ws,children:e}),a]})}import{jsx as rr}from"react/jsx-runtime";function b1({label:e,options:t,value:o,onChange:a,id:r="radio-group"}){let l=ys.useCallback(n=>{n&&typeof a=="function"&&a(n)},[a]);return rr(l1,{label:e,id:r,className:"radioGroupEditor-fieldset",children:rr(P9,{type:"single",value:o,onValueChange:l,className:"radioGroupEditor-root","aria-label":e,children:t.map(n=>rr(T9,{value:n.value,className:"radioGroupEditor-item","aria-label":n.label,title:n.label,children:n.icon??n.label},n.value))})})}import{jsx as Yt}from"react/jsx-runtime";var _9=[{value:"none",labelKey:"none",defaultLabel:"None",icon:Yt(F1,{width:14,height:14})},{value:"solid",labelKey:"solid",defaultLabel:"Solid",icon:Yt(_n,{width:14,height:14})},{value:"dashed",labelKey:"dashed",defaultLabel:"Dashed",icon:Yt(Tn,{width:14,height:14})},{value:"dotted",labelKey:"dotted",defaultLabel:"Dotted",icon:Yt(Vn,{width:14,height:14})}],V9=new Set(_9.map(e=>e.value));function Ms(e){if(!e)return"none";if(V9.has(e))return e;let t=e.split(/\s+/)[0]??"";return V9.has(t)?t:"none"}function D9({label:e="Border Style",value:t,onChange:o,id:a="border-style",optionLabels:r}){let l=_9.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return Yt(b1,{label:e,options:l,value:Ms(t),onChange:o,id:a})}import Ue from"react";function Pe(e,t){return e.replace(/\{(\d+)\}/g,(o,a)=>{let r=t[Number(a)];return r===void 0?o:String(r)})}function e1(e,t){if(t==null||typeof t!="object"||typeof e!="object")return e;let o={...e},a=t;for(let r of Object.keys(o)){let l=o[r],n=a[r];l!==null&&typeof l=="object"&&!Array.isArray(l)?o[r]=e1(l,n):typeof n=="string"&&(o[r]=n)}return o}var O9=[{path:"general.headerTitle"},{path:"general.emptyPlaceholder"},{path:"general.inlineEditEditable"},{path:"general.inlineEditNonEditable"},{path:"general.addToChatContext"},{path:"general.ariaPropertyPanel"},{path:"general.ariaSelectedComponent"},{path:"general.ariaElementStyling"},{path:"general.closePanel"},{path:"sections.imageSource"},{path:"sections.background"},{path:"sections.spacing"},{path:"sections.border"},{path:"sections.typography"},{path:"sections.elementDimensions"},{path:"instances.imageSource"},{path:"instances.backgroundColor"},{path:"instances.padding"},{path:"instances.margin"},{path:"instances.borderRadius"},{path:"instances.borderWeight"},{path:"instances.borderStyle"},{path:"instances.borderColor"},{path:"instances.fontFamily"},{path:"instances.fontSize"},{path:"instances.fontWeight"},{path:"instances.fontStyle"},{path:"instances.textColor"},{path:"instances.textAlignment"},{path:"instances.textFormatting"},{path:"instances.textTransform"},{path:"instances.lineHeight"},{path:"instances.letterSpacing"},{path:"instances.width"},{path:"instances.minWidth"},{path:"instances.maxWidth"},{path:"instances.height"},{path:"instances.minHeight"},{path:"instances.maxHeight"},{path:"instances.overflow"},{path:"editors.image.tabCms"},{path:"editors.image.tabLocal"},{path:"editors.image.tabUrl"},{path:"editors.image.ariaTablist"},{path:"editors.image.clearImage"},{path:"editors.image.chooseFile"},{path:"editors.image.ariaChooseFile"},{path:"editors.image.useThisImage"},{path:"editors.image.ariaImageUrl"},{path:"editors.image.urlPlaceholder"},{path:"editors.image.previewAlt"},{path:"editors.image.altText"},{path:"editors.image.altPlaceholder"},{path:"editors.image.width"},{path:"editors.image.height"},{path:"editors.image.autoPlaceholder"},{path:"editors.image.workspace"},{path:"editors.image.selectWorkspace"},{path:"editors.image.selectImage"},{path:"editors.image.loadingWorkspaces"},{path:"editors.image.noWorkspaces"},{path:"editors.image.loadingImages"},{path:"editors.image.noImages"},{path:"editors.image.loadingMore"},{path:"editors.image.untitled"},{path:"editors.image.downloadingImage"},{path:"editors.image.downloadFailed"},{path:"editors.image.closePicker"},{path:"editors.image.cancel"},{path:"editors.image.done"},{path:"editors.image.pickerTitle",placeholders:[0]},{path:"editors.image.pickerError",placeholders:[0]},{path:"editors.boxDimension.sides.top"},{path:"editors.boxDimension.sides.right"},{path:"editors.boxDimension.sides.bottom"},{path:"editors.boxDimension.sides.left"},{path:"editors.boxDimension.corners.topLeft"},{path:"editors.boxDimension.corners.topRight"},{path:"editors.boxDimension.corners.bottomRight"},{path:"editors.boxDimension.corners.bottomLeft"},{path:"editors.boxDimension.linkSides"},{path:"editors.boxDimension.unlinkSides"},{path:"editors.boxDimension.ariaUnit",placeholders:[0]},{path:"editors.boxDimension.ariaSide",placeholders:[0,1]},{path:"editors.dimension.ariaValue",placeholders:[0]},{path:"editors.dimension.ariaUnit",placeholders:[0]},{path:"editors.color.placeholder"},{path:"editors.color.ariaValue",placeholders:[0]},{path:"editors.color.ariaOpenPicker",placeholders:[0,1]},{path:"editors.color.ariaPicker",placeholders:[0]},{path:"editors.color.ariaSaturation"},{path:"editors.color.ariaEyedropper"},{path:"editors.color.ariaHue"},{path:"editors.color.ariaAlphaSlider"},{path:"editors.color.ariaHex"},{path:"editors.color.ariaChannel",placeholders:[0,1,2,3]},{path:"editors.color.ariaAlphaInput"},{path:"editors.color.ariaFormatCycle",placeholders:[0]},{path:"editors.color.titleFormatCycle"},{path:"editors.color.gradientValue"},{path:"editors.color.imageValue"},{path:"editors.fontWeight.options.thin"},{path:"editors.fontWeight.options.extraLight"},{path:"editors.fontWeight.options.light"},{path:"editors.fontWeight.options.regular"},{path:"editors.fontWeight.options.medium"},{path:"editors.fontWeight.options.semiBold"},{path:"editors.fontWeight.options.bold"},{path:"editors.fontWeight.options.extraBold"},{path:"editors.fontWeight.options.black"},{path:"editors.fontStyle.options.normal"},{path:"editors.fontStyle.options.italic"},{path:"editors.borderStyle.options.none"},{path:"editors.borderStyle.options.solid"},{path:"editors.borderStyle.options.dashed"},{path:"editors.borderStyle.options.dotted"},{path:"editors.overflow.options.visible"},{path:"editors.overflow.options.hidden"},{path:"editors.overflow.options.scroll"},{path:"editors.overflow.options.auto"},{path:"editors.textAlignment.options.left"},{path:"editors.textAlignment.options.center"},{path:"editors.textAlignment.options.right"},{path:"editors.textAlignment.options.justify"},{path:"editors.textDecoration.options.none"},{path:"editors.textDecoration.options.underline"},{path:"editors.textDecoration.options.lineThrough"},{path:"editors.textTransform.options.none"},{path:"editors.textTransform.options.uppercase"},{path:"editors.textTransform.options.lowercase"},{path:"editors.textTransform.options.capitalize"},{path:"editors.picklist.ariaReset",placeholders:[0]},{path:"history.changeLimitTitle"},{path:"history.changeLimitBody",placeholders:[0]}];function Ss(e,t){return t.split(".").reduce((o,a)=>{if(o&&typeof o=="object")return o[a]},e)}function Rs(e){let t=new Set;for(let o of e.matchAll(/\{(\d+)\}/g))t.add(Number(o[1]));return Array.from(t).sort((o,a)=>o-a)}function ks(e){let t=[];if(!e||typeof e!="object")return["labels is not an object"];for(let o of O9){let{path:a,placeholders:r}=o,l=Ss(e,a);if(typeof l!="string"){t.push(`missing or non-string label: ${a}`);continue}if(r){let n=Rs(l),i=[...r].sort((d,u)=>d-u);(n.length!==i.length||n.some((d,u)=>d!==i[u]))&&t.push(`placeholder mismatch at ${a}: expected {${i.join(",")}}, got {${n.join(",")}}`)}}return t}var Do=[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"},{value:"pt",label:"pt"},{value:"vw",label:"vw"},{value:"vh",label:"vh"},{value:"vmin",label:"vmin"},{value:"vmax",label:"vmax"},{value:"ch",label:"ch"},{value:"ex",label:"ex"},{value:"cm",label:"cm"},{value:"mm",label:"mm"},{value:"in",label:"in"},{value:"pc",label:"pc"}],m1={px:{min:0,max:1e4,step:1,decimals:1},em:{min:0,max:100,step:.1,decimals:3},rem:{min:0,max:100,step:.1,decimals:3},"%":{min:0,max:1e3,step:1,decimals:2},pt:{min:0,max:1e4,step:1,decimals:1},vw:{min:0,max:100,step:.1,decimals:1},vh:{min:0,max:100,step:.1,decimals:1},vmin:{min:0,max:100,step:.1,decimals:1},vmax:{min:0,max:100,step:.1,decimals:1},ch:{min:0,max:100,step:.1,decimals:1},ex:{min:0,max:100,step:.1,decimals:1},cm:{min:0,max:100,step:.1,decimals:2},mm:{min:0,max:1e3,step:1,decimals:1},in:{min:0,max:50,step:.01,decimals:2},pc:{min:0,max:500,step:1,decimals:0}},Hs=m1.px??{min:0,max:1e4,step:1,decimals:0};function eo(e){let t=e.map(o=>o.value).join("|");return new RegExp(`^(-?\\d*\\.?\\d+)\\s*(${t})$`)}var Ps=eo(Do);function Ge(e,t="px",o=Ps){if(e==null||e==="")return{numericValue:"",unit:t};let a=String(e).trim();if(a==="")return{numericValue:"",unit:t};let r=a.match(o);if(r&&r[1]!=null&&r[2]!=null)return{numericValue:parseFloat(r[1]),unit:r[2]};let l=parseFloat(a);return isNaN(l)?{numericValue:"",unit:t}:{numericValue:l,unit:t}}function lr(e,t=m1){return t[e]||Hs}function h1(e,t,o=m1){let a=lr(t,o);return Math.min(a.max,Math.max(a.min,e))}function g1(e,t,o=m1){if(e===""||e==null||isNaN(e))return"";let a=lr(t,o);return Number(Number(e).toFixed(a.decimals))}function Oo(e,t){return e===""||e==null||isNaN(e)?"":`${e}${t}`}function Eo(e,t,o,a,r=m1){let l=parseFloat(e)||0,n=lr(a,r),i=o?10:1,s=(t==="ArrowUp"?1:-1)*n.step*i,d=h1(l+s,a,r);return String(g1(d,a,r))}function nr({top:e,right:t,bottom:o,left:a}){return`${e||"0px"} ${t||"0px"} ${o||"0px"} ${a||"0px"}`}function bt(e){let t={top:"",right:"",bottom:"",left:""};if(!e||typeof e!="string")return t;let o=e.trim().split(/\s+/),[a="",r="",l="",n=""]=o;return o.length===0||o.length===1&&a===""?t:o.length===1?{top:a,right:a,bottom:a,left:a}:o.length===2?{top:a,right:r,bottom:a,left:r}:o.length===3?{top:a,right:r,bottom:l,left:r}:{top:a,right:r,bottom:l,left:n}}function n1(...e){return Do.filter(t=>e.includes(t.value))}var I1={width:{units:n1("px","em","rem","vw","ch","%"),icon:o9},minWidth:{units:n1("px","em","rem","vw","ch","%")},maxWidth:{units:n1("px","em","rem","vw","ch","%")},height:{units:n1("px","em","rem","vh","%"),icon:An},minHeight:{units:n1("px","em","rem","vh","%")},maxHeight:{units:n1("px","em","rem","vh","%")},fontSize:{units:n1("px","em","rem","%","pt"),constraints:{...m1,px:{min:0,max:1e3,step:1,decimals:0},"%":{min:0,max:1e3,step:1,decimals:0}},icon:Bn},lineHeight:{units:[{value:"",label:"\xD7"},{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"}],defaultUnit:"",constraints:{"":{min:0,max:10,step:.1,decimals:2},px:{min:0,max:1e3,step:1,decimals:2},em:{min:0,max:100,step:.1,decimals:3},rem:{min:0,max:100,step:.1,decimals:3},"%":{min:0,max:1e3,step:1,decimals:2}},icon:qn},letterSpacing:{units:n1("px","em","rem"),constraints:{...m1,px:{min:-100,max:1e3,step:.5,decimals:1},em:{min:-10,max:100,step:.01,decimals:3},rem:{min:-10,max:100,step:.01,decimals:3}},icon:Un}},to={padding:{units:n1("px","em","rem","%")},margin:{units:n1("px","em","rem","%")},borderRadius:{units:n1("px","em","rem","%"),sideLabelKind:"corners"},borderWidth:{units:n1("px","em","rem")}};import{jsx as v1,jsxs as Bo}from"react/jsx-runtime";var Ts=[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"}],It=["top","right","bottom","left"],Vs={sides:{top:"Top",right:"Right",bottom:"Bottom",left:"Left"},corners:{topLeft:"Top Left",topRight:"Top Right",bottomRight:"Bottom Right",bottomLeft:"Bottom Left"},linkSides:"Link all sides",unlinkSides:"Unlink sides",ariaUnit:"{0} unit",ariaSide:"{0} {1}"};function _s(e,t){return t==="corners"?[e.corners.topLeft,e.corners.topRight,e.corners.bottomRight,e.corners.bottomLeft]:[e.sides.top,e.sides.right,e.sides.bottom,e.sides.left]}var Ds=v1(zn,{width:14,height:14}),Os=v1(jn,{width:14,height:14});function oo(e){return typeof e=="string"&&e.trim().toLowerCase()==="auto"}function ir(e,t,o){let a={top:"",right:"",bottom:"",left:""};for(let r of It){let l=e[r];if(l==null||l==="")a[r]="";else if(oo(l))a[r]="auto";else{let n=Ge(String(l),t,o);a[r]=n.numericValue!==""?String(n.numericValue):""}}return a}function sr(e){let t=e.top||"";return t===(e.right||"")&&t===(e.bottom||"")&&t===(e.left||"")}function E9(e,t,o){for(let a of It){let r=e[a];if(r!=null&&r!==""&&r!=="0"){let l=Ge(String(r),"px",t);if(l.unit&&o.has(l.unit))return l.unit}}return"px"}function Es(e,t,o){if(oo(e))return"auto";let a=parseFloat(e);if(e===""||isNaN(a))return"";let r=h1(a,t,o);return`${g1(r,t,o)}${t}`}function B9(e){if(!e)return"";let t=bt(e);return!t.top&&!t.right&&!t.bottom&&!t.left?"":nr(t)}function ao({label:e,value:t="",onChange:o,id:a="",units:r=Ts,constraints:l=m1,allowAuto:n=!1,sideLabelKind:i="sides",sideIcons:s,placeholder:d="",aria:u}){let f=e1(Vs,u),C=_s(f,i),h=Ue.useRef(o);h.current=o;let p=Ue.useMemo(()=>eo(r),[r]),c=Ue.useMemo(()=>new Set(r.map(S=>S.value)),[r]),m=Ue.useMemo(()=>{let S={top:"",right:"",bottom:"",left:""};if(!d)return S;let x=bt(d),I={...S};for(let w of It){let y=x[w];if(!y)continue;let H=Ge(y,"px",p);H.numericValue!==""&&(I[w]=String(H.numericValue))}return I},[d,p]),b=Ue.useMemo(()=>bt(t),[]),[g,k]=Ue.useState(()=>E9(b,p,c)),[v,_]=Ue.useState(()=>ir(b,g,p)),[D,U]=Ue.useState(()=>sr(v)),M=Ue.useRef(B9(t));Ue.useEffect(()=>{if(t===M.current)return;let S=B9(t);if(S===M.current)return;M.current=S;let x=bt(t),I=E9(x,p,c);k(I);let w=ir(x,I,p);_(w),U(sr(w))},[t,p,c]);let O=Ue.useCallback((S,x)=>{let I={top:"",right:"",bottom:"",left:""},w=!0;for(let H of It)I[H]=Es(S[H],x,l),I[H]!==""&&(w=!1);let y=w?"":nr(I);y!==M.current&&(M.current=y,typeof h.current=="function"&&h.current(y))},[l]),q=Ue.useCallback((S,x)=>{_(D?{top:x,right:x,bottom:x,left:x}:w=>({...w,[S]:x}));let I=Ge(x,g,p);I.numericValue!==""&&I.unit&&c.has(I.unit)&&I.unit!==g&&k(I.unit)},[D,g,p,c]),K=Ue.useCallback((S,x)=>{let I=x.clipboardData.getData("text"),w=Ge(I,g,p);if(w.numericValue!==""&&w.unit&&c.has(w.unit)){x.preventDefault();let y=h1(w.numericValue,w.unit,l),H=String(g1(y,w.unit,l)),A=D?{top:H,right:H,bottom:H,left:H}:{...v,[S]:H};_(A),w.unit!==g&&k(w.unit),O(A,w.unit)}},[D,v,g,p,c,l,O]),X=Ue.useCallback(S=>{let x=v[S];if(x===""){let A=D?{top:"",right:"",bottom:"",left:""}:{...v,[S]:""};_(A),O(A,g);return}if(n&&oo(x)){let A="auto",Z=D?{top:A,right:A,bottom:A,left:A}:{...v,[S]:A};_(Z),O(Z,g);return}let I=parseFloat(x);if(isNaN(I)){let A=bt(M.current);_(ir(A,g,p));return}let w=h1(I,g,l),y=String(g1(w,g,l)),H=D?{top:y,right:y,bottom:y,left:y}:{...v,[S]:y};_(H),O(H,g)},[v,D,g,p,l,O,n]),N=Ue.useCallback((S,x)=>{if(x.key==="Enter"){x.currentTarget.blur();return}if(x.key==="ArrowUp"||x.key==="ArrowDown"){if(oo(v[S]))return;x.preventDefault();let I=Eo(v[S],x.key,x.shiftKey,g,l);if(I===null)return;let w=D?{top:I,right:I,bottom:I,left:I}:{...v,[S]:I};_(w),O(w,g)}},[v,D,g,l,O]),T=Ue.useCallback(S=>{let x=S.target.value;if(!c.has(x))return;k(x);let I={top:"",right:"",bottom:"",left:""};for(let w of It){let y=v[w];if(oo(y))I[w]="auto";else if(y!==""){let H=parseFloat(y);if(isNaN(H))I[w]=y;else{let A=h1(H,x,l);I[w]=String(g1(A,x,l))}}else I[w]=""}_(I),O(I,x)},[v,c,l,O]);return Bo(l1,{label:e,id:a,className:"boxDimensionEditor-fieldset",children:[v1("div",{className:"boxDimensionEditor-header",children:Bo("div",{className:"boxDimensionEditor-controls",children:[v1("button",{type:"button",className:"boxDimensionEditor-link-btn"+(D?" boxDimensionEditor-link-btn--active":""),onClick:()=>{if(!D){let S=v.top;if(!sr(v)){let x={top:S,right:S,bottom:S,left:S};_(x),O(x,g)}}U(S=>!S)},"aria-label":D?f.unlinkSides:f.linkSides,"aria-pressed":D,title:D?f.unlinkSides:f.linkSides,children:D?Ds:Os}),v1("select",{className:"boxDimensionEditor-unit",value:g,onChange:T,"aria-label":Pe(f.ariaUnit,[e]),children:r.map(S=>v1("option",{value:S.value,children:S.label},S.value))})]})}),v1("div",{className:"boxDimensionEditor-grid",children:It.map((S,x)=>{let I=s&&s[x];return Bo("div",{className:"boxDimensionEditor-cell",children:[v1("label",{htmlFor:`${a}-${S}`,className:"boxDimensionEditor-label",children:C[x]}),Bo("div",{className:"boxDimensionEditor-input-row",children:[I&&v1("span",{className:"boxDimensionEditor-input-icon","aria-hidden":"true",children:v1(I,{size:12,width:12,height:12})}),v1("input",{id:`${a}-${S}`,type:"text",className:I?"boxDimensionEditor-input boxDimensionEditor-input--with-icon":"boxDimensionEditor-input",value:v[S],placeholder:m[S],onChange:w=>q(S,w.target.value),onPaste:w=>K(S,w),onBlur:()=>X(S),onKeyDown:w=>N(S,w),"aria-label":Pe(f.ariaSide,[e,C[x]??""]),autoComplete:"off",spellCheck:"false"})]})]},S)})})]})}import{forwardRef as As,createElement as Zs}from"react";var Ao=(...e)=>e.filter((t,o,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===o).join(" ").trim();var A9=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var Z9=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,a)=>a?a.toUpperCase():o.toLowerCase());var dr=e=>{let t=Z9(e);return t.charAt(0).toUpperCase()+t.slice(1)};import{forwardRef as Bs,createElement as N9}from"react";var F9={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"};var $9=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var U9=Bs(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:r="",children:l,iconNode:n,...i},s)=>N9("svg",{ref:s,...F9,width:t,height:t,stroke:e,strokeWidth:a?Number(o)*24/Number(t):o,className:Ao("lucide",r),...!l&&!$9(i)&&{"aria-hidden":"true"},...i},[...n.map(([d,u])=>N9(d,u)),...Array.isArray(l)?l:[l]]));var q9=(e,t)=>{let o=As(({className:a,...r},l)=>Zs(U9,{ref:l,iconNode:t,className:Ao(`lucide-${A9(dr(e))}`,`lucide-${e}`,a),...r}));return o.displayName=dr(e),o};var Fs=[["path",{d:"m12 9-8.414 8.414A2 2 0 0 0 3 18.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 3.828 21h1.344a2 2 0 0 0 1.414-.586L15 12",key:"1y3wsu"}],["path",{d:"m18 9 .4.4a1 1 0 1 1-3 3l-3.8-3.8a1 1 0 1 1 3-3l.4.4 3.4-3.4a1 1 0 1 1 3 3z",key:"110lr1"}],["path",{d:"m2 22 .414-.414",key:"jhxm08"}]],ro=q9("pipette",Fs);import Re from"react";import{useRef as No,useCallback as Ne,useEffect as gr,useMemo as Uo,useState as vr,createContext as $s,useContext as Ns}from"react";var z9={exports:{}},lo={};var j9;function Us(){if(j9)return lo;j9=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function o(a,r,l){var n=null;if(l!==void 0&&(n=""+l),r.key!==void 0&&(n=""+r.key),"key"in r){l={};for(var i in r)i!=="key"&&(l[i]=r[i])}else l=r;return r=l.ref,{$$typeof:e,type:a,key:n,ref:r!==void 0?r:null,props:l}}return lo.Fragment=t,lo.jsx=o,lo.jsxs=o,lo}var K9;function qs(){return K9||(K9=1,z9.exports=Us()),z9.exports}var Te=qs();function o2(e){var t,o,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(o=o2(e[t]))&&(a&&(a+=" "),a+=o)}else for(o in e)e[o]&&(a&&(a+=" "),a+=o);return a}function zs(){for(var e,t,o=0,a="",r=arguments.length;o<r;o++)(e=arguments[o])&&(t=o2(e))&&(a&&(a+=" "),a+=t);return a}var xr="-",js=e=>{let t=Gs(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:r=>{let l=r.split(xr);return l[0]===""&&l.length!==1&&l.shift(),a2(l,t)||Ks(r)},getConflictingClassGroupIds:(r,l)=>{let n=o[r]||[];return l&&a[r]?[...n,...a[r]]:n}}},a2=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),r=a?a2(e.slice(1),a):void 0;if(r)return r;if(t.validators.length===0)return;let l=e.join(xr);return t.validators.find(({validator:n})=>n(l))?.classGroupId},G9=/^\[(.+)\]$/,Ks=e=>{if(G9.test(e)){let t=G9.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Gs=e=>{let{theme:t,classGroups:o}=e,a={nextPart:new Map,validators:[]};for(let r in o)fr(o[r],a,r,t);return a},fr=(e,t,o,a)=>{e.forEach(r=>{if(typeof r=="string"){let l=r===""?t:W9(t,r);l.classGroupId=o;return}if(typeof r=="function"){if(Ws(r)){fr(r(a),t,o,a);return}t.validators.push({validator:r,classGroupId:o});return}Object.entries(r).forEach(([l,n])=>{fr(n,W9(t,l),o,a)})})},W9=(e,t)=>{let o=e;return t.split(xr).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},Ws=e=>e.isThemeGetter,Xs=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,r=(l,n)=>{o.set(l,n),t++,t>e&&(t=0,a=o,o=new Map)};return{get(l){let n=o.get(l);if(n!==void 0)return n;if((n=a.get(l))!==void 0)return r(l,n),n},set(l,n){o.has(l)?o.set(l,n):r(l,n)}}},pr="!",Cr=":",Qs=Cr.length,Js=e=>{let{prefix:t,experimentalParseClassName:o}=e,a=r=>{let l=[],n=0,i=0,s=0,d;for(let p=0;p<r.length;p++){let c=r[p];if(n===0&&i===0){if(c===Cr){l.push(r.slice(s,p)),s=p+Qs;continue}if(c==="/"){d=p;continue}}c==="["?n++:c==="]"?n--:c==="("?i++:c===")"&&i--}let u=l.length===0?r:r.substring(s),f=Ys(u),C=f!==u,h=d&&d>s?d-s:void 0;return{modifiers:l,hasImportantModifier:C,baseClassName:f,maybePostfixModifierPosition:h}};if(t){let r=t+Cr,l=a;a=n=>n.startsWith(r)?l(n.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:n,maybePostfixModifierPosition:void 0}}if(o){let r=a;a=l=>o({className:l,parseClassName:r})}return a},Ys=e=>e.endsWith(pr)?e.substring(0,e.length-1):e.startsWith(pr)?e.substring(1):e,e3=e=>{let t=Object.fromEntries(e.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;let a=[],r=[];return o.forEach(l=>{l[0]==="["||t[l]?(a.push(...r.sort(),l),r=[]):r.push(l)}),a.push(...r.sort()),a}},t3=e=>({cache:Xs(e.cacheSize),parseClassName:Js(e),sortModifiers:e3(e),...js(e)}),o3=/\s+/,a3=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:r,sortModifiers:l}=t,n=[],i=e.trim().split(o3),s="";for(let d=i.length-1;d>=0;d-=1){let u=i[d],{isExternal:f,modifiers:C,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:c}=o(u);if(f){s=u+(s.length>0?" "+s:s);continue}let m=!!c,b=a(m?p.substring(0,c):p);if(!b){if(!m){s=u+(s.length>0?" "+s:s);continue}if(b=a(p),!b){s=u+(s.length>0?" "+s:s);continue}m=!1}let g=l(C).join(":"),k=h?g+pr:g,v=k+b;if(n.includes(v))continue;n.push(v);let _=r(b,m);for(let D=0;D<_.length;++D){let U=_[D];n.push(k+U)}s=u+(s.length>0?" "+s:s)}return s};function r3(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=r2(t))&&(a&&(a+=" "),a+=o);return a}var r2=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=r2(e[a]))&&(o&&(o+=" "),o+=t);return o};function l3(e,...t){let o,a,r,l=n;function n(s){let d=t.reduce((u,f)=>f(u),e());return o=t3(d),a=o.cache.get,r=o.cache.set,l=i,i(s)}function i(s){let d=a(s);if(d)return d;let u=a3(s,o);return r(s,u),u}return function(){return l(r3.apply(null,arguments))}}var Oe=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},l2=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,n2=/^\((?:(\w[\w-]*):)?(.+)\)$/i,n3=/^\d+\/\d+$/,i3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,s3=/\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$/,d3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,u3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,c3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yt=e=>n3.test(e),ie=e=>!!e&&!Number.isNaN(Number(e)),U1=e=>!!e&&Number.isInteger(Number(e)),ur=e=>e.endsWith("%")&&ie(e.slice(0,-1)),_1=e=>i3.test(e),f3=()=>!0,p3=e=>s3.test(e)&&!d3.test(e),i2=()=>!1,C3=e=>u3.test(e),m3=e=>c3.test(e),h3=e=>!z(e)&&!j(e),g3=e=>Mt(e,u2,i2),z=e=>l2.test(e),ut=e=>Mt(e,c2,p3),cr=e=>Mt(e,b3,ie),X9=e=>Mt(e,s2,i2),v3=e=>Mt(e,d2,m3),Zo=e=>Mt(e,f2,C3),j=e=>n2.test(e),no=e=>St(e,c2),x3=e=>St(e,I3),Q9=e=>St(e,s2),L3=e=>St(e,u2),w3=e=>St(e,d2),Fo=e=>St(e,f2,!0),Mt=(e,t,o)=>{let a=l2.exec(e);return a?a[1]?t(a[1]):o(a[2]):!1},St=(e,t,o=!1)=>{let a=n2.exec(e);return a?a[1]?t(a[1]):o:!1},s2=e=>e==="position"||e==="percentage",d2=e=>e==="image"||e==="url",u2=e=>e==="length"||e==="size"||e==="bg-size",c2=e=>e==="length",b3=e=>e==="number",I3=e=>e==="family-name",f2=e=>e==="shadow",y3=()=>{let e=Oe("color"),t=Oe("font"),o=Oe("text"),a=Oe("font-weight"),r=Oe("tracking"),l=Oe("leading"),n=Oe("breakpoint"),i=Oe("container"),s=Oe("spacing"),d=Oe("radius"),u=Oe("shadow"),f=Oe("inset-shadow"),C=Oe("text-shadow"),h=Oe("drop-shadow"),p=Oe("blur"),c=Oe("perspective"),m=Oe("aspect"),b=Oe("ease"),g=Oe("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...v(),j,z],D=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto","contain","none"],M=()=>[j,z,s],O=()=>[yt,"full","auto",...M()],q=()=>[U1,"none","subgrid",j,z],K=()=>["auto",{span:["full",U1,j,z]},U1,j,z],X=()=>[U1,"auto",j,z],N=()=>["auto","min","max","fr",j,z],T=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],S=()=>["start","end","center","stretch","center-safe","end-safe"],x=()=>["auto",...M()],I=()=>[yt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],w=()=>[e,j,z],y=()=>[...v(),Q9,X9,{position:[j,z]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",L3,g3,{size:[j,z]}],Z=()=>[ur,no,ut],W=()=>["","none","full",d,j,z],B=()=>["",ie,no,ut],$=()=>["solid","dashed","dotted","double"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>[ie,ur,Q9,X9],L=()=>["","none",p,j,z],P=()=>["none",ie,j,z],G=()=>["none",ie,j,z],ae=()=>[ie,j,z],ue=()=>[yt,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[_1],breakpoint:[_1],color:[f3],container:[_1],"drop-shadow":[_1],ease:["in","out","in-out"],font:[h3],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[_1],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[_1],shadow:[_1],spacing:["px",ie],text:[_1],"text-shadow":[_1],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",yt,z,j,m]}],container:["container"],columns:[{columns:[ie,z,j,i]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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"],sr:["sr-only","not-sr-only"],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:_()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{start:O()}],end:[{end:O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[U1,"auto",j,z]}],basis:[{basis:[yt,"full","auto",i,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ie,yt,"auto","initial","none",z]}],grow:[{grow:["",ie,j,z]}],shrink:[{shrink:["",ie,j,z]}],order:[{order:[U1,"first","last","none",j,z]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:K()}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:K()}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...T(),"normal"]}],"justify-items":[{"justify-items":[...S(),"normal"]}],"justify-self":[{"justify-self":["auto",...S()]}],"align-content":[{content:["normal",...T()]}],"align-items":[{items:[...S(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...S(),{baseline:["","last"]}]}],"place-content":[{"place-content":T()}],"place-items":[{"place-items":[...S(),"baseline"]}],"place-self":[{"place-self":["auto",...S()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:x()}],mx:[{mx:x()}],my:[{my:x()}],ms:[{ms:x()}],me:[{me:x()}],mt:[{mt:x()}],mr:[{mr:x()}],mb:[{mb:x()}],ml:[{ml:x()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],w:[{w:[i,"screen",...I()]}],"min-w":[{"min-w":[i,"screen","none",...I()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[n]},...I()]}],h:[{h:["screen","lh",...I()]}],"min-h":[{"min-h":["screen","lh","none",...I()]}],"max-h":[{"max-h":["screen","lh",...I()]}],"font-size":[{text:["base",o,no,ut]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,j,cr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ur,z]}],"font-family":[{font:[x3,z,t]}],"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-fractions"],tracking:[{tracking:[r,j,z]}],"line-clamp":[{"line-clamp":[ie,"none",j,cr]}],leading:[{leading:[l,...M()]}],"list-image":[{"list-image":["none",j,z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",j,z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:w()}],"text-color":[{text:w()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:[ie,"from-font","auto",j,ut]}],"text-decoration-color":[{decoration:w()}],"underline-offset":[{"underline-offset":[ie,"auto",j,z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",j,z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",j,z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:y()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},U1,j,z],radial:["",j,z],conic:[U1,j,z]},w3,v3]}],"bg-color":[{bg:w()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:w()}],"gradient-via":[{via:w()}],"gradient-to":[{to:w()}],rounded:[{rounded:W()}],"rounded-s":[{"rounded-s":W()}],"rounded-e":[{"rounded-e":W()}],"rounded-t":[{"rounded-t":W()}],"rounded-r":[{"rounded-r":W()}],"rounded-b":[{"rounded-b":W()}],"rounded-l":[{"rounded-l":W()}],"rounded-ss":[{"rounded-ss":W()}],"rounded-se":[{"rounded-se":W()}],"rounded-ee":[{"rounded-ee":W()}],"rounded-es":[{"rounded-es":W()}],"rounded-tl":[{"rounded-tl":W()}],"rounded-tr":[{"rounded-tr":W()}],"rounded-br":[{"rounded-br":W()}],"rounded-bl":[{"rounded-bl":W()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...$(),"hidden","none"]}],"divide-style":[{divide:[...$(),"hidden","none"]}],"border-color":[{border:w()}],"border-color-x":[{"border-x":w()}],"border-color-y":[{"border-y":w()}],"border-color-s":[{"border-s":w()}],"border-color-e":[{"border-e":w()}],"border-color-t":[{"border-t":w()}],"border-color-r":[{"border-r":w()}],"border-color-b":[{"border-b":w()}],"border-color-l":[{"border-l":w()}],"divide-color":[{divide:w()}],"outline-style":[{outline:[...$(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ie,j,z]}],"outline-w":[{outline:["",ie,no,ut]}],"outline-color":[{outline:w()}],shadow:[{shadow:["","none",u,Fo,Zo]}],"shadow-color":[{shadow:w()}],"inset-shadow":[{"inset-shadow":["none",f,Fo,Zo]}],"inset-shadow-color":[{"inset-shadow":w()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:w()}],"ring-offset-w":[{"ring-offset":[ie,ut]}],"ring-offset-color":[{"ring-offset":w()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":w()}],"text-shadow":[{"text-shadow":["none",C,Fo,Zo]}],"text-shadow-color":[{"text-shadow":w()}],opacity:[{opacity:[ie,j,z]}],"mix-blend":[{"mix-blend":[...F(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":F()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ie]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":w()}],"mask-image-linear-to-color":[{"mask-linear-to":w()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":w()}],"mask-image-t-to-color":[{"mask-t-to":w()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":w()}],"mask-image-r-to-color":[{"mask-r-to":w()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":w()}],"mask-image-b-to-color":[{"mask-b-to":w()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":w()}],"mask-image-l-to-color":[{"mask-l-to":w()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":w()}],"mask-image-x-to-color":[{"mask-x-to":w()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":w()}],"mask-image-y-to-color":[{"mask-y-to":w()}],"mask-image-radial":[{"mask-radial":[j,z]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":w()}],"mask-image-radial-to-color":[{"mask-radial-to":w()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":v()}],"mask-image-conic-pos":[{"mask-conic":[ie]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":w()}],"mask-image-conic-to-color":[{"mask-conic-to":w()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:y()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",j,z]}],filter:[{filter:["","none",j,z]}],blur:[{blur:L()}],brightness:[{brightness:[ie,j,z]}],contrast:[{contrast:[ie,j,z]}],"drop-shadow":[{"drop-shadow":["","none",h,Fo,Zo]}],"drop-shadow-color":[{"drop-shadow":w()}],grayscale:[{grayscale:["",ie,j,z]}],"hue-rotate":[{"hue-rotate":[ie,j,z]}],invert:[{invert:["",ie,j,z]}],saturate:[{saturate:[ie,j,z]}],sepia:[{sepia:["",ie,j,z]}],"backdrop-filter":[{"backdrop-filter":["","none",j,z]}],"backdrop-blur":[{"backdrop-blur":L()}],"backdrop-brightness":[{"backdrop-brightness":[ie,j,z]}],"backdrop-contrast":[{"backdrop-contrast":[ie,j,z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ie,j,z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ie,j,z]}],"backdrop-invert":[{"backdrop-invert":["",ie,j,z]}],"backdrop-opacity":[{"backdrop-opacity":[ie,j,z]}],"backdrop-saturate":[{"backdrop-saturate":[ie,j,z]}],"backdrop-sepia":[{"backdrop-sepia":["",ie,j,z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",j,z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ie,"initial",j,z]}],ease:[{ease:["linear","initial",b,j,z]}],delay:[{delay:[ie,j,z]}],animate:[{animate:["none",g,j,z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[c,j,z]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:P()}],"rotate-x":[{"rotate-x":P()}],"rotate-y":[{"rotate-y":P()}],"rotate-z":[{"rotate-z":P()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":["scale-3d"],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[j,z,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":["translate-none"],accent:[{accent:w()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:w()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",j,z]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",j,z]}],fill:[{fill:["none",...w()]}],"stroke-w":[{stroke:[ie,no,ut,cr]}],stroke:[{stroke:["none",...w()]}],"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-x","border-w-y","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-x","border-color-y","border-color-s","border-color-e","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},M3=l3(y3),S3=(e,t,o)=>Math.min(Math.max(e,t),o),$o=e=>Math.round(S3(e,0,255)),p2=e=>{let t=e.replace("#",""),o=parseInt(t,16);return{r:o>>16&255,g:o>>8&255,b:o&255}},R3=({r:e,g:t,b:o})=>{let a=r=>$o(r).toString(16).padStart(2,"0");return`#${a(e)}${a(t)}${a(o)}`},mr=({h:e,s:t,v:o})=>{e=e/360,t=t/100,o=o/100;let a=Math.floor(e*6),r=e*6-a,l=o*(1-t),n=o*(1-r*t),i=o*(1-(1-r)*t),s,d,u;switch(a%6){case 0:s=o,d=i,u=l;break;case 1:s=n,d=o,u=l;break;case 2:s=l,d=o,u=i;break;case 3:s=l,d=n,u=o;break;case 4:s=i,d=l,u=o;break;case 5:s=o,d=l,u=n;break;default:s=d=u=0}return{r:$o(s*255),g:$o(d*255),b:$o(u*255)}},hr=({r:e,g:t,b:o})=>{e/=255,t/=255,o/=255;let a=Math.max(e,t,o),r=Math.min(e,t,o),l=a-r,n=0,i=a===0?0:l/a,s=a;if(l!==0)switch(a){case e:n=((t-o)/l+(t<o?6:0))/6;break;case t:n=((o-e)/l+2)/6;break;case o:n=((e-t)/l+4)/6;break}return{h:Math.round(n*360),s:Math.round(i*100),v:Math.round(s*100)}},k3=e=>R3(mr(e)),H3=e=>hr(p2(e));var J9=({h:e,s:t,v:o})=>{let a=o*(2-t/100)/2,r=a!==0&&a!==100?(o-a)/Math.min(a,100-a)*100:0;return{h:e,s:Math.round(r),l:Math.round(a)}},Y9=({h:e,s:t,l:o})=>{let a=o+t*Math.min(o,100-o)/100,r=a===0?0:2*(1-o/a)*100;return{h:e,s:Math.round(r),v:Math.round(a)}},P3=e=>{let{r:t,g:o,b:a}=p2(e);return(.299*t+.587*o+.114*a)/255>.5?"#000000":"#ffffff"};var T3=(e,t="hex")=>{switch(t){case"hex":return e.getHex();case"rgb":let o=e.getRgb();return`rgb(${o.r}, ${o.g}, ${o.b})`;case"rgba":let a=e.getRgba();return`rgba(${a.r}, ${a.g}, ${a.b}, ${a.a})`;case"hsl":let r=e.getHsl();return`hsl(${r.h}, ${r.s}%, ${r.l}%)`;case"hsla":let l=e.getHsla();return`hsla(${l.h}, ${l.s}%, ${l.l}%, ${l.a})`;default:qo()}};function V3(e){switch(e.type){case"hex":return{...H3(e.value),a:1};case"rgb":return{...hr(e),a:1};case"rgba":return{...hr(e),a:e.a};case"hsl":return{...Y9(e),a:1};case"hsla":return{...Y9(e),a:1};case"hsv":return{...e,a:1};case"hsva":return{...e};default:qo()}}function q1(e,t){let o=V3(e);switch(t){case"hex":return k3(o);case"rgb":return mr(o);case"rgba":return{...mr(o),a:o.a};case"hsl":return J9(o);case"hsla":return{...J9(o),a:o.a};case"hsv":return{h:o.h,s:o.s,v:o.v};case"hsva":return o;default:qo()}}var ct=(...e)=>M3(zs(e)),D1=(e,t,o)=>Math.min(Math.max(e,t),o),z1=e=>Math.round(e);function qo(e){throw new Error("You should never get here.")}var j1=class e{constructor(t){this.colorInput=t,typeof t=="string"?this.color={type:"hex",value:t}:"type"in t?this.color=t:"r"in t?"a"in t?this.color={type:"rgba",...t}:this.color={type:"rgb",...t}:"v"in t?"a"in t?this.color={type:"hsva",...t}:this.color={type:"hsv",...t}:"a"in t?this.color={type:"hsla",...t}:this.color={type:"hsl",...t}}getRgb(){return q1(this.color,"rgb")}getHsv(){return q1(this.color,"hsv")}getHsla(){return q1(this.color,"hsla")}getHsva(){return q1(this.color,"hsva")}getHex(){return q1(this.color,"hex")}getHsl(){return q1(this.color,"hsl")}getRgba(){return q1(this.color,"rgba")}format(t="hex"){return T3(this,t)}getContrastingColor(){return new e({type:"hex",value:P3(this.getHex())})}},e2=(e,t)=>{let o=e.getBoundingClientRect(),a,r;if("touches"in t){let d=t.touches[0]||t.changedTouches[0];a=d.clientX,r=d.clientY}else a=t.clientX,r=t.clientY;let l=a-o.left,n=r-o.top,i=D1(l/o.width,0,1),s=D1(n/o.height,0,1);return{left:i,top:s}},Lr=({onMove:e,onMoveEnd:t,onKey:o,children:a,className:r,...l})=>{let n=No(null),i=No(!1),s=Ne(C=>{!i.current||!n.current||(C.preventDefault(),e(e2(n.current,C)))},[e]),d=Ne(()=>{i.current=!1,t(),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",d),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",d)},[s,t]),u=Ne(C=>{let h=n.current;h&&(C.preventDefault(),i.current=!0,e(e2(h,C.nativeEvent)),document.addEventListener("mousemove",s),document.addEventListener("mouseup",d),document.addEventListener("touchmove",s,{passive:!1}),document.addEventListener("touchend",d))},[e,s,d]),f=Ne(C=>{if(!o)return;let h=C.which||C.keyCode;h<37||h>40||(C.preventDefault(),o({left:h===39?.05:h===37?-.05:0,top:h===40?.05:h===38?-.05:0}))},[o]);return gr(()=>()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",d),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",d)},[s,d]),Te.jsx("div",{ref:n,className:ct("rounded-inherit absolute inset-0 touch-none outline-none","focus:[&_.react-colorful-pointer]:scale-110",r),onTouchStart:u,onMouseDown:u,onKeyDown:f,tabIndex:0,role:"slider",...l,children:a})},wr=({className:e,top:t=.5,left:o,color:a})=>Te.jsx("div",{className:ct("absolute z-[1] h-6 w-6 -translate-x-1/2 -translate-y-1/2 cursor-grab rounded-full border-2 border-white bg-white active:cursor-grabbing","react-colorful-pointer shadow-[0_2px_8px_rgba(0,0,0,0.15)] transition-transform",e),style:{top:`${t*100}%`,left:`${o*100}%`}}),_3=({hsva:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=Ne(s=>{t({a:s.left},!1)},[t]),l=Ne(s=>{t({a:D1(e.a+s.left,0,1)},!0)},[e.a,t]),n=Uo(()=>new j1({type:"hsva",h:e.h,s:e.s,v:e.v,a:0}).format("hsla"),[e.h,e.s,e.v]),i=Uo(()=>new j1({type:"hsva",h:e.h,s:e.s,v:e.v,a:1}).format("hsla"),[e.h,e.s,e.v]);return Te.jsx("div",{className:ct("relative h-full w-full",o),children:Te.jsxs(Lr,{onMove:r,onMoveEnd:a,onKey:l,"aria-label":"Alpha","aria-valuetext":`${z1(e.a*100)}%`,"aria-valuenow":z1(e.a*100),"aria-valuemin":0,"aria-valuemax":100,className:"h-full w-full rounded-lg",children:[Te.jsx("div",{className:"absolute inset-0 rounded-lg bg-white",style:{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><rect x="8" width="8" height="8"/><rect y="8" width="8" height="8"/></svg>')`}}),Te.jsx("div",{className:"absolute inset-0 rounded-lg",style:{backgroundImage:`linear-gradient(90deg, ${n}, ${i})`}}),Te.jsx(wr,{className:"z-[1]",top:.5,left:e.a,color:""})]})})},D3=({hue:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=Ne(n=>{let i=z1(D1(360*n.left,0,360));t({h:i},!1)},[t]),l=Ne(n=>{t({h:D1(e+n.left*360,0,360)},!0)},[e,t]);return Te.jsx("div",{className:ct("relative h-full w-full",o),children:Te.jsxs(Lr,{onMove:r,onMoveEnd:a,onKey:l,"aria-label":"Hue","aria-valuenow":z1(e),"aria-valuemax":360,"aria-valuemin":0,className:"h-full w-full rounded-lg",children:[Te.jsx("div",{className:"absolute inset-0 rounded-lg",style:{background:"linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)"}}),Te.jsx(wr,{className:"z-[2]",top:.5,left:e/360,color:""})]})})},O3=({hsva:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=Ne(i=>{let s=z1(D1(i.left*100,0,100)),d=z1(D1(100-i.top*100,0,100));t({s,v:d},!1)},[t]),l=Ne(i=>{t({s:D1(e.s+i.left*100,0,100),v:D1(e.v-i.top*100,0,100)},!0)},[e.s,e.v,t]),n=`hsl(${e.h}, 100%, 50%)`;return Te.jsx("div",{className:ct("relative h-full w-full rounded-xl",o),children:Te.jsxs(Lr,{onMove:r,onMoveEnd:a,onKey:l,"aria-label":"Color","aria-valuetext":`Saturation ${z1(e.s)}%, Brightness ${z1(e.v)}%`,className:"rounded-inherit h-full w-full",children:[Te.jsx("div",{className:"rounded-inherit absolute inset-0 rounded-b-none",style:{backgroundColor:n,backgroundImage:"linear-gradient(to top, #000, rgba(0, 0, 0, 0)), linear-gradient(to right, #fff, rgba(255, 255, 255, 0))",boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.05)"}}),Te.jsx(wr,{className:"z-[3]",top:1-e.v/100,left:e.s/100,color:""})]})})},C2=$s(null),zo=()=>{let e=Ns(C2);if(!e)throw new Error("ColorPicker compound components must be used within a ColorPicker");return e};function t2(e){return"type"in e?new j1(e):e}var E3=({color:e,onChange:t,className:o,children:a,defaultColor:r,...l})=>{let[n,i]=vr(t2(e??r??{h:340,s:58,v:100,a:1,type:"hsva"})),s=No(!1),d=No(n);gr(()=>{!s.current&&e&&(d.current=t2(e),i(d.current))},[e]);let u=Ne((p,c)=>{let m=new j1({type:"hsva",...d.current.getHsva(),...p});d.current=m,i(m),s.current=!c,t?.(m)},[t]),f=Ne(()=>{s.current=!1},[]),C=Ne(async()=>{if(!("EyeDropper"in window)){console.log("EyeDropper API not supported");return}try{let p=await new window.EyeDropper().open();p.sRGBHex&&u(q1({type:"hex",value:p.sRGBHex},"hsva"),!0)}catch(p){console.log("EyeDropper cancelled or failed:",p)}},[t]),h={hsva:n.getHsva(),updateHsva:u,handleEyeDropper:C,onFinishedUpdates:f};return Te.jsx(C2.Provider,{value:h,children:Te.jsx("div",{...l,className:ct("relative flex h-[280px] w-[280px] cursor-default flex-col rounded-2xl bg-white shadow-lg select-none",o),children:a})})},B3=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=zo(),r=Ne((l,n)=>{o(l,n)},[o]);return Te.jsx(O3,{hsva:t,onChange:r,className:e,onFinishedUpdates:a})},A3=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=zo(),r=Ne((l,n)=>{o(l,n)},[o]);return Te.jsx(D3,{hue:t.h,onChange:r,className:e,onFinishedUpdates:a})},Z3=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=zo(),r=Ne((l,n)=>{o(l,n)},[o]);return Te.jsx(_3,{hsva:t,onChange:r,className:e,onFinishedUpdates:a})},F3=({className:e,title:t="Pick color from screen",children:o})=>{let{handleEyeDropper:a}=zo(),[r,l]=vr(!1);return gr(()=>{typeof window<"u"&&"EyeDropper"in window&&l(!0)},[]),r?Te.jsx("button",{onClick:a,className:ct("flex h-10 w-10 flex-shrink-0 cursor-pointer items-center justify-center rounded-lg transition-colors hover:bg-gray-100",e),title:t,children:o}):null},Rt=Object.assign(E3,{Saturation:B3,Hue:A3,Alpha:Z3,EyeDropper:F3});function $3(e,t){switch(t){case"hex":return{type:"hex",value:e.getHex()};case"rgb":return{type:"rgb",...e.getRgb()};case"rgba":return{type:"rgba",...e.getRgba()};case"hsl":return{type:"hsl",...e.getHsl()};case"hsla":return{type:"hsla",...e.getHsla()};case"hsv":return{type:"hsv",...e.getHsv()};case"hsva":return{type:"hsva",...e.getHsva()};default:qo()}}var m2=(e={type:"hex",value:"#ff6b9d"})=>{let[t,o]=vr(()=>{let n=typeof e=="function"?e():e;return{color:new j1(n),type:n.type}}),a=Uo(()=>$3(t.color,t.type),[t.color,t.type]),r=Uo(()=>{let n=t.color.getHsva();return{hex:t.color.getHex(),rgb:t.color.getRgb(),rgba:t.color.getRgba(),hsl:t.color.getHsl(),hsla:t.color.getHsla(),hsv:t.color.getHsv(),hsva:n,alpha:n.a}},[t.color]),l=Ne(n=>{try{let i="type"in n?new j1(n):n;o(s=>({color:i,type:s.type}))}catch(i){console.warn("Invalid color input:",n,i)}},[]);return[{colorInput:a,colorState:r},l]};import{createPortal as b7}from"react-dom";import{useRef as x1,useMemo as N3,useEffect as U3,useState as n6,useCallback as i6}from"react";function h2(e,t,o,a){var r=this,l=x1(null),n=x1(0),i=x1(0),s=x1(null),d=x1([]),u=x1(),f=x1(),C=x1(e),h=x1(!0),p=x1(),c=x1();C.current=e;var m=typeof window<"u",b=!t&&t!==0&&m;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var g=!!(o=o||{}).leading,k=!("trailing"in o)||!!o.trailing,v=!!o.flushOnExit&&k,_="maxWait"in o,D="debounceOnServer"in o&&!!o.debounceOnServer,U=_?Math.max(+o.maxWait||0,t):null,M=N3(function(){var O=function(x){var I=d.current,w=u.current;return d.current=u.current=null,n.current=x,i.current=i.current||x,f.current=C.current.apply(w,I)},q=function(x,I){b&&cancelAnimationFrame(s.current),s.current=b?requestAnimationFrame(x):setTimeout(x,I)},K=function(x){if(!h.current)return!1;var I=x-l.current;return!l.current||I>=t||I<0||_&&x-n.current>=U},X=function(x){return s.current=null,k&&d.current?O(x):(d.current=u.current=null,f.current)},N=function x(){var I=Date.now();if(g&&i.current===n.current&&T(),K(I))return X(I);if(h.current){var w=t-(I-l.current),y=_?Math.min(w,U-(I-n.current)):w;q(x,y)}},T=function(){a&&a({})},S=function(){if(m||D){var x,I=Date.now(),w=K(I);if(d.current=[].slice.call(arguments),u.current=r,l.current=I,v&&!p.current&&(p.current=function(){var y;((y=globalThis.document)==null?void 0:y.visibilityState)==="hidden"&&c.current.flush()},(x=globalThis.document)==null||x.addEventListener==null||x.addEventListener("visibilitychange",p.current)),w){if(!s.current&&h.current)return n.current=l.current,q(N,t),g?O(l.current):f.current;if(_)return q(N,t),O(l.current)}return s.current||q(N,t),f.current}};return S.cancel=function(){var x=s.current;x&&(b?cancelAnimationFrame(s.current):clearTimeout(s.current)),n.current=0,d.current=l.current=u.current=s.current=null,x&&a&&a({})},S.isPending=function(){return!!s.current},S.flush=function(){return s.current?X(Date.now()):f.current},S},[g,_,t,U,k,v,b,m,D,a]);return c.current=M,U3(function(){return h.current=!0,function(){var O;v&&c.current.flush(),p.current&&((O=globalThis.document)==null||O.removeEventListener==null||O.removeEventListener("visibilitychange",p.current),p.current=null),h.current=!1}},[v]),M}import qe from"react";function ft(e){let t=e?.parentNode;for(;t;){if(t instanceof ShadowRoot){t=t.host;continue}if(t instanceof HTMLElement){let{overflowY:o}=getComputedStyle(t);if(o==="auto"||o==="scroll")return t}t=t.parentNode}return null}var g2='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';function v2({computePosition:e,onClose:t,autoFocus:o=!0,trapFocus:a=!1}={}){let[r,l]=qe.useState(!1),[n,i]=qe.useState({top:0,left:0}),s=qe.useRef(null),d=qe.useRef(null),u=qe.useRef(!1),f=qe.useRef(e);f.current=e;let C=qe.useRef(t);C.current=t;let h=qe.useRef(a);h.current=a;let p=qe.useCallback((...g)=>{!s.current||!f.current||i(f.current(s.current,...g))},[]),c=qe.useCallback(()=>{p(),u.current=!0,l(!0)},[p]),m=qe.useCallback(()=>{C.current&&C.current(),u.current=!1,l(!1),s.current?.focus()},[]),b=qe.useCallback(()=>{u.current?m():c()},[c,m]);return qe.useEffect(()=>{if(!r)return;let g=v=>{if(v.key==="Escape"&&(v.preventDefault(),m()),h.current&&v.key==="Tab"){let _=d.current;if(!_)return;let D=Array.from(_.querySelectorAll(g2)).filter(O=>!O.hasAttribute("disabled")),U=D[0],M=D.at(-1);if(!U||!M)return;v.shiftKey&&document.activeElement===U?(v.preventDefault(),M.focus()):!v.shiftKey&&document.activeElement===M&&(v.preventDefault(),U.focus())}},k=v=>{let _=d.current,D=s.current;if(!_||!D)return;let U=typeof v.composedPath=="function"?v.composedPath():[],M=U.includes(_)||v.target instanceof Node&&_.contains(v.target),O=U.includes(D)||v.target instanceof Node&&D.contains(v.target);!M&&!O&&m()};return document.addEventListener("keydown",g),document.addEventListener("mousedown",k),document.addEventListener("touchstart",k),()=>{document.removeEventListener("keydown",g),document.removeEventListener("mousedown",k),document.removeEventListener("touchstart",k)}},[r,m]),qe.useEffect(()=>{if(!r||!o||!d.current)return;let g=d.current.querySelector(g2);g&&g.focus()},[r,o]),qe.useEffect(()=>{if(!r||!s.current)return;let g=ft(s.current);if(!g)return;let k=()=>m();return g.addEventListener("scroll",k,{passive:!0}),()=>g.removeEventListener("scroll",k)},[r,m]),{isOpen:r,open:c,close:m,toggle:b,triggerRef:s,popoverRef:d,position:n,reposition:p}}var q3=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},jo=q3;var z3={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},x2=z3;var j3=e=>jo(x2[e.toLowerCase()],6),L2=j3;var K3=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,G3=e=>{let t;return(t=e.match(K3))?jo(parseInt(t[1],16),t[1].length):void 0},w2=G3;var ze="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",L6=`(?:${ze}|none)`,pt=`${ze}%`,w6=`(?:${ze}%|none)`,io=`(?:${ze}%|${ze})`,W3=`(?:${ze}%|${ze}|none)`,b2=`(?:${ze}(deg|grad|rad|turn)|${ze})`,b6=`(?:${ze}(deg|grad|rad|turn)|${ze}|none)`,K1="\\s*,\\s*";var I6=new RegExp("^"+W3+"$");var X3=new RegExp(`^rgba?\\(\\s*${ze}${K1}${ze}${K1}${ze}\\s*(?:,\\s*${io}\\s*)?\\)$`),Q3=new RegExp(`^rgba?\\(\\s*${pt}${K1}${pt}${K1}${pt}\\s*(?:,\\s*${io}\\s*)?\\)$`),J3=e=>{let t={mode:"rgb"},o;if(o=e.match(X3))o[1]!==void 0&&(t.r=o[1]/255),o[2]!==void 0&&(t.g=o[2]/255),o[3]!==void 0&&(t.b=o[3]/255);else if(o=e.match(Q3))o[1]!==void 0&&(t.r=o[1]/100),o[2]!==void 0&&(t.g=o[2]/100),o[3]!==void 0&&(t.b=o[3]/100);else return;return o[4]!==void 0?t.alpha=Math.max(0,Math.min(1,o[4]/100)):o[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+o[5]))),t},I2=J3;var Y3=(e,t)=>e===void 0?void 0:typeof e!="object"?Ct(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,Ko=Y3;var ed=(e="rgb")=>t=>(t=Ko(t,e))!==void 0?t.mode===e?t:L1[t.mode][e]?L1[t.mode][e](t):e==="rgb"?L1[t.mode].rgb(t):L1.rgb[e](L1[t.mode].rgb(t)):void 0,t1=ed;var L1={},y2={},so=[],br={},td=e=>e,he=e=>(L1[e.mode]={...L1[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{L1[t]||(L1[t]={}),L1[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=td)}),y2[e.mode]=e,(e.parse||[]).forEach(t=>{od(t,e.mode)}),t1(e.mode)),Go=e=>y2[e],od=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");br[e]=t}else typeof e=="function"&&so.indexOf(e)<0&&so.push(e)};var Ir=/[^\x00-\x7F]|[a-zA-Z_]/,ad=/[^\x00-\x7F]|[-\w]/,V={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},oe=0;function Wo(e){let t=e[oe],o=e[oe+1];return t==="-"||t==="+"?/\d/.test(o)||o==="."&&/\d/.test(e[oe+2]):t==="."?/\d/.test(o):/\d/.test(t)}function yr(e){if(oe>=e.length)return!1;let t=e[oe];if(Ir.test(t))return!0;if(t==="-"){if(e.length-oe<2)return!1;let o=e[oe+1];return!!(o==="-"||Ir.test(o))}return!1}var rd={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function uo(e){let t="";if((e[oe]==="-"||e[oe]==="+")&&(t+=e[oe++]),t+=Xo(e),e[oe]==="."&&/\d/.test(e[oe+1])&&(t+=e[oe++]+Xo(e)),(e[oe]==="e"||e[oe]==="E")&&((e[oe+1]==="-"||e[oe+1]==="+")&&/\d/.test(e[oe+2])?t+=e[oe++]+e[oe++]+Xo(e):/\d/.test(e[oe+1])&&(t+=e[oe++]+Xo(e))),yr(e)){let o=Qo(e);return o==="deg"||o==="rad"||o==="turn"||o==="grad"?{type:V.Hue,value:t*rd[o]}:void 0}return e[oe]==="%"?(oe++,{type:V.Percentage,value:+t}):{type:V.Number,value:+t}}function Xo(e){let t="";for(;/\d/.test(e[oe]);)t+=e[oe++];return t}function Qo(e){let t="";for(;oe<e.length&&ad.test(e[oe]);)t+=e[oe++];return t}function ld(e){let t=Qo(e);return e[oe]==="("?(oe++,{type:V.Function,value:t}):t==="none"?{type:V.None,value:void 0}:{type:V.Ident,value:t}}function nd(e=""){let t=e.trim(),o=[],a;for(oe=0;oe<t.length;){if(a=t[oe++],a===`
|
|
2
|
-
`||a===" "||a===" "){for(;
|
|
3
|
-
`||t[
|
|
4
|
-
`||t[oe]===" "||t[oe]===" ");)oe++;let r;if(Wo(t)&&(r=uo(t),r.type!==V.Hue)){o.push({type:V.Alpha,value:r});continue}if(yr(t)&&Qo(t)==="none"){o.push({type:V.Alpha,value:{type:V.None,value:void 0}});continue}return}if(/\d/.test(a)){oe--,o.push(uo(t));continue}if(Ir.test(a)){oe--,o.push(ld(t));continue}return}return o}function id(e){e._i=0;let t=e[e._i++];if(!t||t.type!==V.Function||t.value!=="color"||(t=e[e._i++],t.type!==V.Ident))return;let o=br[t.value];if(!o)return;let a={mode:o},r=M2(e,!1);if(!r)return;let l=Go(o).channels;for(let n=0,i,s;n<l.length;n++)i=r[n],s=l[n],i.type!==V.None&&(a[s]=i.type===V.Number?i.value:i.value/100,s==="alpha"&&(a[s]=Math.max(0,Math.min(1,a[s]))));return a}function M2(e,t){let o=[],a;for(;e._i<e.length;){if(a=e[e._i++],a.type===V.None||a.type===V.Number||a.type===V.Alpha||a.type===V.Percentage||t&&a.type===V.Hue){o.push(a);continue}if(a.type===V.ParenClose){if(e._i<e.length)return;continue}return}if(!(o.length<3||o.length>4)){if(o.length===4){if(o[3].type!==V.Alpha)return;o[3]=o[3].value}return o.length===3&&o.push({type:V.None,value:void 0}),o.every(r=>r.type!==V.Alpha)?o:void 0}}function sd(e,t){e._i=0;let o=e[e._i++];if(!o||o.type!==V.Function)return;let a=M2(e,t);if(a)return a.unshift(o.value),a}var dd=e=>{if(typeof e!="string")return;let t=nd(e),o=t?sd(t,!0):void 0,a,r=0,l=so.length;for(;r<l;)if((a=so[r++](e,o))!==void 0)return a;return t?id(t):void 0},Ct=dd;function ud(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let o={mode:"rgb"},[,a,r,l,n]=t;if(!(a.type===V.Hue||r.type===V.Hue||l.type===V.Hue))return a.type!==V.None&&(o.r=a.type===V.Number?a.value/255:a.value/100),r.type!==V.None&&(o.g=r.type===V.Number?r.value/255:r.value/100),l.type!==V.None&&(o.b=l.type===V.Number?l.value/255:l.value/100),n.type!==V.None&&(o.alpha=Math.min(1,Math.max(0,n.type===V.Number?n.value:n.value/100))),o}var S2=ud;var cd=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,R2=cd;var k2=(e,t,o)=>e+o*(t-e);var fd=e=>{let t=[];for(let o=0;o<e.length-1;o++){let a=e[o],r=e[o+1];a===void 0&&r===void 0?t.push(void 0):a!==void 0&&r!==void 0?t.push([a,r]):t.push(a!==void 0?[a,a]:[r,r])}return t},H2=e=>t=>{let o=fd(t);return a=>{let r=a*o.length,l=a>=1?o.length-1:Math.max(Math.floor(r),0),n=o[l];return n===void 0?void 0:e(n[0],n[1],r-l)}};var E=H2(k2);var se=e=>{let t=!1,o=e.map(a=>a!==void 0?(t=!0,a):1);return t?o:e};var pd={mode:"rgb",channels:["r","g","b","alpha"],parse:[S2,w2,I2,L2,R2,"srgb"],serialize:"srgb",interpolate:{r:E,g:E,b:E,alpha:{use:E,fixup:se}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},i1=pd;var Mr=(e=0)=>Math.pow(Math.abs(e),2.19921875)*Math.sign(e),Cd=e=>{let t=Mr(e.r),o=Mr(e.g),a=Mr(e.b),r={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*o+.1882286462349947*a,y:.297344975250536*t+.6273635662554661*o+.0752914584939979*a,z:.0270313613864123*t+.0706888525358272*o+.9913375368376386*a};return e.alpha!==void 0&&(r.alpha=e.alpha),r},Sr=Cd;var Rr=e=>Math.pow(Math.abs(e),.4547069271758437)*Math.sign(e),md=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"a98",r:Rr(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*o),g:Rr(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*o),b:Rr(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*o)};return a!==void 0&&(r.alpha=a),r},kr=md;var Hr=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},hd=({r:e,g:t,b:o,alpha:a})=>{let r={mode:"lrgb",r:Hr(e),g:Hr(t),b:Hr(o)};return a!==void 0&&(r.alpha=a),r},s1=hd;var gd=e=>{let{r:t,g:o,b:a,alpha:r}=s1(e),l={mode:"xyz65",x:.4123907992659593*t+.357584339383878*o+.1804807884018343*a,y:.2126390058715102*t+.715168678767756*o+.0721923153607337*a,z:.0193308187155918*t+.119194779794626*o+.9505321522496607*a};return r!==void 0&&(l.alpha=r),l},We=gd;var Pr=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,.4166666666666667)-.055):e*12.92},vd=({r:e,g:t,b:o,alpha:a},r="rgb")=>{let l={mode:r,r:Pr(e),g:Pr(t),b:Pr(o)};return a!==void 0&&(l.alpha=a),l},d1=vd;var xd=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=d1({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*o,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*o,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*o});return a!==void 0&&(r.alpha=a),r},Xe=xd;var Ld={...i1,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>kr(We(e)),xyz65:kr},toMode:{rgb:e=>Xe(Sr(e)),xyz65:Sr}},P2=Ld;var wd=e=>(e=e%360)<0?e+360:e,Le=wd;var bd=(e,t)=>e.map((o,a,r)=>{if(o===void 0)return o;let l=Le(o);return a===0||e[a-1]===void 0?l:t(l-Le(r[a-1]))}).reduce((o,a)=>!o.length||a===void 0||o[o.length-1]===void 0?(o.push(a),o):(o.push(a+o[o.length-1]),o),[]),Be=e=>bd(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t));var _e=[-.14861,1.78277,-.29227,-.90649,1.97294,0],T2=Math.PI/180,V2=180/Math.PI;var _2=_e[3]*_e[4],D2=_e[1]*_e[4],O2=_e[1]*_e[2]-_e[0]*_e[3],Id=({r:e,g:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(O2*o+e*_2-t*D2)/(O2+_2-D2),l=o-r,n=(_e[4]*(t-r)-_e[2]*l)/_e[3],i={mode:"cubehelix",l:r,s:r===0||r===1?void 0:Math.sqrt(l*l+n*n)/(_e[4]*r*(1-r))};return i.s&&(i.h=Math.atan2(n,l)*V2-120),a!==void 0&&(i.alpha=a),i},E2=Id;var yd=({h:e,s:t,l:o,alpha:a})=>{let r={mode:"rgb"};e=(e===void 0?0:e+120)*T2,o===void 0&&(o=0);let l=t===void 0?0:t*o*(1-o),n=Math.cos(e),i=Math.sin(e);return r.r=o+l*(_e[0]*n+_e[1]*i),r.g=o+l*(_e[2]*n+_e[3]*i),r.b=o+l*(_e[4]*n+_e[5]*i),a!==void 0&&(r.alpha=a),r},B2=yd;var G1=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let o=Le(e.h),a=Le(t.h),r=Math.sin((a-o+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*r},A2=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let o=Le(e.h),a=Le(t.h);return Math.abs(a-o)>180?o-(a-360*Math.sign(a-o)):a-o},W1=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let o=Le(e.h),a=Le(t.h),r=Math.sin((a-o+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*r};var Ae=e=>{let t=e.reduce((a,r)=>{if(r!==void 0){let l=r*Math.PI/180;a.sin+=Math.sin(l),a.cos+=Math.cos(l)}return a},{sin:0,cos:0}),o=Math.atan2(t.sin,t.cos)*180/Math.PI;return o<0?360+o:o};var Md={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:E2},toMode:{rgb:B2},interpolate:{h:{use:E,fixup:Be},s:E,l:E,alpha:{use:E,fixup:se}},difference:{h:G1},average:{h:Ae}},Z2=Md;var Sd=({l:e,a:t,b:o,alpha:a},r="lch")=>{t===void 0&&(t=0),o===void 0&&(o=0);let l=Math.sqrt(t*t+o*o),n={mode:r,l:e,c:l};return l&&(n.h=Le(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(n.alpha=a),n},o1=Sd;var Rd=({l:e,c:t,h:o,alpha:a},r="lab")=>{o===void 0&&(o=0);let l={mode:r,l:e,a:t?t*Math.cos(o/180*Math.PI):0,b:t?t*Math.sin(o/180*Math.PI):0};return a!==void 0&&(l.alpha=a),l},a1=Rd;var Jo=Math.pow(29,3)/Math.pow(3,3),Yo=Math.pow(6,3)/Math.pow(29,3);var Se={X:.9642956764295677,Y:1,Z:.8251046025104602},X1={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},Ep=Math.pow(29,3)/Math.pow(3,3),Bp=Math.pow(6,3)/Math.pow(29,3);var Tr=e=>Math.pow(e,3)>Yo?Math.pow(e,3):(116*e-16)/Jo,kd=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(e+16)/116,l=t/500+r,n=r-o/200,i={mode:"xyz65",x:Tr(l)*X1.X,y:Tr(r)*X1.Y,z:Tr(n)*X1.Z};return a!==void 0&&(i.alpha=a),i},ea=kd;var Hd=e=>Xe(ea(e)),Q1=Hd;var Vr=e=>e>Yo?Math.cbrt(e):(Jo*e+16)/116,Pd=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Vr(e/X1.X),l=Vr(t/X1.Y),n=Vr(o/X1.Z),i={mode:"lab65",l:116*l-16,a:500*(r-l),b:200*(l-n)};return a!==void 0&&(i.alpha=a),i},ta=Pd;var Td=e=>{let t=ta(We(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},J1=Td;var mt=.14444444444444443*Math.PI,kt=Math.cos(mt),Ht=Math.sin(mt),oa=100/Math.log(139/100);var Vd=({l:e,c:t,h:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"lab65",l:(Math.exp(e*1/oa)-1)/.0039},l=(Math.exp(.0435*t*1*1)-1)/.075,n=l*Math.cos(o/180*Math.PI-mt),i=l*Math.sin(o/180*Math.PI-mt);return r.a=n*kt-i/.83*Ht,r.b=n*Ht+i/.83*kt,a!==void 0&&(r.alpha=a),r},fo=Vd;var _d=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=t*kt+o*Ht,l=.83*(o*kt-t*Ht),n=Math.sqrt(r*r+l*l),i={mode:"dlch",l:oa/1*Math.log(1+.0039*e),c:Math.log(1+.075*n)/(.0435*1*1)};return i.c&&(i.h=Le((Math.atan2(l,r)+mt)/Math.PI*180)),a!==void 0&&(i.alpha=a),i},po=_d;var F2=e=>fo(o1(e,"dlch")),$2=e=>a1(po(e),"dlab"),Dd={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:F2,rgb:e=>Q1(F2(e))},fromMode:{lab65:$2,rgb:e=>$2(J1(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:E,a:E,b:E,alpha:{use:E,fixup:se}}},N2=Dd;var Od={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:fo,dlab:e=>a1(e,"dlab"),rgb:e=>Q1(fo(e))},fromMode:{lab65:po,dlab:e=>o1(e,"dlch"),rgb:e=>po(J1(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:E,c:E,h:{use:E,fixup:Be},alpha:{use:E,fixup:se}},difference:{h:W1},average:{h:Ae}},U2=Od;function Dr({h:e,s:t,i:o,alpha:a}){e=Le(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.abs(e/60%2-1),l;switch(Math.floor(e/60)){case 0:l={r:o*(1+t*(3/(2-r)-1)),g:o*(1+t*(3*(1-r)/(2-r)-1)),b:o*(1-t)};break;case 1:l={r:o*(1+t*(3*(1-r)/(2-r)-1)),g:o*(1+t*(3/(2-r)-1)),b:o*(1-t)};break;case 2:l={r:o*(1-t),g:o*(1+t*(3/(2-r)-1)),b:o*(1+t*(3*(1-r)/(2-r)-1))};break;case 3:l={r:o*(1-t),g:o*(1+t*(3*(1-r)/(2-r)-1)),b:o*(1+t*(3/(2-r)-1))};break;case 4:l={r:o*(1+t*(3*(1-r)/(2-r)-1)),g:o*(1-t),b:o*(1+t*(3/(2-r)-1))};break;case 5:l={r:o*(1+t*(3/(2-r)-1)),g:o*(1-t),b:o*(1+t*(3*(1-r)/(2-r)-1))};break;default:l={r:o*(1-t),g:o*(1-t),b:o*(1-t)}}return l.mode="rgb",a!==void 0&&(l.alpha=a),l}function Or({r:e,g:t,b:o,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.max(e,t,o),l=Math.min(e,t,o),n={mode:"hsi",s:e+t+o===0?0:1-3*l/(e+t+o),i:(e+t+o)/3};return r-l!==0&&(n.h=(r===e?(t-o)/(r-l)+(t<o)*6:r===t?(o-e)/(r-l)+2:(e-t)/(r-l)+4)*60),a!==void 0&&(n.alpha=a),n}var Ed={mode:"hsi",toMode:{rgb:Dr},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:Or},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:E,fixup:Be},s:E,i:E,alpha:{use:E,fixup:se}},difference:{h:G1},average:{h:Ae}},q2=Ed;function Er({h:e,s:t,l:o,alpha:a}){e=Le(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=o+t*(o<.5?o:1-o),l=r-(r-o)*2*Math.abs(e/60%2-1),n;switch(Math.floor(e/60)){case 0:n={r,g:l,b:2*o-r};break;case 1:n={r:l,g:r,b:2*o-r};break;case 2:n={r:2*o-r,g:r,b:l};break;case 3:n={r:2*o-r,g:l,b:r};break;case 4:n={r:l,g:2*o-r,b:r};break;case 5:n={r,g:2*o-r,b:l};break;default:n={r:2*o-r,g:2*o-r,b:2*o-r}}return n.mode="rgb",a!==void 0&&(n.alpha=a),n}function Br({r:e,g:t,b:o,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.max(e,t,o),l=Math.min(e,t,o),n={mode:"hsl",s:r===l?0:(r-l)/(1-Math.abs(r+l-1)),l:.5*(r+l)};return r-l!==0&&(n.h=(r===e?(t-o)/(r-l)+(t<o)*6:r===t?(o-e)/(r-l)+2:(e-t)/(r-l)+4)*60),a!==void 0&&(n.alpha=a),n}var Bd=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},z2=Bd;var Ad=new RegExp(`^hsla?\\(\\s*${b2}${K1}${pt}${K1}${pt}\\s*(?:,\\s*${io}\\s*)?\\)$`),Zd=e=>{let t=e.match(Ad);if(!t)return;let o={mode:"hsl"};return t[3]!==void 0?o.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(o.h=z2(t[1],t[2])),t[4]!==void 0&&(o.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(o.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?o.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(o.alpha=Math.max(0,Math.min(1,+t[7]))),o},j2=Zd;function Fd(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let o={mode:"hsl"},[,a,r,l,n]=t;if(a.type!==V.None){if(a.type===V.Percentage)return;o.h=a.value}if(r.type!==V.None){if(r.type===V.Hue)return;o.s=r.value/100}if(l.type!==V.None){if(l.type===V.Hue)return;o.l=l.value/100}return n.type!==V.None&&(o.alpha=Math.min(1,Math.max(0,n.type===V.Number?n.value:n.value/100))),o}var K2=Fd;var $d={mode:"hsl",toMode:{rgb:Er},fromMode:{rgb:Br},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[K2,j2],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:E,fixup:Be},s:E,l:E,alpha:{use:E,fixup:se}},difference:{h:G1},average:{h:Ae}},aa=$d;function Co({h:e,s:t,v:o,alpha:a}){e=Le(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.abs(e/60%2-1),l;switch(Math.floor(e/60)){case 0:l={r:o,g:o*(1-t*r),b:o*(1-t)};break;case 1:l={r:o*(1-t*r),g:o,b:o*(1-t)};break;case 2:l={r:o*(1-t),g:o,b:o*(1-t*r)};break;case 3:l={r:o*(1-t),g:o*(1-t*r),b:o};break;case 4:l={r:o*(1-t*r),g:o*(1-t),b:o};break;case 5:l={r:o,g:o*(1-t),b:o*(1-t*r)};break;default:l={r:o*(1-t),g:o*(1-t),b:o*(1-t)}}return l.mode="rgb",a!==void 0&&(l.alpha=a),l}function mo({r:e,g:t,b:o,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.max(e,t,o),l=Math.min(e,t,o),n={mode:"hsv",s:r===0?0:1-l/r,v:r};return r-l!==0&&(n.h=(r===e?(t-o)/(r-l)+(t<o)*6:r===t?(o-e)/(r-l)+2:(e-t)/(r-l)+4)*60),a!==void 0&&(n.alpha=a),n}var Nd={mode:"hsv",toMode:{rgb:Co},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:mo},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:E,fixup:Be},s:E,v:E,alpha:{use:E,fixup:se}},difference:{h:G1},average:{h:Ae}},ra=Nd;function Ar({h:e,w:t,b:o,alpha:a}){if(t===void 0&&(t=0),o===void 0&&(o=0),t+o>1){let r=t+o;t/=r,o/=r}return Co({h:e,s:o===1?1:1-t/(1-o),v:1-o,alpha:a})}function Zr(e){let t=mo(e);if(t===void 0)return;let o=t.s!==void 0?t.s:0,a=t.v!==void 0?t.v:0,r={mode:"hwb",w:(1-o)*a,b:1-a};return t.h!==void 0&&(r.h=t.h),t.alpha!==void 0&&(r.alpha=t.alpha),r}function Ud(e,t){if(!t||t[0]!=="hwb")return;let o={mode:"hwb"},[,a,r,l,n]=t;if(a.type!==V.None){if(a.type===V.Percentage)return;o.h=a.value}if(r.type!==V.None){if(r.type===V.Hue)return;o.w=r.value/100}if(l.type!==V.None){if(l.type===V.Hue)return;o.b=l.value/100}return n.type!==V.None&&(o.alpha=Math.min(1,Math.max(0,n.type===V.Number?n.value:n.value/100))),o}var G2=Ud;var qd={mode:"hwb",toMode:{rgb:Ar},fromMode:{rgb:Zr},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[G2],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:E,fixup:Be},w:E,b:E,alpha:{use:E,fixup:se}},difference:{h:A2},average:{h:Ae}},W2=qd;var Pt=.1593017578125,X2=78.84375,Tt=.8359375,Vt=18.8515625,_t=18.6875;function la(e){if(e<0)return 0;let t=Math.pow(e,1/X2);return 1e4*Math.pow(Math.max(0,t-Tt)/(Vt-_t*t),1/Pt)}function na(e){if(e<0)return 0;let t=Math.pow(e/1e4,Pt);return Math.pow((Tt+Vt*t)/(1+_t*t),X2)}var Fr=e=>Math.max(e/203,0),jd=({i:e,t,p:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=la(e+.008609037037932761*t+.11102962500302593*o),l=la(e-.00860903703793275*t-.11102962500302599*o),n=la(e+.5600313357106791*t-.32062717498731885*o),i={mode:"xyz65",x:Fr(2.070152218389422*r-1.3263473389671556*l+.2066510476294051*n),y:Fr(.3647385209748074*r+.680566024947227*l-.0453045459220346*n),z:Fr(-.049747207535812*r-.0492609666966138*l+1.1880659249923042*n)};return a!==void 0&&(i.alpha=a),i},$r=jd;var Nr=(e=0)=>Math.max(e*203,0),Kd=({x:e,y:t,z:o,alpha:a})=>{let r=Nr(e),l=Nr(t),n=Nr(o),i=na(.3592832590121217*r+.6976051147779502*l-.0358915932320289*n),s=na(-.1920808463704995*r+1.1004767970374323*l+.0753748658519118*n),d=na(.0070797844607477*r+.0748396662186366*l+.8433265453898765*n),u=.5*i+.5*s,f=1.61376953125*i-3.323486328125*s+1.709716796875*d,C=4.378173828125*i-4.24560546875*s-.132568359375*d,h={mode:"itp",i:u,t:f,p:C};return a!==void 0&&(h.alpha=a),h},Ur=Kd;var Gd={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:$r,rgb:e=>Xe($r(e))},fromMode:{xyz65:Ur,rgb:e=>Ur(We(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:E,t:E,p:E,alpha:{use:E,fixup:se}}},Q2=Gd;var Wd=134.03437499999998,Xd=16295499532821565e-27,qr=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,Pt);return Math.pow((Tt+Vt*t)/(1+_t*t),Wd)},zr=(e=0)=>Math.max(e*203,0),Qd=({x:e,y:t,z:o,alpha:a})=>{e=zr(e),t=zr(t),o=zr(o);let r=1.15*e-.15*o,l=.66*t+.34*e,n=qr(.41478972*r+.579999*l+.014648*o),i=qr(-.20151*r+1.120649*l+.0531008*o),s=qr(-.0166008*r+.2648*l+.6684799*o),d=(n+i)/2,u={mode:"jab",j:.44*d/(1-.56*d)-Xd,a:3.524*n-4.066708*i+.542708*s,b:.199076*n+1.096799*i-1.295875*s};return a!==void 0&&(u.alpha=a),u},ia=Qd;var Jd=134.03437499999998,J2=16295499532821565e-27,jr=e=>{if(e<0)return 0;let t=Math.pow(e,1/Jd);return 1e4*Math.pow((Tt-t)/(_t*t-Vt),1/Pt)},Kr=e=>e/203,Yd=({j:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(e+J2)/(.44+.56*(e+J2)),l=jr(r+.13860504*t+.058047316*o),n=jr(r-.13860504*t-.058047316*o),i=jr(r-.096019242*t-.8118919*o),s={mode:"xyz65",x:Kr(1.661373024652174*l-.914523081304348*n+.23136208173913045*i),y:Kr(-.3250758611844533*l+1.571847026732543*n-.21825383453227928*i),z:Kr(-.090982811*l-.31272829*n+1.5227666*i)};return a!==void 0&&(s.alpha=a),s},sa=Yd;var eu=e=>{let t=ia(We(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},da=eu;var tu=e=>Xe(sa(e)),ua=tu;var ou={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:da,xyz65:ia},toMode:{rgb:ua,xyz65:sa},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:E,a:E,b:E,alpha:{use:E,fixup:se}}},Y2=ou;var au=({j:e,a:t,b:o,alpha:a})=>{t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.sqrt(t*t+o*o),l={mode:"jch",j:e,c:r};return r&&(l.h=Le(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(l.alpha=a),l},Gr=au;var ru=({j:e,c:t,h:o,alpha:a})=>{o===void 0&&(o=0);let r={mode:"jab",j:e,a:t?t*Math.cos(o/180*Math.PI):0,b:t?t*Math.sin(o/180*Math.PI):0};return a!==void 0&&(r.alpha=a),r},Wr=ru;var lu={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Wr,rgb:e=>ua(Wr(e))},fromMode:{rgb:e=>Gr(da(e)),jab:Gr},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:E,fixup:Be},c:E,j:E,alpha:{use:E,fixup:se}},difference:{h:W1},average:{h:Ae}},e0=lu;var Y1=Math.pow(29,3)/Math.pow(3,3),Dt=Math.pow(6,3)/Math.pow(29,3);var Xr=e=>Math.pow(e,3)>Dt?Math.pow(e,3):(116*e-16)/Y1,nu=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(e+16)/116,l=t/500+r,n=r-o/200,i={mode:"xyz50",x:Xr(l)*Se.X,y:Xr(r)*Se.Y,z:Xr(n)*Se.Z};return a!==void 0&&(i.alpha=a),i},Ot=nu;var iu=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=d1({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*o,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*o,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*o});return a!==void 0&&(r.alpha=a),r},y1=iu;var su=e=>y1(Ot(e)),ca=su;var du=e=>{let{r:t,g:o,b:a,alpha:r}=s1(e),l={mode:"xyz50",x:.436065742824811*t+.3851514688337912*o+.14307845442264197*a,y:.22249319175623702*t+.7168870538238823*o+.06061979053616537*a,z:.013923904500943465*t+.09708128566574634*o+.7140993584005155*a};return r!==void 0&&(l.alpha=r),l},M1=du;var Qr=e=>e>Dt?Math.cbrt(e):(Y1*e+16)/116,uu=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Qr(e/Se.X),l=Qr(t/Se.Y),n=Qr(o/Se.Z),i={mode:"lab",l:116*l-16,a:500*(r-l),b:200*(l-n)};return a!==void 0&&(i.alpha=a),i},Et=uu;var cu=e=>{let t=Et(M1(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},fa=cu;function fu(e,t){if(!t||t[0]!=="lab")return;let o={mode:"lab"},[,a,r,l,n]=t;if(!(a.type===V.Hue||r.type===V.Hue||l.type===V.Hue))return a.type!==V.None&&(o.l=Math.min(Math.max(0,a.value),100)),r.type!==V.None&&(o.a=r.type===V.Number?r.value:r.value*125/100),l.type!==V.None&&(o.b=l.type===V.Number?l.value:l.value*125/100),n.type!==V.None&&(o.alpha=Math.min(1,Math.max(0,n.type===V.Number?n.value:n.value/100))),o}var t0=fu;var pu={mode:"lab",toMode:{xyz50:Ot,rgb:ca},fromMode:{xyz50:Et,rgb:fa},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[t0],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:E,a:E,b:E,alpha:{use:E,fixup:se}}},Bt=pu;var Cu={...Bt,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:ea,rgb:Q1},fromMode:{xyz65:ta,rgb:J1},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},o0=Cu;function mu(e,t){if(!t||t[0]!=="lch")return;let o={mode:"lch"},[,a,r,l,n]=t;if(a.type!==V.None){if(a.type===V.Hue)return;o.l=Math.min(Math.max(0,a.value),100)}if(r.type!==V.None&&(o.c=Math.max(0,r.type===V.Number?r.value:r.value*150/100)),l.type!==V.None){if(l.type===V.Percentage)return;o.h=l.value}return n.type!==V.None&&(o.alpha=Math.min(1,Math.max(0,n.type===V.Number?n.value:n.value/100))),o}var a0=mu;var hu={mode:"lch",toMode:{lab:a1,rgb:e=>ca(a1(e))},fromMode:{rgb:e=>o1(fa(e)),lab:o1},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[a0],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:E,fixup:Be},c:E,l:E,alpha:{use:E,fixup:se}},difference:{h:W1},average:{h:Ae}},At=hu;var gu={...At,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>a1(e,"lab65"),rgb:e=>Q1(a1(e,"lab65"))},fromMode:{rgb:e=>o1(J1(e),"lch65"),lab65:e=>o1(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},r0=gu;var vu=({l:e,u:t,v:o,alpha:a})=>{t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.sqrt(t*t+o*o),l={mode:"lchuv",l:e,c:r};return r&&(l.h=Le(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(l.alpha=a),l},Jr=vu;var xu=({l:e,c:t,h:o,alpha:a})=>{o===void 0&&(o=0);let r={mode:"luv",l:e,u:t?t*Math.cos(o/180*Math.PI):0,v:t?t*Math.sin(o/180*Math.PI):0};return a!==void 0&&(r.alpha=a),r},Yr=xu;var l0=(e,t,o)=>4*e/(e+15*t+3*o),n0=(e,t,o)=>9*t/(e+15*t+3*o),Lu=l0(Se.X,Se.Y,Se.Z),wu=n0(Se.X,Se.Y,Se.Z),bu=e=>e<=Dt?Y1*e:116*Math.cbrt(e)-16,Iu=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=bu(t/Se.Y),l=l0(e,t,o),n=n0(e,t,o);!isFinite(l)||!isFinite(n)?r=l=n=0:(l=13*r*(l-Lu),n=13*r*(n-wu));let i={mode:"luv",l:r,u:l,v:n};return a!==void 0&&(i.alpha=a),i},ho=Iu;var yu=(e,t,o)=>4*e/(e+15*t+3*o),Mu=(e,t,o)=>9*t/(e+15*t+3*o),Su=yu(Se.X,Se.Y,Se.Z),Ru=Mu(Se.X,Se.Y,Se.Z),ku=({l:e,u:t,v:o,alpha:a})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),o===void 0&&(o=0);let r=t/(13*e)+Su,l=o/(13*e)+Ru,n=Se.Y*(e<=8?e/Y1:Math.pow((e+16)/116,3)),i=n*(9*r)/(4*l),s=n*(12-3*r-20*l)/(4*l),d={mode:"xyz50",x:i,y:n,z:s};return a!==void 0&&(d.alpha=a),d},go=ku;var Hu=e=>Jr(ho(M1(e))),Pu=e=>y1(go(Yr(e))),Tu={mode:"lchuv",toMode:{luv:Yr,rgb:Pu},fromMode:{rgb:Hu,luv:Jr},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:E,fixup:Be},c:E,l:E,alpha:{use:E,fixup:se}},difference:{h:W1},average:{h:Ae}},i0=Tu;var Vu={...i1,mode:"lrgb",toMode:{rgb:d1},fromMode:{rgb:s1},parse:["srgb-linear"],serialize:"srgb-linear"},s0=Vu;var _u={mode:"luv",toMode:{xyz50:go,rgb:e=>y1(go(e))},fromMode:{xyz50:ho,rgb:e=>ho(M1(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:E,u:E,v:E,alpha:{use:E,fixup:se}}},d0=_u;var Du=({r:e,g:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*o),l=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*o),n=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*o),i={mode:"oklab",l:.210454268309314*r+.7936177747023054*l-.0040720430116193*n,a:1.9779985324311684*r-2.42859224204858*l+.450593709617411*n,b:.0259040424655478*r+.7827717124575296*l-.8086757549230774*n};return a!==void 0&&(i.alpha=a),i},pa=Du;var Ou=e=>{let t=pa(s1(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},et=Ou;var Eu=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.pow(e+.3963377773761749*t+.2158037573099136*o,3),l=Math.pow(e-.1055613458156586*t-.0638541728258133*o,3),n=Math.pow(e-.0894841775298119*t-1.2914855480194092*o,3),i={mode:"lrgb",r:4.076741636075957*r-3.3077115392580616*l+.2309699031821044*n,g:-1.2684379732850317*r+2.6097573492876887*l-.3413193760026573*n,b:-.0041960761386756*r-.7034186179359362*l+1.7076146940746117*n};return a!==void 0&&(i.alpha=a),i},S1=Eu;var Bu=e=>d1(S1(e)),tt=Bu;function vo(e){let a=1.170873786407767;return .5*(a*e-.206+Math.sqrt((a*e-.206)*(a*e-.206)+4*.03*a*e))}function ht(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function Au(e,t){let o,a,r,l,n,i,s,d;-1.88170328*e-.80936493*t>1?(o=1.19086277,a=1.76576728,r=.59662641,l=.75515197,n=.56771245,i=4.0767416621,s=-3.3077115913,d=.2309699292):1.81444104*e-1.19445276*t>1?(o=.73956515,a=-.45954404,r=.08285427,l=.1254107,n=.14503204,i=-1.2684380046,s=2.6097574011,d=-.3413193965):(o=1.35733652,a=-.00915799,r=-1.1513021,l=-.50559606,n=.00692167,i=-.0041960863,s=-.7034186147,d=1.707614701);let u=o+a*e+r*t+l*e*e+n*e*t,f=.3963377774*e+.2158037573*t,C=-.1055613458*e-.0638541728*t,h=-.0894841775*e-1.291485548*t;{let p=1+u*f,c=1+u*C,m=1+u*h,b=p*p*p,g=c*c*c,k=m*m*m,v=3*f*p*p,_=3*C*c*c,D=3*h*m*m,U=6*f*f*p,M=6*C*C*c,O=6*h*h*m,q=i*b+s*g+d*k,K=i*v+s*_+d*D,X=i*U+s*M+d*O;u=u-q*K/(K*K-.5*q*X)}return u}function el(e,t){let o=Au(e,t),a=S1({l:1,a:o*e,b:o*t}),r=Math.cbrt(1/Math.max(a.r,a.g,a.b)),l=r*o;return[r,l]}function Zu(e,t,o,a,r,l=null){l||(l=el(e,t));let n;if((o-r)*l[1]-(l[0]-r)*a<=0)n=l[1]*r/(a*l[0]+l[1]*(r-o));else{n=l[1]*(r-1)/(a*(l[0]-1)+l[1]*(r-o));{let i=o-r,s=a,d=.3963377774*e+.2158037573*t,u=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,C=i+s*d,h=i+s*u,p=i+s*f;{let c=r*(1-n)+n*o,m=n*a,b=c+m*d,g=c+m*u,k=c+m*f,v=b*b*b,_=g*g*g,D=k*k*k,U=3*C*b*b,M=3*h*g*g,O=3*p*k*k,q=6*C*C*b,K=6*h*h*g,X=6*p*p*k,N=4.0767416621*v-3.3077115913*_+.2309699292*D-1,T=4.0767416621*U-3.3077115913*M+.2309699292*O,S=4.0767416621*q-3.3077115913*K+.2309699292*X,x=T/(T*T-.5*N*S),I=-N*x,w=-1.2684380046*v+2.6097574011*_-.3413193965*D-1,y=-1.2684380046*U+2.6097574011*M-.3413193965*O,H=-1.2684380046*q+2.6097574011*K-.3413193965*X,A=y/(y*y-.5*w*H),Z=-w*A,W=-.0041960863*v-.7034186147*_+1.707614701*D-1,B=-.0041960863*U-.7034186147*M+1.707614701*O,$=-.0041960863*q-.7034186147*K+1.707614701*X,F=B/(B*B-.5*W*$),R=-W*F;I=x>=0?I:1e6,Z=A>=0?Z:1e6,R=F>=0?R:1e6,n+=Math.min(I,Math.min(Z,R))}}}return n}function xo(e,t,o=null){o||(o=el(e,t));let a=o[0],r=o[1];return[r/a,r/(1-a)]}function Ca(e,t,o){let a=el(t,o),r=Zu(t,o,e,1,e,a),l=xo(t,o,a),n=.11516993+1/(7.4477897+4.1590124*o+t*(-2.19557347+1.75198401*o+t*(-2.13704948-10.02301043*o+t*(-4.24894561+5.38770819*o+4.69891013*t)))),i=.11239642+1/(1.6132032-.68124379*o+t*(.40370612+.90148123*o+t*(-.27087943+.6122399*o+t*(.00299215-.45399568*o-.14661872*t)))),s=r/Math.min(e*l[0],(1-e)*l[1]),d=e*n,u=(1-e)*i,f=.9*s*Math.sqrt(Math.sqrt(1/(1/(d*d*d*d)+1/(u*u*u*u))));return d=e*.4,u=(1-e)*.8,[Math.sqrt(1/(1/(d*d)+1/(u*u))),f,r]}function ma(e){let t=e.l!==void 0?e.l:0,o=e.a!==void 0?e.a:0,a=e.b!==void 0?e.b:0,r={mode:"okhsl",l:vo(t)};e.alpha!==void 0&&(r.alpha=e.alpha);let l=Math.sqrt(o*o+a*a);if(!l)return r.s=0,r;let[n,i,s]=Ca(t,o/l,a/l),d;if(l<i){let u=0,f=.8*n,C=1-f/i;d=(l-u)/(f+C*(l-u))*.8}else{let u=i,f=.2*i*i*1.25*1.25/n,C=1-f/(s-i);d=.8+.2*((l-u)/(f+C*(l-u)))}return d&&(r.s=d,r.h=Le(Math.atan2(a,o)*180/Math.PI)),r}function ha(e){let t=e.h!==void 0?e.h:0,o=e.s!==void 0?e.s:0,a=e.l!==void 0?e.l:0,r={mode:"oklab",l:ht(a)};if(e.alpha!==void 0&&(r.alpha=e.alpha),!o||a===1)return r.a=r.b=0,r;let l=Math.cos(t/180*Math.PI),n=Math.sin(t/180*Math.PI),[i,s,d]=Ca(r.l,l,n),u,f,C,h;o<.8?(u=1.25*o,f=0,C=.8*i,h=1-C/s):(u=5*(o-.8),f=s,C=.2*s*s*1.25*1.25/i,h=1-C/(d-s));let p=f+u*C/(1-h*u);return r.a=p*l,r.b=p*n,r}var Fu={...aa,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:ma,rgb:e=>ma(et(e))},toMode:{oklab:ha,rgb:e=>tt(ha(e))}},u0=Fu;function ga(e){let t=e.l!==void 0?e.l:0,o=e.a!==void 0?e.a:0,a=e.b!==void 0?e.b:0,r=Math.sqrt(o*o+a*a),l=r?o/r:1,n=r?a/r:1,[i,s]=xo(l,n),d=.5,u=1-d/i,f=s/(r+t*s),C=f*t,h=f*r,p=ht(C),c=h*p/C,m=S1({l:p,a:l*c,b:n*c}),b=Math.cbrt(1/Math.max(m.r,m.g,m.b,0));t=t/b,r=r/b*vo(t)/t,t=vo(t);let g={mode:"okhsv",s:r?(d+s)*h/(s*d+s*u*h):0,v:t?t/C:0};return g.s&&(g.h=Le(Math.atan2(a,o)*180/Math.PI)),e.alpha!==void 0&&(g.alpha=e.alpha),g}function va(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let o=e.h!==void 0?e.h:0,a=e.s!==void 0?e.s:0,r=e.v!==void 0?e.v:0,l=Math.cos(o/180*Math.PI),n=Math.sin(o/180*Math.PI),[i,s]=xo(l,n),d=.5,u=1-d/i,f=1-a*d/(d+s-s*u*a),C=a*s*d/(d+s-s*u*a),h=ht(f),p=C*h/f,c=S1({l:h,a:l*p,b:n*p}),m=Math.cbrt(1/Math.max(c.r,c.g,c.b,0)),b=ht(r*f),g=C*b/f;return t.l=b*m,t.a=g*l*m,t.b=g*n*m,t}var $u={...ra,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:ga,rgb:e=>ga(et(e))},toMode:{oklab:va,rgb:e=>tt(va(e))}},c0=$u;function Nu(e,t){if(!t||t[0]!=="oklab")return;let o={mode:"oklab"},[,a,r,l,n]=t;if(!(a.type===V.Hue||r.type===V.Hue||l.type===V.Hue))return a.type!==V.None&&(o.l=Math.min(Math.max(0,a.type===V.Number?a.value:a.value/100),1)),r.type!==V.None&&(o.a=r.type===V.Number?r.value:r.value*.4/100),l.type!==V.None&&(o.b=l.type===V.Number?l.value:l.value*.4/100),n.type!==V.None&&(o.alpha=Math.min(1,Math.max(0,n.type===V.Number?n.value:n.value/100))),o}var f0=Nu;var Uu={...Bt,mode:"oklab",toMode:{lrgb:S1,rgb:tt},fromMode:{lrgb:pa,rgb:et},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[f0],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},p0=Uu;function qu(e,t){if(!t||t[0]!=="oklch")return;let o={mode:"oklch"},[,a,r,l,n]=t;if(a.type!==V.None){if(a.type===V.Hue)return;o.l=Math.min(Math.max(0,a.type===V.Number?a.value:a.value/100),1)}if(r.type!==V.None&&(o.c=Math.max(0,r.type===V.Number?r.value:r.value*.4/100)),l.type!==V.None){if(l.type===V.Percentage)return;o.h=l.value}return n.type!==V.None&&(o.alpha=Math.min(1,Math.max(0,n.type===V.Number?n.value:n.value/100))),o}var C0=qu;var zu={...At,mode:"oklch",toMode:{oklab:e=>a1(e,"oklab"),rgb:e=>tt(a1(e,"oklab"))},fromMode:{rgb:e=>o1(et(e),"oklch"),oklab:e=>o1(e,"oklch")},parse:[C0],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},m0=zu;var ju=e=>{let{r:t,g:o,b:a,alpha:r}=s1(e),l={mode:"xyz65",x:.486570948648216*t+.265667693169093*o+.1982172852343625*a,y:.2289745640697487*t+.6917385218365062*o+.079286914093745*a,z:0*t+.0451133818589026*o+1.043944368900976*a};return r!==void 0&&(l.alpha=r),l},tl=ju;var Ku=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=d1({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*o,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*o,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*o},"p3");return a!==void 0&&(r.alpha=a),r},ol=Ku;var Gu={...i1,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>ol(We(e)),xyz65:ol},toMode:{rgb:e=>Xe(tl(e)),xyz65:tl}},h0=Gu;var al=e=>{let t=Math.abs(e);return t>=.001953125?Math.sign(e)*Math.pow(t,.5555555555555556):16*e},Wu=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"prophoto",r:al(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*o),g:al(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*o),b:al(e*0+t*0+1.2119675456389452*o)};return a!==void 0&&(r.alpha=a),r},rl=Wu;var ll=(e=0)=>{let t=Math.abs(e);return t>=.03125?Math.sign(e)*Math.pow(t,1.8):e/16},Xu=e=>{let t=ll(e.r),o=ll(e.g),a=ll(e.b),r={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*o+.0313477341283922*a,y:.2880748288194013*t+.7118352342418731*o+899369387256e-16*a,z:0*t+0*o+.8251046025104602*a};return e.alpha!==void 0&&(r.alpha=e.alpha),r},nl=Xu;var Qu={...i1,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:rl,rgb:e=>rl(M1(e))},toMode:{xyz50:nl,rgb:e=>y1(nl(e))}},g0=Qu;var v0=1.09929682680944,Ju=.018053968510807,il=e=>{let t=Math.abs(e);return t>Ju?(Math.sign(e)||1)*(v0*Math.pow(t,.45)-(v0-1)):4.5*e},Yu=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"rec2020",r:il(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*o),g:il(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*o),b:il(e*.0176398574453108-t*.0427706132578085+.9421031212354739*o)};return a!==void 0&&(r.alpha=a),r},sl=Yu;var x0=1.09929682680944,e7=.018053968510807,dl=(e=0)=>{let t=Math.abs(e);return t<e7*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+x0-1)/x0,1/.45)},t7=e=>{let t=dl(e.r),o=dl(e.g),a=dl(e.b),r={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*o+.1688809751641721*a,y:.262700212011267*t+.6779980715188708*o+.059301716469862*a,z:0*t+.0280726930490874*o+1.0609850577107909*a};return e.alpha!==void 0&&(r.alpha=e.alpha),r},ul=t7;var o7={...i1,mode:"rec2020",fromMode:{xyz65:sl,rgb:e=>sl(We(e))},toMode:{xyz65:ul,rgb:e=>Xe(ul(e))},parse:["rec2020"],serialize:"rec2020"},L0=o7;var O1=.0037930732552754493,xa=Math.cbrt(O1);var cl=e=>Math.cbrt(e)-xa,a7=e=>{let{r:t,g:o,b:a,alpha:r}=s1(e),l=cl(.3*t+.622*o+.078*a+O1),n=cl(.23*t+.692*o+.078*a+O1),i=cl(.2434226892454782*t+.2047674442449682*o+.5518098665095535*a+O1),s={mode:"xyb",x:(l-n)/2,y:(l+n)/2,b:i-(l+n)/2};return r!==void 0&&(s.alpha=r),s},w0=a7;var fl=e=>Math.pow(e+xa,3),r7=({x:e,y:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=fl(e+t)-O1,l=fl(t-e)-O1,n=fl(o+t)-O1,i=d1({r:11.031566904639861*r-9.866943908131562*l-.16462299650829934*n,g:-3.2541473810744237*r+4.418770377582723*l-.16462299650829934*n,b:-3.6588512867136815*r+2.7129230459360922*l+1.9459282407775895*n});return a!==void 0&&(i.alpha=a),i},b0=r7;var l7={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:b0},fromMode:{rgb:w0},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:E,y:E,b:E,alpha:{use:E,fixup:se}}},I0=l7;var n7={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:y1,lab:Et},fromMode:{rgb:M1,lab:Ot},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:E,y:E,z:E,alpha:{use:E,fixup:se}}},y0=n7;var i7=e=>{let{x:t,y:o,z:a,alpha:r}=e;t===void 0&&(t=0),o===void 0&&(o=0),a===void 0&&(a=0);let l={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*o-.0501922295431356*a,y:.0296278156881593*t+.990434484573249*o-.0170738250293851*a,z:-.0092430581525912*t+.0150551448965779*o+.7518742899580008*a};return r!==void 0&&(l.alpha=r),l},M0=i7;var s7=e=>{let{x:t,y:o,z:a,alpha:r}=e;t===void 0&&(t=0),o===void 0&&(o=0),a===void 0&&(a=0);let l={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*o+.0632593086610217*a,y:-.0283697069632081*t+1.0099954580058226*o+.021041398966943*a,z:.0123140016883199*t-.0205076964334779*o+1.3303659366080753*a};return r!==void 0&&(l.alpha=r),l},S0=s7;var d7={mode:"xyz65",toMode:{rgb:Xe,xyz50:M0},fromMode:{rgb:We,xyz50:S0},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:E,y:E,z:E,alpha:{use:E,fixup:se}}},R0=d7;var u7=({r:e,g:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*o,i:.59597799*e-.2741761*t-.32180189*o,q:.21147017*e-.52261711*t+.31114694*o};return a!==void 0&&(r.alpha=a),r},k0=u7;var c7=({y:e,i:t,q:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"rgb",r:e+.95608445*t+.6208885*o,g:e-.27137664*t-.6486059*o,b:e-1.10561724*t+1.70250126*o};return a!==void 0&&(r.alpha=a),r},H0=c7;var f7={mode:"yiq",toMode:{rgb:H0},fromMode:{rgb:k0},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:E,i:E,q:E,alpha:{use:E,fixup:se}}},P0=f7;var p7=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,C7=(e=4)=>t=>typeof t=="number"?p7(t,e):t,Lo=C7;var eL=Lo(2);var tL=t1("rgb"),oL=t1("hsl");var pl=e=>{let t=Ko(e);if(!t)return;let o=Go(t.mode);if(!o.serialize||typeof o.serialize=="string"){let a=`color(${o.serialize||`--${t.mode}`} `;return o.channels.forEach((r,l)=>{r!=="alpha"&&(a+=(l?" ":"")+(t[r]!==void 0?t[r]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(a+=` / ${t.alpha}`),a+")"}if(typeof o.serialize=="function")return o.serialize(t)};var UL=he(P2),qL=he(Z2),zL=he(N2),jL=he(U2),KL=he(q2),GL=he(aa),WL=he(ra),XL=he(W2),QL=he(Q2),JL=he(Y2),YL=he(e0),ew=he(Bt),tw=he(o0),ow=he(At),aw=he(r0),rw=he(i0),lw=he(s0),nw=he(d0),iw=he(u0),sw=he(c0),dw=he(p0),uw=he(m0),cw=he(h0),fw=he(g0),pw=he(L0),Cw=he(i1),mw=he(I0),hw=he(y0),gw=he(R0),vw=he(P0);var Cl=t1("rgb"),m7=t1("hsl"),h7=t1("oklch"),g7=t1("oklab"),v7=t1("lch"),x7=t1("lab"),L7=Lo(3),T0=null;function w7(){return T0??(T0=document.createElement("canvas").getContext("2d")),T0}function V0(e){try{let t=w7();if(!t)return null;t.fillStyle="#000000",t.fillStyle=e;let o=t.fillStyle;t.fillStyle="#ffffff",t.fillStyle=e;let a=t.fillStyle;return o===a?o:null}catch{return null}}function _0(e){if(!e||typeof e!="string")return!1;let t=e.trim();return Ct(t)!==void 0?!0:V0(t)!==null}function gt(e){let t={r:255,g:255,b:255,a:1};if(!e||typeof e!="string")return t;let o=e.trim(),a=Ct(o);if(a){let l=Cl(a);if(l&&"r"in l&&"g"in l&&"b"in l)return{r:Math.round(Math.min(255,Math.max(0,l.r*255))),g:Math.round(Math.min(255,Math.max(0,l.g*255))),b:Math.round(Math.min(255,Math.max(0,l.b*255))),a:l.alpha??1}}let r=V0(o);if(r){if(r.startsWith("#")){let n=r.slice(1);return{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:1}}let l=r.match(/rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(l&&l[1]!=null&&l[2]!=null&&l[3]!=null)return{r:+l[1],g:+l[2],b:+l[3],a:l[4]!=null?+l[4]:1}}return t}function Zt(e){let t=Math.round(Math.min(255,Math.max(0,e.r))),o=Math.round(Math.min(255,Math.max(0,e.g))),a=Math.round(Math.min(255,Math.max(0,e.b))),r=Math.round(Math.min(1,Math.max(0,e.a))*100)/100;return r>=1?`rgb(${t}, ${o}, ${a})`:`rgba(${t}, ${o}, ${a}, ${r})`}function La(e){let t=e.startsWith("#")?e.slice(1):e;return/^[0-9a-fA-F]+$/.test(t)&&[3,4,6,8].includes(t.length)}function wo(e){let t=Math.round(Math.min(255,Math.max(0,e.r))),o=Math.round(Math.min(255,Math.max(0,e.g))),a=Math.round(Math.min(255,Math.max(0,e.b))),r=Math.min(1,Math.max(0,e.a)),l=`#${[t,o,a].map(n=>n.toString(16).padStart(2,"0")).join("")}`;return r<1?l+Math.round(r*255).toString(16).padStart(2,"0"):l}function D0(e){return!e||typeof e!="string"?"rgb":Ct(e.trim())?.mode??"rgb"}function Qe(e,t){let o={mode:"rgb",r:e.r/255,g:e.g/255,b:e.b/255,alpha:e.a};switch(t){case"oklch":return h7(o);case"oklab":return g7(o);case"lch":return v7(o);case"lab":return x7(o);default:return o}}function ml(e){let t=e?Cl(e):null;return!t||!("r"in t)||!("g"in t)||!("b"in t)?{r:255,g:255,b:255,a:1}:{r:Math.round(Math.min(255,Math.max(0,t.r*255))),g:Math.round(Math.min(255,Math.max(0,t.g*255))),b:Math.round(Math.min(255,Math.max(0,t.b*255))),a:t.alpha??1}}function hl(e){if(!e)return"";let t={...e},o=t;for(let a of Object.keys(o)){let r=o[a];typeof r=="number"&&(o[a]=L7(r))}return pl(t)}function Ft(e){let t={mode:"rgb",r:e.r/255,g:e.g/255,b:e.b/255},o=m7(t);return o?{h:o.h??0,s:o.s*100,l:o.l*100}:{h:0,s:0,l:0}}function gl(e){let t={mode:"hsl",h:e.h,s:e.s/100,l:e.l/100},o=Cl(t);return!o||!("r"in o)||!("g"in o)||!("b"in o)?{r:0,g:0,b:0}:{r:Math.round(o.r*255),g:Math.round(o.g*255),b:Math.round(o.b*255)}}import{jsx as Ze,jsxs as R1}from"react/jsx-runtime";var vl=16,$t=4,I7=245,O0=260,y7=200,M7="linear-gradient(45deg, #e0e0e0 25%, transparent 25%), linear-gradient(-45deg, #e0e0e0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e0e0e0 75%), linear-gradient(-45deg, transparent 75%, #e0e0e0 75%)",S7=["oklch","oklab","lch","lab","hsl"],E0=["oklch","oklab","lch","lab"],xl=["rgb","hsl","oklch","oklab","lch","lab"];function Ll(e){let t=D0(e);return S7.includes(t)?t:"rgb"}function bo(e,t){let o=Ft({r:e.r,g:e.g,b:e.b}),a=Qe(e,"oklch"),r=Qe(e,"oklab"),l=Qe(e,"lch"),n=Qe(e,"lab");return{hex:P7(t,e),r:e.r,g:e.g,b:e.b,h:Math.round(o.h),s:Math.round(o.s),l:Math.round(o.l),a:Math.round(e.a*100),oklch_l:Math.round(a.l*100),oklch_c:Math.round(a.c*1e3)/10,oklch_h:Math.round(a.h||0),oklab_l:Math.round(r.l*100),oklab_a:Math.round(r.a*1e3)/10,oklab_b:Math.round(r.b*1e3)/10,lch_l:Math.round(l.l),lch_c:Math.round(l.c),lch_h:Math.round(l.h||0),lab_l:Math.round(n.l),lab_a:Math.round(n.a),lab_b:Math.round(n.b)}}function bl(e,t){let o=t.a/100;switch(e){case"oklch":return{mode:"oklch",l:t.oklch_l/100,c:t.oklch_c/100,h:t.oklch_h,alpha:o};case"oklab":return{mode:"oklab",l:t.oklab_l/100,a:t.oklab_a/100,b:t.oklab_b/100,alpha:o};case"lch":return{mode:"lch",l:t.lch_l,c:t.lch_c,h:t.lch_h,alpha:o};case"lab":return{mode:"lab",l:t.lab_l,a:t.lab_a,b:t.lab_b,alpha:o};case"hsl":return{mode:"hsl",h:t.h,s:t.s,l:t.l};default:return{mode:"rgb",r:t.r/255,g:t.g/255,b:t.b/255,alpha:o}}}function R7(e){let t=ft(e);return t?t.getBoundingClientRect():{top:0,bottom:window.innerHeight,left:0,right:window.innerWidth}}function k7(e,t=I7){let o=e.getBoundingClientRect(),a=R7(e),r=a.bottom-o.bottom-$t,l=o.top-a.top-$t,i=r<t&&l>=t?o.top-t-$t:o.bottom+$t;i=Math.max(a.top+$t,Math.min(i,a.bottom-t-$t));let s=o.left;return s+O0>a.right&&(s=a.right-O0-vl),s<a.left+vl&&(s=a.left+vl),{top:i,left:s}}function Il(e){return e!=null&&typeof e=="string"?e:"#ffffff"}function wl(e){let{r:t,g:o,b:a,a:r}=gt(Il(e));return{type:"rgba",r:t,g:o,b:a,a:r}}function H7(e,t){let o=e||Zt(t);return t.a>=1?{backgroundColor:o}:{backgroundColor:o,backgroundImage:`linear-gradient(0deg, ${o}, ${o}), ${M7}`,backgroundSize:"100% 100%, 8px 8px, 8px 8px, 8px 8px, 8px 8px",backgroundPosition:"0 0, 0 0, 0 4px, 4px -4px, -4px 0"}}function P7(e,t){let o=typeof e=="string"?e.trim():"";return La(o)?o:wo(t)}var T7=e=>e.preventDefault(),V7=e=>{e.key==="Enter"&&e.currentTarget.blur()};function _7(e,t){switch(t.type){case"SET_ALL":return{format:e.format,hex:t.hex,r:t.r,g:t.g,b:t.b,h:t.h,s:t.s,l:t.l,a:t.a,oklch_l:t.oklch_l,oklch_c:t.oklch_c,oklch_h:t.oklch_h,oklab_l:t.oklab_l,oklab_a:t.oklab_a,oklab_b:t.oklab_b,lch_l:t.lch_l,lch_c:t.lch_c,lch_h:t.lch_h,lab_l:t.lab_l,lab_a:t.lab_a,lab_b:t.lab_b};case"SET_RGBA":{let{r:o,g:a,b:r,a:l}=t,n=Ft({r:o,g:a,b:r}),i={r:o,g:a,b:r,a:l/100},s=Qe(i,"oklch"),d=Qe(i,"oklab"),u=Qe(i,"lch"),f=Qe(i,"lab");return{...e,hex:wo(i),r:o,g:a,b:r,h:Math.round(n.h),s:Math.round(n.s),l:Math.round(n.l),a:l,oklch_l:Math.round(s.l*100),oklch_c:Math.round(s.c*1e3)/10,oklch_h:Math.round(s.h||0),oklab_l:Math.round(d.l*100),oklab_a:Math.round(d.a*1e3)/10,oklab_b:Math.round(d.b*1e3)/10,lch_l:Math.round(u.l),lch_c:Math.round(u.c),lch_h:Math.round(u.h||0),lab_l:Math.round(f.l),lab_a:Math.round(f.a),lab_b:Math.round(f.b)}}case"SET_HEX":return{...e,hex:t.hex};case"SET_CHANNEL":{let o={...e,[t.channel]:t.value},a;if(e.format==="rgb")a={r:o.r,g:o.g,b:o.b,a:o.a/100};else if(e.format==="hsl"){let d=gl({h:o.h,s:o.s,l:o.l});o.r=Math.round(d.r),o.g=Math.round(d.g),o.b=Math.round(d.b),a={r:o.r,g:o.g,b:o.b,a:o.a/100}}else{let d=bl(e.format,o);a=ml(d),o.r=a.r,o.g=a.g,o.b=a.b}let r=Ft({r:o.r,g:o.g,b:o.b}),l=Qe(a,"oklch"),n=Qe(a,"oklab"),i=Qe(a,"lch"),s=Qe(a,"lab");return{...o,hex:wo(a),h:Math.round(r.h),s:Math.round(r.s),l:Math.round(r.l),oklch_l:Math.round(l.l*100),oklch_c:Math.round(l.c*1e3)/10,oklch_h:Math.round(l.h||0),oklab_l:Math.round(n.l*100),oklab_a:Math.round(n.a*1e3)/10,oklab_b:Math.round(n.b*1e3)/10,lch_l:Math.round(i.l),lch_c:Math.round(i.c),lch_h:Math.round(i.h||0),lab_l:Math.round(s.l),lab_a:Math.round(s.a),lab_b:Math.round(s.b)}}case"SET_FORMAT":return{...e,format:t.format};default:return e}}var D7={placeholder:"Enter color value",ariaValue:"{0} color value",ariaOpenPicker:"{0}, open color picker. Current color: {1}",ariaPicker:"{0} picker",ariaSaturation:"Color saturation and brightness",ariaEyedropper:"Pick color from screen",ariaHue:"Hue, 0 to 360 degrees",ariaAlphaSlider:"Alpha transparency, 0 to 100 percent",ariaHex:"Hexadecimal color value",ariaChannel:"{0} ({1}), {2} to {3}",ariaAlphaInput:"Alpha, 0 to 100 percent",ariaFormatCycle:"Color format: {0}. Click to change format.",titleFormatCycle:"Click to cycle format: RGB, HSL, OKLCH, OKLAB, LCH, LAB",gradientValue:"Gradient",imageValue:"Image"};function O7(e){let t=(e??"").trim();return t===""||t.toLowerCase()==="none"?"":t}function wa({label:e,value:t,onChange:o,id:a="color",aria:r,backgroundImage:l}){let n=e1(D7,r),i=`${a}-trigger`,s=`${a}-popover`,d=Il(t),[{colorInput:u,colorState:f},C]=m2(()=>wl(d)),[h,p]=Re.useReducer(_7,d,L=>{let P=gt(L),G=bo(P,L);return{format:Ll(L),...G}}),c=Re.useRef(h);c.current=h;let m=Re.useRef(null),b=Re.useRef(t),g=Re.useRef(o);g.current=o;let k=Re.useCallback(L=>{let P=c.current.format,G;if(E0.includes(P)){let ae=Qe(L,P);G=hl(ae)}else if(P==="hsl"){let ae=Ft({r:L.r,g:L.g,b:L.b}),ue=Math.round(L.a*100)/100;G=ue>=1?`hsl(${Math.round(ae.h)}, ${Math.round(ae.s)}%, ${Math.round(ae.l)}%)`:`hsla(${Math.round(ae.h)}, ${Math.round(ae.s)}%, ${Math.round(ae.l)}%, ${ue})`}else G=Zt(L);G!==m.current&&(m.current=G,b.current=G,typeof g.current=="function"&&g.current(G))},[]),v=h2(k,y7),_=v2({computePosition:k7,onClose:v.flush,trapFocus:!0});Re.useEffect(()=>{let L=Il(t);if(L===b.current)return;b.current=L;let P=gt(L);C(wl(t));let G=bo(P,L),ae=Ll(L);p({type:"SET_ALL",...G}),ae!==c.current.format&&p({type:"SET_FORMAT",format:ae})},[t,C]);let D=Re.useCallback(L=>{v.cancel();let P=L.target.value;if((!P||!P.startsWith("#"))&&(P="#"+P.replace(/^#+/,"")),La(P)){C({type:"hex",value:P});let G=gt(P),ae=bo(G,P);p({type:"SET_ALL",...ae})}else p({type:"SET_HEX",hex:P})},[v,C]),U=Re.useCallback(()=>{v.cancel();let L=c.current.hex.trim();if(La(L)){let P=gt(L),G=bo(P,L);p({type:"SET_ALL",...G}),k(P)}else{let P=c.current;p({type:"SET_HEX",hex:wo({r:P.r,g:P.g,b:P.b,a:P.a/100})})}},[v,k]),M=Re.useMemo(()=>{switch(h.format){case"hsl":return[{key:"h",label:"H",min:0,max:360},{key:"s",label:"S",min:0,max:100},{key:"l",label:"L",min:0,max:100}];case"oklch":return[{key:"oklch_l",label:"L",min:0,max:100,step:1},{key:"oklch_c",label:"C",min:0,max:40,step:.1},{key:"oklch_h",label:"H",min:0,max:360,step:1}];case"oklab":return[{key:"oklab_l",label:"L",min:0,max:100,step:1},{key:"oklab_a",label:"A",min:-40,max:40,step:.1},{key:"oklab_b",label:"B",min:-40,max:40,step:.1}];case"lch":return[{key:"lch_l",label:"L",min:0,max:100,step:1},{key:"lch_c",label:"C",min:0,max:150,step:1},{key:"lch_h",label:"H",min:0,max:360,step:1}];case"lab":return[{key:"lab_l",label:"L",min:0,max:100,step:1},{key:"lab_a",label:"A",min:-128,max:127,step:1},{key:"lab_b",label:"B",min:-128,max:127,step:1}];default:return[{key:"r",label:"R",min:0,max:255},{key:"g",label:"G",min:0,max:255},{key:"b",label:"B",min:0,max:255}]}},[h.format]),O=Re.useCallback((L,P)=>{v.cancel();let G=String(P).trim(),ae=["oklch_c","oklab_a","oklab_b"].includes(L),ue=G===""?0:ae?parseFloat(G):parseInt(G,10);if(Number.isNaN(ue))return;let me=c.current,ve=M.find(ce=>ce.key===L),He=0,Y=100;ve?(He=ve.min,Y=ve.max):L==="a"?(He=0,Y=100):L==="h"?(He=0,Y=360):me.format==="rgb"&&(He=0,Y=255);let fe=Math.min(Y,Math.max(He,ue));p({type:"SET_CHANNEL",channel:L,value:fe});let Q={...me,[L]:fe},Ce;if(me.format==="rgb")Ce={r:Q.r,g:Q.g,b:Q.b,a:Q.a/100};else if(me.format==="hsl"){let ce=gl({h:Q.h,s:Q.s,l:Q.l});Ce={r:ce.r,g:ce.g,b:ce.b,a:Q.a/100}}else{let ce=bl(me.format,Q);Ce=ml(ce)}C({type:"rgba",...Ce}),k(Ce)},[v,C,k,M]),q=Re.useCallback(L=>{C(L);let P=L.getRgba();p({type:"SET_RGBA",r:Math.round(P.r),g:Math.round(P.g),b:Math.round(P.b),a:Math.round(P.a*100)}),v({r:P.r,g:P.g,b:P.b,a:P.a})},[C,v]),K=Re.useCallback(L=>{let P=L.target.closest('[role="slider"]');P instanceof HTMLElement&&P.focus()},[]);Re.useLayoutEffect(()=>{if(!_.isOpen||!_.popoverRef.current)return;let L=_.popoverRef.current.offsetHeight;L<=0||_.reposition(L)},[_.isOpen,_.reposition]);let X=f?.rgba??{r:255,g:255,b:255,a:1},T=Re.useCallback(()=>{let L=h.format;if(E0.includes(L)){let P=bl(L,h);return hl(P)}else if(L==="hsl"){let P=Ft({r:X.r,g:X.g,b:X.b}),G=Math.round(X.a*100)/100;return G>=1?`hsl(${Math.round(P.h)}, ${Math.round(P.s)}%, ${Math.round(P.l)}%)`:`hsla(${Math.round(P.h)}, ${Math.round(P.s)}%, ${Math.round(P.l)}%, ${G})`}else return Zt(X)},[h,X])(),S=O7(l),x=S!==""&&X.a===0,I=/url\(/i.test(S)?n.imageValue:n.gradientValue,w=x?I:T,y=x?{backgroundImage:S,backgroundSize:"cover",backgroundPosition:"center"}:H7(T,X),[H,A]=Re.useState(T),Z=Re.useRef(H);Z.current=H,Re.useEffect(()=>{A(T)},[T]);let W=Re.useCallback(L=>{let P=L.target.value;A(P)},[]),B=Re.useCallback(()=>{v.cancel();let L=Z.current.trim();if(!L||!_0(L)){A(T);return}let P=gt(L),G=Zt(P),ae=Zt(X);if(G!==ae){C(wl(L));let ue=bo(P,L),me=Ll(L);p({type:"SET_ALL",...ue}),me!==c.current.format&&p({type:"SET_FORMAT",format:me}),L!==m.current&&(m.current=L,b.current=L,typeof g.current=="function"&&g.current(L))}else A(T)},[v,T,X,C]),$=Re.useCallback(L=>{L.key==="Enter"&&L.currentTarget.blur()},[]),F=Re.useCallback(()=>{let L=xl.indexOf(h.format),P=xl[(L+1)%xl.length]??h.format;p({type:"SET_FORMAT",format:P})},[h.format]),R=Re.useMemo(()=>{let L=_.triggerRef.current;if(!L)return document.body;let P=L.getRootNode();return P instanceof ShadowRoot?P:document.body},[_.isOpen,_.triggerRef]);return Ze(l1,{label:e,id:a,className:"colorEditor-fieldset",children:R1("div",{className:"colorEditor-wrapper",children:[Ze("button",{ref:_.triggerRef,id:i,type:"button",className:"colorEditor-swatch-only",onClick:_.toggle,"aria-expanded":_.isOpen,"aria-haspopup":"dialog","aria-controls":s,"aria-label":Pe(n.ariaOpenPicker,[e,w]),children:Ze("span",{style:y,"aria-hidden":"true",className:"colorEditor-swatch"})}),Ze("input",{type:"text",className:"colorEditor-value-input",value:x?w:H,readOnly:x,onChange:W,onBlur:B,onKeyDown:$,"aria-label":Pe(n.ariaValue,[e]),placeholder:n.placeholder,spellCheck:"false",autoComplete:"off"}),_.isOpen&&b7(R1("div",{ref:_.popoverRef,id:s,role:"dialog","aria-modal":"true","aria-label":Pe(n.ariaPicker,[e]),style:{top:_.position.top,left:_.position.left},onDragStart:T7,onMouseUp:K,className:"colorEditor-popover",children:[R1(Rt,{color:u,onChange:q,className:"colorEditor-picker",children:[Ze(Rt.Saturation,{className:"colorEditor-picker-saturation","aria-label":n.ariaSaturation}),R1("div",{className:"colorEditor-picker-toolbar",children:[Ze(Rt.EyeDropper,{"aria-label":n.ariaEyedropper,children:Ze(ro,{size:18,"aria-hidden":"true"})}),R1("div",{className:"colorEditor-picker-sliders",children:[Ze(Rt.Hue,{className:"h-4 colorEditor-picker-hue","aria-label":n.ariaHue}),Ze(Rt.Alpha,{className:"h-4 colorEditor-picker-alpha","aria-label":n.ariaAlphaSlider})]})]})]}),R1("div",{className:"colorEditor-input-wrapper",children:[R1("div",{className:"colorEditor-input-group",children:[Ze("input",{type:"text",value:h.hex,onChange:D,onBlur:U,onKeyDown:V7,"aria-label":n.ariaHex,className:"colorEditor-input-hex",spellCheck:"false",autoComplete:"off"}),Ze("label",{className:"colorEditor-input-label","aria-hidden":"true",children:"HEX"})]}),R1("div",{className:"colorEditor-channels-wrapper",children:[R1("div",{className:"colorEditor-input-container",children:[M.map(L=>Ze("div",{className:"colorEditor-input-group-no-label",children:Ze("input",{type:"number",min:L.min,max:L.max,step:L.step||1,value:h[L.key],onChange:P=>O(L.key,P.target.value),onBlur:P=>O(L.key,P.target.value),"aria-label":Pe(n.ariaChannel,[L.label,h.format.toUpperCase(),L.min,L.max]),"aria-valuemin":L.min,"aria-valuemax":L.max,"aria-valuenow":h[L.key],className:"colorEditor-input-rgba"})},L.key)),Ze("div",{className:"colorEditor-input-group-no-label",children:Ze("input",{type:"number",min:0,max:100,value:h.a,onChange:L=>O("a",L.target.value),onBlur:L=>O("a",L.target.value),"aria-label":n.ariaAlphaInput,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":h.a,className:"colorEditor-input-rgba"})})]}),Ze("div",{className:"colorEditor-format-selector",children:R1("button",{type:"button",className:"colorEditor-format-picker",onClick:F,"aria-label":Pe(n.ariaFormatCycle,[h.format.toUpperCase()]),"aria-live":"polite",title:n.titleFormatCycle,children:[M.map(L=>Ze("span",{className:"colorEditor-format-letter","aria-hidden":"true",children:L.label},L.key)),Ze("span",{className:"colorEditor-format-letter","aria-hidden":"true",children:"A"})]})})]})]})]}),R)]})})}import je from"react";import{jsx as Nt,jsxs as B7}from"react/jsx-runtime";var E7={ariaValue:"{0} value",ariaUnit:"{0} unit"};function B0(e,t,o,a,r){let l=Ge(e,o,a);if(l.numericValue!=="")return l.unit;if(t!=null&&t!==""){let n=Ge(t,o,a);if(n.numericValue!==""&&r.has(n.unit))return n.unit}return o}function k1({label:e,value:t,onChange:o,units:a=Do,constraints:r=m1,defaultUnit:l="px",placeholder:n=0,id:i="dimension",icon:s,aria:d}){let u=e1(E7,d),f=je.useMemo(()=>new Set(a.map(T=>T.value)),[a]),C=je.useMemo(()=>eo(a),[a]),h=je.useMemo(()=>{if(n==null||n==="")return"";if(typeof n=="number")return String(n);let T=Ge(String(n),l,C);return T.numericValue!==""?String(T.numericValue):String(n)},[n,l,C]),[p,c]=je.useState(()=>{let T=Ge(t,l,C);return T.numericValue!==""?String(T.numericValue):""}),[m,b]=je.useState(()=>B0(t,n,l,C,f)),g=je.useRef(o);g.current=o;let k=je.useRef(t),v=je.useRef(n);je.useEffect(()=>{if(t===k.current&&n===v.current)return;k.current=t,v.current=n;let T=Ge(t,l,C);c(T.numericValue!==""?String(T.numericValue):""),b(B0(t,n,l,C,f))},[t,n,l,C,f]);let _=je.useCallback((T,S)=>{let x=parseFloat(T);if(T===""||isNaN(x)){if(k.current==="")return;k.current="",typeof g.current=="function"&&g.current("");return}let I=h1(x,S,r),w=g1(I,S,r),y=Oo(w,S);y!==k.current&&(k.current=y,typeof g.current=="function"&&g.current(y))},[r]),D=je.useCallback(T=>{let S=T.target.value;c(S);let I=S.trim().match(C)?.[2];I&&f.has(I)&&I!==m&&b(I)},[C,m,f]),U=je.useCallback(T=>{let S=T.clipboardData.getData("text"),x=Ge(S,l,C);if(x.numericValue!==""&&x.unit&&f.has(x.unit)){T.preventDefault(),c(String(x.numericValue)),b(x.unit);let I=h1(x.numericValue,x.unit,r),w=g1(I,x.unit,r),y=Oo(w,x.unit);k.current=y,typeof g.current=="function"&&g.current(y)}},[l,C,f,r]),M=je.useCallback(()=>{if(p===""){_("",m);return}let T=parseFloat(p);if(isNaN(T)){let I=Ge(t,l,C);c(I.numericValue!==""?String(I.numericValue):"");return}let S=h1(T,m,r),x=g1(S,m,r);c(String(x)),_(String(x),m)},[p,m,t,l,C,r,_]),O=je.useCallback(T=>{if(T.key==="Enter"){T.currentTarget.blur();return}if(T.key==="ArrowUp"||T.key==="ArrowDown"){T.preventDefault();let S=Eo(p,T.key,T.shiftKey,m,r);if(S===null)return;c(S),_(S,m)}},[p,m,r,_]),q=je.useCallback(T=>{let S=T.target.value;if(!f.has(S))return;if(b(S),p===""){_("",S);return}let x=parseFloat(p);if(isNaN(x))return;let I=h1(x,S,r),w=g1(I,S,r);c(String(w));let y=Oo(w,S);k.current=y,typeof g.current=="function"&&g.current(y)},[p,f,r,_]),K=`${i}-input`,X=`${i}-unit`,N=a.some(T=>T.value!=="");return Nt(l1,{label:e,id:i,className:"dimensionEditor-fieldset",children:B7("div",{className:"dimensionEditor-row",children:[s&&Nt("span",{className:"dimensionEditor-icon","aria-hidden":"true",children:Nt(s,{size:14,width:14,height:14})}),Nt("input",{id:K,type:"text",className:s?"dimensionEditor-input dimensionEditor-input--with-icon":"dimensionEditor-input",value:p,placeholder:h,onChange:D,onPaste:U,onBlur:M,onKeyDown:O,"aria-label":Pe(u.ariaValue,[e]),autoComplete:"off",spellCheck:"false"}),N&&Nt("select",{id:X,className:"dimensionEditor-unit",value:m,onChange:q,"aria-label":Pe(u.ariaUnit,[e]),children:a.map(T=>Nt("option",{value:T.value,children:T.label},T.value||"__unitless__"))})]})})}function Je(e,t){if(e==null)return{};var o={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;o[a]=e[a]}return o}function le(){return le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var a in o)({}).hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e},le.apply(null,arguments)}var ee=Pn(z0(),1),U7=Pn(W0(),1);import*as pe from"react";import{cloneElement as db,Component as ub,useRef as c1,useCallback as de,useEffect as H1,useMemo as Ut}from"react";var X0=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Q0=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",Va=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let o=getComputedStyle(e,null);return Q0(o.overflowY,t)||Q0(o.overflowX,t)||(a=>{let r=(l=>{if(!l.ownerDocument||!l.ownerDocument.defaultView)return null;try{return l.ownerDocument.defaultView.frameElement}catch{return null}})(a);return!!r&&(r.clientHeight<a.scrollHeight||r.clientWidth<a.scrollWidth)})(e)}return!1},_a=(e,t,o,a,r,l,n,i)=>l<e&&n>t||l>e&&n<t?0:l<=e&&i<=o||n>=t&&i>=o?l-e-a:n>t&&i<o||l<e&&i>o?n-t+r:0,N7=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)},J0=(e,t)=>{var o,a,r,l;if(typeof document>"u")return[];let{scrollMode:n,block:i,inline:s,boundary:d,skipOverflowHiddenElements:u}=t,f=typeof d=="function"?d:x=>x!==d;if(!X0(e))throw new TypeError("Invalid target");let C=document.scrollingElement||document.documentElement,h=[],p=e;for(;X0(p)&&f(p);){if(p=N7(p),p===C){h.push(p);break}p!=null&&p===document.body&&Va(p)&&!Va(document.documentElement)||p!=null&&Va(p,u)&&h.push(p)}let c=(a=(o=window.visualViewport)==null?void 0:o.width)!=null?a:innerWidth,m=(l=(r=window.visualViewport)==null?void 0:r.height)!=null?l:innerHeight,{scrollX:b,scrollY:g}=window,{height:k,width:v,top:_,right:D,bottom:U,left:M}=e.getBoundingClientRect(),{top:O,right:q,bottom:K,left:X}=(x=>{let I=window.getComputedStyle(x);return{top:parseFloat(I.scrollMarginTop)||0,right:parseFloat(I.scrollMarginRight)||0,bottom:parseFloat(I.scrollMarginBottom)||0,left:parseFloat(I.scrollMarginLeft)||0}})(e),N=i==="start"||i==="nearest"?_-O:i==="end"?U+K:_+k/2-O+K,T=s==="center"?M+v/2-X+q:s==="end"?D+q:M-X,S=[];for(let x=0;x<h.length;x++){let I=h[x],{height:w,width:y,top:H,right:A,bottom:Z,left:W}=I.getBoundingClientRect();if(n==="if-needed"&&_>=0&&M>=0&&U<=m&&D<=c&&(I===C&&!Va(I)||_>=H&&U<=Z&&M>=W&&D<=A))return S;let B=getComputedStyle(I),$=parseInt(B.borderLeftWidth,10),F=parseInt(B.borderTopWidth,10),R=parseInt(B.borderRightWidth,10),L=parseInt(B.borderBottomWidth,10),P=0,G=0,ae="offsetWidth"in I?I.offsetWidth-I.clientWidth-$-R:0,ue="offsetHeight"in I?I.offsetHeight-I.clientHeight-F-L:0,me="offsetWidth"in I?I.offsetWidth===0?0:y/I.offsetWidth:0,ve="offsetHeight"in I?I.offsetHeight===0?0:w/I.offsetHeight:0;if(C===I)P=i==="start"?N:i==="end"?N-m:i==="nearest"?_a(g,g+m,m,F,L,g+N,g+N+k,k):N-m/2,G=s==="start"?T:s==="center"?T-c/2:s==="end"?T-c:_a(b,b+c,c,$,R,b+T,b+T+v,v),P=Math.max(0,P+g),G=Math.max(0,G+b);else{P=i==="start"?N-H-F:i==="end"?N-Z+L+ue:i==="nearest"?_a(H,Z,w,F,L+ue,N,N+k,k):N-(H+w/2)+ue/2,G=s==="start"?T-W-$:s==="center"?T-(W+y/2)+ae/2:s==="end"?T-A+R+ae:_a(W,A,y,$,R+ae,T,T+v,v);let{scrollLeft:He,scrollTop:Y}=I;P=ve===0?0:Math.max(0,Math.min(Y+P/ve,I.scrollHeight-w/ve+ue)),G=me===0?0:Math.max(0,Math.min(He+G/me,I.scrollWidth-y/me+ae)),N+=Y-P,T+=He-G}S.push({el:I,top:P,left:G})}return S};var q7=0;function l5(){return String(q7++)}function Mo(e){var t=pe.useRef(e);return t.current=e,t}function z7(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){t.forEach(function(r){typeof r=="function"?r(a):r&&(r.current=a)})}}function Sl(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){for(var r=arguments.length,l=new Array(r>1?r-1:0),n=1;n<r;n++)l[n-1]=arguments[n];return t.some(function(i){return i&&i.apply(void 0,[a].concat(l)),a.preventDownshiftDefault||a.hasOwnProperty("nativeEvent")&&a.nativeEvent.preventDownshiftDefault})}}function n5(e,t){var o;function a(){o&&clearTimeout(o)}function r(){for(var l=arguments.length,n=new Array(l),i=0;i<l;i++)n[i]=arguments[i];a(),o=setTimeout(function(){o=null,e.apply(void 0,n)},t)}return r.cancel=a,r}var j7=n5(function(e){i5(e).textContent=""},500);function i5(e){var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}function K7(e,t){if(!(!e||!t)){var o=i5(t);o.textContent=e,j7(t)}}function G7(e){var t=e?.getElementById("a11y-status-message");t&&t.remove()}function So(){}var kl=So;function Oa(e,t){if(!t)return e;var o=Object.keys(e);return o.reduce(function(a,r){return t[r]!==void 0&&(a[r]=t[r]),a},le({},e))}function W7(e,t){if(e){var o=J0(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});o.forEach(function(a){var r=a.el,l=a.top,n=a.left;r.scrollTop=l,r.scrollLeft=n})}}function Y0(e,t,o){var a=e===t||t instanceof o.Node&&e.contains&&e.contains(t);return a}function X7(e,t){var o;function a(){o&&clearTimeout(o)}function r(){for(var l=arguments.length,n=new Array(l),i=0;i<l;i++)n[i]=arguments[i];a(),o=setTimeout(function(){o=null,e.apply(void 0,n)},t)}return r.cancel=a,r}function Ve(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){for(var r=arguments.length,l=new Array(r>1?r-1:0),n=1;n<r;n++)l[n-1]=arguments[n];return t.some(function(i){return i&&i.apply(void 0,[a].concat(l)),a.preventDownshiftDefault||a.hasOwnProperty("nativeEvent")&&a.nativeEvent.preventDownshiftDefault})}}function E1(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){t.forEach(function(r){typeof r=="function"?r(a):r&&(r.current=a)})}}function Q7(e,t){return e[t]!==void 0}function Ea(e){var t=e.key,o=e.keyCode;return o>=37&&o<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function ot(e,t,o,a,r){r===void 0&&(r=!1);var l=o.length;if(l===0)return-1;var n=l-1;(typeof e!="number"||e<0||e>n)&&(e=t>0?-1:n+1);var i=e+t;i<0?i=r?n:0:i>n&&(i=r?0:n);var s=qt(i,t<0,o,a,r);return s===-1?e>=l?-1:e:s}function qt(e,t,o,a,r){r===void 0&&(r=!1);var l=o.length;if(t){for(var n=e;n>=0;n--)if(!a(o[n],n))return n}else for(var i=e;i<l;i++)if(!a(o[i],i))return i;return r?qt(t?l-1:0,t,o,a):-1}function e5(e,t,o,a){return a===void 0&&(a=!0),o&&t.some(function(r){return r&&(Y0(r,e,o)||a&&Y0(r,o.document.activeElement,o))})}function Hl(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function J7(e,t,o,a){for(var r=e.type,l={},n=Object.keys(o),i=0,s=n;i<s.length;i++){var d=s[i];Y7(d,e,t,o,a),a[d]!==o[d]&&(l[d]=a[d])}t.onStateChange&&Object.keys(l).length&&t.onStateChange(le({type:r},l))}function Y7(e,t,o,a,r){if(r[e]!==a[e]){var l="on"+Hl(e)+"Change",n=o[l];if(typeof n=="function"){var i=t.type;n(le({type:i},r))}}}function s5(e,t,o,a){var r=pe.useRef(null),l=pe.useRef(void 0),n=Mo(t),i=pe.useCallback(function(C,h){l.current=h,C=Oa(C,n.current);var p=e(C,n.current,h),c=n.current.stateReducer(C,le({},h,{changes:p}));return le({},C,c)},[n,e]),s=pe.useReducer(i,t,o),d=s[0],u=s[1],f=l.current;return pe.useEffect(function(){var C,h=Oa((C=r.current)!=null?C:{},n.current),p=f&&r.current&&!a(h,d);p&&J7(f,n.current,h,d),r.current=d},[d,f,a,n]),[d,u]}function Pl(e,t,o,a){var r=s5(e,t,o,a),l=r[0],n=r[1];return[Oa(l,t),n]}function Tl(e,t,o,a){if(e!==void 0&&t!==void 0)return[e,t];if(e!==void 0){var r=o.indexOf(e);if(r<0)throw new Error(a);return[e,o.indexOf(e)]}if(t!==void 0){var l=o[t];if(l===void 0)throw new Error(a);return[l,t]}throw new Error(a)}function Na(){var e=pe.useRef(!0);return pe.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function e4(e,t){return t.changes}var t4={environment:ee.default.shape({addEventListener:ee.default.func.isRequired,removeEventListener:ee.default.func.isRequired,document:ee.default.shape({createElement:ee.default.func.isRequired,getElementById:ee.default.func.isRequired,activeElement:ee.default.any.isRequired,body:ee.default.any.isRequired}).isRequired,Node:ee.default.func.isRequired}),itemToKey:ee.default.func,stateReducer:ee.default.func};function P1(e,t,o){var a=e["default"+Hl(t)];return a!==void 0?a:o[t]}function vt(e,t,o){var a=e[t];if(a!==void 0)return a;var r=e["initial"+Hl(t)];return r!==void 0?r:P1(e,t,o)}var t5=n5(function(e,t){K7(e,t)},200);function Vl(e,t,o,a){var r=a?.document,l=Na();pe.useEffect(function(){if(!(!e||l||!r)){var n=e(t);t5(n,r)}},o),pe.useEffect(function(){return function(){t5.cancel(),G7(r)}},[r])}var Io=le({},t4,{getA11yStatusMessage:ee.default.func,highlightedIndex:ee.default.number,defaultHighlightedIndex:ee.default.number,initialHighlightedIndex:ee.default.number,isOpen:ee.default.bool,defaultIsOpen:ee.default.bool,initialIsOpen:ee.default.bool,selectedItem:ee.default.any,initialSelectedItem:ee.default.any,defaultSelectedItem:ee.default.any,id:ee.default.string,labelId:ee.default.string,menuId:ee.default.string,getItemId:ee.default.func,toggleButtonId:ee.default.string,onSelectedItemChange:ee.default.func,onHighlightedIndexChange:ee.default.func,onStateChange:ee.default.func,onIsOpenChange:ee.default.func,scrollIntoView:ee.default.func}),yo={itemToString:function(t){return t?String(t):""},itemToKey:function(t){return t},stateReducer:e4,scrollIntoView:W7,environment:typeof window>"u"?void 0:window},Ye={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""},o4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?pe.useLayoutEffect:pe.useEffect;function a4(e){return/^\S{1}$/.test(e)}function d5(e){var t=vt(e,"selectedItem",Ye),o=vt(e,"isOpen",Ye),a=r4(e),r=vt(e,"inputValue",Ye);return{highlightedIndex:a<0&&t&&o?e.items.findIndex(function(l){return e.itemToKey(l)===e.itemToKey(t)}):a,isOpen:o,selectedItem:t,inputValue:r}}function xt(e,t,o){var a=e.items,r=e.initialHighlightedIndex,l=e.defaultHighlightedIndex,n=e.isItemDisabled,i=e.itemToKey,s=t.selectedItem,d=t.highlightedIndex;return a.length===0?-1:r!==void 0&&d===r&&!n(a[r],r)?r:l!==void 0&&!n(a[l],l)?l:s?a.findIndex(function(u){return i(s)===i(u)}):o<0&&!n(a[a.length-1],a.length-1)?a.length-1:o>0&&!n(a[0],0)?0:-1}function u5(e,t,o){var a=pe.useRef({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1}),r=pe.useCallback(function(){return o.map(function(l){return l.current})},[o]);return pe.useEffect(function(){if(!e)return So;function l(){a.current.isTouchEnd=!1,a.current.isMouseDown=!0}function n(u){a.current.isMouseDown=!1,e5(u.target,r(),e)||t()}function i(){a.current.isTouchEnd=!1,a.current.isTouchMove=!1}function s(){a.current.isTouchMove=!0}function d(u){a.current.isTouchEnd=!0,!a.current.isTouchMove&&!e5(u.target,r(),e,!1)&&t()}return e.addEventListener("mousedown",l),e.addEventListener("mouseup",n),e.addEventListener("touchstart",i),e.addEventListener("touchmove",s),e.addEventListener("touchend",d),function(){e.removeEventListener("mousedown",l),e.removeEventListener("mouseup",n),e.removeEventListener("touchstart",i),e.removeEventListener("touchmove",s),e.removeEventListener("touchend",d)}},[e,r,t]),a.current}var _l=function(){return So};function c5(e){var t=e.highlightedIndex,o=e.isOpen,a=e.itemRefs,r=e.getItemNodeFromIndex,l=e.menuElement,n=e.scrollIntoView,i=pe.useRef(!0);return o4(function(){t<0||!o||!Object.keys(a.current).length||(i.current===!1?i.current=!0:n(r(t),l))},[t]),i}var Dl=So;function Ba(e,t,o){var a;o===void 0&&(o=!0);var r=((a=e.items)==null?void 0:a.length)&&t>=0;return le({isOpen:!1,highlightedIndex:-1},r&&le({selectedItem:e.items[t],isOpen:P1(e,"isOpen",Ye),highlightedIndex:P1(e,"highlightedIndex",Ye)},o&&{inputValue:e.itemToString(e.items[t])}))}function f5(e,t){return e.isOpen===t.isOpen&&e.inputValue===t.inputValue&&e.highlightedIndex===t.highlightedIndex&&e.selectedItem===t.selectedItem}function Aa(e){var t=P1(e,"highlightedIndex",Ye);return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function r4(e){var t=vt(e,"highlightedIndex",Ye);return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function p5(e,t,o,a){var r=o.type,l;switch(r){case a.ItemMouseMove:l={highlightedIndex:o.disabled?-1:o.index};break;case a.MenuMouseLeave:l={highlightedIndex:-1};break;case a.ToggleButtonClick:case a.FunctionToggleMenu:l={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:xt(t,e,0)};break;case a.FunctionOpenMenu:l={isOpen:!0,highlightedIndex:xt(t,e,0)};break;case a.FunctionCloseMenu:l={isOpen:!1};break;case a.FunctionSetHighlightedIndex:l={highlightedIndex:t.isItemDisabled(t.items[o.highlightedIndex],o.highlightedIndex)?-1:o.highlightedIndex};break;case a.FunctionSetInputValue:l={inputValue:o.inputValue};break;case a.FunctionReset:l={highlightedIndex:Aa(t),isOpen:P1(t,"isOpen",Ye),selectedItem:P1(t,"selectedItem",Ye),inputValue:P1(t,"inputValue",Ye)};break;default:throw new Error("Reducer called without proper action type.")}return le({},e,l)}var l4=le({},Io,{items:ee.default.array.isRequired,isItemDisabled:ee.default.func}),n4=le({},yo,{isItemDisabled:function(){return!1}});function i4(e){for(var t=e.keysSoFar,o=e.highlightedIndex,a=e.items,r=e.itemToString,l=e.isItemDisabled,n=t.toLowerCase(),i=0;i<a.length;i++){var s=(i+o+(t.length<2?1:0))%a.length,d=a[s];if(d!==void 0&&r(d).toLowerCase().startsWith(n)&&!l(d,s))return s}return o}var Da=0,Ol=1,El=2,Za=3,Bl=4,Al=5,Zl=6,Fl=7,$l=8,Nl=9,Ul=10,Fa=11,C5=12,m5=13,ql=14,h5=15,g5=16,v5=17,x5=18,zl=19,Rl=20,L5=21,w5=Object.freeze({__proto__:null,FunctionCloseMenu:v5,FunctionOpenMenu:g5,FunctionReset:L5,FunctionSelectItem:zl,FunctionSetHighlightedIndex:x5,FunctionSetInputValue:Rl,FunctionToggleMenu:h5,ItemClick:ql,ItemMouseMove:m5,MenuMouseLeave:C5,ToggleButtonBlur:Fa,ToggleButtonClick:Da,ToggleButtonKeyDownArrowDown:Ol,ToggleButtonKeyDownArrowUp:El,ToggleButtonKeyDownCharacter:Za,ToggleButtonKeyDownEnd:Zl,ToggleButtonKeyDownEnter:Fl,ToggleButtonKeyDownEscape:Bl,ToggleButtonKeyDownHome:Al,ToggleButtonKeyDownPageDown:Ul,ToggleButtonKeyDownPageUp:Nl,ToggleButtonKeyDownSpaceButton:$l});function s4(e,t,o){var a,r=o.type,l=o.altKey,n;switch(r){case ql:n={isOpen:P1(t,"isOpen",Ye),highlightedIndex:Aa(t),selectedItem:t.items[o.index]};break;case Za:{var i=o.key,s=""+e.inputValue+i,d=!e.isOpen&&e.selectedItem?t.items.findIndex(function(h){return t.itemToKey(h)===t.itemToKey(e.selectedItem)}):e.highlightedIndex,u=i4({keysSoFar:s,highlightedIndex:d,items:t.items,itemToString:t.itemToString,isItemDisabled:t.isItemDisabled});n={inputValue:s,highlightedIndex:u,isOpen:!0}}break;case Ol:{var f=e.isOpen?ot(e.highlightedIndex,1,t.items,t.isItemDisabled):l&&e.selectedItem==null?-1:xt(t,e,1);n={highlightedIndex:f,isOpen:!0}}break;case El:if(e.isOpen&&l)n=Ba(t,e.highlightedIndex,!1);else{var C=e.isOpen?ot(e.highlightedIndex,-1,t.items,t.isItemDisabled):xt(t,e,-1);n={highlightedIndex:C,isOpen:!0}}break;case Fl:case $l:n=Ba(t,e.highlightedIndex,!1);break;case Al:n={highlightedIndex:qt(0,!1,t.items,t.isItemDisabled),isOpen:!0};break;case Zl:n={highlightedIndex:qt(t.items.length-1,!0,t.items,t.isItemDisabled),isOpen:!0};break;case Nl:n={highlightedIndex:ot(e.highlightedIndex,-10,t.items,t.isItemDisabled)};break;case Ul:n={highlightedIndex:ot(e.highlightedIndex,10,t.items,t.isItemDisabled)};break;case Bl:n={isOpen:!1,highlightedIndex:-1};break;case Fa:n=le({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((a=t.items)==null?void 0:a.length)&&{selectedItem:t.items[e.highlightedIndex]});break;case zl:n={selectedItem:o.selectedItem};break;default:return p5(e,t,o,w5)}return le({},e,n)}var d4=le({},pe),b5=d4.useId,I5=typeof b5=="function"?u4:c4;function u4(e){var t=e.id,o=e.labelId,a=e.menuId,r=e.getItemId,l=e.toggleButtonId,n=e.inputId,i="downshift-"+b5();t||(t=i);var s=pe.useMemo(function(){return{labelId:o??t+"-label",menuId:a??t+"-menu",getItemId:r??function(d){return t+"-item-"+d},toggleButtonId:l??t+"-toggle-button",inputId:n??t+"-input"}},[r,t,n,o,a,l]);return s}function c4(e){var t=e.id,o=e.labelId,a=e.menuId,r=e.getItemId,l=e.toggleButtonId,n=e.inputId,i=pe.useRef(t??"downshift-"+l5()),s=i.current,d=pe.useMemo(function(){return{labelId:o??s+"-label",menuId:a??s+"-menu",getItemId:r??function(u){return s+"-item-"+u},toggleButtonId:l??s+"-toggle-button",inputId:n??s+"-input"}},[r,n,o,a,l,s]);return d}var f4=["onClick"],p4=["onMouseLeave","refKey","ref"],C4=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],m4=["item","index","onMouseMove","onClick","onMouseDown","onPress","refKey","disabled","ref"];Ua.stateChangeTypes=w5;function Ua(e){e===void 0&&(e={}),kl(e,Ua,l4);var t=le({},n4,e),o=t.scrollIntoView,a=t.environment,r=t.getA11yStatusMessage,l=Pl(s4,t,d5,f5),n=l[0],i=l[1],s=n.isOpen,d=n.highlightedIndex,u=n.selectedItem,f=n.inputValue,C=c1(null),h=c1(null),p=c1({}),c=c1(null),m=I5(t),b=Mo({state:n,props:t}),g=de(function(H){return p.current[m.getItemId(H)]},[m]);Vl(r,n,[s,d,u,f],a);var k=c5({menuElement:h.current,highlightedIndex:d,isOpen:s,itemRefs:p,scrollIntoView:o,getItemNodeFromIndex:g});H1(function(){return c.current=X7(function(H){H({type:Rl,inputValue:""})},500),function(){c.current.cancel()}},[]),H1(function(){f&&c.current(i)},[i,f]),Dl({props:t,state:n}),H1(function(){var H=vt(t,"isOpen",Ye);H&&C.current&&C.current.focus()},[]);var v=de(function(){b.current.state.isOpen&&i({type:Fa})},[i,b]),_=Ut(function(){return[h,C]},[]),D=u5(a,v,_),U=_l("getMenuProps","getToggleButtonProps");H1(function(){s||(p.current={})},[s]);var M=Ut(function(){return{ArrowDown:function(A){A.preventDefault(),i({type:Ol,altKey:A.altKey})},ArrowUp:function(A){A.preventDefault(),i({type:El,altKey:A.altKey})},Home:function(A){A.preventDefault(),i({type:Al})},End:function(A){A.preventDefault(),i({type:Zl})},Escape:function(){b.current.state.isOpen&&i({type:Bl})},Enter:function(A){A.preventDefault(),i({type:b.current.state.isOpen?Fl:Da})},PageUp:function(A){b.current.state.isOpen&&(A.preventDefault(),i({type:Nl}))},PageDown:function(A){b.current.state.isOpen&&(A.preventDefault(),i({type:Ul}))}," ":function(A){A.preventDefault();var Z=b.current.state;if(!Z.isOpen){i({type:Da});return}Z.inputValue?i({type:Za,key:" "}):i({type:$l})}}},[i,b]),O=de(function(){i({type:h5})},[i]),q=de(function(){i({type:v5})},[i]),K=de(function(){i({type:g5})},[i]),X=de(function(H){i({type:x5,highlightedIndex:H})},[i]),N=de(function(H){i({type:zl,selectedItem:H})},[i]),T=de(function(){i({type:L5})},[i]),S=de(function(H){i({type:Rl,inputValue:H})},[i]),x=de(function(H){var A=H===void 0?{}:H,Z=A.onClick,W=Je(A,f4),B=function(){var F;(F=C.current)==null||F.focus()};return le({id:m.labelId,htmlFor:m.toggleButtonId,onClick:Ve(Z,B)},W)},[m]),I=de(function(H,A){var Z,W=H===void 0?{}:H,B=W.onMouseLeave,$=W.refKey,F=$===void 0?"ref":$,R=W.ref,L=Je(W,p4),P=A===void 0?{}:A,G=P.suppressRefError,ae=G===void 0?!1:G,ue=function(){i({type:C5})};return U("getMenuProps",ae,F,h),le((Z={},Z[F]=E1(R,function(me){h.current=me}),Z.id=m.menuId,Z.role="listbox",Z["aria-labelledby"]=L&&L["aria-label"]?void 0:""+m.labelId,Z.onMouseLeave=Ve(B,ue),Z),L)},[i,U,m]),w=de(function(H,A){var Z,W=H===void 0?{}:H,B=W.onBlur,$=W.onClick;W.onPress;var F=W.onKeyDown,R=W.refKey,L=R===void 0?"ref":R,P=W.ref,G=Je(W,C4),ae=A===void 0?{}:A,ue=ae.suppressRefError,me=ue===void 0?!1:ue,ve=b.current.state,He=function(){i({type:Da})},Y=function(){ve.isOpen&&!D.isMouseDown&&i({type:Fa})},fe=function(ce){var ge=Ea(ce);ge&&M[ge]?M[ge](ce):a4(ge)&&i({type:Za,key:ge})},Q=le((Z={},Z[L]=E1(P,function(Ce){C.current=Ce}),Z["aria-activedescendant"]=ve.isOpen&&ve.highlightedIndex>-1?m.getItemId(ve.highlightedIndex):"",Z["aria-controls"]=m.menuId,Z["aria-expanded"]=b.current.state.isOpen,Z["aria-haspopup"]="listbox",Z["aria-labelledby"]=G&&G["aria-label"]?void 0:""+m.labelId,Z.id=m.toggleButtonId,Z.role="combobox",Z.tabIndex=0,Z.onBlur=Ve(B,Y),Z),G);return G.disabled||(Q.onClick=Ve($,He),Q.onKeyDown=Ve(F,fe)),U("getToggleButtonProps",me,L,C),Q},[i,m,b,D,U,M]),y=de(function(H){var A,Z=H===void 0?{}:H,W=Z.item,B=Z.index,$=Z.onMouseMove,F=Z.onClick,R=Z.onMouseDown;Z.onPress;var L=Z.refKey,P=L===void 0?"ref":L,G=Z.disabled,ae=Z.ref,ue=Je(Z,m4);G!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useSelect.');var me=b.current,ve=me.state,He=me.props,Y=Tl(W,B,He.items,"Pass either item or index to getItemProps!"),fe=Y[0],Q=Y[1],Ce=He.isItemDisabled(fe,Q),ce=function(){D.isTouchEnd||Q===ve.highlightedIndex||(k.current=!1,i({type:m5,index:Q,disabled:Ce}))},ge=function(){i({type:ql,index:Q})},ye=function(f1){return f1.preventDefault()},Me=le((A={},A[P]=E1(ae,function(ke){ke&&(p.current[m.getItemId(Q)]=ke)}),A["aria-disabled"]=Ce,A["aria-selected"]=fe===ve.selectedItem,A.id=m.getItemId(Q),A.role="option",A),ue);return Ce||(Me.onClick=Ve(F,ge)),Me.onMouseMove=Ve($,ce),Me.onMouseDown=Ve(R,ye),Me},[b,m,D,k,i]);return{getToggleButtonProps:w,getLabelProps:x,getMenuProps:I,getItemProps:y,toggleMenu:O,openMenu:K,closeMenu:q,setHighlightedIndex:X,selectItem:N,reset:T,setInputValue:S,highlightedIndex:d,isOpen:s,selectedItem:u,inputValue:f}}var jl=0,Kl=1,Gl=2,Wl=3,Xl=4,Ql=5,Jl=6,Yl=7,en=8,$a=9,tn=10,y5=11,M5=12,on=13,S5=14,R5=15,k5=16,H5=17,P5=18,an=19,T5=20,V5=21,rn=22,_5=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:rn,FunctionCloseMenu:H5,FunctionOpenMenu:k5,FunctionReset:V5,FunctionSelectItem:an,FunctionSetHighlightedIndex:P5,FunctionSetInputValue:T5,FunctionToggleMenu:R5,InputBlur:$a,InputChange:en,InputClick:tn,InputKeyDownArrowDown:jl,InputKeyDownArrowUp:Kl,InputKeyDownEnd:Xl,InputKeyDownEnter:Yl,InputKeyDownEscape:Gl,InputKeyDownHome:Wl,InputKeyDownPageDown:Jl,InputKeyDownPageUp:Ql,ItemClick:on,ItemMouseMove:M5,MenuMouseLeave:y5,ToggleButtonClick:S5});function h4(e){var t=d5(e),o=t.selectedItem,a=t.inputValue;return a===""&&o&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(a=e.itemToString(o)),le({},t,{inputValue:a})}var g4=le({},Io,{items:ee.default.array.isRequired,isItemDisabled:ee.default.func,inputValue:ee.default.string,defaultInputValue:ee.default.string,initialInputValue:ee.default.string,inputId:ee.default.string,onInputValueChange:ee.default.func});function v4(e,t,o,a){var r=c1(),l=s5(e,t,o,a),n=l[0],i=l[1],s=Na();return H1(function(){if(Q7(t,"selectedItem")){if(!s){var d=t.itemToKey(t.selectedItem)!==t.itemToKey(r.current);d&&i({type:rn,inputValue:t.itemToString(t.selectedItem)})}r.current=n.selectedItem===r.current?t.selectedItem:n.selectedItem}},[n.selectedItem,t.selectedItem]),[Oa(n,t),i]}var x4=le({},yo,{isItemDisabled:function(){return!1}});function L4(e,t,o){var a,r=o.type,l=o.altKey,n;switch(r){case on:n={isOpen:P1(t,"isOpen",Ye),highlightedIndex:Aa(t),selectedItem:t.items[o.index],inputValue:t.itemToString(t.items[o.index])};break;case jl:e.isOpen?n={highlightedIndex:ot(e.highlightedIndex,1,t.items,t.isItemDisabled,!0)}:n={highlightedIndex:l&&e.selectedItem==null?-1:xt(t,e,1),isOpen:t.items.length>=0};break;case Kl:e.isOpen?l?n=Ba(t,e.highlightedIndex):n={highlightedIndex:ot(e.highlightedIndex,-1,t.items,t.isItemDisabled,!0)}:n={highlightedIndex:xt(t,e,-1),isOpen:t.items.length>=0};break;case Yl:n=Ba(t,e.highlightedIndex);break;case Gl:n=le({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Ql:n={highlightedIndex:ot(e.highlightedIndex,-10,t.items,t.isItemDisabled,!0)};break;case Jl:n={highlightedIndex:ot(e.highlightedIndex,10,t.items,t.isItemDisabled,!0)};break;case Wl:n={highlightedIndex:qt(0,!1,t.items,t.isItemDisabled)};break;case Xl:n={highlightedIndex:qt(t.items.length-1,!0,t.items,t.isItemDisabled)};break;case $a:n=le({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((a=t.items)==null?void 0:a.length)&&o.selectItem&&{selectedItem:t.items[e.highlightedIndex],inputValue:t.itemToString(t.items[e.highlightedIndex])});break;case en:n={isOpen:!0,highlightedIndex:Aa(t),inputValue:o.inputValue};break;case tn:n={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:xt(t,e,0)};break;case an:n={selectedItem:o.selectedItem,inputValue:t.itemToString(o.selectedItem)};break;case rn:n={inputValue:o.inputValue};break;default:return p5(e,t,o,_5)}return le({},e,n)}var w4=["onMouseLeave","refKey","ref"],b4=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],I4=["onClick","onPress","refKey","ref"],y4=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];D5.stateChangeTypes=_5;function D5(e){e===void 0&&(e={}),kl(e,D5,g4);var t=le({},x4,e),o=t.items,a=t.scrollIntoView,r=t.environment,l=t.getA11yStatusMessage,n=v4(L4,t,h4,f5),i=n[0],s=n[1],d=i.isOpen,u=i.highlightedIndex,f=i.selectedItem,C=i.inputValue,h=c1(null),p=c1({}),c=c1(null),m=c1(null),b=Na(),g=I5(t),k=c1(),v=Mo({state:i,props:t}),_=de(function(B){return p.current[g.getItemId(B)]},[g]);Vl(l,i,[d,u,f,C],r);var D=c5({menuElement:h.current,highlightedIndex:u,isOpen:d,itemRefs:p,scrollIntoView:a,getItemNodeFromIndex:_});Dl({props:t,state:i}),H1(function(){var B=vt(t,"isOpen",Ye);B&&c.current&&c.current.focus()},[]),H1(function(){b||(k.current=o.length)});var U=de(function(){v.current.state.isOpen&&s({type:$a})},[s,v]),M=Ut(function(){return[h,m,c]},[]),O=u5(r,U,M),q=_l("getInputProps","getMenuProps");H1(function(){d||(p.current={})},[d]),H1(function(){var B;!d||!(r!=null&&r.document)||!(c!=null&&(B=c.current)!=null&&B.focus)||r.document.activeElement!==c.current&&c.current.focus()},[d,r]);var K=Ut(function(){return{ArrowDown:function($){$.preventDefault(),s({type:jl,altKey:$.altKey})},ArrowUp:function($){$.preventDefault(),s({type:Kl,altKey:$.altKey})},Home:function($){v.current.state.isOpen&&($.preventDefault(),s({type:Wl}))},End:function($){v.current.state.isOpen&&($.preventDefault(),s({type:Xl}))},Escape:function($){var F=v.current.state;(F.isOpen||F.inputValue||F.selectedItem||F.highlightedIndex>-1)&&($.preventDefault(),s({type:Gl}))},Enter:function($){var F=v.current.state;!F.isOpen||$.which===229||($.preventDefault(),s({type:Yl}))},PageUp:function($){v.current.state.isOpen&&($.preventDefault(),s({type:Ql}))},PageDown:function($){v.current.state.isOpen&&($.preventDefault(),s({type:Jl}))}}},[s,v]),X=de(function(B){return le({id:g.labelId,htmlFor:g.inputId},B)},[g]),N=de(function(B,$){var F,R=B===void 0?{}:B,L=R.onMouseLeave,P=R.refKey,G=P===void 0?"ref":P,ae=R.ref,ue=Je(R,w4),me=$===void 0?{}:$,ve=me.suppressRefError,He=ve===void 0?!1:ve;return q("getMenuProps",He,G,h),le((F={},F[G]=E1(ae,function(Y){h.current=Y}),F.id=g.menuId,F.role="listbox",F["aria-labelledby"]=ue&&ue["aria-label"]?void 0:""+g.labelId,F.onMouseLeave=Ve(L,function(){s({type:y5})}),F),ue)},[s,q,g]),T=de(function(B){var $,F,R=B===void 0?{}:B,L=R.item,P=R.index,G=R.refKey,ae=G===void 0?"ref":G,ue=R.ref,me=R.onMouseMove,ve=R.onMouseDown,He=R.onClick;R.onPress;var Y=R.disabled,fe=Je(R,b4);Y!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var Q=v.current,Ce=Q.props,ce=Q.state,ge=Tl(L,P,Ce.items,"Pass either item or index to getItemProps!"),ye=ge[0],Me=ge[1],ke=Ce.isItemDisabled(ye,Me),f1="onClick",A1=He,w1=function(){O.isTouchEnd||Me===ce.highlightedIndex||(D.current=!1,s({type:M5,index:Me,disabled:ke}))},rt=function(){s({type:on,index:Me})},Z1=function(ni){return ni.preventDefault()};return le(($={},$[ae]=E1(ue,function(p1){p1&&(p.current[g.getItemId(Me)]=p1)}),$["aria-disabled"]=ke,$["aria-selected"]=Me===ce.highlightedIndex,$.id=g.getItemId(Me),$.role="option",$),!ke&&(F={},F[f1]=Ve(A1,rt),F),{onMouseMove:Ve(me,w1),onMouseDown:Ve(ve,Z1)},fe)},[s,g,v,O,D]),S=de(function(B){var $,F=B===void 0?{}:B,R=F.onClick;F.onPress;var L=F.refKey,P=L===void 0?"ref":L,G=F.ref,ae=Je(F,I4),ue=v.current.state,me=function(){s({type:S5})};return le(($={},$[P]=E1(G,function(ve){m.current=ve}),$["aria-controls"]=g.menuId,$["aria-expanded"]=ue.isOpen,$.id=g.toggleButtonId,$.tabIndex=-1,$),!ae.disabled&&le({},{onClick:Ve(R,me)}),ae)},[s,v,g]),x=de(function(B,$){var F,R=B===void 0?{}:B,L=R.onKeyDown,P=R.onChange,G=R.onInput,ae=R.onBlur;R.onChangeText;var ue=R.onClick,me=R.refKey,ve=me===void 0?"ref":me,He=R.ref,Y=Je(R,y4),fe=$===void 0?{}:$,Q=fe.suppressRefError,Ce=Q===void 0?!1:Q;q("getInputProps",Ce,ve,c);var ce=v.current.state,ge=function(Z1){var p1=Ea(Z1);p1&&K[p1]&&K[p1](Z1)},ye=function(Z1){s({type:en,inputValue:Z1.target.value})},Me=function(Z1){if(r!=null&&r.document&&ce.isOpen&&!O.isMouseDown){var p1=Z1.relatedTarget===null&&r.document.activeElement!==r.document.body;s({type:$a,selectItem:!p1})}},ke=function(){s({type:tn})},f1="onChange",A1={};if(!Y.disabled){var w1;A1=(w1={},w1[f1]=Ve(P,G,ye),w1.onKeyDown=Ve(L,ge),w1.onBlur=Ve(ae,Me),w1.onClick=Ve(ue,ke),w1)}return le((F={},F[ve]=E1(He,function(rt){c.current=rt}),F["aria-activedescendant"]=ce.isOpen&&ce.highlightedIndex>-1?g.getItemId(ce.highlightedIndex):"",F["aria-autocomplete"]="list",F["aria-controls"]=g.menuId,F["aria-expanded"]=ce.isOpen,F["aria-labelledby"]=Y&&Y["aria-label"]?void 0:g.labelId,F.autoComplete="off",F.id=g.inputId,F.role="combobox",F.value=ce.inputValue,F),A1,Y)},[s,g,r,K,v,O,q]),I=de(function(){s({type:R5})},[s]),w=de(function(){s({type:H5})},[s]),y=de(function(){s({type:k5})},[s]),H=de(function(B){s({type:P5,highlightedIndex:B})},[s]),A=de(function(B){s({type:an,selectedItem:B})},[s]),Z=de(function(B){s({type:T5,inputValue:B})},[s]),W=de(function(){s({type:V5})},[s]);return{getItemProps:T,getLabelProps:X,getMenuProps:N,getInputProps:x,getToggleButtonProps:S,toggleMenu:I,openMenu:y,closeMenu:w,setHighlightedIndex:H,setInputValue:Z,selectItem:A,reset:W,highlightedIndex:u,isOpen:d,selectedItem:f,inputValue:C}}var O5={activeIndex:-1,selectedItems:[]};function o5(e,t){return vt(e,t,O5)}function a5(e,t){return P1(e,t,O5)}function M4(e){var t=o5(e,"activeIndex"),o=o5(e,"selectedItems");return{activeIndex:t,selectedItems:o}}function r5(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0))}function S4(e,t){return e.selectedItems===t.selectedItems&&e.activeIndex===t.activeIndex}var fb={stateReducer:Io.stateReducer,itemToKey:Io.itemToKey,environment:Io.environment,selectedItems:ee.default.array,initialSelectedItems:ee.default.array,defaultSelectedItems:ee.default.array,getA11yStatusMessage:ee.default.func,activeIndex:ee.default.number,initialActiveIndex:ee.default.number,defaultActiveIndex:ee.default.number,onActiveIndexChange:ee.default.func,onSelectedItemsChange:ee.default.func,keyNavigationNext:ee.default.string,keyNavigationPrevious:ee.default.string},R4={itemToKey:yo.itemToKey,stateReducer:yo.stateReducer,environment:yo.environment,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},k4=So,ln=0,nn=1,sn=2,dn=3,un=4,cn=5,fn=6,pn=7,Cn=8,mn=9,hn=10,gn=11,vn=12,H4=Object.freeze({__proto__:null,DropdownClick:pn,DropdownKeyDownBackspace:fn,DropdownKeyDownNavigationPrevious:cn,FunctionAddSelectedItem:Cn,FunctionRemoveSelectedItem:mn,FunctionReset:vn,FunctionSetActiveIndex:gn,FunctionSetSelectedItems:hn,SelectedItemClick:ln,SelectedItemKeyDownBackspace:sn,SelectedItemKeyDownDelete:nn,SelectedItemKeyDownNavigationNext:dn,SelectedItemKeyDownNavigationPrevious:un});function P4(e,t,o){var a=o.type,r=o.index,l=o.selectedItem,n=e.activeIndex,i=e.selectedItems,s;switch(a){case ln:s={activeIndex:r};break;case un:s={activeIndex:n-1<0?0:n-1};break;case dn:s={activeIndex:n+1>=i.length?-1:n+1};break;case sn:case nn:{if(n<0)break;var d=n;i.length===1?d=-1:n===i.length-1&&(d=i.length-2),s=le({selectedItems:[].concat(i.slice(0,n),i.slice(n+1))},{activeIndex:d});break}case cn:s={activeIndex:i.length-1};break;case fn:s={selectedItems:i.slice(0,i.length-1)};break;case Cn:s={selectedItems:[].concat(i,[l])};break;case pn:s={activeIndex:-1};break;case mn:{var u=n,f=i.findIndex(function(p){return t.itemToKey(p)===t.itemToKey(l)});if(f<0)break;i.length===1?u=-1:f===i.length-1&&(u=i.length-2),s={selectedItems:[].concat(i.slice(0,f),i.slice(f+1)),activeIndex:u};break}case hn:{var C=o.selectedItems;s={selectedItems:C};break}case gn:{var h=o.activeIndex;s={activeIndex:h};break}case vn:s={activeIndex:a5(t,"activeIndex"),selectedItems:a5(t,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return le({},e,s)}var T4=["refKey","ref","onClick","onKeyDown","selectedItem","index"],V4=["refKey","ref","onKeyDown","onClick","preventKeyAction"];E5.stateChangeTypes=H4;function E5(e){e===void 0&&(e={}),k4(e,E5);var t=le({},R4,e),o=t.getA11yStatusMessage,a=t.environment,r=t.keyNavigationNext,l=t.keyNavigationPrevious,n=Pl(P4,t,M4,S4),i=n[0],s=n[1],d=i.activeIndex,u=i.selectedItems,f=Na(),C=c1(null),h=c1();h.current=[];var p=Mo({state:i,props:t});Vl(o,i,[d,u],a),H1(function(){f||(d===-1&&C.current?C.current.focus():h.current[d]&&h.current[d].focus())},[d]),Dl({props:t,state:i});var c=_l("getDropdownProps"),m=Ut(function(){var O;return O={},O[l]=function(){s({type:un})},O[r]=function(){s({type:dn})},O.Delete=function(){s({type:nn})},O.Backspace=function(){s({type:sn})},O},[s,r,l]),b=Ut(function(){var O;return O={},O[l]=function(q){r5(q)&&s({type:cn})},O.Backspace=function(K){r5(K)&&s({type:fn})},O},[s,l]),g=de(function(O){var q,K=O===void 0?{}:O,X=K.refKey,N=X===void 0?"ref":X,T=K.ref,S=K.onClick,x=K.onKeyDown,I=K.selectedItem,w=K.index,y=Je(K,T4),H=p.current.state,A=Tl(I,w,H.selectedItems,"Pass either item or index to getSelectedItemProps!"),Z=A[1],W=Z>-1&&Z===H.activeIndex,B=function(){s({type:ln,index:Z})},$=function(R){var L=Ea(R);L&&m[L]&&m[L](R)};return le((q={},q[N]=E1(T,function(F){F&&h.current.push(F)}),q.tabIndex=W?0:-1,q.onClick=Ve(S,B),q.onKeyDown=Ve(x,$),q),y)},[s,p,m]),k=de(function(O,q){var K,X=O===void 0?{}:O,N=X.refKey,T=N===void 0?"ref":N,S=X.ref,x=X.onKeyDown,I=X.onClick,w=X.preventKeyAction,y=w===void 0?!1:w,H=Je(X,V4),A=q===void 0?{}:q,Z=A.suppressRefError,W=Z===void 0?!1:Z;c("getDropdownProps",W,T,C);var B=function(R){var L=Ea(R);L&&b[L]&&b[L](R)},$=function(){s({type:pn})};return le((K={},K[T]=E1(S,function(F){F&&(C.current=F)}),K),!y&&{onKeyDown:Ve(x,B),onClick:Ve(I,$)},H)},[s,b,c]),v=de(function(O){s({type:Cn,selectedItem:O})},[s]),_=de(function(O){s({type:mn,selectedItem:O})},[s]),D=de(function(O){s({type:hn,selectedItems:O})},[s]),U=de(function(O){s({type:gn,activeIndex:O})},[s]),M=de(function(){s({type:vn})},[s]);return{getSelectedItemProps:g,getDropdownProps:k,addSelectedItem:v,removeSelectedItem:_,setSelectedItems:D,setActiveIndex:U,reset:M,selectedItems:u,activeIndex:d}}var xn=0,Ln=1,wn=2,bn=3,In=4,yn=5,Mn=6,_4=Object.freeze({__proto__:null,FunctionAddItem:Mn,TagClick:xn,TagGroupKeyDownArrowLeft:Ln,TagGroupKeyDownArrowRight:wn,TagGroupKeyDownBackspace:In,TagGroupKeyDownDelete:bn,TagRemoveClick:yn});function D4(e,t,o){var a=o.type,r;switch(a){case xn:r={activeIndex:o.index};break;case Ln:r={activeIndex:e.activeIndex===0?e.items.length-1:e.activeIndex-1};break;case wn:r={activeIndex:e.activeIndex===e.items.length-1?0:e.activeIndex+1};break;case In:case bn:{var l=[].concat(e.items.slice(0,e.activeIndex),e.items.slice(e.activeIndex+1)),n=l.length===0?-1:l.length===e.activeIndex?e.activeIndex-1:e.activeIndex;r={items:[].concat(e.items.slice(0,e.activeIndex),e.items.slice(e.activeIndex+1)),activeIndex:n};break}case yn:{var i=[].concat(e.items.slice(0,o.index),e.items.slice(o.index+1)),s=i.length===0?-1:i.length===o.index?o.index-1:o.index;r={items:i,activeIndex:s}}break;case Mn:{var d=[];o.index===void 0?d=[].concat(e.items,[o.item]):d=[].concat(e.items.slice(0,o.index),[o.item],e.items.slice(o.index));var u=e.activeIndex===-1?d.length-1:e.activeIndex;r={items:d,activeIndex:u};break}default:throw new Error("Invalid useTagGroup reducer action.")}return le({},e,r)}var O4=le({},pe),B5=O4.useId,E4=typeof B5=="function"?B4:A4;function B4(e){var t=e.id,o=e.tagGroupId,a=e.getTagId,r="downshift-"+B5();t||(t=r);var l=pe.useMemo(function(){return{tagGroupId:o??t+"-tag-group",getTagId:a??function(n){return t+"-tag-"+n}}},[a,t,o]);return l}function A4(e){var t=e.id,o=e.getTagId,a=e.tagGroupId,r=pe.useRef(t??"downshift-"+l5()),l=r.current,n=pe.useMemo(function(){return{tagGroupId:a??l+"-tag-group",getTagId:o??function(i){return l+"-tag-"+i}}},[o,l,a]);return n}function Z4(e){var t,o,a,r,l=(t=(o=e.items)!=null?o:e.initialItems)!=null?t:[],n=(a=(r=e.activeIndex)!=null?r:e.initialActiveIndex)!=null?a:l.length===0?-1:0;return{activeIndex:n,items:l}}function F4(e,t){return e.activeIndex===t.activeIndex&&e.items===t.items}var A5="tag-group-a11y-description";function $4(e,t){pe.useEffect(function(){if(e){var o=e.createElement("div");return o.setAttribute("id",A5),o.style.display="none",o.textContent=t,e.body.appendChild(o),function(){o.remove()}}},[t,e])}function N4(e){return le({stateReducer:function(o,a){var r=a.changes;return r},environment:typeof window>"u"?void 0:window,removeElementDescription:"Press Delete or Backspace to remove tag."},e)}function U4(e,t,o){var a=pe.useRef({}),r=pe.useRef(e),l=pe.useRef(t);return pe.useEffect(function(){if(e!==-1&&r.current!==-1&&e!==r.current||l.current===t+1){var n;(n=a.current[o(e)])==null||n.focus()}r.current=e,l.current=t},[e,o,t]),a}var q4={isItemDisabled:ee.default.func},z4=["onKeyDown"],j4=["index","refKey","ref","onClick"],K4=["index","onClick"],Z5=function(t){var o;t===void 0&&(t={}),kl(t,Z5,q4);var a=N4(t),r=Pl(D4,a,Z4,F4),l=r[0],n=r[1],i=l.activeIndex,s=l.items,d=Mo({state:l,props:a}),u=E4({getTagId:a.getTagId,id:a.id,tagGroupId:a.tagGroupId});$4((o=a.environment)==null?void 0:o.document,a.removeElementDescription);var f=U4(i,s.length,u.getTagId),C=de(function(m){var b=m??{},g=b.onKeyDown,k=Je(b,z4),v=function(U){switch(U.key){case"ArrowLeft":n({type:Ln});break;case"ArrowRight":n({type:wn});break;case"Delete":n({type:bn});break;case"Backspace":n({type:In});break}},_=le({id:u.tagGroupId,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions",role:"listbox",onKeyDown:Sl(g,v)},k);return _},[n,u.tagGroupId]),h=de(function(m){var b,g=m.index,k=m.refKey,v=k===void 0?"ref":k,_=m.ref,D=m.onClick,U=Je(m,j4);if(!Number.isInteger(g)||g<0)throw new Error("Pass correct item index to getTagProps!");var M=d.current.state,O=function(){n({type:xn,index:g})},q=u.getTagId(g);return le((b={"aria-describedby":A5},b[v]=z7(_,function(K){K&&(f.current[q]=K)}),b["aria-labelledby"]=q,b.role="option",b.id=q,b.onClick=Sl(D,O),b.tabIndex=M.activeIndex===g?0:-1,b),U)},[n,u,d,f]),p=de(function(m){var b=m.index,g=m.onClick,k=Je(m,K4);if(!Number.isInteger(b)||b<0)throw new Error("Pass correct item index to getTagRemoveProps!");var v=function(M){M.stopPropagation(),n({type:yn,index:b})},_=u.getTagId(b),D=_+"-remove";return le({id:D,tabIndex:-1,"aria-labelledby":D+" "+_,onClick:Sl(g,v)},k)},[u,n]),c=de(function(m,b){n({type:Mn,item:m,index:b})},[n]);return{activeIndex:i,addItem:c,getTagGroupProps:C,getTagProps:h,getTagRemoveProps:p,items:s}};Z5.stateChangeTypes=_4;import zt from"react";import{createPortal as G4}from"react-dom";import{jsx as B1,jsxs as F5}from"react/jsx-runtime";var W4=260,qa=4,X4=B1(Yn,{width:9,height:9}),Q4=B1(e9,{width:9,height:9}),J4={ariaReset:"Reset {0} to default"};function Y4(e){let t=e.getBoundingClientRect(),o=ft(e),a=o?o.getBoundingClientRect():{top:0,bottom:window.innerHeight},r=a.bottom-t.bottom-qa,l=t.top-a.top-qa,n=r<W4&&l>r;return{top:n?t.top-qa:t.bottom+qa,left:t.left,width:t.width,openAbove:n}}function jt({label:e,options:t,selectedItem:o,onChange:a,id:r="picklist",getOptionStyle:l,triggerLabel:n,triggerMuted:i=!1,triggerStyle:s,aria:d}){let[u,f]=zt.useState({top:0,left:0,width:0,openAbove:!1}),C=zt.useRef(null),h=`${r}-legend`,p=e1(J4,d),c=Pe(p.ariaReset,[e]),m=zt.useMemo(()=>t.filter(N=>N.value!==""),[t]),b=o!=null,g=()=>{C.current?.focus(),a("")},{isOpen:k,closeMenu:v,highlightedIndex:_,getToggleButtonProps:D,getMenuProps:U,getItemProps:M}=Ua({items:m,itemToString:N=>N?N.label:"",selectedItem:o,onSelectedItemChange:({selectedItem:N})=>{typeof a=="function"&&N&&N.value!==o?.value&&a(N.value)},onIsOpenChange:({isOpen:N})=>{N&&C.current&&f(Y4(C.current))},id:r,labelId:h});zt.useEffect(()=>{if(!k||!C.current)return;let N=ft(C.current);if(!N)return;let T=()=>v();return N.addEventListener("scroll",T,{passive:!0}),()=>N.removeEventListener("scroll",T)},[k,v]);let O="picklistEditor-dropdown"+(k?" picklistEditor-dropdown--open":""),q=k?{top:u.top,left:u.left,width:u.width,...u.openAbove?{transform:"translateY(-100%)"}:void 0}:void 0,[K,X]=zt.useState(null);return zt.useLayoutEffect(()=>{let T=C.current?.getRootNode();X(T instanceof ShadowRoot?T:document.body)},[]),B1(l1,{label:e,id:r,className:"picklistEditor-fieldset",children:F5("div",{className:"picklistEditor-wrapper",children:[F5("button",{type:"button",className:"picklistEditor-trigger",style:s,...D({ref:C}),children:[B1("span",{className:"picklistEditor-trigger-label"+(i?" picklistEditor-trigger-label--muted":""),children:n??o?.label??"Default"}),B1("span",{className:"picklistEditor-trigger-chevron","aria-hidden":"true",children:k?Q4:X4})]}),b&&B1("button",{type:"button",className:"picklistEditor-reset",onClick:g,"aria-label":c,title:c,children:B1(Kn,{width:14,height:14})}),G4(B1("ul",{className:O,style:q,...U(),children:k&&m.map((N,T)=>B1("li",{className:"picklistEditor-option"+(_===T?" picklistEditor-option--highlighted":"")+(o?.value===N.value?" picklistEditor-option--selected":""),style:l?l(N):void 0,...M({item:N,index:T}),children:N.label},N.value))}),K??document.body)]})})}import{jsx as a8}from"react/jsx-runtime";var e8=[{value:"Arial, sans-serif",label:"Arial"},{value:"Helvetica, sans-serif",label:"Helvetica"},{value:"Verdana, sans-serif",label:"Verdana"},{value:"Tahoma, sans-serif",label:"Tahoma"},{value:"'Trebuchet MS', sans-serif",label:"Trebuchet MS"},{value:"'Lucida Sans Unicode', sans-serif",label:"Lucida Sans"},{value:"Georgia, serif",label:"Georgia"},{value:"'Times New Roman', serif",label:"Times New Roman"},{value:"'Palatino Linotype', serif",label:"Palatino"},{value:"'Courier New', monospace",label:"Courier New"},{value:"'Lucida Console', monospace",label:"Lucida Console"}];function $5(e){return(e.split(",")[0]??"").trim().replace(/['"]/g,"")}function t8(e,t){if(!e)return null;let o=e.replace(/['"]/g,""),a=$5(e);for(let r of t){if(!r.value)continue;let l=r.value.replace(/['"]/g,"");if(o.indexOf(l)!==-1||l.indexOf(a)!==-1)return r}return null}var o8=e=>e.value?{fontFamily:e.value}:void 0;function N5({label:e="Font family",value:t,computedValue:o,options:a,onChange:r,matchOption:l=t8,id:n="font-family",aria:i}){let s=a??e8,d=l(t,s),u=t||o,f=l(u,s),C=!d,h;return f?h=f.label:u&&(h=$5(u)||void 0),a8(jt,{label:e,options:s,selectedItem:d,triggerLabel:h,triggerMuted:C,triggerStyle:u?{fontFamily:u}:void 0,onChange:r,id:n,getOptionStyle:o8,aria:i})}import{jsx as Sn}from"react/jsx-runtime";var r8=[{value:"normal",labelKey:"normal",defaultLabel:"Normal",icon:Sn(En,{width:14,height:14})},{value:"italic",labelKey:"italic",defaultLabel:"Italic",icon:Sn(On,{width:14,height:14})}];function U5({label:e="Font Style",value:t,onChange:o,id:a="font-style",optionLabels:r}){let l=r8.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return Sn(b1,{label:e,options:l,value:t||"normal",onChange:o,id:a})}import{jsx as s8}from"react/jsx-runtime";var l8=[{value:"100",labelKey:"thin",defaultWord:"Thin"},{value:"200",labelKey:"extraLight",defaultWord:"Extra Light"},{value:"300",labelKey:"light",defaultWord:"Light"},{value:"400",labelKey:"regular",defaultWord:"Regular"},{value:"500",labelKey:"medium",defaultWord:"Medium"},{value:"600",labelKey:"semiBold",defaultWord:"Semi Bold"},{value:"700",labelKey:"bold",defaultWord:"Bold"},{value:"800",labelKey:"extraBold",defaultWord:"Extra Bold"},{value:"900",labelKey:"black",defaultWord:"Black"}];function n8(e){return l8.map(t=>{let o=e?.[t.labelKey]??t.defaultWord;return{value:t.value,label:`${o} (${t.value})`}})}function i8(e,t){if(!e)return null;let o=String(e).trim();return t.find(a=>a.value===o)??null}function q5({label:e="Font weight",value:t,computedValue:o,options:a,onChange:r,matchOption:l=i8,id:n="font-weight",optionLabels:i,aria:s}){let d=a??n8(i),u=l(t,d),f=l(t||o,d),C=!u,h=f?.label;return s8(jt,{label:e,options:d,selectedItem:u,triggerLabel:h,triggerMuted:C,onChange:r,id:n,aria:s})}import ne from"react";import{createPortal as d8}from"react-dom";import{jsx as re,jsxs as Fe}from"react/jsx-runtime";var u8={tabCms:"CMS",tabLocal:"Local",tabUrl:"URL",ariaTablist:"Image source",clearImage:"Clear image",chooseFile:"Choose File...",ariaChooseFile:"Choose an image file from your computer",useThisImage:"Use This Image",ariaImageUrl:"Image URL",urlPlaceholder:"https://example.com/image.png",previewAlt:"Preview",altText:"Alt Text",altPlaceholder:"Describe the image",width:"Width",height:"Height",autoPlaceholder:"auto",workspace:"Workspace",selectWorkspace:"Select a workspace...",selectImage:"Select an Image",loadingWorkspaces:"Loading workspaces...",noWorkspaces:"No CMS workspaces found",loadingImages:"Loading images...",noImages:"No images in this workspace",loadingMore:"Loading more...",untitled:"Untitled",downloadingImage:"Downloading image...",downloadFailed:"Download failed",closePicker:"Close",cancel:"Cancel",done:"Done",pickerTitle:"Select an image from {0}",pickerError:"Error: {0}"},Kt=["cms","local","url"];function c8({labels:e,workspaceName:t,folderId:o,portalTarget:a,folderItemsResult:r,contentDetail:l,thumbnailResult:n,onFetchFolderItems:i,onFetchContentDetail:s,onFetchThumbnail:d,onCancel:u,onConfirm:f}){let[C,h]=ne.useState([]),[p,c]=ne.useState(0),[m,b]=ne.useState(!0),[g,k]=ne.useState(!1),[v,_]=ne.useState(null),[D,U]=ne.useState(null),[M,O]=ne.useState({}),[q,K]=ne.useState({}),X=ne.useRef(new Set),N=ne.useRef(new Set),T=ne.useCallback(y=>{g||typeof i=="function"&&(k(!0),_(null),i(o,y,20))},[o,g,i]);ne.useEffect(()=>{T(0)},[o]),ne.useEffect(()=>{let y=H=>{H.key==="Escape"&&(H.stopPropagation(),u())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[u]);let S=ne.useRef(null);ne.useEffect(()=>{S.current?.focus()},[]),ne.useEffect(()=>{if(!r)return;let y=(r.items??[]).map(H=>({contentKey:H.contentKey,title:H.title??e.untitled,mimeType:H.mimeType??"image/png"}));h(H=>r.page===0?y:[...H,...y]),b(!!r.hasMore),c(r.page??0),k(!1),r.error&&_(String(r.error))},[r]),ne.useEffect(()=>{if(!l)return;let y=l.contentKey;if(!y||l.error)return;let H=l.url??"",A=l.mimeType??"image/png",Z=l.title??"";O(W=>W[y]?W:{...W,[y]:{url:H,mimeType:A,title:Z}}),H&&!N.current.has(y)&&typeof d=="function"&&(N.current.add(y),d(y,H,A))},[l,d]),ne.useEffect(()=>{if(!n)return;let{imageId:y,thumbnailUrl:H}=n;y&&H&&K(A=>({...A,[y]:H}))},[n]);let x=ne.useRef(null);ne.useEffect(()=>{let y=x.current;if(!y||!m||g)return;let H=new IntersectionObserver(A=>{A.some(W=>W.isIntersecting)&&T(p+1)});return H.observe(y),()=>H.disconnect()},[m,g,p,T]);let I=ne.useCallback(y=>{X.current.has(y)||typeof s=="function"&&(X.current.add(y),s(y))},[s]),w=()=>{if(!D)return;let y=M[D],H=C.find(A=>A.contentKey===D);!y||!H||f({contentKey:D,title:H.title,url:y.url,mimeType:y.mimeType||H.mimeType})};return d8(re("div",{ref:S,tabIndex:-1,className:"cmsPicker-overlay",role:"dialog","aria-modal":"true","aria-label":Pe(e.pickerTitle,[t]),onClick:y=>{y.target===y.currentTarget&&u()},children:Fe("div",{className:"cmsPicker-dialog",children:[Fe("div",{className:"cmsPicker-header",children:[re("span",{className:"cmsPicker-title",children:Pe(e.pickerTitle,[t])}),re("button",{type:"button",className:"cmsPicker-close",onClick:u,"aria-label":e.closePicker,title:e.closePicker,children:"\u2715"})]}),Fe("div",{className:"cmsPicker-body",children:[C.length===0&&g&&re("div",{className:"cmsPicker-empty",children:e.loadingImages}),C.length===0&&!g&&!v&&re("div",{className:"cmsPicker-empty",children:e.noImages}),v&&re("div",{className:"cmsPicker-empty",children:Pe(e.pickerError,[v])}),Fe("div",{className:"cmsPicker-grid",children:[C.map(y=>re(f8,{item:y,selected:D===y.contentKey,thumbnailDataUrl:q[y.contentKey],onIntersect:()=>I(y.contentKey),onClick:()=>U(y.contentKey)},y.contentKey)),m&&re("div",{className:"cmsPicker-sentinel",ref:x,children:g?e.loadingMore:""})]})]}),Fe("div",{className:"cmsPicker-footer",children:[re("button",{type:"button",className:"cmsPicker-btn",onClick:u,children:e.cancel}),re("button",{type:"button",className:"cmsPicker-btn cmsPicker-btn--primary",disabled:!D||!M[D??""],onClick:w,children:e.done})]})]})}),a)}function f8({item:e,selected:t,thumbnailDataUrl:o,onIntersect:a,onClick:r}){let l=ne.useRef(null),n=ne.useRef(!1);return ne.useEffect(()=>{let i=l.current;if(!i||n.current)return;let s=new IntersectionObserver(d=>{d.some(f=>f.isIntersecting)&&!n.current&&(n.current=!0,a(),s.disconnect())});return s.observe(i),()=>s.disconnect()},[a]),Fe("button",{ref:l,type:"button",className:`cmsPicker-thumb${t?" cmsPicker-thumb--selected":""}`,onClick:r,title:e.title,"aria-pressed":t,children:[re("div",{className:"cmsPicker-thumb-img",children:o?re("img",{src:o,alt:e.title}):re("div",{className:"cmsPicker-thumb-placeholder","aria-hidden":"true",children:"\u2026"})}),re("span",{className:"cmsPicker-thumb-label",children:e.title})]})}function p8({labels:e,spaces:t,spacesLoading:o,selectedSpaceId:a,onSpaceSelect:r,onOpenPicker:l}){return o?re("div",{className:"imageEditor-cms",children:re("div",{className:"imageEditor-cms-loading",children:e.loadingWorkspaces})}):t.length===0?re("div",{className:"imageEditor-cms",children:re("div",{className:"imageEditor-cms-empty",children:e.noWorkspaces})}):Fe("div",{className:"imageEditor-cms",children:[Fe("div",{className:"imageEditor-cms-channel",children:[re("label",{className:"imageEditor-cms-channel-label",htmlFor:"cms-space-select",children:e.workspace}),Fe("select",{id:"cms-space-select",className:"imageEditor-input imageEditor-cms-channel-select",value:a,onChange:n=>r(n.target.value),children:[re("option",{value:"",children:e.selectWorkspace}),t.map(n=>re("option",{value:n.id,children:n.name},n.id))]})]}),re("button",{type:"button",className:"imageEditor-cms-pick-btn",onClick:l,disabled:!a,children:e.selectImage})]})}function C8({labels:e,preview:t,onPick:o,onApply:a}){return Fe("div",{className:"imageEditor-local",children:[re("button",{className:"imageEditor-local-pick",onClick:o,type:"button","aria-label":e.ariaChooseFile,"aria-haspopup":"dialog",children:e.chooseFile}),t&&Fe("div",{className:"imageEditor-local-preview",children:[re("img",{src:t.webviewUri,alt:t.fileName,className:"imageEditor-preview-thumb"}),re("span",{className:"imageEditor-local-filename",children:t.fileName}),re("button",{className:"imageEditor-local-apply",onClick:()=>a(t.devUrl||t.webviewUri),type:"button",children:e.useThisImage})]})]})}function z5({src:e,alt:t,className:o}){let[a,r]=ne.useState(!1);return ne.useEffect(()=>{r(!1)},[e]),a?null:re("img",{src:e,alt:t,className:o,onError:()=>r(!0)})}function m8({labels:e,input:t,onInputChange:o,onApply:a,currentUrl:r}){return Fe("div",{className:"imageEditor-url",children:[re("input",{type:"text",value:t,"aria-label":e.ariaImageUrl,placeholder:e.urlPlaceholder,className:"imageEditor-input",onChange:l=>o(l.target.value),onKeyDown:l=>{l.key==="Enter"&&t&&a(t)},onBlur:()=>{t&&t!==r&&a(t)}}),t&&re("div",{className:"imageEditor-url-preview",children:re(z5,{src:t,alt:e.previewAlt,className:"imageEditor-preview-thumb"})})]})}function Rn({id:e,label:t,value:o,type:a,inputMode:r,placeholder:l,onCommit:n}){let[i,s]=ne.useState(o),d=ne.useRef(n);d.current=n;let u=ne.useRef(o);ne.useEffect(()=>{o!==u.current&&(u.current=o,s(o))},[o]);let f=()=>{i!==o&&(u.current=i,d.current(i))};return Fe("div",{className:"imageEditor-attr",children:[re("label",{className:"imageEditor-attr-label",htmlFor:e,children:t}),re("input",{id:e,type:a,inputMode:r,value:i,placeholder:l,className:"imageEditor-input",onChange:C=>s(C.target.value),onKeyDown:C=>{C.key==="Enter"&&f()},onBlur:f})]})}function h8({labels:e,attributes:t,onAttributeChange:o}){return Fe("div",{className:"imageEditor-attrs",children:[re(Rn,{id:"design-img-alt",label:e.altText,type:"text",value:t.alt,placeholder:e.altPlaceholder,onCommit:a=>o("alt",a)}),Fe("div",{className:"imageEditor-attrs-row",children:[re(Rn,{id:"design-img-width",label:e.width,type:"number",inputMode:"numeric",value:t.width,placeholder:e.autoPlaceholder,onCommit:a=>o("width",a)}),re(Rn,{id:"design-img-height",label:e.height,type:"number",inputMode:"numeric",value:t.height,placeholder:e.autoPlaceholder,onCommit:a=>o("height",a)})]})]})}function j5({label:e,value:t,onChange:o,id:a="image",attributes:r,onAttributeChange:l,cmsSpaces:n,cmsSpacesLoading:i,onFetchCmsSpaces:s,cmsFolderItemsResult:d,onFetchCmsFolderItems:u,cmsContentDetail:f,onFetchCmsContentDetail:C,cmsThumbnailResult:h,onFetchCmsThumbnail:p,onImportCmsImage:c,cmsImportResult:m,onPickLocalFile:b,localPreview:g,imageLabels:k}){let v=e1(u8,k),_={cms:v.tabCms,local:v.tabLocal,url:v.tabUrl},[D,U]=ne.useState("cms"),[M,O]=ne.useState(""),[q,K]=ne.useState(!1),[X,N]=ne.useState(""),[T,S]=ne.useState("idle"),x=ne.useRef(null),I=ne.useRef(null),w=ne.useCallback(()=>{let R=I.current?.getRootNode();return R instanceof ShadowRoot?R:document.body},[]),y=ne.useRef({}),H=ne.useCallback(R=>{U(R),y.current[R]?.focus()},[]),A=ne.useCallback((R,L)=>{let P=null;switch(R.key){case"ArrowRight":P=(L+1)%Kt.length;break;case"ArrowLeft":P=(L-1+Kt.length)%Kt.length;break;case"Home":P=0;break;case"End":P=Kt.length-1;break;default:return}R.preventDefault();let G=Kt[P];G&&H(G)},[H]),Z=n??[],W=i??!1,B=t||"";ne.useEffect(()=>{if(m)if(m.success&&m.devUrl)o(m.devUrl),S("success");else{let R=x.current?.url;R?(o(R),S("success")):S("error")}},[m,o]),ne.useEffect(()=>{D==="cms"&&Z.length===0&&!W&&typeof s=="function"&&s()},[D]);let $=ne.useMemo(()=>Z.find(R=>R.id===M)??null,[Z,M]),F=ne.useCallback(R=>{let L={id:R.contentKey,title:R.title,url:R.url,thumbnailUrl:"",contentType:R.mimeType};x.current=L,K(!1),typeof c=="function"&&L.url?(S("importing"),c(L)):L.url&&o(L.url)},[o,c]);return re(l1,{label:e,id:a,className:"imageEditor-fieldset",children:Fe("div",{ref:I,className:"imageEditor-root",children:[B&&Fe("div",{className:"imageEditor-current",children:[re(z5,{src:B,alt:"",className:"imageEditor-current-thumb"}),re("span",{className:"imageEditor-current-url",title:B,children:B.length>30?`...${B.slice(-30)}`:B}),re("button",{className:"imageEditor-clear",onClick:()=>o(""),title:v.clearImage,"aria-label":v.clearImage,type:"button",children:"\u2715"})]}),re("div",{className:"imageEditor-tabs",role:"tablist","aria-label":v.ariaTablist,children:Kt.map((R,L)=>re("button",{id:`${a}-tab-${R}`,ref:P=>{y.current[R]=P},role:"tab",type:"button","aria-selected":D===R,"aria-controls":`${a}-tabpanel`,tabIndex:D===R?0:-1,className:`imageEditor-tab${D===R?" imageEditor-tab--active":""}`,onClick:()=>U(R),onKeyDown:P=>A(P,L),children:_[R]},R))}),Fe("div",{className:"imageEditor-tab-content",role:"tabpanel",id:`${a}-tabpanel`,"aria-labelledby":`${a}-tab-${D}`,children:[D==="cms"&&re(p8,{labels:v,spaces:Z,spacesLoading:W,selectedSpaceId:M,onSpaceSelect:O,onOpenPicker:()=>K(!0)}),D==="cms"&&T==="importing"&&re("div",{className:"imageEditor-cms-loading",children:v.downloadingImage}),D==="cms"&&T==="error"&&re("div",{className:"imageEditor-cms-empty",children:v.downloadFailed}),D==="local"&&re(C8,{labels:v,preview:g,onPick:()=>b?.(),onApply:R=>o(R)}),D==="url"&&re(m8,{labels:v,input:X,onInputChange:N,onApply:o,currentUrl:B})]}),r&&l&&re(h8,{labels:v,attributes:r,onAttributeChange:l}),q&&$&&re(c8,{labels:v,workspaceName:$.name,folderId:$.rootFolderId,portalTarget:w(),folderItemsResult:d,contentDetail:f,thumbnailResult:h,onFetchFolderItems:u,onFetchContentDetail:C,onFetchThumbnail:p,onCancel:()=>K(!1),onConfirm:F})]})})}import{jsx as x8}from"react/jsx-runtime";var g8=[{value:"visible",labelKey:"visible",defaultLabel:"Visible"},{value:"hidden",labelKey:"hidden",defaultLabel:"Hidden"},{value:"scroll",labelKey:"scroll",defaultLabel:"Scroll"},{value:"auto",labelKey:"auto",defaultLabel:"Auto"}];function v8(e){return g8.map(t=>({value:t.value,label:e?.[t.labelKey]??t.defaultLabel}))}function K5(e,t){if(!e)return null;let o=String(e).trim().toLowerCase();return t.find(a=>a.value===o)??null}function G5({label:e="Overflow",value:t,computedValue:o,onChange:a,id:r="overflow",optionLabels:l,aria:n}){let i=v8(l),s=K5(t,i),d=K5(t||o,i),u=!s,f=d?.label;return x8(jt,{label:e,options:i,selectedItem:s,triggerLabel:f,triggerMuted:u,onChange:a,id:r,aria:n})}import{jsx as Ro}from"react/jsx-runtime";var L8=[{value:"left",labelKey:"left",defaultLabel:"Left",icon:Ro(Qn,{width:14,height:14})},{value:"center",labelKey:"center",defaultLabel:"Center",icon:Ro(Wn,{width:14,height:14})},{value:"right",labelKey:"right",defaultLabel:"Right",icon:Ro(Jn,{width:14,height:14})},{value:"justify",labelKey:"justify",defaultLabel:"Justify",icon:Ro(Xn,{width:14,height:14})}],w8={start:"left",end:"right"};function W5({label:e="Text Align",value:t,onChange:o,id:a="text-align",optionLabels:r}){let l=w8[t||""]||t||"left",n=L8.map(i=>({value:i.value,label:r?.[i.labelKey]??i.defaultLabel,icon:i.icon}));return Ro(b1,{label:e,options:n,value:l,onChange:o,id:a})}import{jsx as za}from"react/jsx-runtime";var X5=[{value:"none",labelKey:"none",defaultLabel:"None",icon:za(F1,{width:14,height:14})},{value:"underline",labelKey:"underline",defaultLabel:"Underline",icon:za(t9,{width:14,height:14})},{value:"line-through",labelKey:"lineThrough",defaultLabel:"Line Through",icon:za(Gn,{width:14,height:14})}];function b8(e){if(!e)return"none";for(let t of X5)if(e===t.value||e.startsWith(t.value+" "))return t.value;return"none"}function Q5({label:e="Text Decoration",value:t,onChange:o,id:a="text-decoration",optionLabels:r}){let l=X5.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return za(b1,{label:e,options:l,value:b8(t),onChange:o,id:a})}import{jsx as ko}from"react/jsx-runtime";var I8=[{value:"none",labelKey:"none",defaultLabel:"None",icon:ko(F1,{width:14,height:14})},{value:"uppercase",labelKey:"uppercase",defaultLabel:"Uppercase",icon:ko(Nn,{width:14,height:14})},{value:"lowercase",labelKey:"lowercase",defaultLabel:"Lowercase",icon:ko($n,{width:14,height:14})},{value:"capitalize",labelKey:"capitalize",defaultLabel:"Capitalize",icon:ko(Fn,{width:14,height:14})}];function J5({label:e="Text Transform",value:t,onChange:o,id:a="text-transform",optionLabels:r}){let l=I8.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return ko(b1,{label:e,options:l,value:t||"none",onChange:o,id:a})}var Y5="textContent";var y8=e=>e!=null&&typeof e=="object"&&"property"in e,M8=e=>typeof e?.sourceFile=="string"&&e.sourceFile!==""&&e.lineNumber!=null&&e.columnNumber!=null?{sourceFile:e.sourceFile,lineNumber:e.lineNumber,columnNumber:e.columnNumber}:void 0;function ei(e){let t=[],o=new Map,a=l=>{let n=M8(l);if(!n)return;let{sourceFile:i,lineNumber:s,columnNumber:d}=n,u=`${i}\0${s}:${d}`,f=o.get(u);return f||(f={byProperty:new Map,baselineByProperty:new Map,debugSource:n},o.set(u,f),t.push(f)),f},r=(l,n,i)=>{l.baselineByProperty.has(n)||l.baselineByProperty.set(n,String(i??""))};for(let l of e){let n=l.data;if(l.type==="style"&&n?.property!=null){let i=a(n);if(i){let s=String(n.property);r(i,s,l.oldValue),i.byProperty.set(s,String(l.newValue??""))}}else if(l.type==="style-batch"&&Array.isArray(n?.changes)){let i=a(n);for(let s of n.changes)if(i&&y8(s)&&s.property!=null){let d=String(s.property);r(i,d,s.oldValue),i.byProperty.set(d,String(s.newValue??""))}}else l.type==="text"&&a(n)?.byProperty.set(Y5,String(l.newValue??""))}return t.map(l=>{let n=[...l.byProperty].map(([i,s])=>({property:i,value:s})).filter(i=>i.property===Y5||i.value!==""||l.baselineByProperty.get(i.property)!=="");return{debugSource:l.debugSource,commands:n}}).filter(l=>l.commands.length>0)}var at={CHANGED:"history-changed",COMMAND_PUSHED:"command-pushed",COMMAND_UNDONE:"command-undone",COMMAND_REDONE:"command-redone",CLEARED:"history-cleared"},ja=class{constructor(t={}){lt(this,"undoStack",[]);lt(this,"redoStack",[]);lt(this,"maxHistorySize");lt(this,"listeners",new Set);lt(this,"_isProcessing",!1);lt(this,"commandExecutor");if(this.maxHistorySize=t.maxHistorySize??200,!t.commandExecutor)throw new Error("CommandExecutor is required");this.commandExecutor=t.commandExecutor}createCommand(t,o,a,r){return Object.freeze({id:this._generateCommandId(),type:t,oldValue:o,newValue:a,data:r})}_generateCommandId(){return`cmd-${Date.now()}-${Math.random().toString(36).substr(2,9)}`}subscribe(t){if(typeof t!="function")throw new Error("Listener must be a function");return this.listeners.add(t),()=>{this.listeners.delete(t)}}_notify(t,o={}){if(this.listeners.size===0)return;let a=Object.freeze({type:t,timestamp:Date.now(),canUndo:this.canUndo(),canRedo:this.canRedo(),undoCount:this.getUndoCount(),redoCount:this.getRedoCount(),...o}),r=Array.from(this.listeners);for(let l of r)try{l(a)}catch(n){console.error("[HistoryManager] Error in listener:",n)}}pushCommand(t){if(!t||typeof t!="object")throw new Error("Invalid command: must be an object");if(!t.type)throw new Error("Invalid command: missing required fields (type)");if(this._isProcessing){console.warn("[HistoryManager] pushCommand called during processing, ignoring");return}this.undoStack.length>=this.maxHistorySize||(this.undoStack.push(t),this.redoStack=[],this._notify(at.COMMAND_PUSHED,{command:t}),this._notify(at.CHANGED))}_trimStack(){if(this.undoStack.length>this.maxHistorySize){let t=this.undoStack.length-this.maxHistorySize;this.undoStack.splice(0,t)}}_applyCommand(t,o){if(!this.commandExecutor.canHandle(t.type))return console.warn("[HistoryManager] No executor for command type:",t.type),!1;try{return this.commandExecutor.execute(t,o)}catch(a){return console.error("[HistoryManager] Error applying command:",a,t),!1}}_createInverseCommand(t,o){let a=this.commandExecutor.getCurrentValue(t);return Object.freeze({id:this._generateCommandId(),type:t.type,oldValue:o?t.oldValue:a,newValue:o?a:t.newValue,data:t.data})}undo(){if(this._isProcessing)return console.warn("[HistoryManager] undo called during processing, ignoring"),!1;if(!this.canUndo())return!1;this._isProcessing=!0;try{let t=this.undoStack.pop(),o=this._applyCommand(t,!0);if(o){let a=this._createInverseCommand(t,!1);this.redoStack.push(a)}else this.undoStack.push(t),console.warn("[HistoryManager] Undo failed, command restored to stack");return this._notify(at.COMMAND_UNDONE,{command:t,appliedValue:t.oldValue}),this._notify(at.CHANGED),o}finally{this._isProcessing=!1}}redo(){if(this._isProcessing)return console.warn("[HistoryManager] redo called during processing, ignoring"),!1;if(!this.canRedo())return!1;this._isProcessing=!0;try{let t=this.redoStack.pop();if(!t)return console.warn("[HistoryManager] No command to redo"),!1;let o=this._applyCommand(t,!1);if(o){let a=this._createInverseCommand(t,!0);this.undoStack.push(a),this._trimStack()}else this.redoStack.push(t),console.warn("[HistoryManager] Redo failed, command restored to stack");return this._notify(at.COMMAND_REDONE,{command:t,appliedValue:t.newValue}),this._notify(at.CHANGED),o}finally{this._isProcessing=!1}}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}clear(){this.undoStack=[],this.redoStack=[],this._notify(at.CLEARED),this._notify(at.CHANGED)}getUndoCount(){return this.undoStack.length}getMaxHistorySize(){return this.maxHistorySize}getRedoCount(){return this.redoStack.length}getUndoStackSnapshot(){return this.undoStack.map(t=>({type:t.type,oldValue:t.oldValue,newValue:t.newValue,data:t.data}))}};var S8=(e,t)=>{let o=t?e.oldValue:e.newValue;return typeof o=="string"?o:String(o??"")},Ka=e=>{if(!e||typeof e!="object")return;let t=e;if(!(typeof t.sourceFile!="string"||typeof t.lineNumber!="number"||typeof t.columnNumber!="number"))return{sourceFile:t.sourceFile,lineNumber:t.lineNumber,columnNumber:t.columnNumber}},R8=e=>typeof e=="object"&&e!==null&&"property"in e&&typeof e.property=="string",k8=e=>typeof e=="object"&&e!==null&&Array.isArray(e.changes)&&e.changes.every(t=>t!=null&&typeof t.property=="string"),H8=e=>typeof e=="object"&&e!==null&&"tag"in e&&typeof e.tag=="string"&&"attribute"in e&&typeof e.attribute=="string",ti=(e,t,o)=>{let a=new Map;return{execute:(r,l)=>{let n=S8(r,l);a.set(r.id,n);try{if(r.type==="style"&&R8(r.data)){let i=Ka(r.data);return e(r.data.property,n,i),!0}else if(r.type==="style-batch"&&k8(r.data)){let i=Ka(r.data);for(let s of r.data.changes)e(s.property,l?s.oldValue:s.newValue,i);return!0}else if(r.type==="text"){let i=Ka(r.data);return t(n,i),!0}else if(r.type==="media"&&H8(r.data)){if(!o)return!1;let i=Ka(r.data);return o(r.data.tag,{[r.data.attribute]:n},i),!0}}catch{return!1}return!1},getCurrentValue:r=>a.get(r.id)??r.newValue,canHandle:r=>r==="style"||r==="style-batch"||r==="text"||r==="media"&&typeof o=="function"}};function oi(e,t,o){let a=ti(e,t,o),r=new ja({commandExecutor:a});return{recordStyleChange(l,n,i,s){let d=r.createCommand("style",n,i,{...s,property:l});r.pushCommand(d)},recordStyleBatch(l,n){if(l.length===0)return;let i=l[0],s=r.createCommand("style-batch",i.oldValue,i.newValue,{...n,changes:l});r.pushCommand(s)},recordTextChange(l,n,i){let s=r.createCommand("text",l,n,{...i});r.pushCommand(s)},recordMediaChange(l,n,i,s,d){let u=r.createCommand("media",i,s,{...d,tag:l,attribute:n});r.pushCommand(u)},undo:()=>r.undo(),redo:()=>r.redo(),canUndo:()=>r.canUndo(),canRedo:()=>r.canRedo(),subscribe:l=>r.subscribe(l),getHistoryStack:()=>r.getUndoStackSnapshot(),clear:()=>r.clear(),getUndoCount:()=>r.getUndoCount(),getMaxHistorySize:()=>r.getMaxHistorySize()}}var P8=e=>{let t=e.trim().toLowerCase();return t===""||t==="none"};function ai(e,t,o,a){if(e!=="backgroundColor")return[];if(t.trim()==="")return[];let r=(a??"").trim();if(r.toLowerCase()==="none")return[];let l=r||(o??"");return P8(l)?[]:[{property:"backgroundImage",oldValue:l,newValue:"none"}]}import{Fragment as z8,jsx as te,jsxs as $e}from"react/jsx-runtime";var V8="This element's text can be edited inline.",_8="This element's text cannot be edited inline because it contains dynamic content.",D8={opacity:.4},O8=new Set(l9),E8={general:{headerTitle:"Selected Element",emptyPlaceholder:"Click on an element in the preview to select it.",inlineEditEditable:V8,inlineEditNonEditable:_8,addToChatContext:"Add to chat as context",ariaPropertyPanel:"Property panel",ariaSelectedComponent:"Selected component",ariaElementStyling:"Element styling",closePanel:"Close panel"},sections:{imageSource:"Image Source",background:"Background",spacing:"Spacing",border:"Border",typography:"Typography",elementDimensions:"Element Dimensions"},instances:{imageSource:"Source",backgroundColor:"Background Color",padding:"Padding",margin:"Margin",borderRadius:"Border Radius",borderWeight:"Border Weight",borderStyle:"Border Style",borderColor:"Border Color",fontFamily:"Font Family",fontSize:"Font Size",fontWeight:"Font Weight",fontStyle:"Font Style",textColor:"Text Color",textAlignment:"Text Alignment",textFormatting:"Text Formatting",textTransform:"Text Transform",lineHeight:"Line Height",letterSpacing:"Letter Spacing",width:"Width",minWidth:"Minimum Width",maxWidth:"Maximum Width",height:"Height",minHeight:"Minimum Height",maxHeight:"Maximum Height",overflow:"Overflow"},history:{changeLimitTitle:"Change limit reached",changeLimitBody:"Apply your {0} design changes to save your work and continue editing."}};function B8({size:e=16}){return te("svg",{width:e,height:e,viewBox:"-1 0 252 302",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:te("path",{d:"M57 49Q67 49 74 42Q81 35 81 25Q81 15 74 8Q67 1 57 1Q47 1 40 8Q33 15 33 25Q33 35 40 42Q47 49 57 49ZM193 49Q203 49 210 42Q217 35 217 25Q217 15 210 8Q203 1 193 1Q183 1 176 8Q169 15 169 25Q169 35 176 42Q183 49 193 49ZM125 301Q100 301 71 292Q47 285 26 274Q7 265 3.5 259.5Q0 254 1 249Q13 216 20 189Q24 171 26 157V147Q28 120 30 105Q34 78 40 65Q48 48 63 39Q85 27 125 27Q165 27 186 39Q201 47 209 65Q216 78 220 105Q222 120 224 147V157Q226 171 230 189Q237 216 248 249Q250 254 246.5 259.5Q243 265 224 274Q203 285 179 292Q150 301 125 301ZM23 249Q39 259 63 268Q97 280 125 280Q153 280 187 268Q210 259 227 249Q216 219 210 194Q205 174 204 159L203 148Q199 91 191 73Q188 66 184 62Q177 56 165 52Q150 48 125 48Q90 48 73 57Q64 63 59 73Q51 91 47 148L46 158Q45 174 40 194Q34 220 23 249ZM124 248Q113 248 102 244Q84 236 76 217Q72 209 71 201Q70 193 70 179Q70 163 73 151Q76 142 81.5 134Q87 126 98 120Q109 114 125.5 114Q142 114 152 120Q164 127 169 134.5Q174 142 177 151Q180 163 180 178.5Q180 194 179 200Q178 209 174 218Q167 232 154.5 240Q142 248 126 248ZM124 228H126Q147 228 156 209Q158 203 159 197.5Q160 192 160 179Q160 166 157 157Q155 151 152 146.5Q149 142 141 138Q136 134 125 134Q114 134 107.5 138Q101 142 98 146.5Q95 151 93 157Q90 166 90 178.5Q90 191 91 197Q92 203 94 209Q99 221 111 225Q117 228 124 228ZM195 81Q192 79 190 78Q170 70 146 76Q134 80 125.5 80Q117 80 104 76Q80 70 60 78Q58 79 55 81Q50 84 51 89L55 112Q56 117 59.5 120.5Q63 124 68 125Q83 126 99 126Q111 126 115 114L122 92Q122 91 124 89L125 88L126 89Q128 91 128 92L135 114Q139 126 152 126Q167 126 182 125Q187 124 190.5 120.5Q194 117 195 112L199 89Q200 84 195 81ZM141 192Q137 190 133 193V171Q138 169 141 165Q143 163 144 161Q145 159 145 156.5Q145 154 143.5 152Q142 150 140 148.5Q138 147 134 146Q130 145 125.5 145Q121 145 116 146Q111 147 109 149Q107 151 106 153Q105 155 105 157Q105 159 106 161Q107 163 109.5 166Q112 169 116 171H117V193Q113 190 109 191.5Q105 193 104 196Q103 199 105 202Q108 210 117 213Q124 216 133 213L134 212Q143 209 146 202Q147 199 145.5 196Q144 193 141 192Z"})})}function A8({size:e=12}){return te("svg",{width:e,height:e,viewBox:"0 0 12 12","aria-hidden":"true",style:{display:"block",flexShrink:0},children:te("rect",{x:"1",y:"1",width:"10",height:"10",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"2.5 2"})})}function Z8(e,t){let o=e[t];return o!=null?String(o):""}function kn(e){if(!(!e||!e.name||!e.debugSource))return{sourceFile:e.debugSource.sourceFile,lineNumber:e.debugSource.lineNumber,columnNumber:e.debugSource.columnNumber,componentName:e.name}}function F8({component:e,onOpenSourceFile:t,showOpenSourceFile:o,showComponentName:a,generalLabels:r}){if(!e||!e.name)return te("section",{id:"property-panel-selected-component",className:"property-panel-selected-component",children:te("p",{className:"property-panel-selected-component-placeholder",id:"component-info",children:r.emptyPlaceholder})});let l=e.tagName?e.tagName.toLowerCase():"",n=l?`${e.name} > ${l}`:e.name,i=null;if(o&&e.debugSource){let{sourceFile:s,lineNumber:d,columnNumber:u}=e.debugSource,f=s.split("/").pop()||s,C=`:${d}:${u}`;i=$e("a",{href:"#",className:"property-panel-selected-component-source",onClick:p=>{p.preventDefault(),t?.({sourceFile:s,lineNumber:d,columnNumber:u})},title:`${s}${C}`,children:[f,C]})}return!a&&!i?null:te("section",{id:"property-panel-selected-component",className:"property-panel-selected-component","aria-label":r.ariaSelectedComponent,children:$e("div",{id:"component-info",className:"property-panel-selected-component-info",children:[a&&te("span",{className:"property-panel-selected-component-name",children:n}),i&&$e("span",{className:"property-panel-selected-component-source-row",children:["\u21B3 ",i]})]})})}var $8=we.forwardRef(function({title:t,body:o},a){return $e("section",{ref:a,role:"alert","aria-live":"assertive","aria-labelledby":"property-panel-change-limit-title",className:"property-panel-change-limit-message",tabIndex:-1,children:[te("svg",{className:"property-panel-change-limit-icon",viewBox:"0 0 520 520",fill:"currentColor","aria-hidden":"true",focusable:"false",children:te("path",{d:"M260 20a240 240 0 100 480 240 240 0 100-480m0 121c17 0 30 13 30 30s-13 30-30 30-30-13-30-30 13-30 30-30m50 210c0 5-4 9-10 9h-80c-5 0-10-3-10-9v-20c0-5 4-11 10-11 5 0 10-3 10-9v-40c0-5-4-11-10-11-5 0-10-3-10-9v-20c0-5 4-11 10-11h60c5 0 10 5 10 11v80c0 5 4 9 10 9 5 0 10 5 10 11z"})}),$e("div",{className:"property-panel-change-limit-content",children:[te("h2",{id:"property-panel-change-limit-title",className:"property-panel-change-limit-title",children:t}),te("p",{className:"property-panel-change-limit-body",children:o})]})]})});function N8({styles:e,computedStyles:t,inlineOrigin:o,hasSelection:a,onStyleChange:r,generalLabels:l,sectionLabels:n,instanceLabels:i,editorLabels:s,component:d,onImageAttributeChange:u,imageSource:f}){let C=a?"visible":"",h=d?.media?.tag==="img"?d.media:null,p=c=>o.has(c)?"":t[c]??"";return te("section",{className:"property-panel-style-properties-container"+(C?" "+C:""),"aria-label":l.ariaElementStyling,"aria-hidden":!a,children:$e("div",{className:"property-panel-style-properties",children:[h&&te(nt,{title:n.imageSource,children:te(j5,{label:i.imageSource,value:h.src,onChange:c=>u("src",c),id:"design-img-src",attributes:{alt:h.alt,width:h.width,height:h.height},onAttributeChange:u,imageLabels:s?.image,...f})}),te(nt,{title:n.background,children:te(wa,{label:i.backgroundColor,value:e.backgroundColor||t.backgroundColor||"#ffffff",onChange:c=>r("backgroundColor",c),id:"design-bg-color",aria:s?.color,backgroundImage:e.backgroundImage||t.backgroundImage})}),$e(nt,{title:n.spacing,children:[te(ao,{label:i.padding,id:"design-padding",value:e.padding,placeholder:p("padding"),onChange:c=>r("padding",c),...to.padding,aria:s?.boxDimension}),te(ao,{label:i.margin,id:"design-margin",value:e.margin,placeholder:p("margin"),onChange:c=>r("margin",c),...to.margin,allowAuto:!0,aria:s?.boxDimension})]}),$e(nt,{title:n.border,children:[te(ao,{label:i.borderRadius,id:"design-border-radius",value:e.borderRadius,placeholder:p("borderRadius"),onChange:c=>r("borderRadius",c),...to.borderRadius,aria:s?.boxDimension}),te(ao,{label:i.borderWeight,id:"design-border-width",value:e.borderWidth,placeholder:p("borderWidth"),onChange:c=>r("borderWidth",c),...to.borderWidth,aria:s?.boxDimension}),te(D9,{label:i.borderStyle,id:"design-border-style",value:e.borderStyle||t.borderStyle,onChange:c=>r("borderStyle",c),optionLabels:s?.borderStyle?.options}),te(wa,{label:i.borderColor,value:e.borderColor||t.borderColor||"#000000",onChange:c=>r("borderColor",c),id:"design-border-color",aria:s?.color})]}),$e(nt,{title:n.typography,children:[te(N5,{label:i.fontFamily,id:"design-font-family",value:e.fontFamily,computedValue:p("fontFamily"),onChange:c=>r("fontFamily",c),aria:s?.picklist}),te(k1,{label:i.fontSize,id:"design-font-size",value:e.fontSize,placeholder:p("fontSize"),onChange:c=>r("fontSize",c),...I1.fontSize,aria:s?.dimension}),te(q5,{label:i.fontWeight,id:"design-font-weight",value:e.fontWeight,computedValue:p("fontWeight"),onChange:c=>r("fontWeight",c),optionLabels:s?.fontWeight?.options,aria:s?.picklist}),te(U5,{label:i.fontStyle,id:"design-font-style",value:e.fontStyle||t.fontStyle,onChange:c=>r("fontStyle",c),optionLabels:s?.fontStyle?.options}),te(wa,{label:i.textColor,value:e.color||t.color||"#000000",onChange:c=>r("color",c),id:"design-text-color",aria:s?.color}),te(W5,{label:i.textAlignment,id:"design-text-align",value:e.textAlign||t.textAlign,onChange:c=>r("textAlign",c),optionLabels:s?.textAlignment?.options}),te(Q5,{label:i.textFormatting,id:"design-text-decoration",value:e.textDecoration||t.textDecoration,onChange:c=>r("textDecoration",c),optionLabels:s?.textDecoration?.options}),te(J5,{label:i.textTransform,id:"design-text-transform",value:e.textTransform||t.textTransform,onChange:c=>r("textTransform",c),optionLabels:s?.textTransform?.options}),te(k1,{label:i.lineHeight,id:"design-line-height",value:e.lineHeight,placeholder:p("lineHeight"),onChange:c=>r("lineHeight",c),...I1.lineHeight,aria:s?.dimension}),te(k1,{label:i.letterSpacing,id:"design-letter-spacing",value:e.letterSpacing,placeholder:p("letterSpacing"),onChange:c=>r("letterSpacing",c),...I1.letterSpacing,aria:s?.dimension})]}),$e(nt,{title:n.elementDimensions,children:[te(k1,{label:i.width,id:"design-width",value:e.width,placeholder:p("width"),onChange:c=>r("width",c),...I1.width,aria:s?.dimension}),$e("div",{className:"property-panel-row-2col",children:[te(k1,{label:i.minWidth,id:"design-min-width",value:e.minWidth,placeholder:p("minWidth"),onChange:c=>r("minWidth",c),...I1.minWidth,aria:s?.dimension}),te(k1,{label:i.maxWidth,id:"design-max-width",value:e.maxWidth,placeholder:p("maxWidth"),onChange:c=>r("maxWidth",c),...I1.maxWidth,aria:s?.dimension})]}),te(k1,{label:i.height,id:"design-height",value:e.height,placeholder:p("height"),onChange:c=>r("height",c),...I1.height,aria:s?.dimension}),$e("div",{className:"property-panel-row-2col",children:[te(k1,{label:i.minHeight,id:"design-min-height",value:e.minHeight,placeholder:p("minHeight"),onChange:c=>r("minHeight",c),...I1.minHeight,aria:s?.dimension}),te(k1,{label:i.maxHeight,id:"design-max-height",value:e.maxHeight,placeholder:p("maxHeight"),onChange:c=>r("maxHeight",c),...I1.maxHeight,aria:s?.dimension})]}),te(G5,{label:i.overflow,id:"design-overflow",value:e.overflow,computedValue:p("overflow"),onChange:c=>r("overflow",c),optionLabels:s?.overflow?.options,aria:s?.picklist})]})]})})}var Hn=["width","minWidth","maxWidth","height","minHeight","maxHeight","overflow","padding","margin","backgroundColor","backgroundImage","borderWidth","borderStyle","borderColor","borderRadius","color","fontFamily","fontSize","fontWeight","fontStyle","lineHeight","letterSpacing","textAlign","textDecoration","textTransform"],Gt=Object.fromEntries(Hn.map(e=>[e,""]));function ri(e,t,o,a){let r={...t};for(let l of Hn){let n=e[l];n!=null&&!o.has(l)&&(r[l]=n[a]??t[l]??"")}return r}function U8(e,t,o){let a=new Set(t);for(let r of Hn){if(o.has(r))continue;let l=e[r];l!=null&&(l.inline?a.add(r):a.delete(r))}return a}var li=we.forwardRef(function(t,o){let{component:a,styles:r,onStyleChange:l,onTextChange:n,onHistoryStateChange:i,onAddToChatContext:s,onOpenSourceFile:d,onClose:u,onMediaChange:f,showAddToChatContext:C=!0,showOpenSourceFile:h=!0,compactHeader:p=!1,labels:c,imageSource:m}=t,b=e1(E8,c),[g,k]=we.useState(Gt),[v,_]=we.useState(Gt),[D,U]=we.useState(()=>new Set),[M,O]=we.useState(()=>new Set),q=we.useRef(g);q.current=g;let K=we.useRef(v);K.current=v;let X=we.useRef(D);X.current=D;let N=we.useRef(M);N.current=M;let T=we.useRef(new Map),S=we.useRef(l);S.current=l;let x=we.useRef(n);x.current=n;let I=we.useRef(f);I.current=f;let w=we.useRef(null);w.current||(w.current=oi((Y,fe,Q)=>S.current(Y,fe,Q),(Y,fe)=>x.current?.(Y,fe),(Y,fe,Q)=>I.current?.(Y,fe,Q)));let y=w.current,H=we.useRef(i);H.current=i;let[A,Z]=we.useState(()=>y.getUndoCount()),W=y.getMaxHistorySize();we.useEffect(()=>{let Y=Q=>{if(H.current?.({canUndo:Q.canUndo,canRedo:Q.canRedo}),Z(Q.undoCount),!(Q.type==="command-undone"||Q.type==="command-redone"))return;let ce=Q.type==="command-undone",ge=Q.command?.data?.property,ye=Q.command?.data?.changes,Me=[];typeof ge=="string"?Me=[[ge,typeof Q.appliedValue=="string"?Q.appliedValue:""]]:Array.isArray(ye)&&(Me=ye.filter(ke=>ke!=null&&typeof ke.property=="string").map(ke=>[ke.property,String((ce?ke.oldValue:ke.newValue)??"")])),Me.length!==0&&(k(ke=>{let f1={...ke};for(let[A1,w1]of Me)f1[A1]=w1;return f1}),U(ke=>{let f1=new Set(ke);for(let[A1]of Me)f1.add(A1);return f1}))},fe=y.subscribe(Y);return H.current?.({canUndo:y.canUndo(),canRedo:y.canRedo()}),Z(y.getUndoCount()),fe},[y]);let B=A>=W,$=we.useRef(null),F=we.useRef(!1);we.useEffect(()=>{B&&!F.current&&$.current?.focus(),F.current=B},[B]),we.useImperativeHandle(o,()=>({undo:()=>y.undo(),redo:()=>y.redo(),clearHistory:()=>{y.clear(),T.current.clear(),k(Gt),_(Gt),U(new Set),O(new Set),Z(0)},getHistoryStack:()=>y.getHistoryStack(),getChangeSet:()=>ei(y.getHistoryStack()),recordTextChange:(Y,fe,Q)=>y.recordTextChange(Y,fe,Q),canUndo:()=>y.canUndo(),canRedo:()=>y.canRedo()}),[y]);let R=a?`${a.name}-${a.tagName??""}-${a.debugSource?.lineNumber??""}-${a.debugSource?.columnNumber??""}`:"none",L=we.useRef("none");we.useEffect(()=>{let Y=L.current,fe,Q,Ce,ce;if(R!==Y){Y!=="none"&&X.current.size>0&&T.current.set(Y,{styles:q.current,computedStyles:K.current,sessionEdits:X.current,inlineOrigin:N.current}),L.current=R;let ye=T.current.get(R);fe=ye?ye.styles:Gt,Q=ye?ye.computedStyles:Gt,Ce=ye?ye.sessionEdits:new Set,ce=ye?ye.inlineOrigin:new Set}else fe=q.current,Q=K.current,Ce=X.current,ce=N.current;let ge=r||{};k(ri(ge,fe,Ce,"inline")),_(ri(ge,Q,Ce,"computed")),U(Ce),O(U8(ge,ce,Ce))},[R,r]);let P=we.useCallback((Y,fe)=>{let Q=Z8(q.current,Y),Ce=kn(a),ce=ai(Y,fe,K.current.backgroundImage,q.current.backgroundImage);l(Y,fe);for(let ge of ce)l(ge.property,ge.newValue);ce.length===0?y.recordStyleChange(Y,Q,fe,Ce):y.recordStyleBatch([{property:Y,oldValue:Q,newValue:fe},...ce.map(ge=>({property:ge.property,oldValue:ge.oldValue,newValue:ge.newValue}))],Ce),k(ge=>{let ye={...ge,[Y]:fe};for(let Me of ce)ye[Me.property]=Me.newValue;return ye}),U(ge=>{let ye=new Set(ge);fe===""&&N.current.has(Y)?ye.delete(Y):ye.add(Y);for(let Me of ce)ye.add(Me.property);return ye})},[l,y,a]),G=we.useCallback((Y,fe)=>{let Q=a?.media;if(!Q)return;let Ce=a?.debugSource;f?.(Q.tag,{[Y]:fe},Ce);let ce=String(Q[Y]??"");y.recordMediaChange(Q.tag,Y,ce,fe,kn(a))},[a,f,y]),ae=!!(a&&a.name),ue=we.useCallback(()=>{let Y=kn(a);Y&&s?.(Y)},[a,s]),me=ae&&a&&a.tagName&&O8.has(a.tagName.toUpperCase()),ve=a?.hasNonEditableText?b.general.inlineEditNonEditable:b.general.inlineEditEditable,He=a?.tagName?a.tagName.toLowerCase():a?.name;return $e("div",{role:"complementary","aria-label":b.general.ariaPropertyPanel,className:"property-panel-container",children:[$e("header",{className:p?"property-panel-header property-panel-header-compact":"property-panel-header",children:[p?ae&&$e("span",{className:"property-panel-selected-pill",children:[te(A8,{size:12}),te("span",{className:"property-panel-selected-pill-tag",children:He})]}):te("h2",{id:"design-property-panel-title",className:"property-panel-title",children:b.general.headerTitle}),(ae||u)&&$e("div",{className:"property-panel-header-actions",children:[ae&&$e(z8,{children:[me&&te("span",{className:"property-panel-selected-component-action property-panel-selected-component-action-help","data-tooltip":ve,"aria-label":ve,children:te(Zn,{width:14,height:14,style:a.hasNonEditableText?D8:void 0})}),C&&!B&&te("button",{type:"button",className:"property-panel-selected-component-action",onClick:ue,"data-tooltip":b.general.addToChatContext,"aria-label":b.general.addToChatContext,children:te(B8,{size:14})})]}),u&&te("button",{type:"button",className:"property-panel-selected-component-action property-panel-close",onClick:u,"data-tooltip":b.general.closePanel,"aria-label":b.general.closePanel,children:te(F1,{width:14,height:14,"aria-hidden":"true"})})]})]}),$e("div",{className:"property-panel-content","aria-labelledby":p?void 0:"design-property-panel-title",children:[te(F8,{component:a,onOpenSourceFile:d,showOpenSourceFile:h,showComponentName:!p,generalLabels:b.general}),B?te($8,{ref:$,title:b.history.changeLimitTitle,body:Pe(b.history.changeLimitBody,[String(W)])}):te(N8,{styles:g,computedStyles:v,inlineOrigin:M,hasSelection:ae,onStyleChange:P,generalLabels:b.general,sectionLabels:b.sections,instanceLabels:b.instances,editorLabels:c?.editors,component:a,onImageAttributeChange:G,imageSource:m},R)]})]})});function q8(e,t,o){if(!e)return;T8(e).render(we.createElement(li,{...t,ref:o}))}export{li as DesignPropertyPanel,O9 as REQUIRED_LABEL_KEYS,Pe as interpolate,q8 as mountDesignPropertyPanel,ks as validateLabels};
|
|
1
|
+
var ii=Object.create;var Ga=Object.defineProperty;var si=Object.getOwnPropertyDescriptor;var ui=Object.getOwnPropertyNames;var di=Object.getPrototypeOf,ci=Object.prototype.hasOwnProperty;var fi=(e,t,o)=>t in e?Ga(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var Wt=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(o){throw t=0,o}};var pi=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ui(t))!ci.call(e,r)&&r!==o&&Ga(e,r,{get:()=>t[r],enumerable:!(a=si(t,r))||a.enumerable});return e};var Pn=(e,t,o)=>(o=e!=null?ii(di(e)):{},pi(t||!e||!e.__esModule?Ga(o,"default",{value:e,enumerable:!0}):o,e));var lt=(e,t,o)=>fi(e,typeof t!="symbol"?t+"":t,o);var Z0=Wt((Xw,A0)=>{"use strict";var A7="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";A0.exports=A7});var U0=Wt((Qw,N0)=>{"use strict";var Z7=Z0();function F0(){}function $0(){}$0.resetWarningCache=F0;N0.exports=function(){function e(a,r,l,n,i,s){if(s!==Z7){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:$0,resetWarningCache:F0};return o.PropTypes=o,o}});var z0=Wt((eb,q0)=>{q0.exports=U0()();var Jw,Yw});var K0=Wt(we=>{"use strict";var yl=Symbol.for("react.element"),Ml=Symbol.for("react.portal"),ba=Symbol.for("react.fragment"),Ia=Symbol.for("react.strict_mode"),ya=Symbol.for("react.profiler"),Ma=Symbol.for("react.provider"),Sa=Symbol.for("react.context"),F7=Symbol.for("react.server_context"),Ra=Symbol.for("react.forward_ref"),ka=Symbol.for("react.suspense"),Ha=Symbol.for("react.suspense_list"),Pa=Symbol.for("react.memo"),Ta=Symbol.for("react.lazy"),$7=Symbol.for("react.offscreen"),j0;j0=Symbol.for("react.module.reference");function d1(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case yl:switch(e=e.type,e){case ba:case ya:case Ia:case ka:case Ha:return e;default:switch(e=e&&e.$$typeof,e){case F7:case Sa:case Ra:case Ta:case Pa:case Ma:return e;default:return t}}case Ml:return t}}}we.ContextConsumer=Sa;we.ContextProvider=Ma;we.Element=yl;we.ForwardRef=Ra;we.Fragment=ba;we.Lazy=Ta;we.Memo=Pa;we.Portal=Ml;we.Profiler=ya;we.StrictMode=Ia;we.Suspense=ka;we.SuspenseList=Ha;we.isAsyncMode=function(){return!1};we.isConcurrentMode=function(){return!1};we.isContextConsumer=function(e){return d1(e)===Sa};we.isContextProvider=function(e){return d1(e)===Ma};we.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===yl};we.isForwardRef=function(e){return d1(e)===Ra};we.isFragment=function(e){return d1(e)===ba};we.isLazy=function(e){return d1(e)===Ta};we.isMemo=function(e){return d1(e)===Pa};we.isPortal=function(e){return d1(e)===Ml};we.isProfiler=function(e){return d1(e)===ya};we.isStrictMode=function(e){return d1(e)===Ia};we.isSuspense=function(e){return d1(e)===ka};we.isSuspenseList=function(e){return d1(e)===Ha};we.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ba||e===ya||e===Ia||e===ka||e===Ha||e===$7||typeof e=="object"&&e!==null&&(e.$$typeof===Ta||e.$$typeof===Pa||e.$$typeof===Ma||e.$$typeof===Sa||e.$$typeof===Ra||e.$$typeof===j0||e.getModuleId!==void 0)};we.typeOf=d1});var W0=Wt((ob,G0)=>{"use strict";G0.exports=K0()});import{forwardRef as ye,createElement as J}from"react";function Me(e,t){if(e==null)return{};var o={},a=Object.keys(e),r,l;for(l=0;l<a.length;l++)r=a[l],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var Ci=["color"],Tn=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,Ci);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M0 7.5C0 7.22386 0.223858 7 0.5 7H3C3.27614 7 3.5 7.22386 3.5 7.5C3.5 7.77614 3.27614 8 3 8H0.5C0.223858 8 0 7.77614 0 7.5ZM5.75 7.5C5.75 7.22386 5.97386 7 6.25 7H8.75C9.02614 7 9.25 7.22386 9.25 7.5C9.25 7.77614 9.02614 8 8.75 8H6.25C5.97386 8 5.75 7.77614 5.75 7.5ZM12 7C11.7239 7 11.5 7.22386 11.5 7.5C11.5 7.77614 11.7239 8 12 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),mi=["color"],Vn=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,mi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M1.5 6.625C1.01675 6.625 0.625 7.01675 0.625 7.5C0.625 7.98325 1.01675 8.375 1.5 8.375C1.98325 8.375 2.375 7.98325 2.375 7.5C2.375 7.01675 1.98325 6.625 1.5 6.625ZM5.5 6.625C5.01675 6.625 4.625 7.01675 4.625 7.5C4.625 7.98325 5.01675 8.375 5.5 8.375C5.98325 8.375 6.375 7.98325 6.375 7.5C6.375 7.01675 5.98325 6.625 5.5 6.625ZM9.5 6.625C9.01675 6.625 8.625 7.01675 8.625 7.5C8.625 7.98325 9.01675 8.375 9.5 8.375C9.98325 8.375 10.375 7.98325 10.375 7.5C10.375 7.01675 9.98325 6.625 9.5 6.625ZM12.625 7.5C12.625 7.01675 13.0168 6.625 13.5 6.625C13.9832 6.625 14.375 7.01675 14.375 7.5C14.375 7.98325 13.9832 8.375 13.5 8.375C13.0168 8.375 12.625 7.98325 12.625 7.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var hi=["color"],_n=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,hi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M1.25 7.5C1.25 7.22386 1.47386 7 1.75 7H13.25C13.5261 7 13.75 7.22386 13.75 7.5C13.75 7.77614 13.5261 8 13.25 8H1.75C1.47386 8 1.25 7.77614 1.25 7.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var gi=["color"],Dn=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,gi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var vi=["color"],F1=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,vi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var xi=["color"],On=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,xi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M5.67494 3.50017C5.67494 3.25164 5.87641 3.05017 6.12494 3.05017H10.6249C10.8735 3.05017 11.0749 3.25164 11.0749 3.50017C11.0749 3.7487 10.8735 3.95017 10.6249 3.95017H9.00587L7.2309 11.05H8.87493C9.12345 11.05 9.32493 11.2515 9.32493 11.5C9.32493 11.7486 9.12345 11.95 8.87493 11.95H4.37493C4.1264 11.95 3.92493 11.7486 3.92493 11.5C3.92493 11.2515 4.1264 11.05 4.37493 11.05H5.99397L7.76894 3.95017H6.12494C5.87641 3.95017 5.67494 3.7487 5.67494 3.50017Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Li=["color"],En=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,Li);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M4.79993 3.50017C4.79993 3.25164 5.0014 3.05017 5.24993 3.05017H9.74993C9.99845 3.05017 10.1999 3.25164 10.1999 3.50017C10.1999 3.7487 9.99845 3.95017 9.74993 3.95017H8.09993V11.05H9.74994C9.99847 11.05 10.1999 11.2515 10.1999 11.5C10.1999 11.7486 9.99847 11.95 9.74994 11.95H5.24994C5.00141 11.95 4.79994 11.7486 4.79994 11.5C4.79994 11.2515 5.00141 11.05 5.24994 11.05H6.89993V3.95017H5.24993C5.0014 3.95017 4.79993 3.7487 4.79993 3.50017Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),wi=["color"],Bn=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,wi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M2.78233 2.21707C2.70732 2.14206 2.60557 2.09991 2.49949 2.09991C2.3934 2.09991 2.29166 2.14206 2.21664 2.21707L0.216645 4.21707C0.0604351 4.37328 0.0604351 4.62655 0.216645 4.78276C0.372855 4.93897 0.626121 4.93897 0.78233 4.78276L2.09949 3.4656L2.09949 11.5342L0.78233 10.2171C0.62612 10.0609 0.372854 10.0609 0.216645 10.2171C0.0604349 10.3733 0.0604349 10.6265 0.216645 10.7828L2.21664 12.7828C2.29166 12.8578 2.3934 12.8999 2.49949 12.8999C2.60557 12.8999 2.70731 12.8578 2.78233 12.7828L4.78233 10.7828C4.93854 10.6265 4.93854 10.3733 4.78233 10.2171C4.62612 10.0609 4.37285 10.0609 4.21664 10.2171L2.89949 11.5342L2.89949 3.4656L4.21664 4.78276C4.37285 4.93897 4.62612 4.93897 4.78233 4.78276C4.93854 4.62655 4.93854 4.37328 4.78233 4.21707L2.78233 2.21707ZM10.5 2.74997C10.7107 2.74997 10.8988 2.88211 10.9703 3.08036L13.9703 11.3999C14.064 11.6597 13.9293 11.9462 13.6696 12.0399C13.4098 12.1336 13.1233 11.9989 13.0296 11.7392L12.0477 9.016H8.95228L7.97033 11.7392C7.87666 11.9989 7.59013 12.1336 7.33036 12.0399C7.07059 11.9462 6.93595 11.6597 7.02962 11.3999L10.0296 3.08036C10.1011 2.88211 10.2892 2.74997 10.5 2.74997ZM10.5 4.72396L11.7412 8.166H9.25879L10.5 4.72396Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var bi=["color"],An=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,bi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M7.1813 1.68179C7.35704 1.50605 7.64196 1.50605 7.8177 1.68179L10.3177 4.18179C10.4934 4.35753 10.4934 4.64245 10.3177 4.81819C10.142 4.99392 9.85704 4.99392 9.6813 4.81819L7.9495 3.08638L7.9495 11.9136L9.6813 10.1818C9.85704 10.0061 10.142 10.0061 10.3177 10.1818C10.4934 10.3575 10.4934 10.6424 10.3177 10.8182L7.8177 13.3182C7.73331 13.4026 7.61885 13.45 7.4995 13.45C7.38015 13.45 7.26569 13.4026 7.1813 13.3182L4.6813 10.8182C4.50557 10.6424 4.50557 10.3575 4.6813 10.1818C4.85704 10.0061 5.14196 10.0061 5.3177 10.1818L7.0495 11.9136L7.0495 3.08638L5.3177 4.81819C5.14196 4.99392 4.85704 4.99392 4.6813 4.81819C4.50557 4.64245 4.50557 4.35753 4.6813 4.18179L7.1813 1.68179Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Ii=["color"],Zn=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,Ii);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M6.5 1C6.22386 1 6 1.22386 6 1.5C6 1.77614 6.22386 2 6.5 2C7.12671 2 7.45718 2.20028 7.65563 2.47812C7.8781 2.78957 8 3.28837 8 4V11C8 11.7116 7.8781 12.2104 7.65563 12.5219C7.45718 12.7997 7.12671 13 6.5 13C6.22386 13 6 13.2239 6 13.5C6 13.7761 6.22386 14 6.5 14C7.37329 14 8.04282 13.7003 8.46937 13.1031C8.47976 13.0886 8.48997 13.0739 8.5 13.0591C8.51003 13.0739 8.52024 13.0886 8.53063 13.1031C8.95718 13.7003 9.62671 14 10.5 14C10.7761 14 11 13.7761 11 13.5C11 13.2239 10.7761 13 10.5 13C9.87329 13 9.54282 12.7997 9.34437 12.5219C9.1219 12.2104 9 11.7116 9 11V4C9 3.28837 9.1219 2.78957 9.34437 2.47812C9.54282 2.20028 9.87329 2 10.5 2C10.7761 2 11 1.77614 11 1.5C11 1.22386 10.7761 1 10.5 1C9.62671 1 8.95718 1.29972 8.53063 1.89688C8.52024 1.91143 8.51003 1.92611 8.5 1.9409C8.48997 1.92611 8.47976 1.91143 8.46937 1.89688C8.04282 1.29972 7.37329 1 6.5 1ZM14 5H11V4H14C14.5523 4 15 4.44772 15 5V10C15 10.5523 14.5523 11 14 11H11V10H14V5ZM6 4V5H1L1 10H6V11H1C0.447715 11 0 10.5523 0 10V5C0 4.44772 0.447715 4 1 4H6Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var yi=["color"],Fn=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,yi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M3.68979 2.75C3.89667 2.74979 4.08232 2.87701 4.15679 3.07003L7.36662 11.39C7.46602 11.6477 7.33774 11.9371 7.0801 12.0365C6.82247 12.1359 6.53304 12.0076 6.43365 11.75L5.3825 9.02537H2.01133L0.966992 11.749C0.868128 12.0068 0.578964 12.1357 0.321126 12.0369C0.0632878 11.938 -0.0655864 11.6488 0.0332774 11.391L3.22344 3.07099C3.29751 2.87782 3.4829 2.75021 3.68979 2.75ZM3.69174 4.64284L5.05458 8.17537H2.33724L3.69174 4.64284ZM10.8989 5.20703C9.25818 5.20703 8.00915 6.68569 8.00915 8.60972C8.00915 10.6337 9.35818 12.0124 10.8989 12.0124C11.7214 12.0124 12.5744 11.6692 13.1543 11.0219V11.53C13.1543 11.7785 13.3557 11.98 13.6043 11.98C13.8528 11.98 14.0543 11.7785 14.0543 11.53V5.72C14.0543 5.47147 13.8528 5.27 13.6043 5.27C13.3557 5.27 13.1543 5.47147 13.1543 5.72V6.22317C12.6054 5.60095 11.7924 5.20703 10.8989 5.20703ZM13.1543 9.79823V7.30195C12.7639 6.58101 11.9414 6.05757 11.0868 6.05757C10.1088 6.05757 9.03503 6.96581 9.03503 8.60955C9.03503 10.1533 10.0088 11.1615 11.0868 11.1615C11.9701 11.1615 12.7719 10.4952 13.1543 9.79823Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Mi=["color"],$n=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,Mi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M3.69899 5.20703C2.05823 5.20703 0.809204 6.68569 0.809204 8.60972C0.809204 10.6337 2.15823 12.0124 3.69899 12.0124C4.52126 12.0124 5.37402 11.6693 5.9539 11.0223V11.53C5.9539 11.7785 6.15537 11.98 6.4039 11.98C6.65243 11.98 6.8539 11.7785 6.8539 11.53V5.72001C6.8539 5.47149 6.65243 5.27001 6.4039 5.27001C6.15537 5.27001 5.9539 5.47149 5.9539 5.72001V6.22269C5.40506 5.60075 4.59218 5.20703 3.69899 5.20703ZM5.9539 9.799V7.30117C5.56339 6.58064 4.74118 6.05757 3.8868 6.05757C2.9089 6.05757 1.83508 6.96581 1.83508 8.60955C1.83508 10.1533 2.80889 11.1615 3.8868 11.1615C4.76984 11.1615 5.57141 10.4957 5.9539 9.799ZM10.799 5.20703C9.15823 5.20703 7.9092 6.68569 7.9092 8.60972C7.9092 10.6337 9.25823 12.0124 10.799 12.0124C11.6215 12.0124 12.4744 11.6692 13.0543 11.0218V11.53C13.0543 11.7785 13.2558 11.98 13.5043 11.98C13.7529 11.98 13.9543 11.7785 13.9543 11.53V5.72C13.9543 5.47147 13.7529 5.27 13.5043 5.27C13.2558 5.27 13.0543 5.47147 13.0543 5.72V6.22318C12.5055 5.60095 11.6924 5.20703 10.799 5.20703ZM13.0543 9.79822V7.30196C12.664 6.58102 11.8415 6.05757 10.9868 6.05757C10.0089 6.05757 8.93508 6.96581 8.93508 8.60955C8.93508 10.1533 9.90889 11.1615 10.9868 11.1615C11.8702 11.1615 12.672 10.4952 13.0543 9.79822Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Si=["color"],Nn=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,Si);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M3.6255 2.75C3.83478 2.75 4.02192 2.88034 4.09448 3.07664L7.16985 11.3962C7.2656 11.6552 7.13324 11.9428 6.87423 12.0386C6.61522 12.1343 6.32763 12.002 6.23188 11.7429L5.22387 9.01603H2.02712L1.01911 11.7429C0.923362 12.002 0.635774 12.1343 0.376762 12.0386C0.117749 11.9428 -0.0146052 11.6552 0.0811401 11.3962L3.15651 3.07664C3.22908 2.88034 3.41621 2.75 3.6255 2.75ZM3.6255 4.69207L4.90966 8.16603H2.34133L3.6255 4.69207ZM11.3719 2.75C11.5811 2.75 11.7683 2.88034 11.8408 3.07664L14.9162 11.3962C15.012 11.6552 14.8796 11.9428 14.6206 12.0386C14.3616 12.1343 14.074 12.002 13.9782 11.7429L12.9702 9.01603H9.77348L8.76547 11.7429C8.66972 12.002 8.38213 12.1343 8.12312 12.0386C7.86411 11.9428 7.73175 11.6552 7.8275 11.3962L10.9029 3.07664C10.9754 2.88034 11.1626 2.75 11.3719 2.75ZM11.3719 4.69207L12.656 8.16603H10.0877L11.3719 4.69207Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Ri=["color"],Un=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,Ri);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M4.55293 0.999969C4.75295 0.999969 4.93372 1.11917 5.0125 1.30301L8.01106 8.29982C8.11984 8.55363 8.00226 8.84757 7.74844 8.95635C7.49463 9.06512 7.20069 8.94754 7.09191 8.69373L6.11613 6.41685H2.98973L2.01395 8.69373C1.90517 8.94754 1.61123 9.06512 1.35742 8.95635C1.1036 8.84757 0.986023 8.55363 1.0948 8.29982L4.09336 1.30301C4.17214 1.11917 4.35291 0.999969 4.55293 0.999969ZM4.55293 2.76929L5.75186 5.56685H3.354L4.55293 2.76929ZM11.0562 9.00214C11.2617 9.00214 11.4463 8.87633 11.5215 8.68502L14.2733 1.68299C14.3743 1.42598 14.2478 1.13575 13.9908 1.03475C13.7338 0.933747 13.4436 1.06021 13.3426 1.31722L11.0562 7.13514L8.76973 1.31722C8.66873 1.06021 8.3785 0.933747 8.1215 1.03475C7.86449 1.13575 7.73802 1.42598 7.83902 1.68299L10.5908 8.68502C10.666 8.87633 10.8506 9.00214 11.0562 9.00214ZM14.9537 12.4999C14.9537 12.606 14.9115 12.7077 14.8365 12.7828L12.8365 14.7828C12.6803 14.939 12.4271 14.939 12.2708 14.7828C12.1146 14.6265 12.1146 14.3733 12.2708 14.2171L13.588 12.8999H1.51937L2.83653 14.2171C2.99274 14.3733 2.99274 14.6265 2.83653 14.7828C2.68032 14.939 2.42705 14.939 2.27084 14.7828L0.270843 12.7828C0.195828 12.7077 0.153687 12.606 0.153687 12.4999C0.153687 12.3938 0.195828 12.2921 0.270843 12.2171L2.27084 10.2171C2.42705 10.0609 2.68032 10.0609 2.83653 10.2171C2.99274 10.3733 2.99274 10.6265 2.83653 10.7828L1.51937 12.0999L13.588 12.0999L12.2708 10.7828C12.1146 10.6265 12.1146 10.3733 12.2708 10.2171C12.4271 10.0609 12.6803 10.0609 12.8365 10.2171L14.8365 12.2171C14.9115 12.2921 14.9537 12.3938 14.9537 12.4999Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var ki=["color"],qn=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,ki);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M3.78233 2.21713C3.70732 2.14212 3.60557 2.09998 3.49949 2.09998C3.3934 2.09998 3.29166 2.14212 3.21664 2.21713L1.21664 4.21713C1.06044 4.37334 1.06044 4.62661 1.21664 4.78282C1.37285 4.93903 1.62612 4.93903 1.78233 4.78282L3.09949 3.46566L3.09949 11.5343L1.78233 10.2171C1.62612 10.0609 1.37285 10.0609 1.21664 10.2171C1.06043 10.3733 1.06043 10.6266 1.21664 10.7828L3.21664 12.7828C3.29166 12.8578 3.3934 12.9 3.49949 12.9C3.60557 12.9 3.70731 12.8578 3.78233 12.7828L5.78233 10.7828C5.93854 10.6266 5.93854 10.3733 5.78233 10.2171C5.62612 10.0609 5.37285 10.0609 5.21664 10.2171L3.89949 11.5343L3.89949 3.46566L5.21664 4.78282C5.37285 4.93903 5.62612 4.93903 5.78233 4.78282C5.93854 4.62661 5.93854 4.37334 5.78233 4.21713L3.78233 2.21713ZM8.49998 3.99997C8.22383 3.99997 7.99998 4.22382 7.99998 4.49997C7.99998 4.77611 8.22383 4.99997 8.49998 4.99997H14.5C14.7761 4.99997 15 4.77611 15 4.49997C15 4.22382 14.7761 3.99997 14.5 3.99997H8.49998ZM7.99998 7.49997C7.99998 7.22382 8.22383 6.99997 8.49998 6.99997H14.5C14.7761 6.99997 15 7.22382 15 7.49997C15 7.77611 14.7761 7.99997 14.5 7.99997H8.49998C8.22383 7.99997 7.99998 7.77611 7.99998 7.49997ZM8.49998 9.99997C8.22383 9.99997 7.99998 10.2238 7.99998 10.5C7.99998 10.7761 8.22383 11 8.49998 11H14.5C14.7761 11 15 10.7761 15 10.5C15 10.2238 14.7761 9.99997 14.5 9.99997H8.49998Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Hi=["color"],zn=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,Hi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M4.62471 4.00001L4.56402 4.00001C4.04134 3.99993 3.70687 3.99988 3.4182 4.055C2.2379 4.28039 1.29846 5.17053 1.05815 6.33035C0.999538 6.61321 0.999604 6.93998 0.999703 7.43689L0.999711 7.50001L0.999703 7.56313C0.999604 8.06004 0.999538 8.38681 1.05815 8.66967C1.29846 9.8295 2.2379 10.7196 3.4182 10.945C3.70688 11.0001 4.04135 11.0001 4.56403 11L4.62471 11H5.49971C5.77585 11 5.99971 10.7762 5.99971 10.5C5.99971 10.2239 5.77585 10 5.49971 10H4.62471C4.02084 10 3.78907 9.99777 3.60577 9.96277C2.80262 9.8094 2.19157 9.21108 2.03735 8.46678C2.00233 8.29778 1.99971 8.08251 1.99971 7.50001C1.99971 6.91752 2.00233 6.70225 2.03735 6.53324C2.19157 5.78895 2.80262 5.19062 3.60577 5.03725C3.78907 5.00225 4.02084 5.00001 4.62471 5.00001H5.49971C5.77585 5.00001 5.99971 4.77615 5.99971 4.50001C5.99971 4.22387 5.77585 4.00001 5.49971 4.00001H4.62471ZM10.3747 5.00001C10.9786 5.00001 11.2104 5.00225 11.3937 5.03725C12.1968 5.19062 12.8079 5.78895 12.9621 6.53324C12.9971 6.70225 12.9997 6.91752 12.9997 7.50001C12.9997 8.08251 12.9971 8.29778 12.9621 8.46678C12.8079 9.21108 12.1968 9.8094 11.3937 9.96277C11.2104 9.99777 10.9786 10 10.3747 10H9.49971C9.22357 10 8.99971 10.2239 8.99971 10.5C8.99971 10.7762 9.22357 11 9.49971 11H10.3747L10.4354 11C10.9581 11.0001 11.2925 11.0001 11.5812 10.945C12.7615 10.7196 13.701 9.8295 13.9413 8.66967C13.9999 8.38681 13.9998 8.06005 13.9997 7.56314L13.9997 7.50001L13.9997 7.43688C13.9998 6.93998 13.9999 6.61321 13.9413 6.33035C13.701 5.17053 12.7615 4.28039 11.5812 4.055C11.2925 3.99988 10.9581 3.99993 10.4354 4.00001L10.3747 4.00001H9.49971C9.22357 4.00001 8.99971 4.22387 8.99971 4.50001C8.99971 4.77615 9.22357 5.00001 9.49971 5.00001H10.3747ZM5.00038 7C4.72424 7 4.50038 7.22386 4.50038 7.5C4.50038 7.77614 4.72424 8 5.00038 8H10.0004C10.2765 8 10.5004 7.77614 10.5004 7.5C10.5004 7.22386 10.2765 7 10.0004 7H5.00038Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Pi=["color"],jn=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,Pi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M4.56427 3.99988C4.58422 3.99989 4.60445 3.99989 4.62496 3.99989H5.49996C5.7761 3.99989 5.99996 4.22375 5.99996 4.49989C5.99996 4.77603 5.7761 4.99989 5.49996 4.99989H4.62496C4.02108 4.99989 3.78932 5.00213 3.60601 5.03713C2.80287 5.1905 2.19181 5.78883 2.03759 6.53312C2.00257 6.70212 1.99996 6.91739 1.99996 7.49989C1.99996 8.08239 2.00257 8.29766 2.03759 8.46666C2.19181 9.21095 2.80287 9.80928 3.60601 9.96265C3.78932 9.99765 4.02108 9.99989 4.62496 9.99989H5.49996C5.7761 9.99989 5.99996 10.2237 5.99996 10.4999C5.99996 10.776 5.7761 10.9999 5.49996 10.9999H4.62496C4.60445 10.9999 4.58422 10.9999 4.56427 10.9999C4.04159 11 3.70712 11 3.41845 10.9449C2.23814 10.7195 1.29871 9.82937 1.05839 8.66955C0.999782 8.38669 0.999848 8.05992 0.999947 7.56301C0.999951 7.54227 0.999955 7.52123 0.999955 7.49989C0.999955 7.47855 0.999951 7.45751 0.999947 7.43677C0.999848 6.93986 0.999782 6.61309 1.05839 6.33023C1.29871 5.17041 2.23814 4.28027 3.41845 4.05488C3.70712 3.99976 4.04159 3.99981 4.56427 3.99988ZM11.3939 5.03713C11.2106 5.00213 10.9788 4.99989 10.375 4.99989H9.49996C9.22381 4.99989 8.99996 4.77603 8.99996 4.49989C8.99996 4.22375 9.22381 3.99989 9.49996 3.99989H10.375C10.3955 3.99989 10.4157 3.99989 10.4356 3.99988C10.9583 3.99981 11.2928 3.99976 11.5815 4.05488C12.7618 4.28027 13.7012 5.17041 13.9415 6.33023C14.0001 6.61309 14.0001 6.93985 14 7.43676C14 7.4575 14 7.47854 14 7.49989C14 7.52124 14 7.54228 14 7.56302C14.0001 8.05992 14.0001 8.38669 13.9415 8.66955C13.7012 9.82937 12.7618 10.7195 11.5815 10.9449C11.2928 11 10.9583 11 10.4356 10.9999C10.4157 10.9999 10.3955 10.9999 10.375 10.9999H9.49996C9.22381 10.9999 8.99996 10.776 8.99996 10.4999C8.99996 10.2237 9.22381 9.99989 9.49996 9.99989H10.375C10.9788 9.99989 11.2106 9.99765 11.3939 9.96265C12.197 9.80928 12.8081 9.21095 12.9623 8.46666C12.9973 8.29766 13 8.08239 13 7.49989C13 6.91739 12.9973 6.70212 12.9623 6.53312C12.8081 5.78883 12.197 5.1905 11.3939 5.03713Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Ti=["color"],Kn=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,Ti);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M4.85355 2.14645C5.04882 2.34171 5.04882 2.65829 4.85355 2.85355L3.70711 4H9C11.4853 4 13.5 6.01472 13.5 8.5C13.5 10.9853 11.4853 13 9 13H5C4.72386 13 4.5 12.7761 4.5 12.5C4.5 12.2239 4.72386 12 5 12H9C10.933 12 12.5 10.433 12.5 8.5C12.5 6.567 10.933 5 9 5H3.70711L4.85355 6.14645C5.04882 6.34171 5.04882 6.65829 4.85355 6.85355C4.65829 7.04882 4.34171 7.04882 4.14645 6.85355L2.14645 4.85355C1.95118 4.65829 1.95118 4.34171 2.14645 4.14645L4.14645 2.14645C4.34171 1.95118 4.65829 1.95118 4.85355 2.14645Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Vi=["color"],Gn=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,Vi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M5.00003 3.25C5.00003 2.97386 4.77617 2.75 4.50003 2.75C4.22389 2.75 4.00003 2.97386 4.00003 3.25V7.10003H2.49998C2.27906 7.10003 2.09998 7.27912 2.09998 7.50003C2.09998 7.72094 2.27906 7.90003 2.49998 7.90003H4.00003V8.55C4.00003 10.483 5.56703 12.05 7.50003 12.05C9.43303 12.05 11 10.483 11 8.55V7.90003H12.5C12.7209 7.90003 12.9 7.72094 12.9 7.50003C12.9 7.27912 12.7209 7.10003 12.5 7.10003H11V3.25C11 2.97386 10.7762 2.75 10.5 2.75C10.2239 2.75 10 2.97386 10 3.25V7.10003H5.00003V3.25ZM5.00003 7.90003V8.55C5.00003 9.93071 6.11932 11.05 7.50003 11.05C8.88074 11.05 10 9.93071 10 8.55V7.90003H5.00003Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var _i=["color"],Wn=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,_i);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM4 7.5C4 7.22386 4.22386 7 4.5 7H10.5C10.7761 7 11 7.22386 11 7.5C11 7.77614 10.7761 8 10.5 8H4.5C4.22386 8 4 7.77614 4 7.5ZM3 10.5C3 10.2239 3.22386 10 3.5 10H11.5C11.7761 10 12 10.2239 12 10.5C12 10.7761 11.7761 11 11.5 11H3.5C3.22386 11 3 10.7761 3 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Di=["color"],Xn=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,Di);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M2.5 4C2.22386 4 2 4.22386 2 4.5C2 4.77614 2.22386 5 2.5 5H12.5C12.7761 5 13 4.77614 13 4.5C13 4.22386 12.7761 4 12.5 4H2.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Oi=["color"],Qn=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,Oi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H7.5C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H10.5C10.7761 10 11 10.2239 11 10.5C11 10.7761 10.7761 11 10.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Ei=["color"],Jn=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,Ei);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM7 7.5C7 7.22386 7.22386 7 7.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H7.5C7.22386 8 7 7.77614 7 7.5ZM4 10.5C4 10.2239 4.22386 10 4.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H4.5C4.22386 11 4 10.7761 4 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Bi=["color"],Yn=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,Bi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M4 6H11L7.5 10.5L4 6Z",fill:a}))});var Ai=["color"],e9=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,Ai);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M4 9H11L7.5 4.5L4 9Z",fill:a}))});var Zi=["color"],t9=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,Zi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M5.00001 2.75C5.00001 2.47386 4.77615 2.25 4.50001 2.25C4.22387 2.25 4.00001 2.47386 4.00001 2.75V8.05C4.00001 9.983 5.56702 11.55 7.50001 11.55C9.43301 11.55 11 9.983 11 8.05V2.75C11 2.47386 10.7762 2.25 10.5 2.25C10.2239 2.25 10 2.47386 10 2.75V8.05C10 9.43071 8.88072 10.55 7.50001 10.55C6.1193 10.55 5.00001 9.43071 5.00001 8.05V2.75ZM3.49998 13.1001C3.27906 13.1001 3.09998 13.2791 3.09998 13.5001C3.09998 13.721 3.27906 13.9001 3.49998 13.9001H11.5C11.7209 13.9001 11.9 13.721 11.9 13.5001C11.9 13.2791 11.7209 13.1001 11.5 13.1001H3.49998Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Fi=["color"],o9=ye(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Me(e,Fi);return J("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),J("path",{d:"M4.81812 4.68161C4.99386 4.85734 4.99386 5.14227 4.81812 5.318L3.08632 7.0498H11.9135L10.1817 5.318C10.006 5.14227 10.006 4.85734 10.1817 4.68161C10.3575 4.50587 10.6424 4.50587 10.8181 4.68161L13.3181 7.18161C13.4939 7.35734 13.4939 7.64227 13.3181 7.818L10.8181 10.318C10.6424 10.4937 10.3575 10.4937 10.1817 10.318C10.006 10.1423 10.006 9.85734 10.1817 9.68161L11.9135 7.9498H3.08632L4.81812 9.68161C4.99386 9.85734 4.99386 10.1423 4.81812 10.318C4.64239 10.4937 4.35746 10.4937 4.18173 10.318L1.68173 7.818C1.50599 7.64227 1.50599 7.35734 1.68173 7.18161L4.18173 4.68161C4.35746 4.50587 4.64239 4.50587 4.81812 4.68161Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});import Ie from"react";import{createRoot as T8}from"react-dom/client";import a9 from"react";import{jsx as Wa,jsxs as r9}from"react/jsx-runtime";function nt({title:e,defaultOpen:t=!0,children:o}){let[a,r]=a9.useState(t),l=a9.useCallback(n=>{r(n.currentTarget.open)},[]);return r9("details",{className:"property-panel-section",open:a,onToggle:l,children:[r9("summary",{className:"property-panel-section-trigger",children:[Wa("span",{children:e}),Wa(Dn,{className:"property-panel-section-chevron",width:12,height:12,"aria-hidden":"true"})]}),Wa("div",{className:"property-panel-section-content",children:o})]})}var l9=["H1","H2","H3","H4","H5","H6","P","SPAN","A","BUTTON","LABEL","DIV"];import C1 from"react";import*as T1 from"react";import{jsx as $i}from"react/jsx-runtime";function Lt(e,t=[]){let o=[];function a(l,n){let i=T1.createContext(n),s=o.length;o=[...o,n];let u=f=>{let{scope:C,children:h,...p}=f,c=C?.[e]?.[s]||i,m=T1.useMemo(()=>p,Object.values(p));return $i(c.Provider,{value:m,children:h})};u.displayName=l+"Provider";function d(f,C){let h=C?.[e]?.[s]||i,p=T1.useContext(h);if(p)return p;if(n!==void 0)return n;throw new Error(`\`${f}\` must be used within \`${l}\``)}return[u,d]}let r=()=>{let l=o.map(n=>T1.createContext(n));return function(i){let s=i?.[e]||l;return T1.useMemo(()=>({[`__scope${e}`]:{...i,[e]:s}}),[i,s])}};return r.scopeName=e,[a,Ni(r,...t)]}function Ni(...e){let t=e[0];if(e.length===1)return t;let o=()=>{let a=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(l){let n=a.reduce((i,{useScope:s,scopeName:u})=>{let f=s(l)[`__scope${u}`];return{...i,...f}},{});return T1.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return o.scopeName=t.scopeName,o}import*as u9 from"react";import*as Gi from"react-dom";import*as De from"react";import*as i9 from"react";function n9(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Xa(...e){return t=>{let o=!1,a=e.map(r=>{let l=n9(r,t);return!o&&typeof l=="function"&&(o=!0),l});if(o)return()=>{for(let r=0;r<a.length;r++){let l=a[r];typeof l=="function"?l():n9(e[r],null)}}}}function Xt(...e){return i9.useCallback(Xa(...e),e)}import{Fragment as pc,jsx as s9}from"react/jsx-runtime";function Qt(e){let t=Ui(e),o=De.forwardRef((a,r)=>{let{children:l,...n}=a,i=De.Children.toArray(l),s=i.find(zi);if(s){let u=s.props.children,d=i.map(f=>f===s?De.Children.count(u)>1?De.Children.only(null):De.isValidElement(u)?u.props.children:null:f);return s9(t,{...n,ref:r,children:De.isValidElement(u)?De.cloneElement(u,void 0,d):null})}return s9(t,{...n,ref:r,children:l})});return o.displayName=`${e}.Slot`,o}function Ui(e){let t=De.forwardRef((o,a)=>{let{children:r,...l}=o;if(De.isValidElement(r)){let n=Ki(r),i=ji(l,r.props);return r.type!==De.Fragment&&(i.ref=a?Xa(a,n):n),De.cloneElement(r,i)}return De.Children.count(r)>1?De.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var qi=Symbol("radix.slottable");function zi(e){return De.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qi}function ji(e,t){let o={...t};for(let a in t){let r=e[a],l=t[a];/^on[A-Z]/.test(a)?r&&l?o[a]=(...i)=>{let s=l(...i);return r(...i),s}:r&&(o[a]=r):a==="style"?o[a]={...r,...l}:a==="className"&&(o[a]=[r,l].filter(Boolean).join(" "))}return{...e,...o}}function Ki(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}import{jsx as Wi}from"react/jsx-runtime";var Xi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$1=Xi.reduce((e,t)=>{let o=Qt(`Primitive.${t}`),a=u9.forwardRef((r,l)=>{let{asChild:n,...i}=r,s=n?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),Wi(s,{...i,ref:l})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});import*as Ee from"react";var vc=!!(typeof window<"u"&&window.document&&window.document.createElement);function V1(e,t,{checkForDefaultPrevented:o=!0}={}){return function(r){if(e?.(r),o===!1||!r.defaultPrevented)return t?.(r)}}import it from"react";import{jsx as Qa}from"react/jsx-runtime";import Hc from"react";import{jsx as Tc}from"react/jsx-runtime";function d9(e){let t=e+"CollectionProvider",[o,a]=Lt(t),[r,l]=o(t,{collectionRef:{current:null},itemMap:new Map}),n=c=>{let{scope:m,children:b}=c,g=it.useRef(null),k=it.useRef(new Map).current;return Qa(r,{scope:m,itemMap:k,collectionRef:g,children:b})};n.displayName=t;let i=e+"CollectionSlot",s=Qt(i),u=it.forwardRef((c,m)=>{let{scope:b,children:g}=c,k=l(i,b),v=Xt(m,k.collectionRef);return Qa(s,{ref:v,children:g})});u.displayName=i;let d=e+"CollectionItemSlot",f="data-radix-collection-item",C=Qt(d),h=it.forwardRef((c,m)=>{let{scope:b,children:g,...k}=c,v=it.useRef(null),P=Xt(m,v),V=l(d,b);return it.useEffect(()=>(V.itemMap.set(v,{ref:v,...k}),()=>{V.itemMap.delete(v)})),Qa(C,{[f]:"",ref:P,children:g})});h.displayName=d;function p(c){let m=l(e+"CollectionConsumer",c);return it.useCallback(()=>{let g=m.collectionRef.current;if(!g)return[];let k=Array.from(g.querySelectorAll(`[${f}]`));return Array.from(m.itemMap.values()).sort((V,U)=>k.indexOf(V.ref.current)-k.indexOf(U.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:n,Slot:u,ItemSlot:h},p,a]}import*as Ja from"react";import*as c9 from"react";var Ho=globalThis?.document?c9.useLayoutEffect:()=>{};var Qi=Ja[" useId ".trim().toString()]||(()=>{}),Ji=0;function f9(e){let[t,o]=Ja.useState(Qi());return Ho(()=>{e||o(a=>a??String(Ji++))},[e]),e||(t?`radix-${t}`:"")}import*as wt from"react";function p9(e){let t=wt.useRef(e);return wt.useEffect(()=>{t.current=e}),wt.useMemo(()=>(...o)=>t.current?.(...o),[])}import*as r1 from"react";import*as Po from"react";var Yi=r1[" useInsertionEffect ".trim().toString()]||Ho;function st({prop:e,defaultProp:t,onChange:o=()=>{},caller:a}){let[r,l,n]=es({defaultProp:t,onChange:o}),i=e!==void 0,s=i?e:r;{let d=r1.useRef(e!==void 0);r1.useEffect(()=>{let f=d.current;f!==i&&console.warn(`${a} is changing from ${f?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=i},[i,a])}let u=r1.useCallback(d=>{if(i){let f=ts(d)?d(e):d;f!==e&&n.current?.(f)}else l(d)},[i,e,l,n]);return[s,u]}function es({defaultProp:e,onChange:t}){let[o,a]=r1.useState(e),r=r1.useRef(o),l=r1.useRef(t);return Yi(()=>{l.current=t},[t]),r1.useEffect(()=>{r.current!==o&&(l.current?.(o),r.current=o)},[o,r]),[o,a,l]}function ts(e){return typeof e=="function"}import*as To from"react";import{jsx as $c}from"react/jsx-runtime";var os=To.createContext(void 0);function Vo(e){let t=To.useContext(os);return e||t||"ltr"}import{jsx as ut}from"react/jsx-runtime";var Ya="rovingFocusGroup.onEntryFocus",as={bubbles:!1,cancelable:!0},Jt="RovingFocusGroup",[er,C9,rs]=d9(Jt),[ls,tr]=Lt(Jt,[rs]),[ns,is]=ls(Jt),m9=Ee.forwardRef((e,t)=>ut(er.Provider,{scope:e.__scopeRovingFocusGroup,children:ut(er.Slot,{scope:e.__scopeRovingFocusGroup,children:ut(ss,{...e,ref:t})})}));m9.displayName=Jt;var ss=Ee.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,orientation:a,loop:r=!1,dir:l,currentTabStopId:n,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:s,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,C=Ee.useRef(null),h=Xt(t,C),p=Vo(l),[c,m]=st({prop:n,defaultProp:i??null,onChange:s,caller:Jt}),[b,g]=Ee.useState(!1),k=p9(u),v=C9(o),P=Ee.useRef(!1),[V,U]=Ee.useState(0);return Ee.useEffect(()=>{let M=C.current;if(M)return M.addEventListener(Ya,k),()=>M.removeEventListener(Ya,k)},[k]),ut(ns,{scope:o,orientation:a,dir:p,loop:r,currentTabStopId:c,onItemFocus:Ee.useCallback(M=>m(M),[m]),onItemShiftTab:Ee.useCallback(()=>g(!0),[]),onFocusableItemAdd:Ee.useCallback(()=>U(M=>M+1),[]),onFocusableItemRemove:Ee.useCallback(()=>U(M=>M-1),[]),children:ut($1.div,{tabIndex:b||V===0?-1:0,"data-orientation":a,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:V1(e.onMouseDown,()=>{P.current=!0}),onFocus:V1(e.onFocus,M=>{let _=!P.current;if(M.target===M.currentTarget&&_&&!b){let q=new CustomEvent(Ya,as);if(M.currentTarget.dispatchEvent(q),!q.defaultPrevented){let K=v().filter(L=>L.focusable),W=K.find(L=>L.active),N=K.find(L=>L.id===c),S=[W,N,...K].filter(Boolean).map(L=>L.ref.current);v9(S,d)}}P.current=!1}),onBlur:V1(e.onBlur,()=>g(!1))})})}),h9="RovingFocusGroupItem",g9=Ee.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,focusable:a=!0,active:r=!1,tabStopId:l,children:n,...i}=e,s=f9(),u=l||s,d=is(h9,o),f=d.currentTabStopId===u,C=C9(o),{onFocusableItemAdd:h,onFocusableItemRemove:p,currentTabStopId:c}=d;return Ee.useEffect(()=>{if(a)return h(),()=>p()},[a,h,p]),ut(er.ItemSlot,{scope:o,id:u,focusable:a,active:r,children:ut($1.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...i,ref:t,onMouseDown:V1(e.onMouseDown,m=>{a?d.onItemFocus(u):m.preventDefault()}),onFocus:V1(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:V1(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){d.onItemShiftTab();return}if(m.target!==m.currentTarget)return;let b=cs(m,d.orientation,d.dir);if(b!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let k=C().filter(v=>v.focusable).map(v=>v.ref.current);if(b==="last")k.reverse();else if(b==="prev"||b==="next"){b==="prev"&&k.reverse();let v=k.indexOf(m.currentTarget);k=d.loop?fs(k,v+1):k.slice(v+1)}setTimeout(()=>v9(k))}}),children:typeof n=="function"?n({isCurrentTabStop:f,hasTabStop:c!=null}):n})})});g9.displayName=h9;var us={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ds(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function cs(e,t,o){let a=ds(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return us[a]}function v9(e,t=!1){let o=document.activeElement;for(let a of e)if(a===o||(a.focus({preventScroll:t}),document.activeElement!==o))return}function fs(e,t){return e.map((o,a)=>e[(t+a)%e.length])}var x9=m9,L9=g9;import*as w9 from"react";import{jsx as Cs}from"react/jsx-runtime";var b9="Toggle",or=w9.forwardRef((e,t)=>{let{pressed:o,defaultPressed:a,onPressedChange:r,...l}=e,[n,i]=st({prop:o,onChange:r,defaultProp:a??!1,caller:b9});return Cs($1.button,{type:"button","aria-pressed":n,"data-state":n?"on":"off","data-disabled":e.disabled?"":void 0,...l,ref:t,onClick:V1(e.onClick,()=>{e.disabled||i(!n)})})});or.displayName=b9;import{jsx as Ke}from"react/jsx-runtime";var N1="ToggleGroup",[y9,pf]=Lt(N1,[tr]),M9=tr(),ar=C1.forwardRef((e,t)=>{let{type:o,...a}=e;if(o==="single")return Ke(ms,{...a,ref:t});if(o==="multiple")return Ke(hs,{...a,ref:t});throw new Error(`Missing prop \`type\` expected on \`${N1}\``)});ar.displayName=N1;var[S9,R9]=y9(N1),ms=C1.forwardRef((e,t)=>{let{value:o,defaultValue:a,onValueChange:r=()=>{},...l}=e,[n,i]=st({prop:o,defaultProp:a??"",onChange:r,caller:N1});return Ke(S9,{scope:e.__scopeToggleGroup,type:"single",value:C1.useMemo(()=>n?[n]:[],[n]),onItemActivate:i,onItemDeactivate:C1.useCallback(()=>i(""),[i]),children:Ke(k9,{...l,ref:t})})}),hs=C1.forwardRef((e,t)=>{let{value:o,defaultValue:a,onValueChange:r=()=>{},...l}=e,[n,i]=st({prop:o,defaultProp:a??[],onChange:r,caller:N1}),s=C1.useCallback(d=>i((f=[])=>[...f,d]),[i]),u=C1.useCallback(d=>i((f=[])=>f.filter(C=>C!==d)),[i]);return Ke(S9,{scope:e.__scopeToggleGroup,type:"multiple",value:n,onItemActivate:s,onItemDeactivate:u,children:Ke(k9,{...l,ref:t})})});ar.displayName=N1;var[gs,vs]=y9(N1),k9=C1.forwardRef((e,t)=>{let{__scopeToggleGroup:o,disabled:a=!1,rovingFocus:r=!0,orientation:l,dir:n,loop:i=!0,...s}=e,u=M9(o),d=Vo(n),f={role:"group",dir:d,...s};return Ke(gs,{scope:o,rovingFocus:r,disabled:a,children:r?Ke(x9,{asChild:!0,...u,orientation:l,dir:d,loop:i,children:Ke($1.div,{...f,ref:t})}):Ke($1.div,{...f,ref:t})})}),_o="ToggleGroupItem",H9=C1.forwardRef((e,t)=>{let o=R9(_o,e.__scopeToggleGroup),a=vs(_o,e.__scopeToggleGroup),r=M9(e.__scopeToggleGroup),l=o.value.includes(e.value),n=a.disabled||e.disabled,i={...e,pressed:l,disabled:n},s=C1.useRef(null);return a.rovingFocus?Ke(L9,{asChild:!0,...r,focusable:!n,active:l,ref:s,children:Ke(I9,{...i,ref:t})}):Ke(I9,{...i,ref:t})});H9.displayName=_o;var I9=C1.forwardRef((e,t)=>{let{__scopeToggleGroup:o,value:a,...r}=e,l=R9(_o,o),n={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=l.type==="single"?n:void 0;return Ke(or,{...i,...r,ref:t,onPressedChange:s=>{s?l.onItemActivate(a):l.onItemDeactivate(a)}})}),P9=ar,T9=H9;import ys from"react";import{jsx as bs,jsxs as Is}from"react/jsx-runtime";var Ls={border:"none",margin:0,padding:0,minWidth:0},ws={color:"var(--dmp-color-foreground)",fontSize:"var(--dmp-font-size-label)",display:"block",marginBottom:"5px",padding:0};function l1({label:e,id:t,className:o,children:a}){let r=`${t}-legend`;return Is("fieldset",{style:Ls,className:o,"aria-labelledby":r,children:[bs("legend",{id:r,style:ws,children:e}),a]})}import{jsx as rr}from"react/jsx-runtime";function b1({label:e,options:t,value:o,onChange:a,id:r="radio-group"}){let l=ys.useCallback(n=>{n&&typeof a=="function"&&a(n)},[a]);return rr(l1,{label:e,id:r,className:"radioGroupEditor-fieldset",children:rr(P9,{type:"single",value:o,onValueChange:l,className:"radioGroupEditor-root","aria-label":e,children:t.map(n=>rr(T9,{value:n.value,className:"radioGroupEditor-item","aria-label":n.label,title:n.label,children:n.icon??n.label},n.value))})})}import{jsx as Yt}from"react/jsx-runtime";var _9=[{value:"none",labelKey:"none",defaultLabel:"None",icon:Yt(F1,{width:14,height:14})},{value:"solid",labelKey:"solid",defaultLabel:"Solid",icon:Yt(_n,{width:14,height:14})},{value:"dashed",labelKey:"dashed",defaultLabel:"Dashed",icon:Yt(Tn,{width:14,height:14})},{value:"dotted",labelKey:"dotted",defaultLabel:"Dotted",icon:Yt(Vn,{width:14,height:14})}],V9=new Set(_9.map(e=>e.value));function Ms(e){if(!e)return"none";if(V9.has(e))return e;let t=e.split(/\s+/)[0]??"";return V9.has(t)?t:"none"}function D9({label:e="Border Style",value:t,onChange:o,id:a="border-style",optionLabels:r}){let l=_9.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return Yt(b1,{label:e,options:l,value:Ms(t),onChange:o,id:a})}import Ue from"react";function Pe(e,t){return e.replace(/\{(\d+)\}/g,(o,a)=>{let r=t[Number(a)];return r===void 0?o:String(r)})}function e1(e,t){if(t==null||typeof t!="object"||typeof e!="object")return e;let o={...e},a=t;for(let r of Object.keys(o)){let l=o[r],n=a[r];l!==null&&typeof l=="object"&&!Array.isArray(l)?o[r]=e1(l,n):typeof n=="string"&&(o[r]=n)}return o}var O9=[{path:"general.headerTitle"},{path:"general.emptyPlaceholder"},{path:"general.inlineEditEditable"},{path:"general.inlineEditNonEditable"},{path:"general.addToChatContext"},{path:"general.ariaPropertyPanel"},{path:"general.ariaSelectedComponent"},{path:"general.ariaElementStyling"},{path:"general.closePanel"},{path:"sections.imageSource"},{path:"sections.background"},{path:"sections.spacing"},{path:"sections.border"},{path:"sections.typography"},{path:"sections.elementDimensions"},{path:"instances.imageSource"},{path:"instances.backgroundColor"},{path:"instances.padding"},{path:"instances.margin"},{path:"instances.borderRadius"},{path:"instances.borderWeight"},{path:"instances.borderStyle"},{path:"instances.borderColor"},{path:"instances.fontFamily"},{path:"instances.fontSize"},{path:"instances.fontWeight"},{path:"instances.fontStyle"},{path:"instances.textColor"},{path:"instances.textAlignment"},{path:"instances.textFormatting"},{path:"instances.textTransform"},{path:"instances.lineHeight"},{path:"instances.letterSpacing"},{path:"instances.width"},{path:"instances.minWidth"},{path:"instances.maxWidth"},{path:"instances.height"},{path:"instances.minHeight"},{path:"instances.maxHeight"},{path:"instances.overflow"},{path:"editors.image.tabCms"},{path:"editors.image.tabLocal"},{path:"editors.image.tabUrl"},{path:"editors.image.ariaTablist"},{path:"editors.image.clearImage"},{path:"editors.image.chooseFile"},{path:"editors.image.ariaChooseFile"},{path:"editors.image.useThisImage"},{path:"editors.image.ariaImageUrl"},{path:"editors.image.urlPlaceholder"},{path:"editors.image.previewAlt"},{path:"editors.image.altText"},{path:"editors.image.altPlaceholder"},{path:"editors.image.width"},{path:"editors.image.height"},{path:"editors.image.autoPlaceholder"},{path:"editors.image.workspace"},{path:"editors.image.selectWorkspace"},{path:"editors.image.selectImage"},{path:"editors.image.loadingWorkspaces"},{path:"editors.image.noWorkspaces"},{path:"editors.image.loadingImages"},{path:"editors.image.noImages"},{path:"editors.image.loadingMore"},{path:"editors.image.untitled"},{path:"editors.image.downloadingImage"},{path:"editors.image.downloadFailed"},{path:"editors.image.closePicker"},{path:"editors.image.cancel"},{path:"editors.image.done"},{path:"editors.image.pickerTitle",placeholders:[0]},{path:"editors.image.pickerError",placeholders:[0]},{path:"editors.boxDimension.sides.top"},{path:"editors.boxDimension.sides.right"},{path:"editors.boxDimension.sides.bottom"},{path:"editors.boxDimension.sides.left"},{path:"editors.boxDimension.corners.topLeft"},{path:"editors.boxDimension.corners.topRight"},{path:"editors.boxDimension.corners.bottomRight"},{path:"editors.boxDimension.corners.bottomLeft"},{path:"editors.boxDimension.linkSides"},{path:"editors.boxDimension.unlinkSides"},{path:"editors.boxDimension.ariaUnit",placeholders:[0]},{path:"editors.boxDimension.ariaSide",placeholders:[0,1]},{path:"editors.dimension.ariaValue",placeholders:[0]},{path:"editors.dimension.ariaUnit",placeholders:[0]},{path:"editors.color.placeholder"},{path:"editors.color.ariaValue",placeholders:[0]},{path:"editors.color.ariaOpenPicker",placeholders:[0,1]},{path:"editors.color.ariaPicker",placeholders:[0]},{path:"editors.color.ariaSaturation",placeholders:[0,1]},{path:"editors.color.ariaEyedropper"},{path:"editors.color.ariaHue"},{path:"editors.color.ariaAlphaSlider"},{path:"editors.color.ariaHex"},{path:"editors.color.ariaChannel",placeholders:[0,1,2,3]},{path:"editors.color.ariaAlphaInput"},{path:"editors.color.ariaFormatCycle",placeholders:[0]},{path:"editors.color.titleFormatCycle"},{path:"editors.color.gradientValue"},{path:"editors.color.imageValue"},{path:"editors.fontWeight.options.thin"},{path:"editors.fontWeight.options.extraLight"},{path:"editors.fontWeight.options.light"},{path:"editors.fontWeight.options.regular"},{path:"editors.fontWeight.options.medium"},{path:"editors.fontWeight.options.semiBold"},{path:"editors.fontWeight.options.bold"},{path:"editors.fontWeight.options.extraBold"},{path:"editors.fontWeight.options.black"},{path:"editors.fontStyle.options.normal"},{path:"editors.fontStyle.options.italic"},{path:"editors.borderStyle.options.none"},{path:"editors.borderStyle.options.solid"},{path:"editors.borderStyle.options.dashed"},{path:"editors.borderStyle.options.dotted"},{path:"editors.overflow.options.visible"},{path:"editors.overflow.options.hidden"},{path:"editors.overflow.options.scroll"},{path:"editors.overflow.options.auto"},{path:"editors.textAlignment.options.left"},{path:"editors.textAlignment.options.center"},{path:"editors.textAlignment.options.right"},{path:"editors.textAlignment.options.justify"},{path:"editors.textDecoration.options.none"},{path:"editors.textDecoration.options.underline"},{path:"editors.textDecoration.options.lineThrough"},{path:"editors.textTransform.options.none"},{path:"editors.textTransform.options.uppercase"},{path:"editors.textTransform.options.lowercase"},{path:"editors.textTransform.options.capitalize"},{path:"editors.picklist.ariaReset",placeholders:[0]},{path:"history.changeLimitTitle"},{path:"history.changeLimitBody",placeholders:[0]}];function Ss(e,t){return t.split(".").reduce((o,a)=>{if(o&&typeof o=="object")return o[a]},e)}function Rs(e){let t=new Set;for(let o of e.matchAll(/\{(\d+)\}/g))t.add(Number(o[1]));return Array.from(t).sort((o,a)=>o-a)}function ks(e){let t=[];if(!e||typeof e!="object")return["labels is not an object"];for(let o of O9){let{path:a,placeholders:r}=o,l=Ss(e,a);if(typeof l!="string"){t.push(`missing or non-string label: ${a}`);continue}if(r){let n=Rs(l),i=[...r].sort((u,d)=>u-d);(n.length!==i.length||n.some((u,d)=>u!==i[d]))&&t.push(`placeholder mismatch at ${a}: expected {${i.join(",")}}, got {${n.join(",")}}`)}}return t}var Do=[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"},{value:"pt",label:"pt"},{value:"vw",label:"vw"},{value:"vh",label:"vh"},{value:"vmin",label:"vmin"},{value:"vmax",label:"vmax"},{value:"ch",label:"ch"},{value:"ex",label:"ex"},{value:"cm",label:"cm"},{value:"mm",label:"mm"},{value:"in",label:"in"},{value:"pc",label:"pc"}],m1={px:{min:0,max:1e4,step:1,decimals:1},em:{min:0,max:100,step:.1,decimals:3},rem:{min:0,max:100,step:.1,decimals:3},"%":{min:0,max:1e3,step:1,decimals:2},pt:{min:0,max:1e4,step:1,decimals:1},vw:{min:0,max:100,step:.1,decimals:1},vh:{min:0,max:100,step:.1,decimals:1},vmin:{min:0,max:100,step:.1,decimals:1},vmax:{min:0,max:100,step:.1,decimals:1},ch:{min:0,max:100,step:.1,decimals:1},ex:{min:0,max:100,step:.1,decimals:1},cm:{min:0,max:100,step:.1,decimals:2},mm:{min:0,max:1e3,step:1,decimals:1},in:{min:0,max:50,step:.01,decimals:2},pc:{min:0,max:500,step:1,decimals:0}},Hs=m1.px??{min:0,max:1e4,step:1,decimals:0};function eo(e){let t=e.map(o=>o.value).join("|");return new RegExp(`^(-?\\d*\\.?\\d+)\\s*(${t})$`)}var Ps=eo(Do);function Ge(e,t="px",o=Ps){if(e==null||e==="")return{numericValue:"",unit:t};let a=String(e).trim();if(a==="")return{numericValue:"",unit:t};let r=a.match(o);if(r&&r[1]!=null&&r[2]!=null)return{numericValue:parseFloat(r[1]),unit:r[2]};let l=parseFloat(a);return isNaN(l)?{numericValue:"",unit:t}:{numericValue:l,unit:t}}function lr(e,t=m1){return t[e]||Hs}function h1(e,t,o=m1){let a=lr(t,o);return Math.min(a.max,Math.max(a.min,e))}function g1(e,t,o=m1){if(e===""||e==null||isNaN(e))return"";let a=lr(t,o);return Number(Number(e).toFixed(a.decimals))}function Oo(e,t){return e===""||e==null||isNaN(e)?"":`${e}${t}`}function Eo(e,t,o,a,r=m1){let l=parseFloat(e)||0,n=lr(a,r),i=o?10:1,s=(t==="ArrowUp"?1:-1)*n.step*i,u=h1(l+s,a,r);return String(g1(u,a,r))}function nr({top:e,right:t,bottom:o,left:a}){return`${e||"0px"} ${t||"0px"} ${o||"0px"} ${a||"0px"}`}function bt(e){let t={top:"",right:"",bottom:"",left:""};if(!e||typeof e!="string")return t;let o=e.trim().split(/\s+/),[a="",r="",l="",n=""]=o;return o.length===0||o.length===1&&a===""?t:o.length===1?{top:a,right:a,bottom:a,left:a}:o.length===2?{top:a,right:r,bottom:a,left:r}:o.length===3?{top:a,right:r,bottom:l,left:r}:{top:a,right:r,bottom:l,left:n}}function n1(...e){return Do.filter(t=>e.includes(t.value))}var I1={width:{units:n1("px","em","rem","vw","ch","%"),icon:o9},minWidth:{units:n1("px","em","rem","vw","ch","%")},maxWidth:{units:n1("px","em","rem","vw","ch","%")},height:{units:n1("px","em","rem","vh","%"),icon:An},minHeight:{units:n1("px","em","rem","vh","%")},maxHeight:{units:n1("px","em","rem","vh","%")},fontSize:{units:n1("px","em","rem","%","pt"),constraints:{...m1,px:{min:0,max:1e3,step:1,decimals:0},"%":{min:0,max:1e3,step:1,decimals:0}},icon:Bn},lineHeight:{units:[{value:"",label:"\xD7"},{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"}],defaultUnit:"",constraints:{"":{min:0,max:10,step:.1,decimals:2},px:{min:0,max:1e3,step:1,decimals:2},em:{min:0,max:100,step:.1,decimals:3},rem:{min:0,max:100,step:.1,decimals:3},"%":{min:0,max:1e3,step:1,decimals:2}},icon:qn},letterSpacing:{units:n1("px","em","rem"),constraints:{...m1,px:{min:-100,max:1e3,step:.5,decimals:1},em:{min:-10,max:100,step:.01,decimals:3},rem:{min:-10,max:100,step:.01,decimals:3}},icon:Un}},to={padding:{units:n1("px","em","rem","%")},margin:{units:n1("px","em","rem","%")},borderRadius:{units:n1("px","em","rem","%"),sideLabelKind:"corners"},borderWidth:{units:n1("px","em","rem")}};import{jsx as v1,jsxs as Bo}from"react/jsx-runtime";var Ts=[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"}],It=["top","right","bottom","left"],Vs={sides:{top:"Top",right:"Right",bottom:"Bottom",left:"Left"},corners:{topLeft:"Top Left",topRight:"Top Right",bottomRight:"Bottom Right",bottomLeft:"Bottom Left"},linkSides:"Link all sides",unlinkSides:"Unlink sides",ariaUnit:"{0} unit",ariaSide:"{0} {1}"};function _s(e,t){return t==="corners"?[e.corners.topLeft,e.corners.topRight,e.corners.bottomRight,e.corners.bottomLeft]:[e.sides.top,e.sides.right,e.sides.bottom,e.sides.left]}var Ds=v1(zn,{width:14,height:14}),Os=v1(jn,{width:14,height:14});function oo(e){return typeof e=="string"&&e.trim().toLowerCase()==="auto"}function ir(e,t,o){let a={top:"",right:"",bottom:"",left:""};for(let r of It){let l=e[r];if(l==null||l==="")a[r]="";else if(oo(l))a[r]="auto";else{let n=Ge(String(l),t,o);a[r]=n.numericValue!==""?String(n.numericValue):""}}return a}function sr(e){let t=e.top||"";return t===(e.right||"")&&t===(e.bottom||"")&&t===(e.left||"")}function E9(e,t,o){for(let a of It){let r=e[a];if(r!=null&&r!==""&&r!=="0"){let l=Ge(String(r),"px",t);if(l.unit&&o.has(l.unit))return l.unit}}return"px"}function Es(e,t,o){if(oo(e))return"auto";let a=parseFloat(e);if(e===""||isNaN(a))return"";let r=h1(a,t,o);return`${g1(r,t,o)}${t}`}function B9(e){if(!e)return"";let t=bt(e);return!t.top&&!t.right&&!t.bottom&&!t.left?"":nr(t)}function ao({label:e,value:t="",onChange:o,id:a="",units:r=Ts,constraints:l=m1,allowAuto:n=!1,sideLabelKind:i="sides",sideIcons:s,placeholder:u="",aria:d}){let f=e1(Vs,d),C=_s(f,i),h=Ue.useRef(o);h.current=o;let p=Ue.useMemo(()=>eo(r),[r]),c=Ue.useMemo(()=>new Set(r.map(S=>S.value)),[r]),m=Ue.useMemo(()=>{let S={top:"",right:"",bottom:"",left:""};if(!u)return S;let L=bt(u),x={...S};for(let w of It){let I=L[w];if(!I)continue;let H=Ge(I,"px",p);H.numericValue!==""&&(x[w]=String(H.numericValue))}return x},[u,p]),b=Ue.useMemo(()=>bt(t),[]),[g,k]=Ue.useState(()=>E9(b,p,c)),[v,P]=Ue.useState(()=>ir(b,g,p)),[V,U]=Ue.useState(()=>sr(v)),M=Ue.useRef(B9(t));Ue.useEffect(()=>{if(t===M.current)return;let S=B9(t);if(S===M.current)return;M.current=S;let L=bt(t),x=E9(L,p,c);k(x);let w=ir(L,x,p);P(w),U(sr(w))},[t,p,c]);let _=Ue.useCallback((S,L)=>{let x={top:"",right:"",bottom:"",left:""},w=!0;for(let H of It)x[H]=Es(S[H],L,l),x[H]!==""&&(w=!1);let I=w?"":nr(x);I!==M.current&&(M.current=I,typeof h.current=="function"&&h.current(I))},[l]),q=Ue.useCallback((S,L)=>{P(V?{top:L,right:L,bottom:L,left:L}:w=>({...w,[S]:L}));let x=Ge(L,g,p);x.numericValue!==""&&x.unit&&c.has(x.unit)&&x.unit!==g&&k(x.unit)},[V,g,p,c]),K=Ue.useCallback((S,L)=>{let x=L.clipboardData.getData("text"),w=Ge(x,g,p);if(w.numericValue!==""&&w.unit&&c.has(w.unit)){L.preventDefault();let I=h1(w.numericValue,w.unit,l),H=String(g1(I,w.unit,l)),A=V?{top:H,right:H,bottom:H,left:H}:{...v,[S]:H};P(A),w.unit!==g&&k(w.unit),_(A,w.unit)}},[V,v,g,p,c,l,_]),W=Ue.useCallback(S=>{let L=v[S];if(L===""){let A=V?{top:"",right:"",bottom:"",left:""}:{...v,[S]:""};P(A),_(A,g);return}if(n&&oo(L)){let A="auto",F=V?{top:A,right:A,bottom:A,left:A}:{...v,[S]:A};P(F),_(F,g);return}let x=parseFloat(L);if(isNaN(x)){let A=bt(M.current);P(ir(A,g,p));return}let w=h1(x,g,l),I=String(g1(w,g,l)),H=V?{top:I,right:I,bottom:I,left:I}:{...v,[S]:I};P(H),_(H,g)},[v,V,g,p,l,_,n]),N=Ue.useCallback((S,L)=>{if(L.key==="Enter"){L.currentTarget.blur();return}if(L.key==="ArrowUp"||L.key==="ArrowDown"){if(oo(v[S]))return;L.preventDefault();let x=Eo(v[S],L.key,L.shiftKey,g,l);if(x===null)return;let w=V?{top:x,right:x,bottom:x,left:x}:{...v,[S]:x};P(w),_(w,g)}},[v,V,g,l,_]),E=Ue.useCallback(S=>{let L=S.target.value;if(!c.has(L))return;k(L);let x={top:"",right:"",bottom:"",left:""};for(let w of It){let I=v[w];if(oo(I))x[w]="auto";else if(I!==""){let H=parseFloat(I);if(isNaN(H))x[w]=I;else{let A=h1(H,L,l);x[w]=String(g1(A,L,l))}}else x[w]=""}P(x),_(x,L)},[v,c,l,_]);return Bo(l1,{label:e,id:a,className:"boxDimensionEditor-fieldset",children:[v1("div",{className:"boxDimensionEditor-header",children:Bo("div",{className:"boxDimensionEditor-controls",children:[v1("button",{type:"button",className:"boxDimensionEditor-link-btn"+(V?" boxDimensionEditor-link-btn--active":""),onClick:()=>{if(!V){let S=v.top;if(!sr(v)){let L={top:S,right:S,bottom:S,left:S};P(L),_(L,g)}}U(S=>!S)},"aria-label":V?f.unlinkSides:f.linkSides,"aria-pressed":V,title:V?f.unlinkSides:f.linkSides,children:V?Ds:Os}),v1("select",{className:"boxDimensionEditor-unit",value:g,onChange:E,"aria-label":Pe(f.ariaUnit,[e]),children:r.map(S=>v1("option",{value:S.value,children:S.label},S.value))})]})}),v1("div",{className:"boxDimensionEditor-grid",children:It.map((S,L)=>{let x=s&&s[L];return Bo("div",{className:"boxDimensionEditor-cell",children:[v1("label",{htmlFor:`${a}-${S}`,className:"boxDimensionEditor-label",children:C[L]}),Bo("div",{className:"boxDimensionEditor-input-row",children:[x&&v1("span",{className:"boxDimensionEditor-input-icon","aria-hidden":"true",children:v1(x,{size:12,width:12,height:12})}),v1("input",{id:`${a}-${S}`,type:"text",className:x?"boxDimensionEditor-input boxDimensionEditor-input--with-icon":"boxDimensionEditor-input",value:v[S],placeholder:m[S],onChange:w=>q(S,w.target.value),onPaste:w=>K(S,w),onBlur:()=>W(S),onKeyDown:w=>N(S,w),"aria-label":Pe(f.ariaSide,[e,C[L]??""]),autoComplete:"off",spellCheck:"false"})]})]},S)})})]})}import{forwardRef as As,createElement as Zs}from"react";var Ao=(...e)=>e.filter((t,o,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===o).join(" ").trim();var A9=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var Z9=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,a)=>a?a.toUpperCase():o.toLowerCase());var ur=e=>{let t=Z9(e);return t.charAt(0).toUpperCase()+t.slice(1)};import{forwardRef as Bs,createElement as N9}from"react";var F9={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"};var $9=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var U9=Bs(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:r="",children:l,iconNode:n,...i},s)=>N9("svg",{ref:s,...F9,width:t,height:t,stroke:e,strokeWidth:a?Number(o)*24/Number(t):o,className:Ao("lucide",r),...!l&&!$9(i)&&{"aria-hidden":"true"},...i},[...n.map(([u,d])=>N9(u,d)),...Array.isArray(l)?l:[l]]));var q9=(e,t)=>{let o=As(({className:a,...r},l)=>Zs(U9,{ref:l,iconNode:t,className:Ao(`lucide-${A9(ur(e))}`,`lucide-${e}`,a),...r}));return o.displayName=ur(e),o};var Fs=[["path",{d:"m12 9-8.414 8.414A2 2 0 0 0 3 18.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 3.828 21h1.344a2 2 0 0 0 1.414-.586L15 12",key:"1y3wsu"}],["path",{d:"m18 9 .4.4a1 1 0 1 1-3 3l-3.8-3.8a1 1 0 1 1 3-3l.4.4 3.4-3.4a1 1 0 1 1 3 3z",key:"110lr1"}],["path",{d:"m2 22 .414-.414",key:"jhxm08"}]],ro=q9("pipette",Fs);import Re from"react";import{useRef as No,useCallback as Ne,useEffect as gr,useMemo as Uo,useState as vr,createContext as $s,useContext as Ns}from"react";var z9={exports:{}},lo={};var j9;function Us(){if(j9)return lo;j9=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function o(a,r,l){var n=null;if(l!==void 0&&(n=""+l),r.key!==void 0&&(n=""+r.key),"key"in r){l={};for(var i in r)i!=="key"&&(l[i]=r[i])}else l=r;return r=l.ref,{$$typeof:e,type:a,key:n,ref:r!==void 0?r:null,props:l}}return lo.Fragment=t,lo.jsx=o,lo.jsxs=o,lo}var K9;function qs(){return K9||(K9=1,z9.exports=Us()),z9.exports}var Te=qs();function o2(e){var t,o,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(o=o2(e[t]))&&(a&&(a+=" "),a+=o)}else for(o in e)e[o]&&(a&&(a+=" "),a+=o);return a}function zs(){for(var e,t,o=0,a="",r=arguments.length;o<r;o++)(e=arguments[o])&&(t=o2(e))&&(a&&(a+=" "),a+=t);return a}var xr="-",js=e=>{let t=Gs(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:r=>{let l=r.split(xr);return l[0]===""&&l.length!==1&&l.shift(),a2(l,t)||Ks(r)},getConflictingClassGroupIds:(r,l)=>{let n=o[r]||[];return l&&a[r]?[...n,...a[r]]:n}}},a2=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),r=a?a2(e.slice(1),a):void 0;if(r)return r;if(t.validators.length===0)return;let l=e.join(xr);return t.validators.find(({validator:n})=>n(l))?.classGroupId},G9=/^\[(.+)\]$/,Ks=e=>{if(G9.test(e)){let t=G9.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Gs=e=>{let{theme:t,classGroups:o}=e,a={nextPart:new Map,validators:[]};for(let r in o)fr(o[r],a,r,t);return a},fr=(e,t,o,a)=>{e.forEach(r=>{if(typeof r=="string"){let l=r===""?t:W9(t,r);l.classGroupId=o;return}if(typeof r=="function"){if(Ws(r)){fr(r(a),t,o,a);return}t.validators.push({validator:r,classGroupId:o});return}Object.entries(r).forEach(([l,n])=>{fr(n,W9(t,l),o,a)})})},W9=(e,t)=>{let o=e;return t.split(xr).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},Ws=e=>e.isThemeGetter,Xs=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,r=(l,n)=>{o.set(l,n),t++,t>e&&(t=0,a=o,o=new Map)};return{get(l){let n=o.get(l);if(n!==void 0)return n;if((n=a.get(l))!==void 0)return r(l,n),n},set(l,n){o.has(l)?o.set(l,n):r(l,n)}}},pr="!",Cr=":",Qs=Cr.length,Js=e=>{let{prefix:t,experimentalParseClassName:o}=e,a=r=>{let l=[],n=0,i=0,s=0,u;for(let p=0;p<r.length;p++){let c=r[p];if(n===0&&i===0){if(c===Cr){l.push(r.slice(s,p)),s=p+Qs;continue}if(c==="/"){u=p;continue}}c==="["?n++:c==="]"?n--:c==="("?i++:c===")"&&i--}let d=l.length===0?r:r.substring(s),f=Ys(d),C=f!==d,h=u&&u>s?u-s:void 0;return{modifiers:l,hasImportantModifier:C,baseClassName:f,maybePostfixModifierPosition:h}};if(t){let r=t+Cr,l=a;a=n=>n.startsWith(r)?l(n.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:n,maybePostfixModifierPosition:void 0}}if(o){let r=a;a=l=>o({className:l,parseClassName:r})}return a},Ys=e=>e.endsWith(pr)?e.substring(0,e.length-1):e.startsWith(pr)?e.substring(1):e,e3=e=>{let t=Object.fromEntries(e.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;let a=[],r=[];return o.forEach(l=>{l[0]==="["||t[l]?(a.push(...r.sort(),l),r=[]):r.push(l)}),a.push(...r.sort()),a}},t3=e=>({cache:Xs(e.cacheSize),parseClassName:Js(e),sortModifiers:e3(e),...js(e)}),o3=/\s+/,a3=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:r,sortModifiers:l}=t,n=[],i=e.trim().split(o3),s="";for(let u=i.length-1;u>=0;u-=1){let d=i[u],{isExternal:f,modifiers:C,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:c}=o(d);if(f){s=d+(s.length>0?" "+s:s);continue}let m=!!c,b=a(m?p.substring(0,c):p);if(!b){if(!m){s=d+(s.length>0?" "+s:s);continue}if(b=a(p),!b){s=d+(s.length>0?" "+s:s);continue}m=!1}let g=l(C).join(":"),k=h?g+pr:g,v=k+b;if(n.includes(v))continue;n.push(v);let P=r(b,m);for(let V=0;V<P.length;++V){let U=P[V];n.push(k+U)}s=d+(s.length>0?" "+s:s)}return s};function r3(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=r2(t))&&(a&&(a+=" "),a+=o);return a}var r2=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=r2(e[a]))&&(o&&(o+=" "),o+=t);return o};function l3(e,...t){let o,a,r,l=n;function n(s){let u=t.reduce((d,f)=>f(d),e());return o=t3(u),a=o.cache.get,r=o.cache.set,l=i,i(s)}function i(s){let u=a(s);if(u)return u;let d=a3(s,o);return r(s,d),d}return function(){return l(r3.apply(null,arguments))}}var Oe=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},l2=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,n2=/^\((?:(\w[\w-]*):)?(.+)\)$/i,n3=/^\d+\/\d+$/,i3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,s3=/\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$/,u3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,d3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,c3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yt=e=>n3.test(e),ce=e=>!!e&&!Number.isNaN(Number(e)),U1=e=>!!e&&Number.isInteger(Number(e)),dr=e=>e.endsWith("%")&&ce(e.slice(0,-1)),_1=e=>i3.test(e),f3=()=>!0,p3=e=>s3.test(e)&&!u3.test(e),i2=()=>!1,C3=e=>d3.test(e),m3=e=>c3.test(e),h3=e=>!z(e)&&!j(e),g3=e=>Mt(e,d2,i2),z=e=>l2.test(e),dt=e=>Mt(e,c2,p3),cr=e=>Mt(e,b3,ce),X9=e=>Mt(e,s2,i2),v3=e=>Mt(e,u2,m3),Zo=e=>Mt(e,f2,C3),j=e=>n2.test(e),no=e=>St(e,c2),x3=e=>St(e,I3),Q9=e=>St(e,s2),L3=e=>St(e,d2),w3=e=>St(e,u2),Fo=e=>St(e,f2,!0),Mt=(e,t,o)=>{let a=l2.exec(e);return a?a[1]?t(a[1]):o(a[2]):!1},St=(e,t,o=!1)=>{let a=n2.exec(e);return a?a[1]?t(a[1]):o:!1},s2=e=>e==="position"||e==="percentage",u2=e=>e==="image"||e==="url",d2=e=>e==="length"||e==="size"||e==="bg-size",c2=e=>e==="length",b3=e=>e==="number",I3=e=>e==="family-name",f2=e=>e==="shadow",y3=()=>{let e=Oe("color"),t=Oe("font"),o=Oe("text"),a=Oe("font-weight"),r=Oe("tracking"),l=Oe("leading"),n=Oe("breakpoint"),i=Oe("container"),s=Oe("spacing"),u=Oe("radius"),d=Oe("shadow"),f=Oe("inset-shadow"),C=Oe("text-shadow"),h=Oe("drop-shadow"),p=Oe("blur"),c=Oe("perspective"),m=Oe("aspect"),b=Oe("ease"),g=Oe("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...v(),j,z],V=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto","contain","none"],M=()=>[j,z,s],_=()=>[yt,"full","auto",...M()],q=()=>[U1,"none","subgrid",j,z],K=()=>["auto",{span:["full",U1,j,z]},U1,j,z],W=()=>[U1,"auto",j,z],N=()=>["auto","min","max","fr",j,z],E=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],S=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...M()],x=()=>[yt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],w=()=>[e,j,z],I=()=>[...v(),Q9,X9,{position:[j,z]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",L3,g3,{size:[j,z]}],F=()=>[dr,no,dt],G=()=>["","none","full",u,j,z],B=()=>["",ce,no,dt],$=()=>["solid","dashed","dotted","double"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>[ce,dr,Q9,X9],oe=()=>["","none",p,j,z],se=()=>["none",ce,j,z],ue=()=>["none",ce,j,z],y=()=>[ce,j,z],D=()=>[yt,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[_1],breakpoint:[_1],color:[f3],container:[_1],"drop-shadow":[_1],ease:["in","out","in-out"],font:[h3],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[_1],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[_1],shadow:[_1],spacing:["px",ce],text:[_1],"text-shadow":[_1],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",yt,z,j,m]}],container:["container"],columns:[{columns:[ce,z,j,i]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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"],sr:["sr-only","not-sr-only"],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:P()}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:_()}],"inset-x":[{"inset-x":_()}],"inset-y":[{"inset-y":_()}],start:[{start:_()}],end:[{end:_()}],top:[{top:_()}],right:[{right:_()}],bottom:[{bottom:_()}],left:[{left:_()}],visibility:["visible","invisible","collapse"],z:[{z:[U1,"auto",j,z]}],basis:[{basis:[yt,"full","auto",i,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ce,yt,"auto","initial","none",z]}],grow:[{grow:["",ce,j,z]}],shrink:[{shrink:["",ce,j,z]}],order:[{order:[U1,"first","last","none",j,z]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:K()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:K()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...E(),"normal"]}],"justify-items":[{"justify-items":[...S(),"normal"]}],"justify-self":[{"justify-self":["auto",...S()]}],"align-content":[{content:["normal",...E()]}],"align-items":[{items:[...S(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...S(),{baseline:["","last"]}]}],"place-content":[{"place-content":E()}],"place-items":[{"place-items":[...S(),"baseline"]}],"place-self":[{"place-self":["auto",...S()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:x()}],w:[{w:[i,"screen",...x()]}],"min-w":[{"min-w":[i,"screen","none",...x()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[n]},...x()]}],h:[{h:["screen","lh",...x()]}],"min-h":[{"min-h":["screen","lh","none",...x()]}],"max-h":[{"max-h":["screen","lh",...x()]}],"font-size":[{text:["base",o,no,dt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,j,cr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",dr,z]}],"font-family":[{font:[x3,z,t]}],"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-fractions"],tracking:[{tracking:[r,j,z]}],"line-clamp":[{"line-clamp":[ce,"none",j,cr]}],leading:[{leading:[l,...M()]}],"list-image":[{"list-image":["none",j,z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",j,z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:w()}],"text-color":[{text:w()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:[ce,"from-font","auto",j,dt]}],"text-decoration-color":[{decoration:w()}],"underline-offset":[{"underline-offset":[ce,"auto",j,z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",j,z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",j,z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},U1,j,z],radial:["",j,z],conic:[U1,j,z]},w3,v3]}],"bg-color":[{bg:w()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:w()}],"gradient-via":[{via:w()}],"gradient-to":[{to:w()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...$(),"hidden","none"]}],"divide-style":[{divide:[...$(),"hidden","none"]}],"border-color":[{border:w()}],"border-color-x":[{"border-x":w()}],"border-color-y":[{"border-y":w()}],"border-color-s":[{"border-s":w()}],"border-color-e":[{"border-e":w()}],"border-color-t":[{"border-t":w()}],"border-color-r":[{"border-r":w()}],"border-color-b":[{"border-b":w()}],"border-color-l":[{"border-l":w()}],"divide-color":[{divide:w()}],"outline-style":[{outline:[...$(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ce,j,z]}],"outline-w":[{outline:["",ce,no,dt]}],"outline-color":[{outline:w()}],shadow:[{shadow:["","none",d,Fo,Zo]}],"shadow-color":[{shadow:w()}],"inset-shadow":[{"inset-shadow":["none",f,Fo,Zo]}],"inset-shadow-color":[{"inset-shadow":w()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:w()}],"ring-offset-w":[{"ring-offset":[ce,dt]}],"ring-offset-color":[{"ring-offset":w()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":w()}],"text-shadow":[{"text-shadow":["none",C,Fo,Zo]}],"text-shadow-color":[{"text-shadow":w()}],opacity:[{opacity:[ce,j,z]}],"mix-blend":[{"mix-blend":[...Z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Z()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":w()}],"mask-image-linear-to-color":[{"mask-linear-to":w()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":w()}],"mask-image-t-to-color":[{"mask-t-to":w()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":w()}],"mask-image-r-to-color":[{"mask-r-to":w()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":w()}],"mask-image-b-to-color":[{"mask-b-to":w()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":w()}],"mask-image-l-to-color":[{"mask-l-to":w()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":w()}],"mask-image-x-to-color":[{"mask-x-to":w()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":w()}],"mask-image-y-to-color":[{"mask-y-to":w()}],"mask-image-radial":[{"mask-radial":[j,z]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":w()}],"mask-image-radial-to-color":[{"mask-radial-to":w()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":v()}],"mask-image-conic-pos":[{"mask-conic":[ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":w()}],"mask-image-conic-to-color":[{"mask-conic-to":w()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",j,z]}],filter:[{filter:["","none",j,z]}],blur:[{blur:oe()}],brightness:[{brightness:[ce,j,z]}],contrast:[{contrast:[ce,j,z]}],"drop-shadow":[{"drop-shadow":["","none",h,Fo,Zo]}],"drop-shadow-color":[{"drop-shadow":w()}],grayscale:[{grayscale:["",ce,j,z]}],"hue-rotate":[{"hue-rotate":[ce,j,z]}],invert:[{invert:["",ce,j,z]}],saturate:[{saturate:[ce,j,z]}],sepia:[{sepia:["",ce,j,z]}],"backdrop-filter":[{"backdrop-filter":["","none",j,z]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[ce,j,z]}],"backdrop-contrast":[{"backdrop-contrast":[ce,j,z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ce,j,z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ce,j,z]}],"backdrop-invert":[{"backdrop-invert":["",ce,j,z]}],"backdrop-opacity":[{"backdrop-opacity":[ce,j,z]}],"backdrop-saturate":[{"backdrop-saturate":[ce,j,z]}],"backdrop-sepia":[{"backdrop-sepia":["",ce,j,z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",j,z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ce,"initial",j,z]}],ease:[{ease:["linear","initial",b,j,z]}],delay:[{delay:[ce,j,z]}],animate:[{animate:["none",g,j,z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[c,j,z]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:y()}],"skew-x":[{"skew-x":y()}],"skew-y":[{"skew-y":y()}],transform:[{transform:[j,z,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:D()}],"translate-x":[{"translate-x":D()}],"translate-y":[{"translate-y":D()}],"translate-z":[{"translate-z":D()}],"translate-none":["translate-none"],accent:[{accent:w()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:w()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",j,z]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",j,z]}],fill:[{fill:["none",...w()]}],"stroke-w":[{stroke:[ce,no,dt,cr]}],stroke:[{stroke:["none",...w()]}],"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-x","border-w-y","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-x","border-color-y","border-color-s","border-color-e","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},M3=l3(y3),S3=(e,t,o)=>Math.min(Math.max(e,t),o),$o=e=>Math.round(S3(e,0,255)),p2=e=>{let t=e.replace("#",""),o=parseInt(t,16);return{r:o>>16&255,g:o>>8&255,b:o&255}},R3=({r:e,g:t,b:o})=>{let a=r=>$o(r).toString(16).padStart(2,"0");return`#${a(e)}${a(t)}${a(o)}`},mr=({h:e,s:t,v:o})=>{e=e/360,t=t/100,o=o/100;let a=Math.floor(e*6),r=e*6-a,l=o*(1-t),n=o*(1-r*t),i=o*(1-(1-r)*t),s,u,d;switch(a%6){case 0:s=o,u=i,d=l;break;case 1:s=n,u=o,d=l;break;case 2:s=l,u=o,d=i;break;case 3:s=l,u=n,d=o;break;case 4:s=i,u=l,d=o;break;case 5:s=o,u=l,d=n;break;default:s=u=d=0}return{r:$o(s*255),g:$o(u*255),b:$o(d*255)}},hr=({r:e,g:t,b:o})=>{e/=255,t/=255,o/=255;let a=Math.max(e,t,o),r=Math.min(e,t,o),l=a-r,n=0,i=a===0?0:l/a,s=a;if(l!==0)switch(a){case e:n=((t-o)/l+(t<o?6:0))/6;break;case t:n=((o-e)/l+2)/6;break;case o:n=((e-t)/l+4)/6;break}return{h:Math.round(n*360),s:Math.round(i*100),v:Math.round(s*100)}},k3=e=>R3(mr(e)),H3=e=>hr(p2(e));var J9=({h:e,s:t,v:o})=>{let a=o*(2-t/100)/2,r=a!==0&&a!==100?(o-a)/Math.min(a,100-a)*100:0;return{h:e,s:Math.round(r),l:Math.round(a)}},Y9=({h:e,s:t,l:o})=>{let a=o+t*Math.min(o,100-o)/100,r=a===0?0:2*(1-o/a)*100;return{h:e,s:Math.round(r),v:Math.round(a)}},P3=e=>{let{r:t,g:o,b:a}=p2(e);return(.299*t+.587*o+.114*a)/255>.5?"#000000":"#ffffff"};var T3=(e,t="hex")=>{switch(t){case"hex":return e.getHex();case"rgb":let o=e.getRgb();return`rgb(${o.r}, ${o.g}, ${o.b})`;case"rgba":let a=e.getRgba();return`rgba(${a.r}, ${a.g}, ${a.b}, ${a.a})`;case"hsl":let r=e.getHsl();return`hsl(${r.h}, ${r.s}%, ${r.l}%)`;case"hsla":let l=e.getHsla();return`hsla(${l.h}, ${l.s}%, ${l.l}%, ${l.a})`;default:qo()}};function V3(e){switch(e.type){case"hex":return{...H3(e.value),a:1};case"rgb":return{...hr(e),a:1};case"rgba":return{...hr(e),a:e.a};case"hsl":return{...Y9(e),a:1};case"hsla":return{...Y9(e),a:1};case"hsv":return{...e,a:1};case"hsva":return{...e};default:qo()}}function q1(e,t){let o=V3(e);switch(t){case"hex":return k3(o);case"rgb":return mr(o);case"rgba":return{...mr(o),a:o.a};case"hsl":return J9(o);case"hsla":return{...J9(o),a:o.a};case"hsv":return{h:o.h,s:o.s,v:o.v};case"hsva":return o;default:qo()}}var ct=(...e)=>M3(zs(e)),D1=(e,t,o)=>Math.min(Math.max(e,t),o),z1=e=>Math.round(e);function qo(e){throw new Error("You should never get here.")}var j1=class e{constructor(t){this.colorInput=t,typeof t=="string"?this.color={type:"hex",value:t}:"type"in t?this.color=t:"r"in t?"a"in t?this.color={type:"rgba",...t}:this.color={type:"rgb",...t}:"v"in t?"a"in t?this.color={type:"hsva",...t}:this.color={type:"hsv",...t}:"a"in t?this.color={type:"hsla",...t}:this.color={type:"hsl",...t}}getRgb(){return q1(this.color,"rgb")}getHsv(){return q1(this.color,"hsv")}getHsla(){return q1(this.color,"hsla")}getHsva(){return q1(this.color,"hsva")}getHex(){return q1(this.color,"hex")}getHsl(){return q1(this.color,"hsl")}getRgba(){return q1(this.color,"rgba")}format(t="hex"){return T3(this,t)}getContrastingColor(){return new e({type:"hex",value:P3(this.getHex())})}},e2=(e,t)=>{let o=e.getBoundingClientRect(),a,r;if("touches"in t){let u=t.touches[0]||t.changedTouches[0];a=u.clientX,r=u.clientY}else a=t.clientX,r=t.clientY;let l=a-o.left,n=r-o.top,i=D1(l/o.width,0,1),s=D1(n/o.height,0,1);return{left:i,top:s}},Lr=({onMove:e,onMoveEnd:t,onKey:o,children:a,className:r,...l})=>{let n=No(null),i=No(!1),s=Ne(C=>{!i.current||!n.current||(C.preventDefault(),e(e2(n.current,C)))},[e]),u=Ne(()=>{i.current=!1,t(),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",u),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",u)},[s,t]),d=Ne(C=>{let h=n.current;h&&(C.preventDefault(),i.current=!0,e(e2(h,C.nativeEvent)),document.addEventListener("mousemove",s),document.addEventListener("mouseup",u),document.addEventListener("touchmove",s,{passive:!1}),document.addEventListener("touchend",u))},[e,s,u]),f=Ne(C=>{if(!o)return;let h=C.which||C.keyCode;h<37||h>40||(C.preventDefault(),o({left:h===39?.05:h===37?-.05:0,top:h===40?.05:h===38?-.05:0}))},[o]);return gr(()=>()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",u),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",u)},[s,u]),Te.jsx("div",{ref:n,className:ct("rounded-inherit absolute inset-0 touch-none outline-none","focus:[&_.react-colorful-pointer]:scale-110",r),onTouchStart:d,onMouseDown:d,onKeyDown:f,tabIndex:0,role:"slider",...l,children:a})},wr=({className:e,top:t=.5,left:o,color:a})=>Te.jsx("div",{className:ct("absolute z-[1] h-6 w-6 -translate-x-1/2 -translate-y-1/2 cursor-grab rounded-full border-2 border-white bg-white active:cursor-grabbing","react-colorful-pointer shadow-[0_2px_8px_rgba(0,0,0,0.15)] transition-transform",e),style:{top:`${t*100}%`,left:`${o*100}%`}}),_3=({hsva:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=Ne(s=>{t({a:s.left},!1)},[t]),l=Ne(s=>{t({a:D1(e.a+s.left,0,1)},!0)},[e.a,t]),n=Uo(()=>new j1({type:"hsva",h:e.h,s:e.s,v:e.v,a:0}).format("hsla"),[e.h,e.s,e.v]),i=Uo(()=>new j1({type:"hsva",h:e.h,s:e.s,v:e.v,a:1}).format("hsla"),[e.h,e.s,e.v]);return Te.jsx("div",{className:ct("relative h-full w-full",o),children:Te.jsxs(Lr,{onMove:r,onMoveEnd:a,onKey:l,"aria-label":"Alpha","aria-valuetext":`${z1(e.a*100)}%`,"aria-valuenow":z1(e.a*100),"aria-valuemin":0,"aria-valuemax":100,className:"h-full w-full rounded-lg",children:[Te.jsx("div",{className:"absolute inset-0 rounded-lg bg-white",style:{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><rect x="8" width="8" height="8"/><rect y="8" width="8" height="8"/></svg>')`}}),Te.jsx("div",{className:"absolute inset-0 rounded-lg",style:{backgroundImage:`linear-gradient(90deg, ${n}, ${i})`}}),Te.jsx(wr,{className:"z-[1]",top:.5,left:e.a,color:""})]})})},D3=({hue:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=Ne(n=>{let i=z1(D1(360*n.left,0,360));t({h:i},!1)},[t]),l=Ne(n=>{t({h:D1(e+n.left*360,0,360)},!0)},[e,t]);return Te.jsx("div",{className:ct("relative h-full w-full",o),children:Te.jsxs(Lr,{onMove:r,onMoveEnd:a,onKey:l,"aria-label":"Hue","aria-valuenow":z1(e),"aria-valuemax":360,"aria-valuemin":0,className:"h-full w-full rounded-lg",children:[Te.jsx("div",{className:"absolute inset-0 rounded-lg",style:{background:"linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)"}}),Te.jsx(wr,{className:"z-[2]",top:.5,left:e/360,color:""})]})})},O3=({hsva:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=Ne(i=>{let s=z1(D1(i.left*100,0,100)),u=z1(D1(100-i.top*100,0,100));t({s,v:u},!1)},[t]),l=Ne(i=>{t({s:D1(e.s+i.left*100,0,100),v:D1(e.v-i.top*100,0,100)},!0)},[e.s,e.v,t]),n=`hsl(${e.h}, 100%, 50%)`;return Te.jsx("div",{className:ct("relative h-full w-full rounded-xl",o),children:Te.jsxs(Lr,{onMove:r,onMoveEnd:a,onKey:l,"aria-label":"Color","aria-valuetext":`Saturation ${z1(e.s)}%, Brightness ${z1(e.v)}%`,className:"rounded-inherit h-full w-full",children:[Te.jsx("div",{className:"rounded-inherit absolute inset-0 rounded-b-none",style:{backgroundColor:n,backgroundImage:"linear-gradient(to top, #000, rgba(0, 0, 0, 0)), linear-gradient(to right, #fff, rgba(255, 255, 255, 0))",boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.05)"}}),Te.jsx(wr,{className:"z-[3]",top:1-e.v/100,left:e.s/100,color:""})]})})},C2=$s(null),zo=()=>{let e=Ns(C2);if(!e)throw new Error("ColorPicker compound components must be used within a ColorPicker");return e};function t2(e){return"type"in e?new j1(e):e}var E3=({color:e,onChange:t,className:o,children:a,defaultColor:r,...l})=>{let[n,i]=vr(t2(e??r??{h:340,s:58,v:100,a:1,type:"hsva"})),s=No(!1),u=No(n);gr(()=>{!s.current&&e&&(u.current=t2(e),i(u.current))},[e]);let d=Ne((p,c)=>{let m=new j1({type:"hsva",...u.current.getHsva(),...p});u.current=m,i(m),s.current=!c,t?.(m)},[t]),f=Ne(()=>{s.current=!1},[]),C=Ne(async()=>{if(!("EyeDropper"in window)){console.log("EyeDropper API not supported");return}try{let p=await new window.EyeDropper().open();p.sRGBHex&&d(q1({type:"hex",value:p.sRGBHex},"hsva"),!0)}catch(p){console.log("EyeDropper cancelled or failed:",p)}},[t]),h={hsva:n.getHsva(),updateHsva:d,handleEyeDropper:C,onFinishedUpdates:f};return Te.jsx(C2.Provider,{value:h,children:Te.jsx("div",{...l,className:ct("relative flex h-[280px] w-[280px] cursor-default flex-col rounded-2xl bg-white shadow-lg select-none",o),children:a})})},B3=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=zo(),r=Ne((l,n)=>{o(l,n)},[o]);return Te.jsx(O3,{hsva:t,onChange:r,className:e,onFinishedUpdates:a})},A3=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=zo(),r=Ne((l,n)=>{o(l,n)},[o]);return Te.jsx(D3,{hue:t.h,onChange:r,className:e,onFinishedUpdates:a})},Z3=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=zo(),r=Ne((l,n)=>{o(l,n)},[o]);return Te.jsx(_3,{hsva:t,onChange:r,className:e,onFinishedUpdates:a})},F3=({className:e,title:t="Pick color from screen",children:o})=>{let{handleEyeDropper:a}=zo(),[r,l]=vr(!1);return gr(()=>{typeof window<"u"&&"EyeDropper"in window&&l(!0)},[]),r?Te.jsx("button",{onClick:a,className:ct("flex h-10 w-10 flex-shrink-0 cursor-pointer items-center justify-center rounded-lg transition-colors hover:bg-gray-100",e),title:t,children:o}):null},Rt=Object.assign(E3,{Saturation:B3,Hue:A3,Alpha:Z3,EyeDropper:F3});function $3(e,t){switch(t){case"hex":return{type:"hex",value:e.getHex()};case"rgb":return{type:"rgb",...e.getRgb()};case"rgba":return{type:"rgba",...e.getRgba()};case"hsl":return{type:"hsl",...e.getHsl()};case"hsla":return{type:"hsla",...e.getHsla()};case"hsv":return{type:"hsv",...e.getHsv()};case"hsva":return{type:"hsva",...e.getHsva()};default:qo()}}var m2=(e={type:"hex",value:"#ff6b9d"})=>{let[t,o]=vr(()=>{let n=typeof e=="function"?e():e;return{color:new j1(n),type:n.type}}),a=Uo(()=>$3(t.color,t.type),[t.color,t.type]),r=Uo(()=>{let n=t.color.getHsva();return{hex:t.color.getHex(),rgb:t.color.getRgb(),rgba:t.color.getRgba(),hsl:t.color.getHsl(),hsla:t.color.getHsla(),hsv:t.color.getHsv(),hsva:n,alpha:n.a}},[t.color]),l=Ne(n=>{try{let i="type"in n?new j1(n):n;o(s=>({color:i,type:s.type}))}catch(i){console.warn("Invalid color input:",n,i)}},[]);return[{colorInput:a,colorState:r},l]};import{createPortal as b7}from"react-dom";import{useRef as x1,useMemo as N3,useEffect as U3,useState as n6,useCallback as i6}from"react";function h2(e,t,o,a){var r=this,l=x1(null),n=x1(0),i=x1(0),s=x1(null),u=x1([]),d=x1(),f=x1(),C=x1(e),h=x1(!0),p=x1(),c=x1();C.current=e;var m=typeof window<"u",b=!t&&t!==0&&m;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var g=!!(o=o||{}).leading,k=!("trailing"in o)||!!o.trailing,v=!!o.flushOnExit&&k,P="maxWait"in o,V="debounceOnServer"in o&&!!o.debounceOnServer,U=P?Math.max(+o.maxWait||0,t):null,M=N3(function(){var _=function(L){var x=u.current,w=d.current;return u.current=d.current=null,n.current=L,i.current=i.current||L,f.current=C.current.apply(w,x)},q=function(L,x){b&&cancelAnimationFrame(s.current),s.current=b?requestAnimationFrame(L):setTimeout(L,x)},K=function(L){if(!h.current)return!1;var x=L-l.current;return!l.current||x>=t||x<0||P&&L-n.current>=U},W=function(L){return s.current=null,k&&u.current?_(L):(u.current=d.current=null,f.current)},N=function L(){var x=Date.now();if(g&&i.current===n.current&&E(),K(x))return W(x);if(h.current){var w=t-(x-l.current),I=P?Math.min(w,U-(x-n.current)):w;q(L,I)}},E=function(){a&&a({})},S=function(){if(m||V){var L,x=Date.now(),w=K(x);if(u.current=[].slice.call(arguments),d.current=r,l.current=x,v&&!p.current&&(p.current=function(){var I;((I=globalThis.document)==null?void 0:I.visibilityState)==="hidden"&&c.current.flush()},(L=globalThis.document)==null||L.addEventListener==null||L.addEventListener("visibilitychange",p.current)),w){if(!s.current&&h.current)return n.current=l.current,q(N,t),g?_(l.current):f.current;if(P)return q(N,t),_(l.current)}return s.current||q(N,t),f.current}};return S.cancel=function(){var L=s.current;L&&(b?cancelAnimationFrame(s.current):clearTimeout(s.current)),n.current=0,u.current=l.current=d.current=s.current=null,L&&a&&a({})},S.isPending=function(){return!!s.current},S.flush=function(){return s.current?W(Date.now()):f.current},S},[g,P,t,U,k,v,b,m,V,a]);return c.current=M,U3(function(){return h.current=!0,function(){var _;v&&c.current.flush(),p.current&&((_=globalThis.document)==null||_.removeEventListener==null||_.removeEventListener("visibilitychange",p.current),p.current=null),h.current=!1}},[v]),M}import qe from"react";function ft(e){let t=e?.parentNode;for(;t;){if(t instanceof ShadowRoot){t=t.host;continue}if(t instanceof HTMLElement){let{overflowY:o}=getComputedStyle(t);if(o==="auto"||o==="scroll")return t}t=t.parentNode}return null}var g2='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';function v2({computePosition:e,onClose:t,autoFocus:o=!0,trapFocus:a=!1}={}){let[r,l]=qe.useState(!1),[n,i]=qe.useState({top:0,left:0}),s=qe.useRef(null),u=qe.useRef(null),d=qe.useRef(!1),f=qe.useRef(e);f.current=e;let C=qe.useRef(t);C.current=t;let h=qe.useRef(a);h.current=a;let p=qe.useCallback((...g)=>{!s.current||!f.current||i(f.current(s.current,...g))},[]),c=qe.useCallback(()=>{p(),d.current=!0,l(!0)},[p]),m=qe.useCallback(()=>{C.current&&C.current(),d.current=!1,l(!1),s.current?.focus()},[]),b=qe.useCallback(()=>{d.current?m():c()},[c,m]);return qe.useEffect(()=>{if(!r)return;let g=v=>{if(v.key==="Escape"&&(v.preventDefault(),m()),h.current&&v.key==="Tab"){let P=u.current;if(!P)return;let V=Array.from(P.querySelectorAll(g2)).filter(_=>!_.hasAttribute("disabled")),U=V[0],M=V.at(-1);if(!U||!M)return;v.shiftKey&&document.activeElement===U?(v.preventDefault(),M.focus()):!v.shiftKey&&document.activeElement===M&&(v.preventDefault(),U.focus())}},k=v=>{let P=u.current,V=s.current;if(!P||!V)return;let U=typeof v.composedPath=="function"?v.composedPath():[],M=U.includes(P)||v.target instanceof Node&&P.contains(v.target),_=U.includes(V)||v.target instanceof Node&&V.contains(v.target);!M&&!_&&m()};return document.addEventListener("keydown",g),document.addEventListener("mousedown",k),document.addEventListener("touchstart",k),()=>{document.removeEventListener("keydown",g),document.removeEventListener("mousedown",k),document.removeEventListener("touchstart",k)}},[r,m]),qe.useEffect(()=>{if(!r||!o||!u.current)return;let g=u.current.querySelector(g2);g&&g.focus()},[r,o]),qe.useEffect(()=>{if(!r||!s.current)return;let g=ft(s.current);if(!g)return;let k=()=>m();return g.addEventListener("scroll",k,{passive:!0}),()=>g.removeEventListener("scroll",k)},[r,m]),{isOpen:r,open:c,close:m,toggle:b,triggerRef:s,popoverRef:u,position:n,reposition:p}}var q3=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},jo=q3;var z3={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},x2=z3;var j3=e=>jo(x2[e.toLowerCase()],6),L2=j3;var K3=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,G3=e=>{let t;return(t=e.match(K3))?jo(parseInt(t[1],16),t[1].length):void 0},w2=G3;var ze="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",L6=`(?:${ze}|none)`,pt=`${ze}%`,w6=`(?:${ze}%|none)`,io=`(?:${ze}%|${ze})`,W3=`(?:${ze}%|${ze}|none)`,b2=`(?:${ze}(deg|grad|rad|turn)|${ze})`,b6=`(?:${ze}(deg|grad|rad|turn)|${ze}|none)`,K1="\\s*,\\s*";var I6=new RegExp("^"+W3+"$");var X3=new RegExp(`^rgba?\\(\\s*${ze}${K1}${ze}${K1}${ze}\\s*(?:,\\s*${io}\\s*)?\\)$`),Q3=new RegExp(`^rgba?\\(\\s*${pt}${K1}${pt}${K1}${pt}\\s*(?:,\\s*${io}\\s*)?\\)$`),J3=e=>{let t={mode:"rgb"},o;if(o=e.match(X3))o[1]!==void 0&&(t.r=o[1]/255),o[2]!==void 0&&(t.g=o[2]/255),o[3]!==void 0&&(t.b=o[3]/255);else if(o=e.match(Q3))o[1]!==void 0&&(t.r=o[1]/100),o[2]!==void 0&&(t.g=o[2]/100),o[3]!==void 0&&(t.b=o[3]/100);else return;return o[4]!==void 0?t.alpha=Math.max(0,Math.min(1,o[4]/100)):o[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+o[5]))),t},I2=J3;var Y3=(e,t)=>e===void 0?void 0:typeof e!="object"?Ct(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,Ko=Y3;var eu=(e="rgb")=>t=>(t=Ko(t,e))!==void 0?t.mode===e?t:L1[t.mode][e]?L1[t.mode][e](t):e==="rgb"?L1[t.mode].rgb(t):L1.rgb[e](L1[t.mode].rgb(t)):void 0,t1=eu;var L1={},y2={},so=[],br={},tu=e=>e,Le=e=>(L1[e.mode]={...L1[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{L1[t]||(L1[t]={}),L1[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=tu)}),y2[e.mode]=e,(e.parse||[]).forEach(t=>{ou(t,e.mode)}),t1(e.mode)),Go=e=>y2[e],ou=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");br[e]=t}else typeof e=="function"&&so.indexOf(e)<0&&so.push(e)};var Ir=/[^\x00-\x7F]|[a-zA-Z_]/,au=/[^\x00-\x7F]|[-\w]/,T={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},ae=0;function Wo(e){let t=e[ae],o=e[ae+1];return t==="-"||t==="+"?/\d/.test(o)||o==="."&&/\d/.test(e[ae+2]):t==="."?/\d/.test(o):/\d/.test(t)}function yr(e){if(ae>=e.length)return!1;let t=e[ae];if(Ir.test(t))return!0;if(t==="-"){if(e.length-ae<2)return!1;let o=e[ae+1];return!!(o==="-"||Ir.test(o))}return!1}var ru={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function uo(e){let t="";if((e[ae]==="-"||e[ae]==="+")&&(t+=e[ae++]),t+=Xo(e),e[ae]==="."&&/\d/.test(e[ae+1])&&(t+=e[ae++]+Xo(e)),(e[ae]==="e"||e[ae]==="E")&&((e[ae+1]==="-"||e[ae+1]==="+")&&/\d/.test(e[ae+2])?t+=e[ae++]+e[ae++]+Xo(e):/\d/.test(e[ae+1])&&(t+=e[ae++]+Xo(e))),yr(e)){let o=Qo(e);return o==="deg"||o==="rad"||o==="turn"||o==="grad"?{type:T.Hue,value:t*ru[o]}:void 0}return e[ae]==="%"?(ae++,{type:T.Percentage,value:+t}):{type:T.Number,value:+t}}function Xo(e){let t="";for(;/\d/.test(e[ae]);)t+=e[ae++];return t}function Qo(e){let t="";for(;ae<e.length&&au.test(e[ae]);)t+=e[ae++];return t}function lu(e){let t=Qo(e);return e[ae]==="("?(ae++,{type:T.Function,value:t}):t==="none"?{type:T.None,value:void 0}:{type:T.Ident,value:t}}function nu(e=""){let t=e.trim(),o=[],a;for(ae=0;ae<t.length;){if(a=t[ae++],a===`
|
|
2
|
+
`||a===" "||a===" "){for(;ae<t.length&&(t[ae]===`
|
|
3
|
+
`||t[ae]===" "||t[ae]===" ");)ae++;continue}if(a===",")return;if(a===")"){o.push({type:T.ParenClose});continue}if(a==="+"){if(ae--,Wo(t)){o.push(uo(t));continue}return}if(a==="-"){if(ae--,Wo(t)){o.push(uo(t));continue}if(yr(t)){o.push({type:T.Ident,value:Qo(t)});continue}return}if(a==="."){if(ae--,Wo(t)){o.push(uo(t));continue}return}if(a==="/"){for(;ae<t.length&&(t[ae]===`
|
|
4
|
+
`||t[ae]===" "||t[ae]===" ");)ae++;let r;if(Wo(t)&&(r=uo(t),r.type!==T.Hue)){o.push({type:T.Alpha,value:r});continue}if(yr(t)&&Qo(t)==="none"){o.push({type:T.Alpha,value:{type:T.None,value:void 0}});continue}return}if(/\d/.test(a)){ae--,o.push(uo(t));continue}if(Ir.test(a)){ae--,o.push(lu(t));continue}return}return o}function iu(e){e._i=0;let t=e[e._i++];if(!t||t.type!==T.Function||t.value!=="color"||(t=e[e._i++],t.type!==T.Ident))return;let o=br[t.value];if(!o)return;let a={mode:o},r=M2(e,!1);if(!r)return;let l=Go(o).channels;for(let n=0,i,s;n<l.length;n++)i=r[n],s=l[n],i.type!==T.None&&(a[s]=i.type===T.Number?i.value:i.value/100,s==="alpha"&&(a[s]=Math.max(0,Math.min(1,a[s]))));return a}function M2(e,t){let o=[],a;for(;e._i<e.length;){if(a=e[e._i++],a.type===T.None||a.type===T.Number||a.type===T.Alpha||a.type===T.Percentage||t&&a.type===T.Hue){o.push(a);continue}if(a.type===T.ParenClose){if(e._i<e.length)return;continue}return}if(!(o.length<3||o.length>4)){if(o.length===4){if(o[3].type!==T.Alpha)return;o[3]=o[3].value}return o.length===3&&o.push({type:T.None,value:void 0}),o.every(r=>r.type!==T.Alpha)?o:void 0}}function su(e,t){e._i=0;let o=e[e._i++];if(!o||o.type!==T.Function)return;let a=M2(e,t);if(a)return a.unshift(o.value),a}var uu=e=>{if(typeof e!="string")return;let t=nu(e),o=t?su(t,!0):void 0,a,r=0,l=so.length;for(;r<l;)if((a=so[r++](e,o))!==void 0)return a;return t?iu(t):void 0},Ct=uu;function du(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let o={mode:"rgb"},[,a,r,l,n]=t;if(!(a.type===T.Hue||r.type===T.Hue||l.type===T.Hue))return a.type!==T.None&&(o.r=a.type===T.Number?a.value/255:a.value/100),r.type!==T.None&&(o.g=r.type===T.Number?r.value/255:r.value/100),l.type!==T.None&&(o.b=l.type===T.Number?l.value/255:l.value/100),n.type!==T.None&&(o.alpha=Math.min(1,Math.max(0,n.type===T.Number?n.value:n.value/100))),o}var S2=du;var cu=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,R2=cu;var k2=(e,t,o)=>e+o*(t-e);var fu=e=>{let t=[];for(let o=0;o<e.length-1;o++){let a=e[o],r=e[o+1];a===void 0&&r===void 0?t.push(void 0):a!==void 0&&r!==void 0?t.push([a,r]):t.push(a!==void 0?[a,a]:[r,r])}return t},H2=e=>t=>{let o=fu(t);return a=>{let r=a*o.length,l=a>=1?o.length-1:Math.max(Math.floor(r),0),n=o[l];return n===void 0?void 0:e(n[0],n[1],r-l)}};var O=H2(k2);var fe=e=>{let t=!1,o=e.map(a=>a!==void 0?(t=!0,a):1);return t?o:e};var pu={mode:"rgb",channels:["r","g","b","alpha"],parse:[S2,w2,I2,L2,R2,"srgb"],serialize:"srgb",interpolate:{r:O,g:O,b:O,alpha:{use:O,fixup:fe}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},i1=pu;var Mr=(e=0)=>Math.pow(Math.abs(e),2.19921875)*Math.sign(e),Cu=e=>{let t=Mr(e.r),o=Mr(e.g),a=Mr(e.b),r={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*o+.1882286462349947*a,y:.297344975250536*t+.6273635662554661*o+.0752914584939979*a,z:.0270313613864123*t+.0706888525358272*o+.9913375368376386*a};return e.alpha!==void 0&&(r.alpha=e.alpha),r},Sr=Cu;var Rr=e=>Math.pow(Math.abs(e),.4547069271758437)*Math.sign(e),mu=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"a98",r:Rr(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*o),g:Rr(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*o),b:Rr(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*o)};return a!==void 0&&(r.alpha=a),r},kr=mu;var Hr=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},hu=({r:e,g:t,b:o,alpha:a})=>{let r={mode:"lrgb",r:Hr(e),g:Hr(t),b:Hr(o)};return a!==void 0&&(r.alpha=a),r},s1=hu;var gu=e=>{let{r:t,g:o,b:a,alpha:r}=s1(e),l={mode:"xyz65",x:.4123907992659593*t+.357584339383878*o+.1804807884018343*a,y:.2126390058715102*t+.715168678767756*o+.0721923153607337*a,z:.0193308187155918*t+.119194779794626*o+.9505321522496607*a};return r!==void 0&&(l.alpha=r),l},We=gu;var Pr=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,.4166666666666667)-.055):e*12.92},vu=({r:e,g:t,b:o,alpha:a},r="rgb")=>{let l={mode:r,r:Pr(e),g:Pr(t),b:Pr(o)};return a!==void 0&&(l.alpha=a),l},u1=vu;var xu=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=u1({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*o,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*o,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*o});return a!==void 0&&(r.alpha=a),r},Xe=xu;var Lu={...i1,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>kr(We(e)),xyz65:kr},toMode:{rgb:e=>Xe(Sr(e)),xyz65:Sr}},P2=Lu;var wu=e=>(e=e%360)<0?e+360:e,be=wu;var bu=(e,t)=>e.map((o,a,r)=>{if(o===void 0)return o;let l=be(o);return a===0||e[a-1]===void 0?l:t(l-be(r[a-1]))}).reduce((o,a)=>!o.length||a===void 0||o[o.length-1]===void 0?(o.push(a),o):(o.push(a+o[o.length-1]),o),[]),Be=e=>bu(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t));var _e=[-.14861,1.78277,-.29227,-.90649,1.97294,0],T2=Math.PI/180,V2=180/Math.PI;var _2=_e[3]*_e[4],D2=_e[1]*_e[4],O2=_e[1]*_e[2]-_e[0]*_e[3],Iu=({r:e,g:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(O2*o+e*_2-t*D2)/(O2+_2-D2),l=o-r,n=(_e[4]*(t-r)-_e[2]*l)/_e[3],i={mode:"cubehelix",l:r,s:r===0||r===1?void 0:Math.sqrt(l*l+n*n)/(_e[4]*r*(1-r))};return i.s&&(i.h=Math.atan2(n,l)*V2-120),a!==void 0&&(i.alpha=a),i},E2=Iu;var yu=({h:e,s:t,l:o,alpha:a})=>{let r={mode:"rgb"};e=(e===void 0?0:e+120)*T2,o===void 0&&(o=0);let l=t===void 0?0:t*o*(1-o),n=Math.cos(e),i=Math.sin(e);return r.r=o+l*(_e[0]*n+_e[1]*i),r.g=o+l*(_e[2]*n+_e[3]*i),r.b=o+l*(_e[4]*n+_e[5]*i),a!==void 0&&(r.alpha=a),r},B2=yu;var G1=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let o=be(e.h),a=be(t.h),r=Math.sin((a-o+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*r},A2=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let o=be(e.h),a=be(t.h);return Math.abs(a-o)>180?o-(a-360*Math.sign(a-o)):a-o},W1=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let o=be(e.h),a=be(t.h),r=Math.sin((a-o+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*r};var Ae=e=>{let t=e.reduce((a,r)=>{if(r!==void 0){let l=r*Math.PI/180;a.sin+=Math.sin(l),a.cos+=Math.cos(l)}return a},{sin:0,cos:0}),o=Math.atan2(t.sin,t.cos)*180/Math.PI;return o<0?360+o:o};var Mu={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:E2},toMode:{rgb:B2},interpolate:{h:{use:O,fixup:Be},s:O,l:O,alpha:{use:O,fixup:fe}},difference:{h:G1},average:{h:Ae}},Z2=Mu;var Su=({l:e,a:t,b:o,alpha:a},r="lch")=>{t===void 0&&(t=0),o===void 0&&(o=0);let l=Math.sqrt(t*t+o*o),n={mode:r,l:e,c:l};return l&&(n.h=be(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(n.alpha=a),n},o1=Su;var Ru=({l:e,c:t,h:o,alpha:a},r="lab")=>{o===void 0&&(o=0);let l={mode:r,l:e,a:t?t*Math.cos(o/180*Math.PI):0,b:t?t*Math.sin(o/180*Math.PI):0};return a!==void 0&&(l.alpha=a),l},a1=Ru;var Jo=Math.pow(29,3)/Math.pow(3,3),Yo=Math.pow(6,3)/Math.pow(29,3);var Se={X:.9642956764295677,Y:1,Z:.8251046025104602},X1={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},Ep=Math.pow(29,3)/Math.pow(3,3),Bp=Math.pow(6,3)/Math.pow(29,3);var Tr=e=>Math.pow(e,3)>Yo?Math.pow(e,3):(116*e-16)/Jo,ku=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(e+16)/116,l=t/500+r,n=r-o/200,i={mode:"xyz65",x:Tr(l)*X1.X,y:Tr(r)*X1.Y,z:Tr(n)*X1.Z};return a!==void 0&&(i.alpha=a),i},ea=ku;var Hu=e=>Xe(ea(e)),Q1=Hu;var Vr=e=>e>Yo?Math.cbrt(e):(Jo*e+16)/116,Pu=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Vr(e/X1.X),l=Vr(t/X1.Y),n=Vr(o/X1.Z),i={mode:"lab65",l:116*l-16,a:500*(r-l),b:200*(l-n)};return a!==void 0&&(i.alpha=a),i},ta=Pu;var Tu=e=>{let t=ta(We(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},J1=Tu;var mt=.14444444444444443*Math.PI,kt=Math.cos(mt),Ht=Math.sin(mt),oa=100/Math.log(139/100);var Vu=({l:e,c:t,h:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"lab65",l:(Math.exp(e*1/oa)-1)/.0039},l=(Math.exp(.0435*t*1*1)-1)/.075,n=l*Math.cos(o/180*Math.PI-mt),i=l*Math.sin(o/180*Math.PI-mt);return r.a=n*kt-i/.83*Ht,r.b=n*Ht+i/.83*kt,a!==void 0&&(r.alpha=a),r},fo=Vu;var _u=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=t*kt+o*Ht,l=.83*(o*kt-t*Ht),n=Math.sqrt(r*r+l*l),i={mode:"dlch",l:oa/1*Math.log(1+.0039*e),c:Math.log(1+.075*n)/(.0435*1*1)};return i.c&&(i.h=be((Math.atan2(l,r)+mt)/Math.PI*180)),a!==void 0&&(i.alpha=a),i},po=_u;var F2=e=>fo(o1(e,"dlch")),$2=e=>a1(po(e),"dlab"),Du={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:F2,rgb:e=>Q1(F2(e))},fromMode:{lab65:$2,rgb:e=>$2(J1(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:O,a:O,b:O,alpha:{use:O,fixup:fe}}},N2=Du;var Ou={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:fo,dlab:e=>a1(e,"dlab"),rgb:e=>Q1(fo(e))},fromMode:{lab65:po,dlab:e=>o1(e,"dlch"),rgb:e=>po(J1(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:O,c:O,h:{use:O,fixup:Be},alpha:{use:O,fixup:fe}},difference:{h:W1},average:{h:Ae}},U2=Ou;function Dr({h:e,s:t,i:o,alpha:a}){e=be(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.abs(e/60%2-1),l;switch(Math.floor(e/60)){case 0:l={r:o*(1+t*(3/(2-r)-1)),g:o*(1+t*(3*(1-r)/(2-r)-1)),b:o*(1-t)};break;case 1:l={r:o*(1+t*(3*(1-r)/(2-r)-1)),g:o*(1+t*(3/(2-r)-1)),b:o*(1-t)};break;case 2:l={r:o*(1-t),g:o*(1+t*(3/(2-r)-1)),b:o*(1+t*(3*(1-r)/(2-r)-1))};break;case 3:l={r:o*(1-t),g:o*(1+t*(3*(1-r)/(2-r)-1)),b:o*(1+t*(3/(2-r)-1))};break;case 4:l={r:o*(1+t*(3*(1-r)/(2-r)-1)),g:o*(1-t),b:o*(1+t*(3/(2-r)-1))};break;case 5:l={r:o*(1+t*(3/(2-r)-1)),g:o*(1-t),b:o*(1+t*(3*(1-r)/(2-r)-1))};break;default:l={r:o*(1-t),g:o*(1-t),b:o*(1-t)}}return l.mode="rgb",a!==void 0&&(l.alpha=a),l}function Or({r:e,g:t,b:o,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.max(e,t,o),l=Math.min(e,t,o),n={mode:"hsi",s:e+t+o===0?0:1-3*l/(e+t+o),i:(e+t+o)/3};return r-l!==0&&(n.h=(r===e?(t-o)/(r-l)+(t<o)*6:r===t?(o-e)/(r-l)+2:(e-t)/(r-l)+4)*60),a!==void 0&&(n.alpha=a),n}var Eu={mode:"hsi",toMode:{rgb:Dr},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:Or},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:O,fixup:Be},s:O,i:O,alpha:{use:O,fixup:fe}},difference:{h:G1},average:{h:Ae}},q2=Eu;function Er({h:e,s:t,l:o,alpha:a}){e=be(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=o+t*(o<.5?o:1-o),l=r-(r-o)*2*Math.abs(e/60%2-1),n;switch(Math.floor(e/60)){case 0:n={r,g:l,b:2*o-r};break;case 1:n={r:l,g:r,b:2*o-r};break;case 2:n={r:2*o-r,g:r,b:l};break;case 3:n={r:2*o-r,g:l,b:r};break;case 4:n={r:l,g:2*o-r,b:r};break;case 5:n={r,g:2*o-r,b:l};break;default:n={r:2*o-r,g:2*o-r,b:2*o-r}}return n.mode="rgb",a!==void 0&&(n.alpha=a),n}function Br({r:e,g:t,b:o,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.max(e,t,o),l=Math.min(e,t,o),n={mode:"hsl",s:r===l?0:(r-l)/(1-Math.abs(r+l-1)),l:.5*(r+l)};return r-l!==0&&(n.h=(r===e?(t-o)/(r-l)+(t<o)*6:r===t?(o-e)/(r-l)+2:(e-t)/(r-l)+4)*60),a!==void 0&&(n.alpha=a),n}var Bu=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},z2=Bu;var Au=new RegExp(`^hsla?\\(\\s*${b2}${K1}${pt}${K1}${pt}\\s*(?:,\\s*${io}\\s*)?\\)$`),Zu=e=>{let t=e.match(Au);if(!t)return;let o={mode:"hsl"};return t[3]!==void 0?o.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(o.h=z2(t[1],t[2])),t[4]!==void 0&&(o.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(o.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?o.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(o.alpha=Math.max(0,Math.min(1,+t[7]))),o},j2=Zu;function Fu(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let o={mode:"hsl"},[,a,r,l,n]=t;if(a.type!==T.None){if(a.type===T.Percentage)return;o.h=a.value}if(r.type!==T.None){if(r.type===T.Hue)return;o.s=r.value/100}if(l.type!==T.None){if(l.type===T.Hue)return;o.l=l.value/100}return n.type!==T.None&&(o.alpha=Math.min(1,Math.max(0,n.type===T.Number?n.value:n.value/100))),o}var K2=Fu;var $u={mode:"hsl",toMode:{rgb:Er},fromMode:{rgb:Br},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[K2,j2],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:O,fixup:Be},s:O,l:O,alpha:{use:O,fixup:fe}},difference:{h:G1},average:{h:Ae}},aa=$u;function Co({h:e,s:t,v:o,alpha:a}){e=be(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.abs(e/60%2-1),l;switch(Math.floor(e/60)){case 0:l={r:o,g:o*(1-t*r),b:o*(1-t)};break;case 1:l={r:o*(1-t*r),g:o,b:o*(1-t)};break;case 2:l={r:o*(1-t),g:o,b:o*(1-t*r)};break;case 3:l={r:o*(1-t),g:o*(1-t*r),b:o};break;case 4:l={r:o*(1-t*r),g:o*(1-t),b:o};break;case 5:l={r:o,g:o*(1-t),b:o*(1-t*r)};break;default:l={r:o*(1-t),g:o*(1-t),b:o*(1-t)}}return l.mode="rgb",a!==void 0&&(l.alpha=a),l}function mo({r:e,g:t,b:o,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.max(e,t,o),l=Math.min(e,t,o),n={mode:"hsv",s:r===0?0:1-l/r,v:r};return r-l!==0&&(n.h=(r===e?(t-o)/(r-l)+(t<o)*6:r===t?(o-e)/(r-l)+2:(e-t)/(r-l)+4)*60),a!==void 0&&(n.alpha=a),n}var Nu={mode:"hsv",toMode:{rgb:Co},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:mo},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:O,fixup:Be},s:O,v:O,alpha:{use:O,fixup:fe}},difference:{h:G1},average:{h:Ae}},ra=Nu;function Ar({h:e,w:t,b:o,alpha:a}){if(t===void 0&&(t=0),o===void 0&&(o=0),t+o>1){let r=t+o;t/=r,o/=r}return Co({h:e,s:o===1?1:1-t/(1-o),v:1-o,alpha:a})}function Zr(e){let t=mo(e);if(t===void 0)return;let o=t.s!==void 0?t.s:0,a=t.v!==void 0?t.v:0,r={mode:"hwb",w:(1-o)*a,b:1-a};return t.h!==void 0&&(r.h=t.h),t.alpha!==void 0&&(r.alpha=t.alpha),r}function Uu(e,t){if(!t||t[0]!=="hwb")return;let o={mode:"hwb"},[,a,r,l,n]=t;if(a.type!==T.None){if(a.type===T.Percentage)return;o.h=a.value}if(r.type!==T.None){if(r.type===T.Hue)return;o.w=r.value/100}if(l.type!==T.None){if(l.type===T.Hue)return;o.b=l.value/100}return n.type!==T.None&&(o.alpha=Math.min(1,Math.max(0,n.type===T.Number?n.value:n.value/100))),o}var G2=Uu;var qu={mode:"hwb",toMode:{rgb:Ar},fromMode:{rgb:Zr},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[G2],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:O,fixup:Be},w:O,b:O,alpha:{use:O,fixup:fe}},difference:{h:A2},average:{h:Ae}},W2=qu;var Pt=.1593017578125,X2=78.84375,Tt=.8359375,Vt=18.8515625,_t=18.6875;function la(e){if(e<0)return 0;let t=Math.pow(e,1/X2);return 1e4*Math.pow(Math.max(0,t-Tt)/(Vt-_t*t),1/Pt)}function na(e){if(e<0)return 0;let t=Math.pow(e/1e4,Pt);return Math.pow((Tt+Vt*t)/(1+_t*t),X2)}var Fr=e=>Math.max(e/203,0),ju=({i:e,t,p:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=la(e+.008609037037932761*t+.11102962500302593*o),l=la(e-.00860903703793275*t-.11102962500302599*o),n=la(e+.5600313357106791*t-.32062717498731885*o),i={mode:"xyz65",x:Fr(2.070152218389422*r-1.3263473389671556*l+.2066510476294051*n),y:Fr(.3647385209748074*r+.680566024947227*l-.0453045459220346*n),z:Fr(-.049747207535812*r-.0492609666966138*l+1.1880659249923042*n)};return a!==void 0&&(i.alpha=a),i},$r=ju;var Nr=(e=0)=>Math.max(e*203,0),Ku=({x:e,y:t,z:o,alpha:a})=>{let r=Nr(e),l=Nr(t),n=Nr(o),i=na(.3592832590121217*r+.6976051147779502*l-.0358915932320289*n),s=na(-.1920808463704995*r+1.1004767970374323*l+.0753748658519118*n),u=na(.0070797844607477*r+.0748396662186366*l+.8433265453898765*n),d=.5*i+.5*s,f=1.61376953125*i-3.323486328125*s+1.709716796875*u,C=4.378173828125*i-4.24560546875*s-.132568359375*u,h={mode:"itp",i:d,t:f,p:C};return a!==void 0&&(h.alpha=a),h},Ur=Ku;var Gu={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:$r,rgb:e=>Xe($r(e))},fromMode:{xyz65:Ur,rgb:e=>Ur(We(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:O,t:O,p:O,alpha:{use:O,fixup:fe}}},Q2=Gu;var Wu=134.03437499999998,Xu=16295499532821565e-27,qr=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,Pt);return Math.pow((Tt+Vt*t)/(1+_t*t),Wu)},zr=(e=0)=>Math.max(e*203,0),Qu=({x:e,y:t,z:o,alpha:a})=>{e=zr(e),t=zr(t),o=zr(o);let r=1.15*e-.15*o,l=.66*t+.34*e,n=qr(.41478972*r+.579999*l+.014648*o),i=qr(-.20151*r+1.120649*l+.0531008*o),s=qr(-.0166008*r+.2648*l+.6684799*o),u=(n+i)/2,d={mode:"jab",j:.44*u/(1-.56*u)-Xu,a:3.524*n-4.066708*i+.542708*s,b:.199076*n+1.096799*i-1.295875*s};return a!==void 0&&(d.alpha=a),d},ia=Qu;var Ju=134.03437499999998,J2=16295499532821565e-27,jr=e=>{if(e<0)return 0;let t=Math.pow(e,1/Ju);return 1e4*Math.pow((Tt-t)/(_t*t-Vt),1/Pt)},Kr=e=>e/203,Yu=({j:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(e+J2)/(.44+.56*(e+J2)),l=jr(r+.13860504*t+.058047316*o),n=jr(r-.13860504*t-.058047316*o),i=jr(r-.096019242*t-.8118919*o),s={mode:"xyz65",x:Kr(1.661373024652174*l-.914523081304348*n+.23136208173913045*i),y:Kr(-.3250758611844533*l+1.571847026732543*n-.21825383453227928*i),z:Kr(-.090982811*l-.31272829*n+1.5227666*i)};return a!==void 0&&(s.alpha=a),s},sa=Yu;var ed=e=>{let t=ia(We(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},ua=ed;var td=e=>Xe(sa(e)),da=td;var od={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:ua,xyz65:ia},toMode:{rgb:da,xyz65:sa},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:O,a:O,b:O,alpha:{use:O,fixup:fe}}},Y2=od;var ad=({j:e,a:t,b:o,alpha:a})=>{t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.sqrt(t*t+o*o),l={mode:"jch",j:e,c:r};return r&&(l.h=be(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(l.alpha=a),l},Gr=ad;var rd=({j:e,c:t,h:o,alpha:a})=>{o===void 0&&(o=0);let r={mode:"jab",j:e,a:t?t*Math.cos(o/180*Math.PI):0,b:t?t*Math.sin(o/180*Math.PI):0};return a!==void 0&&(r.alpha=a),r},Wr=rd;var ld={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Wr,rgb:e=>da(Wr(e))},fromMode:{rgb:e=>Gr(ua(e)),jab:Gr},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:O,fixup:Be},c:O,j:O,alpha:{use:O,fixup:fe}},difference:{h:W1},average:{h:Ae}},e0=ld;var Y1=Math.pow(29,3)/Math.pow(3,3),Dt=Math.pow(6,3)/Math.pow(29,3);var Xr=e=>Math.pow(e,3)>Dt?Math.pow(e,3):(116*e-16)/Y1,nd=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(e+16)/116,l=t/500+r,n=r-o/200,i={mode:"xyz50",x:Xr(l)*Se.X,y:Xr(r)*Se.Y,z:Xr(n)*Se.Z};return a!==void 0&&(i.alpha=a),i},Ot=nd;var id=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=u1({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*o,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*o,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*o});return a!==void 0&&(r.alpha=a),r},y1=id;var sd=e=>y1(Ot(e)),ca=sd;var ud=e=>{let{r:t,g:o,b:a,alpha:r}=s1(e),l={mode:"xyz50",x:.436065742824811*t+.3851514688337912*o+.14307845442264197*a,y:.22249319175623702*t+.7168870538238823*o+.06061979053616537*a,z:.013923904500943465*t+.09708128566574634*o+.7140993584005155*a};return r!==void 0&&(l.alpha=r),l},M1=ud;var Qr=e=>e>Dt?Math.cbrt(e):(Y1*e+16)/116,dd=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Qr(e/Se.X),l=Qr(t/Se.Y),n=Qr(o/Se.Z),i={mode:"lab",l:116*l-16,a:500*(r-l),b:200*(l-n)};return a!==void 0&&(i.alpha=a),i},Et=dd;var cd=e=>{let t=Et(M1(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},fa=cd;function fd(e,t){if(!t||t[0]!=="lab")return;let o={mode:"lab"},[,a,r,l,n]=t;if(!(a.type===T.Hue||r.type===T.Hue||l.type===T.Hue))return a.type!==T.None&&(o.l=Math.min(Math.max(0,a.value),100)),r.type!==T.None&&(o.a=r.type===T.Number?r.value:r.value*125/100),l.type!==T.None&&(o.b=l.type===T.Number?l.value:l.value*125/100),n.type!==T.None&&(o.alpha=Math.min(1,Math.max(0,n.type===T.Number?n.value:n.value/100))),o}var t0=fd;var pd={mode:"lab",toMode:{xyz50:Ot,rgb:ca},fromMode:{xyz50:Et,rgb:fa},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[t0],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:O,a:O,b:O,alpha:{use:O,fixup:fe}}},Bt=pd;var Cd={...Bt,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:ea,rgb:Q1},fromMode:{xyz65:ta,rgb:J1},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},o0=Cd;function md(e,t){if(!t||t[0]!=="lch")return;let o={mode:"lch"},[,a,r,l,n]=t;if(a.type!==T.None){if(a.type===T.Hue)return;o.l=Math.min(Math.max(0,a.value),100)}if(r.type!==T.None&&(o.c=Math.max(0,r.type===T.Number?r.value:r.value*150/100)),l.type!==T.None){if(l.type===T.Percentage)return;o.h=l.value}return n.type!==T.None&&(o.alpha=Math.min(1,Math.max(0,n.type===T.Number?n.value:n.value/100))),o}var a0=md;var hd={mode:"lch",toMode:{lab:a1,rgb:e=>ca(a1(e))},fromMode:{rgb:e=>o1(fa(e)),lab:o1},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[a0],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:O,fixup:Be},c:O,l:O,alpha:{use:O,fixup:fe}},difference:{h:W1},average:{h:Ae}},At=hd;var gd={...At,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>a1(e,"lab65"),rgb:e=>Q1(a1(e,"lab65"))},fromMode:{rgb:e=>o1(J1(e),"lch65"),lab65:e=>o1(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},r0=gd;var vd=({l:e,u:t,v:o,alpha:a})=>{t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.sqrt(t*t+o*o),l={mode:"lchuv",l:e,c:r};return r&&(l.h=be(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(l.alpha=a),l},Jr=vd;var xd=({l:e,c:t,h:o,alpha:a})=>{o===void 0&&(o=0);let r={mode:"luv",l:e,u:t?t*Math.cos(o/180*Math.PI):0,v:t?t*Math.sin(o/180*Math.PI):0};return a!==void 0&&(r.alpha=a),r},Yr=xd;var l0=(e,t,o)=>4*e/(e+15*t+3*o),n0=(e,t,o)=>9*t/(e+15*t+3*o),Ld=l0(Se.X,Se.Y,Se.Z),wd=n0(Se.X,Se.Y,Se.Z),bd=e=>e<=Dt?Y1*e:116*Math.cbrt(e)-16,Id=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=bd(t/Se.Y),l=l0(e,t,o),n=n0(e,t,o);!isFinite(l)||!isFinite(n)?r=l=n=0:(l=13*r*(l-Ld),n=13*r*(n-wd));let i={mode:"luv",l:r,u:l,v:n};return a!==void 0&&(i.alpha=a),i},ho=Id;var yd=(e,t,o)=>4*e/(e+15*t+3*o),Md=(e,t,o)=>9*t/(e+15*t+3*o),Sd=yd(Se.X,Se.Y,Se.Z),Rd=Md(Se.X,Se.Y,Se.Z),kd=({l:e,u:t,v:o,alpha:a})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),o===void 0&&(o=0);let r=t/(13*e)+Sd,l=o/(13*e)+Rd,n=Se.Y*(e<=8?e/Y1:Math.pow((e+16)/116,3)),i=n*(9*r)/(4*l),s=n*(12-3*r-20*l)/(4*l),u={mode:"xyz50",x:i,y:n,z:s};return a!==void 0&&(u.alpha=a),u},go=kd;var Hd=e=>Jr(ho(M1(e))),Pd=e=>y1(go(Yr(e))),Td={mode:"lchuv",toMode:{luv:Yr,rgb:Pd},fromMode:{rgb:Hd,luv:Jr},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:O,fixup:Be},c:O,l:O,alpha:{use:O,fixup:fe}},difference:{h:W1},average:{h:Ae}},i0=Td;var Vd={...i1,mode:"lrgb",toMode:{rgb:u1},fromMode:{rgb:s1},parse:["srgb-linear"],serialize:"srgb-linear"},s0=Vd;var _d={mode:"luv",toMode:{xyz50:go,rgb:e=>y1(go(e))},fromMode:{xyz50:ho,rgb:e=>ho(M1(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:O,u:O,v:O,alpha:{use:O,fixup:fe}}},u0=_d;var Dd=({r:e,g:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*o),l=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*o),n=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*o),i={mode:"oklab",l:.210454268309314*r+.7936177747023054*l-.0040720430116193*n,a:1.9779985324311684*r-2.42859224204858*l+.450593709617411*n,b:.0259040424655478*r+.7827717124575296*l-.8086757549230774*n};return a!==void 0&&(i.alpha=a),i},pa=Dd;var Od=e=>{let t=pa(s1(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},et=Od;var Ed=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.pow(e+.3963377773761749*t+.2158037573099136*o,3),l=Math.pow(e-.1055613458156586*t-.0638541728258133*o,3),n=Math.pow(e-.0894841775298119*t-1.2914855480194092*o,3),i={mode:"lrgb",r:4.076741636075957*r-3.3077115392580616*l+.2309699031821044*n,g:-1.2684379732850317*r+2.6097573492876887*l-.3413193760026573*n,b:-.0041960761386756*r-.7034186179359362*l+1.7076146940746117*n};return a!==void 0&&(i.alpha=a),i},S1=Ed;var Bd=e=>u1(S1(e)),tt=Bd;function vo(e){let a=1.170873786407767;return .5*(a*e-.206+Math.sqrt((a*e-.206)*(a*e-.206)+4*.03*a*e))}function ht(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function Ad(e,t){let o,a,r,l,n,i,s,u;-1.88170328*e-.80936493*t>1?(o=1.19086277,a=1.76576728,r=.59662641,l=.75515197,n=.56771245,i=4.0767416621,s=-3.3077115913,u=.2309699292):1.81444104*e-1.19445276*t>1?(o=.73956515,a=-.45954404,r=.08285427,l=.1254107,n=.14503204,i=-1.2684380046,s=2.6097574011,u=-.3413193965):(o=1.35733652,a=-.00915799,r=-1.1513021,l=-.50559606,n=.00692167,i=-.0041960863,s=-.7034186147,u=1.707614701);let d=o+a*e+r*t+l*e*e+n*e*t,f=.3963377774*e+.2158037573*t,C=-.1055613458*e-.0638541728*t,h=-.0894841775*e-1.291485548*t;{let p=1+d*f,c=1+d*C,m=1+d*h,b=p*p*p,g=c*c*c,k=m*m*m,v=3*f*p*p,P=3*C*c*c,V=3*h*m*m,U=6*f*f*p,M=6*C*C*c,_=6*h*h*m,q=i*b+s*g+u*k,K=i*v+s*P+u*V,W=i*U+s*M+u*_;d=d-q*K/(K*K-.5*q*W)}return d}function el(e,t){let o=Ad(e,t),a=S1({l:1,a:o*e,b:o*t}),r=Math.cbrt(1/Math.max(a.r,a.g,a.b)),l=r*o;return[r,l]}function Zd(e,t,o,a,r,l=null){l||(l=el(e,t));let n;if((o-r)*l[1]-(l[0]-r)*a<=0)n=l[1]*r/(a*l[0]+l[1]*(r-o));else{n=l[1]*(r-1)/(a*(l[0]-1)+l[1]*(r-o));{let i=o-r,s=a,u=.3963377774*e+.2158037573*t,d=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,C=i+s*u,h=i+s*d,p=i+s*f;{let c=r*(1-n)+n*o,m=n*a,b=c+m*u,g=c+m*d,k=c+m*f,v=b*b*b,P=g*g*g,V=k*k*k,U=3*C*b*b,M=3*h*g*g,_=3*p*k*k,q=6*C*C*b,K=6*h*h*g,W=6*p*p*k,N=4.0767416621*v-3.3077115913*P+.2309699292*V-1,E=4.0767416621*U-3.3077115913*M+.2309699292*_,S=4.0767416621*q-3.3077115913*K+.2309699292*W,L=E/(E*E-.5*N*S),x=-N*L,w=-1.2684380046*v+2.6097574011*P-.3413193965*V-1,I=-1.2684380046*U+2.6097574011*M-.3413193965*_,H=-1.2684380046*q+2.6097574011*K-.3413193965*W,A=I/(I*I-.5*w*H),F=-w*A,G=-.0041960863*v-.7034186147*P+1.707614701*V-1,B=-.0041960863*U-.7034186147*M+1.707614701*_,$=-.0041960863*q-.7034186147*K+1.707614701*W,Z=B/(B*B-.5*G*$),R=-G*Z;x=L>=0?x:1e6,F=A>=0?F:1e6,R=Z>=0?R:1e6,n+=Math.min(x,Math.min(F,R))}}}return n}function xo(e,t,o=null){o||(o=el(e,t));let a=o[0],r=o[1];return[r/a,r/(1-a)]}function Ca(e,t,o){let a=el(t,o),r=Zd(t,o,e,1,e,a),l=xo(t,o,a),n=.11516993+1/(7.4477897+4.1590124*o+t*(-2.19557347+1.75198401*o+t*(-2.13704948-10.02301043*o+t*(-4.24894561+5.38770819*o+4.69891013*t)))),i=.11239642+1/(1.6132032-.68124379*o+t*(.40370612+.90148123*o+t*(-.27087943+.6122399*o+t*(.00299215-.45399568*o-.14661872*t)))),s=r/Math.min(e*l[0],(1-e)*l[1]),u=e*n,d=(1-e)*i,f=.9*s*Math.sqrt(Math.sqrt(1/(1/(u*u*u*u)+1/(d*d*d*d))));return u=e*.4,d=(1-e)*.8,[Math.sqrt(1/(1/(u*u)+1/(d*d))),f,r]}function ma(e){let t=e.l!==void 0?e.l:0,o=e.a!==void 0?e.a:0,a=e.b!==void 0?e.b:0,r={mode:"okhsl",l:vo(t)};e.alpha!==void 0&&(r.alpha=e.alpha);let l=Math.sqrt(o*o+a*a);if(!l)return r.s=0,r;let[n,i,s]=Ca(t,o/l,a/l),u;if(l<i){let d=0,f=.8*n,C=1-f/i;u=(l-d)/(f+C*(l-d))*.8}else{let d=i,f=.2*i*i*1.25*1.25/n,C=1-f/(s-i);u=.8+.2*((l-d)/(f+C*(l-d)))}return u&&(r.s=u,r.h=be(Math.atan2(a,o)*180/Math.PI)),r}function ha(e){let t=e.h!==void 0?e.h:0,o=e.s!==void 0?e.s:0,a=e.l!==void 0?e.l:0,r={mode:"oklab",l:ht(a)};if(e.alpha!==void 0&&(r.alpha=e.alpha),!o||a===1)return r.a=r.b=0,r;let l=Math.cos(t/180*Math.PI),n=Math.sin(t/180*Math.PI),[i,s,u]=Ca(r.l,l,n),d,f,C,h;o<.8?(d=1.25*o,f=0,C=.8*i,h=1-C/s):(d=5*(o-.8),f=s,C=.2*s*s*1.25*1.25/i,h=1-C/(u-s));let p=f+d*C/(1-h*d);return r.a=p*l,r.b=p*n,r}var Fd={...aa,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:ma,rgb:e=>ma(et(e))},toMode:{oklab:ha,rgb:e=>tt(ha(e))}},d0=Fd;function ga(e){let t=e.l!==void 0?e.l:0,o=e.a!==void 0?e.a:0,a=e.b!==void 0?e.b:0,r=Math.sqrt(o*o+a*a),l=r?o/r:1,n=r?a/r:1,[i,s]=xo(l,n),u=.5,d=1-u/i,f=s/(r+t*s),C=f*t,h=f*r,p=ht(C),c=h*p/C,m=S1({l:p,a:l*c,b:n*c}),b=Math.cbrt(1/Math.max(m.r,m.g,m.b,0));t=t/b,r=r/b*vo(t)/t,t=vo(t);let g={mode:"okhsv",s:r?(u+s)*h/(s*u+s*d*h):0,v:t?t/C:0};return g.s&&(g.h=be(Math.atan2(a,o)*180/Math.PI)),e.alpha!==void 0&&(g.alpha=e.alpha),g}function va(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let o=e.h!==void 0?e.h:0,a=e.s!==void 0?e.s:0,r=e.v!==void 0?e.v:0,l=Math.cos(o/180*Math.PI),n=Math.sin(o/180*Math.PI),[i,s]=xo(l,n),u=.5,d=1-u/i,f=1-a*u/(u+s-s*d*a),C=a*s*u/(u+s-s*d*a),h=ht(f),p=C*h/f,c=S1({l:h,a:l*p,b:n*p}),m=Math.cbrt(1/Math.max(c.r,c.g,c.b,0)),b=ht(r*f),g=C*b/f;return t.l=b*m,t.a=g*l*m,t.b=g*n*m,t}var $d={...ra,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:ga,rgb:e=>ga(et(e))},toMode:{oklab:va,rgb:e=>tt(va(e))}},c0=$d;function Nd(e,t){if(!t||t[0]!=="oklab")return;let o={mode:"oklab"},[,a,r,l,n]=t;if(!(a.type===T.Hue||r.type===T.Hue||l.type===T.Hue))return a.type!==T.None&&(o.l=Math.min(Math.max(0,a.type===T.Number?a.value:a.value/100),1)),r.type!==T.None&&(o.a=r.type===T.Number?r.value:r.value*.4/100),l.type!==T.None&&(o.b=l.type===T.Number?l.value:l.value*.4/100),n.type!==T.None&&(o.alpha=Math.min(1,Math.max(0,n.type===T.Number?n.value:n.value/100))),o}var f0=Nd;var Ud={...Bt,mode:"oklab",toMode:{lrgb:S1,rgb:tt},fromMode:{lrgb:pa,rgb:et},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[f0],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},p0=Ud;function qd(e,t){if(!t||t[0]!=="oklch")return;let o={mode:"oklch"},[,a,r,l,n]=t;if(a.type!==T.None){if(a.type===T.Hue)return;o.l=Math.min(Math.max(0,a.type===T.Number?a.value:a.value/100),1)}if(r.type!==T.None&&(o.c=Math.max(0,r.type===T.Number?r.value:r.value*.4/100)),l.type!==T.None){if(l.type===T.Percentage)return;o.h=l.value}return n.type!==T.None&&(o.alpha=Math.min(1,Math.max(0,n.type===T.Number?n.value:n.value/100))),o}var C0=qd;var zd={...At,mode:"oklch",toMode:{oklab:e=>a1(e,"oklab"),rgb:e=>tt(a1(e,"oklab"))},fromMode:{rgb:e=>o1(et(e),"oklch"),oklab:e=>o1(e,"oklch")},parse:[C0],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},m0=zd;var jd=e=>{let{r:t,g:o,b:a,alpha:r}=s1(e),l={mode:"xyz65",x:.486570948648216*t+.265667693169093*o+.1982172852343625*a,y:.2289745640697487*t+.6917385218365062*o+.079286914093745*a,z:0*t+.0451133818589026*o+1.043944368900976*a};return r!==void 0&&(l.alpha=r),l},tl=jd;var Kd=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=u1({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*o,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*o,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*o},"p3");return a!==void 0&&(r.alpha=a),r},ol=Kd;var Gd={...i1,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>ol(We(e)),xyz65:ol},toMode:{rgb:e=>Xe(tl(e)),xyz65:tl}},h0=Gd;var al=e=>{let t=Math.abs(e);return t>=.001953125?Math.sign(e)*Math.pow(t,.5555555555555556):16*e},Wd=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"prophoto",r:al(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*o),g:al(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*o),b:al(e*0+t*0+1.2119675456389452*o)};return a!==void 0&&(r.alpha=a),r},rl=Wd;var ll=(e=0)=>{let t=Math.abs(e);return t>=.03125?Math.sign(e)*Math.pow(t,1.8):e/16},Xd=e=>{let t=ll(e.r),o=ll(e.g),a=ll(e.b),r={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*o+.0313477341283922*a,y:.2880748288194013*t+.7118352342418731*o+899369387256e-16*a,z:0*t+0*o+.8251046025104602*a};return e.alpha!==void 0&&(r.alpha=e.alpha),r},nl=Xd;var Qd={...i1,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:rl,rgb:e=>rl(M1(e))},toMode:{xyz50:nl,rgb:e=>y1(nl(e))}},g0=Qd;var v0=1.09929682680944,Jd=.018053968510807,il=e=>{let t=Math.abs(e);return t>Jd?(Math.sign(e)||1)*(v0*Math.pow(t,.45)-(v0-1)):4.5*e},Yd=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"rec2020",r:il(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*o),g:il(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*o),b:il(e*.0176398574453108-t*.0427706132578085+.9421031212354739*o)};return a!==void 0&&(r.alpha=a),r},sl=Yd;var x0=1.09929682680944,e7=.018053968510807,ul=(e=0)=>{let t=Math.abs(e);return t<e7*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+x0-1)/x0,1/.45)},t7=e=>{let t=ul(e.r),o=ul(e.g),a=ul(e.b),r={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*o+.1688809751641721*a,y:.262700212011267*t+.6779980715188708*o+.059301716469862*a,z:0*t+.0280726930490874*o+1.0609850577107909*a};return e.alpha!==void 0&&(r.alpha=e.alpha),r},dl=t7;var o7={...i1,mode:"rec2020",fromMode:{xyz65:sl,rgb:e=>sl(We(e))},toMode:{xyz65:dl,rgb:e=>Xe(dl(e))},parse:["rec2020"],serialize:"rec2020"},L0=o7;var O1=.0037930732552754493,xa=Math.cbrt(O1);var cl=e=>Math.cbrt(e)-xa,a7=e=>{let{r:t,g:o,b:a,alpha:r}=s1(e),l=cl(.3*t+.622*o+.078*a+O1),n=cl(.23*t+.692*o+.078*a+O1),i=cl(.2434226892454782*t+.2047674442449682*o+.5518098665095535*a+O1),s={mode:"xyb",x:(l-n)/2,y:(l+n)/2,b:i-(l+n)/2};return r!==void 0&&(s.alpha=r),s},w0=a7;var fl=e=>Math.pow(e+xa,3),r7=({x:e,y:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=fl(e+t)-O1,l=fl(t-e)-O1,n=fl(o+t)-O1,i=u1({r:11.031566904639861*r-9.866943908131562*l-.16462299650829934*n,g:-3.2541473810744237*r+4.418770377582723*l-.16462299650829934*n,b:-3.6588512867136815*r+2.7129230459360922*l+1.9459282407775895*n});return a!==void 0&&(i.alpha=a),i},b0=r7;var l7={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:b0},fromMode:{rgb:w0},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:O,y:O,b:O,alpha:{use:O,fixup:fe}}},I0=l7;var n7={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:y1,lab:Et},fromMode:{rgb:M1,lab:Ot},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:O,y:O,z:O,alpha:{use:O,fixup:fe}}},y0=n7;var i7=e=>{let{x:t,y:o,z:a,alpha:r}=e;t===void 0&&(t=0),o===void 0&&(o=0),a===void 0&&(a=0);let l={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*o-.0501922295431356*a,y:.0296278156881593*t+.990434484573249*o-.0170738250293851*a,z:-.0092430581525912*t+.0150551448965779*o+.7518742899580008*a};return r!==void 0&&(l.alpha=r),l},M0=i7;var s7=e=>{let{x:t,y:o,z:a,alpha:r}=e;t===void 0&&(t=0),o===void 0&&(o=0),a===void 0&&(a=0);let l={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*o+.0632593086610217*a,y:-.0283697069632081*t+1.0099954580058226*o+.021041398966943*a,z:.0123140016883199*t-.0205076964334779*o+1.3303659366080753*a};return r!==void 0&&(l.alpha=r),l},S0=s7;var u7={mode:"xyz65",toMode:{rgb:Xe,xyz50:M0},fromMode:{rgb:We,xyz50:S0},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:O,y:O,z:O,alpha:{use:O,fixup:fe}}},R0=u7;var d7=({r:e,g:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*o,i:.59597799*e-.2741761*t-.32180189*o,q:.21147017*e-.52261711*t+.31114694*o};return a!==void 0&&(r.alpha=a),r},k0=d7;var c7=({y:e,i:t,q:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"rgb",r:e+.95608445*t+.6208885*o,g:e-.27137664*t-.6486059*o,b:e-1.10561724*t+1.70250126*o};return a!==void 0&&(r.alpha=a),r},H0=c7;var f7={mode:"yiq",toMode:{rgb:H0},fromMode:{rgb:k0},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:O,i:O,q:O,alpha:{use:O,fixup:fe}}},P0=f7;var p7=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,C7=(e=4)=>t=>typeof t=="number"?p7(t,e):t,Lo=C7;var eL=Lo(2);var tL=t1("rgb"),oL=t1("hsl");var pl=e=>{let t=Ko(e);if(!t)return;let o=Go(t.mode);if(!o.serialize||typeof o.serialize=="string"){let a=`color(${o.serialize||`--${t.mode}`} `;return o.channels.forEach((r,l)=>{r!=="alpha"&&(a+=(l?" ":"")+(t[r]!==void 0?t[r]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(a+=` / ${t.alpha}`),a+")"}if(typeof o.serialize=="function")return o.serialize(t)};var UL=Le(P2),qL=Le(Z2),zL=Le(N2),jL=Le(U2),KL=Le(q2),GL=Le(aa),WL=Le(ra),XL=Le(W2),QL=Le(Q2),JL=Le(Y2),YL=Le(e0),ew=Le(Bt),tw=Le(o0),ow=Le(At),aw=Le(r0),rw=Le(i0),lw=Le(s0),nw=Le(u0),iw=Le(d0),sw=Le(c0),uw=Le(p0),dw=Le(m0),cw=Le(h0),fw=Le(g0),pw=Le(L0),Cw=Le(i1),mw=Le(I0),hw=Le(y0),gw=Le(R0),vw=Le(P0);var Cl=t1("rgb"),m7=t1("hsl"),h7=t1("oklch"),g7=t1("oklab"),v7=t1("lch"),x7=t1("lab"),L7=Lo(3),T0=null;function w7(){return T0??(T0=document.createElement("canvas").getContext("2d")),T0}function V0(e){try{let t=w7();if(!t)return null;t.fillStyle="#000000",t.fillStyle=e;let o=t.fillStyle;t.fillStyle="#ffffff",t.fillStyle=e;let a=t.fillStyle;return o===a?o:null}catch{return null}}function _0(e){if(!e||typeof e!="string")return!1;let t=e.trim();return Ct(t)!==void 0?!0:V0(t)!==null}function gt(e){let t={r:255,g:255,b:255,a:1};if(!e||typeof e!="string")return t;let o=e.trim(),a=Ct(o);if(a){let l=Cl(a);if(l&&"r"in l&&"g"in l&&"b"in l)return{r:Math.round(Math.min(255,Math.max(0,l.r*255))),g:Math.round(Math.min(255,Math.max(0,l.g*255))),b:Math.round(Math.min(255,Math.max(0,l.b*255))),a:l.alpha??1}}let r=V0(o);if(r){if(r.startsWith("#")){let n=r.slice(1);return{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:1}}let l=r.match(/rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(l&&l[1]!=null&&l[2]!=null&&l[3]!=null)return{r:+l[1],g:+l[2],b:+l[3],a:l[4]!=null?+l[4]:1}}return t}function Zt(e){let t=Math.round(Math.min(255,Math.max(0,e.r))),o=Math.round(Math.min(255,Math.max(0,e.g))),a=Math.round(Math.min(255,Math.max(0,e.b))),r=Math.round(Math.min(1,Math.max(0,e.a))*100)/100;return r>=1?`rgb(${t}, ${o}, ${a})`:`rgba(${t}, ${o}, ${a}, ${r})`}function La(e){let t=e.startsWith("#")?e.slice(1):e;return/^[0-9a-fA-F]+$/.test(t)&&[3,4,6,8].includes(t.length)}function wo(e){let t=Math.round(Math.min(255,Math.max(0,e.r))),o=Math.round(Math.min(255,Math.max(0,e.g))),a=Math.round(Math.min(255,Math.max(0,e.b))),r=Math.min(1,Math.max(0,e.a)),l=`#${[t,o,a].map(n=>n.toString(16).padStart(2,"0")).join("")}`;return r<1?l+Math.round(r*255).toString(16).padStart(2,"0"):l}function D0(e){return!e||typeof e!="string"?"rgb":Ct(e.trim())?.mode??"rgb"}function Qe(e,t){let o={mode:"rgb",r:e.r/255,g:e.g/255,b:e.b/255,alpha:e.a};switch(t){case"oklch":return h7(o);case"oklab":return g7(o);case"lch":return v7(o);case"lab":return x7(o);default:return o}}function ml(e){let t=e?Cl(e):null;return!t||!("r"in t)||!("g"in t)||!("b"in t)?{r:255,g:255,b:255,a:1}:{r:Math.round(Math.min(255,Math.max(0,t.r*255))),g:Math.round(Math.min(255,Math.max(0,t.g*255))),b:Math.round(Math.min(255,Math.max(0,t.b*255))),a:t.alpha??1}}function hl(e){if(!e)return"";let t={...e},o=t;for(let a of Object.keys(o)){let r=o[a];typeof r=="number"&&(o[a]=L7(r))}return pl(t)}function Ft(e){let t={mode:"rgb",r:e.r/255,g:e.g/255,b:e.b/255},o=m7(t);return o?{h:o.h??0,s:o.s*100,l:o.l*100}:{h:0,s:0,l:0}}function gl(e){let t={mode:"hsl",h:e.h,s:e.s/100,l:e.l/100},o=Cl(t);return!o||!("r"in o)||!("g"in o)||!("b"in o)?{r:0,g:0,b:0}:{r:Math.round(o.r*255),g:Math.round(o.g*255),b:Math.round(o.b*255)}}import{jsx as Ze,jsxs as R1}from"react/jsx-runtime";var vl=16,$t=4,I7=245,O0=260,y7=200,M7="linear-gradient(45deg, #e0e0e0 25%, transparent 25%), linear-gradient(-45deg, #e0e0e0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e0e0e0 75%), linear-gradient(-45deg, transparent 75%, #e0e0e0 75%)",S7=["oklch","oklab","lch","lab","hsl"],E0=["oklch","oklab","lch","lab"],xl=["rgb","hsl","oklch","oklab","lch","lab"];function Ll(e){let t=D0(e);return S7.includes(t)?t:"rgb"}function bo(e,t){let o=Ft({r:e.r,g:e.g,b:e.b}),a=Qe(e,"oklch"),r=Qe(e,"oklab"),l=Qe(e,"lch"),n=Qe(e,"lab");return{hex:P7(t,e),r:e.r,g:e.g,b:e.b,h:Math.round(o.h),s:Math.round(o.s),l:Math.round(o.l),a:Math.round(e.a*100),oklch_l:Math.round(a.l*100),oklch_c:Math.round(a.c*1e3)/10,oklch_h:Math.round(a.h||0),oklab_l:Math.round(r.l*100),oklab_a:Math.round(r.a*1e3)/10,oklab_b:Math.round(r.b*1e3)/10,lch_l:Math.round(l.l),lch_c:Math.round(l.c),lch_h:Math.round(l.h||0),lab_l:Math.round(n.l),lab_a:Math.round(n.a),lab_b:Math.round(n.b)}}function bl(e,t){let o=t.a/100;switch(e){case"oklch":return{mode:"oklch",l:t.oklch_l/100,c:t.oklch_c/100,h:t.oklch_h,alpha:o};case"oklab":return{mode:"oklab",l:t.oklab_l/100,a:t.oklab_a/100,b:t.oklab_b/100,alpha:o};case"lch":return{mode:"lch",l:t.lch_l,c:t.lch_c,h:t.lch_h,alpha:o};case"lab":return{mode:"lab",l:t.lab_l,a:t.lab_a,b:t.lab_b,alpha:o};case"hsl":return{mode:"hsl",h:t.h,s:t.s,l:t.l};default:return{mode:"rgb",r:t.r/255,g:t.g/255,b:t.b/255,alpha:o}}}function R7(e){let t=ft(e);return t?t.getBoundingClientRect():{top:0,bottom:window.innerHeight,left:0,right:window.innerWidth}}function k7(e,t=I7){let o=e.getBoundingClientRect(),a=R7(e),r=a.bottom-o.bottom-$t,l=o.top-a.top-$t,i=r<t&&l>=t?o.top-t-$t:o.bottom+$t;i=Math.max(a.top+$t,Math.min(i,a.bottom-t-$t));let s=o.left;return s+O0>a.right&&(s=a.right-O0-vl),s<a.left+vl&&(s=a.left+vl),{top:i,left:s}}function Il(e){return e!=null&&typeof e=="string"?e:"#ffffff"}function wl(e){let{r:t,g:o,b:a,a:r}=gt(Il(e));return{type:"rgba",r:t,g:o,b:a,a:r}}function H7(e,t){let o=e||Zt(t);return t.a>=1?{backgroundColor:o}:{backgroundColor:o,backgroundImage:`linear-gradient(0deg, ${o}, ${o}), ${M7}`,backgroundSize:"100% 100%, 8px 8px, 8px 8px, 8px 8px, 8px 8px",backgroundPosition:"0 0, 0 0, 0 4px, 4px -4px, -4px 0"}}function P7(e,t){let o=typeof e=="string"?e.trim():"";return La(o)?o:wo(t)}var T7=e=>e.preventDefault(),V7=e=>{e.key==="Enter"&&e.currentTarget.blur()};function _7(e,t){switch(t.type){case"SET_ALL":return{format:e.format,hex:t.hex,r:t.r,g:t.g,b:t.b,h:t.h,s:t.s,l:t.l,a:t.a,oklch_l:t.oklch_l,oklch_c:t.oklch_c,oklch_h:t.oklch_h,oklab_l:t.oklab_l,oklab_a:t.oklab_a,oklab_b:t.oklab_b,lch_l:t.lch_l,lch_c:t.lch_c,lch_h:t.lch_h,lab_l:t.lab_l,lab_a:t.lab_a,lab_b:t.lab_b};case"SET_RGBA":{let{r:o,g:a,b:r,a:l}=t,n=Ft({r:o,g:a,b:r}),i={r:o,g:a,b:r,a:l/100},s=Qe(i,"oklch"),u=Qe(i,"oklab"),d=Qe(i,"lch"),f=Qe(i,"lab");return{...e,hex:wo(i),r:o,g:a,b:r,h:Math.round(n.h),s:Math.round(n.s),l:Math.round(n.l),a:l,oklch_l:Math.round(s.l*100),oklch_c:Math.round(s.c*1e3)/10,oklch_h:Math.round(s.h||0),oklab_l:Math.round(u.l*100),oklab_a:Math.round(u.a*1e3)/10,oklab_b:Math.round(u.b*1e3)/10,lch_l:Math.round(d.l),lch_c:Math.round(d.c),lch_h:Math.round(d.h||0),lab_l:Math.round(f.l),lab_a:Math.round(f.a),lab_b:Math.round(f.b)}}case"SET_HEX":return{...e,hex:t.hex};case"SET_CHANNEL":{let o={...e,[t.channel]:t.value},a;if(e.format==="rgb")a={r:o.r,g:o.g,b:o.b,a:o.a/100};else if(e.format==="hsl"){let u=gl({h:o.h,s:o.s,l:o.l});o.r=Math.round(u.r),o.g=Math.round(u.g),o.b=Math.round(u.b),a={r:o.r,g:o.g,b:o.b,a:o.a/100}}else{let u=bl(e.format,o);a=ml(u),o.r=a.r,o.g=a.g,o.b=a.b}let r=Ft({r:o.r,g:o.g,b:o.b}),l=Qe(a,"oklch"),n=Qe(a,"oklab"),i=Qe(a,"lch"),s=Qe(a,"lab");return{...o,hex:wo(a),h:Math.round(r.h),s:Math.round(r.s),l:Math.round(r.l),oklch_l:Math.round(l.l*100),oklch_c:Math.round(l.c*1e3)/10,oklch_h:Math.round(l.h||0),oklab_l:Math.round(n.l*100),oklab_a:Math.round(n.a*1e3)/10,oklab_b:Math.round(n.b*1e3)/10,lch_l:Math.round(i.l),lch_c:Math.round(i.c),lch_h:Math.round(i.h||0),lab_l:Math.round(s.l),lab_a:Math.round(s.a),lab_b:Math.round(s.b)}}case"SET_FORMAT":return{...e,format:t.format};default:return e}}var D7={placeholder:"Enter color value",ariaValue:"{0} color value",ariaOpenPicker:"{0}, open color picker. Current color: {1}",ariaPicker:"{0} picker",ariaSaturation:"Saturation {0}%, brightness {1}%",ariaEyedropper:"Pick color from screen",ariaHue:"Hue, 0 to 360 degrees",ariaAlphaSlider:"Alpha transparency, 0 to 100 percent",ariaHex:"Hexadecimal color value",ariaChannel:"{0} ({1}), {2} to {3}",ariaAlphaInput:"Alpha, 0 to 100 percent",ariaFormatCycle:"Color format: {0}. Click to change format.",titleFormatCycle:"Click to cycle format: RGB, HSL, OKLCH, OKLAB, LCH, LAB",gradientValue:"Gradient",imageValue:"Image"};function O7(e){let t=(e??"").trim();return t===""||t.toLowerCase()==="none"?"":t}function wa({label:e,value:t,onChange:o,id:a="color",aria:r,backgroundImage:l}){let n=e1(D7,r),i=`${a}-trigger`,s=`${a}-popover`,u=Il(t),[{colorInput:d,colorState:f},C]=m2(()=>wl(u)),[h,p]=Re.useReducer(_7,u,y=>{let D=gt(y),Q=bo(D,y);return{format:Ll(y),...Q}}),c=Re.useRef(h);c.current=h;let m=Re.useRef(null),b=Re.useRef(t),g=Re.useRef(o);g.current=o;let k=Re.useCallback(y=>{let D=c.current.format,Q;if(E0.includes(D)){let le=Qe(y,D);Q=hl(le)}else if(D==="hsl"){let le=Ft({r:y.r,g:y.g,b:y.b}),ke=Math.round(y.a*100)/100;Q=ke>=1?`hsl(${Math.round(le.h)}, ${Math.round(le.s)}%, ${Math.round(le.l)}%)`:`hsla(${Math.round(le.h)}, ${Math.round(le.s)}%, ${Math.round(le.l)}%, ${ke})`}else Q=Zt(y);Q!==m.current&&(m.current=Q,b.current=Q,typeof g.current=="function"&&g.current(Q))},[]),v=h2(k,y7),P=v2({computePosition:k7,onClose:v.flush,trapFocus:!0});Re.useEffect(()=>{let y=Il(t);if(y===b.current)return;b.current=y;let D=gt(y);C(wl(t));let Q=bo(D,y),le=Ll(y);p({type:"SET_ALL",...Q}),le!==c.current.format&&p({type:"SET_FORMAT",format:le})},[t,C]);let V=Re.useCallback(y=>{v.cancel();let D=y.target.value;if((!D||!D.startsWith("#"))&&(D="#"+D.replace(/^#+/,"")),La(D)){C({type:"hex",value:D});let Q=gt(D),le=bo(Q,D);p({type:"SET_ALL",...le})}else p({type:"SET_HEX",hex:D})},[v,C]),U=Re.useCallback(()=>{v.cancel();let y=c.current.hex.trim();if(La(y)){let D=gt(y),Q=bo(D,y);p({type:"SET_ALL",...Q}),k(D)}else{let D=c.current;p({type:"SET_HEX",hex:wo({r:D.r,g:D.g,b:D.b,a:D.a/100})})}},[v,k]),M=Re.useMemo(()=>{switch(h.format){case"hsl":return[{key:"h",label:"H",min:0,max:360},{key:"s",label:"S",min:0,max:100},{key:"l",label:"L",min:0,max:100}];case"oklch":return[{key:"oklch_l",label:"L",min:0,max:100,step:1},{key:"oklch_c",label:"C",min:0,max:40,step:.1},{key:"oklch_h",label:"H",min:0,max:360,step:1}];case"oklab":return[{key:"oklab_l",label:"L",min:0,max:100,step:1},{key:"oklab_a",label:"A",min:-40,max:40,step:.1},{key:"oklab_b",label:"B",min:-40,max:40,step:.1}];case"lch":return[{key:"lch_l",label:"L",min:0,max:100,step:1},{key:"lch_c",label:"C",min:0,max:150,step:1},{key:"lch_h",label:"H",min:0,max:360,step:1}];case"lab":return[{key:"lab_l",label:"L",min:0,max:100,step:1},{key:"lab_a",label:"A",min:-128,max:127,step:1},{key:"lab_b",label:"B",min:-128,max:127,step:1}];default:return[{key:"r",label:"R",min:0,max:255},{key:"g",label:"G",min:0,max:255},{key:"b",label:"B",min:0,max:255}]}},[h.format]),_=Re.useCallback((y,D)=>{v.cancel();let Q=String(D).trim(),le=["oklch_c","oklab_a","oklab_b"].includes(y),ke=Q===""?0:le?parseFloat(Q):parseInt(Q,10);if(Number.isNaN(ke))return;let X=c.current,Ce=M.find(he=>he.key===y),te=0,ge=100;Ce?(te=Ce.min,ge=Ce.max):y==="a"?(te=0,ge=100):y==="h"?(te=0,ge=360):X.format==="rgb"&&(te=0,ge=255);let ve=Math.min(ge,Math.max(te,ke));p({type:"SET_CHANNEL",channel:y,value:ve});let de={...X,[y]:ve},xe;if(X.format==="rgb")xe={r:de.r,g:de.g,b:de.b,a:de.a/100};else if(X.format==="hsl"){let he=gl({h:de.h,s:de.s,l:de.l});xe={r:he.r,g:he.g,b:he.b,a:de.a/100}}else{let he=bl(X.format,de);xe=ml(he)}C({type:"rgba",...xe}),k(xe)},[v,C,k,M]),q=Re.useCallback(y=>{C(y);let D=y.getRgba();p({type:"SET_RGBA",r:Math.round(D.r),g:Math.round(D.g),b:Math.round(D.b),a:Math.round(D.a*100)}),v({r:D.r,g:D.g,b:D.b,a:D.a})},[C,v]),K=Re.useCallback(y=>{let D=y.target.closest('[role="slider"]');D instanceof HTMLElement&&D.focus()},[]);Re.useLayoutEffect(()=>{if(!P.isOpen||!P.popoverRef.current)return;let y=P.popoverRef.current.offsetHeight;y<=0||P.reposition(y)},[P.isOpen,P.reposition]);let W=f?.rgba??{r:255,g:255,b:255,a:1},N=f?.hsva??{h:0,s:0,v:100,a:1},E=Math.round(N.s),S=Math.round(N.v);Re.useEffect(()=>{let y=P.popoverRef.current;if(!P.isOpen||!y)return;let D=le=>y.querySelector(`.${le} [role="slider"]`)??null,Q=D("colorEditor-picker-saturation");Q&&(Q.setAttribute("aria-label",e),Q.setAttribute("aria-valuetext",Pe(n.ariaSaturation,[E,S])),Q.setAttribute("aria-valuenow",String(E)),Q.setAttribute("aria-valuemin","0"),Q.setAttribute("aria-valuemax","100")),D("colorEditor-picker-hue")?.setAttribute("aria-label",n.ariaHue),D("colorEditor-picker-alpha")?.setAttribute("aria-label",n.ariaAlphaSlider)});let x=Re.useCallback(()=>{let y=h.format;if(E0.includes(y)){let D=bl(y,h);return hl(D)}else if(y==="hsl"){let D=Ft({r:W.r,g:W.g,b:W.b}),Q=Math.round(W.a*100)/100;return Q>=1?`hsl(${Math.round(D.h)}, ${Math.round(D.s)}%, ${Math.round(D.l)}%)`:`hsla(${Math.round(D.h)}, ${Math.round(D.s)}%, ${Math.round(D.l)}%, ${Q})`}else return Zt(W)},[h,W])(),w=O7(l),I=w!==""&&W.a===0,H=/url\(/i.test(w)?n.imageValue:n.gradientValue,A=I?H:x,F=I?{backgroundImage:w,backgroundSize:"cover",backgroundPosition:"center"}:H7(x,W),[G,B]=Re.useState(x),$=Re.useRef(G);$.current=G,Re.useEffect(()=>{B(x)},[x]);let Z=Re.useCallback(y=>{let D=y.target.value;B(D)},[]),R=Re.useCallback(()=>{v.cancel();let y=$.current.trim();if(!y||!_0(y)){B(x);return}let D=gt(y),Q=Zt(D),le=Zt(W);if(Q!==le){C(wl(y));let ke=bo(D,y),X=Ll(y);p({type:"SET_ALL",...ke}),X!==c.current.format&&p({type:"SET_FORMAT",format:X}),y!==m.current&&(m.current=y,b.current=y,typeof g.current=="function"&&g.current(y))}else B(x)},[v,x,W,C]),oe=Re.useCallback(y=>{y.key==="Enter"&&y.currentTarget.blur()},[]),se=Re.useCallback(()=>{let y=xl.indexOf(h.format),D=xl[(y+1)%xl.length]??h.format;p({type:"SET_FORMAT",format:D})},[h.format]),ue=Re.useMemo(()=>{let y=P.triggerRef.current;if(!y)return document.body;let D=y.getRootNode();return D instanceof ShadowRoot?D:document.body},[P.isOpen,P.triggerRef]);return Ze(l1,{label:e,id:a,className:"colorEditor-fieldset",children:R1("div",{className:"colorEditor-wrapper",children:[Ze("button",{ref:P.triggerRef,id:i,type:"button",className:"colorEditor-swatch-only",onClick:P.toggle,"aria-expanded":P.isOpen,"aria-haspopup":"dialog","aria-controls":s,"aria-label":Pe(n.ariaOpenPicker,[e,A]),children:Ze("span",{style:F,"aria-hidden":"true",className:"colorEditor-swatch"})}),Ze("input",{type:"text",className:"colorEditor-value-input",value:I?A:G,readOnly:I,onChange:Z,onBlur:R,onKeyDown:oe,"aria-label":Pe(n.ariaValue,[e]),placeholder:n.placeholder,spellCheck:"false",autoComplete:"off"}),P.isOpen&&b7(R1("div",{ref:P.popoverRef,id:s,role:"dialog","aria-modal":"true","aria-label":Pe(n.ariaPicker,[e]),style:{top:P.position.top,left:P.position.left},onDragStart:T7,onMouseUp:K,className:"colorEditor-popover",children:[R1(Rt,{color:d,onChange:q,className:"colorEditor-picker",children:[Ze(Rt.Saturation,{className:"colorEditor-picker-saturation"}),R1("div",{className:"colorEditor-picker-toolbar",children:[Ze(Rt.EyeDropper,{title:n.ariaEyedropper,children:Ze(ro,{size:18,"aria-hidden":"true"})}),R1("div",{className:"colorEditor-picker-sliders",children:[Ze(Rt.Hue,{className:"h-4 colorEditor-picker-hue"}),Ze(Rt.Alpha,{className:"h-4 colorEditor-picker-alpha"})]})]})]}),R1("div",{className:"colorEditor-input-wrapper",children:[R1("div",{className:"colorEditor-input-group",children:[Ze("input",{type:"text",value:h.hex,onChange:V,onBlur:U,onKeyDown:V7,"aria-label":n.ariaHex,className:"colorEditor-input-hex",spellCheck:"false",autoComplete:"off"}),Ze("label",{className:"colorEditor-input-label","aria-hidden":"true",children:"HEX"})]}),R1("div",{className:"colorEditor-channels-wrapper",children:[R1("div",{className:"colorEditor-input-container",children:[M.map(y=>Ze("div",{className:"colorEditor-input-group-no-label",children:Ze("input",{type:"number",min:y.min,max:y.max,step:y.step||1,value:h[y.key],onChange:D=>_(y.key,D.target.value),onBlur:D=>_(y.key,D.target.value),"aria-label":Pe(n.ariaChannel,[y.label,h.format.toUpperCase(),y.min,y.max]),"aria-valuemin":y.min,"aria-valuemax":y.max,"aria-valuenow":h[y.key],className:"colorEditor-input-rgba"})},y.key)),Ze("div",{className:"colorEditor-input-group-no-label",children:Ze("input",{type:"number",min:0,max:100,value:h.a,onChange:y=>_("a",y.target.value),onBlur:y=>_("a",y.target.value),"aria-label":n.ariaAlphaInput,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":h.a,className:"colorEditor-input-rgba"})})]}),Ze("div",{className:"colorEditor-format-selector",children:R1("button",{type:"button",className:"colorEditor-format-picker",onClick:se,"aria-label":Pe(n.ariaFormatCycle,[h.format.toUpperCase()]),"aria-live":"polite",title:n.titleFormatCycle,children:[M.map(y=>Ze("span",{className:"colorEditor-format-letter","aria-hidden":"true",children:y.label},y.key)),Ze("span",{className:"colorEditor-format-letter","aria-hidden":"true",children:"A"})]})})]})]})]}),ue)]})})}import je from"react";import{jsx as Nt,jsxs as B7}from"react/jsx-runtime";var E7={ariaValue:"{0} value",ariaUnit:"{0} unit"};function B0(e,t,o,a,r){let l=Ge(e,o,a);if(l.numericValue!=="")return l.unit;if(t!=null&&t!==""){let n=Ge(t,o,a);if(n.numericValue!==""&&r.has(n.unit))return n.unit}return o}function k1({label:e,value:t,onChange:o,units:a=Do,constraints:r=m1,defaultUnit:l="px",placeholder:n=0,id:i="dimension",icon:s,aria:u}){let d=e1(E7,u),f=je.useMemo(()=>new Set(a.map(E=>E.value)),[a]),C=je.useMemo(()=>eo(a),[a]),h=je.useMemo(()=>{if(n==null||n==="")return"";if(typeof n=="number")return String(n);let E=Ge(String(n),l,C);return E.numericValue!==""?String(E.numericValue):String(n)},[n,l,C]),[p,c]=je.useState(()=>{let E=Ge(t,l,C);return E.numericValue!==""?String(E.numericValue):""}),[m,b]=je.useState(()=>B0(t,n,l,C,f)),g=je.useRef(o);g.current=o;let k=je.useRef(t),v=je.useRef(n);je.useEffect(()=>{if(t===k.current&&n===v.current)return;k.current=t,v.current=n;let E=Ge(t,l,C);c(E.numericValue!==""?String(E.numericValue):""),b(B0(t,n,l,C,f))},[t,n,l,C,f]);let P=je.useCallback((E,S)=>{let L=parseFloat(E);if(E===""||isNaN(L)){if(k.current==="")return;k.current="",typeof g.current=="function"&&g.current("");return}let x=h1(L,S,r),w=g1(x,S,r),I=Oo(w,S);I!==k.current&&(k.current=I,typeof g.current=="function"&&g.current(I))},[r]),V=je.useCallback(E=>{let S=E.target.value;c(S);let x=S.trim().match(C)?.[2];x&&f.has(x)&&x!==m&&b(x)},[C,m,f]),U=je.useCallback(E=>{let S=E.clipboardData.getData("text"),L=Ge(S,l,C);if(L.numericValue!==""&&L.unit&&f.has(L.unit)){E.preventDefault(),c(String(L.numericValue)),b(L.unit);let x=h1(L.numericValue,L.unit,r),w=g1(x,L.unit,r),I=Oo(w,L.unit);k.current=I,typeof g.current=="function"&&g.current(I)}},[l,C,f,r]),M=je.useCallback(()=>{if(p===""){P("",m);return}let E=parseFloat(p);if(isNaN(E)){let x=Ge(t,l,C);c(x.numericValue!==""?String(x.numericValue):"");return}let S=h1(E,m,r),L=g1(S,m,r);c(String(L)),P(String(L),m)},[p,m,t,l,C,r,P]),_=je.useCallback(E=>{if(E.key==="Enter"){E.currentTarget.blur();return}if(E.key==="ArrowUp"||E.key==="ArrowDown"){E.preventDefault();let S=Eo(p,E.key,E.shiftKey,m,r);if(S===null)return;c(S),P(S,m)}},[p,m,r,P]),q=je.useCallback(E=>{let S=E.target.value;if(!f.has(S))return;if(b(S),p===""){P("",S);return}let L=parseFloat(p);if(isNaN(L))return;let x=h1(L,S,r),w=g1(x,S,r);c(String(w));let I=Oo(w,S);k.current=I,typeof g.current=="function"&&g.current(I)},[p,f,r,P]),K=`${i}-input`,W=`${i}-unit`,N=a.some(E=>E.value!=="");return Nt(l1,{label:e,id:i,className:"dimensionEditor-fieldset",children:B7("div",{className:"dimensionEditor-row",children:[s&&Nt("span",{className:"dimensionEditor-icon","aria-hidden":"true",children:Nt(s,{size:14,width:14,height:14})}),Nt("input",{id:K,type:"text",className:s?"dimensionEditor-input dimensionEditor-input--with-icon":"dimensionEditor-input",value:p,placeholder:h,onChange:V,onPaste:U,onBlur:M,onKeyDown:_,"aria-label":Pe(d.ariaValue,[e]),autoComplete:"off",spellCheck:"false"}),N&&Nt("select",{id:W,className:"dimensionEditor-unit",value:m,onChange:q,"aria-label":Pe(d.ariaUnit,[e]),children:a.map(E=>Nt("option",{value:E.value,children:E.label},E.value||"__unitless__"))})]})})}function Je(e,t){if(e==null)return{};var o={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;o[a]=e[a]}return o}function ne(){return ne=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var a in o)({}).hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e},ne.apply(null,arguments)}var Y=Pn(z0(),1),U7=Pn(W0(),1);import*as me from"react";import{cloneElement as ub,Component as db,useRef as c1,useCallback as pe,useEffect as H1,useMemo as Ut}from"react";var X0=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Q0=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",Va=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let o=getComputedStyle(e,null);return Q0(o.overflowY,t)||Q0(o.overflowX,t)||(a=>{let r=(l=>{if(!l.ownerDocument||!l.ownerDocument.defaultView)return null;try{return l.ownerDocument.defaultView.frameElement}catch{return null}})(a);return!!r&&(r.clientHeight<a.scrollHeight||r.clientWidth<a.scrollWidth)})(e)}return!1},_a=(e,t,o,a,r,l,n,i)=>l<e&&n>t||l>e&&n<t?0:l<=e&&i<=o||n>=t&&i>=o?l-e-a:n>t&&i<o||l<e&&i>o?n-t+r:0,N7=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)},J0=(e,t)=>{var o,a,r,l;if(typeof document>"u")return[];let{scrollMode:n,block:i,inline:s,boundary:u,skipOverflowHiddenElements:d}=t,f=typeof u=="function"?u:L=>L!==u;if(!X0(e))throw new TypeError("Invalid target");let C=document.scrollingElement||document.documentElement,h=[],p=e;for(;X0(p)&&f(p);){if(p=N7(p),p===C){h.push(p);break}p!=null&&p===document.body&&Va(p)&&!Va(document.documentElement)||p!=null&&Va(p,d)&&h.push(p)}let c=(a=(o=window.visualViewport)==null?void 0:o.width)!=null?a:innerWidth,m=(l=(r=window.visualViewport)==null?void 0:r.height)!=null?l:innerHeight,{scrollX:b,scrollY:g}=window,{height:k,width:v,top:P,right:V,bottom:U,left:M}=e.getBoundingClientRect(),{top:_,right:q,bottom:K,left:W}=(L=>{let x=window.getComputedStyle(L);return{top:parseFloat(x.scrollMarginTop)||0,right:parseFloat(x.scrollMarginRight)||0,bottom:parseFloat(x.scrollMarginBottom)||0,left:parseFloat(x.scrollMarginLeft)||0}})(e),N=i==="start"||i==="nearest"?P-_:i==="end"?U+K:P+k/2-_+K,E=s==="center"?M+v/2-W+q:s==="end"?V+q:M-W,S=[];for(let L=0;L<h.length;L++){let x=h[L],{height:w,width:I,top:H,right:A,bottom:F,left:G}=x.getBoundingClientRect();if(n==="if-needed"&&P>=0&&M>=0&&U<=m&&V<=c&&(x===C&&!Va(x)||P>=H&&U<=F&&M>=G&&V<=A))return S;let B=getComputedStyle(x),$=parseInt(B.borderLeftWidth,10),Z=parseInt(B.borderTopWidth,10),R=parseInt(B.borderRightWidth,10),oe=parseInt(B.borderBottomWidth,10),se=0,ue=0,y="offsetWidth"in x?x.offsetWidth-x.clientWidth-$-R:0,D="offsetHeight"in x?x.offsetHeight-x.clientHeight-Z-oe:0,Q="offsetWidth"in x?x.offsetWidth===0?0:I/x.offsetWidth:0,le="offsetHeight"in x?x.offsetHeight===0?0:w/x.offsetHeight:0;if(C===x)se=i==="start"?N:i==="end"?N-m:i==="nearest"?_a(g,g+m,m,Z,oe,g+N,g+N+k,k):N-m/2,ue=s==="start"?E:s==="center"?E-c/2:s==="end"?E-c:_a(b,b+c,c,$,R,b+E,b+E+v,v),se=Math.max(0,se+g),ue=Math.max(0,ue+b);else{se=i==="start"?N-H-Z:i==="end"?N-F+oe+D:i==="nearest"?_a(H,F,w,Z,oe+D,N,N+k,k):N-(H+w/2)+D/2,ue=s==="start"?E-G-$:s==="center"?E-(G+I/2)+y/2:s==="end"?E-A+R+y:_a(G,A,I,$,R+y,E,E+v,v);let{scrollLeft:ke,scrollTop:X}=x;se=le===0?0:Math.max(0,Math.min(X+se/le,x.scrollHeight-w/le+D)),ue=Q===0?0:Math.max(0,Math.min(ke+ue/Q,x.scrollWidth-I/Q+y)),N+=X-se,E+=ke-ue}S.push({el:x,top:se,left:ue})}return S};var q7=0;function l5(){return String(q7++)}function Mo(e){var t=me.useRef(e);return t.current=e,t}function z7(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){t.forEach(function(r){typeof r=="function"?r(a):r&&(r.current=a)})}}function Sl(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){for(var r=arguments.length,l=new Array(r>1?r-1:0),n=1;n<r;n++)l[n-1]=arguments[n];return t.some(function(i){return i&&i.apply(void 0,[a].concat(l)),a.preventDownshiftDefault||a.hasOwnProperty("nativeEvent")&&a.nativeEvent.preventDownshiftDefault})}}function n5(e,t){var o;function a(){o&&clearTimeout(o)}function r(){for(var l=arguments.length,n=new Array(l),i=0;i<l;i++)n[i]=arguments[i];a(),o=setTimeout(function(){o=null,e.apply(void 0,n)},t)}return r.cancel=a,r}var j7=n5(function(e){i5(e).textContent=""},500);function i5(e){var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}function K7(e,t){if(!(!e||!t)){var o=i5(t);o.textContent=e,j7(t)}}function G7(e){var t=e?.getElementById("a11y-status-message");t&&t.remove()}function So(){}var kl=So;function Oa(e,t){if(!t)return e;var o=Object.keys(e);return o.reduce(function(a,r){return t[r]!==void 0&&(a[r]=t[r]),a},ne({},e))}function W7(e,t){if(e){var o=J0(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});o.forEach(function(a){var r=a.el,l=a.top,n=a.left;r.scrollTop=l,r.scrollLeft=n})}}function Y0(e,t,o){var a=e===t||t instanceof o.Node&&e.contains&&e.contains(t);return a}function X7(e,t){var o;function a(){o&&clearTimeout(o)}function r(){for(var l=arguments.length,n=new Array(l),i=0;i<l;i++)n[i]=arguments[i];a(),o=setTimeout(function(){o=null,e.apply(void 0,n)},t)}return r.cancel=a,r}function Ve(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){for(var r=arguments.length,l=new Array(r>1?r-1:0),n=1;n<r;n++)l[n-1]=arguments[n];return t.some(function(i){return i&&i.apply(void 0,[a].concat(l)),a.preventDownshiftDefault||a.hasOwnProperty("nativeEvent")&&a.nativeEvent.preventDownshiftDefault})}}function E1(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){t.forEach(function(r){typeof r=="function"?r(a):r&&(r.current=a)})}}function Q7(e,t){return e[t]!==void 0}function Ea(e){var t=e.key,o=e.keyCode;return o>=37&&o<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function ot(e,t,o,a,r){r===void 0&&(r=!1);var l=o.length;if(l===0)return-1;var n=l-1;(typeof e!="number"||e<0||e>n)&&(e=t>0?-1:n+1);var i=e+t;i<0?i=r?n:0:i>n&&(i=r?0:n);var s=qt(i,t<0,o,a,r);return s===-1?e>=l?-1:e:s}function qt(e,t,o,a,r){r===void 0&&(r=!1);var l=o.length;if(t){for(var n=e;n>=0;n--)if(!a(o[n],n))return n}else for(var i=e;i<l;i++)if(!a(o[i],i))return i;return r?qt(t?l-1:0,t,o,a):-1}function e5(e,t,o,a){return a===void 0&&(a=!0),o&&t.some(function(r){return r&&(Y0(r,e,o)||a&&Y0(r,o.document.activeElement,o))})}function Hl(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function J7(e,t,o,a){for(var r=e.type,l={},n=Object.keys(o),i=0,s=n;i<s.length;i++){var u=s[i];Y7(u,e,t,o,a),a[u]!==o[u]&&(l[u]=a[u])}t.onStateChange&&Object.keys(l).length&&t.onStateChange(ne({type:r},l))}function Y7(e,t,o,a,r){if(r[e]!==a[e]){var l="on"+Hl(e)+"Change",n=o[l];if(typeof n=="function"){var i=t.type;n(ne({type:i},r))}}}function s5(e,t,o,a){var r=me.useRef(null),l=me.useRef(void 0),n=Mo(t),i=me.useCallback(function(C,h){l.current=h,C=Oa(C,n.current);var p=e(C,n.current,h),c=n.current.stateReducer(C,ne({},h,{changes:p}));return ne({},C,c)},[n,e]),s=me.useReducer(i,t,o),u=s[0],d=s[1],f=l.current;return me.useEffect(function(){var C,h=Oa((C=r.current)!=null?C:{},n.current),p=f&&r.current&&!a(h,u);p&&J7(f,n.current,h,u),r.current=u},[u,f,a,n]),[u,d]}function Pl(e,t,o,a){var r=s5(e,t,o,a),l=r[0],n=r[1];return[Oa(l,t),n]}function Tl(e,t,o,a){if(e!==void 0&&t!==void 0)return[e,t];if(e!==void 0){var r=o.indexOf(e);if(r<0)throw new Error(a);return[e,o.indexOf(e)]}if(t!==void 0){var l=o[t];if(l===void 0)throw new Error(a);return[l,t]}throw new Error(a)}function Na(){var e=me.useRef(!0);return me.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function e4(e,t){return t.changes}var t4={environment:Y.default.shape({addEventListener:Y.default.func.isRequired,removeEventListener:Y.default.func.isRequired,document:Y.default.shape({createElement:Y.default.func.isRequired,getElementById:Y.default.func.isRequired,activeElement:Y.default.any.isRequired,body:Y.default.any.isRequired}).isRequired,Node:Y.default.func.isRequired}),itemToKey:Y.default.func,stateReducer:Y.default.func};function P1(e,t,o){var a=e["default"+Hl(t)];return a!==void 0?a:o[t]}function vt(e,t,o){var a=e[t];if(a!==void 0)return a;var r=e["initial"+Hl(t)];return r!==void 0?r:P1(e,t,o)}var t5=n5(function(e,t){K7(e,t)},200);function Vl(e,t,o,a){var r=a?.document,l=Na();me.useEffect(function(){if(!(!e||l||!r)){var n=e(t);t5(n,r)}},o),me.useEffect(function(){return function(){t5.cancel(),G7(r)}},[r])}var Io=ne({},t4,{getA11yStatusMessage:Y.default.func,highlightedIndex:Y.default.number,defaultHighlightedIndex:Y.default.number,initialHighlightedIndex:Y.default.number,isOpen:Y.default.bool,defaultIsOpen:Y.default.bool,initialIsOpen:Y.default.bool,selectedItem:Y.default.any,initialSelectedItem:Y.default.any,defaultSelectedItem:Y.default.any,id:Y.default.string,labelId:Y.default.string,menuId:Y.default.string,getItemId:Y.default.func,toggleButtonId:Y.default.string,onSelectedItemChange:Y.default.func,onHighlightedIndexChange:Y.default.func,onStateChange:Y.default.func,onIsOpenChange:Y.default.func,scrollIntoView:Y.default.func}),yo={itemToString:function(t){return t?String(t):""},itemToKey:function(t){return t},stateReducer:e4,scrollIntoView:W7,environment:typeof window>"u"?void 0:window},Ye={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""},o4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?me.useLayoutEffect:me.useEffect;function a4(e){return/^\S{1}$/.test(e)}function u5(e){var t=vt(e,"selectedItem",Ye),o=vt(e,"isOpen",Ye),a=r4(e),r=vt(e,"inputValue",Ye);return{highlightedIndex:a<0&&t&&o?e.items.findIndex(function(l){return e.itemToKey(l)===e.itemToKey(t)}):a,isOpen:o,selectedItem:t,inputValue:r}}function xt(e,t,o){var a=e.items,r=e.initialHighlightedIndex,l=e.defaultHighlightedIndex,n=e.isItemDisabled,i=e.itemToKey,s=t.selectedItem,u=t.highlightedIndex;return a.length===0?-1:r!==void 0&&u===r&&!n(a[r],r)?r:l!==void 0&&!n(a[l],l)?l:s?a.findIndex(function(d){return i(s)===i(d)}):o<0&&!n(a[a.length-1],a.length-1)?a.length-1:o>0&&!n(a[0],0)?0:-1}function d5(e,t,o){var a=me.useRef({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1}),r=me.useCallback(function(){return o.map(function(l){return l.current})},[o]);return me.useEffect(function(){if(!e)return So;function l(){a.current.isTouchEnd=!1,a.current.isMouseDown=!0}function n(d){a.current.isMouseDown=!1,e5(d.target,r(),e)||t()}function i(){a.current.isTouchEnd=!1,a.current.isTouchMove=!1}function s(){a.current.isTouchMove=!0}function u(d){a.current.isTouchEnd=!0,!a.current.isTouchMove&&!e5(d.target,r(),e,!1)&&t()}return e.addEventListener("mousedown",l),e.addEventListener("mouseup",n),e.addEventListener("touchstart",i),e.addEventListener("touchmove",s),e.addEventListener("touchend",u),function(){e.removeEventListener("mousedown",l),e.removeEventListener("mouseup",n),e.removeEventListener("touchstart",i),e.removeEventListener("touchmove",s),e.removeEventListener("touchend",u)}},[e,r,t]),a.current}var _l=function(){return So};function c5(e){var t=e.highlightedIndex,o=e.isOpen,a=e.itemRefs,r=e.getItemNodeFromIndex,l=e.menuElement,n=e.scrollIntoView,i=me.useRef(!0);return o4(function(){t<0||!o||!Object.keys(a.current).length||(i.current===!1?i.current=!0:n(r(t),l))},[t]),i}var Dl=So;function Ba(e,t,o){var a;o===void 0&&(o=!0);var r=((a=e.items)==null?void 0:a.length)&&t>=0;return ne({isOpen:!1,highlightedIndex:-1},r&&ne({selectedItem:e.items[t],isOpen:P1(e,"isOpen",Ye),highlightedIndex:P1(e,"highlightedIndex",Ye)},o&&{inputValue:e.itemToString(e.items[t])}))}function f5(e,t){return e.isOpen===t.isOpen&&e.inputValue===t.inputValue&&e.highlightedIndex===t.highlightedIndex&&e.selectedItem===t.selectedItem}function Aa(e){var t=P1(e,"highlightedIndex",Ye);return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function r4(e){var t=vt(e,"highlightedIndex",Ye);return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function p5(e,t,o,a){var r=o.type,l;switch(r){case a.ItemMouseMove:l={highlightedIndex:o.disabled?-1:o.index};break;case a.MenuMouseLeave:l={highlightedIndex:-1};break;case a.ToggleButtonClick:case a.FunctionToggleMenu:l={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:xt(t,e,0)};break;case a.FunctionOpenMenu:l={isOpen:!0,highlightedIndex:xt(t,e,0)};break;case a.FunctionCloseMenu:l={isOpen:!1};break;case a.FunctionSetHighlightedIndex:l={highlightedIndex:t.isItemDisabled(t.items[o.highlightedIndex],o.highlightedIndex)?-1:o.highlightedIndex};break;case a.FunctionSetInputValue:l={inputValue:o.inputValue};break;case a.FunctionReset:l={highlightedIndex:Aa(t),isOpen:P1(t,"isOpen",Ye),selectedItem:P1(t,"selectedItem",Ye),inputValue:P1(t,"inputValue",Ye)};break;default:throw new Error("Reducer called without proper action type.")}return ne({},e,l)}var l4=ne({},Io,{items:Y.default.array.isRequired,isItemDisabled:Y.default.func}),n4=ne({},yo,{isItemDisabled:function(){return!1}});function i4(e){for(var t=e.keysSoFar,o=e.highlightedIndex,a=e.items,r=e.itemToString,l=e.isItemDisabled,n=t.toLowerCase(),i=0;i<a.length;i++){var s=(i+o+(t.length<2?1:0))%a.length,u=a[s];if(u!==void 0&&r(u).toLowerCase().startsWith(n)&&!l(u,s))return s}return o}var Da=0,Ol=1,El=2,Za=3,Bl=4,Al=5,Zl=6,Fl=7,$l=8,Nl=9,Ul=10,Fa=11,C5=12,m5=13,ql=14,h5=15,g5=16,v5=17,x5=18,zl=19,Rl=20,L5=21,w5=Object.freeze({__proto__:null,FunctionCloseMenu:v5,FunctionOpenMenu:g5,FunctionReset:L5,FunctionSelectItem:zl,FunctionSetHighlightedIndex:x5,FunctionSetInputValue:Rl,FunctionToggleMenu:h5,ItemClick:ql,ItemMouseMove:m5,MenuMouseLeave:C5,ToggleButtonBlur:Fa,ToggleButtonClick:Da,ToggleButtonKeyDownArrowDown:Ol,ToggleButtonKeyDownArrowUp:El,ToggleButtonKeyDownCharacter:Za,ToggleButtonKeyDownEnd:Zl,ToggleButtonKeyDownEnter:Fl,ToggleButtonKeyDownEscape:Bl,ToggleButtonKeyDownHome:Al,ToggleButtonKeyDownPageDown:Ul,ToggleButtonKeyDownPageUp:Nl,ToggleButtonKeyDownSpaceButton:$l});function s4(e,t,o){var a,r=o.type,l=o.altKey,n;switch(r){case ql:n={isOpen:P1(t,"isOpen",Ye),highlightedIndex:Aa(t),selectedItem:t.items[o.index]};break;case Za:{var i=o.key,s=""+e.inputValue+i,u=!e.isOpen&&e.selectedItem?t.items.findIndex(function(h){return t.itemToKey(h)===t.itemToKey(e.selectedItem)}):e.highlightedIndex,d=i4({keysSoFar:s,highlightedIndex:u,items:t.items,itemToString:t.itemToString,isItemDisabled:t.isItemDisabled});n={inputValue:s,highlightedIndex:d,isOpen:!0}}break;case Ol:{var f=e.isOpen?ot(e.highlightedIndex,1,t.items,t.isItemDisabled):l&&e.selectedItem==null?-1:xt(t,e,1);n={highlightedIndex:f,isOpen:!0}}break;case El:if(e.isOpen&&l)n=Ba(t,e.highlightedIndex,!1);else{var C=e.isOpen?ot(e.highlightedIndex,-1,t.items,t.isItemDisabled):xt(t,e,-1);n={highlightedIndex:C,isOpen:!0}}break;case Fl:case $l:n=Ba(t,e.highlightedIndex,!1);break;case Al:n={highlightedIndex:qt(0,!1,t.items,t.isItemDisabled),isOpen:!0};break;case Zl:n={highlightedIndex:qt(t.items.length-1,!0,t.items,t.isItemDisabled),isOpen:!0};break;case Nl:n={highlightedIndex:ot(e.highlightedIndex,-10,t.items,t.isItemDisabled)};break;case Ul:n={highlightedIndex:ot(e.highlightedIndex,10,t.items,t.isItemDisabled)};break;case Bl:n={isOpen:!1,highlightedIndex:-1};break;case Fa:n=ne({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((a=t.items)==null?void 0:a.length)&&{selectedItem:t.items[e.highlightedIndex]});break;case zl:n={selectedItem:o.selectedItem};break;default:return p5(e,t,o,w5)}return ne({},e,n)}var u4=ne({},me),b5=u4.useId,I5=typeof b5=="function"?d4:c4;function d4(e){var t=e.id,o=e.labelId,a=e.menuId,r=e.getItemId,l=e.toggleButtonId,n=e.inputId,i="downshift-"+b5();t||(t=i);var s=me.useMemo(function(){return{labelId:o??t+"-label",menuId:a??t+"-menu",getItemId:r??function(u){return t+"-item-"+u},toggleButtonId:l??t+"-toggle-button",inputId:n??t+"-input"}},[r,t,n,o,a,l]);return s}function c4(e){var t=e.id,o=e.labelId,a=e.menuId,r=e.getItemId,l=e.toggleButtonId,n=e.inputId,i=me.useRef(t??"downshift-"+l5()),s=i.current,u=me.useMemo(function(){return{labelId:o??s+"-label",menuId:a??s+"-menu",getItemId:r??function(d){return s+"-item-"+d},toggleButtonId:l??s+"-toggle-button",inputId:n??s+"-input"}},[r,n,o,a,l,s]);return u}var f4=["onClick"],p4=["onMouseLeave","refKey","ref"],C4=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],m4=["item","index","onMouseMove","onClick","onMouseDown","onPress","refKey","disabled","ref"];Ua.stateChangeTypes=w5;function Ua(e){e===void 0&&(e={}),kl(e,Ua,l4);var t=ne({},n4,e),o=t.scrollIntoView,a=t.environment,r=t.getA11yStatusMessage,l=Pl(s4,t,u5,f5),n=l[0],i=l[1],s=n.isOpen,u=n.highlightedIndex,d=n.selectedItem,f=n.inputValue,C=c1(null),h=c1(null),p=c1({}),c=c1(null),m=I5(t),b=Mo({state:n,props:t}),g=pe(function(H){return p.current[m.getItemId(H)]},[m]);Vl(r,n,[s,u,d,f],a);var k=c5({menuElement:h.current,highlightedIndex:u,isOpen:s,itemRefs:p,scrollIntoView:o,getItemNodeFromIndex:g});H1(function(){return c.current=X7(function(H){H({type:Rl,inputValue:""})},500),function(){c.current.cancel()}},[]),H1(function(){f&&c.current(i)},[i,f]),Dl({props:t,state:n}),H1(function(){var H=vt(t,"isOpen",Ye);H&&C.current&&C.current.focus()},[]);var v=pe(function(){b.current.state.isOpen&&i({type:Fa})},[i,b]),P=Ut(function(){return[h,C]},[]),V=d5(a,v,P),U=_l("getMenuProps","getToggleButtonProps");H1(function(){s||(p.current={})},[s]);var M=Ut(function(){return{ArrowDown:function(A){A.preventDefault(),i({type:Ol,altKey:A.altKey})},ArrowUp:function(A){A.preventDefault(),i({type:El,altKey:A.altKey})},Home:function(A){A.preventDefault(),i({type:Al})},End:function(A){A.preventDefault(),i({type:Zl})},Escape:function(){b.current.state.isOpen&&i({type:Bl})},Enter:function(A){A.preventDefault(),i({type:b.current.state.isOpen?Fl:Da})},PageUp:function(A){b.current.state.isOpen&&(A.preventDefault(),i({type:Nl}))},PageDown:function(A){b.current.state.isOpen&&(A.preventDefault(),i({type:Ul}))}," ":function(A){A.preventDefault();var F=b.current.state;if(!F.isOpen){i({type:Da});return}F.inputValue?i({type:Za,key:" "}):i({type:$l})}}},[i,b]),_=pe(function(){i({type:h5})},[i]),q=pe(function(){i({type:v5})},[i]),K=pe(function(){i({type:g5})},[i]),W=pe(function(H){i({type:x5,highlightedIndex:H})},[i]),N=pe(function(H){i({type:zl,selectedItem:H})},[i]),E=pe(function(){i({type:L5})},[i]),S=pe(function(H){i({type:Rl,inputValue:H})},[i]),L=pe(function(H){var A=H===void 0?{}:H,F=A.onClick,G=Je(A,f4),B=function(){var Z;(Z=C.current)==null||Z.focus()};return ne({id:m.labelId,htmlFor:m.toggleButtonId,onClick:Ve(F,B)},G)},[m]),x=pe(function(H,A){var F,G=H===void 0?{}:H,B=G.onMouseLeave,$=G.refKey,Z=$===void 0?"ref":$,R=G.ref,oe=Je(G,p4),se=A===void 0?{}:A,ue=se.suppressRefError,y=ue===void 0?!1:ue,D=function(){i({type:C5})};return U("getMenuProps",y,Z,h),ne((F={},F[Z]=E1(R,function(Q){h.current=Q}),F.id=m.menuId,F.role="listbox",F["aria-labelledby"]=oe&&oe["aria-label"]?void 0:""+m.labelId,F.onMouseLeave=Ve(B,D),F),oe)},[i,U,m]),w=pe(function(H,A){var F,G=H===void 0?{}:H,B=G.onBlur,$=G.onClick;G.onPress;var Z=G.onKeyDown,R=G.refKey,oe=R===void 0?"ref":R,se=G.ref,ue=Je(G,C4),y=A===void 0?{}:A,D=y.suppressRefError,Q=D===void 0?!1:D,le=b.current.state,ke=function(){i({type:Da})},X=function(){le.isOpen&&!V.isMouseDown&&i({type:Fa})},Ce=function(ve){var de=Ea(ve);de&&M[de]?M[de](ve):a4(de)&&i({type:Za,key:de})},te=ne((F={},F[oe]=E1(se,function(ge){C.current=ge}),F["aria-activedescendant"]=le.isOpen&&le.highlightedIndex>-1?m.getItemId(le.highlightedIndex):"",F["aria-controls"]=m.menuId,F["aria-expanded"]=b.current.state.isOpen,F["aria-haspopup"]="listbox",F["aria-labelledby"]=ue&&ue["aria-label"]?void 0:""+m.labelId,F.id=m.toggleButtonId,F.role="combobox",F.tabIndex=0,F.onBlur=Ve(B,X),F),ue);return ue.disabled||(te.onClick=Ve($,ke),te.onKeyDown=Ve(Z,Ce)),U("getToggleButtonProps",Q,oe,C),te},[i,m,b,V,U,M]),I=pe(function(H){var A,F=H===void 0?{}:H,G=F.item,B=F.index,$=F.onMouseMove,Z=F.onClick,R=F.onMouseDown;F.onPress;var oe=F.refKey,se=oe===void 0?"ref":oe,ue=F.disabled,y=F.ref,D=Je(F,m4);ue!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useSelect.');var Q=b.current,le=Q.state,ke=Q.props,X=Tl(G,B,ke.items,"Pass either item or index to getItemProps!"),Ce=X[0],te=X[1],ge=ke.isItemDisabled(Ce,te),ve=function(){V.isTouchEnd||te===le.highlightedIndex||(k.current=!1,i({type:m5,index:te,disabled:ge}))},de=function(){i({type:ql,index:te})},xe=function(f1){return f1.preventDefault()},he=ne((A={},A[se]=E1(y,function(He){He&&(p.current[m.getItemId(te)]=He)}),A["aria-disabled"]=ge,A["aria-selected"]=Ce===le.selectedItem,A.id=m.getItemId(te),A.role="option",A),D);return ge||(he.onClick=Ve(Z,de)),he.onMouseMove=Ve($,ve),he.onMouseDown=Ve(R,xe),he},[b,m,V,k,i]);return{getToggleButtonProps:w,getLabelProps:L,getMenuProps:x,getItemProps:I,toggleMenu:_,openMenu:K,closeMenu:q,setHighlightedIndex:W,selectItem:N,reset:E,setInputValue:S,highlightedIndex:u,isOpen:s,selectedItem:d,inputValue:f}}var jl=0,Kl=1,Gl=2,Wl=3,Xl=4,Ql=5,Jl=6,Yl=7,en=8,$a=9,tn=10,y5=11,M5=12,on=13,S5=14,R5=15,k5=16,H5=17,P5=18,an=19,T5=20,V5=21,rn=22,_5=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:rn,FunctionCloseMenu:H5,FunctionOpenMenu:k5,FunctionReset:V5,FunctionSelectItem:an,FunctionSetHighlightedIndex:P5,FunctionSetInputValue:T5,FunctionToggleMenu:R5,InputBlur:$a,InputChange:en,InputClick:tn,InputKeyDownArrowDown:jl,InputKeyDownArrowUp:Kl,InputKeyDownEnd:Xl,InputKeyDownEnter:Yl,InputKeyDownEscape:Gl,InputKeyDownHome:Wl,InputKeyDownPageDown:Jl,InputKeyDownPageUp:Ql,ItemClick:on,ItemMouseMove:M5,MenuMouseLeave:y5,ToggleButtonClick:S5});function h4(e){var t=u5(e),o=t.selectedItem,a=t.inputValue;return a===""&&o&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(a=e.itemToString(o)),ne({},t,{inputValue:a})}var g4=ne({},Io,{items:Y.default.array.isRequired,isItemDisabled:Y.default.func,inputValue:Y.default.string,defaultInputValue:Y.default.string,initialInputValue:Y.default.string,inputId:Y.default.string,onInputValueChange:Y.default.func});function v4(e,t,o,a){var r=c1(),l=s5(e,t,o,a),n=l[0],i=l[1],s=Na();return H1(function(){if(Q7(t,"selectedItem")){if(!s){var u=t.itemToKey(t.selectedItem)!==t.itemToKey(r.current);u&&i({type:rn,inputValue:t.itemToString(t.selectedItem)})}r.current=n.selectedItem===r.current?t.selectedItem:n.selectedItem}},[n.selectedItem,t.selectedItem]),[Oa(n,t),i]}var x4=ne({},yo,{isItemDisabled:function(){return!1}});function L4(e,t,o){var a,r=o.type,l=o.altKey,n;switch(r){case on:n={isOpen:P1(t,"isOpen",Ye),highlightedIndex:Aa(t),selectedItem:t.items[o.index],inputValue:t.itemToString(t.items[o.index])};break;case jl:e.isOpen?n={highlightedIndex:ot(e.highlightedIndex,1,t.items,t.isItemDisabled,!0)}:n={highlightedIndex:l&&e.selectedItem==null?-1:xt(t,e,1),isOpen:t.items.length>=0};break;case Kl:e.isOpen?l?n=Ba(t,e.highlightedIndex):n={highlightedIndex:ot(e.highlightedIndex,-1,t.items,t.isItemDisabled,!0)}:n={highlightedIndex:xt(t,e,-1),isOpen:t.items.length>=0};break;case Yl:n=Ba(t,e.highlightedIndex);break;case Gl:n=ne({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Ql:n={highlightedIndex:ot(e.highlightedIndex,-10,t.items,t.isItemDisabled,!0)};break;case Jl:n={highlightedIndex:ot(e.highlightedIndex,10,t.items,t.isItemDisabled,!0)};break;case Wl:n={highlightedIndex:qt(0,!1,t.items,t.isItemDisabled)};break;case Xl:n={highlightedIndex:qt(t.items.length-1,!0,t.items,t.isItemDisabled)};break;case $a:n=ne({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((a=t.items)==null?void 0:a.length)&&o.selectItem&&{selectedItem:t.items[e.highlightedIndex],inputValue:t.itemToString(t.items[e.highlightedIndex])});break;case en:n={isOpen:!0,highlightedIndex:Aa(t),inputValue:o.inputValue};break;case tn:n={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:xt(t,e,0)};break;case an:n={selectedItem:o.selectedItem,inputValue:t.itemToString(o.selectedItem)};break;case rn:n={inputValue:o.inputValue};break;default:return p5(e,t,o,_5)}return ne({},e,n)}var w4=["onMouseLeave","refKey","ref"],b4=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],I4=["onClick","onPress","refKey","ref"],y4=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];D5.stateChangeTypes=_5;function D5(e){e===void 0&&(e={}),kl(e,D5,g4);var t=ne({},x4,e),o=t.items,a=t.scrollIntoView,r=t.environment,l=t.getA11yStatusMessage,n=v4(L4,t,h4,f5),i=n[0],s=n[1],u=i.isOpen,d=i.highlightedIndex,f=i.selectedItem,C=i.inputValue,h=c1(null),p=c1({}),c=c1(null),m=c1(null),b=Na(),g=I5(t),k=c1(),v=Mo({state:i,props:t}),P=pe(function(B){return p.current[g.getItemId(B)]},[g]);Vl(l,i,[u,d,f,C],r);var V=c5({menuElement:h.current,highlightedIndex:d,isOpen:u,itemRefs:p,scrollIntoView:a,getItemNodeFromIndex:P});Dl({props:t,state:i}),H1(function(){var B=vt(t,"isOpen",Ye);B&&c.current&&c.current.focus()},[]),H1(function(){b||(k.current=o.length)});var U=pe(function(){v.current.state.isOpen&&s({type:$a})},[s,v]),M=Ut(function(){return[h,m,c]},[]),_=d5(r,U,M),q=_l("getInputProps","getMenuProps");H1(function(){u||(p.current={})},[u]),H1(function(){var B;!u||!(r!=null&&r.document)||!(c!=null&&(B=c.current)!=null&&B.focus)||r.document.activeElement!==c.current&&c.current.focus()},[u,r]);var K=Ut(function(){return{ArrowDown:function($){$.preventDefault(),s({type:jl,altKey:$.altKey})},ArrowUp:function($){$.preventDefault(),s({type:Kl,altKey:$.altKey})},Home:function($){v.current.state.isOpen&&($.preventDefault(),s({type:Wl}))},End:function($){v.current.state.isOpen&&($.preventDefault(),s({type:Xl}))},Escape:function($){var Z=v.current.state;(Z.isOpen||Z.inputValue||Z.selectedItem||Z.highlightedIndex>-1)&&($.preventDefault(),s({type:Gl}))},Enter:function($){var Z=v.current.state;!Z.isOpen||$.which===229||($.preventDefault(),s({type:Yl}))},PageUp:function($){v.current.state.isOpen&&($.preventDefault(),s({type:Ql}))},PageDown:function($){v.current.state.isOpen&&($.preventDefault(),s({type:Jl}))}}},[s,v]),W=pe(function(B){return ne({id:g.labelId,htmlFor:g.inputId},B)},[g]),N=pe(function(B,$){var Z,R=B===void 0?{}:B,oe=R.onMouseLeave,se=R.refKey,ue=se===void 0?"ref":se,y=R.ref,D=Je(R,w4),Q=$===void 0?{}:$,le=Q.suppressRefError,ke=le===void 0?!1:le;return q("getMenuProps",ke,ue,h),ne((Z={},Z[ue]=E1(y,function(X){h.current=X}),Z.id=g.menuId,Z.role="listbox",Z["aria-labelledby"]=D&&D["aria-label"]?void 0:""+g.labelId,Z.onMouseLeave=Ve(oe,function(){s({type:y5})}),Z),D)},[s,q,g]),E=pe(function(B){var $,Z,R=B===void 0?{}:B,oe=R.item,se=R.index,ue=R.refKey,y=ue===void 0?"ref":ue,D=R.ref,Q=R.onMouseMove,le=R.onMouseDown,ke=R.onClick;R.onPress;var X=R.disabled,Ce=Je(R,b4);X!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var te=v.current,ge=te.props,ve=te.state,de=Tl(oe,se,ge.items,"Pass either item or index to getItemProps!"),xe=de[0],he=de[1],He=ge.isItemDisabled(xe,he),f1="onClick",A1=ke,w1=function(){_.isTouchEnd||he===ve.highlightedIndex||(V.current=!1,s({type:M5,index:he,disabled:He}))},rt=function(){s({type:on,index:he})},Z1=function(ni){return ni.preventDefault()};return ne(($={},$[y]=E1(D,function(p1){p1&&(p.current[g.getItemId(he)]=p1)}),$["aria-disabled"]=He,$["aria-selected"]=he===ve.highlightedIndex,$.id=g.getItemId(he),$.role="option",$),!He&&(Z={},Z[f1]=Ve(A1,rt),Z),{onMouseMove:Ve(Q,w1),onMouseDown:Ve(le,Z1)},Ce)},[s,g,v,_,V]),S=pe(function(B){var $,Z=B===void 0?{}:B,R=Z.onClick;Z.onPress;var oe=Z.refKey,se=oe===void 0?"ref":oe,ue=Z.ref,y=Je(Z,I4),D=v.current.state,Q=function(){s({type:S5})};return ne(($={},$[se]=E1(ue,function(le){m.current=le}),$["aria-controls"]=g.menuId,$["aria-expanded"]=D.isOpen,$.id=g.toggleButtonId,$.tabIndex=-1,$),!y.disabled&&ne({},{onClick:Ve(R,Q)}),y)},[s,v,g]),L=pe(function(B,$){var Z,R=B===void 0?{}:B,oe=R.onKeyDown,se=R.onChange,ue=R.onInput,y=R.onBlur;R.onChangeText;var D=R.onClick,Q=R.refKey,le=Q===void 0?"ref":Q,ke=R.ref,X=Je(R,y4),Ce=$===void 0?{}:$,te=Ce.suppressRefError,ge=te===void 0?!1:te;q("getInputProps",ge,le,c);var ve=v.current.state,de=function(Z1){var p1=Ea(Z1);p1&&K[p1]&&K[p1](Z1)},xe=function(Z1){s({type:en,inputValue:Z1.target.value})},he=function(Z1){if(r!=null&&r.document&&ve.isOpen&&!_.isMouseDown){var p1=Z1.relatedTarget===null&&r.document.activeElement!==r.document.body;s({type:$a,selectItem:!p1})}},He=function(){s({type:tn})},f1="onChange",A1={};if(!X.disabled){var w1;A1=(w1={},w1[f1]=Ve(se,ue,xe),w1.onKeyDown=Ve(oe,de),w1.onBlur=Ve(y,he),w1.onClick=Ve(D,He),w1)}return ne((Z={},Z[le]=E1(ke,function(rt){c.current=rt}),Z["aria-activedescendant"]=ve.isOpen&&ve.highlightedIndex>-1?g.getItemId(ve.highlightedIndex):"",Z["aria-autocomplete"]="list",Z["aria-controls"]=g.menuId,Z["aria-expanded"]=ve.isOpen,Z["aria-labelledby"]=X&&X["aria-label"]?void 0:g.labelId,Z.autoComplete="off",Z.id=g.inputId,Z.role="combobox",Z.value=ve.inputValue,Z),A1,X)},[s,g,r,K,v,_,q]),x=pe(function(){s({type:R5})},[s]),w=pe(function(){s({type:H5})},[s]),I=pe(function(){s({type:k5})},[s]),H=pe(function(B){s({type:P5,highlightedIndex:B})},[s]),A=pe(function(B){s({type:an,selectedItem:B})},[s]),F=pe(function(B){s({type:T5,inputValue:B})},[s]),G=pe(function(){s({type:V5})},[s]);return{getItemProps:E,getLabelProps:W,getMenuProps:N,getInputProps:L,getToggleButtonProps:S,toggleMenu:x,openMenu:I,closeMenu:w,setHighlightedIndex:H,setInputValue:F,selectItem:A,reset:G,highlightedIndex:d,isOpen:u,selectedItem:f,inputValue:C}}var O5={activeIndex:-1,selectedItems:[]};function o5(e,t){return vt(e,t,O5)}function a5(e,t){return P1(e,t,O5)}function M4(e){var t=o5(e,"activeIndex"),o=o5(e,"selectedItems");return{activeIndex:t,selectedItems:o}}function r5(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0))}function S4(e,t){return e.selectedItems===t.selectedItems&&e.activeIndex===t.activeIndex}var fb={stateReducer:Io.stateReducer,itemToKey:Io.itemToKey,environment:Io.environment,selectedItems:Y.default.array,initialSelectedItems:Y.default.array,defaultSelectedItems:Y.default.array,getA11yStatusMessage:Y.default.func,activeIndex:Y.default.number,initialActiveIndex:Y.default.number,defaultActiveIndex:Y.default.number,onActiveIndexChange:Y.default.func,onSelectedItemsChange:Y.default.func,keyNavigationNext:Y.default.string,keyNavigationPrevious:Y.default.string},R4={itemToKey:yo.itemToKey,stateReducer:yo.stateReducer,environment:yo.environment,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},k4=So,ln=0,nn=1,sn=2,un=3,dn=4,cn=5,fn=6,pn=7,Cn=8,mn=9,hn=10,gn=11,vn=12,H4=Object.freeze({__proto__:null,DropdownClick:pn,DropdownKeyDownBackspace:fn,DropdownKeyDownNavigationPrevious:cn,FunctionAddSelectedItem:Cn,FunctionRemoveSelectedItem:mn,FunctionReset:vn,FunctionSetActiveIndex:gn,FunctionSetSelectedItems:hn,SelectedItemClick:ln,SelectedItemKeyDownBackspace:sn,SelectedItemKeyDownDelete:nn,SelectedItemKeyDownNavigationNext:un,SelectedItemKeyDownNavigationPrevious:dn});function P4(e,t,o){var a=o.type,r=o.index,l=o.selectedItem,n=e.activeIndex,i=e.selectedItems,s;switch(a){case ln:s={activeIndex:r};break;case dn:s={activeIndex:n-1<0?0:n-1};break;case un:s={activeIndex:n+1>=i.length?-1:n+1};break;case sn:case nn:{if(n<0)break;var u=n;i.length===1?u=-1:n===i.length-1&&(u=i.length-2),s=ne({selectedItems:[].concat(i.slice(0,n),i.slice(n+1))},{activeIndex:u});break}case cn:s={activeIndex:i.length-1};break;case fn:s={selectedItems:i.slice(0,i.length-1)};break;case Cn:s={selectedItems:[].concat(i,[l])};break;case pn:s={activeIndex:-1};break;case mn:{var d=n,f=i.findIndex(function(p){return t.itemToKey(p)===t.itemToKey(l)});if(f<0)break;i.length===1?d=-1:f===i.length-1&&(d=i.length-2),s={selectedItems:[].concat(i.slice(0,f),i.slice(f+1)),activeIndex:d};break}case hn:{var C=o.selectedItems;s={selectedItems:C};break}case gn:{var h=o.activeIndex;s={activeIndex:h};break}case vn:s={activeIndex:a5(t,"activeIndex"),selectedItems:a5(t,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return ne({},e,s)}var T4=["refKey","ref","onClick","onKeyDown","selectedItem","index"],V4=["refKey","ref","onKeyDown","onClick","preventKeyAction"];E5.stateChangeTypes=H4;function E5(e){e===void 0&&(e={}),k4(e,E5);var t=ne({},R4,e),o=t.getA11yStatusMessage,a=t.environment,r=t.keyNavigationNext,l=t.keyNavigationPrevious,n=Pl(P4,t,M4,S4),i=n[0],s=n[1],u=i.activeIndex,d=i.selectedItems,f=Na(),C=c1(null),h=c1();h.current=[];var p=Mo({state:i,props:t});Vl(o,i,[u,d],a),H1(function(){f||(u===-1&&C.current?C.current.focus():h.current[u]&&h.current[u].focus())},[u]),Dl({props:t,state:i});var c=_l("getDropdownProps"),m=Ut(function(){var _;return _={},_[l]=function(){s({type:dn})},_[r]=function(){s({type:un})},_.Delete=function(){s({type:nn})},_.Backspace=function(){s({type:sn})},_},[s,r,l]),b=Ut(function(){var _;return _={},_[l]=function(q){r5(q)&&s({type:cn})},_.Backspace=function(K){r5(K)&&s({type:fn})},_},[s,l]),g=pe(function(_){var q,K=_===void 0?{}:_,W=K.refKey,N=W===void 0?"ref":W,E=K.ref,S=K.onClick,L=K.onKeyDown,x=K.selectedItem,w=K.index,I=Je(K,T4),H=p.current.state,A=Tl(x,w,H.selectedItems,"Pass either item or index to getSelectedItemProps!"),F=A[1],G=F>-1&&F===H.activeIndex,B=function(){s({type:ln,index:F})},$=function(R){var oe=Ea(R);oe&&m[oe]&&m[oe](R)};return ne((q={},q[N]=E1(E,function(Z){Z&&h.current.push(Z)}),q.tabIndex=G?0:-1,q.onClick=Ve(S,B),q.onKeyDown=Ve(L,$),q),I)},[s,p,m]),k=pe(function(_,q){var K,W=_===void 0?{}:_,N=W.refKey,E=N===void 0?"ref":N,S=W.ref,L=W.onKeyDown,x=W.onClick,w=W.preventKeyAction,I=w===void 0?!1:w,H=Je(W,V4),A=q===void 0?{}:q,F=A.suppressRefError,G=F===void 0?!1:F;c("getDropdownProps",G,E,C);var B=function(R){var oe=Ea(R);oe&&b[oe]&&b[oe](R)},$=function(){s({type:pn})};return ne((K={},K[E]=E1(S,function(Z){Z&&(C.current=Z)}),K),!I&&{onKeyDown:Ve(L,B),onClick:Ve(x,$)},H)},[s,b,c]),v=pe(function(_){s({type:Cn,selectedItem:_})},[s]),P=pe(function(_){s({type:mn,selectedItem:_})},[s]),V=pe(function(_){s({type:hn,selectedItems:_})},[s]),U=pe(function(_){s({type:gn,activeIndex:_})},[s]),M=pe(function(){s({type:vn})},[s]);return{getSelectedItemProps:g,getDropdownProps:k,addSelectedItem:v,removeSelectedItem:P,setSelectedItems:V,setActiveIndex:U,reset:M,selectedItems:d,activeIndex:u}}var xn=0,Ln=1,wn=2,bn=3,In=4,yn=5,Mn=6,_4=Object.freeze({__proto__:null,FunctionAddItem:Mn,TagClick:xn,TagGroupKeyDownArrowLeft:Ln,TagGroupKeyDownArrowRight:wn,TagGroupKeyDownBackspace:In,TagGroupKeyDownDelete:bn,TagRemoveClick:yn});function D4(e,t,o){var a=o.type,r;switch(a){case xn:r={activeIndex:o.index};break;case Ln:r={activeIndex:e.activeIndex===0?e.items.length-1:e.activeIndex-1};break;case wn:r={activeIndex:e.activeIndex===e.items.length-1?0:e.activeIndex+1};break;case In:case bn:{var l=[].concat(e.items.slice(0,e.activeIndex),e.items.slice(e.activeIndex+1)),n=l.length===0?-1:l.length===e.activeIndex?e.activeIndex-1:e.activeIndex;r={items:[].concat(e.items.slice(0,e.activeIndex),e.items.slice(e.activeIndex+1)),activeIndex:n};break}case yn:{var i=[].concat(e.items.slice(0,o.index),e.items.slice(o.index+1)),s=i.length===0?-1:i.length===o.index?o.index-1:o.index;r={items:i,activeIndex:s}}break;case Mn:{var u=[];o.index===void 0?u=[].concat(e.items,[o.item]):u=[].concat(e.items.slice(0,o.index),[o.item],e.items.slice(o.index));var d=e.activeIndex===-1?u.length-1:e.activeIndex;r={items:u,activeIndex:d};break}default:throw new Error("Invalid useTagGroup reducer action.")}return ne({},e,r)}var O4=ne({},me),B5=O4.useId,E4=typeof B5=="function"?B4:A4;function B4(e){var t=e.id,o=e.tagGroupId,a=e.getTagId,r="downshift-"+B5();t||(t=r);var l=me.useMemo(function(){return{tagGroupId:o??t+"-tag-group",getTagId:a??function(n){return t+"-tag-"+n}}},[a,t,o]);return l}function A4(e){var t=e.id,o=e.getTagId,a=e.tagGroupId,r=me.useRef(t??"downshift-"+l5()),l=r.current,n=me.useMemo(function(){return{tagGroupId:a??l+"-tag-group",getTagId:o??function(i){return l+"-tag-"+i}}},[o,l,a]);return n}function Z4(e){var t,o,a,r,l=(t=(o=e.items)!=null?o:e.initialItems)!=null?t:[],n=(a=(r=e.activeIndex)!=null?r:e.initialActiveIndex)!=null?a:l.length===0?-1:0;return{activeIndex:n,items:l}}function F4(e,t){return e.activeIndex===t.activeIndex&&e.items===t.items}var A5="tag-group-a11y-description";function $4(e,t){me.useEffect(function(){if(e){var o=e.createElement("div");return o.setAttribute("id",A5),o.style.display="none",o.textContent=t,e.body.appendChild(o),function(){o.remove()}}},[t,e])}function N4(e){return ne({stateReducer:function(o,a){var r=a.changes;return r},environment:typeof window>"u"?void 0:window,removeElementDescription:"Press Delete or Backspace to remove tag."},e)}function U4(e,t,o){var a=me.useRef({}),r=me.useRef(e),l=me.useRef(t);return me.useEffect(function(){if(e!==-1&&r.current!==-1&&e!==r.current||l.current===t+1){var n;(n=a.current[o(e)])==null||n.focus()}r.current=e,l.current=t},[e,o,t]),a}var q4={isItemDisabled:Y.default.func},z4=["onKeyDown"],j4=["index","refKey","ref","onClick"],K4=["index","onClick"],Z5=function(t){var o;t===void 0&&(t={}),kl(t,Z5,q4);var a=N4(t),r=Pl(D4,a,Z4,F4),l=r[0],n=r[1],i=l.activeIndex,s=l.items,u=Mo({state:l,props:a}),d=E4({getTagId:a.getTagId,id:a.id,tagGroupId:a.tagGroupId});$4((o=a.environment)==null?void 0:o.document,a.removeElementDescription);var f=U4(i,s.length,d.getTagId),C=pe(function(m){var b=m??{},g=b.onKeyDown,k=Je(b,z4),v=function(U){switch(U.key){case"ArrowLeft":n({type:Ln});break;case"ArrowRight":n({type:wn});break;case"Delete":n({type:bn});break;case"Backspace":n({type:In});break}},P=ne({id:d.tagGroupId,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions",role:"listbox",onKeyDown:Sl(g,v)},k);return P},[n,d.tagGroupId]),h=pe(function(m){var b,g=m.index,k=m.refKey,v=k===void 0?"ref":k,P=m.ref,V=m.onClick,U=Je(m,j4);if(!Number.isInteger(g)||g<0)throw new Error("Pass correct item index to getTagProps!");var M=u.current.state,_=function(){n({type:xn,index:g})},q=d.getTagId(g);return ne((b={"aria-describedby":A5},b[v]=z7(P,function(K){K&&(f.current[q]=K)}),b["aria-labelledby"]=q,b.role="option",b.id=q,b.onClick=Sl(V,_),b.tabIndex=M.activeIndex===g?0:-1,b),U)},[n,d,u,f]),p=pe(function(m){var b=m.index,g=m.onClick,k=Je(m,K4);if(!Number.isInteger(b)||b<0)throw new Error("Pass correct item index to getTagRemoveProps!");var v=function(M){M.stopPropagation(),n({type:yn,index:b})},P=d.getTagId(b),V=P+"-remove";return ne({id:V,tabIndex:-1,"aria-labelledby":V+" "+P,onClick:Sl(g,v)},k)},[d,n]),c=pe(function(m,b){n({type:Mn,item:m,index:b})},[n]);return{activeIndex:i,addItem:c,getTagGroupProps:C,getTagProps:h,getTagRemoveProps:p,items:s}};Z5.stateChangeTypes=_4;import zt from"react";import{createPortal as G4}from"react-dom";import{jsx as B1,jsxs as F5}from"react/jsx-runtime";var W4=260,qa=4,X4=B1(Yn,{width:9,height:9}),Q4=B1(e9,{width:9,height:9}),J4={ariaReset:"Reset {0} to default"};function Y4(e){let t=e.getBoundingClientRect(),o=ft(e),a=o?o.getBoundingClientRect():{top:0,bottom:window.innerHeight},r=a.bottom-t.bottom-qa,l=t.top-a.top-qa,n=r<W4&&l>r;return{top:n?t.top-qa:t.bottom+qa,left:t.left,width:t.width,openAbove:n}}function jt({label:e,options:t,selectedItem:o,onChange:a,id:r="picklist",getOptionStyle:l,triggerLabel:n,triggerMuted:i=!1,triggerStyle:s,aria:u}){let[d,f]=zt.useState({top:0,left:0,width:0,openAbove:!1}),C=zt.useRef(null),h=`${r}-legend`,p=e1(J4,u),c=Pe(p.ariaReset,[e]),m=zt.useMemo(()=>t.filter(N=>N.value!==""),[t]),b=o!=null,g=()=>{C.current?.focus(),a("")},{isOpen:k,closeMenu:v,highlightedIndex:P,getToggleButtonProps:V,getMenuProps:U,getItemProps:M}=Ua({items:m,itemToString:N=>N?N.label:"",selectedItem:o,onSelectedItemChange:({selectedItem:N})=>{typeof a=="function"&&N&&N.value!==o?.value&&a(N.value)},onIsOpenChange:({isOpen:N})=>{N&&C.current&&f(Y4(C.current))},id:r,labelId:h});zt.useEffect(()=>{if(!k||!C.current)return;let N=ft(C.current);if(!N)return;let E=()=>v();return N.addEventListener("scroll",E,{passive:!0}),()=>N.removeEventListener("scroll",E)},[k,v]);let _="picklistEditor-dropdown"+(k?" picklistEditor-dropdown--open":""),q=k?{top:d.top,left:d.left,width:d.width,...d.openAbove?{transform:"translateY(-100%)"}:void 0}:void 0,[K,W]=zt.useState(null);return zt.useLayoutEffect(()=>{let E=C.current?.getRootNode();W(E instanceof ShadowRoot?E:document.body)},[]),B1(l1,{label:e,id:r,className:"picklistEditor-fieldset",children:F5("div",{className:"picklistEditor-wrapper",children:[F5("button",{type:"button",className:"picklistEditor-trigger",style:s,...V({ref:C}),children:[B1("span",{className:"picklistEditor-trigger-label"+(i?" picklistEditor-trigger-label--muted":""),children:n??o?.label??"Default"}),B1("span",{className:"picklistEditor-trigger-chevron","aria-hidden":"true",children:k?Q4:X4})]}),b&&B1("button",{type:"button",className:"picklistEditor-reset",onClick:g,"aria-label":c,title:c,children:B1(Kn,{width:14,height:14})}),G4(B1("ul",{className:_,style:q,...U(),children:k&&m.map((N,E)=>B1("li",{className:"picklistEditor-option"+(P===E?" picklistEditor-option--highlighted":"")+(o?.value===N.value?" picklistEditor-option--selected":""),style:l?l(N):void 0,...M({item:N,index:E}),children:N.label},N.value))}),K??document.body)]})})}import{jsx as a8}from"react/jsx-runtime";var e8=[{value:"Arial, sans-serif",label:"Arial"},{value:"Helvetica, sans-serif",label:"Helvetica"},{value:"Verdana, sans-serif",label:"Verdana"},{value:"Tahoma, sans-serif",label:"Tahoma"},{value:"'Trebuchet MS', sans-serif",label:"Trebuchet MS"},{value:"'Lucida Sans Unicode', sans-serif",label:"Lucida Sans"},{value:"Georgia, serif",label:"Georgia"},{value:"'Times New Roman', serif",label:"Times New Roman"},{value:"'Palatino Linotype', serif",label:"Palatino"},{value:"'Courier New', monospace",label:"Courier New"},{value:"'Lucida Console', monospace",label:"Lucida Console"}];function $5(e){return(e.split(",")[0]??"").trim().replace(/['"]/g,"")}function t8(e,t){if(!e)return null;let o=e.replace(/['"]/g,""),a=$5(e);for(let r of t){if(!r.value)continue;let l=r.value.replace(/['"]/g,"");if(o.indexOf(l)!==-1||l.indexOf(a)!==-1)return r}return null}var o8=e=>e.value?{fontFamily:e.value}:void 0;function N5({label:e="Font family",value:t,computedValue:o,options:a,onChange:r,matchOption:l=t8,id:n="font-family",aria:i}){let s=a??e8,u=l(t,s),d=t||o,f=l(d,s),C=!u,h;return f?h=f.label:d&&(h=$5(d)||void 0),a8(jt,{label:e,options:s,selectedItem:u,triggerLabel:h,triggerMuted:C,triggerStyle:d?{fontFamily:d}:void 0,onChange:r,id:n,getOptionStyle:o8,aria:i})}import{jsx as Sn}from"react/jsx-runtime";var r8=[{value:"normal",labelKey:"normal",defaultLabel:"Normal",icon:Sn(En,{width:14,height:14})},{value:"italic",labelKey:"italic",defaultLabel:"Italic",icon:Sn(On,{width:14,height:14})}];function U5({label:e="Font Style",value:t,onChange:o,id:a="font-style",optionLabels:r}){let l=r8.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return Sn(b1,{label:e,options:l,value:t||"normal",onChange:o,id:a})}import{jsx as s8}from"react/jsx-runtime";var l8=[{value:"100",labelKey:"thin",defaultWord:"Thin"},{value:"200",labelKey:"extraLight",defaultWord:"Extra Light"},{value:"300",labelKey:"light",defaultWord:"Light"},{value:"400",labelKey:"regular",defaultWord:"Regular"},{value:"500",labelKey:"medium",defaultWord:"Medium"},{value:"600",labelKey:"semiBold",defaultWord:"Semi Bold"},{value:"700",labelKey:"bold",defaultWord:"Bold"},{value:"800",labelKey:"extraBold",defaultWord:"Extra Bold"},{value:"900",labelKey:"black",defaultWord:"Black"}];function n8(e){return l8.map(t=>{let o=e?.[t.labelKey]??t.defaultWord;return{value:t.value,label:`${o} (${t.value})`}})}function i8(e,t){if(!e)return null;let o=String(e).trim();return t.find(a=>a.value===o)??null}function q5({label:e="Font weight",value:t,computedValue:o,options:a,onChange:r,matchOption:l=i8,id:n="font-weight",optionLabels:i,aria:s}){let u=a??n8(i),d=l(t,u),f=l(t||o,u),C=!d,h=f?.label;return s8(jt,{label:e,options:u,selectedItem:d,triggerLabel:h,triggerMuted:C,onChange:r,id:n,aria:s})}import ie from"react";import{createPortal as u8}from"react-dom";import{jsx as re,jsxs as Fe}from"react/jsx-runtime";var d8={tabCms:"CMS",tabLocal:"Local",tabUrl:"URL",ariaTablist:"Image source",clearImage:"Clear image",chooseFile:"Choose File...",ariaChooseFile:"Choose an image file from your computer",useThisImage:"Use This Image",ariaImageUrl:"Image URL",urlPlaceholder:"https://example.com/image.png",previewAlt:"Preview",altText:"Alt Text",altPlaceholder:"Describe the image",width:"Width",height:"Height",autoPlaceholder:"auto",workspace:"Workspace",selectWorkspace:"Select a workspace...",selectImage:"Select an Image",loadingWorkspaces:"Loading workspaces...",noWorkspaces:"No CMS workspaces found",loadingImages:"Loading images...",noImages:"No images in this workspace",loadingMore:"Loading more...",untitled:"Untitled",downloadingImage:"Downloading image...",downloadFailed:"Download failed",closePicker:"Close",cancel:"Cancel",done:"Done",pickerTitle:"Select an image from {0}",pickerError:"Error: {0}"},Kt=["cms","local","url"];function c8({labels:e,workspaceName:t,folderId:o,portalTarget:a,folderItemsResult:r,contentDetail:l,thumbnailResult:n,onFetchFolderItems:i,onFetchContentDetail:s,onFetchThumbnail:u,onCancel:d,onConfirm:f}){let[C,h]=ie.useState([]),[p,c]=ie.useState(0),[m,b]=ie.useState(!0),[g,k]=ie.useState(!1),[v,P]=ie.useState(null),[V,U]=ie.useState(null),[M,_]=ie.useState({}),[q,K]=ie.useState({}),W=ie.useRef(new Set),N=ie.useRef(new Set),E=ie.useCallback(I=>{g||typeof i=="function"&&(k(!0),P(null),i(o,I,20))},[o,g,i]);ie.useEffect(()=>{E(0)},[o]),ie.useEffect(()=>{let I=H=>{H.key==="Escape"&&(H.stopPropagation(),d())};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[d]);let S=ie.useRef(null);ie.useEffect(()=>{S.current?.focus()},[]),ie.useEffect(()=>{if(!r)return;let I=(r.items??[]).map(H=>({contentKey:H.contentKey,title:H.title??e.untitled,mimeType:H.mimeType??"image/png"}));h(H=>r.page===0?I:[...H,...I]),b(!!r.hasMore),c(r.page??0),k(!1),r.error&&P(String(r.error))},[r]),ie.useEffect(()=>{if(!l)return;let I=l.contentKey;if(!I||l.error)return;let H=l.url??"",A=l.mimeType??"image/png",F=l.title??"";_(G=>G[I]?G:{...G,[I]:{url:H,mimeType:A,title:F}}),H&&!N.current.has(I)&&typeof u=="function"&&(N.current.add(I),u(I,H,A))},[l,u]),ie.useEffect(()=>{if(!n)return;let{imageId:I,thumbnailUrl:H}=n;I&&H&&K(A=>({...A,[I]:H}))},[n]);let L=ie.useRef(null);ie.useEffect(()=>{let I=L.current;if(!I||!m||g)return;let H=new IntersectionObserver(A=>{A.some(G=>G.isIntersecting)&&E(p+1)});return H.observe(I),()=>H.disconnect()},[m,g,p,E]);let x=ie.useCallback(I=>{W.current.has(I)||typeof s=="function"&&(W.current.add(I),s(I))},[s]),w=()=>{if(!V)return;let I=M[V],H=C.find(A=>A.contentKey===V);!I||!H||f({contentKey:V,title:H.title,url:I.url,mimeType:I.mimeType||H.mimeType})};return u8(re("div",{ref:S,tabIndex:-1,className:"cmsPicker-overlay",role:"dialog","aria-modal":"true","aria-label":Pe(e.pickerTitle,[t]),onClick:I=>{I.target===I.currentTarget&&d()},children:Fe("div",{className:"cmsPicker-dialog",children:[Fe("div",{className:"cmsPicker-header",children:[re("span",{className:"cmsPicker-title",children:Pe(e.pickerTitle,[t])}),re("button",{type:"button",className:"cmsPicker-close",onClick:d,"aria-label":e.closePicker,title:e.closePicker,children:"\u2715"})]}),Fe("div",{className:"cmsPicker-body",children:[C.length===0&&g&&re("div",{className:"cmsPicker-empty",children:e.loadingImages}),C.length===0&&!g&&!v&&re("div",{className:"cmsPicker-empty",children:e.noImages}),v&&re("div",{className:"cmsPicker-empty",children:Pe(e.pickerError,[v])}),Fe("div",{className:"cmsPicker-grid",children:[C.map(I=>re(f8,{item:I,selected:V===I.contentKey,thumbnailDataUrl:q[I.contentKey],onIntersect:()=>x(I.contentKey),onClick:()=>U(I.contentKey)},I.contentKey)),m&&re("div",{className:"cmsPicker-sentinel",ref:L,children:g?e.loadingMore:""})]})]}),Fe("div",{className:"cmsPicker-footer",children:[re("button",{type:"button",className:"cmsPicker-btn",onClick:d,children:e.cancel}),re("button",{type:"button",className:"cmsPicker-btn cmsPicker-btn--primary",disabled:!V||!M[V??""],onClick:w,children:e.done})]})]})}),a)}function f8({item:e,selected:t,thumbnailDataUrl:o,onIntersect:a,onClick:r}){let l=ie.useRef(null),n=ie.useRef(!1);return ie.useEffect(()=>{let i=l.current;if(!i||n.current)return;let s=new IntersectionObserver(u=>{u.some(f=>f.isIntersecting)&&!n.current&&(n.current=!0,a(),s.disconnect())});return s.observe(i),()=>s.disconnect()},[a]),Fe("button",{ref:l,type:"button",className:`cmsPicker-thumb${t?" cmsPicker-thumb--selected":""}`,onClick:r,title:e.title,"aria-pressed":t,children:[re("div",{className:"cmsPicker-thumb-img",children:o?re("img",{src:o,alt:e.title}):re("div",{className:"cmsPicker-thumb-placeholder","aria-hidden":"true",children:"\u2026"})}),re("span",{className:"cmsPicker-thumb-label",children:e.title})]})}function p8({labels:e,spaces:t,spacesLoading:o,selectedSpaceId:a,onSpaceSelect:r,onOpenPicker:l}){return o?re("div",{className:"imageEditor-cms",children:re("div",{className:"imageEditor-cms-loading",children:e.loadingWorkspaces})}):t.length===0?re("div",{className:"imageEditor-cms",children:re("div",{className:"imageEditor-cms-empty",children:e.noWorkspaces})}):Fe("div",{className:"imageEditor-cms",children:[Fe("div",{className:"imageEditor-cms-channel",children:[re("label",{className:"imageEditor-cms-channel-label",htmlFor:"cms-space-select",children:e.workspace}),Fe("select",{id:"cms-space-select",className:"imageEditor-input imageEditor-cms-channel-select",value:a,onChange:n=>r(n.target.value),children:[re("option",{value:"",children:e.selectWorkspace}),t.map(n=>re("option",{value:n.id,children:n.name},n.id))]})]}),re("button",{type:"button",className:"imageEditor-cms-pick-btn",onClick:l,disabled:!a,children:e.selectImage})]})}function C8({labels:e,preview:t,onPick:o,onApply:a}){return Fe("div",{className:"imageEditor-local",children:[re("button",{className:"imageEditor-local-pick",onClick:o,type:"button","aria-label":e.ariaChooseFile,"aria-haspopup":"dialog",children:e.chooseFile}),t&&Fe("div",{className:"imageEditor-local-preview",children:[re("img",{src:t.webviewUri,alt:t.fileName,className:"imageEditor-preview-thumb"}),re("span",{className:"imageEditor-local-filename",children:t.fileName}),re("button",{className:"imageEditor-local-apply",onClick:()=>a(t.devUrl||t.webviewUri),type:"button",children:e.useThisImage})]})]})}function z5({src:e,alt:t,className:o}){let[a,r]=ie.useState(!1);return ie.useEffect(()=>{r(!1)},[e]),a?null:re("img",{src:e,alt:t,className:o,onError:()=>r(!0)})}function m8({labels:e,input:t,onInputChange:o,onApply:a,currentUrl:r}){return Fe("div",{className:"imageEditor-url",children:[re("input",{type:"text",value:t,"aria-label":e.ariaImageUrl,placeholder:e.urlPlaceholder,className:"imageEditor-input",onChange:l=>o(l.target.value),onKeyDown:l=>{l.key==="Enter"&&t&&a(t)},onBlur:()=>{t&&t!==r&&a(t)}}),t&&re("div",{className:"imageEditor-url-preview",children:re(z5,{src:t,alt:e.previewAlt,className:"imageEditor-preview-thumb"})})]})}function Rn({id:e,label:t,value:o,type:a,inputMode:r,placeholder:l,onCommit:n}){let[i,s]=ie.useState(o),u=ie.useRef(n);u.current=n;let d=ie.useRef(o);ie.useEffect(()=>{o!==d.current&&(d.current=o,s(o))},[o]);let f=()=>{i!==o&&(d.current=i,u.current(i))};return Fe("div",{className:"imageEditor-attr",children:[re("label",{className:"imageEditor-attr-label",htmlFor:e,children:t}),re("input",{id:e,type:a,inputMode:r,value:i,placeholder:l,className:"imageEditor-input",onChange:C=>s(C.target.value),onKeyDown:C=>{C.key==="Enter"&&f()},onBlur:f})]})}function h8({labels:e,attributes:t,onAttributeChange:o}){return Fe("div",{className:"imageEditor-attrs",children:[re(Rn,{id:"design-img-alt",label:e.altText,type:"text",value:t.alt,placeholder:e.altPlaceholder,onCommit:a=>o("alt",a)}),Fe("div",{className:"imageEditor-attrs-row",children:[re(Rn,{id:"design-img-width",label:e.width,type:"number",inputMode:"numeric",value:t.width,placeholder:e.autoPlaceholder,onCommit:a=>o("width",a)}),re(Rn,{id:"design-img-height",label:e.height,type:"number",inputMode:"numeric",value:t.height,placeholder:e.autoPlaceholder,onCommit:a=>o("height",a)})]})]})}function j5({label:e,value:t,onChange:o,id:a="image",attributes:r,onAttributeChange:l,cmsSpaces:n,cmsSpacesLoading:i,onFetchCmsSpaces:s,cmsFolderItemsResult:u,onFetchCmsFolderItems:d,cmsContentDetail:f,onFetchCmsContentDetail:C,cmsThumbnailResult:h,onFetchCmsThumbnail:p,onImportCmsImage:c,cmsImportResult:m,onPickLocalFile:b,localPreview:g,imageLabels:k}){let v=e1(d8,k),P={cms:v.tabCms,local:v.tabLocal,url:v.tabUrl},[V,U]=ie.useState("cms"),[M,_]=ie.useState(""),[q,K]=ie.useState(!1),[W,N]=ie.useState(""),[E,S]=ie.useState("idle"),L=ie.useRef(null),x=ie.useRef(null),w=ie.useCallback(()=>{let R=x.current?.getRootNode();return R instanceof ShadowRoot?R:document.body},[]),I=ie.useRef({}),H=ie.useCallback(R=>{U(R),I.current[R]?.focus()},[]),A=ie.useCallback((R,oe)=>{let se=null;switch(R.key){case"ArrowRight":se=(oe+1)%Kt.length;break;case"ArrowLeft":se=(oe-1+Kt.length)%Kt.length;break;case"Home":se=0;break;case"End":se=Kt.length-1;break;default:return}R.preventDefault();let ue=Kt[se];ue&&H(ue)},[H]),F=n??[],G=i??!1,B=t||"";ie.useEffect(()=>{if(m)if(m.success&&m.devUrl)o(m.devUrl),S("success");else{let R=L.current?.url;R?(o(R),S("success")):S("error")}},[m,o]),ie.useEffect(()=>{V==="cms"&&F.length===0&&!G&&typeof s=="function"&&s()},[V]);let $=ie.useMemo(()=>F.find(R=>R.id===M)??null,[F,M]),Z=ie.useCallback(R=>{let oe={id:R.contentKey,title:R.title,url:R.url,thumbnailUrl:"",contentType:R.mimeType};L.current=oe,K(!1),typeof c=="function"&&oe.url?(S("importing"),c(oe)):oe.url&&o(oe.url)},[o,c]);return re(l1,{label:e,id:a,className:"imageEditor-fieldset",children:Fe("div",{ref:x,className:"imageEditor-root",children:[B&&Fe("div",{className:"imageEditor-current",children:[re(z5,{src:B,alt:"",className:"imageEditor-current-thumb"}),re("span",{className:"imageEditor-current-url",title:B,children:B.length>30?`...${B.slice(-30)}`:B}),re("button",{className:"imageEditor-clear",onClick:()=>o(""),title:v.clearImage,"aria-label":v.clearImage,type:"button",children:"\u2715"})]}),re("div",{className:"imageEditor-tabs",role:"tablist","aria-label":v.ariaTablist,children:Kt.map((R,oe)=>re("button",{id:`${a}-tab-${R}`,ref:se=>{I.current[R]=se},role:"tab",type:"button","aria-selected":V===R,"aria-controls":`${a}-tabpanel`,tabIndex:V===R?0:-1,className:`imageEditor-tab${V===R?" imageEditor-tab--active":""}`,onClick:()=>U(R),onKeyDown:se=>A(se,oe),children:P[R]},R))}),Fe("div",{className:"imageEditor-tab-content",role:"tabpanel",id:`${a}-tabpanel`,"aria-labelledby":`${a}-tab-${V}`,children:[V==="cms"&&re(p8,{labels:v,spaces:F,spacesLoading:G,selectedSpaceId:M,onSpaceSelect:_,onOpenPicker:()=>K(!0)}),V==="cms"&&E==="importing"&&re("div",{className:"imageEditor-cms-loading",children:v.downloadingImage}),V==="cms"&&E==="error"&&re("div",{className:"imageEditor-cms-empty",children:v.downloadFailed}),V==="local"&&re(C8,{labels:v,preview:g,onPick:()=>b?.(),onApply:R=>o(R)}),V==="url"&&re(m8,{labels:v,input:W,onInputChange:N,onApply:o,currentUrl:B})]}),r&&l&&re(h8,{labels:v,attributes:r,onAttributeChange:l}),q&&$&&re(c8,{labels:v,workspaceName:$.name,folderId:$.rootFolderId,portalTarget:w(),folderItemsResult:u,contentDetail:f,thumbnailResult:h,onFetchFolderItems:d,onFetchContentDetail:C,onFetchThumbnail:p,onCancel:()=>K(!1),onConfirm:Z})]})})}import{jsx as x8}from"react/jsx-runtime";var g8=[{value:"visible",labelKey:"visible",defaultLabel:"Visible"},{value:"hidden",labelKey:"hidden",defaultLabel:"Hidden"},{value:"scroll",labelKey:"scroll",defaultLabel:"Scroll"},{value:"auto",labelKey:"auto",defaultLabel:"Auto"}];function v8(e){return g8.map(t=>({value:t.value,label:e?.[t.labelKey]??t.defaultLabel}))}function K5(e,t){if(!e)return null;let o=String(e).trim().toLowerCase();return t.find(a=>a.value===o)??null}function G5({label:e="Overflow",value:t,computedValue:o,onChange:a,id:r="overflow",optionLabels:l,aria:n}){let i=v8(l),s=K5(t,i),u=K5(t||o,i),d=!s,f=u?.label;return x8(jt,{label:e,options:i,selectedItem:s,triggerLabel:f,triggerMuted:d,onChange:a,id:r,aria:n})}import{jsx as Ro}from"react/jsx-runtime";var L8=[{value:"left",labelKey:"left",defaultLabel:"Left",icon:Ro(Qn,{width:14,height:14})},{value:"center",labelKey:"center",defaultLabel:"Center",icon:Ro(Wn,{width:14,height:14})},{value:"right",labelKey:"right",defaultLabel:"Right",icon:Ro(Jn,{width:14,height:14})},{value:"justify",labelKey:"justify",defaultLabel:"Justify",icon:Ro(Xn,{width:14,height:14})}],w8={start:"left",end:"right"};function W5({label:e="Text Align",value:t,onChange:o,id:a="text-align",optionLabels:r}){let l=w8[t||""]||t||"left",n=L8.map(i=>({value:i.value,label:r?.[i.labelKey]??i.defaultLabel,icon:i.icon}));return Ro(b1,{label:e,options:n,value:l,onChange:o,id:a})}import{jsx as za}from"react/jsx-runtime";var X5=[{value:"none",labelKey:"none",defaultLabel:"None",icon:za(F1,{width:14,height:14})},{value:"underline",labelKey:"underline",defaultLabel:"Underline",icon:za(t9,{width:14,height:14})},{value:"line-through",labelKey:"lineThrough",defaultLabel:"Line Through",icon:za(Gn,{width:14,height:14})}];function b8(e){if(!e)return"none";for(let t of X5)if(e===t.value||e.startsWith(t.value+" "))return t.value;return"none"}function Q5({label:e="Text Decoration",value:t,onChange:o,id:a="text-decoration",optionLabels:r}){let l=X5.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return za(b1,{label:e,options:l,value:b8(t),onChange:o,id:a})}import{jsx as ko}from"react/jsx-runtime";var I8=[{value:"none",labelKey:"none",defaultLabel:"None",icon:ko(F1,{width:14,height:14})},{value:"uppercase",labelKey:"uppercase",defaultLabel:"Uppercase",icon:ko(Nn,{width:14,height:14})},{value:"lowercase",labelKey:"lowercase",defaultLabel:"Lowercase",icon:ko($n,{width:14,height:14})},{value:"capitalize",labelKey:"capitalize",defaultLabel:"Capitalize",icon:ko(Fn,{width:14,height:14})}];function J5({label:e="Text Transform",value:t,onChange:o,id:a="text-transform",optionLabels:r}){let l=I8.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return ko(b1,{label:e,options:l,value:t||"none",onChange:o,id:a})}var Y5="textContent";var y8=e=>e!=null&&typeof e=="object"&&"property"in e,M8=e=>typeof e?.sourceFile=="string"&&e.sourceFile!==""&&e.lineNumber!=null&&e.columnNumber!=null?{sourceFile:e.sourceFile,lineNumber:e.lineNumber,columnNumber:e.columnNumber}:void 0;function ei(e){let t=[],o=new Map,a=l=>{let n=M8(l);if(!n)return;let{sourceFile:i,lineNumber:s,columnNumber:u}=n,d=`${i}\0${s}:${u}`,f=o.get(d);return f||(f={byProperty:new Map,baselineByProperty:new Map,debugSource:n},o.set(d,f),t.push(f)),f},r=(l,n,i)=>{l.baselineByProperty.has(n)||l.baselineByProperty.set(n,String(i??""))};for(let l of e){let n=l.data;if(l.type==="style"&&n?.property!=null){let i=a(n);if(i){let s=String(n.property);r(i,s,l.oldValue),i.byProperty.set(s,String(l.newValue??""))}}else if(l.type==="style-batch"&&Array.isArray(n?.changes)){let i=a(n);for(let s of n.changes)if(i&&y8(s)&&s.property!=null){let u=String(s.property);r(i,u,s.oldValue),i.byProperty.set(u,String(s.newValue??""))}}else l.type==="text"&&a(n)?.byProperty.set(Y5,String(l.newValue??""))}return t.map(l=>{let n=[...l.byProperty].map(([i,s])=>({property:i,value:s})).filter(i=>i.property===Y5||i.value!==""||l.baselineByProperty.get(i.property)!=="");return{debugSource:l.debugSource,commands:n}}).filter(l=>l.commands.length>0)}var at={CHANGED:"history-changed",COMMAND_PUSHED:"command-pushed",COMMAND_UNDONE:"command-undone",COMMAND_REDONE:"command-redone",CLEARED:"history-cleared"},ja=class{constructor(t={}){lt(this,"undoStack",[]);lt(this,"redoStack",[]);lt(this,"maxHistorySize");lt(this,"listeners",new Set);lt(this,"_isProcessing",!1);lt(this,"commandExecutor");if(this.maxHistorySize=t.maxHistorySize??200,!t.commandExecutor)throw new Error("CommandExecutor is required");this.commandExecutor=t.commandExecutor}createCommand(t,o,a,r){return Object.freeze({id:this._generateCommandId(),type:t,oldValue:o,newValue:a,data:r})}_generateCommandId(){return`cmd-${Date.now()}-${Math.random().toString(36).substr(2,9)}`}subscribe(t){if(typeof t!="function")throw new Error("Listener must be a function");return this.listeners.add(t),()=>{this.listeners.delete(t)}}_notify(t,o={}){if(this.listeners.size===0)return;let a=Object.freeze({type:t,timestamp:Date.now(),canUndo:this.canUndo(),canRedo:this.canRedo(),undoCount:this.getUndoCount(),redoCount:this.getRedoCount(),...o}),r=Array.from(this.listeners);for(let l of r)try{l(a)}catch(n){console.error("[HistoryManager] Error in listener:",n)}}pushCommand(t){if(!t||typeof t!="object")throw new Error("Invalid command: must be an object");if(!t.type)throw new Error("Invalid command: missing required fields (type)");if(this._isProcessing){console.warn("[HistoryManager] pushCommand called during processing, ignoring");return}this.undoStack.length>=this.maxHistorySize||(this.undoStack.push(t),this.redoStack=[],this._notify(at.COMMAND_PUSHED,{command:t}),this._notify(at.CHANGED))}_trimStack(){if(this.undoStack.length>this.maxHistorySize){let t=this.undoStack.length-this.maxHistorySize;this.undoStack.splice(0,t)}}_applyCommand(t,o){if(!this.commandExecutor.canHandle(t.type))return console.warn("[HistoryManager] No executor for command type:",t.type),!1;try{return this.commandExecutor.execute(t,o)}catch(a){return console.error("[HistoryManager] Error applying command:",a,t),!1}}_createInverseCommand(t,o){let a=this.commandExecutor.getCurrentValue(t);return Object.freeze({id:this._generateCommandId(),type:t.type,oldValue:o?t.oldValue:a,newValue:o?a:t.newValue,data:t.data})}undo(){if(this._isProcessing)return console.warn("[HistoryManager] undo called during processing, ignoring"),!1;if(!this.canUndo())return!1;this._isProcessing=!0;try{let t=this.undoStack.pop(),o=this._applyCommand(t,!0);if(o){let a=this._createInverseCommand(t,!1);this.redoStack.push(a)}else this.undoStack.push(t),console.warn("[HistoryManager] Undo failed, command restored to stack");return this._notify(at.COMMAND_UNDONE,{command:t,appliedValue:t.oldValue}),this._notify(at.CHANGED),o}finally{this._isProcessing=!1}}redo(){if(this._isProcessing)return console.warn("[HistoryManager] redo called during processing, ignoring"),!1;if(!this.canRedo())return!1;this._isProcessing=!0;try{let t=this.redoStack.pop();if(!t)return console.warn("[HistoryManager] No command to redo"),!1;let o=this._applyCommand(t,!1);if(o){let a=this._createInverseCommand(t,!0);this.undoStack.push(a),this._trimStack()}else this.redoStack.push(t),console.warn("[HistoryManager] Redo failed, command restored to stack");return this._notify(at.COMMAND_REDONE,{command:t,appliedValue:t.newValue}),this._notify(at.CHANGED),o}finally{this._isProcessing=!1}}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}clear(){this.undoStack=[],this.redoStack=[],this._notify(at.CLEARED),this._notify(at.CHANGED)}getUndoCount(){return this.undoStack.length}getMaxHistorySize(){return this.maxHistorySize}getRedoCount(){return this.redoStack.length}getUndoStackSnapshot(){return this.undoStack.map(t=>({type:t.type,oldValue:t.oldValue,newValue:t.newValue,data:t.data}))}};var S8=(e,t)=>{let o=t?e.oldValue:e.newValue;return typeof o=="string"?o:String(o??"")},Ka=e=>{if(!e||typeof e!="object")return;let t=e;if(!(typeof t.sourceFile!="string"||typeof t.lineNumber!="number"||typeof t.columnNumber!="number"))return{sourceFile:t.sourceFile,lineNumber:t.lineNumber,columnNumber:t.columnNumber}},R8=e=>typeof e=="object"&&e!==null&&"property"in e&&typeof e.property=="string",k8=e=>typeof e=="object"&&e!==null&&Array.isArray(e.changes)&&e.changes.every(t=>t!=null&&typeof t.property=="string"),H8=e=>typeof e=="object"&&e!==null&&"tag"in e&&typeof e.tag=="string"&&"attribute"in e&&typeof e.attribute=="string",ti=(e,t,o)=>{let a=new Map;return{execute:(r,l)=>{let n=S8(r,l);a.set(r.id,n);try{if(r.type==="style"&&R8(r.data)){let i=Ka(r.data);return e(r.data.property,n,i),!0}else if(r.type==="style-batch"&&k8(r.data)){let i=Ka(r.data);for(let s of r.data.changes)e(s.property,l?s.oldValue:s.newValue,i);return!0}else if(r.type==="text"){let i=Ka(r.data);return t(n,i),!0}else if(r.type==="media"&&H8(r.data)){if(!o)return!1;let i=Ka(r.data);return o(r.data.tag,{[r.data.attribute]:n},i),!0}}catch{return!1}return!1},getCurrentValue:r=>a.get(r.id)??r.newValue,canHandle:r=>r==="style"||r==="style-batch"||r==="text"||r==="media"&&typeof o=="function"}};function oi(e,t,o){let a=ti(e,t,o),r=new ja({commandExecutor:a});return{recordStyleChange(l,n,i,s){let u=r.createCommand("style",n,i,{...s,property:l});r.pushCommand(u)},recordStyleBatch(l,n){if(l.length===0)return;let i=l[0],s=r.createCommand("style-batch",i.oldValue,i.newValue,{...n,changes:l});r.pushCommand(s)},recordTextChange(l,n,i){let s=r.createCommand("text",l,n,{...i});r.pushCommand(s)},recordMediaChange(l,n,i,s,u){let d=r.createCommand("media",i,s,{...u,tag:l,attribute:n});r.pushCommand(d)},undo:()=>r.undo(),redo:()=>r.redo(),canUndo:()=>r.canUndo(),canRedo:()=>r.canRedo(),subscribe:l=>r.subscribe(l),getHistoryStack:()=>r.getUndoStackSnapshot(),clear:()=>r.clear(),getUndoCount:()=>r.getUndoCount(),getMaxHistorySize:()=>r.getMaxHistorySize()}}var P8=e=>{let t=e.trim().toLowerCase();return t===""||t==="none"};function ai(e,t,o,a){if(e!=="backgroundColor")return[];if(t.trim()==="")return[];let r=(a??"").trim();if(r.toLowerCase()==="none")return[];let l=r||(o??"");return P8(l)?[]:[{property:"backgroundImage",oldValue:l,newValue:"none"}]}import{Fragment as z8,jsx as ee,jsxs as $e}from"react/jsx-runtime";var V8="This element's text can be edited inline.",_8="This element's text cannot be edited inline because it contains dynamic content.",D8={opacity:.4},O8=new Set(l9),E8={general:{headerTitle:"Selected Element",emptyPlaceholder:"Click on an element in the preview to select it.",inlineEditEditable:V8,inlineEditNonEditable:_8,addToChatContext:"Add to chat as context",ariaPropertyPanel:"Property panel",ariaSelectedComponent:"Selected component",ariaElementStyling:"Element styling",closePanel:"Close panel"},sections:{imageSource:"Image Source",background:"Background",spacing:"Spacing",border:"Border",typography:"Typography",elementDimensions:"Element Dimensions"},instances:{imageSource:"Source",backgroundColor:"Background Color",padding:"Padding",margin:"Margin",borderRadius:"Border Radius",borderWeight:"Border Weight",borderStyle:"Border Style",borderColor:"Border Color",fontFamily:"Font Family",fontSize:"Font Size",fontWeight:"Font Weight",fontStyle:"Font Style",textColor:"Text Color",textAlignment:"Text Alignment",textFormatting:"Text Formatting",textTransform:"Text Transform",lineHeight:"Line Height",letterSpacing:"Letter Spacing",width:"Width",minWidth:"Minimum Width",maxWidth:"Maximum Width",height:"Height",minHeight:"Minimum Height",maxHeight:"Maximum Height",overflow:"Overflow"},history:{changeLimitTitle:"Change limit reached",changeLimitBody:"Apply your {0} design changes to save your work and continue editing."}};function B8({size:e=16}){return ee("svg",{width:e,height:e,viewBox:"-1 0 252 302",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:ee("path",{d:"M57 49Q67 49 74 42Q81 35 81 25Q81 15 74 8Q67 1 57 1Q47 1 40 8Q33 15 33 25Q33 35 40 42Q47 49 57 49ZM193 49Q203 49 210 42Q217 35 217 25Q217 15 210 8Q203 1 193 1Q183 1 176 8Q169 15 169 25Q169 35 176 42Q183 49 193 49ZM125 301Q100 301 71 292Q47 285 26 274Q7 265 3.5 259.5Q0 254 1 249Q13 216 20 189Q24 171 26 157V147Q28 120 30 105Q34 78 40 65Q48 48 63 39Q85 27 125 27Q165 27 186 39Q201 47 209 65Q216 78 220 105Q222 120 224 147V157Q226 171 230 189Q237 216 248 249Q250 254 246.5 259.5Q243 265 224 274Q203 285 179 292Q150 301 125 301ZM23 249Q39 259 63 268Q97 280 125 280Q153 280 187 268Q210 259 227 249Q216 219 210 194Q205 174 204 159L203 148Q199 91 191 73Q188 66 184 62Q177 56 165 52Q150 48 125 48Q90 48 73 57Q64 63 59 73Q51 91 47 148L46 158Q45 174 40 194Q34 220 23 249ZM124 248Q113 248 102 244Q84 236 76 217Q72 209 71 201Q70 193 70 179Q70 163 73 151Q76 142 81.5 134Q87 126 98 120Q109 114 125.5 114Q142 114 152 120Q164 127 169 134.5Q174 142 177 151Q180 163 180 178.5Q180 194 179 200Q178 209 174 218Q167 232 154.5 240Q142 248 126 248ZM124 228H126Q147 228 156 209Q158 203 159 197.5Q160 192 160 179Q160 166 157 157Q155 151 152 146.5Q149 142 141 138Q136 134 125 134Q114 134 107.5 138Q101 142 98 146.5Q95 151 93 157Q90 166 90 178.5Q90 191 91 197Q92 203 94 209Q99 221 111 225Q117 228 124 228ZM195 81Q192 79 190 78Q170 70 146 76Q134 80 125.5 80Q117 80 104 76Q80 70 60 78Q58 79 55 81Q50 84 51 89L55 112Q56 117 59.5 120.5Q63 124 68 125Q83 126 99 126Q111 126 115 114L122 92Q122 91 124 89L125 88L126 89Q128 91 128 92L135 114Q139 126 152 126Q167 126 182 125Q187 124 190.5 120.5Q194 117 195 112L199 89Q200 84 195 81ZM141 192Q137 190 133 193V171Q138 169 141 165Q143 163 144 161Q145 159 145 156.5Q145 154 143.5 152Q142 150 140 148.5Q138 147 134 146Q130 145 125.5 145Q121 145 116 146Q111 147 109 149Q107 151 106 153Q105 155 105 157Q105 159 106 161Q107 163 109.5 166Q112 169 116 171H117V193Q113 190 109 191.5Q105 193 104 196Q103 199 105 202Q108 210 117 213Q124 216 133 213L134 212Q143 209 146 202Q147 199 145.5 196Q144 193 141 192Z"})})}function A8({size:e=12}){return ee("svg",{width:e,height:e,viewBox:"0 0 12 12","aria-hidden":"true",style:{display:"block",flexShrink:0},children:ee("rect",{x:"1",y:"1",width:"10",height:"10",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"2.5 2"})})}function Z8(e,t){let o=e[t];return o!=null?String(o):""}function kn(e){if(!(!e||!e.name||!e.debugSource))return{sourceFile:e.debugSource.sourceFile,lineNumber:e.debugSource.lineNumber,columnNumber:e.debugSource.columnNumber,componentName:e.name}}function F8({component:e,onOpenSourceFile:t,showOpenSourceFile:o,showComponentName:a,generalLabels:r}){if(!e||!e.name)return ee("section",{id:"property-panel-selected-component",className:"property-panel-selected-component",children:ee("p",{className:"property-panel-selected-component-placeholder",id:"component-info",children:r.emptyPlaceholder})});let l=e.tagName?e.tagName.toLowerCase():"",n=l?`${e.name} > ${l}`:e.name,i=null;if(o&&e.debugSource){let{sourceFile:s,lineNumber:u,columnNumber:d}=e.debugSource,f=s.split("/").pop()||s,C=`:${u}:${d}`;i=$e("a",{href:"#",className:"property-panel-selected-component-source",onClick:p=>{p.preventDefault(),t?.({sourceFile:s,lineNumber:u,columnNumber:d})},title:`${s}${C}`,children:[f,C]})}return!a&&!i?null:ee("section",{id:"property-panel-selected-component",className:"property-panel-selected-component","aria-label":r.ariaSelectedComponent,children:$e("div",{id:"component-info",className:"property-panel-selected-component-info",children:[a&&ee("span",{className:"property-panel-selected-component-name",children:n}),i&&$e("span",{className:"property-panel-selected-component-source-row",children:["\u21B3 ",i]})]})})}var $8=Ie.forwardRef(function({title:t,body:o},a){return $e("section",{ref:a,role:"alert","aria-live":"assertive","aria-labelledby":"property-panel-change-limit-title",className:"property-panel-change-limit-message",tabIndex:-1,children:[ee("svg",{className:"property-panel-change-limit-icon",viewBox:"0 0 520 520",fill:"currentColor","aria-hidden":"true",focusable:"false",children:ee("path",{d:"M260 20a240 240 0 100 480 240 240 0 100-480m0 121c17 0 30 13 30 30s-13 30-30 30-30-13-30-30 13-30 30-30m50 210c0 5-4 9-10 9h-80c-5 0-10-3-10-9v-20c0-5 4-11 10-11 5 0 10-3 10-9v-40c0-5-4-11-10-11-5 0-10-3-10-9v-20c0-5 4-11 10-11h60c5 0 10 5 10 11v80c0 5 4 9 10 9 5 0 10 5 10 11z"})}),$e("div",{className:"property-panel-change-limit-content",children:[ee("h2",{id:"property-panel-change-limit-title",className:"property-panel-change-limit-title",children:t}),ee("p",{className:"property-panel-change-limit-body",children:o})]})]})});function N8({styles:e,computedStyles:t,inlineOrigin:o,hasSelection:a,onStyleChange:r,generalLabels:l,sectionLabels:n,instanceLabels:i,editorLabels:s,component:u,onImageAttributeChange:d,imageSource:f}){let C=a?"visible":"",h=u?.media?.tag==="img"?u.media:null,p=c=>o.has(c)?"":t[c]??"";return ee("section",{className:"property-panel-style-properties-container"+(C?" "+C:""),"aria-label":l.ariaElementStyling,"aria-hidden":!a,children:$e("div",{className:"property-panel-style-properties",children:[h&&ee(nt,{title:n.imageSource,children:ee(j5,{label:i.imageSource,value:h.src,onChange:c=>d("src",c),id:"design-img-src",attributes:{alt:h.alt,width:h.width,height:h.height},onAttributeChange:d,imageLabels:s?.image,...f})}),ee(nt,{title:n.background,children:ee(wa,{label:i.backgroundColor,value:e.backgroundColor||t.backgroundColor||"#ffffff",onChange:c=>r("backgroundColor",c),id:"design-bg-color",aria:s?.color,backgroundImage:e.backgroundImage||t.backgroundImage})}),$e(nt,{title:n.spacing,children:[ee(ao,{label:i.padding,id:"design-padding",value:e.padding,placeholder:p("padding"),onChange:c=>r("padding",c),...to.padding,aria:s?.boxDimension}),ee(ao,{label:i.margin,id:"design-margin",value:e.margin,placeholder:p("margin"),onChange:c=>r("margin",c),...to.margin,allowAuto:!0,aria:s?.boxDimension})]}),$e(nt,{title:n.border,children:[ee(ao,{label:i.borderRadius,id:"design-border-radius",value:e.borderRadius,placeholder:p("borderRadius"),onChange:c=>r("borderRadius",c),...to.borderRadius,aria:s?.boxDimension}),ee(ao,{label:i.borderWeight,id:"design-border-width",value:e.borderWidth,placeholder:p("borderWidth"),onChange:c=>r("borderWidth",c),...to.borderWidth,aria:s?.boxDimension}),ee(D9,{label:i.borderStyle,id:"design-border-style",value:e.borderStyle||t.borderStyle,onChange:c=>r("borderStyle",c),optionLabels:s?.borderStyle?.options}),ee(wa,{label:i.borderColor,value:e.borderColor||t.borderColor||"#000000",onChange:c=>r("borderColor",c),id:"design-border-color",aria:s?.color})]}),$e(nt,{title:n.typography,children:[ee(N5,{label:i.fontFamily,id:"design-font-family",value:e.fontFamily,computedValue:p("fontFamily"),onChange:c=>r("fontFamily",c),aria:s?.picklist}),ee(k1,{label:i.fontSize,id:"design-font-size",value:e.fontSize,placeholder:p("fontSize"),onChange:c=>r("fontSize",c),...I1.fontSize,aria:s?.dimension}),ee(q5,{label:i.fontWeight,id:"design-font-weight",value:e.fontWeight,computedValue:p("fontWeight"),onChange:c=>r("fontWeight",c),optionLabels:s?.fontWeight?.options,aria:s?.picklist}),ee(U5,{label:i.fontStyle,id:"design-font-style",value:e.fontStyle||t.fontStyle,onChange:c=>r("fontStyle",c),optionLabels:s?.fontStyle?.options}),ee(wa,{label:i.textColor,value:e.color||t.color||"#000000",onChange:c=>r("color",c),id:"design-text-color",aria:s?.color}),ee(W5,{label:i.textAlignment,id:"design-text-align",value:e.textAlign||t.textAlign,onChange:c=>r("textAlign",c),optionLabels:s?.textAlignment?.options}),ee(Q5,{label:i.textFormatting,id:"design-text-decoration",value:e.textDecoration||t.textDecoration,onChange:c=>r("textDecoration",c),optionLabels:s?.textDecoration?.options}),ee(J5,{label:i.textTransform,id:"design-text-transform",value:e.textTransform||t.textTransform,onChange:c=>r("textTransform",c),optionLabels:s?.textTransform?.options}),ee(k1,{label:i.lineHeight,id:"design-line-height",value:e.lineHeight,placeholder:p("lineHeight"),onChange:c=>r("lineHeight",c),...I1.lineHeight,aria:s?.dimension}),ee(k1,{label:i.letterSpacing,id:"design-letter-spacing",value:e.letterSpacing,placeholder:p("letterSpacing"),onChange:c=>r("letterSpacing",c),...I1.letterSpacing,aria:s?.dimension})]}),$e(nt,{title:n.elementDimensions,children:[ee(k1,{label:i.width,id:"design-width",value:e.width,placeholder:p("width"),onChange:c=>r("width",c),...I1.width,aria:s?.dimension}),$e("div",{className:"property-panel-row-2col",children:[ee(k1,{label:i.minWidth,id:"design-min-width",value:e.minWidth,placeholder:p("minWidth"),onChange:c=>r("minWidth",c),...I1.minWidth,aria:s?.dimension}),ee(k1,{label:i.maxWidth,id:"design-max-width",value:e.maxWidth,placeholder:p("maxWidth"),onChange:c=>r("maxWidth",c),...I1.maxWidth,aria:s?.dimension})]}),ee(k1,{label:i.height,id:"design-height",value:e.height,placeholder:p("height"),onChange:c=>r("height",c),...I1.height,aria:s?.dimension}),$e("div",{className:"property-panel-row-2col",children:[ee(k1,{label:i.minHeight,id:"design-min-height",value:e.minHeight,placeholder:p("minHeight"),onChange:c=>r("minHeight",c),...I1.minHeight,aria:s?.dimension}),ee(k1,{label:i.maxHeight,id:"design-max-height",value:e.maxHeight,placeholder:p("maxHeight"),onChange:c=>r("maxHeight",c),...I1.maxHeight,aria:s?.dimension})]}),ee(G5,{label:i.overflow,id:"design-overflow",value:e.overflow,computedValue:p("overflow"),onChange:c=>r("overflow",c),optionLabels:s?.overflow?.options,aria:s?.picklist})]})]})})}var Hn=["width","minWidth","maxWidth","height","minHeight","maxHeight","overflow","padding","margin","backgroundColor","backgroundImage","borderWidth","borderStyle","borderColor","borderRadius","color","fontFamily","fontSize","fontWeight","fontStyle","lineHeight","letterSpacing","textAlign","textDecoration","textTransform"],Gt=Object.fromEntries(Hn.map(e=>[e,""]));function ri(e,t,o,a){let r={...t};for(let l of Hn){let n=e[l];n!=null&&!o.has(l)&&(r[l]=n[a]??t[l]??"")}return r}function U8(e,t,o){let a=new Set(t);for(let r of Hn){if(o.has(r))continue;let l=e[r];l!=null&&(l.inline?a.add(r):a.delete(r))}return a}var li=Ie.forwardRef(function(t,o){let{component:a,styles:r,onStyleChange:l,onTextChange:n,onHistoryStateChange:i,onAddToChatContext:s,onOpenSourceFile:u,onClose:d,onMediaChange:f,showAddToChatContext:C=!0,showOpenSourceFile:h=!0,compactHeader:p=!1,labels:c,imageSource:m}=t,b=e1(E8,c),[g,k]=Ie.useState(Gt),[v,P]=Ie.useState(Gt),[V,U]=Ie.useState(()=>new Set),[M,_]=Ie.useState(()=>new Set),q=Ie.useRef(g);q.current=g;let K=Ie.useRef(v);K.current=v;let W=Ie.useRef(V);W.current=V;let N=Ie.useRef(M);N.current=M;let E=Ie.useRef(new Map),S=Ie.useRef(l);S.current=l;let L=Ie.useRef(n);L.current=n;let x=Ie.useRef(f);x.current=f;let w=Ie.useRef(null);w.current||(w.current=oi((X,Ce,te)=>S.current(X,Ce,te),(X,Ce)=>L.current?.(X,Ce),(X,Ce,te)=>x.current?.(X,Ce,te)));let I=w.current,H=Ie.useRef(i);H.current=i;let[A,F]=Ie.useState(()=>I.getUndoCount()),G=I.getMaxHistorySize();Ie.useEffect(()=>{let X=te=>{if(H.current?.({canUndo:te.canUndo,canRedo:te.canRedo}),F(te.undoCount),!(te.type==="command-undone"||te.type==="command-redone"))return;let ve=te.type==="command-undone",de=te.command?.data?.property,xe=te.command?.data?.changes,he=[];typeof de=="string"?he=[[de,typeof te.appliedValue=="string"?te.appliedValue:""]]:Array.isArray(xe)&&(he=xe.filter(He=>He!=null&&typeof He.property=="string").map(He=>[He.property,String((ve?He.oldValue:He.newValue)??"")])),he.length!==0&&(k(He=>{let f1={...He};for(let[A1,w1]of he)f1[A1]=w1;return f1}),U(He=>{let f1=new Set(He);for(let[A1]of he)f1.add(A1);return f1}))},Ce=I.subscribe(X);return H.current?.({canUndo:I.canUndo(),canRedo:I.canRedo()}),F(I.getUndoCount()),Ce},[I]);let B=A>=G,$=Ie.useRef(null),Z=Ie.useRef(!1);Ie.useEffect(()=>{B&&!Z.current&&$.current?.focus(),Z.current=B},[B]),Ie.useImperativeHandle(o,()=>({undo:()=>I.undo(),redo:()=>I.redo(),clearHistory:()=>{I.clear(),E.current.clear(),k(Gt),P(Gt),U(new Set),_(new Set),F(0)},getHistoryStack:()=>I.getHistoryStack(),getChangeSet:()=>ei(I.getHistoryStack()),recordTextChange:(X,Ce,te)=>I.recordTextChange(X,Ce,te),canUndo:()=>I.canUndo(),canRedo:()=>I.canRedo()}),[I]);let R=a?`${a.name}-${a.tagName??""}-${a.debugSource?.lineNumber??""}-${a.debugSource?.columnNumber??""}`:"none",oe=Ie.useRef("none");Ie.useEffect(()=>{let X=oe.current,Ce,te,ge,ve;if(R!==X){X!=="none"&&W.current.size>0&&E.current.set(X,{styles:q.current,computedStyles:K.current,sessionEdits:W.current,inlineOrigin:N.current}),oe.current=R;let xe=E.current.get(R);Ce=xe?xe.styles:Gt,te=xe?xe.computedStyles:Gt,ge=xe?xe.sessionEdits:new Set,ve=xe?xe.inlineOrigin:new Set}else Ce=q.current,te=K.current,ge=W.current,ve=N.current;let de=r||{};k(ri(de,Ce,ge,"inline")),P(ri(de,te,ge,"computed")),U(ge),_(U8(de,ve,ge))},[R,r]);let se=Ie.useCallback((X,Ce)=>{let te=Z8(q.current,X),ge=kn(a),ve=ai(X,Ce,K.current.backgroundImage,q.current.backgroundImage);l(X,Ce);for(let de of ve)l(de.property,de.newValue);ve.length===0?I.recordStyleChange(X,te,Ce,ge):I.recordStyleBatch([{property:X,oldValue:te,newValue:Ce},...ve.map(de=>({property:de.property,oldValue:de.oldValue,newValue:de.newValue}))],ge),k(de=>{let xe={...de,[X]:Ce};for(let he of ve)xe[he.property]=he.newValue;return xe}),U(de=>{let xe=new Set(de);Ce===""&&N.current.has(X)?xe.delete(X):xe.add(X);for(let he of ve)xe.add(he.property);return xe})},[l,I,a]),ue=Ie.useCallback((X,Ce)=>{let te=a?.media;if(!te)return;let ge=a?.debugSource;f?.(te.tag,{[X]:Ce},ge);let ve=String(te[X]??"");I.recordMediaChange(te.tag,X,ve,Ce,kn(a))},[a,f,I]),y=!!(a&&a.name),D=Ie.useCallback(()=>{let X=kn(a);X&&s?.(X)},[a,s]),Q=y&&a&&a.tagName&&O8.has(a.tagName.toUpperCase()),le=a?.hasNonEditableText?b.general.inlineEditNonEditable:b.general.inlineEditEditable,ke=a?.tagName?a.tagName.toLowerCase():a?.name;return $e("div",{role:"complementary","aria-label":b.general.ariaPropertyPanel,className:"property-panel-container",children:[$e("header",{className:p?"property-panel-header property-panel-header-compact":"property-panel-header",children:[p?y&&$e("span",{className:"property-panel-selected-pill",children:[ee(A8,{size:12}),ee("span",{className:"property-panel-selected-pill-tag",children:ke})]}):ee("h2",{id:"design-property-panel-title",className:"property-panel-title",children:b.general.headerTitle}),(y||d)&&$e("div",{className:"property-panel-header-actions",children:[y&&$e(z8,{children:[Q&&ee("span",{className:"property-panel-selected-component-action property-panel-selected-component-action-help","data-tooltip":le,"aria-label":le,children:ee(Zn,{width:14,height:14,style:a.hasNonEditableText?D8:void 0})}),C&&!B&&ee("button",{type:"button",className:"property-panel-selected-component-action",onClick:D,"data-tooltip":b.general.addToChatContext,"aria-label":b.general.addToChatContext,children:ee(B8,{size:14})})]}),d&&ee("button",{type:"button",className:"property-panel-selected-component-action property-panel-close",onClick:d,"data-tooltip":b.general.closePanel,"aria-label":b.general.closePanel,children:ee(F1,{width:14,height:14,"aria-hidden":"true"})})]})]}),$e("div",{className:"property-panel-content","aria-labelledby":p?void 0:"design-property-panel-title",children:[ee(F8,{component:a,onOpenSourceFile:u,showOpenSourceFile:h,showComponentName:!p,generalLabels:b.general}),B?ee($8,{ref:$,title:b.history.changeLimitTitle,body:Pe(b.history.changeLimitBody,[String(G)])}):ee(N8,{styles:g,computedStyles:v,inlineOrigin:M,hasSelection:y,onStyleChange:se,generalLabels:b.general,sectionLabels:b.sections,instanceLabels:b.instances,editorLabels:c?.editors,component:a,onImageAttributeChange:ue,imageSource:m},R)]})]})});function q8(e,t,o){if(!e)return;T8(e).render(Ie.createElement(li,{...t,ref:o}))}export{li as DesignPropertyPanel,O9 as REQUIRED_LABEL_KEYS,Pe as interpolate,q8 as mountDesignPropertyPanel,ks as validateLabels};
|
|
5
5
|
/*! Bundled license information:
|
|
6
6
|
|
|
7
7
|
react-is/cjs/react-is.production.min.js:
|