@yext/visual-editor 0.0.6 → 0.0.7
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/README.md +2 -2
- package/dist/index.d.cts +49 -3
- package/dist/index.d.ts +49 -3
- package/dist/style.css +1 -1
- package/dist/visual-editor.cjs +30 -30
- package/dist/visual-editor.js +1886 -1865
- package/package.json +2 -2
package/dist/visual-editor.cjs
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var bs=Object.defineProperty;var ys=(e,t,r)=>t in e?bs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Dt=(e,t,r)=>ys(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),rr=require("@measured/puck"),Ur=require("react-dom");function Zn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const f=Zn(w),Yr=Zn(Ur);var kr={exports:{}},gt={};/*
|
|
2
2
|
object-assign
|
|
3
3
|
(c) Sindre Sorhus
|
|
4
4
|
@license MIT
|
|
5
|
-
*/var xr,bn;function Qn(){if(bn)return xr;bn=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function o(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var s={},i=0;i<10;i++)s["_"+String.fromCharCode(i)]=i;var l=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return xr=o()?Object.assign:function(a,s){for(var i,l=n(a),u,d=1;d<arguments.length;d++){i=Object(arguments[d]);for(var
|
|
5
|
+
*/var xr,bn;function Qn(){if(bn)return xr;bn=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function o(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var s={},i=0;i<10;i++)s["_"+String.fromCharCode(i)]=i;var l=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return xr=o()?Object.assign:function(a,s){for(var i,l=n(a),u,d=1;d<arguments.length;d++){i=Object(arguments[d]);for(var g in i)t.call(i,g)&&(l[g]=i[g]);if(e){u=e(i);for(var c=0;c<u.length;c++)r.call(i,u[c])&&(l[u[c]]=i[u[c]])}}return l},xr}/** @license React v17.0.2
|
|
6
6
|
* react-jsx-runtime.production.min.js
|
|
7
7
|
*
|
|
8
8
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9
9
|
*
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/var yn;function
|
|
12
|
+
*/var yn;function xs(){if(yn)return gt;yn=1,Qn();var e=w,t=60103;if(gt.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var r=Symbol.for;t=r("react.element"),gt.Fragment=r("react.fragment")}var n=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o=Object.prototype.hasOwnProperty,a={key:!0,ref:!0,__self:!0,__source:!0};function s(i,l,u){var d,g={},c=null,v=null;u!==void 0&&(c=""+u),l.key!==void 0&&(c=""+l.key),l.ref!==void 0&&(v=l.ref);for(d in l)o.call(l,d)&&!a.hasOwnProperty(d)&&(g[d]=l[d]);if(i&&i.defaultProps)for(d in l=i.defaultProps,l)g[d]===void 0&&(g[d]=l[d]);return{$$typeof:t,type:i,key:c,ref:v,props:g,_owner:n.current}}return gt.jsx=s,gt.jsxs=s,gt}var wr={};/** @license React v17.0.2
|
|
13
13
|
* react-jsx-runtime.development.js
|
|
14
14
|
*
|
|
15
15
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
16
16
|
*
|
|
17
17
|
* This source code is licensed under the MIT license found in the
|
|
18
18
|
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/var xn;function
|
|
20
|
-
`+
|
|
21
|
-
`),
|
|
22
|
-
`),
|
|
23
|
-
`+
|
|
19
|
+
*/var xn;function ws(){return xn||(xn=1,function(e){process.env.NODE_ENV!=="production"&&function(){var t=w,r=Qn(),n=60103,o=60106;e.Fragment=60107;var a=60108,s=60114,i=60109,l=60110,u=60112,d=60113,g=60120,c=60115,v=60116,x=60121,h=60122,y=60117,E=60129,b=60131;if(typeof Symbol=="function"&&Symbol.for){var C=Symbol.for;n=C("react.element"),o=C("react.portal"),e.Fragment=C("react.fragment"),a=C("react.strict_mode"),s=C("react.profiler"),i=C("react.provider"),l=C("react.context"),u=C("react.forward_ref"),d=C("react.suspense"),g=C("react.suspense_list"),c=C("react.memo"),v=C("react.lazy"),x=C("react.block"),h=C("react.server.block"),y=C("react.fundamental"),C("react.scope"),C("react.opaque.id"),E=C("react.debug_trace_mode"),C("react.offscreen"),b=C("react.legacy_hidden")}var R=typeof Symbol=="function"&&Symbol.iterator,P="@@iterator";function D(p){if(p===null||typeof p!="object")return null;var S=R&&p[R]||p[P];return typeof S=="function"?S:null}var T=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function N(p){{for(var S=arguments.length,A=new Array(S>1?S-1:0),j=1;j<S;j++)A[j-1]=arguments[j];z("error",p,A)}}function z(p,S,A){{var j=T.ReactDebugCurrentFrame,re=j.getStackAddendum();re!==""&&(S+="%s",A=A.concat([re]));var ee=A.map(function(K){return""+K});ee.unshift("Warning: "+S),Function.prototype.apply.call(console[p],console,ee)}}var Y=!1;function G(p){return!!(typeof p=="string"||typeof p=="function"||p===e.Fragment||p===s||p===E||p===a||p===d||p===g||p===b||Y||typeof p=="object"&&p!==null&&(p.$$typeof===v||p.$$typeof===c||p.$$typeof===i||p.$$typeof===l||p.$$typeof===u||p.$$typeof===y||p.$$typeof===x||p[0]===h))}function _(p,S,A){var j=S.displayName||S.name||"";return p.displayName||(j!==""?A+"("+j+")":A)}function Z(p){return p.displayName||"Context"}function I(p){if(p==null)return null;if(typeof p.tag=="number"&&N("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case e.Fragment:return"Fragment";case o:return"Portal";case s:return"Profiler";case a:return"StrictMode";case d:return"Suspense";case g:return"SuspenseList"}if(typeof p=="object")switch(p.$$typeof){case l:var S=p;return Z(S)+".Consumer";case i:var A=p;return Z(A._context)+".Provider";case u:return _(p,p.render,"ForwardRef");case c:return I(p.type);case x:return I(p._render);case v:{var j=p,re=j._payload,ee=j._init;try{return I(ee(re))}catch{return null}}}return null}var V=0,U,M,O,F,le,$,W;function k(){}k.__reactDisabledLog=!0;function X(){{if(V===0){U=console.log,M=console.info,O=console.warn,F=console.error,le=console.group,$=console.groupCollapsed,W=console.groupEnd;var p={configurable:!0,enumerable:!0,value:k,writable:!0};Object.defineProperties(console,{info:p,log:p,warn:p,error:p,group:p,groupCollapsed:p,groupEnd:p})}V++}}function te(){{if(V--,V===0){var p={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:r({},p,{value:U}),info:r({},p,{value:M}),warn:r({},p,{value:O}),error:r({},p,{value:F}),group:r({},p,{value:le}),groupCollapsed:r({},p,{value:$}),groupEnd:r({},p,{value:W})})}V<0&&N("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=T.ReactCurrentDispatcher,xe;function ge(p,S,A){{if(xe===void 0)try{throw Error()}catch(re){var j=re.stack.trim().match(/\n( *(at )?)/);xe=j&&j[1]||""}return`
|
|
20
|
+
`+xe+p}}var we=!1,ve;{var ct=typeof WeakMap=="function"?WeakMap:Map;ve=new ct}function Me(p,S){if(!p||we)return"";{var A=ve.get(p);if(A!==void 0)return A}var j;we=!0;var re=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ee;ee=q.current,q.current=null,X();try{if(S){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch($e){j=$e}Reflect.construct(p,[],K)}else{try{K.call()}catch($e){j=$e}p.call(K.prototype)}}else{try{throw Error()}catch($e){j=$e}p()}}catch($e){if($e&&j&&typeof $e.stack=="string"){for(var H=$e.stack.split(`
|
|
21
|
+
`),de=j.stack.split(`
|
|
22
|
+
`),oe=H.length-1,ae=de.length-1;oe>=1&&ae>=0&&H[oe]!==de[ae];)ae--;for(;oe>=1&&ae>=0;oe--,ae--)if(H[oe]!==de[ae]){if(oe!==1||ae!==1)do if(oe--,ae--,ae<0||H[oe]!==de[ae]){var Ie=`
|
|
23
|
+
`+H[oe].replace(" at new "," at ");return typeof p=="function"&&ve.set(p,Ie),Ie}while(oe>=1&&ae>=0);break}}}finally{we=!1,q.current=ee,te(),Error.prepareStackTrace=re}var pt=p?p.displayName||p.name:"",mn=pt?ge(pt):"";return typeof p=="function"&&ve.set(p,mn),mn}function De(p,S,A){return Me(p,!1)}function tt(p){var S=p.prototype;return!!(S&&S.isReactComponent)}function Le(p,S,A){if(p==null)return"";if(typeof p=="function")return Me(p,tt(p));if(typeof p=="string")return ge(p);switch(p){case d:return ge("Suspense");case g:return ge("SuspenseList")}if(typeof p=="object")switch(p.$$typeof){case u:return De(p.render);case c:return Le(p.type,S,A);case x:return De(p._render);case v:{var j=p,re=j._payload,ee=j._init;try{return Le(ee(re),S,A)}catch{}}}return""}var Pe={},ut=T.ReactDebugCurrentFrame;function He(p){if(p){var S=p._owner,A=Le(p.type,p._source,S?S.type:null);ut.setExtraStackFrame(A)}else ut.setExtraStackFrame(null)}function se(p,S,A,j,re){{var ee=Function.call.bind(Object.prototype.hasOwnProperty);for(var K in p)if(ee(p,K)){var H=void 0;try{if(typeof p[K]!="function"){var de=Error((j||"React class")+": "+A+" type `"+K+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof p[K]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw de.name="Invariant Violation",de}H=p[K](S,K,j,A,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(oe){H=oe}H&&!(H instanceof Error)&&(He(re),N("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",j||"React class",A,K,typeof H),He(null)),H instanceof Error&&!(H.message in Pe)&&(Pe[H.message]=!0,He(re),N("Failed %s type: %s",A,H.message),He(null))}}}var Ee=T.ReactCurrentOwner,At=Object.prototype.hasOwnProperty,mr={key:!0,ref:!0,__self:!0,__source:!0},rt,Ft,dt;dt={};function Tt(p){if(At.call(p,"ref")){var S=Object.getOwnPropertyDescriptor(p,"ref").get;if(S&&S.isReactWarning)return!1}return p.ref!==void 0}function Ue(p){if(At.call(p,"key")){var S=Object.getOwnPropertyDescriptor(p,"key").get;if(S&&S.isReactWarning)return!1}return p.key!==void 0}function Bt(p,S){if(typeof p.ref=="string"&&Ee.current&&S&&Ee.current.stateNode!==S){var A=I(Ee.current.type);dt[A]||(N('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',I(Ee.current.type),p.ref),dt[A]=!0)}}function Ye(p,S){{var A=function(){rt||(rt=!0,N("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",S))};A.isReactWarning=!0,Object.defineProperty(p,"key",{get:A,configurable:!0})}}function Wt(p,S){{var A=function(){Ft||(Ft=!0,N("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",S))};A.isReactWarning=!0,Object.defineProperty(p,"ref",{get:A,configurable:!0})}}var br=function(p,S,A,j,re,ee,K){var H={$$typeof:n,type:p,key:S,ref:A,props:K,_owner:ee};return H._store={},Object.defineProperty(H._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(H,"_self",{configurable:!1,enumerable:!1,writable:!1,value:j}),Object.defineProperty(H,"_source",{configurable:!1,enumerable:!1,writable:!1,value:re}),Object.freeze&&(Object.freeze(H.props),Object.freeze(H)),H};function zt(p,S,A,j,re){{var ee,K={},H=null,de=null;A!==void 0&&(H=""+A),Ue(S)&&(H=""+S.key),Tt(S)&&(de=S.ref,Bt(S,re));for(ee in S)At.call(S,ee)&&!mr.hasOwnProperty(ee)&&(K[ee]=S[ee]);if(p&&p.defaultProps){var oe=p.defaultProps;for(ee in oe)K[ee]===void 0&&(K[ee]=oe[ee])}if(H||de){var ae=typeof p=="function"?p.displayName||p.name||"Unknown":p;H&&Ye(K,ae),de&&Wt(K,ae)}return br(p,H,de,re,j,Ee.current,K)}}var ft=T.ReactCurrentOwner,Vt=T.ReactDebugCurrentFrame;function Ne(p){if(p){var S=p._owner,A=Le(p.type,p._source,S?S.type:null);Vt.setExtraStackFrame(A)}else Vt.setExtraStackFrame(null)}var Ce;Ce=!1;function Ot(p){return typeof p=="object"&&p!==null&&p.$$typeof===n}function L(){{if(ft.current){var p=I(ft.current.type);if(p)return`
|
|
24
24
|
|
|
25
|
-
Check the render method of \``+
|
|
25
|
+
Check the render method of \``+p+"`."}return""}}function Q(p){return""}var J={};function Se(p){{var S=L();if(!S){var A=typeof p=="string"?p:p.displayName||p.name;A&&(S=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+
|
|
27
|
+
Check the top-level render call using <`+A+">.")}return S}}function he(p,S){{if(!p._store||p._store.validated||p.key!=null)return;p._store.validated=!0;var A=Se(S);if(J[A])return;J[A]=!0;var j="";p&&p._owner&&p._owner!==ft.current&&(j=" It was passed a child from "+I(p._owner.type)+"."),Ne(p),N('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',A,j),Ne(null)}}function nt(p,S){{if(typeof p!="object")return;if(Array.isArray(p))for(var A=0;A<p.length;A++){var j=p[A];Ot(j)&&he(j,S)}else if(Ot(p))p._store&&(p._store.validated=!0);else if(p){var re=D(p);if(typeof re=="function"&&re!==p.entries)for(var ee=re.call(p),K;!(K=ee.next()).done;)Ot(K.value)&&he(K.value,S)}}}function yr(p){{var S=p.type;if(S==null||typeof S=="string")return;var A;if(typeof S=="function")A=S.propTypes;else if(typeof S=="object"&&(S.$$typeof===u||S.$$typeof===c))A=S.propTypes;else return;if(A){var j=I(S);se(A,p.props,"prop",j,p)}else if(S.PropTypes!==void 0&&!Ce){Ce=!0;var re=I(S);N("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",re||"Unknown")}typeof S.getDefaultProps=="function"&&!S.getDefaultProps.isReactClassApproved&&N("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ps(p){{for(var S=Object.keys(p.props),A=0;A<S.length;A++){var j=S[A];if(j!=="children"&&j!=="key"){Ne(p),N("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",j),Ne(null);break}}p.ref!==null&&(Ne(p),N("Invalid attribute `ref` supplied to `React.Fragment`."),Ne(null))}}function hn(p,S,A,j,re,ee){{var K=G(p);if(!K){var H="";(p===void 0||typeof p=="object"&&p!==null&&Object.keys(p).length===0)&&(H+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var de=Q();de?H+=de:H+=L();var oe;p===null?oe="null":Array.isArray(p)?oe="array":p!==void 0&&p.$$typeof===n?(oe="<"+(I(p.type)||"Unknown")+" />",H=" Did you accidentally export a JSX literal instead of a component?"):oe=typeof p,N("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",oe,H)}var ae=zt(p,S,A,re,ee);if(ae==null)return ae;if(K){var Ie=S.children;if(Ie!==void 0)if(j)if(Array.isArray(Ie)){for(var pt=0;pt<Ie.length;pt++)nt(Ie[pt],p);Object.freeze&&Object.freeze(Ie)}else N("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else nt(Ie,p)}return p===e.Fragment?ps(ae):yr(ae),ae}}function gs(p,S,A){return hn(p,S,A,!0)}function vs(p,S,A){return hn(p,S,A,!1)}var hs=vs,ms=gs;e.jsx=hs,e.jsxs=ms}()}(wr)),wr}process.env.NODE_ENV==="production"?kr.exports=xs():kr.exports=ws();var m=kr.exports;/**
|
|
28
28
|
* @license lucide-react v0.414.0 - ISC
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the ISC license.
|
|
31
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/const
|
|
32
|
+
*/const Es=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),eo=(...e)=>e.filter((t,r,n)=>!!t&&n.indexOf(t)===r).join(" ");/**
|
|
33
33
|
* @license lucide-react v0.414.0 - ISC
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the ISC license.
|
|
36
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/var
|
|
37
|
+
*/var Cs={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"};/**
|
|
38
38
|
* @license lucide-react v0.414.0 - ISC
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the ISC license.
|
|
41
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const
|
|
42
|
+
*/const Ss=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:s,...i},l)=>w.createElement("svg",{ref:l,...Cs,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:eo("lucide",o),...i},[...s.map(([u,d])=>w.createElement(u,d)),...Array.isArray(a)?a:[a]]));/**
|
|
43
43
|
* @license lucide-react v0.414.0 - ISC
|
|
44
44
|
*
|
|
45
45
|
* This source code is licensed under the ISC license.
|
|
46
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const cr=(e,t)=>{const r=w.forwardRef(({className:n,...o},a)=>w.createElement(
|
|
47
|
+
*/const cr=(e,t)=>{const r=w.forwardRef(({className:n,...o},a)=>w.createElement(Ss,{ref:a,iconNode:t,className:eo(`lucide-${Es(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
|
|
48
48
|
* @license lucide-react v0.414.0 - ISC
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the ISC license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const
|
|
52
|
+
*/const Rs=cr("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
|
|
53
53
|
* @license lucide-react v0.414.0 - ISC
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the ISC license.
|
|
56
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const
|
|
57
|
+
*/const Ps=cr("PanelRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
|
|
58
58
|
* @license lucide-react v0.414.0 - ISC
|
|
59
59
|
*
|
|
60
60
|
* This source code is licensed under the ISC license.
|
|
61
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const
|
|
62
|
+
*/const As=cr("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
63
63
|
* @license lucide-react v0.414.0 - ISC
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the ISC license.
|
|
66
66
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const As=cr("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);function Ts(e,t){const r=f.createContext(t);function n(a){const{children:s,...i}=a,l=f.useMemo(()=>i,Object.values(i));return b.jsx(r.Provider,{value:l,children:s})}function o(a){const s=f.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,o]}function Ct(e,t=[]){let r=[];function n(a,s){const i=f.createContext(s),l=r.length;r=[...r,s];function u(p){const{scope:c,children:m,...y}=p,v=(c==null?void 0:c[e][l])||i,h=f.useMemo(()=>y,Object.values(y));return b.jsx(v.Provider,{value:h,children:m})}function d(p,c){const m=(c==null?void 0:c[e][l])||i,y=f.useContext(m);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${a}\``)}return u.displayName=a+"Provider",[u,d]}const o=()=>{const a=r.map(s=>f.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[n,Os(o,...t)]}function Os(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=n.reduce((i,{useScope:l,scopeName:u})=>{const p=l(a)[`__scope${u}`];return{...i,...p}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function Ns(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function to(...e){return t=>e.forEach(r=>Ns(r,t))}function fe(...e){return f.useCallback(to(...e),e)}function le(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var st=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},Ds=f.useId||(()=>{}),ks=0;function Jt(e){const[t,r]=f.useState(Ds());return st(()=>{r(n=>n??String(ks++))},[e]),t?`radix-${t}`:""}function Je(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Gr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=_s({defaultProp:t,onChange:r}),a=e!==void 0,s=a?e:n,i=Je(r),l=f.useCallback(u=>{if(a){const p=typeof u=="function"?u(e):u;p!==e&&i(p)}else o(u)},[a,e,o,i]);return[s,l]}function _s({defaultProp:e,onChange:t}){const r=f.useState(e),[n]=r,o=f.useRef(n),a=Je(t);return f.useEffect(()=>{o.current!==n&&(a(n),o.current=n)},[n,o,a]),r}var Mt=f.forwardRef((e,t)=>{const{children:r,...n}=e,o=f.Children.toArray(r),a=o.find(js);if(a){const s=a.props.children,i=o.map(l=>l===a?f.Children.count(s)>1?f.Children.only(null):f.isValidElement(s)?s.props.children:null:l);return b.jsx(_r,{...n,ref:t,children:f.isValidElement(s)?f.cloneElement(s,void 0,i):null})}return b.jsx(_r,{...n,ref:t,children:r})});Mt.displayName="Slot";var _r=f.forwardRef((e,t)=>{const{children:r,...n}=e;if(f.isValidElement(r)){const o=Ls(r);return f.cloneElement(r,{...Ms(n,r.props),ref:t?to(t,o):o})}return f.Children.count(r)>1?f.Children.only(null):null});_r.displayName="SlotClone";var qr=({children:e})=>b.jsx(b.Fragment,{children:e});function js(e){return f.isValidElement(e)&&e.type===qr}function Ms(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{a(...i),o(...i)}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Ls(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Is=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],se=Is.reduce((e,t)=>{const r=f.forwardRef((n,o)=>{const{asChild:a,...s}=n,i=a?Mt:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(i,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function $s(e,t){e&&Yr.flushSync(()=>e.dispatchEvent(t))}function Fs(e,t=globalThis==null?void 0:globalThis.document){const r=Je(e);f.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Bs="DismissableLayer",jr="dismissableLayer.update",Ws="dismissableLayer.pointerDownOutside",zs="dismissableLayer.focusOutside",wn,ro=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Kr=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=f.useContext(ro),[d,p]=f.useState(null),c=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=f.useState({}),y=fe(t,A=>p(A)),v=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=v.indexOf(h),C=d?v.indexOf(d):-1,E=u.layersWithOutsidePointerEventsDisabled.size>0,S=C>=x,R=Us(A=>{const k=A.target,U=[...u.branches].some(Y=>Y.contains(k));!S||U||(o==null||o(A),s==null||s(A),A.defaultPrevented||i==null||i())},c),N=Ys(A=>{const k=A.target;[...u.branches].some(Y=>Y.contains(k))||(a==null||a(A),s==null||s(A),A.defaultPrevented||i==null||i())},c);return Fs(A=>{C===u.layers.size-1&&(n==null||n(A),!A.defaultPrevented&&i&&(A.preventDefault(),i()))},c),f.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(wn=c.body.style.pointerEvents,c.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),En(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(c.body.style.pointerEvents=wn)}},[d,c,r,u]),f.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),En())},[d,u]),f.useEffect(()=>{const A=()=>m({});return document.addEventListener(jr,A),()=>document.removeEventListener(jr,A)},[]),b.jsx(se.div,{...l,ref:y,style:{pointerEvents:E?S?"auto":"none":void 0,...e.style},onFocusCapture:le(e.onFocusCapture,N.onFocusCapture),onBlurCapture:le(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:le(e.onPointerDownCapture,R.onPointerDownCapture)})});Kr.displayName=Bs;var Vs="DismissableLayerBranch",Hs=f.forwardRef((e,t)=>{const r=f.useContext(ro),n=f.useRef(null),o=fe(t,n);return f.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),b.jsx(se.div,{...e,ref:o})});Hs.displayName=Vs;function Us(e,t=globalThis==null?void 0:globalThis.document){const r=Je(e),n=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const a=i=>{if(i.target&&!n.current){let l=function(){no(Ws,r,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Ys(e,t=globalThis==null?void 0:globalThis.document){const r=Je(e),n=f.useRef(!1);return f.useEffect(()=>{const o=a=>{a.target&&!n.current&&no(zs,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function En(){const e=new CustomEvent(jr);document.dispatchEvent(e)}function no(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?$s(o,a):o.dispatchEvent(a)}var Er="focusScope.autoFocusOnMount",Cr="focusScope.autoFocusOnUnmount",Cn={bubbles:!1,cancelable:!0},Gs="FocusScope",oo=f.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=f.useState(null),u=Je(o),d=Je(a),p=f.useRef(null),c=fe(t,v=>l(v)),m=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(n){let v=function(E){if(m.paused||!i)return;const S=E.target;i.contains(S)?p.current=S:Ke(p.current,{select:!0})},h=function(E){if(m.paused||!i)return;const S=E.relatedTarget;S!==null&&(i.contains(S)||Ke(p.current,{select:!0}))},x=function(E){if(document.activeElement===document.body)for(const R of E)R.removedNodes.length>0&&Ke(i)};document.addEventListener("focusin",v),document.addEventListener("focusout",h);const C=new MutationObserver(x);return i&&C.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",h),C.disconnect()}}},[n,i,m.paused]),f.useEffect(()=>{if(i){Rn.add(m);const v=document.activeElement;if(!i.contains(v)){const x=new CustomEvent(Er,Cn);i.addEventListener(Er,u),i.dispatchEvent(x),x.defaultPrevented||(qs(Qs(ao(i)),{select:!0}),document.activeElement===v&&Ke(i))}return()=>{i.removeEventListener(Er,u),setTimeout(()=>{const x=new CustomEvent(Cr,Cn);i.addEventListener(Cr,d),i.dispatchEvent(x),x.defaultPrevented||Ke(v??document.body,{select:!0}),i.removeEventListener(Cr,d),Rn.remove(m)},0)}}},[i,u,d,m]);const y=f.useCallback(v=>{if(!r&&!n||m.paused)return;const h=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(h&&x){const C=v.currentTarget,[E,S]=Ks(C);E&&S?!v.shiftKey&&x===S?(v.preventDefault(),r&&Ke(E,{select:!0})):v.shiftKey&&x===E&&(v.preventDefault(),r&&Ke(S,{select:!0})):x===C&&v.preventDefault()}},[r,n,m.paused]);return b.jsx(se.div,{tabIndex:-1,...s,ref:c,onKeyDown:y})});oo.displayName=Gs;function qs(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ke(n,{select:t}),document.activeElement!==r)return}function Ks(e){const t=ao(e),r=Sn(t,e),n=Sn(t.reverse(),e);return[r,n]}function ao(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Sn(e,t){for(const r of e)if(!Xs(r,{upTo:t}))return r}function Xs(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Js(e){return e instanceof HTMLInputElement&&"select"in e}function Ke(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Js(e)&&t&&e.select()}}var Rn=Zs();function Zs(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Pn(e,t),e.unshift(t)},remove(t){var r;e=Pn(e,t),(r=e[0])==null||r.resume()}}}function Pn(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Qs(e){return e.filter(t=>t.tagName!=="A")}var ei="Portal",so=f.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[o,a]=f.useState(!1);st(()=>a(!0),[]);const s=r||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Ur.createPortal(b.jsx(se.div,{...n,ref:t}),s):null});so.displayName=ei;function ti(e,t){return f.useReducer((r,n)=>t[r][n]??r,e)}var Lt=e=>{const{present:t,children:r}=e,n=ri(t),o=typeof r=="function"?r({present:n.isPresent}):f.Children.only(r),a=fe(n.ref,ni(o));return typeof r=="function"||n.isPresent?f.cloneElement(o,{ref:a}):null};Lt.displayName="Presence";function ri(e){const[t,r]=f.useState(),n=f.useRef({}),o=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,l]=ti(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=Vt(n.current);a.current=i==="mounted"?u:"none"},[i]),st(()=>{const u=n.current,d=o.current;if(d!==e){const c=a.current,m=Vt(u);e?l("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&c!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),st(()=>{if(t){const u=p=>{const m=Vt(n.current).includes(p.animationName);p.target===t&&m&&Yr.flushSync(()=>l("ANIMATION_END"))},d=p=>{p.target===t&&(a.current=Vt(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function Vt(e){return(e==null?void 0:e.animationName)||"none"}function ni(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Sr=0;function oi(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??An()),document.body.insertAdjacentElement("beforeend",e[1]??An()),Sr++,()=>{Sr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Sr--}},[])}function An(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var ke=function(){return ke=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},ke.apply(this,arguments)};function io(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function ai(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Zt="right-scroll-bar-position",Qt="width-before-scroll-bar",si="with-scroll-bars-hidden",ii="--removed-body-scroll-bar-size";function Rr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function li(e,t){var r=w.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var ci=typeof window<"u"?f.useLayoutEffect:f.useEffect,Tn=new WeakMap;function ui(e,t){var r=li(null,function(n){return e.forEach(function(o){return Rr(o,n)})});return ci(function(){var n=Tn.get(r);if(n){var o=new Set(n),a=new Set(e),s=r.current;o.forEach(function(i){a.has(i)||Rr(i,null)}),a.forEach(function(i){o.has(i)||Rr(i,s)})}Tn.set(r,e)},[e]),r}function di(e){return e}function fi(e,t){t===void 0&&(t=di);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,n);return r.push(s),function(){r=r.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(n=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(i){return a(i)},filter:function(){return r}}},assignMedium:function(a){n=!0;var s=[];if(r.length){var i=r;r=[],i.forEach(a),s=r}var l=function(){var d=s;s=[],d.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),r}}}};return o}function pi(e){e===void 0&&(e={});var t=fi(null);return t.options=ke({async:!0,ssr:!1},e),t}var lo=function(e){var t=e.sideCar,r=io(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return f.createElement(n,ke({},r))};lo.isSideCarExport=!0;function gi(e,t){return e.useMedium(t),lo}var co=pi(),Pr=function(){},ur=f.forwardRef(function(e,t){var r=f.useRef(null),n=f.useState({onScrollCapture:Pr,onWheelCapture:Pr,onTouchMoveCapture:Pr}),o=n[0],a=n[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,p=e.shards,c=e.sideCar,m=e.noIsolation,y=e.inert,v=e.allowPinchZoom,h=e.as,x=h===void 0?"div":h,C=e.gapMode,E=io(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=c,R=ui([r,t]),N=ke(ke({},E),o);return f.createElement(f.Fragment,null,d&&f.createElement(S,{sideCar:co,removeScrollBar:u,shards:p,noIsolation:m,inert:y,setCallbacks:a,allowPinchZoom:!!v,lockRef:r,gapMode:C}),s?f.cloneElement(f.Children.only(i),ke(ke({},N),{ref:R})):f.createElement(x,ke({},N,{className:l,ref:R}),i))});ur.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ur.classNames={fullWidth:Qt,zeroRight:Zt};var vi=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hi(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=vi();return t&&e.setAttribute("nonce",t),e}function mi(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function bi(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var yi=function(){var e=0,t=null;return{add:function(r){e==0&&(t=hi())&&(mi(t,r),bi(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},xi=function(){var e=yi();return function(t,r){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},uo=function(){var e=xi(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},wi={left:0,top:0,right:0,gap:0},Ar=function(e){return parseInt(e||"",10)||0},Ei=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ar(r),Ar(n),Ar(o)]},Ci=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return wi;var t=Ei(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Si=uo(),bt="data-scroll-locked",Ri=function(e,t,r,n){var o=e.left,a=e.top,s=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
68
|
-
.`.concat(
|
|
67
|
+
*/const Ts=cr("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);function Os(e,t){const r=f.createContext(t);function n(a){const{children:s,...i}=a,l=f.useMemo(()=>i,Object.values(i));return m.jsx(r.Provider,{value:l,children:s})}function o(a){const s=f.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,o]}function Ct(e,t=[]){let r=[];function n(a,s){const i=f.createContext(s),l=r.length;r=[...r,s];function u(g){const{scope:c,children:v,...x}=g,h=(c==null?void 0:c[e][l])||i,y=f.useMemo(()=>x,Object.values(x));return m.jsx(h.Provider,{value:y,children:v})}function d(g,c){const v=(c==null?void 0:c[e][l])||i,x=f.useContext(v);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${g}\` must be used within \`${a}\``)}return u.displayName=a+"Provider",[u,d]}const o=()=>{const a=r.map(s=>f.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[n,Ds(o,...t)]}function Ds(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=n.reduce((i,{useScope:l,scopeName:u})=>{const g=l(a)[`__scope${u}`];return{...i,...g}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function Ns(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function to(...e){return t=>e.forEach(r=>Ns(r,t))}function pe(...e){return f.useCallback(to(...e),e)}function ue(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var st=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},ks=f.useId||(()=>{}),_s=0;function Zt(e){const[t,r]=f.useState(ks());return st(()=>{r(n=>n??String(_s++))},[e]),t?`radix-${t}`:""}function Je(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Gr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=js({defaultProp:t,onChange:r}),a=e!==void 0,s=a?e:n,i=Je(r),l=f.useCallback(u=>{if(a){const g=typeof u=="function"?u(e):u;g!==e&&i(g)}else o(u)},[a,e,o,i]);return[s,l]}function js({defaultProp:e,onChange:t}){const r=f.useState(e),[n]=r,o=f.useRef(n),a=Je(t);return f.useEffect(()=>{o.current!==n&&(a(n),o.current=n)},[n,o,a]),r}var Lt=f.forwardRef((e,t)=>{const{children:r,...n}=e,o=f.Children.toArray(r),a=o.find(Ms);if(a){const s=a.props.children,i=o.map(l=>l===a?f.Children.count(s)>1?f.Children.only(null):f.isValidElement(s)?s.props.children:null:l);return m.jsx(_r,{...n,ref:t,children:f.isValidElement(s)?f.cloneElement(s,void 0,i):null})}return m.jsx(_r,{...n,ref:t,children:r})});Lt.displayName="Slot";var _r=f.forwardRef((e,t)=>{const{children:r,...n}=e;if(f.isValidElement(r)){const o=Is(r);return f.cloneElement(r,{...Ls(n,r.props),ref:t?to(t,o):o})}return f.Children.count(r)>1?f.Children.only(null):null});_r.displayName="SlotClone";var qr=({children:e})=>m.jsx(m.Fragment,{children:e});function Ms(e){return f.isValidElement(e)&&e.type===qr}function Ls(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{a(...i),o(...i)}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Is(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var $s=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ie=$s.reduce((e,t)=>{const r=f.forwardRef((n,o)=>{const{asChild:a,...s}=n,i=a?Lt:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(i,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Fs(e,t){e&&Yr.flushSync(()=>e.dispatchEvent(t))}function Bs(e,t=globalThis==null?void 0:globalThis.document){const r=Je(e);f.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Ws="DismissableLayer",jr="dismissableLayer.update",zs="dismissableLayer.pointerDownOutside",Vs="dismissableLayer.focusOutside",wn,ro=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Kr=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=f.useContext(ro),[d,g]=f.useState(null),c=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=f.useState({}),x=pe(t,T=>g(T)),h=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),E=h.indexOf(y),b=d?h.indexOf(d):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,R=b>=E,P=Ys(T=>{const N=T.target,z=[...u.branches].some(Y=>Y.contains(N));!R||z||(o==null||o(T),s==null||s(T),T.defaultPrevented||i==null||i())},c),D=Gs(T=>{const N=T.target;[...u.branches].some(Y=>Y.contains(N))||(a==null||a(T),s==null||s(T),T.defaultPrevented||i==null||i())},c);return Bs(T=>{b===u.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&i&&(T.preventDefault(),i()))},c),f.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(wn=c.body.style.pointerEvents,c.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),En(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(c.body.style.pointerEvents=wn)}},[d,c,r,u]),f.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),En())},[d,u]),f.useEffect(()=>{const T=()=>v({});return document.addEventListener(jr,T),()=>document.removeEventListener(jr,T)},[]),m.jsx(ie.div,{...l,ref:x,style:{pointerEvents:C?R?"auto":"none":void 0,...e.style},onFocusCapture:ue(e.onFocusCapture,D.onFocusCapture),onBlurCapture:ue(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:ue(e.onPointerDownCapture,P.onPointerDownCapture)})});Kr.displayName=Ws;var Hs="DismissableLayerBranch",Us=f.forwardRef((e,t)=>{const r=f.useContext(ro),n=f.useRef(null),o=pe(t,n);return f.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),m.jsx(ie.div,{...e,ref:o})});Us.displayName=Hs;function Ys(e,t=globalThis==null?void 0:globalThis.document){const r=Je(e),n=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const a=i=>{if(i.target&&!n.current){let l=function(){no(zs,r,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Gs(e,t=globalThis==null?void 0:globalThis.document){const r=Je(e),n=f.useRef(!1);return f.useEffect(()=>{const o=a=>{a.target&&!n.current&&no(Vs,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function En(){const e=new CustomEvent(jr);document.dispatchEvent(e)}function no(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Fs(o,a):o.dispatchEvent(a)}var Er="focusScope.autoFocusOnMount",Cr="focusScope.autoFocusOnUnmount",Cn={bubbles:!1,cancelable:!0},qs="FocusScope",oo=f.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=f.useState(null),u=Je(o),d=Je(a),g=f.useRef(null),c=pe(t,h=>l(h)),v=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(n){let h=function(C){if(v.paused||!i)return;const R=C.target;i.contains(R)?g.current=R:Ke(g.current,{select:!0})},y=function(C){if(v.paused||!i)return;const R=C.relatedTarget;R!==null&&(i.contains(R)||Ke(g.current,{select:!0}))},E=function(C){if(document.activeElement===document.body)for(const P of C)P.removedNodes.length>0&&Ke(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const b=new MutationObserver(E);return i&&b.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),b.disconnect()}}},[n,i,v.paused]),f.useEffect(()=>{if(i){Rn.add(v);const h=document.activeElement;if(!i.contains(h)){const E=new CustomEvent(Er,Cn);i.addEventListener(Er,u),i.dispatchEvent(E),E.defaultPrevented||(Ks(ei(ao(i)),{select:!0}),document.activeElement===h&&Ke(i))}return()=>{i.removeEventListener(Er,u),setTimeout(()=>{const E=new CustomEvent(Cr,Cn);i.addEventListener(Cr,d),i.dispatchEvent(E),E.defaultPrevented||Ke(h??document.body,{select:!0}),i.removeEventListener(Cr,d),Rn.remove(v)},0)}}},[i,u,d,v]);const x=f.useCallback(h=>{if(!r&&!n||v.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,E=document.activeElement;if(y&&E){const b=h.currentTarget,[C,R]=Xs(b);C&&R?!h.shiftKey&&E===R?(h.preventDefault(),r&&Ke(C,{select:!0})):h.shiftKey&&E===C&&(h.preventDefault(),r&&Ke(R,{select:!0})):E===b&&h.preventDefault()}},[r,n,v.paused]);return m.jsx(ie.div,{tabIndex:-1,...s,ref:c,onKeyDown:x})});oo.displayName=qs;function Ks(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ke(n,{select:t}),document.activeElement!==r)return}function Xs(e){const t=ao(e),r=Sn(t,e),n=Sn(t.reverse(),e);return[r,n]}function ao(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Sn(e,t){for(const r of e)if(!Js(r,{upTo:t}))return r}function Js(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Zs(e){return e instanceof HTMLInputElement&&"select"in e}function Ke(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Zs(e)&&t&&e.select()}}var Rn=Qs();function Qs(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Pn(e,t),e.unshift(t)},remove(t){var r;e=Pn(e,t),(r=e[0])==null||r.resume()}}}function Pn(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function ei(e){return e.filter(t=>t.tagName!=="A")}var ti="Portal",so=f.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[o,a]=f.useState(!1);st(()=>a(!0),[]);const s=r||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Ur.createPortal(m.jsx(ie.div,{...n,ref:t}),s):null});so.displayName=ti;function ri(e,t){return f.useReducer((r,n)=>t[r][n]??r,e)}var It=e=>{const{present:t,children:r}=e,n=ni(t),o=typeof r=="function"?r({present:n.isPresent}):f.Children.only(r),a=pe(n.ref,oi(o));return typeof r=="function"||n.isPresent?f.cloneElement(o,{ref:a}):null};It.displayName="Presence";function ni(e){const[t,r]=f.useState(),n=f.useRef({}),o=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,l]=ri(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=Ht(n.current);a.current=i==="mounted"?u:"none"},[i]),st(()=>{const u=n.current,d=o.current;if(d!==e){const c=a.current,v=Ht(u);e?l("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&c!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),st(()=>{if(t){const u=g=>{const v=Ht(n.current).includes(g.animationName);g.target===t&&v&&Yr.flushSync(()=>l("ANIMATION_END"))},d=g=>{g.target===t&&(a.current=Ht(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function Ht(e){return(e==null?void 0:e.animationName)||"none"}function oi(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Sr=0;function ai(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??An()),document.body.insertAdjacentElement("beforeend",e[1]??An()),Sr++,()=>{Sr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Sr--}},[])}function An(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var ke=function(){return ke=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},ke.apply(this,arguments)};function io(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function si(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Qt="right-scroll-bar-position",er="width-before-scroll-bar",ii="with-scroll-bars-hidden",li="--removed-body-scroll-bar-size";function Rr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ci(e,t){var r=w.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var ui=typeof window<"u"?f.useLayoutEffect:f.useEffect,Tn=new WeakMap;function di(e,t){var r=ci(null,function(n){return e.forEach(function(o){return Rr(o,n)})});return ui(function(){var n=Tn.get(r);if(n){var o=new Set(n),a=new Set(e),s=r.current;o.forEach(function(i){a.has(i)||Rr(i,null)}),a.forEach(function(i){o.has(i)||Rr(i,s)})}Tn.set(r,e)},[e]),r}function fi(e){return e}function pi(e,t){t===void 0&&(t=fi);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,n);return r.push(s),function(){r=r.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(n=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(i){return a(i)},filter:function(){return r}}},assignMedium:function(a){n=!0;var s=[];if(r.length){var i=r;r=[],i.forEach(a),s=r}var l=function(){var d=s;s=[],d.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),r}}}};return o}function gi(e){e===void 0&&(e={});var t=pi(null);return t.options=ke({async:!0,ssr:!1},e),t}var lo=function(e){var t=e.sideCar,r=io(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return f.createElement(n,ke({},r))};lo.isSideCarExport=!0;function vi(e,t){return e.useMedium(t),lo}var co=gi(),Pr=function(){},ur=f.forwardRef(function(e,t){var r=f.useRef(null),n=f.useState({onScrollCapture:Pr,onWheelCapture:Pr,onTouchMoveCapture:Pr}),o=n[0],a=n[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,g=e.shards,c=e.sideCar,v=e.noIsolation,x=e.inert,h=e.allowPinchZoom,y=e.as,E=y===void 0?"div":y,b=e.gapMode,C=io(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=c,P=di([r,t]),D=ke(ke({},C),o);return f.createElement(f.Fragment,null,d&&f.createElement(R,{sideCar:co,removeScrollBar:u,shards:g,noIsolation:v,inert:x,setCallbacks:a,allowPinchZoom:!!h,lockRef:r,gapMode:b}),s?f.cloneElement(f.Children.only(i),ke(ke({},D),{ref:P})):f.createElement(E,ke({},D,{className:l,ref:P}),i))});ur.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ur.classNames={fullWidth:er,zeroRight:Qt};var hi=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function mi(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=hi();return t&&e.setAttribute("nonce",t),e}function bi(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yi(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var xi=function(){var e=0,t=null;return{add:function(r){e==0&&(t=mi())&&(bi(t,r),yi(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},wi=function(){var e=xi();return function(t,r){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},uo=function(){var e=wi(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Ei={left:0,top:0,right:0,gap:0},Ar=function(e){return parseInt(e||"",10)||0},Ci=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ar(r),Ar(n),Ar(o)]},Si=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ei;var t=Ci(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Ri=uo(),bt="data-scroll-locked",Pi=function(e,t,r,n){var o=e.left,a=e.top,s=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
68
|
+
.`.concat(ii,` {
|
|
69
69
|
overflow: hidden `).concat(n,`;
|
|
70
70
|
padding-right: `).concat(i,"px ").concat(n,`;
|
|
71
71
|
}
|
|
@@ -82,42 +82,42 @@ Check the top-level render call using <`+T+">.")}return P}}function he(g,P){{if(
|
|
|
82
82
|
`),r==="padding"&&"padding-right: ".concat(i,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
.`).concat(
|
|
85
|
+
.`).concat(Qt,` {
|
|
86
86
|
right: `).concat(i,"px ").concat(n,`;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
.`).concat(
|
|
89
|
+
.`).concat(er,` {
|
|
90
90
|
margin-right: `).concat(i,"px ").concat(n,`;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
.`).concat(
|
|
93
|
+
.`).concat(Qt," .").concat(Qt,` {
|
|
94
94
|
right: 0 `).concat(n,`;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
.`).concat(
|
|
97
|
+
.`).concat(er," .").concat(er,` {
|
|
98
98
|
margin-right: 0 `).concat(n,`;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
body[`).concat(bt,`] {
|
|
102
|
-
`).concat(
|
|
102
|
+
`).concat(li,": ").concat(i,`px;
|
|
103
103
|
}
|
|
104
|
-
`)},On=function(){var e=parseInt(document.body.getAttribute(bt)||"0",10);return isFinite(e)?e:0},
|
|
104
|
+
`)},On=function(){var e=parseInt(document.body.getAttribute(bt)||"0",10);return isFinite(e)?e:0},Ai=function(){f.useEffect(function(){return document.body.setAttribute(bt,(On()+1).toString()),function(){var e=On()-1;e<=0?document.body.removeAttribute(bt):document.body.setAttribute(bt,e.toString())}},[])},Ti=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Ai();var a=f.useMemo(function(){return Si(o)},[o]);return f.createElement(Ri,{styles:Pi(a,!t,o,r?"":"!important")})},Mr=!1;if(typeof window<"u")try{var Ut=Object.defineProperty({},"passive",{get:function(){return Mr=!0,!0}});window.addEventListener("test",Ut,Ut),window.removeEventListener("test",Ut,Ut)}catch{Mr=!1}var vt=Mr?{passive:!1}:!1,Oi=function(e){return e.tagName==="TEXTAREA"},fo=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Oi(e)&&r[t]==="visible")},Di=function(e){return fo(e,"overflowY")},Ni=function(e){return fo(e,"overflowX")},Dn=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=po(e,n);if(o){var a=go(e,n),s=a[1],i=a[2];if(s>i)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},ki=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},_i=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},po=function(e,t){return e==="v"?Di(t):Ni(t)},go=function(e,t){return e==="v"?ki(t):_i(t)},ji=function(e,t){return e==="h"&&t==="rtl"?-1:1},Mi=function(e,t,r,n,o){var a=ji(e,window.getComputedStyle(t).direction),s=a*n,i=r.target,l=t.contains(i),u=!1,d=s>0,g=0,c=0;do{var v=go(e,i),x=v[0],h=v[1],y=v[2],E=h-y-a*x;(x||E)&&po(e,i)&&(g+=E,c+=x),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(d&&(Math.abs(g)<1||!o)||!d&&(Math.abs(c)<1||!o))&&(u=!0),u},Yt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Nn=function(e){return[e.deltaX,e.deltaY]},kn=function(e){return e&&"current"in e?e.current:e},Li=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ii=function(e){return`
|
|
105
105
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
106
106
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
107
|
-
`)}
|
|
107
|
+
`)},$i=0,ht=[];function Fi(e){var t=f.useRef([]),r=f.useRef([0,0]),n=f.useRef(),o=f.useState($i++)[0],a=f.useState(uo)[0],s=f.useRef(e);f.useEffect(function(){s.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=si([e.lockRef.current],(e.shards||[]).map(kn),!0).filter(Boolean);return h.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=f.useCallback(function(h,y){if("touches"in h&&h.touches.length===2)return!s.current.allowPinchZoom;var E=Yt(h),b=r.current,C="deltaX"in h?h.deltaX:b[0]-E[0],R="deltaY"in h?h.deltaY:b[1]-E[1],P,D=h.target,T=Math.abs(C)>Math.abs(R)?"h":"v";if("touches"in h&&T==="h"&&D.type==="range")return!1;var N=Dn(T,D);if(!N)return!0;if(N?P=T:(P=T==="v"?"h":"v",N=Dn(T,D)),!N)return!1;if(!n.current&&"changedTouches"in h&&(C||R)&&(n.current=P),!P)return!0;var z=n.current||P;return Mi(z,y,h,z==="h"?C:R,!0)},[]),l=f.useCallback(function(h){var y=h;if(!(!ht.length||ht[ht.length-1]!==a)){var E="deltaY"in y?Nn(y):Yt(y),b=t.current.filter(function(P){return P.name===y.type&&(P.target===y.target||y.target===P.shadowParent)&&Li(P.delta,E)})[0];if(b&&b.should){y.cancelable&&y.preventDefault();return}if(!b){var C=(s.current.shards||[]).map(kn).filter(Boolean).filter(function(P){return P.contains(y.target)}),R=C.length>0?i(y,C[0]):!s.current.noIsolation;R&&y.cancelable&&y.preventDefault()}}},[]),u=f.useCallback(function(h,y,E,b){var C={name:h,delta:y,target:E,should:b,shadowParent:Bi(E)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(R){return R!==C})},1)},[]),d=f.useCallback(function(h){r.current=Yt(h),n.current=void 0},[]),g=f.useCallback(function(h){u(h.type,Nn(h),h.target,i(h,e.lockRef.current))},[]),c=f.useCallback(function(h){u(h.type,Yt(h),h.target,i(h,e.lockRef.current))},[]);f.useEffect(function(){return ht.push(a),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:c}),document.addEventListener("wheel",l,vt),document.addEventListener("touchmove",l,vt),document.addEventListener("touchstart",d,vt),function(){ht=ht.filter(function(h){return h!==a}),document.removeEventListener("wheel",l,vt),document.removeEventListener("touchmove",l,vt),document.removeEventListener("touchstart",d,vt)}},[]);var v=e.removeScrollBar,x=e.inert;return f.createElement(f.Fragment,null,x?f.createElement(a,{styles:Ii(o)}):null,v?f.createElement(Ti,{gapMode:e.gapMode}):null)}function Bi(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Wi=vi(co,Fi);var vo=f.forwardRef(function(e,t){return f.createElement(ur,ke({},e,{ref:t,sideCar:Wi}))});vo.classNames=ur.classNames;var zi=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},mt=new WeakMap,Gt=new WeakMap,qt={},Tr=0,ho=function(e){return e&&(e.host||ho(e.parentNode))},Vi=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=ho(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Hi=function(e,t,r,n){var o=Vi(t,Array.isArray(e)?e:[e]);qt[r]||(qt[r]=new WeakMap);var a=qt[r],s=[],i=new Set,l=new Set(o),u=function(g){!g||i.has(g)||(i.add(g),u(g.parentNode))};o.forEach(u);var d=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(c){if(i.has(c))d(c);else try{var v=c.getAttribute(n),x=v!==null&&v!=="false",h=(mt.get(c)||0)+1,y=(a.get(c)||0)+1;mt.set(c,h),a.set(c,y),s.push(c),h===1&&x&&Gt.set(c,!0),y===1&&c.setAttribute(r,"true"),x||c.setAttribute(n,"true")}catch(E){console.error("aria-hidden: cannot operate on ",c,E)}})};return d(t),i.clear(),Tr++,function(){s.forEach(function(g){var c=mt.get(g)-1,v=a.get(g)-1;mt.set(g,c),a.set(g,v),c||(Gt.has(g)||g.removeAttribute(n),Gt.delete(g)),v||g.removeAttribute(r)}),Tr--,Tr||(mt=new WeakMap,mt=new WeakMap,Gt=new WeakMap,qt={})}},Ui=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=zi(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),Hi(n,o,r,"aria-hidden")):function(){return null}},Xr="Dialog",[mo,bo]=Ct(Xr),[Yi,Oe]=mo(Xr),yo=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=f.useRef(null),l=f.useRef(null),[u=!1,d]=Gr({prop:n,defaultProp:o,onChange:a});return m.jsx(Yi,{scope:t,triggerRef:i,contentRef:l,contentId:Zt(),titleId:Zt(),descriptionId:Zt(),open:u,onOpenChange:d,onOpenToggle:f.useCallback(()=>d(g=>!g),[d]),modal:s,children:r})};yo.displayName=Xr;var xo="DialogTrigger",wo=f.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Oe(xo,r),a=pe(t,o.triggerRef);return m.jsx(ie.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Qr(o.open),...n,ref:a,onClick:ue(e.onClick,o.onOpenToggle)})});wo.displayName=xo;var Jr="DialogPortal",[Gi,Eo]=mo(Jr,{forceMount:void 0}),Co=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=Oe(Jr,t);return m.jsx(Gi,{scope:t,forceMount:r,children:f.Children.map(n,s=>m.jsx(It,{present:r||a.open,children:m.jsx(so,{asChild:!0,container:o,children:s})}))})};Co.displayName=Jr;var nr="DialogOverlay",So=f.forwardRef((e,t)=>{const r=Eo(nr,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=Oe(nr,e.__scopeDialog);return a.modal?m.jsx(It,{present:n||a.open,children:m.jsx(qi,{...o,ref:t})}):null});So.displayName=nr;var qi=f.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Oe(nr,r);return m.jsx(vo,{as:Lt,allowPinchZoom:!0,shards:[o.contentRef],children:m.jsx(ie.div,{"data-state":Qr(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),it="DialogContent",Ro=f.forwardRef((e,t)=>{const r=Eo(it,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=Oe(it,e.__scopeDialog);return m.jsx(It,{present:n||a.open,children:a.modal?m.jsx(Ki,{...o,ref:t}):m.jsx(Xi,{...o,ref:t})})});Ro.displayName=it;var Ki=f.forwardRef((e,t)=>{const r=Oe(it,e.__scopeDialog),n=f.useRef(null),o=pe(t,r.contentRef,n);return f.useEffect(()=>{const a=n.current;if(a)return Ui(a)},[]),m.jsx(Po,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ue(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=r.triggerRef.current)==null||s.focus()}),onPointerDownOutside:ue(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:ue(e.onFocusOutside,a=>a.preventDefault())})}),Xi=f.forwardRef((e,t)=>{const r=Oe(it,e.__scopeDialog),n=f.useRef(!1),o=f.useRef(!1);return m.jsx(Po,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Po=f.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=Oe(it,r),l=f.useRef(null),u=pe(t,l);return ai(),m.jsxs(m.Fragment,{children:[m.jsx(oo,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx(Kr,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Qr(i.open),...s,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(Zi,{titleId:i.titleId}),m.jsx(el,{contentRef:l,descriptionId:i.descriptionId})]})]})}),Zr="DialogTitle",Ao=f.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Oe(Zr,r);return m.jsx(ie.h2,{id:o.titleId,...n,ref:t})});Ao.displayName=Zr;var To="DialogDescription",Oo=f.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Oe(To,r);return m.jsx(ie.p,{id:o.descriptionId,...n,ref:t})});Oo.displayName=To;var Do="DialogClose",No=f.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Oe(Do,r);return m.jsx(ie.button,{type:"button",...n,ref:t,onClick:ue(e.onClick,()=>o.onOpenChange(!1))})});No.displayName=Do;function Qr(e){return e?"open":"closed"}var ko="DialogTitleWarning",[Ji,_o]=Os(ko,{contentName:it,titleName:Zr,docsSlug:"dialog"}),Zi=({titleId:e})=>{const t=_o(ko),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
108
108
|
|
|
109
109
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
110
110
|
|
|
111
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},
|
|
111
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Qi="DialogDescriptionWarning",el=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${_o(Qi).contentName}}.`;return f.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},tl=yo,rl=wo,nl=Co,ol=So,al=Ro,sl=Ao,il=Oo,jo=No,Mo="AlertDialog",[ll,zd]=Ct(Mo,[bo]),ze=bo(),Lo=e=>{const{__scopeAlertDialog:t,...r}=e,n=ze(t);return m.jsx(tl,{...n,...r,modal:!0})};Lo.displayName=Mo;var cl="AlertDialogTrigger",Io=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=ze(r);return m.jsx(rl,{...o,...n,ref:t})});Io.displayName=cl;var ul="AlertDialogPortal",$o=e=>{const{__scopeAlertDialog:t,...r}=e,n=ze(t);return m.jsx(nl,{...n,...r})};$o.displayName=ul;var dl="AlertDialogOverlay",Fo=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=ze(r);return m.jsx(ol,{...o,...n,ref:t})});Fo.displayName=dl;var yt="AlertDialogContent",[fl,pl]=ll(yt),Bo=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...o}=e,a=ze(r),s=f.useRef(null),i=pe(t,s),l=f.useRef(null);return m.jsx(Ji,{contentName:yt,titleName:Wo,docsSlug:"alert-dialog",children:m.jsx(fl,{scope:r,cancelRef:l,children:m.jsxs(al,{role:"alertdialog",...a,...o,ref:i,onOpenAutoFocus:ue(o.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=l.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[m.jsx(qr,{children:n}),m.jsx(vl,{contentRef:s})]})})})});Bo.displayName=yt;var Wo="AlertDialogTitle",zo=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=ze(r);return m.jsx(sl,{...o,...n,ref:t})});zo.displayName=Wo;var Vo="AlertDialogDescription",Ho=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=ze(r);return m.jsx(il,{...o,...n,ref:t})});Ho.displayName=Vo;var gl="AlertDialogAction",Uo=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=ze(r);return m.jsx(jo,{...o,...n,ref:t})});Uo.displayName=gl;var Yo="AlertDialogCancel",Go=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=pl(Yo,r),a=ze(r),s=pe(t,o);return m.jsx(jo,{...a,...n,ref:s})});Go.displayName=Yo;var vl=({contentRef:e})=>{const t=`\`${yt}\` requires a description for the component to be accessible for screen reader users.
|
|
112
112
|
|
|
113
113
|
You can add a description to the \`${yt}\` by passing a \`${Vo}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
114
114
|
|
|
115
115
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${yt}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
116
116
|
|
|
117
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return f.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},vl=Lo,hl=Io,ml=$o,qo=Fo,Ko=Bo,Xo=Uo,Jo=Go,Zo=zo,Qo=Ho;function ea(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=ea(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function bl(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=ea(e))&&(n&&(n+=" "),n+=t);return n}const en="-";function yl(e){const t=wl(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;function o(s){const i=s.split(en);return i[0]===""&&i.length!==1&&i.shift(),ta(i,t)||xl(s)}function a(s,i){const l=r[s]||[];return i&&n[s]?[...l,...n[s]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:a}}function ta(e,t){var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?ta(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(en);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId}const _n=/^\[(.+)\]$/;function xl(e){if(_n.test(e)){const t=_n.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function wl(e){const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return Cl(Object.entries(e.classGroups),r).forEach(([a,s])=>{Lr(s,n,a,t)}),n}function Lr(e,t,r,n){e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:jn(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(El(o)){Lr(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,s])=>{Lr(s,jn(t,a),r,n)})})}function jn(e,t){let r=e;return t.split(en).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function El(e){return e.isThemeGetter}function Cl(e,t){return t?e.map(([r,n])=>{const o=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,i])=>[t+s,i])):a);return[r,o]}):e}function Sl(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;function o(a,s){r.set(a,s),t++,t>e&&(t=0,n=r,r=new Map)}return{get(a){let s=r.get(a);if(s!==void 0)return s;if((s=n.get(a))!==void 0)return o(a,s),s},set(a,s){r.has(a)?r.set(a,s):o(a,s)}}}const ra="!";function Rl(e){const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,o=t[0],a=t.length;function s(i){const l=[];let u=0,d=0,p;for(let h=0;h<i.length;h++){let x=i[h];if(u===0){if(x===o&&(n||i.slice(h,h+a)===t)){l.push(i.slice(d,h)),d=h+a;continue}if(x==="/"){p=h;continue}}x==="["?u++:x==="]"&&u--}const c=l.length===0?i:i.substring(d),m=c.startsWith(ra),y=m?c.substring(1):c,v=p&&p>d?p-d:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:y,maybePostfixModifierPosition:v}}return r?function(l){return r({className:l,parseClassName:s})}:s}function Pl(e){if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t}function Al(e){return{cache:Sl(e.cacheSize),parseClassName:Rl(e),...yl(e)}}const Tl=/\s+/;function Ol(e,t){const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,a=new Set;return e.trim().split(Tl).map(s=>{const{modifiers:i,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:d}=r(s);let p=!!d,c=n(p?u.substring(0,d):u);if(!c){if(!p)return{isTailwindClass:!1,originalClassName:s};if(c=n(u),!c)return{isTailwindClass:!1,originalClassName:s};p=!1}const m=Pl(i).join(":");return{isTailwindClass:!0,modifierId:l?m+ra:m,classGroupId:c,originalClassName:s,hasPostfixModifier:p}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:i,classGroupId:l,hasPostfixModifier:u}=s,d=i+l;return a.has(d)?!1:(a.add(d),o(l,u).forEach(p=>a.add(i+p)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function Nl(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=na(t))&&(n&&(n+=" "),n+=r);return n}function na(e){if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=na(e[n]))&&(r&&(r+=" "),r+=t);return r}function Dl(e,...t){let r,n,o,a=s;function s(l){const u=t.reduce((d,p)=>p(d),e());return r=Al(u),n=r.cache.get,o=r.cache.set,a=i,i(l)}function i(l){const u=n(l);if(u)return u;const d=Ol(l,r);return o(l,d),d}return function(){return a(Nl.apply(null,arguments))}}function te(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const oa=/^\[(?:([a-z-]+):)?(.+)\]$/i,kl=/^\d+\/\d+$/,_l=new Set(["px","full","screen"]),jl=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ml=/\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$/,Ll=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Il=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$l=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Fe(e){return at(e)||_l.has(e)||kl.test(e)}function Ge(e){return St(e,"length",Yl)}function at(e){return!!e&&!Number.isNaN(Number(e))}function qt(e){return St(e,"number",at)}function Dt(e){return!!e&&Number.isInteger(Number(e))}function Fl(e){return e.endsWith("%")&&at(e.slice(0,-1))}function W(e){return oa.test(e)}function qe(e){return jl.test(e)}const Bl=new Set(["length","size","percentage"]);function Wl(e){return St(e,Bl,aa)}function zl(e){return St(e,"position",aa)}const Vl=new Set(["image","url"]);function Hl(e){return St(e,Vl,ql)}function Ul(e){return St(e,"",Gl)}function kt(){return!0}function St(e,t,r){const n=oa.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1}function Yl(e){return Ml.test(e)&&!Ll.test(e)}function aa(){return!1}function Gl(e){return Il.test(e)}function ql(e){return $l.test(e)}function Kl(){const e=te("colors"),t=te("spacing"),r=te("blur"),n=te("brightness"),o=te("borderColor"),a=te("borderRadius"),s=te("borderSpacing"),i=te("borderWidth"),l=te("contrast"),u=te("grayscale"),d=te("hueRotate"),p=te("invert"),c=te("gap"),m=te("gradientColorStops"),y=te("gradientColorStopPositions"),v=te("inset"),h=te("margin"),x=te("opacity"),C=te("padding"),E=te("saturate"),S=te("scale"),R=te("sepia"),N=te("skew"),A=te("space"),k=te("translate"),U=()=>["auto","contain","none"],Y=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",W,t],_=()=>[W,t],X=()=>["",Fe,Ge],F=()=>["auto",at,W],z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],D=()=>["start","end","center","between","around","evenly","stretch"],B=()=>["","0",W],ce=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>[at,qt],j=()=>[at,W];return{cacheSize:500,separator:":",theme:{colors:[kt],spacing:[Fe,Ge],blur:["none","",qe,W],brightness:O(),borderColor:[e],borderRadius:["none","","full",qe,W],borderSpacing:_(),borderWidth:X(),contrast:O(),grayscale:B(),hueRotate:j(),invert:B(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[Fl,Ge],inset:q(),margin:q(),opacity:O(),padding:_(),saturate:O(),scale:O(),sepia:B(),skew:j(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",W]}],container:["container"],columns:[{columns:[qe]}],"break-after":[{"break-after":ce()}],"break-before":[{"break-before":ce()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...z(),W]}],overflow:[{overflow:Y()}],"overflow-x":[{"overflow-x":Y()}],"overflow-y":[{"overflow-y":Y()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Dt,W]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",W]}],grow:[{grow:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",Dt,W]}],"grid-cols":[{"grid-cols":[kt]}],"col-start-end":[{col:["auto",{span:["full",Dt,W]},W]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[kt]}],"row-start-end":[{row:["auto",{span:[Dt,W]},W]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",W]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",W]}],gap:[{gap:[c]}],"gap-x":[{"gap-x":[c]}],"gap-y":[{"gap-y":[c]}],"justify-content":[{justify:["normal",...D()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...D(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...D(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[C]}],px:[{px:[C]}],py:[{py:[C]}],ps:[{ps:[C]}],pe:[{pe:[C]}],pt:[{pt:[C]}],pr:[{pr:[C]}],pb:[{pb:[C]}],pl:[{pl:[C]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],me:[{me:[h]}],mt:[{mt:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",W,t]}],"min-w":[{"min-w":[W,t,"min","max","fit"]}],"max-w":[{"max-w":[W,t,"none","full","min","max","fit","prose",{screen:[qe]},qe]}],h:[{h:[W,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[W,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[W,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[W,t,"auto","min","max","fit"]}],"font-size":[{text:["base",qe,Ge]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",qt]}],"font-family":[{font:[kt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",W]}],"line-clamp":[{"line-clamp":["none",at,qt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Fe,W]}],"list-image":[{"list-image":["none",W]}],"list-style-type":[{list:["none","disc","decimal",W]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Fe,Ge]}],"underline-offset":[{"underline-offset":["auto",Fe,W]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",W]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",W]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...z(),zl]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Wl]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Hl]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:H()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[Fe,W]}],"outline-w":[{outline:[Fe,Ge]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[Fe,Ge]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",qe,Ul]}],"shadow-color":[{shadow:[kt]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...L(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":L()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",qe,W]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[p]}],saturate:[{saturate:[E]}],sepia:[{sepia:[R]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[R]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",W]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",W]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",W]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Dt,W]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",W]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",W]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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",W]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Fe,Ge,qt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const Xl=Dl(Kl);function de(...e){return Xl(bl(e))}function sa(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=sa(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Jl(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=sa(e))&&(n&&(n+=" "),n+=t);return n}const Mn=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Ln=Jl,ia=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Ln(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(u=>{const d=r==null?void 0:r[u],p=a==null?void 0:a[u];if(d===null)return null;const c=Mn(d)||Mn(p);return o[u][c]}),i=r&&Object.entries(r).reduce((u,d)=>{let[p,c]=d;return c===void 0||(u[p]=c),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:p,className:c,...m}=d;return Object.entries(m).every(y=>{let[v,h]=y;return Array.isArray(h)?h.includes({...a,...i}[v]):{...a,...i}[v]===h})?[...u,p,c]:u},[]);return Ln(e,s,l,r==null?void 0:r.class,r==null?void 0:r.className)},tn=ia("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-secondary active:bg-primary-foreground active:text-primary active:border-primary focus:border-2",secondary:"bg-primary-foreground text-primary border-2 border-primary hover:bg-primary hover:text-primary-foreground active:bg-secondary active:text-secondary-foreground focus:border-2",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border-primary border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 rounded-md px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Zl=f.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},a)=>{const s=n?Mt:"button";return b.jsx(s,{className:de(tn({variant:t,size:r,className:e})),ref:a,...o})});Zl.displayName="Button";const Ql=vl,ec=hl,tc=ml,la=f.forwardRef(({className:e,...t},r)=>b.jsx(qo,{className:de("ve-fixed ve-inset-0 ve-z-50 ve-bg-black/80 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0",e),...t,ref:r}));la.displayName=qo.displayName;const ca=f.forwardRef(({className:e,...t},r)=>b.jsxs(tc,{children:[b.jsx(la,{}),b.jsx(Ko,{ref:r,className:de("ve-fixed ve-left-[50%] ve-top-[50%] ve-z-50 ve-grid ve-w-full ve-max-w-lg ve-translate-x-[-50%] ve-translate-y-[-50%] ve-gap-4 ve-border ve-bg-background ve-p-6 ve-shadow-lg ve-duration-200 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0 data-[state=closed]:ve-zoom-out-95 data-[state=open]:ve-zoom-in-95 data-[state=closed]:ve-slide-out-to-left-1/2 data-[state=closed]:ve-slide-out-to-top-[48%] data-[state=open]:ve-slide-in-from-left-1/2 data-[state=open]:ve-slide-in-from-top-[48%] sm:ve-rounded-lg",e),...t})]}));ca.displayName=Ko.displayName;const ua=({className:e,...t})=>b.jsx("div",{className:de("ve-flex ve-flex-col ve-space-y-2 ve-text-center sm:ve-text-left",e),...t});ua.displayName="AlertDialogHeader";const da=({className:e,...t})=>b.jsx("div",{className:de("ve-flex ve-flex-col-reverse sm:ve-flex-row sm:ve-justify-end sm:ve-space-x-2",e),...t});da.displayName="AlertDialogFooter";const fa=f.forwardRef(({className:e,...t},r)=>b.jsx(Zo,{ref:r,className:de("ve-text-lg ve-font-semibold",e),...t}));fa.displayName=Zo.displayName;const pa=f.forwardRef(({className:e,...t},r)=>b.jsx(Qo,{ref:r,className:de("ve-text-sm ve-text-muted-foreground",e),...t}));pa.displayName=Qo.displayName;const rc=f.forwardRef(({className:e,...t},r)=>b.jsx(Xo,{ref:r,className:de(tn(),e),...t}));rc.displayName=Xo.displayName;const ga=f.forwardRef(({className:e,...t},r)=>b.jsx(Jo,{ref:r,className:de(tn({variant:"outline"}),"ve-mt-2 sm:ve-mt-0",e),...t}));ga.displayName=Jo.displayName;const nc=ia("ve-inline-flex ve-items-center ve-justify-center ve-whitespace-nowrap ve-rounded-md ve-text-sm ve-font-medium ve-ring-offset-background ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 disabled:ve-pointer-events-none disabled:ve-opacity-50",{variants:{variant:{default:"ve-bg-primary ve-text-primary-foreground hover:ve-bg-primary/90",destructive:"ve-bg-destructive ve-text-destructive-foreground hover:ve-bg-destructive/90",outline:"ve-border ve-border-input ve-bg-background hover:ve-bg-accent hover:ve-text-accent-foreground",secondary:"ve-bg-secondary ve-text-secondary-foreground hover:ve-bg-secondary/80",ghost:"hover:ve-bg-accent hover:ve-text-accent-foreground",link:"ve-text-primary ve-underline-offset-4 hover:ve-underline"},size:{default:"ve-h-10 ve-rounded-md ve-px-4 ve-py-2",sm:"ve-h-9 ve-rounded-md ve-px-3",lg:"ve-h-11 ve-rounded-md ve-px-8",icon:"ve-h-10 ve-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Xe=f.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},a)=>{const s=n?Mt:"button";return b.jsx(s,{className:de(nc({variant:t,size:r,className:e})),ref:a,...o})});Xe.displayName="Button";function oc(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function va(e){const[t,r]=f.useState(void 0);return st(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;r({width:s,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var rn="Switch",[ac,Fd]=Ct(rn),[sc,ic]=ac(rn),ha=f.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:s,disabled:i,value:l="on",onCheckedChange:u,...d}=e,[p,c]=f.useState(null),m=fe(t,C=>c(C)),y=f.useRef(!1),v=p?!!p.closest("form"):!0,[h=!1,x]=Gr({prop:o,defaultProp:a,onChange:u});return b.jsxs(sc,{scope:r,checked:h,disabled:i,children:[b.jsx(se.button,{type:"button",role:"switch","aria-checked":h,"aria-required":s,"data-state":ya(h),"data-disabled":i?"":void 0,disabled:i,value:l,...d,ref:m,onClick:le(e.onClick,C=>{x(E=>!E),v&&(y.current=C.isPropagationStopped(),y.current||C.stopPropagation())})}),v&&b.jsx(lc,{control:p,bubbles:!y.current,name:n,value:l,checked:h,required:s,disabled:i,style:{transform:"translateX(-100%)"}})]})});ha.displayName=rn;var ma="SwitchThumb",ba=f.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=ic(ma,r);return b.jsx(se.span,{"data-state":ya(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});ba.displayName=ma;var lc=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,a=f.useRef(null),s=oc(r),i=va(t);return f.useEffect(()=>{const l=a.current,u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==r&&p){const c=new Event("click",{bubbles:n});p.call(l,r),l.dispatchEvent(c)}},[s,r,n]),b.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:a,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function ya(e){return e?"checked":"unchecked"}var xa=ha,cc=ba;const wa=f.forwardRef(({className:e,...t},r)=>b.jsx(xa,{className:de("ve-self-center ve-peer ve-inline-flex ve-h-5 ve-w-9 ve-shrink-0 ve-cursor-pointer ve-items-center ve-rounded-full ve-border-2 ve-border-transparent ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 focus-visible:ve-ring-offset-background disabled:ve-cursor-not-allowed disabled:ve-opacity-50 data-[state=checked]:ve-bg-primary data-[state=unchecked]:ve-bg-input",e),...t,ref:r,children:b.jsx(cc,{className:de("ve-self-center ve-pointer-events-none ve-block ve-h-4 ve-w-4 ve-rounded-full ve-bg-background ve-shadow-lg ve-ring-0 ve-transition-transform data-[state=checked]:ve-translate-x-4 data-[state=unchecked]:ve-translate-x-0")})}));wa.displayName=xa.displayName;const uc=["top","right","bottom","left"],_e=Math.min,be=Math.max,or=Math.round,Kt=Math.floor,Ze=e=>({x:e,y:e}),dc={left:"right",right:"left",bottom:"top",top:"bottom"},fc={start:"end",end:"start"};function Ir(e,t,r){return be(e,_e(t,r))}function Be(e,t){return typeof e=="function"?e(t):e}function We(e){return e.split("-")[0]}function Rt(e){return e.split("-")[1]}function nn(e){return e==="x"?"y":"x"}function on(e){return e==="y"?"height":"width"}function Qe(e){return["top","bottom"].includes(We(e))?"y":"x"}function an(e){return nn(Qe(e))}function pc(e,t,r){r===void 0&&(r=!1);const n=Rt(e),o=an(e),a=on(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=ar(s)),[s,ar(s)]}function gc(e){const t=ar(e);return[$r(e),t,$r(t)]}function $r(e){return e.replace(/start|end/g,t=>fc[t])}function vc(e,t,r){const n=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?a:s;default:return[]}}function hc(e,t,r,n){const o=Rt(e);let a=vc(We(e),r==="start",n);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map($r)))),a}function ar(e){return e.replace(/left|right|bottom|top/g,t=>dc[t])}function mc(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ea(e){return typeof e!="number"?mc(e):{top:e,right:e,bottom:e,left:e}}function sr(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function In(e,t,r){let{reference:n,floating:o}=e;const a=Qe(t),s=an(t),i=on(s),l=We(t),u=a==="y",d=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,c=n[i]/2-o[i]/2;let m;switch(l){case"top":m={x:d,y:n.y-o.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:p};break;case"left":m={x:n.x-o.width,y:p};break;default:m={x:n.x,y:n.y}}switch(Rt(t)){case"start":m[s]-=c*(r&&u?-1:1);break;case"end":m[s]+=c*(r&&u?-1:1);break}return m}const bc=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,i=a.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:p}=In(u,n,l),c=n,m={},y=0;for(let v=0;v<i.length;v++){const{name:h,fn:x}=i[v],{x:C,y:E,data:S,reset:R}=await x({x:d,y:p,initialPlacement:n,placement:c,strategy:o,middlewareData:m,rects:u,platform:s,elements:{reference:e,floating:t}});d=C??d,p=E??p,m={...m,[h]:{...m[h],...S}},R&&y<=50&&(y++,typeof R=="object"&&(R.placement&&(c=R.placement),R.rects&&(u=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:d,y:p}=In(u,c,l)),v=-1)}return{x:d,y:p,placement:c,strategy:o,middlewareData:m}};async function _t(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:c=!1,padding:m=0}=Be(t,e),y=Ea(m),h=i[c?p==="floating"?"reference":"floating":p],x=sr(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(h)))==null||r?h:h.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:d,strategy:l})),C=p==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),S=await(a.isElement==null?void 0:a.isElement(E))?await(a.getScale==null?void 0:a.getScale(E))||{x:1,y:1}:{x:1,y:1},R=sr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:C,offsetParent:E,strategy:l}):C);return{top:(x.top-R.top+y.top)/S.y,bottom:(R.bottom-x.bottom+y.bottom)/S.y,left:(x.left-R.left+y.left)/S.x,right:(R.right-x.right+y.right)/S.x}}const yc=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:d=0}=Be(e,t)||{};if(u==null)return{};const p=Ea(d),c={x:r,y:n},m=an(o),y=on(m),v=await s.getDimensions(u),h=m==="y",x=h?"top":"left",C=h?"bottom":"right",E=h?"clientHeight":"clientWidth",S=a.reference[y]+a.reference[m]-c[m]-a.floating[y],R=c[m]-a.reference[m],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let A=N?N[E]:0;(!A||!await(s.isElement==null?void 0:s.isElement(N)))&&(A=i.floating[E]||a.floating[y]);const k=S/2-R/2,U=A/2-v[y]/2-1,Y=_e(p[x],U),q=_e(p[C],U),_=Y,X=A-v[y]-q,F=A/2-v[y]/2+k,z=Ir(_,F,X),H=!l.arrow&&Rt(o)!=null&&F!==z&&a.reference[y]/2-(F<_?Y:q)-v[y]/2<0,L=H?F<_?F-_:F-X:0;return{[m]:c[m]+L,data:{[m]:z,centerOffset:F-z-L,...H&&{alignmentOffset:L}},reset:H}}}),xc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:c,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...h}=Be(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const x=We(o),C=Qe(i),E=We(i)===i,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),R=c||(E||!v?[ar(i)]:gc(i)),N=y!=="none";!c&&N&&R.push(...hc(i,v,y,S));const A=[i,...R],k=await _t(t,h),U=[];let Y=((n=a.flip)==null?void 0:n.overflows)||[];if(d&&U.push(k[x]),p){const F=pc(o,s,S);U.push(k[F[0]],k[F[1]])}if(Y=[...Y,{placement:o,overflows:U}],!U.every(F=>F<=0)){var q,_;const F=(((q=a.flip)==null?void 0:q.index)||0)+1,z=A[F];if(z)return{data:{index:F,overflows:Y},reset:{placement:z}};let H=(_=Y.filter(L=>L.overflows[0]<=0).sort((L,D)=>L.overflows[1]-D.overflows[1])[0])==null?void 0:_.placement;if(!H)switch(m){case"bestFit":{var X;const L=(X=Y.filter(D=>{if(N){const B=Qe(D.placement);return B===C||B==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(B=>B>0).reduce((B,ce)=>B+ce,0)]).sort((D,B)=>D[1]-B[1])[0])==null?void 0:X[0];L&&(H=L);break}case"initialPlacement":H=i;break}if(o!==H)return{reset:{placement:H}}}return{}}}};function $n(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Fn(e){return uc.some(t=>e[t]>=0)}const wc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Be(e,t);switch(n){case"referenceHidden":{const a=await _t(t,{...o,elementContext:"reference"}),s=$n(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Fn(s)}}}case"escaped":{const a=await _t(t,{...o,altBoundary:!0}),s=$n(a,r.floating);return{data:{escapedOffsets:s,escaped:Fn(s)}}}default:return{}}}}};async function Ec(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=We(r),i=Rt(r),l=Qe(r)==="y",u=["left","top"].includes(s)?-1:1,d=a&&l?-1:1,p=Be(t,e);let{mainAxis:c,crossAxis:m,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return i&&typeof y=="number"&&(m=i==="end"?y*-1:y),l?{x:m*d,y:c*u}:{x:c*u,y:m*d}}const Cc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await Ec(t,e);return s===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},Sc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:h=>{let{x,y:C}=h;return{x,y:C}}},...l}=Be(e,t),u={x:r,y:n},d=await _t(t,l),p=Qe(We(o)),c=nn(p);let m=u[c],y=u[p];if(a){const h=c==="y"?"top":"left",x=c==="y"?"bottom":"right",C=m+d[h],E=m-d[x];m=Ir(C,m,E)}if(s){const h=p==="y"?"top":"left",x=p==="y"?"bottom":"right",C=y+d[h],E=y-d[x];y=Ir(C,y,E)}const v=i.fn({...t,[c]:m,[p]:y});return{...v,data:{x:v.x-r,y:v.y-n}}}}},Rc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=Be(e,t),d={x:r,y:n},p=Qe(o),c=nn(p);let m=d[c],y=d[p];const v=Be(i,t),h=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const E=c==="y"?"height":"width",S=a.reference[c]-a.floating[E]+h.mainAxis,R=a.reference[c]+a.reference[E]-h.mainAxis;m<S?m=S:m>R&&(m=R)}if(u){var x,C;const E=c==="y"?"width":"height",S=["top","left"].includes(We(o)),R=a.reference[p]-a.floating[E]+(S&&((x=s.offset)==null?void 0:x[p])||0)+(S?0:h.crossAxis),N=a.reference[p]+a.reference[E]+(S?0:((C=s.offset)==null?void 0:C[p])||0)-(S?h.crossAxis:0);y<R?y=R:y>N&&(y=N)}return{[c]:m,[p]:y}}}},Pc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:a}=t,{apply:s=()=>{},...i}=Be(e,t),l=await _t(t,i),u=We(r),d=Rt(r),p=Qe(r)==="y",{width:c,height:m}=n.floating;let y,v;u==="top"||u==="bottom"?(y=u,v=d===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=u,y=d==="end"?"top":"bottom");const h=m-l.top-l.bottom,x=c-l.left-l.right,C=_e(m-l[y],h),E=_e(c-l[v],x),S=!t.middlewareData.shift;let R=C,N=E;if(p?N=d||S?_e(E,x):x:R=d||S?_e(C,h):h,S&&!d){const k=be(l.left,0),U=be(l.right,0),Y=be(l.top,0),q=be(l.bottom,0);p?N=c-2*(k!==0||U!==0?k+U:be(l.left,l.right)):R=m-2*(Y!==0||q!==0?Y+q:be(l.top,l.bottom))}await s({...t,availableWidth:N,availableHeight:R});const A=await o.getDimensions(a.floating);return c!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function Pt(e){return Ca(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ve(e){var t;return(t=(Ca(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ca(e){return e instanceof Node||e instanceof ye(e).Node}function Pe(e){return e instanceof Element||e instanceof ye(e).Element}function je(e){return e instanceof HTMLElement||e instanceof ye(e).HTMLElement}function Bn(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function It(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Ae(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Ac(e){return["table","td","th"].includes(Pt(e))}function dr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function sn(e){const t=ln(),r=Pe(e)?Ae(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Tc(e){let t=et(e);for(;je(t)&&!wt(t);){if(sn(t))return t;if(dr(t))return null;t=et(t)}return null}function ln(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function wt(e){return["html","body","#document"].includes(Pt(e))}function Ae(e){return ye(e).getComputedStyle(e)}function fr(e){return Pe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function et(e){if(Pt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bn(e)&&e.host||Ve(e);return Bn(t)?t.host:t}function Sa(e){const t=et(e);return wt(t)?e.ownerDocument?e.ownerDocument.body:e.body:je(t)&&It(t)?t:Sa(t)}function jt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Sa(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),s=ye(o);if(a){const i=Fr(s);return t.concat(s,s.visualViewport||[],It(o)?o:[],i&&r?jt(i):[])}return t.concat(o,jt(o,[],r))}function Fr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ra(e){const t=Ae(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=je(e),a=o?e.offsetWidth:r,s=o?e.offsetHeight:n,i=or(r)!==a||or(n)!==s;return i&&(r=a,n=s),{width:r,height:n,$:i}}function cn(e){return Pe(e)?e:e.contextElement}function xt(e){const t=cn(e);if(!je(t))return Ze(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=Ra(t);let s=(a?or(r.width):r.width)/n,i=(a?or(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Oc=Ze(0);function Pa(e){const t=ye(e);return!ln()||!t.visualViewport?Oc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Nc(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ye(e)?!1:t}function lt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=cn(e);let s=Ze(1);t&&(n?Pe(n)&&(s=xt(n)):s=xt(e));const i=Nc(a,r,n)?Pa(a):Ze(0);let l=(o.left+i.x)/s.x,u=(o.top+i.y)/s.y,d=o.width/s.x,p=o.height/s.y;if(a){const c=ye(a),m=n&&Pe(n)?ye(n):n;let y=c,v=Fr(y);for(;v&&n&&m!==y;){const h=xt(v),x=v.getBoundingClientRect(),C=Ae(v),E=x.left+(v.clientLeft+parseFloat(C.paddingLeft))*h.x,S=x.top+(v.clientTop+parseFloat(C.paddingTop))*h.y;l*=h.x,u*=h.y,d*=h.x,p*=h.y,l+=E,u+=S,y=ye(v),v=Fr(y)}}return sr({width:d,height:p,x:l,y:u})}function Dc(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",s=Ve(n),i=t?dr(t.floating):!1;if(n===s||i&&a)return r;let l={scrollLeft:0,scrollTop:0},u=Ze(1);const d=Ze(0),p=je(n);if((p||!p&&!a)&&((Pt(n)!=="body"||It(s))&&(l=fr(n)),je(n))){const c=lt(n);u=xt(n),d.x=c.x+n.clientLeft,d.y=c.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+d.x,y:r.y*u.y-l.scrollTop*u.y+d.y}}function kc(e){return Array.from(e.getClientRects())}function Aa(e){return lt(Ve(e)).left+fr(e).scrollLeft}function _c(e){const t=Ve(e),r=fr(e),n=e.ownerDocument.body,o=be(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=be(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Aa(e);const i=-r.scrollTop;return Ae(n).direction==="rtl"&&(s+=be(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:s,y:i}}function jc(e,t){const r=ye(e),n=Ve(e),o=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const u=ln();(!u||u&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}return{width:a,height:s,x:i,y:l}}function Mc(e,t){const r=lt(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=je(e)?xt(e):Ze(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,u=n*a.y;return{width:s,height:i,x:l,y:u}}function Wn(e,t,r){let n;if(t==="viewport")n=jc(e,r);else if(t==="document")n=_c(Ve(e));else if(Pe(t))n=Mc(t,r);else{const o=Pa(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return sr(n)}function Ta(e,t){const r=et(e);return r===t||!Pe(r)||wt(r)?!1:Ae(r).position==="fixed"||Ta(r,t)}function Lc(e,t){const r=t.get(e);if(r)return r;let n=jt(e,[],!1).filter(i=>Pe(i)&&Pt(i)!=="body"),o=null;const a=Ae(e).position==="fixed";let s=a?et(e):e;for(;Pe(s)&&!wt(s);){const i=Ae(s),l=sn(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||It(s)&&!l&&Ta(e,s))?n=n.filter(d=>d!==s):o=i,s=et(s)}return t.set(e,n),n}function Ic(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?dr(t)?[]:Lc(t,this._c):[].concat(r),n],i=s[0],l=s.reduce((u,d)=>{const p=Wn(t,d,o);return u.top=be(p.top,u.top),u.right=_e(p.right,u.right),u.bottom=_e(p.bottom,u.bottom),u.left=be(p.left,u.left),u},Wn(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function $c(e){const{width:t,height:r}=Ra(e);return{width:t,height:r}}function Fc(e,t,r){const n=je(t),o=Ve(t),a=r==="fixed",s=lt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=Ze(0);if(n||!n&&!a)if((Pt(t)!=="body"||It(o))&&(i=fr(t)),n){const p=lt(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&(l.x=Aa(o));const u=s.left+i.scrollLeft-l.x,d=s.top+i.scrollTop-l.y;return{x:u,y:d,width:s.width,height:s.height}}function Or(e){return Ae(e).position==="static"}function zn(e,t){return!je(e)||Ae(e).position==="fixed"?null:t?t(e):e.offsetParent}function Oa(e,t){const r=ye(e);if(dr(e))return r;if(!je(e)){let o=et(e);for(;o&&!wt(o);){if(Pe(o)&&!Or(o))return o;o=et(o)}return r}let n=zn(e,t);for(;n&&Ac(n)&&Or(n);)n=zn(n,t);return n&&wt(n)&&Or(n)&&!sn(n)?r:n||Tc(e)||r}const Bc=async function(e){const t=this.getOffsetParent||Oa,r=this.getDimensions,n=await r(e.floating);return{reference:Fc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Wc(e){return Ae(e).direction==="rtl"}const zc={convertOffsetParentRelativeRectToViewportRelativeRect:Dc,getDocumentElement:Ve,getClippingRect:Ic,getOffsetParent:Oa,getElementRects:Bc,getClientRects:kc,getDimensions:$c,getScale:xt,isElement:Pe,isRTL:Wc};function Vc(e,t){let r=null,n;const o=Ve(e);function a(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const{left:u,top:d,width:p,height:c}=e.getBoundingClientRect();if(i||t(),!p||!c)return;const m=Kt(d),y=Kt(o.clientWidth-(u+p)),v=Kt(o.clientHeight-(d+c)),h=Kt(u),C={rootMargin:-m+"px "+-y+"px "+-v+"px "+-h+"px",threshold:be(0,_e(1,l))||1};let E=!0;function S(R){const N=R[0].intersectionRatio;if(N!==l){if(!E)return s();N?s(!1,N):n=setTimeout(()=>{s(!1,1e-7)},1e3)}E=!1}try{r=new IntersectionObserver(S,{...C,root:o.ownerDocument})}catch{r=new IntersectionObserver(S,C)}r.observe(e)}return s(!0),a}function Hc(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=cn(e),d=o||a?[...u?jt(u):[],...jt(t)]:[];d.forEach(x=>{o&&x.addEventListener("scroll",r,{passive:!0}),a&&x.addEventListener("resize",r)});const p=u&&i?Vc(u,r):null;let c=-1,m=null;s&&(m=new ResizeObserver(x=>{let[C]=x;C&&C.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(c),c=requestAnimationFrame(()=>{var E;(E=m)==null||E.observe(t)})),r()}),u&&!l&&m.observe(u),m.observe(t));let y,v=l?lt(e):null;l&&h();function h(){const x=lt(e);v&&(x.x!==v.x||x.y!==v.y||x.width!==v.width||x.height!==v.height)&&r(),v=x,y=requestAnimationFrame(h)}return r(),()=>{var x;d.forEach(C=>{o&&C.removeEventListener("scroll",r),a&&C.removeEventListener("resize",r)}),p==null||p(),(x=m)==null||x.disconnect(),m=null,l&&cancelAnimationFrame(y)}}const Uc=Cc,Yc=Sc,Gc=xc,qc=Pc,Kc=wc,Vn=yc,Xc=Rc,Jc=(e,t,r)=>{const n=new Map,o={platform:zc,...r},a={...o.platform,_c:n};return bc(e,t,{...o,platform:a})};var er=typeof document<"u"?w.useLayoutEffect:w.useEffect;function ir(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!ir(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!ir(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Na(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Hn(e,t){const r=Na(e);return Math.round(t*r)/r}function Un(e){const t=f.useRef(e);return er(()=>{t.current=e}),t}function Zc(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[d,p]=f.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[c,m]=f.useState(n);ir(c,n)||m(n);const[y,v]=f.useState(null),[h,x]=f.useState(null),C=f.useCallback(L=>{L!==N.current&&(N.current=L,v(L))},[]),E=f.useCallback(L=>{L!==A.current&&(A.current=L,x(L))},[]),S=a||y,R=s||h,N=f.useRef(null),A=f.useRef(null),k=f.useRef(d),U=l!=null,Y=Un(l),q=Un(o),_=f.useCallback(()=>{if(!N.current||!A.current)return;const L={placement:t,strategy:r,middleware:c};q.current&&(L.platform=q.current),Jc(N.current,A.current,L).then(D=>{const B={...D,isPositioned:!0};X.current&&!ir(k.current,B)&&(k.current=B,Yr.flushSync(()=>{p(B)}))})},[c,t,r,q]);er(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,p(L=>({...L,isPositioned:!1})))},[u]);const X=f.useRef(!1);er(()=>(X.current=!0,()=>{X.current=!1}),[]),er(()=>{if(S&&(N.current=S),R&&(A.current=R),S&&R){if(Y.current)return Y.current(S,R,_);_()}},[S,R,_,Y,U]);const F=f.useMemo(()=>({reference:N,floating:A,setReference:C,setFloating:E}),[C,E]),z=f.useMemo(()=>({reference:S,floating:R}),[S,R]),H=f.useMemo(()=>{const L={position:r,left:0,top:0};if(!z.floating)return L;const D=Hn(z.floating,d.x),B=Hn(z.floating,d.y);return i?{...L,transform:"translate("+D+"px, "+B+"px)",...Na(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:D,top:B}},[r,i,z.floating,d.x,d.y]);return f.useMemo(()=>({...d,update:_,refs:F,elements:z,floatingStyles:H}),[d,_,F,z,H])}const Qc=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Vn({element:n.current,padding:o}).fn(r):{}:n?Vn({element:n,padding:o}).fn(r):{}}}},eu=(e,t)=>({...Uc(e),options:[e,t]}),tu=(e,t)=>({...Yc(e),options:[e,t]}),ru=(e,t)=>({...Xc(e),options:[e,t]}),nu=(e,t)=>({...Gc(e),options:[e,t]}),ou=(e,t)=>({...qc(e),options:[e,t]}),au=(e,t)=>({...Kc(e),options:[e,t]}),su=(e,t)=>({...Qc(e),options:[e,t]});var iu="Arrow",Da=f.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return b.jsx(se.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});Da.displayName=iu;var lu=Da,un="Popper",[ka,_a]=Ct(un),[cu,ja]=ka(un),Ma=e=>{const{__scopePopper:t,children:r}=e,[n,o]=f.useState(null);return b.jsx(cu,{scope:t,anchor:n,onAnchorChange:o,children:r})};Ma.displayName=un;var La="PopperAnchor",Ia=f.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=ja(La,r),s=f.useRef(null),i=fe(t,s);return f.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||s.current)}),n?null:b.jsx(se.div,{...o,ref:i})});Ia.displayName=La;var dn="PopperContent",[uu,du]=ka(dn),$a=f.forwardRef((e,t)=>{var Oe,ge,xe,ve,ct,Me;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:c=!1,updatePositionStrategy:m="optimized",onPlaced:y,...v}=e,h=ja(dn,r),[x,C]=f.useState(null),E=fe(t,Ne=>C(Ne)),[S,R]=f.useState(null),N=va(S),A=(N==null?void 0:N.width)??0,k=(N==null?void 0:N.height)??0,U=n+(a!=="center"?"-"+a:""),Y=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},q=Array.isArray(u)?u:[u],_=q.length>0,X={padding:Y,boundary:q.filter(pu),altBoundary:_},{refs:F,floatingStyles:z,placement:H,isPositioned:L,middlewareData:D}=Zc({strategy:"fixed",placement:U,whileElementsMounted:(...Ne)=>Hc(...Ne,{animationFrame:m==="always"}),elements:{reference:h.anchor},middleware:[eu({mainAxis:o+k,alignmentAxis:s}),l&&tu({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?ru():void 0,...X}),l&&nu({...X}),ou({...X,apply:({elements:Ne,rects:tt,availableWidth:Le,availableHeight:Se})=>{const{width:ut,height:He}=tt.reference,ae=Ne.floating.style;ae.setProperty("--radix-popper-available-width",`${Le}px`),ae.setProperty("--radix-popper-available-height",`${Se}px`),ae.setProperty("--radix-popper-anchor-width",`${ut}px`),ae.setProperty("--radix-popper-anchor-height",`${He}px`)}}),S&&su({element:S,padding:i}),gu({arrowWidth:A,arrowHeight:k}),c&&au({strategy:"referenceHidden",...X})]}),[B,ce]=Wa(H),O=Je(y);st(()=>{L&&(O==null||O())},[L,O]);const j=(Oe=D.arrow)==null?void 0:Oe.x,$=(ge=D.arrow)==null?void 0:ge.y,re=((xe=D.arrow)==null?void 0:xe.centerOffset)!==0,[pe,ee]=f.useState();return st(()=>{x&&ee(window.getComputedStyle(x).zIndex)},[x]),b.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:L?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[(ve=D.transformOrigin)==null?void 0:ve.x,(ct=D.transformOrigin)==null?void 0:ct.y].join(" "),...((Me=D.hide)==null?void 0:Me.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(uu,{scope:r,placedSide:B,onArrowChange:R,arrowX:j,arrowY:$,shouldHideArrow:re,children:b.jsx(se.div,{"data-side":B,"data-align":ce,...v,ref:E,style:{...v.style,animation:L?void 0:"none"}})})})});$a.displayName=dn;var Fa="PopperArrow",fu={top:"bottom",right:"left",bottom:"top",left:"right"},Ba=f.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=du(Fa,n),s=fu[a.placedSide];return b.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:b.jsx(lu,{...o,ref:r,style:{...o.style,display:"block"}})})});Ba.displayName=Fa;function pu(e){return e!==null}var gu=e=>({name:"transformOrigin",options:e,fn(t){var h,x,C;const{placement:r,rects:n,middlewareData:o}=t,s=((h=o.arrow)==null?void 0:h.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,d]=Wa(r),p={start:"0%",center:"50%",end:"100%"}[d],c=(((x=o.arrow)==null?void 0:x.x)??0)+i/2,m=(((C=o.arrow)==null?void 0:C.y)??0)+l/2;let y="",v="";return u==="bottom"?(y=s?p:`${c}px`,v=`${-l}px`):u==="top"?(y=s?p:`${c}px`,v=`${n.floating.height+l}px`):u==="right"?(y=`${-l}px`,v=s?p:`${m}px`):u==="left"&&(y=`${n.floating.width+l}px`,v=s?p:`${m}px`),{data:{x:y,y:v}}}});function Wa(e){const[t,r="center"]=e.split("-");return[t,r]}var vu=Ma,hu=Ia,mu=$a,bu=Ba,yu="VisuallyHidden",za=f.forwardRef((e,t)=>b.jsx(se.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));za.displayName=yu;var xu=za,[pr,Bd]=Ct("Tooltip",[_a]),gr=_a(),Va="TooltipProvider",wu=700,Br="tooltip.open",[Eu,fn]=pr(Va),Ha=e=>{const{__scopeTooltip:t,delayDuration:r=wu,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,[s,i]=f.useState(!0),l=f.useRef(!1),u=f.useRef(0);return f.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),b.jsx(Eu,{scope:t,isOpenDelayed:s,delayDuration:r,onOpen:f.useCallback(()=>{window.clearTimeout(u.current),i(!1)},[]),onClose:f.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:f.useCallback(d=>{l.current=d},[]),disableHoverableContent:o,children:a})};Ha.displayName=Va;var vr="Tooltip",[Cu,hr]=pr(vr),Ua=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=fn(vr,e.__scopeTooltip),u=gr(t),[d,p]=f.useState(null),c=Jt(),m=f.useRef(0),y=s??l.disableHoverableContent,v=i??l.delayDuration,h=f.useRef(!1),[x=!1,C]=Gr({prop:n,defaultProp:o,onChange:A=>{A?(l.onOpen(),document.dispatchEvent(new CustomEvent(Br))):l.onClose(),a==null||a(A)}}),E=f.useMemo(()=>x?h.current?"delayed-open":"instant-open":"closed",[x]),S=f.useCallback(()=>{window.clearTimeout(m.current),h.current=!1,C(!0)},[C]),R=f.useCallback(()=>{window.clearTimeout(m.current),C(!1)},[C]),N=f.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{h.current=!0,C(!0)},v)},[v,C]);return f.useEffect(()=>()=>window.clearTimeout(m.current),[]),b.jsx(vu,{...u,children:b.jsx(Cu,{scope:t,contentId:c,open:x,stateAttribute:E,trigger:d,onTriggerChange:p,onTriggerEnter:f.useCallback(()=>{l.isOpenDelayed?N():S()},[l.isOpenDelayed,N,S]),onTriggerLeave:f.useCallback(()=>{y?R():window.clearTimeout(m.current)},[R,y]),onOpen:S,onClose:R,disableHoverableContent:y,children:r})})};Ua.displayName=vr;var Wr="TooltipTrigger",Ya=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=hr(Wr,r),a=fn(Wr,r),s=gr(r),i=f.useRef(null),l=fe(t,i,o.onTriggerChange),u=f.useRef(!1),d=f.useRef(!1),p=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),b.jsx(hu,{asChild:!0,...s,children:b.jsx(se.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:le(e.onPointerMove,c=>{c.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:le(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:le(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:le(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:le(e.onBlur,o.onClose),onClick:le(e.onClick,o.onClose)})})});Ya.displayName=Wr;var Su="TooltipPortal",[Wd,Ru]=pr(Su,{forceMount:void 0}),Et="TooltipContent",Ga=f.forwardRef((e,t)=>{const r=Ru(Et,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,s=hr(Et,e.__scopeTooltip);return b.jsx(Lt,{present:n||s.open,children:s.disableHoverableContent?b.jsx(qa,{side:o,...a,ref:t}):b.jsx(Pu,{side:o,...a,ref:t})})}),Pu=f.forwardRef((e,t)=>{const r=hr(Et,e.__scopeTooltip),n=fn(Et,e.__scopeTooltip),o=f.useRef(null),a=fe(t,o),[s,i]=f.useState(null),{trigger:l,onClose:u}=r,d=o.current,{onPointerInTransitChange:p}=n,c=f.useCallback(()=>{i(null),p(!1)},[p]),m=f.useCallback((y,v)=>{const h=y.currentTarget,x={x:y.clientX,y:y.clientY},C=Ou(x,h.getBoundingClientRect()),E=Nu(x,C),S=Du(v.getBoundingClientRect()),R=_u([...E,...S]);i(R),p(!0)},[p]);return f.useEffect(()=>()=>c(),[c]),f.useEffect(()=>{if(l&&d){const y=h=>m(h,d),v=h=>m(h,l);return l.addEventListener("pointerleave",y),d.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",y),d.removeEventListener("pointerleave",v)}}},[l,d,m,c]),f.useEffect(()=>{if(s){const y=v=>{const h=v.target,x={x:v.clientX,y:v.clientY},C=(l==null?void 0:l.contains(h))||(d==null?void 0:d.contains(h)),E=!ku(x,s);C?c():E&&(c(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,d,s,u,c]),b.jsx(qa,{...e,ref:a})}),[Au,Tu]=pr(vr,{isInside:!1}),qa=f.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=hr(Et,r),u=gr(r),{onClose:d}=l;return f.useEffect(()=>(document.addEventListener(Br,d),()=>document.removeEventListener(Br,d)),[d]),f.useEffect(()=>{if(l.trigger){const p=c=>{const m=c.target;m!=null&&m.contains(l.trigger)&&d()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[l.trigger,d]),b.jsx(Kr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:d,children:b.jsxs(mu,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[b.jsx(qr,{children:n}),b.jsx(Au,{scope:r,isInside:!0,children:b.jsx(xu,{id:l.contentId,role:"tooltip",children:o||n})})]})})});Ga.displayName=Et;var Ka="TooltipArrow",Xa=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=gr(r);return Tu(Ka,r).isInside?null:b.jsx(bu,{...o,...n,ref:t})});Xa.displayName=Ka;function Ou(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Nu(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Du(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function ku(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a].x,l=t[a].y,u=t[s].x,d=t[s].y;l>n!=d>n&&r<(u-i)*(n-l)/(d-l)+i&&(o=!o)}return o}function _u(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),ju(t)}function ju(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Mu=Ha,Lu=Ua,Iu=Ya,Ja=Ga,$u=Xa;const Za=Mu,Qa=Lu,es=Iu,ts=$u,pn=f.forwardRef(({className:e,sideOffset:t=4,...r},n)=>b.jsx(Ja,{ref:n,sideOffset:t,className:de("ve-z-50 ve-overflow-hidden ve-rounded-[6px] ve-bg-popover ve-px-3 ve-py-1.5 ve-text-sm ve-text-popover-foreground",e),...r}));pn.displayName=Ja.displayName;const Fu=({displayName:e,fieldId:t,children:r})=>{const{tooltipsVisible:n}=ns();let o="";return e&&t?o=`${e} (${t})`:t?o=`(${t})`:e&&(o=`${e}`),b.jsx("div",{className:"puck-css",children:b.jsx(Za,{children:b.jsxs(Qa,{open:n&&!!o,children:[b.jsx(es,{children:b.jsx("div",{className:n?"ve-outline-2 ve-outline-dotted ve-outline-[#5A58F2]":"",children:r})}),b.jsxs(pn,{children:[b.jsx("p",{children:o}),b.jsx(ts,{fill:"bg-popover"})]})]})})})},rs=w.createContext(void 0),Bu=({children:e})=>{const[t,r]=w.useState(!1),n=()=>{r(o=>!o)};return b.jsx(rs.Provider,{value:{tooltipsVisible:t,toggleTooltips:n},children:e})},ns=()=>{const e=w.useContext(rs);return e||{tooltipsVisible:!1,toggleTooltips:()=>{}}},Wu=(e,t,r,n,o,a)=>{const{dispatch:s,history:{back:i,forward:l,histories:u,index:d,hasFuture:p,setHistories:c}}=rr.usePuck();return w.useEffect(()=>{t(u,d)},[d,u,t]),b.jsxs("header",{className:"puck-header puck-css",children:[b.jsxs("div",{className:"header-left",children:[b.jsx(Vu,{}),b.jsx(Hu,{})]}),b.jsx("div",{className:"header-center"}),b.jsxs("div",{className:"actions",children:[b.jsx(Xe,{variant:"ghost",size:"icon",disabled:d===0,onClick:i,children:b.jsx(Ps,{className:"sm-icon"})}),b.jsx(Xe,{variant:"ghost",size:"icon",disabled:!p,onClick:l,children:b.jsx(As,{className:"sm-icon"})}),b.jsx(zu,{disabled:u.length===0,onClearLocalChanges:()=>{e(),c([]),s({type:"setData",data:n})}}),!a&&b.jsx(Xe,{variant:"secondary",disabled:u.length===0,onClick:async()=>{await o(r),e()},children:"Publish"})]})]})},zu=({disabled:e,onClearLocalChanges:t})=>{const[r,n]=w.useState(!1),o=()=>{t(),n(!1)};return b.jsxs(Ql,{open:r,onOpenChange:n,children:[b.jsx(ec,{disabled:e,asChild:!0,children:b.jsx(Xe,{variant:"outline",children:"Clear Local Changes"})}),b.jsxs(ca,{className:"puck-css",children:[b.jsxs(ua,{children:[b.jsx(fa,{children:"Clear Local Changes"}),b.jsx(pa,{children:"This action will remove your local changes. It cannot be undone."})]}),b.jsxs(da,{children:[b.jsx(ga,{children:"Cancel"}),b.jsx(Xe,{onClick:o,children:"Confirm"})]})]})]})},Vu=()=>{const{dispatch:e,appState:{ui:{leftSideBarVisible:t,rightSideBarVisible:r}}}=rr.usePuck(),n=w.useCallback(o=>{const a=window.matchMedia("(min-width: 638px)").matches,s=o==="left"?t:r,i=o==="left"?"rightSideBarVisible":"leftSideBarVisible";e({type:"setUi",ui:{[`${o}SideBarVisible`]:!s,...a?{}:{[i]:!1}}})},[e,t,r]);return b.jsxs(b.Fragment,{children:[b.jsx(Xe,{variant:"ghost",size:"icon",onClick:()=>{n("left")},children:b.jsx(Ss,{className:"sm-icon"})}),b.jsx(Xe,{variant:"ghost",size:"icon",onClick:()=>{n("right")},children:b.jsx(Rs,{className:"sm-icon"})})]})},Hu=()=>{const{toggleTooltips:e,tooltipsVisible:t}=ns();return b.jsx(Za,{children:b.jsxs(Qa,{children:[b.jsx(es,{asChild:!0,children:b.jsxs("div",{className:"ve-flex ve-flex-row ve-self-center ve-gap-3 ve-pl-2",children:[b.jsx(wa,{onCheckedChange:e}),b.jsx("p",{className:"ve-self-center ve-text-sm",children:"Entity Fields"})]})}),b.jsxs(pn,{children:[t?"Hide Entity Fields":"Show Entity Fields",b.jsx(ts,{fill:"ve-bg-popover"})]})]})})},Yn="ROLE_",Gn="TEMPLATE_",Uu="LAYOUT_",Yu="ENTITY_";function zr(e,t,r,n,o){const a=e?"dev":"";if(!t||!r||!o&&!n)throw new Error("Unable to generate local storage key, missing query parameters");if(t===_d.INDIVIDUAL){if(!o)throw new Error(`EntityId required for role ${t}`);return a+Yn+t+Gn+r+Yu+o}if(!n)throw new Error(`LayoutId required for role ${t}`);return a+Yn+t+Gn+r+Uu+n}const Gu=({puckConfig:e,puckInitialHistory:t,isLoading:r,clearHistory:n,templateMetadata:o,saveState:a,saveSaveState:s,saveVisualConfigData:i,sendDevSaveStateData:l,visualConfigurationData:u,buildLocalStorageKey:d,devLogger:p})=>{const[c,m]=w.useState(!1),y=w.useRef(-1),v=w.useCallback((E,S)=>{var R;S!==-1&&y.current!==S&&E.length>0&&(p.logFunc("handleHistoryChange"),p.logData("PUCK_INDEX",S),p.logData("PUCK_HISTORY",E),y.current=S,p.logFunc("saveToLocalStorage"),window.localStorage.setItem(d(),JSON.stringify(E)),(a==null?void 0:a.hash)!==E[S].id&&(o.isDevMode&&!o.devOverride?(p.logFunc("sendDevSaveStateData"),l({payload:{devSaveStateData:JSON.stringify((R=E[S].data)==null?void 0:R.data)}})):(p.logFunc("saveSaveState"),s({payload:{hash:E[S].id,history:JSON.stringify(E[S].data)}}))))},[o,zr,a]),h=()=>{n(),y.current=-1},x=async E=>{p.logFunc("saveVisualConfigData"),i({payload:{visualConfigurationData:JSON.stringify(E)}})},C=async()=>{if(!r&&!c){m(!0);return}};return b.jsx(Bu,{children:b.jsx(rr.Puck,{config:e,data:t.histories[t.index].data.data??{root:{},content:[],zones:{}},initialHistory:t,onChange:C,overrides:{header:()=>{const{appState:E}=rr.usePuck();return Wu(h,v,E.data,u,x,o.isDevMode&&!o.devOverride)}}})})};var gn="Progress",vn=100,[qu,zd]=Ct(gn),[Ku,Xu]=qu(gn),os=f.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:o,getValueLabel:a=Ju,...s}=e;(o||o===0)&&!qn(o)&&console.error(Zu(`${o}`,"Progress"));const i=qn(o)?o:vn;n!==null&&!Kn(n,i)&&console.error(Qu(`${n}`,"Progress"));const l=Kn(n,i)?n:null,u=lr(l)?a(l,i):void 0;return b.jsx(Ku,{scope:r,value:l,max:i,children:b.jsx(se.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":lr(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":is(l,i),"data-value":l??void 0,"data-max":i,...s,ref:t})})});os.displayName=gn;var as="ProgressIndicator",ss=f.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,o=Xu(as,r);return b.jsx(se.div,{"data-state":is(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:t})});ss.displayName=as;function Ju(e,t){return`${Math.round(e/t*100)}%`}function is(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function lr(e){return typeof e=="number"}function qn(e){return lr(e)&&!isNaN(e)&&e>0}function Kn(e,t){return lr(e)&&!isNaN(e)&&e<=t&&e>=0}function Zu(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${vn}\`.`}function Qu(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
117
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return f.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},hl=Lo,ml=Io,bl=$o,qo=Fo,Ko=Bo,Xo=Uo,Jo=Go,Zo=zo,Qo=Ho;function ea(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=ea(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function yl(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=ea(e))&&(n&&(n+=" "),n+=t);return n}const en="-";function xl(e){const t=El(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;function o(s){const i=s.split(en);return i[0]===""&&i.length!==1&&i.shift(),ta(i,t)||wl(s)}function a(s,i){const l=r[s]||[];return i&&n[s]?[...l,...n[s]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:a}}function ta(e,t){var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?ta(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(en);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId}const _n=/^\[(.+)\]$/;function wl(e){if(_n.test(e)){const t=_n.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function El(e){const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return Sl(Object.entries(e.classGroups),r).forEach(([a,s])=>{Lr(s,n,a,t)}),n}function Lr(e,t,r,n){e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:jn(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(Cl(o)){Lr(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,s])=>{Lr(s,jn(t,a),r,n)})})}function jn(e,t){let r=e;return t.split(en).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function Cl(e){return e.isThemeGetter}function Sl(e,t){return t?e.map(([r,n])=>{const o=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,i])=>[t+s,i])):a);return[r,o]}):e}function Rl(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;function o(a,s){r.set(a,s),t++,t>e&&(t=0,n=r,r=new Map)}return{get(a){let s=r.get(a);if(s!==void 0)return s;if((s=n.get(a))!==void 0)return o(a,s),s},set(a,s){r.has(a)?r.set(a,s):o(a,s)}}}const ra="!";function Pl(e){const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,o=t[0],a=t.length;function s(i){const l=[];let u=0,d=0,g;for(let y=0;y<i.length;y++){let E=i[y];if(u===0){if(E===o&&(n||i.slice(y,y+a)===t)){l.push(i.slice(d,y)),d=y+a;continue}if(E==="/"){g=y;continue}}E==="["?u++:E==="]"&&u--}const c=l.length===0?i:i.substring(d),v=c.startsWith(ra),x=v?c.substring(1):c,h=g&&g>d?g-d:void 0;return{modifiers:l,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:h}}return r?function(l){return r({className:l,parseClassName:s})}:s}function Al(e){if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t}function Tl(e){return{cache:Rl(e.cacheSize),parseClassName:Pl(e),...xl(e)}}const Ol=/\s+/;function Dl(e,t){const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,a=new Set;return e.trim().split(Ol).map(s=>{const{modifiers:i,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:d}=r(s);let g=!!d,c=n(g?u.substring(0,d):u);if(!c){if(!g)return{isTailwindClass:!1,originalClassName:s};if(c=n(u),!c)return{isTailwindClass:!1,originalClassName:s};g=!1}const v=Al(i).join(":");return{isTailwindClass:!0,modifierId:l?v+ra:v,classGroupId:c,originalClassName:s,hasPostfixModifier:g}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:i,classGroupId:l,hasPostfixModifier:u}=s,d=i+l;return a.has(d)?!1:(a.add(d),o(l,u).forEach(g=>a.add(i+g)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function Nl(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=na(t))&&(n&&(n+=" "),n+=r);return n}function na(e){if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=na(e[n]))&&(r&&(r+=" "),r+=t);return r}function kl(e,...t){let r,n,o,a=s;function s(l){const u=t.reduce((d,g)=>g(d),e());return r=Tl(u),n=r.cache.get,o=r.cache.set,a=i,i(l)}function i(l){const u=n(l);if(u)return u;const d=Dl(l,r);return o(l,d),d}return function(){return a(Nl.apply(null,arguments))}}function ne(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const oa=/^\[(?:([a-z-]+):)?(.+)\]$/i,_l=/^\d+\/\d+$/,jl=new Set(["px","full","screen"]),Ml=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ll=/\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$/,Il=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,$l=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Fl=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Fe(e){return at(e)||jl.has(e)||_l.test(e)}function Ge(e){return St(e,"length",Gl)}function at(e){return!!e&&!Number.isNaN(Number(e))}function Kt(e){return St(e,"number",at)}function Nt(e){return!!e&&Number.isInteger(Number(e))}function Bl(e){return e.endsWith("%")&&at(e.slice(0,-1))}function B(e){return oa.test(e)}function qe(e){return Ml.test(e)}const Wl=new Set(["length","size","percentage"]);function zl(e){return St(e,Wl,aa)}function Vl(e){return St(e,"position",aa)}const Hl=new Set(["image","url"]);function Ul(e){return St(e,Hl,Kl)}function Yl(e){return St(e,"",ql)}function kt(){return!0}function St(e,t,r){const n=oa.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1}function Gl(e){return Ll.test(e)&&!Il.test(e)}function aa(){return!1}function ql(e){return $l.test(e)}function Kl(e){return Fl.test(e)}function Xl(){const e=ne("colors"),t=ne("spacing"),r=ne("blur"),n=ne("brightness"),o=ne("borderColor"),a=ne("borderRadius"),s=ne("borderSpacing"),i=ne("borderWidth"),l=ne("contrast"),u=ne("grayscale"),d=ne("hueRotate"),g=ne("invert"),c=ne("gap"),v=ne("gradientColorStops"),x=ne("gradientColorStopPositions"),h=ne("inset"),y=ne("margin"),E=ne("opacity"),b=ne("padding"),C=ne("saturate"),R=ne("scale"),P=ne("sepia"),D=ne("skew"),T=ne("space"),N=ne("translate"),z=()=>["auto","contain","none"],Y=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto",B,t],_=()=>[B,t],Z=()=>["",Fe,Ge],I=()=>["auto",at,B],V=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],M=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],O=()=>["start","end","center","between","around","evenly","stretch"],F=()=>["","0",B],le=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[at,Kt],W=()=>[at,B];return{cacheSize:500,separator:":",theme:{colors:[kt],spacing:[Fe,Ge],blur:["none","",qe,B],brightness:$(),borderColor:[e],borderRadius:["none","","full",qe,B],borderSpacing:_(),borderWidth:Z(),contrast:$(),grayscale:F(),hueRotate:W(),invert:F(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[Bl,Ge],inset:G(),margin:G(),opacity:$(),padding:_(),saturate:$(),scale:$(),sepia:F(),skew:W(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",B]}],container:["container"],columns:[{columns:[qe]}],"break-after":[{"break-after":le()}],"break-before":[{"break-before":le()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...V(),B]}],overflow:[{overflow:Y()}],"overflow-x":[{"overflow-x":Y()}],"overflow-y":[{"overflow-y":Y()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Nt,B]}],basis:[{basis:G()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",B]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:["first","last","none",Nt,B]}],"grid-cols":[{"grid-cols":[kt]}],"col-start-end":[{col:["auto",{span:["full",Nt,B]},B]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[kt]}],"row-start-end":[{row:["auto",{span:[Nt,B]},B]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",B]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",B]}],gap:[{gap:[c]}],"gap-x":[{"gap-x":[c]}],"gap-y":[{"gap-y":[c]}],"justify-content":[{justify:["normal",...O()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...O(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...O(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",B,t]}],"min-w":[{"min-w":[B,t,"min","max","fit"]}],"max-w":[{"max-w":[B,t,"none","full","min","max","fit","prose",{screen:[qe]},qe]}],h:[{h:[B,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[B,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[B,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[B,t,"auto","min","max","fit"]}],"font-size":[{text:["base",qe,Ge]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Kt]}],"font-family":[{font:[kt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",B]}],"line-clamp":[{"line-clamp":["none",at,Kt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Fe,B]}],"list-image":[{"list-image":["none",B]}],"list-style-type":[{list:["none","disc","decimal",B]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Fe,Ge]}],"underline-offset":[{"underline-offset":["auto",Fe,B]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...V(),Vl]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",zl]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ul]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:U()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[Fe,B]}],"outline-w":[{outline:[Fe,Ge]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[Fe,Ge]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",qe,Yl]}],"shadow-color":[{shadow:[kt]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...M(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":M()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",qe,B]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[g]}],saturate:[{saturate:[C]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",B]}],duration:[{duration:W()}],ease:[{ease:["linear","in","out","in-out",B]}],delay:[{delay:W()}],animate:[{animate:["none","spin","ping","pulse","bounce",B]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[Nt,B]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[D]}],"skew-y":[{"skew-y":[D]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",B]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",B]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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",B]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Fe,Ge,Kt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const Jl=kl(Xl);function fe(...e){return Jl(yl(e))}function sa(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=sa(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Zl(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=sa(e))&&(n&&(n+=" "),n+=t);return n}const Mn=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Ln=Zl,ia=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Ln(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(u=>{const d=r==null?void 0:r[u],g=a==null?void 0:a[u];if(d===null)return null;const c=Mn(d)||Mn(g);return o[u][c]}),i=r&&Object.entries(r).reduce((u,d)=>{let[g,c]=d;return c===void 0||(u[g]=c),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:g,className:c,...v}=d;return Object.entries(v).every(x=>{let[h,y]=x;return Array.isArray(y)?y.includes({...a,...i}[h]):{...a,...i}[h]===y})?[...u,g,c]:u},[]);return Ln(e,s,l,r==null?void 0:r.class,r==null?void 0:r.className)},tn=ia("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-secondary active:bg-primary-foreground active:text-primary active:border-primary focus:border-2",secondary:"bg-primary-foreground text-primary border-2 border-primary hover:bg-primary hover:text-primary-foreground active:bg-secondary active:text-secondary-foreground focus:border-2",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border-primary border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 rounded-md px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ql=f.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},a)=>{const s=n?Lt:"button";return m.jsx(s,{className:fe(tn({variant:t,size:r,className:e})),ref:a,...o})});Ql.displayName="Button";const ec=hl,tc=ml,rc=bl,la=f.forwardRef(({className:e,...t},r)=>m.jsx(qo,{className:fe("ve-fixed ve-inset-0 ve-z-50 ve-bg-black/80 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0",e),...t,ref:r}));la.displayName=qo.displayName;const ca=f.forwardRef(({className:e,...t},r)=>m.jsxs(rc,{children:[m.jsx(la,{}),m.jsx(Ko,{ref:r,className:fe("ve-fixed ve-left-[50%] ve-top-[50%] ve-z-50 ve-grid ve-w-full ve-max-w-lg ve-translate-x-[-50%] ve-translate-y-[-50%] ve-gap-4 ve-border ve-bg-background ve-p-6 ve-shadow-lg ve-duration-200 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0 data-[state=closed]:ve-zoom-out-95 data-[state=open]:ve-zoom-in-95 data-[state=closed]:ve-slide-out-to-left-1/2 data-[state=closed]:ve-slide-out-to-top-[48%] data-[state=open]:ve-slide-in-from-left-1/2 data-[state=open]:ve-slide-in-from-top-[48%] sm:ve-rounded-lg",e),...t})]}));ca.displayName=Ko.displayName;const ua=({className:e,...t})=>m.jsx("div",{className:fe("ve-flex ve-flex-col ve-space-y-2 ve-text-center sm:ve-text-left",e),...t});ua.displayName="AlertDialogHeader";const da=({className:e,...t})=>m.jsx("div",{className:fe("ve-flex ve-flex-col-reverse sm:ve-flex-row sm:ve-justify-end sm:ve-space-x-2",e),...t});da.displayName="AlertDialogFooter";const fa=f.forwardRef(({className:e,...t},r)=>m.jsx(Zo,{ref:r,className:fe("ve-text-lg ve-font-semibold",e),...t}));fa.displayName=Zo.displayName;const pa=f.forwardRef(({className:e,...t},r)=>m.jsx(Qo,{ref:r,className:fe("ve-text-sm ve-text-muted-foreground",e),...t}));pa.displayName=Qo.displayName;const nc=f.forwardRef(({className:e,...t},r)=>m.jsx(Xo,{ref:r,className:fe(tn(),e),...t}));nc.displayName=Xo.displayName;const ga=f.forwardRef(({className:e,...t},r)=>m.jsx(Jo,{ref:r,className:fe(tn({variant:"outline"}),"ve-mt-2 sm:ve-mt-0",e),...t}));ga.displayName=Jo.displayName;const oc=ia("ve-inline-flex ve-items-center ve-justify-center ve-whitespace-nowrap ve-rounded-md ve-text-sm ve-font-medium ve-ring-offset-background ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 disabled:ve-pointer-events-none disabled:ve-opacity-50",{variants:{variant:{default:"ve-bg-primary ve-text-primary-foreground hover:ve-bg-primary/90",destructive:"ve-bg-destructive ve-text-destructive-foreground hover:ve-bg-destructive/90",outline:"ve-border ve-border-input ve-bg-background hover:ve-bg-accent hover:ve-text-accent-foreground",secondary:"ve-bg-secondary ve-text-secondary-foreground hover:ve-bg-secondary/80",ghost:"hover:ve-bg-accent hover:ve-text-accent-foreground",link:"ve-text-primary ve-underline-offset-4 hover:ve-underline"},size:{default:"ve-h-10 ve-rounded-md ve-px-4 ve-py-2",sm:"ve-h-9 ve-rounded-md ve-px-3",lg:"ve-h-11 ve-rounded-md ve-px-8",icon:"ve-h-10 ve-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Xe=f.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},a)=>{const s=n?Lt:"button";return m.jsx(s,{className:fe(oc({variant:t,size:r,className:e})),ref:a,...o})});Xe.displayName="Button";function ac(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function va(e){const[t,r]=f.useState(void 0);return st(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;r({width:s,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var rn="Switch",[sc,Vd]=Ct(rn),[ic,lc]=sc(rn),ha=f.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:s,disabled:i,value:l="on",onCheckedChange:u,...d}=e,[g,c]=f.useState(null),v=pe(t,b=>c(b)),x=f.useRef(!1),h=g?!!g.closest("form"):!0,[y=!1,E]=Gr({prop:o,defaultProp:a,onChange:u});return m.jsxs(ic,{scope:r,checked:y,disabled:i,children:[m.jsx(ie.button,{type:"button",role:"switch","aria-checked":y,"aria-required":s,"data-state":ya(y),"data-disabled":i?"":void 0,disabled:i,value:l,...d,ref:v,onClick:ue(e.onClick,b=>{E(C=>!C),h&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),h&&m.jsx(cc,{control:g,bubbles:!x.current,name:n,value:l,checked:y,required:s,disabled:i,style:{transform:"translateX(-100%)"}})]})});ha.displayName=rn;var ma="SwitchThumb",ba=f.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=lc(ma,r);return m.jsx(ie.span,{"data-state":ya(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});ba.displayName=ma;var cc=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,a=f.useRef(null),s=ac(r),i=va(t);return f.useEffect(()=>{const l=a.current,u=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==r&&g){const c=new Event("click",{bubbles:n});g.call(l,r),l.dispatchEvent(c)}},[s,r,n]),m.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:a,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function ya(e){return e?"checked":"unchecked"}var xa=ha,uc=ba;const wa=f.forwardRef(({className:e,...t},r)=>m.jsx(xa,{className:fe("ve-self-center ve-peer ve-inline-flex ve-h-5 ve-w-9 ve-shrink-0 ve-cursor-pointer ve-items-center ve-rounded-full ve-border-2 ve-border-transparent ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 focus-visible:ve-ring-offset-background disabled:ve-cursor-not-allowed disabled:ve-opacity-50 data-[state=checked]:ve-bg-primary data-[state=unchecked]:ve-bg-input",e),...t,ref:r,children:m.jsx(uc,{className:fe("ve-self-center ve-pointer-events-none ve-block ve-h-4 ve-w-4 ve-rounded-full ve-bg-background ve-shadow-lg ve-ring-0 ve-transition-transform data-[state=checked]:ve-translate-x-4 data-[state=unchecked]:ve-translate-x-0")})}));wa.displayName=xa.displayName;const dc=["top","right","bottom","left"],_e=Math.min,be=Math.max,or=Math.round,Xt=Math.floor,Ze=e=>({x:e,y:e}),fc={left:"right",right:"left",bottom:"top",top:"bottom"},pc={start:"end",end:"start"};function Ir(e,t,r){return be(e,_e(t,r))}function Be(e,t){return typeof e=="function"?e(t):e}function We(e){return e.split("-")[0]}function Rt(e){return e.split("-")[1]}function nn(e){return e==="x"?"y":"x"}function on(e){return e==="y"?"height":"width"}function Qe(e){return["top","bottom"].includes(We(e))?"y":"x"}function an(e){return nn(Qe(e))}function gc(e,t,r){r===void 0&&(r=!1);const n=Rt(e),o=an(e),a=on(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=ar(s)),[s,ar(s)]}function vc(e){const t=ar(e);return[$r(e),t,$r(t)]}function $r(e){return e.replace(/start|end/g,t=>pc[t])}function hc(e,t,r){const n=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?a:s;default:return[]}}function mc(e,t,r,n){const o=Rt(e);let a=hc(We(e),r==="start",n);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map($r)))),a}function ar(e){return e.replace(/left|right|bottom|top/g,t=>fc[t])}function bc(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ea(e){return typeof e!="number"?bc(e):{top:e,right:e,bottom:e,left:e}}function sr(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function In(e,t,r){let{reference:n,floating:o}=e;const a=Qe(t),s=an(t),i=on(s),l=We(t),u=a==="y",d=n.x+n.width/2-o.width/2,g=n.y+n.height/2-o.height/2,c=n[i]/2-o[i]/2;let v;switch(l){case"top":v={x:d,y:n.y-o.height};break;case"bottom":v={x:d,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:g};break;case"left":v={x:n.x-o.width,y:g};break;default:v={x:n.x,y:n.y}}switch(Rt(t)){case"start":v[s]-=c*(r&&u?-1:1);break;case"end":v[s]+=c*(r&&u?-1:1);break}return v}const yc=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,i=a.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:g}=In(u,n,l),c=n,v={},x=0;for(let h=0;h<i.length;h++){const{name:y,fn:E}=i[h],{x:b,y:C,data:R,reset:P}=await E({x:d,y:g,initialPlacement:n,placement:c,strategy:o,middlewareData:v,rects:u,platform:s,elements:{reference:e,floating:t}});d=b??d,g=C??g,v={...v,[y]:{...v[y],...R}},P&&x<=50&&(x++,typeof P=="object"&&(P.placement&&(c=P.placement),P.rects&&(u=P.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):P.rects),{x:d,y:g}=In(u,c,l)),h=-1)}return{x:d,y:g,placement:c,strategy:o,middlewareData:v}};async function jt(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:g="floating",altBoundary:c=!1,padding:v=0}=Be(t,e),x=Ea(v),y=i[c?g==="floating"?"reference":"floating":g],E=sr(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(y)))==null||r?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:d,strategy:l})),b=g==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),R=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},P=sr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:b,offsetParent:C,strategy:l}):b);return{top:(E.top-P.top+x.top)/R.y,bottom:(P.bottom-E.bottom+x.bottom)/R.y,left:(E.left-P.left+x.left)/R.x,right:(P.right-E.right+x.right)/R.x}}const xc=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:d=0}=Be(e,t)||{};if(u==null)return{};const g=Ea(d),c={x:r,y:n},v=an(o),x=on(v),h=await s.getDimensions(u),y=v==="y",E=y?"top":"left",b=y?"bottom":"right",C=y?"clientHeight":"clientWidth",R=a.reference[x]+a.reference[v]-c[v]-a.floating[x],P=c[v]-a.reference[v],D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let T=D?D[C]:0;(!T||!await(s.isElement==null?void 0:s.isElement(D)))&&(T=i.floating[C]||a.floating[x]);const N=R/2-P/2,z=T/2-h[x]/2-1,Y=_e(g[E],z),G=_e(g[b],z),_=Y,Z=T-h[x]-G,I=T/2-h[x]/2+N,V=Ir(_,I,Z),U=!l.arrow&&Rt(o)!=null&&I!==V&&a.reference[x]/2-(I<_?Y:G)-h[x]/2<0,M=U?I<_?I-_:I-Z:0;return{[v]:c[v]+M,data:{[v]:V,centerOffset:I-V-M,...U&&{alignmentOffset:M}},reset:U}}}),wc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:g=!0,fallbackPlacements:c,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:h=!0,...y}=Be(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const E=We(o),b=Qe(i),C=We(i)===i,R=await(l.isRTL==null?void 0:l.isRTL(u.floating)),P=c||(C||!h?[ar(i)]:vc(i)),D=x!=="none";!c&&D&&P.push(...mc(i,h,x,R));const T=[i,...P],N=await jt(t,y),z=[];let Y=((n=a.flip)==null?void 0:n.overflows)||[];if(d&&z.push(N[E]),g){const I=gc(o,s,R);z.push(N[I[0]],N[I[1]])}if(Y=[...Y,{placement:o,overflows:z}],!z.every(I=>I<=0)){var G,_;const I=(((G=a.flip)==null?void 0:G.index)||0)+1,V=T[I];if(V)return{data:{index:I,overflows:Y},reset:{placement:V}};let U=(_=Y.filter(M=>M.overflows[0]<=0).sort((M,O)=>M.overflows[1]-O.overflows[1])[0])==null?void 0:_.placement;if(!U)switch(v){case"bestFit":{var Z;const M=(Z=Y.filter(O=>{if(D){const F=Qe(O.placement);return F===b||F==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(F=>F>0).reduce((F,le)=>F+le,0)]).sort((O,F)=>O[1]-F[1])[0])==null?void 0:Z[0];M&&(U=M);break}case"initialPlacement":U=i;break}if(o!==U)return{reset:{placement:U}}}return{}}}};function $n(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Fn(e){return dc.some(t=>e[t]>=0)}const Ec=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Be(e,t);switch(n){case"referenceHidden":{const a=await jt(t,{...o,elementContext:"reference"}),s=$n(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Fn(s)}}}case"escaped":{const a=await jt(t,{...o,altBoundary:!0}),s=$n(a,r.floating);return{data:{escapedOffsets:s,escaped:Fn(s)}}}default:return{}}}}};async function Cc(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=We(r),i=Rt(r),l=Qe(r)==="y",u=["left","top"].includes(s)?-1:1,d=a&&l?-1:1,g=Be(t,e);let{mainAxis:c,crossAxis:v,alignmentAxis:x}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return i&&typeof x=="number"&&(v=i==="end"?x*-1:x),l?{x:v*d,y:c*u}:{x:c*u,y:v*d}}const Sc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await Cc(t,e);return s===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},Rc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:y=>{let{x:E,y:b}=y;return{x:E,y:b}}},...l}=Be(e,t),u={x:r,y:n},d=await jt(t,l),g=Qe(We(o)),c=nn(g);let v=u[c],x=u[g];if(a){const y=c==="y"?"top":"left",E=c==="y"?"bottom":"right",b=v+d[y],C=v-d[E];v=Ir(b,v,C)}if(s){const y=g==="y"?"top":"left",E=g==="y"?"bottom":"right",b=x+d[y],C=x-d[E];x=Ir(b,x,C)}const h=i.fn({...t,[c]:v,[g]:x});return{...h,data:{x:h.x-r,y:h.y-n}}}}},Pc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=Be(e,t),d={x:r,y:n},g=Qe(o),c=nn(g);let v=d[c],x=d[g];const h=Be(i,t),y=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const C=c==="y"?"height":"width",R=a.reference[c]-a.floating[C]+y.mainAxis,P=a.reference[c]+a.reference[C]-y.mainAxis;v<R?v=R:v>P&&(v=P)}if(u){var E,b;const C=c==="y"?"width":"height",R=["top","left"].includes(We(o)),P=a.reference[g]-a.floating[C]+(R&&((E=s.offset)==null?void 0:E[g])||0)+(R?0:y.crossAxis),D=a.reference[g]+a.reference[C]+(R?0:((b=s.offset)==null?void 0:b[g])||0)-(R?y.crossAxis:0);x<P?x=P:x>D&&(x=D)}return{[c]:v,[g]:x}}}},Ac=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:a}=t,{apply:s=()=>{},...i}=Be(e,t),l=await jt(t,i),u=We(r),d=Rt(r),g=Qe(r)==="y",{width:c,height:v}=n.floating;let x,h;u==="top"||u==="bottom"?(x=u,h=d===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(h=u,x=d==="end"?"top":"bottom");const y=v-l.top-l.bottom,E=c-l.left-l.right,b=_e(v-l[x],y),C=_e(c-l[h],E),R=!t.middlewareData.shift;let P=b,D=C;if(g?D=d||R?_e(C,E):E:P=d||R?_e(b,y):y,R&&!d){const N=be(l.left,0),z=be(l.right,0),Y=be(l.top,0),G=be(l.bottom,0);g?D=c-2*(N!==0||z!==0?N+z:be(l.left,l.right)):P=v-2*(Y!==0||G!==0?Y+G:be(l.top,l.bottom))}await s({...t,availableWidth:D,availableHeight:P});const T=await o.getDimensions(a.floating);return c!==T.width||v!==T.height?{reset:{rects:!0}}:{}}}};function Pt(e){return Ca(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ve(e){var t;return(t=(Ca(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ca(e){return e instanceof Node||e instanceof ye(e).Node}function Ae(e){return e instanceof Element||e instanceof ye(e).Element}function je(e){return e instanceof HTMLElement||e instanceof ye(e).HTMLElement}function Bn(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function $t(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Tc(e){return["table","td","th"].includes(Pt(e))}function dr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function sn(e){const t=ln(),r=Ae(e)?Te(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Oc(e){let t=et(e);for(;je(t)&&!wt(t);){if(sn(t))return t;if(dr(t))return null;t=et(t)}return null}function ln(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function wt(e){return["html","body","#document"].includes(Pt(e))}function Te(e){return ye(e).getComputedStyle(e)}function fr(e){return Ae(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function et(e){if(Pt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bn(e)&&e.host||Ve(e);return Bn(t)?t.host:t}function Sa(e){const t=et(e);return wt(t)?e.ownerDocument?e.ownerDocument.body:e.body:je(t)&&$t(t)?t:Sa(t)}function Mt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Sa(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),s=ye(o);if(a){const i=Fr(s);return t.concat(s,s.visualViewport||[],$t(o)?o:[],i&&r?Mt(i):[])}return t.concat(o,Mt(o,[],r))}function Fr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ra(e){const t=Te(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=je(e),a=o?e.offsetWidth:r,s=o?e.offsetHeight:n,i=or(r)!==a||or(n)!==s;return i&&(r=a,n=s),{width:r,height:n,$:i}}function cn(e){return Ae(e)?e:e.contextElement}function xt(e){const t=cn(e);if(!je(t))return Ze(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=Ra(t);let s=(a?or(r.width):r.width)/n,i=(a?or(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Dc=Ze(0);function Pa(e){const t=ye(e);return!ln()||!t.visualViewport?Dc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Nc(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ye(e)?!1:t}function lt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=cn(e);let s=Ze(1);t&&(n?Ae(n)&&(s=xt(n)):s=xt(e));const i=Nc(a,r,n)?Pa(a):Ze(0);let l=(o.left+i.x)/s.x,u=(o.top+i.y)/s.y,d=o.width/s.x,g=o.height/s.y;if(a){const c=ye(a),v=n&&Ae(n)?ye(n):n;let x=c,h=Fr(x);for(;h&&n&&v!==x;){const y=xt(h),E=h.getBoundingClientRect(),b=Te(h),C=E.left+(h.clientLeft+parseFloat(b.paddingLeft))*y.x,R=E.top+(h.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,u*=y.y,d*=y.x,g*=y.y,l+=C,u+=R,x=ye(h),h=Fr(x)}}return sr({width:d,height:g,x:l,y:u})}function kc(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",s=Ve(n),i=t?dr(t.floating):!1;if(n===s||i&&a)return r;let l={scrollLeft:0,scrollTop:0},u=Ze(1);const d=Ze(0),g=je(n);if((g||!g&&!a)&&((Pt(n)!=="body"||$t(s))&&(l=fr(n)),je(n))){const c=lt(n);u=xt(n),d.x=c.x+n.clientLeft,d.y=c.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+d.x,y:r.y*u.y-l.scrollTop*u.y+d.y}}function _c(e){return Array.from(e.getClientRects())}function Aa(e){return lt(Ve(e)).left+fr(e).scrollLeft}function jc(e){const t=Ve(e),r=fr(e),n=e.ownerDocument.body,o=be(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=be(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Aa(e);const i=-r.scrollTop;return Te(n).direction==="rtl"&&(s+=be(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:s,y:i}}function Mc(e,t){const r=ye(e),n=Ve(e),o=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const u=ln();(!u||u&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}return{width:a,height:s,x:i,y:l}}function Lc(e,t){const r=lt(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=je(e)?xt(e):Ze(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,u=n*a.y;return{width:s,height:i,x:l,y:u}}function Wn(e,t,r){let n;if(t==="viewport")n=Mc(e,r);else if(t==="document")n=jc(Ve(e));else if(Ae(t))n=Lc(t,r);else{const o=Pa(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return sr(n)}function Ta(e,t){const r=et(e);return r===t||!Ae(r)||wt(r)?!1:Te(r).position==="fixed"||Ta(r,t)}function Ic(e,t){const r=t.get(e);if(r)return r;let n=Mt(e,[],!1).filter(i=>Ae(i)&&Pt(i)!=="body"),o=null;const a=Te(e).position==="fixed";let s=a?et(e):e;for(;Ae(s)&&!wt(s);){const i=Te(s),l=sn(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||$t(s)&&!l&&Ta(e,s))?n=n.filter(d=>d!==s):o=i,s=et(s)}return t.set(e,n),n}function $c(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?dr(t)?[]:Ic(t,this._c):[].concat(r),n],i=s[0],l=s.reduce((u,d)=>{const g=Wn(t,d,o);return u.top=be(g.top,u.top),u.right=_e(g.right,u.right),u.bottom=_e(g.bottom,u.bottom),u.left=be(g.left,u.left),u},Wn(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Fc(e){const{width:t,height:r}=Ra(e);return{width:t,height:r}}function Bc(e,t,r){const n=je(t),o=Ve(t),a=r==="fixed",s=lt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=Ze(0);if(n||!n&&!a)if((Pt(t)!=="body"||$t(o))&&(i=fr(t)),n){const g=lt(t,!0,a,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else o&&(l.x=Aa(o));const u=s.left+i.scrollLeft-l.x,d=s.top+i.scrollTop-l.y;return{x:u,y:d,width:s.width,height:s.height}}function Or(e){return Te(e).position==="static"}function zn(e,t){return!je(e)||Te(e).position==="fixed"?null:t?t(e):e.offsetParent}function Oa(e,t){const r=ye(e);if(dr(e))return r;if(!je(e)){let o=et(e);for(;o&&!wt(o);){if(Ae(o)&&!Or(o))return o;o=et(o)}return r}let n=zn(e,t);for(;n&&Tc(n)&&Or(n);)n=zn(n,t);return n&&wt(n)&&Or(n)&&!sn(n)?r:n||Oc(e)||r}const Wc=async function(e){const t=this.getOffsetParent||Oa,r=this.getDimensions,n=await r(e.floating);return{reference:Bc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function zc(e){return Te(e).direction==="rtl"}const Vc={convertOffsetParentRelativeRectToViewportRelativeRect:kc,getDocumentElement:Ve,getClippingRect:$c,getOffsetParent:Oa,getElementRects:Wc,getClientRects:_c,getDimensions:Fc,getScale:xt,isElement:Ae,isRTL:zc};function Hc(e,t){let r=null,n;const o=Ve(e);function a(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const{left:u,top:d,width:g,height:c}=e.getBoundingClientRect();if(i||t(),!g||!c)return;const v=Xt(d),x=Xt(o.clientWidth-(u+g)),h=Xt(o.clientHeight-(d+c)),y=Xt(u),b={rootMargin:-v+"px "+-x+"px "+-h+"px "+-y+"px",threshold:be(0,_e(1,l))||1};let C=!0;function R(P){const D=P[0].intersectionRatio;if(D!==l){if(!C)return s();D?s(!1,D):n=setTimeout(()=>{s(!1,1e-7)},1e3)}C=!1}try{r=new IntersectionObserver(R,{...b,root:o.ownerDocument})}catch{r=new IntersectionObserver(R,b)}r.observe(e)}return s(!0),a}function Uc(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=cn(e),d=o||a?[...u?Mt(u):[],...Mt(t)]:[];d.forEach(E=>{o&&E.addEventListener("scroll",r,{passive:!0}),a&&E.addEventListener("resize",r)});const g=u&&i?Hc(u,r):null;let c=-1,v=null;s&&(v=new ResizeObserver(E=>{let[b]=E;b&&b.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(c),c=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(t)})),r()}),u&&!l&&v.observe(u),v.observe(t));let x,h=l?lt(e):null;l&&y();function y(){const E=lt(e);h&&(E.x!==h.x||E.y!==h.y||E.width!==h.width||E.height!==h.height)&&r(),h=E,x=requestAnimationFrame(y)}return r(),()=>{var E;d.forEach(b=>{o&&b.removeEventListener("scroll",r),a&&b.removeEventListener("resize",r)}),g==null||g(),(E=v)==null||E.disconnect(),v=null,l&&cancelAnimationFrame(x)}}const Yc=Sc,Gc=Rc,qc=wc,Kc=Ac,Xc=Ec,Vn=xc,Jc=Pc,Zc=(e,t,r)=>{const n=new Map,o={platform:Vc,...r},a={...o.platform,_c:n};return yc(e,t,{...o,platform:a})};var tr=typeof document<"u"?w.useLayoutEffect:w.useEffect;function ir(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!ir(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!ir(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Da(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Hn(e,t){const r=Da(e);return Math.round(t*r)/r}function Un(e){const t=f.useRef(e);return tr(()=>{t.current=e}),t}function Qc(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[d,g]=f.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[c,v]=f.useState(n);ir(c,n)||v(n);const[x,h]=f.useState(null),[y,E]=f.useState(null),b=f.useCallback(M=>{M!==D.current&&(D.current=M,h(M))},[]),C=f.useCallback(M=>{M!==T.current&&(T.current=M,E(M))},[]),R=a||x,P=s||y,D=f.useRef(null),T=f.useRef(null),N=f.useRef(d),z=l!=null,Y=Un(l),G=Un(o),_=f.useCallback(()=>{if(!D.current||!T.current)return;const M={placement:t,strategy:r,middleware:c};G.current&&(M.platform=G.current),Zc(D.current,T.current,M).then(O=>{const F={...O,isPositioned:!0};Z.current&&!ir(N.current,F)&&(N.current=F,Yr.flushSync(()=>{g(F)}))})},[c,t,r,G]);tr(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,g(M=>({...M,isPositioned:!1})))},[u]);const Z=f.useRef(!1);tr(()=>(Z.current=!0,()=>{Z.current=!1}),[]),tr(()=>{if(R&&(D.current=R),P&&(T.current=P),R&&P){if(Y.current)return Y.current(R,P,_);_()}},[R,P,_,Y,z]);const I=f.useMemo(()=>({reference:D,floating:T,setReference:b,setFloating:C}),[b,C]),V=f.useMemo(()=>({reference:R,floating:P}),[R,P]),U=f.useMemo(()=>{const M={position:r,left:0,top:0};if(!V.floating)return M;const O=Hn(V.floating,d.x),F=Hn(V.floating,d.y);return i?{...M,transform:"translate("+O+"px, "+F+"px)",...Da(V.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:F}},[r,i,V.floating,d.x,d.y]);return f.useMemo(()=>({...d,update:_,refs:I,elements:V,floatingStyles:U}),[d,_,I,V,U])}const eu=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Vn({element:n.current,padding:o}).fn(r):{}:n?Vn({element:n,padding:o}).fn(r):{}}}},tu=(e,t)=>({...Yc(e),options:[e,t]}),ru=(e,t)=>({...Gc(e),options:[e,t]}),nu=(e,t)=>({...Jc(e),options:[e,t]}),ou=(e,t)=>({...qc(e),options:[e,t]}),au=(e,t)=>({...Kc(e),options:[e,t]}),su=(e,t)=>({...Xc(e),options:[e,t]}),iu=(e,t)=>({...eu(e),options:[e,t]});var lu="Arrow",Na=f.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return m.jsx(ie.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});Na.displayName=lu;var cu=Na,un="Popper",[ka,_a]=Ct(un),[uu,ja]=ka(un),Ma=e=>{const{__scopePopper:t,children:r}=e,[n,o]=f.useState(null);return m.jsx(uu,{scope:t,anchor:n,onAnchorChange:o,children:r})};Ma.displayName=un;var La="PopperAnchor",Ia=f.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=ja(La,r),s=f.useRef(null),i=pe(t,s);return f.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||s.current)}),n?null:m.jsx(ie.div,{...o,ref:i})});Ia.displayName=La;var dn="PopperContent",[du,fu]=ka(dn),$a=f.forwardRef((e,t)=>{var xe,ge,we,ve,ct,Me;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:g="partial",hideWhenDetached:c=!1,updatePositionStrategy:v="optimized",onPlaced:x,...h}=e,y=ja(dn,r),[E,b]=f.useState(null),C=pe(t,De=>b(De)),[R,P]=f.useState(null),D=va(R),T=(D==null?void 0:D.width)??0,N=(D==null?void 0:D.height)??0,z=n+(a!=="center"?"-"+a:""),Y=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},G=Array.isArray(u)?u:[u],_=G.length>0,Z={padding:Y,boundary:G.filter(gu),altBoundary:_},{refs:I,floatingStyles:V,placement:U,isPositioned:M,middlewareData:O}=Qc({strategy:"fixed",placement:z,whileElementsMounted:(...De)=>Uc(...De,{animationFrame:v==="always"}),elements:{reference:y.anchor},middleware:[tu({mainAxis:o+N,alignmentAxis:s}),l&&ru({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?nu():void 0,...Z}),l&&ou({...Z}),au({...Z,apply:({elements:De,rects:tt,availableWidth:Le,availableHeight:Pe})=>{const{width:ut,height:He}=tt.reference,se=De.floating.style;se.setProperty("--radix-popper-available-width",`${Le}px`),se.setProperty("--radix-popper-available-height",`${Pe}px`),se.setProperty("--radix-popper-anchor-width",`${ut}px`),se.setProperty("--radix-popper-anchor-height",`${He}px`)}}),R&&iu({element:R,padding:i}),vu({arrowWidth:T,arrowHeight:N}),c&&su({strategy:"referenceHidden",...Z})]}),[F,le]=Wa(U),$=Je(x);st(()=>{M&&($==null||$())},[M,$]);const W=(xe=O.arrow)==null?void 0:xe.x,k=(ge=O.arrow)==null?void 0:ge.y,X=((we=O.arrow)==null?void 0:we.centerOffset)!==0,[te,q]=f.useState();return st(()=>{E&&q(window.getComputedStyle(E).zIndex)},[E]),m.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:M?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[(ve=O.transformOrigin)==null?void 0:ve.x,(ct=O.transformOrigin)==null?void 0:ct.y].join(" "),...((Me=O.hide)==null?void 0:Me.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(du,{scope:r,placedSide:F,onArrowChange:P,arrowX:W,arrowY:k,shouldHideArrow:X,children:m.jsx(ie.div,{"data-side":F,"data-align":le,...h,ref:C,style:{...h.style,animation:M?void 0:"none"}})})})});$a.displayName=dn;var Fa="PopperArrow",pu={top:"bottom",right:"left",bottom:"top",left:"right"},Ba=f.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=fu(Fa,n),s=pu[a.placedSide];return m.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:m.jsx(cu,{...o,ref:r,style:{...o.style,display:"block"}})})});Ba.displayName=Fa;function gu(e){return e!==null}var vu=e=>({name:"transformOrigin",options:e,fn(t){var y,E,b;const{placement:r,rects:n,middlewareData:o}=t,s=((y=o.arrow)==null?void 0:y.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,d]=Wa(r),g={start:"0%",center:"50%",end:"100%"}[d],c=(((E=o.arrow)==null?void 0:E.x)??0)+i/2,v=(((b=o.arrow)==null?void 0:b.y)??0)+l/2;let x="",h="";return u==="bottom"?(x=s?g:`${c}px`,h=`${-l}px`):u==="top"?(x=s?g:`${c}px`,h=`${n.floating.height+l}px`):u==="right"?(x=`${-l}px`,h=s?g:`${v}px`):u==="left"&&(x=`${n.floating.width+l}px`,h=s?g:`${v}px`),{data:{x,y:h}}}});function Wa(e){const[t,r="center"]=e.split("-");return[t,r]}var hu=Ma,mu=Ia,bu=$a,yu=Ba,xu="VisuallyHidden",za=f.forwardRef((e,t)=>m.jsx(ie.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));za.displayName=xu;var wu=za,[pr,Hd]=Ct("Tooltip",[_a]),gr=_a(),Va="TooltipProvider",Eu=700,Br="tooltip.open",[Cu,fn]=pr(Va),Ha=e=>{const{__scopeTooltip:t,delayDuration:r=Eu,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,[s,i]=f.useState(!0),l=f.useRef(!1),u=f.useRef(0);return f.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),m.jsx(Cu,{scope:t,isOpenDelayed:s,delayDuration:r,onOpen:f.useCallback(()=>{window.clearTimeout(u.current),i(!1)},[]),onClose:f.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:f.useCallback(d=>{l.current=d},[]),disableHoverableContent:o,children:a})};Ha.displayName=Va;var vr="Tooltip",[Su,hr]=pr(vr),Ua=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=fn(vr,e.__scopeTooltip),u=gr(t),[d,g]=f.useState(null),c=Zt(),v=f.useRef(0),x=s??l.disableHoverableContent,h=i??l.delayDuration,y=f.useRef(!1),[E=!1,b]=Gr({prop:n,defaultProp:o,onChange:T=>{T?(l.onOpen(),document.dispatchEvent(new CustomEvent(Br))):l.onClose(),a==null||a(T)}}),C=f.useMemo(()=>E?y.current?"delayed-open":"instant-open":"closed",[E]),R=f.useCallback(()=>{window.clearTimeout(v.current),y.current=!1,b(!0)},[b]),P=f.useCallback(()=>{window.clearTimeout(v.current),b(!1)},[b]),D=f.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{y.current=!0,b(!0)},h)},[h,b]);return f.useEffect(()=>()=>window.clearTimeout(v.current),[]),m.jsx(hu,{...u,children:m.jsx(Su,{scope:t,contentId:c,open:E,stateAttribute:C,trigger:d,onTriggerChange:g,onTriggerEnter:f.useCallback(()=>{l.isOpenDelayed?D():R()},[l.isOpenDelayed,D,R]),onTriggerLeave:f.useCallback(()=>{x?P():window.clearTimeout(v.current)},[P,x]),onOpen:R,onClose:P,disableHoverableContent:x,children:r})})};Ua.displayName=vr;var Wr="TooltipTrigger",Ya=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=hr(Wr,r),a=fn(Wr,r),s=gr(r),i=f.useRef(null),l=pe(t,i,o.onTriggerChange),u=f.useRef(!1),d=f.useRef(!1),g=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),m.jsx(mu,{asChild:!0,...s,children:m.jsx(ie.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:ue(e.onPointerMove,c=>{c.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:ue(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:ue(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:ue(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:ue(e.onBlur,o.onClose),onClick:ue(e.onClick,o.onClose)})})});Ya.displayName=Wr;var Ru="TooltipPortal",[Ud,Pu]=pr(Ru,{forceMount:void 0}),Et="TooltipContent",Ga=f.forwardRef((e,t)=>{const r=Pu(Et,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,s=hr(Et,e.__scopeTooltip);return m.jsx(It,{present:n||s.open,children:s.disableHoverableContent?m.jsx(qa,{side:o,...a,ref:t}):m.jsx(Au,{side:o,...a,ref:t})})}),Au=f.forwardRef((e,t)=>{const r=hr(Et,e.__scopeTooltip),n=fn(Et,e.__scopeTooltip),o=f.useRef(null),a=pe(t,o),[s,i]=f.useState(null),{trigger:l,onClose:u}=r,d=o.current,{onPointerInTransitChange:g}=n,c=f.useCallback(()=>{i(null),g(!1)},[g]),v=f.useCallback((x,h)=>{const y=x.currentTarget,E={x:x.clientX,y:x.clientY},b=Du(E,y.getBoundingClientRect()),C=Nu(E,b),R=ku(h.getBoundingClientRect()),P=ju([...C,...R]);i(P),g(!0)},[g]);return f.useEffect(()=>()=>c(),[c]),f.useEffect(()=>{if(l&&d){const x=y=>v(y,d),h=y=>v(y,l);return l.addEventListener("pointerleave",x),d.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",h)}}},[l,d,v,c]),f.useEffect(()=>{if(s){const x=h=>{const y=h.target,E={x:h.clientX,y:h.clientY},b=(l==null?void 0:l.contains(y))||(d==null?void 0:d.contains(y)),C=!_u(E,s);b?c():C&&(c(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,d,s,u,c]),m.jsx(qa,{...e,ref:a})}),[Tu,Ou]=pr(vr,{isInside:!1}),qa=f.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=hr(Et,r),u=gr(r),{onClose:d}=l;return f.useEffect(()=>(document.addEventListener(Br,d),()=>document.removeEventListener(Br,d)),[d]),f.useEffect(()=>{if(l.trigger){const g=c=>{const v=c.target;v!=null&&v.contains(l.trigger)&&d()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[l.trigger,d]),m.jsx(Kr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:g=>g.preventDefault(),onDismiss:d,children:m.jsxs(bu,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m.jsx(qr,{children:n}),m.jsx(Tu,{scope:r,isInside:!0,children:m.jsx(wu,{id:l.contentId,role:"tooltip",children:o||n})})]})})});Ga.displayName=Et;var Ka="TooltipArrow",Xa=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=gr(r);return Ou(Ka,r).isInside?null:m.jsx(yu,{...o,...n,ref:t})});Xa.displayName=Ka;function Du(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Nu(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function ku(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function _u(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a].x,l=t[a].y,u=t[s].x,d=t[s].y;l>n!=d>n&&r<(u-i)*(n-l)/(d-l)+i&&(o=!o)}return o}function ju(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Mu(t)}function Mu(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Lu=Ha,Iu=Ua,$u=Ya,Ja=Ga,Fu=Xa;const Za=Lu,Qa=Iu,es=$u,ts=Fu,pn=f.forwardRef(({className:e,sideOffset:t=4,...r},n)=>m.jsx(Ja,{ref:n,sideOffset:t,className:fe("ve-z-50 ve-overflow-hidden ve-rounded-[6px] ve-bg-popover ve-px-3 ve-py-1.5 ve-text-sm ve-text-popover-foreground",e),...r}));pn.displayName=Ja.displayName;const Bu=({displayName:e,fieldId:t,children:r})=>{const{tooltipsVisible:n}=ns();let o="";return e&&t?o=`${e} (${t})`:t?o=`(${t})`:e&&(o=`${e}`),m.jsx("div",{children:m.jsx(Za,{children:m.jsxs(Qa,{open:n&&!!o,children:[m.jsx(es,{asChild:!0,children:m.jsx("div",{className:n?"ve-outline-2 ve-outline-dotted ve-outline-[#5A58F2]":"",children:r})}),m.jsxs(pn,{children:[m.jsx("p",{children:o}),m.jsx(ts,{fill:"bg-popover"})]})]})})})},rs=w.createContext(void 0),Wu=({children:e})=>{const[t,r]=w.useState(!1),n=()=>{r(o=>!o)};return m.jsx(rs.Provider,{value:{tooltipsVisible:t,toggleTooltips:n},children:e})},ns=()=>{const e=w.useContext(rs);return e||{tooltipsVisible:!1,toggleTooltips:()=>{}}},zu=(e,t,r,n,o,a)=>{const{history:{back:s,forward:i,histories:l,index:u,hasPast:d,hasFuture:g,setHistories:c}}=rr.usePuck();return w.useEffect(()=>{t(l,u)},[u,l,t]),m.jsxs("header",{className:"puck-header",children:[m.jsxs("div",{className:"header-left",children:[m.jsx(Hu,{}),m.jsx(Uu,{})]}),m.jsx("div",{className:"header-center"}),m.jsxs("div",{className:"actions",children:[m.jsx(Xe,{variant:"ghost",size:"icon",disabled:!d,onClick:s,children:m.jsx(As,{className:"sm-icon"})}),m.jsx(Xe,{variant:"ghost",size:"icon",disabled:!g,onClick:i,children:m.jsx(Ts,{className:"sm-icon"})}),m.jsx(Vu,{disabled:l.length===1,onClearLocalChanges:()=>{e(),c([{id:"root",state:{data:n}}])}}),!a&&m.jsx(Xe,{variant:"secondary",disabled:l.length===1,onClick:async()=>{await o(r),e()},children:"Publish"})]})]})},Vu=({disabled:e,onClearLocalChanges:t})=>{const[r,n]=w.useState(!1),o=()=>{t(),n(!1)};return m.jsxs(ec,{open:r,onOpenChange:n,children:[m.jsx(tc,{disabled:e,asChild:!0,children:m.jsx(Xe,{variant:"outline",children:"Clear Local Changes"})}),m.jsxs(ca,{children:[m.jsxs(ua,{children:[m.jsx(fa,{children:"Clear Local Changes"}),m.jsx(pa,{children:"This action will remove your local changes. It cannot be undone."})]}),m.jsxs(da,{children:[m.jsx(ga,{children:"Cancel"}),m.jsx(Xe,{onClick:o,children:"Confirm"})]})]})]})},Hu=()=>{const{dispatch:e,appState:{ui:{leftSideBarVisible:t,rightSideBarVisible:r}}}=rr.usePuck(),n=w.useCallback(o=>{const a=window.matchMedia("(min-width: 638px)").matches,s=o==="left"?t:r,i=o==="left"?"rightSideBarVisible":"leftSideBarVisible";e({type:"setUi",ui:{[`${o}SideBarVisible`]:!s,...a?{}:{[i]:!1}}})},[e,t,r]);return m.jsxs(m.Fragment,{children:[m.jsx(Xe,{variant:"ghost",size:"icon",onClick:()=>{n("left")},children:m.jsx(Rs,{className:"sm-icon"})}),m.jsx(Xe,{variant:"ghost",size:"icon",onClick:()=>{n("right")},children:m.jsx(Ps,{className:"sm-icon"})})]})},Uu=()=>{const{toggleTooltips:e,tooltipsVisible:t}=ns();return m.jsx(Za,{children:m.jsxs(Qa,{children:[m.jsx(es,{asChild:!0,children:m.jsxs("div",{className:"ve-flex ve-flex-row ve-self-center ve-gap-3 ve-pl-2",children:[m.jsx(wa,{onCheckedChange:e,checked:t}),m.jsx("p",{className:"ve-self-center ve-text-sm",children:"Entity Fields"})]})}),m.jsxs(pn,{children:[t?"Hide Entity Fields":"Show Entity Fields",m.jsx(ts,{fill:"ve-bg-popover"})]})]})})},Yn="ROLE_",Gn="TEMPLATE_",Yu="LAYOUT_",Gu="ENTITY_";function zr(e,t,r,n,o){const a=e?"dev":"";if(!t||!r||!o&&!n)throw new Error("Unable to generate local storage key, missing query parameters");if(t===jd.INDIVIDUAL){if(!o)throw new Error(`EntityId required for role ${t}`);return a+Yn+t+Gn+r+Gu+o}if(!n)throw new Error(`LayoutId required for role ${t}`);return a+Yn+t+Gn+r+Yu+n}const qu=({puckConfig:e,puckInitialHistory:t,isLoading:r,clearHistory:n,templateMetadata:o,saveState:a,saveSaveState:s,saveVisualConfigData:i,sendDevSaveStateData:l,buildLocalStorageKey:u,devLogger:d})=>{const[g,c]=w.useState(!1),v=w.useRef(0),x=w.useCallback((b,C)=>{C!==0&&v.current!==C&&b.length>0&&(d.logFunc("handleHistoryChange"),d.logData("PUCK_INDEX",C),d.logData("PUCK_HISTORY",b),v.current=C,d.logFunc("saveToLocalStorage"),window.localStorage.setItem(u(),JSON.stringify(b)),(a==null?void 0:a.hash)!==b[C].id&&(o.isDevMode&&!o.devOverride?(d.logFunc("sendDevSaveStateData"),l({payload:{devSaveStateData:JSON.stringify(b[C].state.data)}})):(d.logFunc("saveSaveState"),s({payload:{hash:b[C].id,history:JSON.stringify(b[C].state)}}))))},[o,zr,a]),h=()=>{n(),v.current=0},y=async b=>{d.logFunc("saveVisualConfigData"),i({payload:{visualConfigurationData:JSON.stringify(b)}})},E=async()=>{if(!r&&!g){c(!0);return}};return m.jsx(Wu,{children:m.jsx(rr.Puck,{config:e,data:{},initialHistory:t,onChange:E,overrides:{header:()=>{const{appState:b}=rr.usePuck();return zu(h,x,b.data,t==null?void 0:t.histories[0].state.data,y,o.isDevMode&&!o.devOverride)}}})})};var gn="Progress",vn=100,[Ku,Yd]=Ct(gn),[Xu,Ju]=Ku(gn),os=f.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:o,getValueLabel:a=Zu,...s}=e;(o||o===0)&&!qn(o)&&console.error(Qu(`${o}`,"Progress"));const i=qn(o)?o:vn;n!==null&&!Kn(n,i)&&console.error(ed(`${n}`,"Progress"));const l=Kn(n,i)?n:null,u=lr(l)?a(l,i):void 0;return m.jsx(Xu,{scope:r,value:l,max:i,children:m.jsx(ie.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":lr(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":is(l,i),"data-value":l??void 0,"data-max":i,...s,ref:t})})});os.displayName=gn;var as="ProgressIndicator",ss=f.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,o=Ju(as,r);return m.jsx(ie.div,{"data-state":is(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:t})});ss.displayName=as;function Zu(e,t){return`${Math.round(e/t*100)}%`}function is(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function lr(e){return typeof e=="number"}function qn(e){return lr(e)&&!isNaN(e)&&e>0}function Kn(e,t){return lr(e)&&!isNaN(e)&&e<=t&&e>=0}function Qu(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${vn}\`.`}function ed(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
118
118
|
- a positive number
|
|
119
119
|
- less than the value passed to \`max\` (or ${vn} if no \`max\` prop is set)
|
|
120
120
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
121
121
|
|
|
122
|
-
Defaulting to \`null\`.`}var ls=os,ed=ss;const cs=f.forwardRef(({className:e,value:t,...r},n)=>b.jsx(ls,{ref:n,className:de("ve-relative ve-h-4 ve-w-full ve-overflow-hidden ve-rounded-full ve-bg-secondary",e),...r,children:b.jsx(ed,{className:"ve-h-full ve-w-full ve-flex-1 ve-bg-primary ve-transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));cs.displayName=ls.displayName;function td({progress:e}){return b.jsxs("div",{className:"ve-flex ve-h-screen ve-loading-wrapper ve-w-screen ve-flex-col ve-items-center ve-justify-center puck-css",children:[b.jsx(cs,{className:"ve-w-1/3 ve-loading-progress",value:e}),b.jsx("div",{children:"Loading Visual Editor..."})]})}var Xn=["light","dark"],rd="(prefers-color-scheme: dark)",nd=f.createContext(void 0),od={setTheme:e=>{},themes:[]},ad=()=>{var e;return(e=f.useContext(nd))!=null?e:od};f.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:o,defaultTheme:a,value:s,attrs:i,nonce:l})=>{let u=a==="system",d=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${i.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,p=o?Xn.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",c=(y,v=!1,h=!0)=>{let x=s?s[y]:y,C=v?y+"|| ''":`'${x}'`,E="";return o&&h&&!v&&Xn.includes(y)&&(E+=`d.style.colorScheme = '${y}';`),r==="class"?v||x?E+=`c.add(${C})`:E+="null":x&&(E+=`d[s](n,${C})`),E},m=e?`!function(){${d}${c(e)}}()`:n?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${rd}',m=window.matchMedia(t);if(m.media!==t||m.matches){${c("dark")}}else{${c("light")}}}else if(e){${s?`var x=${JSON.stringify(s)};`:""}${c(s?"x[e]":"e",!0)}}${u?"":"else{"+c(a,!1,!1)+"}"}${p}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${s?`var x=${JSON.stringify(s)};`:""}${c(s?"x[e]":"e",!0)}}else{${c(a,!1,!1)};}${p}}catch(t){}}();`;return f.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:m}})});var sd=e=>{switch(e){case"success":return cd;case"info":return dd;case"warning":return ud;case"error":return fd;default:return null}},id=Array(12).fill(0),ld=({visible:e})=>w.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},w.createElement("div",{className:"sonner-spinner"},id.map((t,r)=>w.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),cd=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),ud=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},w.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),dd=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),fd=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),pd=()=>{let[e,t]=w.useState(document.hidden);return w.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Vr=1,gd=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Vr++,a=this.toasts.find(i=>i.id===o),s=e.dismissible===void 0?!0:e.dismissible;return a?this.toasts=this.toasts.map(i=>i.id===o?(this.publish({...i,...e,id:o,title:r}),{...i,...e,id:o,dismissible:s,title:r}):i):this.addToast({title:r,...n,dismissible:s,id:o}),o},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),o=r!==void 0;return n.then(async a=>{if(hd(a)&&!a.ok){o=!1;let s=typeof t.error=="function"?await t.error(`HTTP error! status: ${a.status}`):t.error,i=typeof t.description=="function"?await t.description(`HTTP error! status: ${a.status}`):t.description;this.create({id:r,type:"error",message:s,description:i})}else if(t.success!==void 0){o=!1;let s=typeof t.success=="function"?await t.success(a):t.success,i=typeof t.description=="function"?await t.description(a):t.description;this.create({id:r,type:"success",message:s,description:i})}}).catch(async a=>{if(t.error!==void 0){o=!1;let s=typeof t.error=="function"?await t.error(a):t.error,i=typeof t.description=="function"?await t.description(a):t.description;this.create({id:r,type:"error",message:s,description:i})}}).finally(()=>{var a;o&&(this.dismiss(r),r=void 0),(a=t.finally)==null||a.call(t)}),r},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||Vr++;return this.create({jsx:e(r),id:r,...t}),r},this.subscribers=[],this.toasts=[]}},me=new gd,vd=(e,t)=>{let r=(t==null?void 0:t.id)||Vr++;return me.addToast({title:e,...t,id:r}),r},hd=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",md=vd,bd=()=>me.toasts;Object.assign(md,{success:me.success,info:me.info,warning:me.warning,error:me.error,custom:me.custom,message:me.message,promise:me.promise,dismiss:me.dismiss,loading:me.loading},{getHistory:bd});function yd(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}yd(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
123
|
-
`);function Xt(e){return e.label!==void 0}var xd=3,wd="32px",Ed=4e3,Cd=356,Sd=14,Rd=20,Pd=200;function Ad(...e){return e.filter(Boolean).join(" ")}var Td=e=>{var t,r,n,o,a,s,i,l,u,d;let{invert:p,toast:c,unstyled:m,interacting:y,setHeights:v,visibleToasts:h,heights:x,index:C,toasts:E,expanded:S,removeToast:R,defaultRichColors:N,closeButton:A,style:k,cancelButtonStyle:U,actionButtonStyle:Y,className:q="",descriptionClassName:_="",duration:X,position:F,gap:z,loadingIcon:H,expandByDefault:L,classNames:D,icons:B,closeButtonAriaLabel:ce="Close toast",pauseWhenPageIsHidden:O,cn:j}=e,[$,re]=w.useState(!1),[pe,ee]=w.useState(!1),[Oe,ge]=w.useState(!1),[xe,ve]=w.useState(!1),[ct,Me]=w.useState(0),[Ne,tt]=w.useState(0),Le=w.useRef(null),Se=w.useRef(null),ut=C===0,He=C+1<=h,ae=c.type,we=c.dismissible!==!1,At=c.className||"",mr=c.descriptionClassName||"",rt=w.useMemo(()=>x.findIndex(I=>I.toastId===c.id)||0,[x,c.id]),$t=w.useMemo(()=>{var I;return(I=c.closeButton)!=null?I:A},[c.closeButton,A]),dt=w.useMemo(()=>c.duration||X||Ed,[c.duration,X]),Tt=w.useRef(0),Ue=w.useRef(0),Ft=w.useRef(0),Ye=w.useRef(null),[Bt,br]=F.split("-"),Wt=w.useMemo(()=>x.reduce((I,J,K)=>K>=rt?I:I+J.height,0),[x,rt]),ft=pd(),zt=c.invert||p,De=ae==="loading";Ue.current=w.useMemo(()=>rt*z+Wt,[rt,Wt]),w.useEffect(()=>{re(!0)},[]),w.useLayoutEffect(()=>{if(!$)return;let I=Se.current,J=I.style.height;I.style.height="auto";let K=I.getBoundingClientRect().height;I.style.height=J,tt(K),v(Ce=>Ce.find(he=>he.toastId===c.id)?Ce.map(he=>he.toastId===c.id?{...he,height:K}:he):[{toastId:c.id,height:K,position:c.position},...Ce])},[$,c.title,c.description,v,c.id]);let Ee=w.useCallback(()=>{ee(!0),Me(Ue.current),v(I=>I.filter(J=>J.toastId!==c.id)),setTimeout(()=>{R(c)},Pd)},[c,R,v,Ue]);w.useEffect(()=>{if(c.promise&&ae==="loading"||c.duration===1/0||c.type==="loading")return;let I,J=dt;return S||y||O&&ft?(()=>{if(Ft.current<Tt.current){let K=new Date().getTime()-Tt.current;J=J-K}Ft.current=new Date().getTime()})():J!==1/0&&(Tt.current=new Date().getTime(),I=setTimeout(()=>{var K;(K=c.onAutoClose)==null||K.call(c,c),Ee()},J)),()=>clearTimeout(I)},[S,y,L,c,dt,Ee,c.promise,ae,O,ft]),w.useEffect(()=>{let I=Se.current;if(I){let J=I.getBoundingClientRect().height;return tt(J),v(K=>[{toastId:c.id,height:J,position:c.position},...K]),()=>v(K=>K.filter(Ce=>Ce.toastId!==c.id))}},[v,c.id]),w.useEffect(()=>{c.delete&&Ee()},[Ee,c.delete]);function Ot(){return B!=null&&B.loading?w.createElement("div",{className:"sonner-loader","data-visible":ae==="loading"},B.loading):H?w.createElement("div",{className:"sonner-loader","data-visible":ae==="loading"},H):w.createElement(ld,{visible:ae==="loading"})}return w.createElement("li",{"aria-live":c.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:Se,className:j(q,At,D==null?void 0:D.toast,(t=c==null?void 0:c.classNames)==null?void 0:t.toast,D==null?void 0:D.default,D==null?void 0:D[ae],(r=c==null?void 0:c.classNames)==null?void 0:r[ae]),"data-sonner-toast":"","data-rich-colors":(n=c.richColors)!=null?n:N,"data-styled":!(c.jsx||c.unstyled||m),"data-mounted":$,"data-promise":!!c.promise,"data-removed":pe,"data-visible":He,"data-y-position":Bt,"data-x-position":br,"data-index":C,"data-front":ut,"data-swiping":Oe,"data-dismissible":we,"data-type":ae,"data-invert":zt,"data-swipe-out":xe,"data-expanded":!!(S||L&&$),style:{"--index":C,"--toasts-before":C,"--z-index":E.length-C,"--offset":`${pe?ct:Ue.current}px`,"--initial-height":L?"auto":`${Ne}px`,...k,...c.style},onPointerDown:I=>{De||!we||(Le.current=new Date,Me(Ue.current),I.target.setPointerCapture(I.pointerId),I.target.tagName!=="BUTTON"&&(ge(!0),Ye.current={x:I.clientX,y:I.clientY}))},onPointerUp:()=>{var I,J,K,Ce;if(xe||!we)return;Ye.current=null;let he=Number(((I=Se.current)==null?void 0:I.style.getPropertyValue("--swipe-amount").replace("px",""))||0),nt=new Date().getTime()-((J=Le.current)==null?void 0:J.getTime()),yr=Math.abs(he)/nt;if(Math.abs(he)>=Rd||yr>.11){Me(Ue.current),(K=c.onDismiss)==null||K.call(c,c),Ee(),ve(!0);return}(Ce=Se.current)==null||Ce.style.setProperty("--swipe-amount","0px"),ge(!1)},onPointerMove:I=>{var J;if(!Ye.current||!we)return;let K=I.clientY-Ye.current.y,Ce=I.clientX-Ye.current.x,he=(Bt==="top"?Math.min:Math.max)(0,K),nt=I.pointerType==="touch"?10:2;Math.abs(he)>nt?(J=Se.current)==null||J.style.setProperty("--swipe-amount",`${K}px`):Math.abs(Ce)>nt&&(Ye.current=null)}},$t&&!c.jsx?w.createElement("button",{"aria-label":ce,"data-disabled":De,"data-close-button":!0,onClick:De||!we?()=>{}:()=>{var I;Ee(),(I=c.onDismiss)==null||I.call(c,c)},className:j(D==null?void 0:D.closeButton,(o=c==null?void 0:c.classNames)==null?void 0:o.closeButton)},w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},w.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),w.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,c.jsx||w.isValidElement(c.title)?c.jsx||c.title:w.createElement(w.Fragment,null,ae||c.icon||c.promise?w.createElement("div",{"data-icon":"",className:j(D==null?void 0:D.icon,(a=c==null?void 0:c.classNames)==null?void 0:a.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||Ot():null,c.type!=="loading"?c.icon||(B==null?void 0:B[ae])||sd(ae):null):null,w.createElement("div",{"data-content":"",className:j(D==null?void 0:D.content,(s=c==null?void 0:c.classNames)==null?void 0:s.content)},w.createElement("div",{"data-title":"",className:j(D==null?void 0:D.title,(i=c==null?void 0:c.classNames)==null?void 0:i.title)},c.title),c.description?w.createElement("div",{"data-description":"",className:j(_,mr,D==null?void 0:D.description,(l=c==null?void 0:c.classNames)==null?void 0:l.description)},c.description):null),w.isValidElement(c.cancel)?c.cancel:c.cancel&&Xt(c.cancel)?w.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||U,onClick:I=>{var J,K;Xt(c.cancel)&&we&&((K=(J=c.cancel).onClick)==null||K.call(J,I),Ee())},className:j(D==null?void 0:D.cancelButton,(u=c==null?void 0:c.classNames)==null?void 0:u.cancelButton)},c.cancel.label):null,w.isValidElement(c.action)?c.action:c.action&&Xt(c.action)?w.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||Y,onClick:I=>{var J,K;Xt(c.action)&&(I.defaultPrevented||((K=(J=c.action).onClick)==null||K.call(J,I),Ee()))},className:j(D==null?void 0:D.actionButton,(d=c==null?void 0:c.classNames)==null?void 0:d.actionButton)},c.action.label):null))};function Jn(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var Od=e=>{let{invert:t,position:r="bottom-right",hotkey:n=["altKey","KeyT"],expand:o,closeButton:a,className:s,offset:i,theme:l="light",richColors:u,duration:d,style:p,visibleToasts:c=xd,toastOptions:m,dir:y=Jn(),gap:v=Sd,loadingIcon:h,icons:x,containerAriaLabel:C="Notifications",pauseWhenPageIsHidden:E,cn:S=Ad}=e,[R,N]=w.useState([]),A=w.useMemo(()=>Array.from(new Set([r].concat(R.filter(O=>O.position).map(O=>O.position)))),[R,r]),[k,U]=w.useState([]),[Y,q]=w.useState(!1),[_,X]=w.useState(!1),[F,z]=w.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=w.useRef(null),L=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),D=w.useRef(null),B=w.useRef(!1),ce=w.useCallback(O=>{var j;(j=R.find($=>$.id===O.id))!=null&&j.delete||me.dismiss(O.id),N($=>$.filter(({id:re})=>re!==O.id))},[R]);return w.useEffect(()=>me.subscribe(O=>{if(O.dismiss){N(j=>j.map($=>$.id===O.id?{...$,delete:!0}:$));return}setTimeout(()=>{Ur.flushSync(()=>{N(j=>{let $=j.findIndex(re=>re.id===O.id);return $!==-1?[...j.slice(0,$),{...j[$],...O},...j.slice($+1)]:[O,...j]})})})}),[]),w.useEffect(()=>{if(l!=="system"){z(l);return}l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?z("dark"):z("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:O})=>{z(O?"dark":"light")})},[l]),w.useEffect(()=>{R.length<=1&&q(!1)},[R]),w.useEffect(()=>{let O=j=>{var $,re;n.every(pe=>j[pe]||j.code===pe)&&(q(!0),($=H.current)==null||$.focus()),j.code==="Escape"&&(document.activeElement===H.current||(re=H.current)!=null&&re.contains(document.activeElement))&&q(!1)};return document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)},[n]),w.useEffect(()=>{if(H.current)return()=>{D.current&&(D.current.focus({preventScroll:!0}),D.current=null,B.current=!1)}},[H.current]),R.length?w.createElement("section",{"aria-label":`${C} ${L}`,tabIndex:-1},A.map((O,j)=>{var $;let[re,pe]=O.split("-");return w.createElement("ol",{key:O,dir:y==="auto"?Jn():y,tabIndex:-1,ref:H,className:s,"data-sonner-toaster":!0,"data-theme":F,"data-y-position":re,"data-x-position":pe,style:{"--front-toast-height":`${(($=k[0])==null?void 0:$.height)||0}px`,"--offset":typeof i=="number"?`${i}px`:i||wd,"--width":`${Cd}px`,"--gap":`${v}px`,...p},onBlur:ee=>{B.current&&!ee.currentTarget.contains(ee.relatedTarget)&&(B.current=!1,D.current&&(D.current.focus({preventScroll:!0}),D.current=null))},onFocus:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||B.current||(B.current=!0,D.current=ee.relatedTarget)},onMouseEnter:()=>q(!0),onMouseMove:()=>q(!0),onMouseLeave:()=>{_||q(!1)},onPointerDown:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||X(!0)},onPointerUp:()=>X(!1)},R.filter(ee=>!ee.position&&j===0||ee.position===O).map((ee,Oe)=>{var ge,xe;return w.createElement(Td,{key:ee.id,icons:x,index:Oe,toast:ee,defaultRichColors:u,duration:(ge=m==null?void 0:m.duration)!=null?ge:d,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:t,visibleToasts:c,closeButton:(xe=m==null?void 0:m.closeButton)!=null?xe:a,interacting:_,position:O,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:ce,toasts:R.filter(ve=>ve.position==ee.position),heights:k.filter(ve=>ve.position==ee.position),setHeights:U,expandByDefault:o,gap:v,loadingIcon:h,expanded:Y,pauseWhenPageIsHidden:E,cn:S})}))})):null};const Nd=({...e})=>{const{theme:t="system"}=ad();return b.jsx(Od,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:ve-bg-background group-[.toaster]:ve-text-foreground group-[.toaster]:ve-border-border group-[.toaster]:ve-shadow-lg",description:"group-[.toast]:ve-text-muted-foreground",actionButton:"group-[.toast]:ve-bg-primary group-[.toast]:ve-text-primary-foreground",cancelButton:"group-[.toast]:ve-bg-muted group-[.toast]:ve-text-muted-foreground"}},...e})},us=(e,t,r="*")=>t==null?void 0:t.postMessage(e,{targetOrigin:r}),ot=(e,t)=>{const[r,n]=w.useState("pending");return ds(e,t,Dd(n)),{sendToParent:a=>{if(!window.parent)throw new Error("Parent window has closed");n("pending");for(const s of t)us({...a,type:e},window.parent,s)},status:r}},tr=(e,t,r)=>{ds(e,t,(o,a,s)=>{const{type:i,payload:l}=o;i===e&&typeof r=="function"&&r(u=>us({...u,type:e},s,a),l)})},ds=(e,t,r)=>{const[n,o]=w.useState(),[a,s]=w.useState(),i=w.useRef(),l=w.useRef();i.current=n,l.current=a;const u=w.useCallback(({origin:d,source:p,data:c})=>{var y;if((y=c==null?void 0:c.source)!=null&&y.startsWith("react-devtools")||!t.includes(d))return;const{type:m}=c;m===e&&(s(p),o(d),r(c,d,p))},[e,t,s,o,r]);w.useEffect(()=>(window.addEventListener("message",u),()=>window.removeEventListener("message",u)),[e,a,n,u])},Dd=e=>(t,r,n)=>{const{status:o}=t;o==="success"?e("success"):o==="error"&&e("error")};class kd{constructor(t=!1){Nt(this,"enable",t=>{this.enabled=t,this.enabled&&console.log("[DEBUG] xYextDebug enabled")});Nt(this,"logData",(t,r)=>{this.enabled&&console.log("[DEBUG]",t,"-",r)});Nt(this,"logFunc",t=>{this.enabled&&console.log("[DEBUG] -->",t,"called")});Nt(this,"log",t=>{this.enabled&&console.log("[DEBUG]",t)});this.enabled=t,this.enabled&&console.log("[DEBUG] xYextDebug enabled")}}const _d={GLOBAL:"global",INDIVIDUAL:"individual"},Re=["http://localhost","https://dev.yext.com","https://qa.yext.com","https://sandbox.yext.com","https://www.yext.com","https://app-qa.eu.yext.com","https://app.eu.yext.com"],ie=new kd,jd=({document:e,componentRegistry:t})=>{const[r,n]=w.useState({histories:[],index:-1}),[o,a]=w.useState(),[s,i]=w.useState(!1),[l,u]=w.useState(),[d,p]=w.useState(!1),[c,m]=w.useState(void 0),[y,v]=w.useState(void 0),[h,x]=w.useState(),[C,E]=w.useState(),[S,R]=w.useState(!1);e&&ie.logData("DOCUMENT",e);const N=w.useCallback(()=>h?zr(h.isDevMode&&!h.devOverride,h.role,h.templateId,h.layoutId,h.entityId):"",[h]);w.useEffect(()=>{if(typeof window<"u"){const O=window.location.ancestorOrigins;O.length===0||!O[0].includes("pagescdn")&&!O[0].includes("yext.com")&&!O[0].includes("localhost")?window.location.assign("/404.html"):R(!0)}},[]),tr("getTemplateMetadata",Re,(O,j)=>{const $=t.get(j.templateId);E($);const re=j;x(j),ie.enable(re.isxYextDebug),ie.logData("TEMPLATE_METADATA",re),ie.logData("PUCK_CONFIG",$),O({status:"success",payload:{message:"payload received"}})}),w.useEffect(()=>{if(h!=null&&h.isDevMode)try{m(pageSets),v(siteStream)}catch{console.warn("pageSets are not defined")}},[h==null?void 0:h.isDevMode]);const A=()=>{ie.logFunc("clearLocalStorage"),window.localStorage.removeItem(N())},k=()=>{ie.logFunc("clearHistory"),A(),z()},U=w.useRef(!0);w.useEffect(()=>{if(U.current){U.current=!1;return}Y()},[h,d,s]);const Y=w.useCallback(()=>{if(!s||!d||!h)return;if(ie.logFunc("loadPuckInitialHistory"),h.isDevMode&&!h.devOverride){const $=window.localStorage.getItem(N());if($){ie.log("Dev Mode - Using localStorage");const re=JSON.parse($),pe=re.length-1;n({histories:re,index:pe});return}ie.log("Dev Mode - No localStorage. Using data from Content"),n({histories:o?[{id:"root",data:{data:o}}]:[],index:o?0:-1});return}if(!l){A(),ie.log("Prod Mode - No saveState. Using data from Content"),n({histories:o?[{id:"root",data:{data:o}}]:[],index:o?0:-1});return}const O=window.localStorage.getItem(N());if(!O){ie.log("Prod Mode - No localStorage. Using saveState"),n({histories:o?[{id:"root",data:{data:o}},{id:l.hash,data:Nr(l.history)}]:[{id:l.hash,data:Nr(l.history)}],index:o?1:0});return}const j=JSON.parse(O).findIndex($=>$.id===(l==null?void 0:l.hash));if(j!==-1){ie.log("Prod Mode - Using localStorage"),n({histories:JSON.parse(O),index:j});return}A()},[n,A,zr]);w.useEffect(()=>{r&&ie.logData("PUCK_INITIAL_HISTORY",r)},[r]);const{sendToParent:q}=ot("iFrameLoaded",Re),{sendToParent:_}=ot("sendDevSaveStateData",Re);w.useEffect(()=>{q({payload:{message:"iFrame is loaded"}})},[]),w.useEffect(()=>{var O;if(h!=null&&h.isDevMode){const j=window.localStorage.getItem(N()),$=j?JSON.parse(j):[],re=JSON.stringify($.length>0?(O=$[$.length-1].data)==null?void 0:O.data:{});_({payload:{devSaveStateData:re}})}},[h]),tr("getSaveState",Re,(O,j)=>{ie.logData("SAVE_STATE",j),u(j),p(!0),O({status:"success",payload:{message:"saveState received"}})}),tr("getVisualConfigurationData",Re,(O,j)=>{const $=Nr(j.visualConfigurationData);ie.logData("VISUAL_CONFIGURATION_DATA",$),a($),i(!0),O({status:"success",payload:{message:"getVisualConfigurationData received"}})});const{sendToParent:X}=ot("pushPageSets",Re);w.useEffect(()=>{typeof window<"u"&&(h!=null&&h.isDevMode)&&c&&X({payload:{...c,siteStream:y}})},[h==null?void 0:h.isDevMode,c]);const{sendToParent:F}=ot("saveSaveState",Re),{sendToParent:z}=ot("deleteSaveState",Re),{sendToParent:H}=ot("saveVisualConfigData",Re),{sendToParent:L}=ot("openQuickFind",Re),D=O=>{(O.ctrlKey||O.metaKey)&&O.key==="k"&&L()};w.useEffect(()=>(window.addEventListener("keydown",D),()=>{window.removeEventListener("keydown",D)}),[]);const B=!C||!h||!e||!d||!s,ce=100*(!!C+!!h+!!e+d+s)/5;return b.jsxs(b.Fragment,{children:[B?S&&b.jsx(td,{progress:ce}):b.jsx(Gu,{puckConfig:C,isLoading:B,puckInitialHistory:r,clearHistory:h.isDevMode&&!h.devOverride?A:k,templateMetadata:h,saveState:l,saveSaveState:F,saveVisualConfigData:H,sendDevSaveStateData:_,visualConfigurationData:o,buildLocalStorageKey:N,devLogger:ie}),b.jsx(Nd,{closeButton:!0,richColors:!0})]})},Nr=e=>JSON.parse(e.replace(/\\"/g,'"')),Md=()=>{const[e,t]=w.useState();return tr("getEntityDocument",Re,(r,n)=>{t(n),r({status:"success",payload:{message:"getEntityDocument received"}})}),e},Hr=JSON.stringify({root:{},content:[],zones:{}});function Ld(e,t){var i,l,u;if(!t)throw new Error("Unable to parse puck data, template name must be defined in config.");const{document:r}=e,n=r.c_visualConfigurations??[],o=r.c_pages_layouts??[],a=(i=r._site)==null?void 0:i.c_visualLayouts;for(const d of n)if(d.template===t){const p=JSON.parse(Dr(d.data,t));return{...e,document:{...r,visualTemplate:p}}}for(const d of o)if(((l=d.c_visualConfiguration)==null?void 0:l.template)===t){const p=JSON.parse(Dr(d.c_visualConfiguration.data,t));return{...e,document:{...r,visualTemplate:p}}}if(a){for(const d of a)if(((u=d.c_visualConfiguration)==null?void 0:u.template)===t){const p=JSON.parse(Dr(d.c_visualConfiguration.data,t));return{...e,document:{...r,visualTemplate:p}}}}console.warn(`Unable to find puck data for template: ${t}`);const s=JSON.parse(Hr);return{...e,document:{...r,visualTemplate:s}}}function Dr(e,t){if(!e||e.length<1)return console.warn(`Missing visual editor data for template: ${t}`),Hr;try{JSON.parse(e)}catch{return console.warn(`Invalid visual editor data for template: ${t}`),Hr}return e}exports.Editor=jd;exports.EntityField=Fu;exports.resolveVisualEditorData=Ld;exports.usePlatformBridgeDocument=Md;
|
|
122
|
+
Defaulting to \`null\`.`}var ls=os,td=ss;const cs=f.forwardRef(({className:e,value:t,...r},n)=>m.jsx(ls,{ref:n,className:fe("ve-relative ve-h-4 ve-w-full ve-overflow-hidden ve-rounded-full ve-bg-secondary",e),...r,children:m.jsx(td,{className:"ve-h-full ve-w-full ve-flex-1 ve-bg-primary ve-transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));cs.displayName=ls.displayName;function rd({progress:e}){return m.jsxs("div",{className:"ve-flex ve-h-screen ve-loading-wrapper ve-w-screen ve-flex-col ve-items-center ve-justify-center",children:[m.jsx(cs,{className:"ve-w-1/3 ve-loading-progress",value:e}),m.jsx("div",{children:"Loading Visual Editor..."})]})}var Xn=["light","dark"],nd="(prefers-color-scheme: dark)",od=f.createContext(void 0),ad={setTheme:e=>{},themes:[]},sd=()=>{var e;return(e=f.useContext(od))!=null?e:ad};f.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:o,defaultTheme:a,value:s,attrs:i,nonce:l})=>{let u=a==="system",d=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${i.map(x=>`'${x}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,g=o?Xn.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",c=(x,h=!1,y=!0)=>{let E=s?s[x]:x,b=h?x+"|| ''":`'${E}'`,C="";return o&&y&&!h&&Xn.includes(x)&&(C+=`d.style.colorScheme = '${x}';`),r==="class"?h||E?C+=`c.add(${b})`:C+="null":E&&(C+=`d[s](n,${b})`),C},v=e?`!function(){${d}${c(e)}}()`:n?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${nd}',m=window.matchMedia(t);if(m.media!==t||m.matches){${c("dark")}}else{${c("light")}}}else if(e){${s?`var x=${JSON.stringify(s)};`:""}${c(s?"x[e]":"e",!0)}}${u?"":"else{"+c(a,!1,!1)+"}"}${g}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${s?`var x=${JSON.stringify(s)};`:""}${c(s?"x[e]":"e",!0)}}else{${c(a,!1,!1)};}${g}}catch(t){}}();`;return f.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:v}})});var id=e=>{switch(e){case"success":return ud;case"info":return fd;case"warning":return dd;case"error":return pd;default:return null}},ld=Array(12).fill(0),cd=({visible:e})=>w.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},w.createElement("div",{className:"sonner-spinner"},ld.map((t,r)=>w.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),ud=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),dd=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},w.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),fd=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),pd=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),gd=()=>{let[e,t]=w.useState(document.hidden);return w.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Vr=1,vd=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Vr++,a=this.toasts.find(i=>i.id===o),s=e.dismissible===void 0?!0:e.dismissible;return a?this.toasts=this.toasts.map(i=>i.id===o?(this.publish({...i,...e,id:o,title:r}),{...i,...e,id:o,dismissible:s,title:r}):i):this.addToast({title:r,...n,dismissible:s,id:o}),o},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),o=r!==void 0;return n.then(async a=>{if(md(a)&&!a.ok){o=!1;let s=typeof t.error=="function"?await t.error(`HTTP error! status: ${a.status}`):t.error,i=typeof t.description=="function"?await t.description(`HTTP error! status: ${a.status}`):t.description;this.create({id:r,type:"error",message:s,description:i})}else if(t.success!==void 0){o=!1;let s=typeof t.success=="function"?await t.success(a):t.success,i=typeof t.description=="function"?await t.description(a):t.description;this.create({id:r,type:"success",message:s,description:i})}}).catch(async a=>{if(t.error!==void 0){o=!1;let s=typeof t.error=="function"?await t.error(a):t.error,i=typeof t.description=="function"?await t.description(a):t.description;this.create({id:r,type:"error",message:s,description:i})}}).finally(()=>{var a;o&&(this.dismiss(r),r=void 0),(a=t.finally)==null||a.call(t)}),r},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||Vr++;return this.create({jsx:e(r),id:r,...t}),r},this.subscribers=[],this.toasts=[]}},me=new vd,hd=(e,t)=>{let r=(t==null?void 0:t.id)||Vr++;return me.addToast({title:e,...t,id:r}),r},md=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",bd=hd,yd=()=>me.toasts;Object.assign(bd,{success:me.success,info:me.info,warning:me.warning,error:me.error,custom:me.custom,message:me.message,promise:me.promise,dismiss:me.dismiss,loading:me.loading},{getHistory:yd});function xd(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}xd(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
123
|
+
`);function Jt(e){return e.label!==void 0}var wd=3,Ed="32px",Cd=4e3,Sd=356,Rd=14,Pd=20,Ad=200;function Td(...e){return e.filter(Boolean).join(" ")}var Od=e=>{var t,r,n,o,a,s,i,l,u,d;let{invert:g,toast:c,unstyled:v,interacting:x,setHeights:h,visibleToasts:y,heights:E,index:b,toasts:C,expanded:R,removeToast:P,defaultRichColors:D,closeButton:T,style:N,cancelButtonStyle:z,actionButtonStyle:Y,className:G="",descriptionClassName:_="",duration:Z,position:I,gap:V,loadingIcon:U,expandByDefault:M,classNames:O,icons:F,closeButtonAriaLabel:le="Close toast",pauseWhenPageIsHidden:$,cn:W}=e,[k,X]=w.useState(!1),[te,q]=w.useState(!1),[xe,ge]=w.useState(!1),[we,ve]=w.useState(!1),[ct,Me]=w.useState(0),[De,tt]=w.useState(0),Le=w.useRef(null),Pe=w.useRef(null),ut=b===0,He=b+1<=y,se=c.type,Ee=c.dismissible!==!1,At=c.className||"",mr=c.descriptionClassName||"",rt=w.useMemo(()=>E.findIndex(L=>L.toastId===c.id)||0,[E,c.id]),Ft=w.useMemo(()=>{var L;return(L=c.closeButton)!=null?L:T},[c.closeButton,T]),dt=w.useMemo(()=>c.duration||Z||Cd,[c.duration,Z]),Tt=w.useRef(0),Ue=w.useRef(0),Bt=w.useRef(0),Ye=w.useRef(null),[Wt,br]=I.split("-"),zt=w.useMemo(()=>E.reduce((L,Q,J)=>J>=rt?L:L+Q.height,0),[E,rt]),ft=gd(),Vt=c.invert||g,Ne=se==="loading";Ue.current=w.useMemo(()=>rt*V+zt,[rt,zt]),w.useEffect(()=>{X(!0)},[]),w.useLayoutEffect(()=>{if(!k)return;let L=Pe.current,Q=L.style.height;L.style.height="auto";let J=L.getBoundingClientRect().height;L.style.height=Q,tt(J),h(Se=>Se.find(he=>he.toastId===c.id)?Se.map(he=>he.toastId===c.id?{...he,height:J}:he):[{toastId:c.id,height:J,position:c.position},...Se])},[k,c.title,c.description,h,c.id]);let Ce=w.useCallback(()=>{q(!0),Me(Ue.current),h(L=>L.filter(Q=>Q.toastId!==c.id)),setTimeout(()=>{P(c)},Ad)},[c,P,h,Ue]);w.useEffect(()=>{if(c.promise&&se==="loading"||c.duration===1/0||c.type==="loading")return;let L,Q=dt;return R||x||$&&ft?(()=>{if(Bt.current<Tt.current){let J=new Date().getTime()-Tt.current;Q=Q-J}Bt.current=new Date().getTime()})():Q!==1/0&&(Tt.current=new Date().getTime(),L=setTimeout(()=>{var J;(J=c.onAutoClose)==null||J.call(c,c),Ce()},Q)),()=>clearTimeout(L)},[R,x,M,c,dt,Ce,c.promise,se,$,ft]),w.useEffect(()=>{let L=Pe.current;if(L){let Q=L.getBoundingClientRect().height;return tt(Q),h(J=>[{toastId:c.id,height:Q,position:c.position},...J]),()=>h(J=>J.filter(Se=>Se.toastId!==c.id))}},[h,c.id]),w.useEffect(()=>{c.delete&&Ce()},[Ce,c.delete]);function Ot(){return F!=null&&F.loading?w.createElement("div",{className:"sonner-loader","data-visible":se==="loading"},F.loading):U?w.createElement("div",{className:"sonner-loader","data-visible":se==="loading"},U):w.createElement(cd,{visible:se==="loading"})}return w.createElement("li",{"aria-live":c.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:Pe,className:W(G,At,O==null?void 0:O.toast,(t=c==null?void 0:c.classNames)==null?void 0:t.toast,O==null?void 0:O.default,O==null?void 0:O[se],(r=c==null?void 0:c.classNames)==null?void 0:r[se]),"data-sonner-toast":"","data-rich-colors":(n=c.richColors)!=null?n:D,"data-styled":!(c.jsx||c.unstyled||v),"data-mounted":k,"data-promise":!!c.promise,"data-removed":te,"data-visible":He,"data-y-position":Wt,"data-x-position":br,"data-index":b,"data-front":ut,"data-swiping":xe,"data-dismissible":Ee,"data-type":se,"data-invert":Vt,"data-swipe-out":we,"data-expanded":!!(R||M&&k),style:{"--index":b,"--toasts-before":b,"--z-index":C.length-b,"--offset":`${te?ct:Ue.current}px`,"--initial-height":M?"auto":`${De}px`,...N,...c.style},onPointerDown:L=>{Ne||!Ee||(Le.current=new Date,Me(Ue.current),L.target.setPointerCapture(L.pointerId),L.target.tagName!=="BUTTON"&&(ge(!0),Ye.current={x:L.clientX,y:L.clientY}))},onPointerUp:()=>{var L,Q,J,Se;if(we||!Ee)return;Ye.current=null;let he=Number(((L=Pe.current)==null?void 0:L.style.getPropertyValue("--swipe-amount").replace("px",""))||0),nt=new Date().getTime()-((Q=Le.current)==null?void 0:Q.getTime()),yr=Math.abs(he)/nt;if(Math.abs(he)>=Pd||yr>.11){Me(Ue.current),(J=c.onDismiss)==null||J.call(c,c),Ce(),ve(!0);return}(Se=Pe.current)==null||Se.style.setProperty("--swipe-amount","0px"),ge(!1)},onPointerMove:L=>{var Q;if(!Ye.current||!Ee)return;let J=L.clientY-Ye.current.y,Se=L.clientX-Ye.current.x,he=(Wt==="top"?Math.min:Math.max)(0,J),nt=L.pointerType==="touch"?10:2;Math.abs(he)>nt?(Q=Pe.current)==null||Q.style.setProperty("--swipe-amount",`${J}px`):Math.abs(Se)>nt&&(Ye.current=null)}},Ft&&!c.jsx?w.createElement("button",{"aria-label":le,"data-disabled":Ne,"data-close-button":!0,onClick:Ne||!Ee?()=>{}:()=>{var L;Ce(),(L=c.onDismiss)==null||L.call(c,c)},className:W(O==null?void 0:O.closeButton,(o=c==null?void 0:c.classNames)==null?void 0:o.closeButton)},w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},w.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),w.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,c.jsx||w.isValidElement(c.title)?c.jsx||c.title:w.createElement(w.Fragment,null,se||c.icon||c.promise?w.createElement("div",{"data-icon":"",className:W(O==null?void 0:O.icon,(a=c==null?void 0:c.classNames)==null?void 0:a.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||Ot():null,c.type!=="loading"?c.icon||(F==null?void 0:F[se])||id(se):null):null,w.createElement("div",{"data-content":"",className:W(O==null?void 0:O.content,(s=c==null?void 0:c.classNames)==null?void 0:s.content)},w.createElement("div",{"data-title":"",className:W(O==null?void 0:O.title,(i=c==null?void 0:c.classNames)==null?void 0:i.title)},c.title),c.description?w.createElement("div",{"data-description":"",className:W(_,mr,O==null?void 0:O.description,(l=c==null?void 0:c.classNames)==null?void 0:l.description)},c.description):null),w.isValidElement(c.cancel)?c.cancel:c.cancel&&Jt(c.cancel)?w.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||z,onClick:L=>{var Q,J;Jt(c.cancel)&&Ee&&((J=(Q=c.cancel).onClick)==null||J.call(Q,L),Ce())},className:W(O==null?void 0:O.cancelButton,(u=c==null?void 0:c.classNames)==null?void 0:u.cancelButton)},c.cancel.label):null,w.isValidElement(c.action)?c.action:c.action&&Jt(c.action)?w.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||Y,onClick:L=>{var Q,J;Jt(c.action)&&(L.defaultPrevented||((J=(Q=c.action).onClick)==null||J.call(Q,L),Ce()))},className:W(O==null?void 0:O.actionButton,(d=c==null?void 0:c.classNames)==null?void 0:d.actionButton)},c.action.label):null))};function Jn(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var Dd=e=>{let{invert:t,position:r="bottom-right",hotkey:n=["altKey","KeyT"],expand:o,closeButton:a,className:s,offset:i,theme:l="light",richColors:u,duration:d,style:g,visibleToasts:c=wd,toastOptions:v,dir:x=Jn(),gap:h=Rd,loadingIcon:y,icons:E,containerAriaLabel:b="Notifications",pauseWhenPageIsHidden:C,cn:R=Td}=e,[P,D]=w.useState([]),T=w.useMemo(()=>Array.from(new Set([r].concat(P.filter($=>$.position).map($=>$.position)))),[P,r]),[N,z]=w.useState([]),[Y,G]=w.useState(!1),[_,Z]=w.useState(!1),[I,V]=w.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),U=w.useRef(null),M=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=w.useRef(null),F=w.useRef(!1),le=w.useCallback($=>{var W;(W=P.find(k=>k.id===$.id))!=null&&W.delete||me.dismiss($.id),D(k=>k.filter(({id:X})=>X!==$.id))},[P]);return w.useEffect(()=>me.subscribe($=>{if($.dismiss){D(W=>W.map(k=>k.id===$.id?{...k,delete:!0}:k));return}setTimeout(()=>{Ur.flushSync(()=>{D(W=>{let k=W.findIndex(X=>X.id===$.id);return k!==-1?[...W.slice(0,k),{...W[k],...$},...W.slice(k+1)]:[$,...W]})})})}),[]),w.useEffect(()=>{if(l!=="system"){V(l);return}l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:$})=>{V($?"dark":"light")})},[l]),w.useEffect(()=>{P.length<=1&&G(!1)},[P]),w.useEffect(()=>{let $=W=>{var k,X;n.every(te=>W[te]||W.code===te)&&(G(!0),(k=U.current)==null||k.focus()),W.code==="Escape"&&(document.activeElement===U.current||(X=U.current)!=null&&X.contains(document.activeElement))&&G(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[n]),w.useEffect(()=>{if(U.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,F.current=!1)}},[U.current]),P.length?w.createElement("section",{"aria-label":`${b} ${M}`,tabIndex:-1},T.map(($,W)=>{var k;let[X,te]=$.split("-");return w.createElement("ol",{key:$,dir:x==="auto"?Jn():x,tabIndex:-1,ref:U,className:s,"data-sonner-toaster":!0,"data-theme":I,"data-y-position":X,"data-x-position":te,style:{"--front-toast-height":`${((k=N[0])==null?void 0:k.height)||0}px`,"--offset":typeof i=="number"?`${i}px`:i||Ed,"--width":`${Sd}px`,"--gap":`${h}px`,...g},onBlur:q=>{F.current&&!q.currentTarget.contains(q.relatedTarget)&&(F.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||F.current||(F.current=!0,O.current=q.relatedTarget)},onMouseEnter:()=>G(!0),onMouseMove:()=>G(!0),onMouseLeave:()=>{_||G(!1)},onPointerDown:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||Z(!0)},onPointerUp:()=>Z(!1)},P.filter(q=>!q.position&&W===0||q.position===$).map((q,xe)=>{var ge,we;return w.createElement(Od,{key:q.id,icons:E,index:xe,toast:q,defaultRichColors:u,duration:(ge=v==null?void 0:v.duration)!=null?ge:d,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:t,visibleToasts:c,closeButton:(we=v==null?void 0:v.closeButton)!=null?we:a,interacting:_,position:$,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:le,toasts:P.filter(ve=>ve.position==q.position),heights:N.filter(ve=>ve.position==q.position),setHeights:z,expandByDefault:o,gap:h,loadingIcon:y,expanded:Y,pauseWhenPageIsHidden:C,cn:R})}))})):null};const Nd=({...e})=>{const{theme:t="system"}=sd();return m.jsx(Dd,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:ve-bg-background group-[.toaster]:ve-text-foreground group-[.toaster]:ve-border-border group-[.toaster]:ve-shadow-lg",description:"group-[.toast]:ve-text-muted-foreground",actionButton:"group-[.toast]:ve-bg-primary group-[.toast]:ve-text-primary-foreground",cancelButton:"group-[.toast]:ve-bg-muted group-[.toast]:ve-text-muted-foreground"}},...e})},us=(e,t,r="*")=>t==null?void 0:t.postMessage(e,{targetOrigin:r}),ot=(e,t)=>{const[r,n]=w.useState("pending");return ds(e,t,kd(n)),{sendToParent:a=>{if(!window.parent)throw new Error("Parent window has closed");n("pending");for(const s of t)us({...a,type:e},window.parent,s)},status:r}},_t=(e,t,r)=>{ds(e,t,(o,a,s)=>{const{type:i,payload:l}=o;i===e&&typeof r=="function"&&r(u=>us({...u,type:e},s,a),l)})},ds=(e,t,r)=>{const[n,o]=w.useState(),[a,s]=w.useState(),i=w.useRef(),l=w.useRef();i.current=n,l.current=a;const u=w.useCallback(({origin:d,source:g,data:c})=>{var x;if((x=c==null?void 0:c.source)!=null&&x.startsWith("react-devtools")||!t.includes(d))return;const{type:v}=c;v===e&&(s(g),o(d),r(c,d,g))},[e,t,s,o,r]);w.useEffect(()=>(window.addEventListener("message",u),()=>window.removeEventListener("message",u)),[e,a,n,u])},kd=e=>(t,r,n)=>{const{status:o}=t;o==="success"?e("success"):o==="error"&&e("error")};class _d{constructor(t=!1){Dt(this,"enable",t=>{this.enabled=t,this.enabled&&console.log("[DEBUG] xYextDebug enabled")});Dt(this,"logData",(t,r)=>{this.enabled&&console.log("[DEBUG]",t,"-",r)});Dt(this,"logFunc",t=>{this.enabled&&console.log("[DEBUG] -->",t,"called")});Dt(this,"log",t=>{this.enabled&&console.log("[DEBUG]",t)});this.enabled=t,this.enabled&&console.log("[DEBUG] xYextDebug enabled")}}const jd={GLOBAL:"global",INDIVIDUAL:"individual"},Re=["http://localhost","https://dev.yext.com","https://qa.yext.com","https://sandbox.yext.com","https://www.yext.com","https://app-qa.eu.yext.com","https://app.eu.yext.com"],ce=new _d,Md=({document:e,componentRegistry:t})=>{const[r,n]=w.useState(),[o,a]=w.useState(!1),[s,i]=w.useState(),[l,u]=w.useState(!1),[d,g]=w.useState(),[c,v]=w.useState(!1),[x,h]=w.useState(void 0),[y,E]=w.useState(void 0),[b,C]=w.useState(),[R,P]=w.useState(),[D,T]=w.useState(!1);e&&ce.logData("DOCUMENT",e);const N=w.useCallback(()=>b?zr(b.isDevMode&&!b.devOverride,b.role,b.templateId,b.layoutId,b.entityId):"",[b]);w.useEffect(()=>{if(typeof window<"u"){const k=window.location.ancestorOrigins;k.length===0||!k[0].includes("pagescdn")&&!k[0].includes("yext.com")&&!k[0].includes("localhost")?window.location.assign("/404.html"):T(!0)}},[]),_t("getTemplateMetadata",Re,(k,X)=>{const te=t.get(X.templateId);P(te);const q=X;C(X),ce.enable(q.isxYextDebug),ce.logData("TEMPLATE_METADATA",q),ce.logData("PUCK_CONFIG",te),k({status:"success",payload:{message:"payload received"}})}),w.useEffect(()=>{if(b!=null&&b.isDevMode)try{h(pageSets),E(siteStream)}catch{console.warn("pageSets are not defined")}},[b==null?void 0:b.isDevMode]);const z=()=>{ce.logFunc("clearLocalStorage"),window.localStorage.removeItem(N())},Y=()=>{ce.logFunc("clearHistory"),z(),M()},G=w.useRef(!0);w.useEffect(()=>{if(G.current){G.current=!1;return}_()},[b,c,l]);const _=w.useCallback(()=>{if(!l||!c||!b)return;if(ce.logFunc("loadPuckInitialHistory"),b.isDevMode&&!b.devOverride){const te=window.localStorage.getItem(N());if(te){ce.log("Dev Mode - Using localStorage");const q=JSON.parse(te),xe=q.length-1;n({histories:q,index:xe,appendData:!1}),a(!0);return}ce.log("Dev Mode - No localStorage. Using data from Content"),s&&n({histories:[{id:"root",state:{data:s}}],appendData:!1}),a(!0);return}if(!d){z(),ce.log("Prod Mode - No saveState. Using data from Content"),s&&n({histories:[{id:"root",state:{data:s}}],appendData:!1}),a(!0);return}const k=window.localStorage.getItem(N());if(!k){ce.log("Prod Mode - No localStorage. Using saveState"),n({histories:s?[{id:"root",state:{data:s}},{id:d.hash,state:Dr(d.history)}]:[{id:d.hash,state:Dr(d.history)}],index:s?1:0,appendData:!1}),a(!0);return}const X=JSON.parse(k).findIndex(te=>te.id===(d==null?void 0:d.hash));if(X!==-1){ce.log("Prod Mode - Using localStorage"),n({histories:JSON.parse(k),index:X,appendData:!1}),a(!0);return}z()},[n,a,z,zr]);w.useEffect(()=>{r&&ce.logData("PUCK_INITIAL_HISTORY",r)},[r]);const{sendToParent:Z}=ot("iFrameLoaded",Re),{sendToParent:I}=ot("sendDevSaveStateData",Re);w.useEffect(()=>{Z({payload:{message:"iFrame is loaded"}})},[]),w.useEffect(()=>{var k;if(b!=null&&b.isDevMode){const X=window.localStorage.getItem(N()),te=X?JSON.parse(X):[],q=JSON.stringify(te.length>0?(k=te[te.length-1].data)==null?void 0:k.data:{});I({payload:{devSaveStateData:q}})}},[b]),_t("getSaveState",Re,(k,X)=>{ce.logData("SAVE_STATE",X),g(X),v(!0),k({status:"success",payload:{message:"saveState received"}})}),_t("getVisualConfigurationData",Re,(k,X)=>{const te=Dr(X.visualConfigurationData);ce.logData("VISUAL_CONFIGURATION_DATA",te),i(te),u(!0),k({status:"success",payload:{message:"getVisualConfigurationData received"}})});const{sendToParent:V}=ot("pushPageSets",Re);w.useEffect(()=>{typeof window<"u"&&(b!=null&&b.isDevMode)&&x&&V({payload:{...x,siteStream:y}})},[b==null?void 0:b.isDevMode,x]);const{sendToParent:U}=ot("saveSaveState",Re),{sendToParent:M}=ot("deleteSaveState",Re),{sendToParent:O}=ot("saveVisualConfigData",Re),{sendToParent:F}=ot("openQuickFind",Re),le=k=>{(k.ctrlKey||k.metaKey)&&k.key==="k"&&F()};w.useEffect(()=>(window.addEventListener("keydown",le),()=>{window.removeEventListener("keydown",le)}),[]);const $=!R||!b||!e||!c||!l||!o,W=100*(!!R+!!b+!!e+c+l+o)/6;return m.jsxs(m.Fragment,{children:[$?D&&m.jsx(rd,{progress:W}):m.jsx(qu,{puckConfig:R,isLoading:$,puckInitialHistory:r,clearHistory:b.isDevMode&&!b.devOverride?z:Y,templateMetadata:b,saveState:d,saveSaveState:U,saveVisualConfigData:O,sendDevSaveStateData:I,buildLocalStorageKey:N,devLogger:ce}),m.jsx(Nd,{closeButton:!0,richColors:!0})]})},Dr=e=>JSON.parse(e.replace(/\\"/g,'"')),Ld=()=>{const[e,t]=w.useState();return _t("getEntityDocument",Re,(r,n)=>{t(n),r({status:"success",payload:{message:"getEntityDocument received"}})}),e},Id=()=>{const[e,t]=w.useState(void 0);return _t("getTemplateStream",Re,(r,n)=>{t(n),r({status:"success",payload:{message:"templateStream received"}})}),e},fs=f.createContext(void 0),$d=({entityFields:e,children:t})=>m.jsx(fs.Provider,{value:e,children:t}),Fd=()=>{const e=f.useContext(fs);if(!e)throw new Error("useEntityFields must be used within a DocumentProvider");return e},Hr=JSON.stringify({root:{},content:[],zones:{}});function Bd(e,t){var i,l,u;if(!t)throw new Error("Unable to parse puck data, template name must be defined in config.");const{document:r}=e,n=r.c_visualConfigurations??[],o=r.c_pages_layouts??[],a=(i=r._site)==null?void 0:i.c_visualLayouts;for(const d of n)if(d.template===t){const g=JSON.parse(Nr(d.data,t));return{...e,document:{...r,visualTemplate:g}}}for(const d of o)if(((l=d.c_visualConfiguration)==null?void 0:l.template)===t){const g=JSON.parse(Nr(d.c_visualConfiguration.data,t));return{...e,document:{...r,visualTemplate:g}}}if(a){for(const d of a)if(((u=d.c_visualConfiguration)==null?void 0:u.template)===t){const g=JSON.parse(Nr(d.c_visualConfiguration.data,t));return{...e,document:{...r,visualTemplate:g}}}}console.warn(`Unable to find puck data for template: ${t}`);const s=JSON.parse(Hr);return{...e,document:{...r,visualTemplate:s}}}function Nr(e,t){if(!e||e.length<1)return console.warn(`Missing visual editor data for template: ${t}`),Hr;try{JSON.parse(e)}catch{return console.warn(`Invalid visual editor data for template: ${t}`),Hr}return e}exports.Editor=Md;exports.EntityField=Bu;exports.EntityFieldsProvider=$d;exports.resolveVisualEditorData=Bd;exports.useEntityFields=Fd;exports.usePlatformBridgeDocument=Ld;exports.usePlatformBridgeEntityFields=Id;
|