@mp-front/components 0.0.1-next-9 → 0.0.1-next-11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/carousel.component-BcjDXzve.cjs +80 -0
- package/dist/carousel.component-CdgrJtst.js +12762 -0
- package/dist/components/carousel/carousel-container.component.d.ts +2 -0
- package/dist/components/carousel/carousel-container.component.d.ts.map +1 -0
- package/dist/components/carousel/carousel-dots.component.d.ts +3 -0
- package/dist/components/carousel/carousel-dots.component.d.ts.map +1 -0
- package/dist/components/carousel/carousel-item.component.d.ts +3 -0
- package/dist/components/carousel/carousel-item.component.d.ts.map +1 -0
- package/dist/components/carousel/carousel-next-button.component.d.ts +2 -0
- package/dist/components/carousel/carousel-next-button.component.d.ts.map +1 -0
- package/dist/components/carousel/carousel-prev-button.component.d.ts +2 -0
- package/dist/components/carousel/carousel-prev-button.component.d.ts.map +1 -0
- package/dist/components/carousel/carousel.component.d.ts +4 -0
- package/dist/components/carousel/carousel.component.d.ts.map +1 -0
- package/dist/components/carousel/carousel.constants.d.ts +2 -0
- package/dist/components/carousel/carousel.constants.d.ts.map +1 -0
- package/dist/components/carousel/carousel.context.d.ts +4 -0
- package/dist/components/carousel/carousel.context.d.ts.map +1 -0
- package/dist/components/carousel/carousel.stories.d.ts +14 -0
- package/dist/components/carousel/carousel.stories.d.ts.map +1 -0
- package/dist/components/carousel/carousel.types.d.ts +58 -0
- package/dist/components/carousel/carousel.types.d.ts.map +1 -0
- package/dist/components/carousel/utils/handle-key-down.d.ts +3 -0
- package/dist/components/carousel/utils/handle-key-down.d.ts.map +1 -0
- package/dist/components/carousel/utils/index.d.ts +3 -0
- package/dist/components/carousel/utils/index.d.ts.map +1 -0
- package/dist/components/carousel/utils/number-with-range.d.ts +2 -0
- package/dist/components/carousel/utils/number-with-range.d.ts.map +1 -0
- package/dist/components/carousel/utils/tween-scale.d.ts +3 -0
- package/dist/components/carousel/utils/tween-scale.d.ts.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/modal/dialog.overlay.d.ts.map +1 -1
- package/dist/components/progress/progress.component.d.ts +1 -1
- package/dist/components/progress/progress.component.d.ts.map +1 -1
- package/dist/components/progress/progress.types.d.ts +1 -0
- package/dist/components/progress/progress.types.d.ts.map +1 -1
- package/dist/layout/header/right-side.component.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/ui-components-index.cjs +2 -2
- package/dist/ui-components-index.js +67 -58
- package/dist/ui-components-layout.cjs +1 -1
- package/dist/ui-components-layout.js +345 -345
- package/package.json +2 -1
- package/dist/toggle-group.component-Cs7zS-s6.js +0 -11256
- package/dist/toggle-group.component-DOQKWhkg.cjs +0 -80
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";const y=require("./proxy-2cglvzJh.cjs"),S=require("react"),uf=require("./index-DGDeDoym.cjs"),Se=require("./indeterminate-C7JUOCP0.cjs"),J=require("./classNames-CN12fVA7.cjs"),To=require("react-dom"),Re=require("./index-CFlnP8Em.cjs");function Os(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const E=Os(S),gr=Os(To);function lf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ti(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function xr(...e){return t=>{let n=!1;const r=e.map(a=>{const s=Ti(a,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let a=0;a<r.length;a++){const s=r[a];typeof s=="function"?s():Ti(e[a],null)}}}}function oe(...e){return E.useCallback(xr(...e),e)}function Ke(e){const t=ff(e),n=E.forwardRef((r,a)=>{const{children:s,...f}=r,d=E.Children.toArray(s),c=d.find(pf);if(c){const o=c.props.children,i=d.map(u=>u===c?E.Children.count(o)>1?E.Children.only(null):E.isValidElement(o)?o.props.children:null:u);return y.jsxRuntimeExports.jsx(t,{...f,ref:a,children:E.isValidElement(o)?E.cloneElement(o,void 0,i):null})}return y.jsxRuntimeExports.jsx(t,{...f,ref:a,children:s})});return n.displayName=`${e}.Slot`,n}var Ps=Ke("Slot");function ff(e){const t=E.forwardRef((n,r)=>{const{children:a,...s}=n;if(E.isValidElement(a)){const f=mf(a),d=hf(s,a.props);return a.type!==E.Fragment&&(d.ref=r?xr(r,f):f),E.cloneElement(a,d)}return E.Children.count(a)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var As=Symbol("radix.slottable");function df(e){const t=({children:n})=>y.jsxRuntimeExports.jsx(y.jsxRuntimeExports.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=As,t}function pf(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===As}function hf(e,t){const n={...t};for(const r in t){const a=e[r],s=t[r];/^on[A-Z]/.test(r)?a&&s?n[r]=(...d)=>{const c=s(...d);return a(...d),c}:a&&(n[r]=a):r==="style"?n[r]={...a,...s}:r==="className"&&(n[r]=[a,s].filter(Boolean).join(" "))}return{...e,...n}}function mf(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var vf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ee=vf.reduce((e,t)=>{const n=Ke(`Primitive.${t}`),r=E.forwardRef((a,s)=>{const{asChild:f,...d}=a,c=f?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsxRuntimeExports.jsx(c,{...d,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function js(e,t){e&&gr.flushSync(()=>e.dispatchEvent(t))}var Ms=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),gf="VisuallyHidden",Ts=E.forwardRef((e,t)=>y.jsxRuntimeExports.jsx(ee.span,{...e,ref:t,style:{...Ms,...e.style}}));Ts.displayName=gf;var xf=Ts;function yf(e,t){const n=E.createContext(t),r=s=>{const{children:f,...d}=s,c=E.useMemo(()=>d,Object.values(d));return y.jsxRuntimeExports.jsx(n.Provider,{value:c,children:f})};r.displayName=e+"Provider";function a(s){const f=E.useContext(n);if(f)return f;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,a]}function we(e,t=[]){let n=[];function r(s,f){const d=E.createContext(f),c=n.length;n=[...n,f];const o=u=>{var g;const{scope:l,children:p,...h}=u,m=((g=l==null?void 0:l[e])==null?void 0:g[c])||d,v=E.useMemo(()=>h,Object.values(h));return y.jsxRuntimeExports.jsx(m.Provider,{value:v,children:p})};o.displayName=s+"Provider";function i(u,l){var m;const p=((m=l==null?void 0:l[e])==null?void 0:m[c])||d,h=E.useContext(p);if(h)return h;if(f!==void 0)return f;throw new Error(`\`${u}\` must be used within \`${s}\``)}return[o,i]}const a=()=>{const s=n.map(f=>E.createContext(f));return function(d){const c=(d==null?void 0:d[e])||s;return E.useMemo(()=>({[`__scope${e}`]:{...d,[e]:c}}),[d,c])}};return a.scopeName=e,[r,Ef(a,...t)]}function Ef(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const f=r.reduce((d,{useScope:c,scopeName:o})=>{const u=c(s)[`__scope${o}`];return{...d,...u}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:f}),[f])}};return n.scopeName=t.scopeName,n}function Ht(e){const t=e+"CollectionProvider",[n,r]=we(t),[a,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),f=m=>{const{scope:v,children:g}=m,x=S.useRef(null),b=S.useRef(new Map).current;return y.jsxRuntimeExports.jsx(a,{scope:v,itemMap:b,collectionRef:x,children:g})};f.displayName=t;const d=e+"CollectionSlot",c=Ke(d),o=S.forwardRef((m,v)=>{const{scope:g,children:x}=m,b=s(d,g),w=oe(v,b.collectionRef);return y.jsxRuntimeExports.jsx(c,{ref:w,children:x})});o.displayName=d;const i=e+"CollectionItemSlot",u="data-radix-collection-item",l=Ke(i),p=S.forwardRef((m,v)=>{const{scope:g,children:x,...b}=m,w=S.useRef(null),_=oe(v,w),P=s(i,g);return S.useEffect(()=>(P.itemMap.set(w,{ref:w,...b}),()=>void P.itemMap.delete(w))),y.jsxRuntimeExports.jsx(l,{[u]:"",ref:_,children:x})});p.displayName=i;function h(m){const v=s(e+"CollectionConsumer",m);return S.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${u}]`));return Array.from(v.itemMap.values()).sort((P,C)=>b.indexOf(P.ref.current)-b.indexOf(C.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:f,Slot:o,ItemSlot:p},h,r]}function K(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}var fe=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},bf=E[" useInsertionEffect ".trim().toString()]||fe;function be({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,s,f]=wf({defaultProp:t,onChange:n}),d=e!==void 0,c=d?e:a;{const i=E.useRef(e!==void 0);E.useEffect(()=>{const u=i.current;u!==d&&console.warn(`${r} is changing from ${u?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),i.current=d},[d,r])}const o=E.useCallback(i=>{var u;if(d){const l=_f(i)?i(e):i;l!==e&&((u=f.current)==null||u.call(f,l))}else s(i)},[d,e,s,f]);return[c,o]}function wf({defaultProp:e,onChange:t}){const[n,r]=E.useState(e),a=E.useRef(n),s=E.useRef(t);return bf(()=>{s.current=t},[t]),E.useEffect(()=>{var f;a.current!==n&&((f=s.current)==null||f.call(s,n),a.current=n)},[n,a]),[n,r,s]}function _f(e){return typeof e=="function"}function Rf(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var Ne=e=>{const{present:t,children:n}=e,r=Sf(t),a=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),s=oe(r.ref,Cf(a));return typeof n=="function"||r.isPresent?E.cloneElement(a,{ref:s}):null};Ne.displayName="Presence";function Sf(e){const[t,n]=E.useState(),r=E.useRef(null),a=E.useRef(e),s=E.useRef("none"),f=e?"mounted":"unmounted",[d,c]=Rf(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const o=fn(r.current);s.current=d==="mounted"?o:"none"},[d]),fe(()=>{const o=r.current,i=a.current;if(i!==e){const l=s.current,p=fn(o);e?c("MOUNT"):p==="none"||(o==null?void 0:o.display)==="none"?c("UNMOUNT"):c(i&&l!==p?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,c]),fe(()=>{if(t){let o;const i=t.ownerDocument.defaultView??window,u=p=>{const m=fn(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(c("ANIMATION_END"),!a.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",o=i.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},l=p=>{p.target===t&&(s.current=fn(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{i.clearTimeout(o),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:E.useCallback(o=>{r.current=o?getComputedStyle(o):null,n(o)},[])}}function fn(e){return(e==null?void 0:e.animationName)||"none"}function Cf(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Of=E[" useId ".trim().toString()]||(()=>{}),Pf=0;function Ce(e){const[t,n]=E.useState(Of());return fe(()=>{n(r=>r??String(Pf++))},[e]),t?`radix-${t}`:""}var yr="Collapsible",[Af,Is]=we(yr),[jf,Io]=Af(yr),Ns=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:a,disabled:s,onOpenChange:f,...d}=e,[c,o]=be({prop:r,defaultProp:a??!1,onChange:f,caller:yr});return y.jsxRuntimeExports.jsx(jf,{scope:n,disabled:s,contentId:Ce(),open:c,onOpenToggle:E.useCallback(()=>o(i=>!i),[o]),children:y.jsxRuntimeExports.jsx(ee.div,{"data-state":Do(c),"data-disabled":s?"":void 0,...d,ref:t})})});Ns.displayName=yr;var Ds="CollapsibleTrigger",ks=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,a=Io(Ds,n);return y.jsxRuntimeExports.jsx(ee.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":Do(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:t,onClick:K(e.onClick,a.onOpenToggle)})});ks.displayName=Ds;var No="CollapsibleContent",Ls=E.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Io(No,e.__scopeCollapsible);return y.jsxRuntimeExports.jsx(Ne,{present:n||a.open,children:({present:s})=>y.jsxRuntimeExports.jsx(Mf,{...r,ref:t,present:s})})});Ls.displayName=No;var Mf=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:a,...s}=e,f=Io(No,n),[d,c]=E.useState(r),o=E.useRef(null),i=oe(t,o),u=E.useRef(0),l=u.current,p=E.useRef(0),h=p.current,m=f.open||d,v=E.useRef(m),g=E.useRef(void 0);return E.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),fe(()=>{const x=o.current;if(x){g.current=g.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const b=x.getBoundingClientRect();u.current=b.height,p.current=b.width,v.current||(x.style.transitionDuration=g.current.transitionDuration,x.style.animationName=g.current.animationName),c(r)}},[f.open,r]),y.jsxRuntimeExports.jsx(ee.div,{"data-state":Do(f.open),"data-disabled":f.disabled?"":void 0,id:f.contentId,hidden:!m,...s,ref:i,style:{"--radix-collapsible-content-height":l?`${l}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:m&&a})});function Do(e){return e?"open":"closed"}var Tf=Ns,If=ks,Nf=Ls,Df=E.createContext(void 0);function Rt(e){const t=E.useContext(Df);return e||t||"ltr"}var De="Accordion",kf=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ko,Lf,Ff]=Ht(De),[Er]=we(De,[Ff,Is]),Lo=Is(),Fs=S.forwardRef((e,t)=>{const{type:n,...r}=e,a=r,s=r;return y.jsxRuntimeExports.jsx(ko.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?y.jsxRuntimeExports.jsx(Vf,{...s,ref:t}):y.jsxRuntimeExports.jsx(Gf,{...a,ref:t})})});Fs.displayName=De;var[$s,$f]=Er(De),[Bs,Bf]=Er(De,{collapsible:!1}),Gf=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:a=()=>{},collapsible:s=!1,...f}=e,[d,c]=be({prop:n,defaultProp:r??"",onChange:a,caller:De});return y.jsxRuntimeExports.jsx($s,{scope:e.__scopeAccordion,value:S.useMemo(()=>d?[d]:[],[d]),onItemOpen:c,onItemClose:S.useCallback(()=>s&&c(""),[s,c]),children:y.jsxRuntimeExports.jsx(Bs,{scope:e.__scopeAccordion,collapsible:s,children:y.jsxRuntimeExports.jsx(Gs,{...f,ref:t})})})}),Vf=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:a=()=>{},...s}=e,[f,d]=be({prop:n,defaultProp:r??[],onChange:a,caller:De}),c=S.useCallback(i=>d((u=[])=>[...u,i]),[d]),o=S.useCallback(i=>d((u=[])=>u.filter(l=>l!==i)),[d]);return y.jsxRuntimeExports.jsx($s,{scope:e.__scopeAccordion,value:f,onItemOpen:c,onItemClose:o,children:y.jsxRuntimeExports.jsx(Bs,{scope:e.__scopeAccordion,collapsible:!0,children:y.jsxRuntimeExports.jsx(Gs,{...s,ref:t})})})}),[zf,br]=Er(De),Gs=S.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:a,orientation:s="vertical",...f}=e,d=S.useRef(null),c=oe(d,t),o=Lf(n),u=Rt(a)==="ltr",l=K(e.onKeyDown,p=>{var j;if(!kf.includes(p.key))return;const h=p.target,m=o().filter(O=>{var T;return!((T=O.ref.current)!=null&&T.disabled)}),v=m.findIndex(O=>O.ref.current===h),g=m.length;if(v===-1)return;p.preventDefault();let x=v;const b=0,w=g-1,_=()=>{x=v+1,x>w&&(x=b)},P=()=>{x=v-1,x<b&&(x=w)};switch(p.key){case"Home":x=b;break;case"End":x=w;break;case"ArrowRight":s==="horizontal"&&(u?_():P());break;case"ArrowDown":s==="vertical"&&_();break;case"ArrowLeft":s==="horizontal"&&(u?P():_());break;case"ArrowUp":s==="vertical"&&P();break}const C=x%g;(j=m[C].ref.current)==null||j.focus()});return y.jsxRuntimeExports.jsx(zf,{scope:n,disabled:r,direction:a,orientation:s,children:y.jsxRuntimeExports.jsx(ko.Slot,{scope:n,children:y.jsxRuntimeExports.jsx(ee.div,{...f,"data-orientation":s,ref:c,onKeyDown:r?void 0:l})})})}),ir="AccordionItem",[Uf,Fo]=Er(ir),Vs=S.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...a}=e,s=br(ir,n),f=$f(ir,n),d=Lo(n),c=Ce(),o=r&&f.value.includes(r)||!1,i=s.disabled||e.disabled;return y.jsxRuntimeExports.jsx(Uf,{scope:n,open:o,disabled:i,triggerId:c,children:y.jsxRuntimeExports.jsx(Tf,{"data-orientation":s.orientation,"data-state":Ks(o),...d,...a,ref:t,disabled:i,open:o,onOpenChange:u=>{u?f.onItemOpen(r):f.onItemClose(r)}})})});Vs.displayName=ir;var zs="AccordionHeader",Us=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,a=br(De,n),s=Fo(zs,n);return y.jsxRuntimeExports.jsx(ee.h3,{"data-orientation":a.orientation,"data-state":Ks(s.open),"data-disabled":s.disabled?"":void 0,...r,ref:t})});Us.displayName=zs;var po="AccordionTrigger",qs=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,a=br(De,n),s=Fo(po,n),f=Bf(po,n),d=Lo(n);return y.jsxRuntimeExports.jsx(ko.ItemSlot,{scope:n,children:y.jsxRuntimeExports.jsx(If,{"aria-disabled":s.open&&!f.collapsible||void 0,"data-orientation":a.orientation,id:s.triggerId,...d,...r,ref:t})})});qs.displayName=po;var Hs="AccordionContent",Ws=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,a=br(De,n),s=Fo(Hs,n),f=Lo(n);return y.jsxRuntimeExports.jsx(Nf,{role:"region","aria-labelledby":s.triggerId,"data-orientation":a.orientation,...f,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Ws.displayName=Hs;function Ks(e){return e?"open":"closed"}var qf=Fs,Hf=Vs,Wf=Us,Kf=qs,Xf=Ws;function Me(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Yf(e,t=globalThis==null?void 0:globalThis.document){const n=Me(e);E.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Qf="DismissableLayer",ho="dismissableLayer.update",Zf="dismissableLayer.pointerDownOutside",Jf="dismissableLayer.focusOutside",Ii,Xs=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wt=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:f,onDismiss:d,...c}=e,o=E.useContext(Xs),[i,u]=E.useState(null),l=(i==null?void 0:i.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=E.useState({}),h=oe(t,C=>u(C)),m=Array.from(o.layers),[v]=[...o.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(v),x=i?m.indexOf(i):-1,b=o.layersWithOutsidePointerEventsDisabled.size>0,w=x>=g,_=nd(C=>{const j=C.target,O=[...o.branches].some(T=>T.contains(j));!w||O||(a==null||a(C),f==null||f(C),C.defaultPrevented||d==null||d())},l),P=rd(C=>{const j=C.target;[...o.branches].some(T=>T.contains(j))||(s==null||s(C),f==null||f(C),C.defaultPrevented||d==null||d())},l);return Yf(C=>{x===o.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&d&&(C.preventDefault(),d()))},l),E.useEffect(()=>{if(i)return n&&(o.layersWithOutsidePointerEventsDisabled.size===0&&(Ii=l.body.style.pointerEvents,l.body.style.pointerEvents="none"),o.layersWithOutsidePointerEventsDisabled.add(i)),o.layers.add(i),Ni(),()=>{n&&o.layersWithOutsidePointerEventsDisabled.size===1&&(l.body.style.pointerEvents=Ii)}},[i,l,n,o]),E.useEffect(()=>()=>{i&&(o.layers.delete(i),o.layersWithOutsidePointerEventsDisabled.delete(i),Ni())},[i,o]),E.useEffect(()=>{const C=()=>p({});return document.addEventListener(ho,C),()=>document.removeEventListener(ho,C)},[]),y.jsxRuntimeExports.jsx(ee.div,{...c,ref:h,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,P.onFocusCapture),onBlurCapture:K(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,_.onPointerDownCapture)})});Wt.displayName=Qf;var ed="DismissableLayerBranch",td=E.forwardRef((e,t)=>{const n=E.useContext(Xs),r=E.useRef(null),a=oe(t,r);return E.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),y.jsxRuntimeExports.jsx(ee.div,{...e,ref:a})});td.displayName=ed;function nd(e,t=globalThis==null?void 0:globalThis.document){const n=Me(e),r=E.useRef(!1),a=E.useRef(()=>{});return E.useEffect(()=>{const s=d=>{if(d.target&&!r.current){let c=function(){Ys(Zf,n,o,{discrete:!0})};const o={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);r.current=!1},f=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(f),t.removeEventListener("pointerdown",s),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function rd(e,t=globalThis==null?void 0:globalThis.document){const n=Me(e),r=E.useRef(!1);return E.useEffect(()=>{const a=s=>{s.target&&!r.current&&Ys(Jf,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ni(){const e=new CustomEvent(ho);document.dispatchEvent(e)}function Ys(e,t,n,{discrete:r}){const a=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?js(a,s):a.dispatchEvent(s)}var Kr="focusScope.autoFocusOnMount",Xr="focusScope.autoFocusOnUnmount",Di={bubbles:!1,cancelable:!0},od="FocusScope",Kt=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...f}=e,[d,c]=E.useState(null),o=Me(a),i=Me(s),u=E.useRef(null),l=oe(t,m=>c(m)),p=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let m=function(b){if(p.paused||!d)return;const w=b.target;d.contains(w)?u.current=w:He(u.current,{select:!0})},v=function(b){if(p.paused||!d)return;const w=b.relatedTarget;w!==null&&(d.contains(w)||He(u.current,{select:!0}))},g=function(b){if(document.activeElement===document.body)for(const _ of b)_.removedNodes.length>0&&He(d)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const x=new MutationObserver(g);return d&&x.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),x.disconnect()}}},[r,d,p.paused]),E.useEffect(()=>{if(d){Li.add(p);const m=document.activeElement;if(!d.contains(m)){const g=new CustomEvent(Kr,Di);d.addEventListener(Kr,o),d.dispatchEvent(g),g.defaultPrevented||(id(ld(Qs(d)),{select:!0}),document.activeElement===m&&He(d))}return()=>{d.removeEventListener(Kr,o),setTimeout(()=>{const g=new CustomEvent(Xr,Di);d.addEventListener(Xr,i),d.dispatchEvent(g),g.defaultPrevented||He(m??document.body,{select:!0}),d.removeEventListener(Xr,i),Li.remove(p)},0)}}},[d,o,i,p]);const h=E.useCallback(m=>{if(!n&&!r||p.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(v&&g){const x=m.currentTarget,[b,w]=ad(x);b&&w?!m.shiftKey&&g===w?(m.preventDefault(),n&&He(b,{select:!0})):m.shiftKey&&g===b&&(m.preventDefault(),n&&He(w,{select:!0})):g===x&&m.preventDefault()}},[n,r,p.paused]);return y.jsxRuntimeExports.jsx(ee.div,{tabIndex:-1,...f,ref:l,onKeyDown:h})});Kt.displayName=od;function id(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(He(r,{select:t}),document.activeElement!==n)return}function ad(e){const t=Qs(e),n=ki(t,e),r=ki(t.reverse(),e);return[n,r]}function Qs(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ki(e,t){for(const n of e)if(!sd(n,{upTo:t}))return n}function sd(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 cd(e){return e instanceof HTMLInputElement&&"select"in e}function He(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&cd(e)&&t&&e.select()}}var Li=ud();function ud(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Fi(e,t),e.unshift(t)},remove(t){var n;e=Fi(e,t),(n=e[0])==null||n.resume()}}}function Fi(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ld(e){return e.filter(t=>t.tagName!=="A")}var fd="Portal",St=E.forwardRef((e,t)=>{var d;const{container:n,...r}=e,[a,s]=E.useState(!1);fe(()=>s(!0),[]);const f=n||a&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return f?To.createPortal(y.jsxRuntimeExports.jsx(ee.div,{...r,ref:t}),f):null});St.displayName=fd;var dd=St,Yr=0;function wr(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$i()),document.body.insertAdjacentElement("beforeend",e[1]??$i()),Yr++,()=>{Yr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Yr--}},[])}function $i(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Le=function(){return Le=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Le.apply(this,arguments)};function Zs(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function pd(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,s;r<a;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var nr="right-scroll-bar-position",rr="width-before-scroll-bar",hd="with-scroll-bars-hidden",md="--removed-body-scroll-bar-size";function Qr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function vd(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var gd=typeof window<"u"?E.useLayoutEffect:E.useEffect,Bi=new WeakMap;function xd(e,t){var n=vd(null,function(r){return e.forEach(function(a){return Qr(a,r)})});return gd(function(){var r=Bi.get(n);if(r){var a=new Set(r),s=new Set(e),f=n.current;a.forEach(function(d){s.has(d)||Qr(d,null)}),s.forEach(function(d){a.has(d)||Qr(d,f)})}Bi.set(n,e)},[e]),n}function yd(e){return e}function Ed(e,t){t===void 0&&(t=yd);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var f=t(s,r);return n.push(f),function(){n=n.filter(function(d){return d!==f})}},assignSyncMedium:function(s){for(r=!0;n.length;){var f=n;n=[],f.forEach(s)}n={push:function(d){return s(d)},filter:function(){return n}}},assignMedium:function(s){r=!0;var f=[];if(n.length){var d=n;n=[],d.forEach(s),f=n}var c=function(){var i=f;f=[],i.forEach(s)},o=function(){return Promise.resolve().then(c)};o(),n={push:function(i){f.push(i),o()},filter:function(i){return f=f.filter(i),n}}}};return a}function bd(e){e===void 0&&(e={});var t=Ed(null);return t.options=Le({async:!0,ssr:!1},e),t}var Js=function(e){var t=e.sideCar,n=Zs(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return E.createElement(r,Le({},n))};Js.isSideCarExport=!0;function wd(e,t){return e.useMedium(t),Js}var ec=bd(),Zr=function(){},_r=E.forwardRef(function(e,t){var n=E.useRef(null),r=E.useState({onScrollCapture:Zr,onWheelCapture:Zr,onTouchMoveCapture:Zr}),a=r[0],s=r[1],f=e.forwardProps,d=e.children,c=e.className,o=e.removeScrollBar,i=e.enabled,u=e.shards,l=e.sideCar,p=e.noRelative,h=e.noIsolation,m=e.inert,v=e.allowPinchZoom,g=e.as,x=g===void 0?"div":g,b=e.gapMode,w=Zs(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=l,P=xd([n,t]),C=Le(Le({},w),a);return E.createElement(E.Fragment,null,i&&E.createElement(_,{sideCar:ec,removeScrollBar:o,shards:u,noRelative:p,noIsolation:h,inert:m,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:b}),f?E.cloneElement(E.Children.only(d),Le(Le({},C),{ref:P})):E.createElement(x,Le({},C,{className:c,ref:P}),d))});_r.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};_r.classNames={fullWidth:rr,zeroRight:nr};var _d=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Rd(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=_d();return t&&e.setAttribute("nonce",t),e}function Sd(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Cd(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Od=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Rd())&&(Sd(t,n),Cd(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Pd=function(){var e=Od();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},tc=function(){var e=Pd(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},Ad={left:0,top:0,right:0,gap:0},Jr=function(e){return parseInt(e||"",10)||0},jd=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Jr(n),Jr(r),Jr(a)]},Md=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ad;var t=jd(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Td=tc(),Et="data-scroll-locked",Id=function(e,t,n,r){var a=e.left,s=e.top,f=e.right,d=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(hd,` {
|
|
3
|
+
overflow: hidden `).concat(r,`;
|
|
4
|
+
padding-right: `).concat(d,"px ").concat(r,`;
|
|
5
|
+
}
|
|
6
|
+
body[`).concat(Et,`] {
|
|
7
|
+
overflow: hidden `).concat(r,`;
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
|
+
padding-left: `.concat(a,`px;
|
|
11
|
+
padding-top: `).concat(s,`px;
|
|
12
|
+
padding-right: `).concat(f,`px;
|
|
13
|
+
margin-left:0;
|
|
14
|
+
margin-top:0;
|
|
15
|
+
margin-right: `).concat(d,"px ").concat(r,`;
|
|
16
|
+
`),n==="padding"&&"padding-right: ".concat(d,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.`).concat(nr,` {
|
|
20
|
+
right: `).concat(d,"px ").concat(r,`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.`).concat(rr,` {
|
|
24
|
+
margin-right: `).concat(d,"px ").concat(r,`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat(nr," .").concat(nr,` {
|
|
28
|
+
right: 0 `).concat(r,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat(rr," .").concat(rr,` {
|
|
32
|
+
margin-right: 0 `).concat(r,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[`).concat(Et,`] {
|
|
36
|
+
`).concat(md,": ").concat(d,`px;
|
|
37
|
+
}
|
|
38
|
+
`)},Gi=function(){var e=parseInt(document.body.getAttribute(Et)||"0",10);return isFinite(e)?e:0},Nd=function(){E.useEffect(function(){return document.body.setAttribute(Et,(Gi()+1).toString()),function(){var e=Gi()-1;e<=0?document.body.removeAttribute(Et):document.body.setAttribute(Et,e.toString())}},[])},Dd=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;Nd();var s=E.useMemo(function(){return Md(a)},[a]);return E.createElement(Td,{styles:Id(s,!t,a,n?"":"!important")})},mo=!1;if(typeof window<"u")try{var dn=Object.defineProperty({},"passive",{get:function(){return mo=!0,!0}});window.addEventListener("test",dn,dn),window.removeEventListener("test",dn,dn)}catch{mo=!1}var pt=mo?{passive:!1}:!1,kd=function(e){return e.tagName==="TEXTAREA"},nc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!kd(e)&&n[t]==="visible")},Ld=function(e){return nc(e,"overflowY")},Fd=function(e){return nc(e,"overflowX")},Vi=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=rc(e,r);if(a){var s=oc(e,r),f=s[1],d=s[2];if(f>d)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},$d=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Bd=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},rc=function(e,t){return e==="v"?Ld(t):Fd(t)},oc=function(e,t){return e==="v"?$d(t):Bd(t)},Gd=function(e,t){return e==="h"&&t==="rtl"?-1:1},Vd=function(e,t,n,r,a){var s=Gd(e,window.getComputedStyle(t).direction),f=s*r,d=n.target,c=t.contains(d),o=!1,i=f>0,u=0,l=0;do{if(!d)break;var p=oc(e,d),h=p[0],m=p[1],v=p[2],g=m-v-s*h;(h||g)&&rc(e,d)&&(u+=g,l+=h);var x=d.parentNode;d=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!c&&d!==document.body||c&&(t.contains(d)||t===d));return(i&&Math.abs(u)<1||!i&&Math.abs(l)<1)&&(o=!0),o},pn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},zi=function(e){return[e.deltaX,e.deltaY]},Ui=function(e){return e&&"current"in e?e.current:e},zd=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ud=function(e){return`
|
|
39
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
+
`)},qd=0,ht=[];function Hd(e){var t=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),a=E.useState(qd++)[0],s=E.useState(tc)[0],f=E.useRef(e);E.useEffect(function(){f.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var m=pd([e.lockRef.current],(e.shards||[]).map(Ui),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var d=E.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!f.current.allowPinchZoom;var g=pn(m),x=n.current,b="deltaX"in m?m.deltaX:x[0]-g[0],w="deltaY"in m?m.deltaY:x[1]-g[1],_,P=m.target,C=Math.abs(b)>Math.abs(w)?"h":"v";if("touches"in m&&C==="h"&&P.type==="range")return!1;var j=window.getSelection(),O=j&&j.anchorNode,T=O?O===P||O.contains(P):!1;if(T)return!1;var M=Vi(C,P);if(!M)return!0;if(M?_=C:(_=C==="v"?"h":"v",M=Vi(C,P)),!M)return!1;if(!r.current&&"changedTouches"in m&&(b||w)&&(r.current=_),!_)return!0;var D=r.current||_;return Vd(D,v,m,D==="h"?b:w)},[]),c=E.useCallback(function(m){var v=m;if(!(!ht.length||ht[ht.length-1]!==s)){var g="deltaY"in v?zi(v):pn(v),x=t.current.filter(function(_){return _.name===v.type&&(_.target===v.target||v.target===_.shadowParent)&&zd(_.delta,g)})[0];if(x&&x.should){v.cancelable&&v.preventDefault();return}if(!x){var b=(f.current.shards||[]).map(Ui).filter(Boolean).filter(function(_){return _.contains(v.target)}),w=b.length>0?d(v,b[0]):!f.current.noIsolation;w&&v.cancelable&&v.preventDefault()}}},[]),o=E.useCallback(function(m,v,g,x){var b={name:m,delta:v,target:g,should:x,shadowParent:Wd(g)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(w){return w!==b})},1)},[]),i=E.useCallback(function(m){n.current=pn(m),r.current=void 0},[]),u=E.useCallback(function(m){o(m.type,zi(m),m.target,d(m,e.lockRef.current))},[]),l=E.useCallback(function(m){o(m.type,pn(m),m.target,d(m,e.lockRef.current))},[]);E.useEffect(function(){return ht.push(s),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:l}),document.addEventListener("wheel",c,pt),document.addEventListener("touchmove",c,pt),document.addEventListener("touchstart",i,pt),function(){ht=ht.filter(function(m){return m!==s}),document.removeEventListener("wheel",c,pt),document.removeEventListener("touchmove",c,pt),document.removeEventListener("touchstart",i,pt)}},[]);var p=e.removeScrollBar,h=e.inert;return E.createElement(E.Fragment,null,h?E.createElement(s,{styles:Ud(a)}):null,p?E.createElement(Dd,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Wd(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Kd=wd(ec,Hd);var Xt=E.forwardRef(function(e,t){return E.createElement(_r,Le({},e,{ref:t,sideCar:Kd}))});Xt.classNames=_r.classNames;var Xd=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},mt=new WeakMap,hn=new WeakMap,mn={},eo=0,ic=function(e){return e&&(e.host||ic(e.parentNode))},Yd=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ic(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Qd=function(e,t,n,r){var a=Yd(t,Array.isArray(e)?e:[e]);mn[n]||(mn[n]=new WeakMap);var s=mn[n],f=[],d=new Set,c=new Set(a),o=function(u){!u||d.has(u)||(d.add(u),o(u.parentNode))};a.forEach(o);var i=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(l){if(d.has(l))i(l);else try{var p=l.getAttribute(r),h=p!==null&&p!=="false",m=(mt.get(l)||0)+1,v=(s.get(l)||0)+1;mt.set(l,m),s.set(l,v),f.push(l),m===1&&h&&hn.set(l,!0),v===1&&l.setAttribute(n,"true"),h||l.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",l,g)}})};return i(t),d.clear(),eo++,function(){f.forEach(function(u){var l=mt.get(u)-1,p=s.get(u)-1;mt.set(u,l),s.set(u,p),l||(hn.has(u)||u.removeAttribute(r),hn.delete(u)),p||u.removeAttribute(n)}),eo--,eo||(mt=new WeakMap,mt=new WeakMap,hn=new WeakMap,mn={})}},Rr=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=Xd(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),Qd(r,a,n,"aria-hidden")):function(){return null}},Sr="Dialog",[ac]=we(Sr),[Zd,ke]=ac(Sr),sc=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:s,modal:f=!0}=e,d=E.useRef(null),c=E.useRef(null),[o,i]=be({prop:r,defaultProp:a??!1,onChange:s,caller:Sr});return y.jsxRuntimeExports.jsx(Zd,{scope:t,triggerRef:d,contentRef:c,contentId:Ce(),titleId:Ce(),descriptionId:Ce(),open:o,onOpenChange:i,onOpenToggle:E.useCallback(()=>i(u=>!u),[i]),modal:f,children:n})};sc.displayName=Sr;var cc="DialogTrigger",Jd=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ke(cc,n),s=oe(t,a.triggerRef);return y.jsxRuntimeExports.jsx(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Go(a.open),...r,ref:s,onClick:K(e.onClick,a.onOpenToggle)})});Jd.displayName=cc;var $o="DialogPortal",[ep,uc]=ac($o,{forceMount:void 0}),lc=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,s=ke($o,t);return y.jsxRuntimeExports.jsx(ep,{scope:t,forceMount:n,children:E.Children.map(r,f=>y.jsxRuntimeExports.jsx(Ne,{present:n||s.open,children:y.jsxRuntimeExports.jsx(St,{asChild:!0,container:a,children:f})}))})};lc.displayName=$o;var ar="DialogOverlay",fc=E.forwardRef((e,t)=>{const n=uc(ar,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,s=ke(ar,e.__scopeDialog);return s.modal?y.jsxRuntimeExports.jsx(Ne,{present:r||s.open,children:y.jsxRuntimeExports.jsx(np,{...a,ref:t})}):null});fc.displayName=ar;var tp=Ke("DialogOverlay.RemoveScroll"),np=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ke(ar,n);return y.jsxRuntimeExports.jsx(Xt,{as:tp,allowPinchZoom:!0,shards:[a.contentRef],children:y.jsxRuntimeExports.jsx(ee.div,{"data-state":Go(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ot="DialogContent",dc=E.forwardRef((e,t)=>{const n=uc(ot,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,s=ke(ot,e.__scopeDialog);return y.jsxRuntimeExports.jsx(Ne,{present:r||s.open,children:s.modal?y.jsxRuntimeExports.jsx(rp,{...a,ref:t}):y.jsxRuntimeExports.jsx(op,{...a,ref:t})})});dc.displayName=ot;var rp=E.forwardRef((e,t)=>{const n=ke(ot,e.__scopeDialog),r=E.useRef(null),a=oe(t,n.contentRef,r);return E.useEffect(()=>{const s=r.current;if(s)return Rr(s)},[]),y.jsxRuntimeExports.jsx(pc,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,s=>{var f;s.preventDefault(),(f=n.triggerRef.current)==null||f.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,s=>{const f=s.detail.originalEvent,d=f.button===0&&f.ctrlKey===!0;(f.button===2||d)&&s.preventDefault()}),onFocusOutside:K(e.onFocusOutside,s=>s.preventDefault())})}),op=E.forwardRef((e,t)=>{const n=ke(ot,e.__scopeDialog),r=E.useRef(!1),a=E.useRef(!1);return y.jsxRuntimeExports.jsx(pc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var f,d;(f=e.onCloseAutoFocus)==null||f.call(e,s),s.defaultPrevented||(r.current||(d=n.triggerRef.current)==null||d.focus(),s.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:s=>{var c,o;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const f=s.target;((o=n.triggerRef.current)==null?void 0:o.contains(f))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&a.current&&s.preventDefault()}})}),pc=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:s,...f}=e,d=ke(ot,n),c=E.useRef(null),o=oe(t,c);return wr(),y.jsxRuntimeExports.jsxs(y.jsxRuntimeExports.Fragment,{children:[y.jsxRuntimeExports.jsx(Kt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:s,children:y.jsxRuntimeExports.jsx(Wt,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Go(d.open),...f,ref:o,onDismiss:()=>d.onOpenChange(!1)})}),y.jsxRuntimeExports.jsxs(y.jsxRuntimeExports.Fragment,{children:[y.jsxRuntimeExports.jsx(ap,{titleId:d.titleId}),y.jsxRuntimeExports.jsx(cp,{contentRef:c,descriptionId:d.descriptionId})]})]})}),Bo="DialogTitle",hc=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ke(Bo,n);return y.jsxRuntimeExports.jsx(ee.h2,{id:a.titleId,...r,ref:t})});hc.displayName=Bo;var mc="DialogDescription",vc=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ke(mc,n);return y.jsxRuntimeExports.jsx(ee.p,{id:a.descriptionId,...r,ref:t})});vc.displayName=mc;var gc="DialogClose",ip=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ke(gc,n);return y.jsxRuntimeExports.jsx(ee.button,{type:"button",...r,ref:t,onClick:K(e.onClick,()=>a.onOpenChange(!1))})});ip.displayName=gc;function Go(e){return e?"open":"closed"}var xc="DialogTitleWarning",[h1,yc]=yf(xc,{contentName:ot,titleName:Bo,docsSlug:"dialog"}),ap=({titleId:e})=>{const t=yc(xc),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
|
+
|
|
43
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
|
+
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},sp="DialogDescriptionWarning",cp=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${yc(sp).contentName}}.`;return E.useEffect(()=>{var s;const a=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},up=sc,lp=lc,fp=fc,dp=dc,pp=hc,hp=vc;function mp(){return uf.shimExports.useSyncExternalStore(vp,()=>!0,()=>!1)}function vp(){return()=>{}}var Vo="Avatar",[gp]=we(Vo),[xp,Ec]=gp(Vo),bc=E.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,s]=E.useState("idle");return y.jsxRuntimeExports.jsx(xp,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:s,children:y.jsxRuntimeExports.jsx(ee.span,{...r,ref:t})})});bc.displayName=Vo;var wc="AvatarImage",_c=E.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...s}=e,f=Ec(wc,n),d=yp(r,s),c=Me(o=>{a(o),f.onImageLoadingStatusChange(o)});return fe(()=>{d!=="idle"&&c(d)},[d,c]),d==="loaded"?y.jsxRuntimeExports.jsx(ee.img,{...s,ref:t,src:r}):null});_c.displayName=wc;var Rc="AvatarFallback",Sc=E.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,s=Ec(Rc,n),[f,d]=E.useState(r===void 0);return E.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>d(!0),r);return()=>window.clearTimeout(c)}},[r]),f&&s.imageLoadingStatus!=="loaded"?y.jsxRuntimeExports.jsx(ee.span,{...a,ref:t}):null});Sc.displayName=Rc;function qi(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function yp(e,{referrerPolicy:t,crossOrigin:n}){const r=mp(),a=E.useRef(null),s=r?(a.current||(a.current=new window.Image),a.current):null,[f,d]=E.useState(()=>qi(s,e));return fe(()=>{d(qi(s,e))},[s,e]),fe(()=>{const c=u=>()=>{d(u)};if(!s)return;const o=c("loaded"),i=c("error");return s.addEventListener("load",o),s.addEventListener("error",i),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",o),s.removeEventListener("error",i)}},[s,n,t]),f}var Ep=bc,bp=_c,wp=Sc;function zo(e){const t=E.useRef({value:e,previous:e});return E.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Uo(e){const[t,n]=E.useState(void 0);return fe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const s=a[0];let f,d;if("borderBoxSize"in s){const c=s.borderBoxSize,o=Array.isArray(c)?c[0]:c;f=o.inlineSize,d=o.blockSize}else f=e.offsetWidth,d=e.offsetHeight;n({width:f,height:d})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Cr="Checkbox",[_p]=we(Cr),[Rp,qo]=_p(Cr);function Sp(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:a,disabled:s,form:f,name:d,onCheckedChange:c,required:o,value:i="on",internal_do_not_use_render:u}=e,[l,p]=be({prop:n,defaultProp:a??!1,onChange:c,caller:Cr}),[h,m]=E.useState(null),[v,g]=E.useState(null),x=E.useRef(!1),b=h?!!f||!!h.closest("form"):!0,w={checked:l,disabled:s,setChecked:p,control:h,setControl:m,name:d,form:f,value:i,hasConsumerStoppedPropagationRef:x,required:o,defaultChecked:We(a)?!1:a,isFormControl:b,bubbleInput:v,setBubbleInput:g};return y.jsxRuntimeExports.jsx(Rp,{scope:t,...w,children:Op(u)?u(w):r})}var Cc="CheckboxTrigger",Oc=E.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},a)=>{const{control:s,value:f,disabled:d,checked:c,required:o,setControl:i,setChecked:u,hasConsumerStoppedPropagationRef:l,isFormControl:p,bubbleInput:h}=qo(Cc,e),m=oe(a,i),v=E.useRef(c);return E.useEffect(()=>{const g=s==null?void 0:s.form;if(g){const x=()=>u(v.current);return g.addEventListener("reset",x),()=>g.removeEventListener("reset",x)}},[s,u]),y.jsxRuntimeExports.jsx(ee.button,{type:"button",role:"checkbox","aria-checked":We(c)?"mixed":c,"aria-required":o,"data-state":Tc(c),"data-disabled":d?"":void 0,disabled:d,value:f,...r,ref:m,onKeyDown:K(t,g=>{g.key==="Enter"&&g.preventDefault()}),onClick:K(n,g=>{u(x=>We(x)?!0:!x),h&&p&&(l.current=g.isPropagationStopped(),l.current||g.stopPropagation())})})});Oc.displayName=Cc;var Pc=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:s,required:f,disabled:d,value:c,onCheckedChange:o,form:i,...u}=e;return y.jsxRuntimeExports.jsx(Sp,{__scopeCheckbox:n,checked:a,defaultChecked:s,disabled:d,required:f,onCheckedChange:o,name:r,form:i,value:c,internal_do_not_use_render:({isFormControl:l})=>y.jsxRuntimeExports.jsxs(y.jsxRuntimeExports.Fragment,{children:[y.jsxRuntimeExports.jsx(Oc,{...u,ref:t,__scopeCheckbox:n}),l&&y.jsxRuntimeExports.jsx(Mc,{__scopeCheckbox:n})]})})});Pc.displayName=Cr;var Ac="CheckboxIndicator",Cp=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,s=qo(Ac,n);return y.jsxRuntimeExports.jsx(Ne,{present:r||We(s.checked)||s.checked===!0,children:y.jsxRuntimeExports.jsx(ee.span,{"data-state":Tc(s.checked),"data-disabled":s.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});Cp.displayName=Ac;var jc="CheckboxBubbleInput",Mc=E.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:a,checked:s,defaultChecked:f,required:d,disabled:c,name:o,value:i,form:u,bubbleInput:l,setBubbleInput:p}=qo(jc,e),h=oe(n,p),m=zo(s),v=Uo(r);E.useEffect(()=>{const x=l;if(!x)return;const b=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(b,"checked").set,P=!a.current;if(m!==s&&_){const C=new Event("click",{bubbles:P});x.indeterminate=We(s),_.call(x,We(s)?!1:s),x.dispatchEvent(C)}},[l,m,s,a]);const g=E.useRef(We(s)?!1:s);return y.jsxRuntimeExports.jsx(ee.input,{type:"checkbox","aria-hidden":!0,defaultChecked:f??g.current,required:d,disabled:c,name:o,value:i,form:u,...t,tabIndex:-1,ref:h,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Mc.displayName=jc;function Op(e){return typeof e=="function"}function We(e){return e==="indeterminate"}function Tc(e){return We(e)?"indeterminate":e?"checked":"unchecked"}const Pp=["top","right","bottom","left"],Xe=Math.min,ye=Math.max,sr=Math.round,vn=Math.floor,$e=e=>({x:e,y:e}),Ap={left:"right",right:"left",bottom:"top",top:"bottom"},jp={start:"end",end:"start"};function vo(e,t,n){return ye(e,Xe(t,n))}function Ue(e,t){return typeof e=="function"?e(t):e}function qe(e){return e.split("-")[0]}function Ct(e){return e.split("-")[1]}function Ho(e){return e==="x"?"y":"x"}function Wo(e){return e==="y"?"height":"width"}const Mp=new Set(["top","bottom"]);function Fe(e){return Mp.has(qe(e))?"y":"x"}function Ko(e){return Ho(Fe(e))}function Tp(e,t,n){n===void 0&&(n=!1);const r=Ct(e),a=Ko(e),s=Wo(a);let f=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(f=cr(f)),[f,cr(f)]}function Ip(e){const t=cr(e);return[go(e),t,go(t)]}function go(e){return e.replace(/start|end/g,t=>jp[t])}const Hi=["left","right"],Wi=["right","left"],Np=["top","bottom"],Dp=["bottom","top"];function kp(e,t,n){switch(e){case"top":case"bottom":return n?t?Wi:Hi:t?Hi:Wi;case"left":case"right":return t?Np:Dp;default:return[]}}function Lp(e,t,n,r){const a=Ct(e);let s=kp(qe(e),n==="start",r);return a&&(s=s.map(f=>f+"-"+a),t&&(s=s.concat(s.map(go)))),s}function cr(e){return e.replace(/left|right|bottom|top/g,t=>Ap[t])}function Fp(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ic(e){return typeof e!="number"?Fp(e):{top:e,right:e,bottom:e,left:e}}function ur(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function Ki(e,t,n){let{reference:r,floating:a}=e;const s=Fe(t),f=Ko(t),d=Wo(f),c=qe(t),o=s==="y",i=r.x+r.width/2-a.width/2,u=r.y+r.height/2-a.height/2,l=r[d]/2-a[d]/2;let p;switch(c){case"top":p={x:i,y:r.y-a.height};break;case"bottom":p={x:i,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-a.width,y:u};break;default:p={x:r.x,y:r.y}}switch(Ct(t)){case"start":p[f]-=l*(n&&o?-1:1);break;case"end":p[f]+=l*(n&&o?-1:1);break}return p}async function $p(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:s,rects:f,elements:d,strategy:c}=e,{boundary:o="clippingAncestors",rootBoundary:i="viewport",elementContext:u="floating",altBoundary:l=!1,padding:p=0}=Ue(t,e),h=Ic(p),v=d[l?u==="floating"?"reference":"floating":u],g=ur(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(d.floating)),boundary:o,rootBoundary:i,strategy:c})),x=u==="floating"?{x:r,y:a,width:f.floating.width,height:f.floating.height}:f.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d.floating)),w=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},_=ur(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:x,offsetParent:b,strategy:c}):x);return{top:(g.top-_.top+h.top)/w.y,bottom:(_.bottom-g.bottom+h.bottom)/w.y,left:(g.left-_.left+h.left)/w.x,right:(_.right-g.right+h.right)/w.x}}const Bp=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:s=[],platform:f}=n,d=s.filter(Boolean),c=await(f.isRTL==null?void 0:f.isRTL(t));let o=await f.getElementRects({reference:e,floating:t,strategy:a}),{x:i,y:u}=Ki(o,r,c),l=r,p={},h=0;for(let v=0;v<d.length;v++){var m;const{name:g,fn:x}=d[v],{x:b,y:w,data:_,reset:P}=await x({x:i,y:u,initialPlacement:r,placement:l,strategy:a,middlewareData:p,rects:o,platform:{...f,detectOverflow:(m=f.detectOverflow)!=null?m:$p},elements:{reference:e,floating:t}});i=b??i,u=w??u,p={...p,[g]:{...p[g],..._}},P&&h<=50&&(h++,typeof P=="object"&&(P.placement&&(l=P.placement),P.rects&&(o=P.rects===!0?await f.getElementRects({reference:e,floating:t,strategy:a}):P.rects),{x:i,y:u}=Ki(o,l,c)),v=-1)}return{x:i,y:u,placement:l,strategy:a,middlewareData:p}},Gp=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:s,platform:f,elements:d,middlewareData:c}=t,{element:o,padding:i=0}=Ue(e,t)||{};if(o==null)return{};const u=Ic(i),l={x:n,y:r},p=Ko(a),h=Wo(p),m=await f.getDimensions(o),v=p==="y",g=v?"top":"left",x=v?"bottom":"right",b=v?"clientHeight":"clientWidth",w=s.reference[h]+s.reference[p]-l[p]-s.floating[h],_=l[p]-s.reference[p],P=await(f.getOffsetParent==null?void 0:f.getOffsetParent(o));let C=P?P[b]:0;(!C||!await(f.isElement==null?void 0:f.isElement(P)))&&(C=d.floating[b]||s.floating[h]);const j=w/2-_/2,O=C/2-m[h]/2-1,T=Xe(u[g],O),M=Xe(u[x],O),D=T,F=C-m[h]-M,k=C/2-m[h]/2+j,U=vo(D,k,F),$=!c.arrow&&Ct(a)!=null&&k!==U&&s.reference[h]/2-(k<D?T:M)-m[h]/2<0,Y=$?k<D?k-D:k-F:0;return{[p]:l[p]+Y,data:{[p]:U,centerOffset:k-U-Y,...$&&{alignmentOffset:Y}},reset:$}}}),Vp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:s,rects:f,initialPlacement:d,platform:c,elements:o}=t,{mainAxis:i=!0,crossAxis:u=!0,fallbackPlacements:l,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...v}=Ue(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=qe(a),x=Fe(d),b=qe(d)===d,w=await(c.isRTL==null?void 0:c.isRTL(o.floating)),_=l||(b||!m?[cr(d)]:Ip(d)),P=h!=="none";!l&&P&&_.push(...Lp(d,m,h,w));const C=[d,..._],j=await c.detectOverflow(t,v),O=[];let T=((r=s.flip)==null?void 0:r.overflows)||[];if(i&&O.push(j[g]),u){const k=Tp(a,f,w);O.push(j[k[0]],j[k[1]])}if(T=[...T,{placement:a,overflows:O}],!O.every(k=>k<=0)){var M,D;const k=(((M=s.flip)==null?void 0:M.index)||0)+1,U=C[k];if(U&&(!(u==="alignment"?x!==Fe(U):!1)||T.every(V=>Fe(V.placement)===x?V.overflows[0]>0:!0)))return{data:{index:k,overflows:T},reset:{placement:U}};let $=(D=T.filter(Y=>Y.overflows[0]<=0).sort((Y,V)=>Y.overflows[1]-V.overflows[1])[0])==null?void 0:D.placement;if(!$)switch(p){case"bestFit":{var F;const Y=(F=T.filter(V=>{if(P){const L=Fe(V.placement);return L===x||L==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(L=>L>0).reduce((L,A)=>L+A,0)]).sort((V,L)=>V[1]-L[1])[0])==null?void 0:F[0];Y&&($=Y);break}case"initialPlacement":$=d;break}if(a!==$)return{reset:{placement:$}}}return{}}}};function Xi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Yi(e){return Pp.some(t=>e[t]>=0)}const zp=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...s}=Ue(e,t);switch(a){case"referenceHidden":{const f=await r.detectOverflow(t,{...s,elementContext:"reference"}),d=Xi(f,n.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:Yi(d)}}}case"escaped":{const f=await r.detectOverflow(t,{...s,altBoundary:!0}),d=Xi(f,n.floating);return{data:{escapedOffsets:d,escaped:Yi(d)}}}default:return{}}}}},Nc=new Set(["left","top"]);async function Up(e,t){const{placement:n,platform:r,elements:a}=e,s=await(r.isRTL==null?void 0:r.isRTL(a.floating)),f=qe(n),d=Ct(n),c=Fe(n)==="y",o=Nc.has(f)?-1:1,i=s&&c?-1:1,u=Ue(t,e);let{mainAxis:l,crossAxis:p,alignmentAxis:h}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return d&&typeof h=="number"&&(p=d==="end"?h*-1:h),c?{x:p*i,y:l*o}:{x:l*o,y:p*i}}const qp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:s,placement:f,middlewareData:d}=t,c=await Up(t,e);return f===((n=d.offset)==null?void 0:n.placement)&&(r=d.arrow)!=null&&r.alignmentOffset?{}:{x:a+c.x,y:s+c.y,data:{...c,placement:f}}}}},Hp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:s}=t,{mainAxis:f=!0,crossAxis:d=!1,limiter:c={fn:g=>{let{x,y:b}=g;return{x,y:b}}},...o}=Ue(e,t),i={x:n,y:r},u=await s.detectOverflow(t,o),l=Fe(qe(a)),p=Ho(l);let h=i[p],m=i[l];if(f){const g=p==="y"?"top":"left",x=p==="y"?"bottom":"right",b=h+u[g],w=h-u[x];h=vo(b,h,w)}if(d){const g=l==="y"?"top":"left",x=l==="y"?"bottom":"right",b=m+u[g],w=m-u[x];m=vo(b,m,w)}const v=c.fn({...t,[p]:h,[l]:m});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[p]:f,[l]:d}}}}}},Wp=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:s,middlewareData:f}=t,{offset:d=0,mainAxis:c=!0,crossAxis:o=!0}=Ue(e,t),i={x:n,y:r},u=Fe(a),l=Ho(u);let p=i[l],h=i[u];const m=Ue(d,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const b=l==="y"?"height":"width",w=s.reference[l]-s.floating[b]+v.mainAxis,_=s.reference[l]+s.reference[b]-v.mainAxis;p<w?p=w:p>_&&(p=_)}if(o){var g,x;const b=l==="y"?"width":"height",w=Nc.has(qe(a)),_=s.reference[u]-s.floating[b]+(w&&((g=f.offset)==null?void 0:g[u])||0)+(w?0:v.crossAxis),P=s.reference[u]+s.reference[b]+(w?0:((x=f.offset)==null?void 0:x[u])||0)-(w?v.crossAxis:0);h<_?h=_:h>P&&(h=P)}return{[l]:p,[u]:h}}}},Kp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:s,platform:f,elements:d}=t,{apply:c=()=>{},...o}=Ue(e,t),i=await f.detectOverflow(t,o),u=qe(a),l=Ct(a),p=Fe(a)==="y",{width:h,height:m}=s.floating;let v,g;u==="top"||u==="bottom"?(v=u,g=l===(await(f.isRTL==null?void 0:f.isRTL(d.floating))?"start":"end")?"left":"right"):(g=u,v=l==="end"?"top":"bottom");const x=m-i.top-i.bottom,b=h-i.left-i.right,w=Xe(m-i[v],x),_=Xe(h-i[g],b),P=!t.middlewareData.shift;let C=w,j=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=x),P&&!l){const T=ye(i.left,0),M=ye(i.right,0),D=ye(i.top,0),F=ye(i.bottom,0);p?j=h-2*(T!==0||M!==0?T+M:ye(i.left,i.right)):C=m-2*(D!==0||F!==0?D+F:ye(i.top,i.bottom))}await c({...t,availableWidth:j,availableHeight:C});const O=await f.getDimensions(d.floating);return h!==O.width||m!==O.height?{reset:{rects:!0}}:{}}}};function Or(){return typeof window<"u"}function Ot(e){return Dc(e)?(e.nodeName||"").toLowerCase():"#document"}function Ee(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ge(e){var t;return(t=(Dc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Dc(e){return Or()?e instanceof Node||e instanceof Ee(e).Node:!1}function Te(e){return Or()?e instanceof Element||e instanceof Ee(e).Element:!1}function Be(e){return Or()?e instanceof HTMLElement||e instanceof Ee(e).HTMLElement:!1}function Qi(e){return!Or()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ee(e).ShadowRoot}const Xp=new Set(["inline","contents"]);function Yt(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Ie(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Xp.has(a)}const Yp=new Set(["table","td","th"]);function Qp(e){return Yp.has(Ot(e))}const Zp=[":popover-open",":modal"];function Pr(e){return Zp.some(t=>{try{return e.matches(t)}catch{return!1}})}const Jp=["transform","translate","scale","rotate","perspective"],eh=["transform","translate","scale","rotate","perspective","filter"],th=["paint","layout","strict","content"];function Xo(e){const t=Yo(),n=Te(e)?Ie(e):e;return Jp.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||eh.some(r=>(n.willChange||"").includes(r))||th.some(r=>(n.contain||"").includes(r))}function nh(e){let t=Ye(e);for(;Be(t)&&!wt(t);){if(Xo(t))return t;if(Pr(t))return null;t=Ye(t)}return null}function Yo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const rh=new Set(["html","body","#document"]);function wt(e){return rh.has(Ot(e))}function Ie(e){return Ee(e).getComputedStyle(e)}function Ar(e){return Te(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ye(e){if(Ot(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Qi(e)&&e.host||Ge(e);return Qi(t)?t.host:t}function kc(e){const t=Ye(e);return wt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Be(t)&&Yt(t)?t:kc(t)}function Bt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=kc(e),s=a===((r=e.ownerDocument)==null?void 0:r.body),f=Ee(a);if(s){const d=xo(f);return t.concat(f,f.visualViewport||[],Yt(a)?a:[],d&&n?Bt(d):[])}return t.concat(a,Bt(a,[],n))}function xo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lc(e){const t=Ie(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Be(e),s=a?e.offsetWidth:n,f=a?e.offsetHeight:r,d=sr(n)!==s||sr(r)!==f;return d&&(n=s,r=f),{width:n,height:r,$:d}}function Qo(e){return Te(e)?e:e.contextElement}function bt(e){const t=Qo(e);if(!Be(t))return $e(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:s}=Lc(t);let f=(s?sr(n.width):n.width)/r,d=(s?sr(n.height):n.height)/a;return(!f||!Number.isFinite(f))&&(f=1),(!d||!Number.isFinite(d))&&(d=1),{x:f,y:d}}const oh=$e(0);function Fc(e){const t=Ee(e);return!Yo()||!t.visualViewport?oh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ih(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ee(e)?!1:t}function it(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=Qo(e);let f=$e(1);t&&(r?Te(r)&&(f=bt(r)):f=bt(e));const d=ih(s,n,r)?Fc(s):$e(0);let c=(a.left+d.x)/f.x,o=(a.top+d.y)/f.y,i=a.width/f.x,u=a.height/f.y;if(s){const l=Ee(s),p=r&&Te(r)?Ee(r):r;let h=l,m=xo(h);for(;m&&r&&p!==h;){const v=bt(m),g=m.getBoundingClientRect(),x=Ie(m),b=g.left+(m.clientLeft+parseFloat(x.paddingLeft))*v.x,w=g.top+(m.clientTop+parseFloat(x.paddingTop))*v.y;c*=v.x,o*=v.y,i*=v.x,u*=v.y,c+=b,o+=w,h=Ee(m),m=xo(h)}}return ur({width:i,height:u,x:c,y:o})}function jr(e,t){const n=Ar(e).scrollLeft;return t?t.left+n:it(Ge(e)).left+n}function $c(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-jr(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function ah(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const s=a==="fixed",f=Ge(r),d=t?Pr(t.floating):!1;if(r===f||d&&s)return n;let c={scrollLeft:0,scrollTop:0},o=$e(1);const i=$e(0),u=Be(r);if((u||!u&&!s)&&((Ot(r)!=="body"||Yt(f))&&(c=Ar(r)),Be(r))){const p=it(r);o=bt(r),i.x=p.x+r.clientLeft,i.y=p.y+r.clientTop}const l=f&&!u&&!s?$c(f,c):$e(0);return{width:n.width*o.x,height:n.height*o.y,x:n.x*o.x-c.scrollLeft*o.x+i.x+l.x,y:n.y*o.y-c.scrollTop*o.y+i.y+l.y}}function sh(e){return Array.from(e.getClientRects())}function ch(e){const t=Ge(e),n=Ar(e),r=e.ownerDocument.body,a=ye(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=ye(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let f=-n.scrollLeft+jr(e);const d=-n.scrollTop;return Ie(r).direction==="rtl"&&(f+=ye(t.clientWidth,r.clientWidth)-a),{width:a,height:s,x:f,y:d}}const Zi=25;function uh(e,t){const n=Ee(e),r=Ge(e),a=n.visualViewport;let s=r.clientWidth,f=r.clientHeight,d=0,c=0;if(a){s=a.width,f=a.height;const i=Yo();(!i||i&&t==="fixed")&&(d=a.offsetLeft,c=a.offsetTop)}const o=jr(r);if(o<=0){const i=r.ownerDocument,u=i.body,l=getComputedStyle(u),p=i.compatMode==="CSS1Compat"&&parseFloat(l.marginLeft)+parseFloat(l.marginRight)||0,h=Math.abs(r.clientWidth-u.clientWidth-p);h<=Zi&&(s-=h)}else o<=Zi&&(s+=o);return{width:s,height:f,x:d,y:c}}const lh=new Set(["absolute","fixed"]);function fh(e,t){const n=it(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,s=Be(e)?bt(e):$e(1),f=e.clientWidth*s.x,d=e.clientHeight*s.y,c=a*s.x,o=r*s.y;return{width:f,height:d,x:c,y:o}}function Ji(e,t,n){let r;if(t==="viewport")r=uh(e,n);else if(t==="document")r=ch(Ge(e));else if(Te(t))r=fh(t,n);else{const a=Fc(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return ur(r)}function Bc(e,t){const n=Ye(e);return n===t||!Te(n)||wt(n)?!1:Ie(n).position==="fixed"||Bc(n,t)}function dh(e,t){const n=t.get(e);if(n)return n;let r=Bt(e,[],!1).filter(d=>Te(d)&&Ot(d)!=="body"),a=null;const s=Ie(e).position==="fixed";let f=s?Ye(e):e;for(;Te(f)&&!wt(f);){const d=Ie(f),c=Xo(f);!c&&d.position==="fixed"&&(a=null),(s?!c&&!a:!c&&d.position==="static"&&!!a&&lh.has(a.position)||Yt(f)&&!c&&Bc(e,f))?r=r.filter(i=>i!==f):a=d,f=Ye(f)}return t.set(e,r),r}function ph(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const f=[...n==="clippingAncestors"?Pr(t)?[]:dh(t,this._c):[].concat(n),r],d=f[0],c=f.reduce((o,i)=>{const u=Ji(t,i,a);return o.top=ye(u.top,o.top),o.right=Xe(u.right,o.right),o.bottom=Xe(u.bottom,o.bottom),o.left=ye(u.left,o.left),o},Ji(t,d,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function hh(e){const{width:t,height:n}=Lc(e);return{width:t,height:n}}function mh(e,t,n){const r=Be(t),a=Ge(t),s=n==="fixed",f=it(e,!0,s,t);let d={scrollLeft:0,scrollTop:0};const c=$e(0);function o(){c.x=jr(a)}if(r||!r&&!s)if((Ot(t)!=="body"||Yt(a))&&(d=Ar(t)),r){const p=it(t,!0,s,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else a&&o();s&&!r&&a&&o();const i=a&&!r&&!s?$c(a,d):$e(0),u=f.left+d.scrollLeft-c.x-i.x,l=f.top+d.scrollTop-c.y-i.y;return{x:u,y:l,width:f.width,height:f.height}}function to(e){return Ie(e).position==="static"}function ea(e,t){if(!Be(e)||Ie(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ge(e)===n&&(n=n.ownerDocument.body),n}function Gc(e,t){const n=Ee(e);if(Pr(e))return n;if(!Be(e)){let a=Ye(e);for(;a&&!wt(a);){if(Te(a)&&!to(a))return a;a=Ye(a)}return n}let r=ea(e,t);for(;r&&Qp(r)&&to(r);)r=ea(r,t);return r&&wt(r)&&to(r)&&!Xo(r)?n:r||nh(e)||n}const vh=async function(e){const t=this.getOffsetParent||Gc,n=this.getDimensions,r=await n(e.floating);return{reference:mh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gh(e){return Ie(e).direction==="rtl"}const xh={convertOffsetParentRelativeRectToViewportRelativeRect:ah,getDocumentElement:Ge,getClippingRect:ph,getOffsetParent:Gc,getElementRects:vh,getClientRects:sh,getDimensions:hh,getScale:bt,isElement:Te,isRTL:gh};function Vc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yh(e,t){let n=null,r;const a=Ge(e);function s(){var d;clearTimeout(r),(d=n)==null||d.disconnect(),n=null}function f(d,c){d===void 0&&(d=!1),c===void 0&&(c=1),s();const o=e.getBoundingClientRect(),{left:i,top:u,width:l,height:p}=o;if(d||t(),!l||!p)return;const h=vn(u),m=vn(a.clientWidth-(i+l)),v=vn(a.clientHeight-(u+p)),g=vn(i),b={rootMargin:-h+"px "+-m+"px "+-v+"px "+-g+"px",threshold:ye(0,Xe(1,c))||1};let w=!0;function _(P){const C=P[0].intersectionRatio;if(C!==c){if(!w)return f();C?f(!1,C):r=setTimeout(()=>{f(!1,1e-7)},1e3)}C===1&&!Vc(o,e.getBoundingClientRect())&&f(),w=!1}try{n=new IntersectionObserver(_,{...b,root:a.ownerDocument})}catch{n=new IntersectionObserver(_,b)}n.observe(e)}return f(!0),s}function Eh(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,o=Qo(e),i=a||s?[...o?Bt(o):[],...Bt(t)]:[];i.forEach(g=>{a&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const u=o&&d?yh(o,n):null;let l=-1,p=null;f&&(p=new ResizeObserver(g=>{let[x]=g;x&&x.target===o&&p&&(p.unobserve(t),cancelAnimationFrame(l),l=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),o&&!c&&p.observe(o),p.observe(t));let h,m=c?it(e):null;c&&v();function v(){const g=it(e);m&&!Vc(m,g)&&n(),m=g,h=requestAnimationFrame(v)}return n(),()=>{var g;i.forEach(x=>{a&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),u==null||u(),(g=p)==null||g.disconnect(),p=null,c&&cancelAnimationFrame(h)}}const bh=qp,wh=Hp,_h=Vp,Rh=Kp,Sh=zp,ta=Gp,Ch=Wp,Oh=(e,t,n)=>{const r=new Map,a={platform:xh,...n},s={...a.platform,_c:r};return Bp(e,t,{...a,platform:s})};var Ph=typeof document<"u",Ah=function(){},or=Ph?S.useLayoutEffect:Ah;function lr(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 n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!lr(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const s=a[r];if(!(s==="_owner"&&e.$$typeof)&&!lr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function zc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function na(e,t){const n=zc(e);return Math.round(t*n)/n}function no(e){const t=E.useRef(e);return or(()=>{t.current=e}),t}function jh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:s,floating:f}={},transform:d=!0,whileElementsMounted:c,open:o}=e,[i,u]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[l,p]=E.useState(r);lr(l,r)||p(r);const[h,m]=E.useState(null),[v,g]=E.useState(null),x=E.useCallback(V=>{V!==P.current&&(P.current=V,m(V))},[]),b=E.useCallback(V=>{V!==C.current&&(C.current=V,g(V))},[]),w=s||h,_=f||v,P=E.useRef(null),C=E.useRef(null),j=E.useRef(i),O=c!=null,T=no(c),M=no(a),D=no(o),F=E.useCallback(()=>{if(!P.current||!C.current)return;const V={placement:t,strategy:n,middleware:l};M.current&&(V.platform=M.current),Oh(P.current,C.current,V).then(L=>{const A={...L,isPositioned:D.current!==!1};k.current&&!lr(j.current,A)&&(j.current=A,gr.flushSync(()=>{u(A)}))})},[l,t,n,M,D]);or(()=>{o===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,u(V=>({...V,isPositioned:!1})))},[o]);const k=E.useRef(!1);or(()=>(k.current=!0,()=>{k.current=!1}),[]),or(()=>{if(w&&(P.current=w),_&&(C.current=_),w&&_){if(T.current)return T.current(w,_,F);F()}},[w,_,F,T,O]);const U=E.useMemo(()=>({reference:P,floating:C,setReference:x,setFloating:b}),[x,b]),$=E.useMemo(()=>({reference:w,floating:_}),[w,_]),Y=E.useMemo(()=>{const V={position:n,left:0,top:0};if(!$.floating)return V;const L=na($.floating,i.x),A=na($.floating,i.y);return d?{...V,transform:"translate("+L+"px, "+A+"px)",...zc($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:A}},[n,d,$.floating,i.x,i.y]);return E.useMemo(()=>({...i,update:F,refs:U,elements:$,floatingStyles:Y}),[i,F,U,$,Y])}const Mh=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?ta({element:r.current,padding:a}).fn(n):{}:r?ta({element:r,padding:a}).fn(n):{}}}},Th=(e,t)=>({...bh(e),options:[e,t]}),Ih=(e,t)=>({...wh(e),options:[e,t]}),Nh=(e,t)=>({...Ch(e),options:[e,t]}),Dh=(e,t)=>({..._h(e),options:[e,t]}),kh=(e,t)=>({...Rh(e),options:[e,t]}),Lh=(e,t)=>({...Sh(e),options:[e,t]}),Fh=(e,t)=>({...Mh(e),options:[e,t]});var $h="Arrow",Uc=E.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...s}=e;return y.jsxRuntimeExports.jsx(ee.svg,{...s,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:y.jsxRuntimeExports.jsx("polygon",{points:"0,0 30,0 15,10"})})});Uc.displayName=$h;var Bh=Uc,Zo="Popper",[qc,Qt]=we(Zo),[Gh,Hc]=qc(Zo),Wc=e=>{const{__scopePopper:t,children:n}=e,[r,a]=E.useState(null);return y.jsxRuntimeExports.jsx(Gh,{scope:t,anchor:r,onAnchorChange:a,children:n})};Wc.displayName=Zo;var Kc="PopperAnchor",Xc=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,s=Hc(Kc,n),f=E.useRef(null),d=oe(t,f),c=E.useRef(null);return E.useEffect(()=>{const o=c.current;c.current=(r==null?void 0:r.current)||f.current,o!==c.current&&s.onAnchorChange(c.current)}),r?null:y.jsxRuntimeExports.jsx(ee.div,{...a,ref:d})});Xc.displayName=Kc;var Jo="PopperContent",[Vh,zh]=qc(Jo),Yc=E.forwardRef((e,t)=>{var I,B,H,G,q,R;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:s="center",alignOffset:f=0,arrowPadding:d=0,avoidCollisions:c=!0,collisionBoundary:o=[],collisionPadding:i=0,sticky:u="partial",hideWhenDetached:l=!1,updatePositionStrategy:p="optimized",onPlaced:h,...m}=e,v=Hc(Jo,n),[g,x]=E.useState(null),b=oe(t,Z=>x(Z)),[w,_]=E.useState(null),P=Uo(w),C=(P==null?void 0:P.width)??0,j=(P==null?void 0:P.height)??0,O=r+(s!=="center"?"-"+s:""),T=typeof i=="number"?i:{top:0,right:0,bottom:0,left:0,...i},M=Array.isArray(o)?o:[o],D=M.length>0,F={padding:T,boundary:M.filter(qh),altBoundary:D},{refs:k,floatingStyles:U,placement:$,isPositioned:Y,middlewareData:V}=jh({strategy:"fixed",placement:O,whileElementsMounted:(...Z)=>Eh(...Z,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[Th({mainAxis:a+j,alignmentAxis:f}),c&&Ih({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Nh():void 0,...F}),c&&Dh({...F}),kh({...F,apply:({elements:Z,rects:re,availableWidth:se,availableHeight:de})=>{const{width:pe,height:Ve}=re.reference,ve=Z.floating.style;ve.setProperty("--radix-popper-available-width",`${se}px`),ve.setProperty("--radix-popper-available-height",`${de}px`),ve.setProperty("--radix-popper-anchor-width",`${pe}px`),ve.setProperty("--radix-popper-anchor-height",`${Ve}px`)}}),w&&Fh({element:w,padding:d}),Hh({arrowWidth:C,arrowHeight:j}),l&&Lh({strategy:"referenceHidden",...F})]}),[L,A]=Jc($),N=Me(h);fe(()=>{Y&&(N==null||N())},[Y,N]);const z=(I=V.arrow)==null?void 0:I.x,X=(B=V.arrow)==null?void 0:B.y,W=((H=V.arrow)==null?void 0:H.centerOffset)!==0,[te,Q]=E.useState();return fe(()=>{g&&Q(window.getComputedStyle(g).zIndex)},[g]),y.jsxRuntimeExports.jsx("div",{ref:k.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:Y?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[(G=V.transformOrigin)==null?void 0:G.x,(q=V.transformOrigin)==null?void 0:q.y].join(" "),...((R=V.hide)==null?void 0:R.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:y.jsxRuntimeExports.jsx(Vh,{scope:n,placedSide:L,onArrowChange:_,arrowX:z,arrowY:X,shouldHideArrow:W,children:y.jsxRuntimeExports.jsx(ee.div,{"data-side":L,"data-align":A,...m,ref:b,style:{...m.style,animation:Y?void 0:"none"}})})})});Yc.displayName=Jo;var Qc="PopperArrow",Uh={top:"bottom",right:"left",bottom:"top",left:"right"},Zc=E.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,s=zh(Qc,r),f=Uh[s.placedSide];return y.jsxRuntimeExports.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:y.jsxRuntimeExports.jsx(Bh,{...a,ref:n,style:{...a.style,display:"block"}})})});Zc.displayName=Qc;function qh(e){return e!==null}var Hh=e=>({name:"transformOrigin",options:e,fn(t){var v,g,x;const{placement:n,rects:r,middlewareData:a}=t,f=((v=a.arrow)==null?void 0:v.centerOffset)!==0,d=f?0:e.arrowWidth,c=f?0:e.arrowHeight,[o,i]=Jc(n),u={start:"0%",center:"50%",end:"100%"}[i],l=(((g=a.arrow)==null?void 0:g.x)??0)+d/2,p=(((x=a.arrow)==null?void 0:x.y)??0)+c/2;let h="",m="";return o==="bottom"?(h=f?u:`${l}px`,m=`${-c}px`):o==="top"?(h=f?u:`${l}px`,m=`${r.floating.height+c}px`):o==="right"?(h=`${-c}px`,m=f?u:`${p}px`):o==="left"&&(h=`${r.floating.width+c}px`,m=f?u:`${p}px`),{data:{x:h,y:m}}}});function Jc(e){const[t,n="center"]=e.split("-");return[t,n]}var ei=Wc,ti=Xc,ni=Yc,ri=Zc,ro="rovingFocusGroup.onEntryFocus",Wh={bubbles:!1,cancelable:!0},Zt="RovingFocusGroup",[yo,eu,Kh]=Ht(Zt),[Xh,Jt]=we(Zt,[Kh]),[Yh,Qh]=Xh(Zt),tu=E.forwardRef((e,t)=>y.jsxRuntimeExports.jsx(yo.Provider,{scope:e.__scopeRovingFocusGroup,children:y.jsxRuntimeExports.jsx(yo.Slot,{scope:e.__scopeRovingFocusGroup,children:y.jsxRuntimeExports.jsx(Zh,{...e,ref:t})})}));tu.displayName=Zt;var Zh=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:s,currentTabStopId:f,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:c,onEntryFocus:o,preventScrollOnEntryFocus:i=!1,...u}=e,l=E.useRef(null),p=oe(t,l),h=Rt(s),[m,v]=be({prop:f,defaultProp:d??null,onChange:c,caller:Zt}),[g,x]=E.useState(!1),b=Me(o),w=eu(n),_=E.useRef(!1),[P,C]=E.useState(0);return E.useEffect(()=>{const j=l.current;if(j)return j.addEventListener(ro,b),()=>j.removeEventListener(ro,b)},[b]),y.jsxRuntimeExports.jsx(Yh,{scope:n,orientation:r,dir:h,loop:a,currentTabStopId:m,onItemFocus:E.useCallback(j=>v(j),[v]),onItemShiftTab:E.useCallback(()=>x(!0),[]),onFocusableItemAdd:E.useCallback(()=>C(j=>j+1),[]),onFocusableItemRemove:E.useCallback(()=>C(j=>j-1),[]),children:y.jsxRuntimeExports.jsx(ee.div,{tabIndex:g||P===0?-1:0,"data-orientation":r,...u,ref:p,style:{outline:"none",...e.style},onMouseDown:K(e.onMouseDown,()=>{_.current=!0}),onFocus:K(e.onFocus,j=>{const O=!_.current;if(j.target===j.currentTarget&&O&&!g){const T=new CustomEvent(ro,Wh);if(j.currentTarget.dispatchEvent(T),!T.defaultPrevented){const M=w().filter($=>$.focusable),D=M.find($=>$.active),F=M.find($=>$.id===m),U=[D,F,...M].filter(Boolean).map($=>$.ref.current);ou(U,i)}}_.current=!1}),onBlur:K(e.onBlur,()=>x(!1))})})}),nu="RovingFocusGroupItem",ru=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:s,children:f,...d}=e,c=Ce(),o=s||c,i=Qh(nu,n),u=i.currentTabStopId===o,l=eu(n),{onFocusableItemAdd:p,onFocusableItemRemove:h,currentTabStopId:m}=i;return E.useEffect(()=>{if(r)return p(),()=>h()},[r,p,h]),y.jsxRuntimeExports.jsx(yo.ItemSlot,{scope:n,id:o,focusable:r,active:a,children:y.jsxRuntimeExports.jsx(ee.span,{tabIndex:u?0:-1,"data-orientation":i.orientation,...d,ref:t,onMouseDown:K(e.onMouseDown,v=>{r?i.onItemFocus(o):v.preventDefault()}),onFocus:K(e.onFocus,()=>i.onItemFocus(o)),onKeyDown:K(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){i.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const g=tm(v,i.orientation,i.dir);if(g!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let b=l().filter(w=>w.focusable).map(w=>w.ref.current);if(g==="last")b.reverse();else if(g==="prev"||g==="next"){g==="prev"&&b.reverse();const w=b.indexOf(v.currentTarget);b=i.loop?nm(b,w+1):b.slice(w+1)}setTimeout(()=>ou(b))}}),children:typeof f=="function"?f({isCurrentTabStop:u,hasTabStop:m!=null}):f})})});ru.displayName=nu;var Jh={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function em(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function tm(e,t,n){const r=em(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Jh[r]}function ou(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function nm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var oi=tu,ii=ru,Eo=["Enter"," "],rm=["ArrowDown","PageUp","Home"],iu=["ArrowUp","PageDown","End"],om=[...rm,...iu],im={ltr:[...Eo,"ArrowRight"],rtl:[...Eo,"ArrowLeft"]},am={ltr:["ArrowLeft"],rtl:["ArrowRight"]},en="Menu",[Gt,sm,cm]=Ht(en),[lt,au]=we(en,[cm,Qt,Jt]),Mr=Qt(),su=Jt(),[um,ft]=lt(en),[lm,tn]=lt(en),cu=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:s,modal:f=!0}=e,d=Mr(t),[c,o]=E.useState(null),i=E.useRef(!1),u=Me(s),l=Rt(a);return E.useEffect(()=>{const p=()=>{i.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>i.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),y.jsxRuntimeExports.jsx(ei,{...d,children:y.jsxRuntimeExports.jsx(um,{scope:t,open:n,onOpenChange:u,content:c,onContentChange:o,children:y.jsxRuntimeExports.jsx(lm,{scope:t,onClose:E.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:i,dir:l,modal:f,children:r})})})};cu.displayName=en;var fm="MenuAnchor",ai=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=Mr(n);return y.jsxRuntimeExports.jsx(ti,{...a,...r,ref:t})});ai.displayName=fm;var si="MenuPortal",[dm,uu]=lt(si,{forceMount:void 0}),lu=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,s=ft(si,t);return y.jsxRuntimeExports.jsx(dm,{scope:t,forceMount:n,children:y.jsxRuntimeExports.jsx(Ne,{present:n||s.open,children:y.jsxRuntimeExports.jsx(St,{asChild:!0,container:a,children:r})})})};lu.displayName=si;var Oe="MenuContent",[pm,ci]=lt(Oe),fu=E.forwardRef((e,t)=>{const n=uu(Oe,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,s=ft(Oe,e.__scopeMenu),f=tn(Oe,e.__scopeMenu);return y.jsxRuntimeExports.jsx(Gt.Provider,{scope:e.__scopeMenu,children:y.jsxRuntimeExports.jsx(Ne,{present:r||s.open,children:y.jsxRuntimeExports.jsx(Gt.Slot,{scope:e.__scopeMenu,children:f.modal?y.jsxRuntimeExports.jsx(hm,{...a,ref:t}):y.jsxRuntimeExports.jsx(mm,{...a,ref:t})})})})}),hm=E.forwardRef((e,t)=>{const n=ft(Oe,e.__scopeMenu),r=E.useRef(null),a=oe(t,r);return E.useEffect(()=>{const s=r.current;if(s)return Rr(s)},[]),y.jsxRuntimeExports.jsx(ui,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:K(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),mm=E.forwardRef((e,t)=>{const n=ft(Oe,e.__scopeMenu);return y.jsxRuntimeExports.jsx(ui,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),vm=Ke("MenuContent.ScrollLock"),ui=E.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:f,disableOutsidePointerEvents:d,onEntryFocus:c,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:u,onInteractOutside:l,onDismiss:p,disableOutsideScroll:h,...m}=e,v=ft(Oe,n),g=tn(Oe,n),x=Mr(n),b=su(n),w=sm(n),[_,P]=E.useState(null),C=E.useRef(null),j=oe(t,C,v.onContentChange),O=E.useRef(0),T=E.useRef(""),M=E.useRef(0),D=E.useRef(null),F=E.useRef("right"),k=E.useRef(0),U=h?Xt:E.Fragment,$=h?{as:vm,allowPinchZoom:!0}:void 0,Y=L=>{var I,B;const A=T.current+L,N=w().filter(H=>!H.disabled),z=document.activeElement,X=(I=N.find(H=>H.ref.current===z))==null?void 0:I.textValue,W=N.map(H=>H.textValue),te=Pm(W,A,X),Q=(B=N.find(H=>H.textValue===te))==null?void 0:B.ref.current;(function H(G){T.current=G,window.clearTimeout(O.current),G!==""&&(O.current=window.setTimeout(()=>H(""),1e3))})(A),Q&&setTimeout(()=>Q.focus())};E.useEffect(()=>()=>window.clearTimeout(O.current),[]),wr();const V=E.useCallback(L=>{var N,z;return F.current===((N=D.current)==null?void 0:N.side)&&jm(L,(z=D.current)==null?void 0:z.area)},[]);return y.jsxRuntimeExports.jsx(pm,{scope:n,searchRef:T,onItemEnter:E.useCallback(L=>{V(L)&&L.preventDefault()},[V]),onItemLeave:E.useCallback(L=>{var A;V(L)||((A=C.current)==null||A.focus(),P(null))},[V]),onTriggerLeave:E.useCallback(L=>{V(L)&&L.preventDefault()},[V]),pointerGraceTimerRef:M,onPointerGraceIntentChange:E.useCallback(L=>{D.current=L},[]),children:y.jsxRuntimeExports.jsx(U,{...$,children:y.jsxRuntimeExports.jsx(Kt,{asChild:!0,trapped:a,onMountAutoFocus:K(s,L=>{var A;L.preventDefault(),(A=C.current)==null||A.focus({preventScroll:!0})}),onUnmountAutoFocus:f,children:y.jsxRuntimeExports.jsx(Wt,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:u,onInteractOutside:l,onDismiss:p,children:y.jsxRuntimeExports.jsx(oi,{asChild:!0,...b,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:_,onCurrentTabStopIdChange:P,onEntryFocus:K(c,L=>{g.isUsingKeyboardRef.current||L.preventDefault()}),preventScrollOnEntryFocus:!0,children:y.jsxRuntimeExports.jsx(ni,{role:"menu","aria-orientation":"vertical","data-state":Ou(v.open),"data-radix-menu-content":"",dir:g.dir,...x,...m,ref:j,style:{outline:"none",...m.style},onKeyDown:K(m.onKeyDown,L=>{const N=L.target.closest("[data-radix-menu-content]")===L.currentTarget,z=L.ctrlKey||L.altKey||L.metaKey,X=L.key.length===1;N&&(L.key==="Tab"&&L.preventDefault(),!z&&X&&Y(L.key));const W=C.current;if(L.target!==W||!om.includes(L.key))return;L.preventDefault();const Q=w().filter(I=>!I.disabled).map(I=>I.ref.current);iu.includes(L.key)&&Q.reverse(),Cm(Q)}),onBlur:K(e.onBlur,L=>{L.currentTarget.contains(L.target)||(window.clearTimeout(O.current),T.current="")}),onPointerMove:K(e.onPointerMove,Vt(L=>{const A=L.target,N=k.current!==L.clientX;if(L.currentTarget.contains(A)&&N){const z=L.clientX>k.current?"right":"left";F.current=z,k.current=L.clientX}}))})})})})})})});fu.displayName=Oe;var gm="MenuGroup",li=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return y.jsxRuntimeExports.jsx(ee.div,{role:"group",...r,ref:t})});li.displayName=gm;var xm="MenuLabel",du=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return y.jsxRuntimeExports.jsx(ee.div,{...r,ref:t})});du.displayName=xm;var fr="MenuItem",ra="menu.itemSelect",Tr=E.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,s=E.useRef(null),f=tn(fr,e.__scopeMenu),d=ci(fr,e.__scopeMenu),c=oe(t,s),o=E.useRef(!1),i=()=>{const u=s.current;if(!n&&u){const l=new CustomEvent(ra,{bubbles:!0,cancelable:!0});u.addEventListener(ra,p=>r==null?void 0:r(p),{once:!0}),js(u,l),l.defaultPrevented?o.current=!1:f.onClose()}};return y.jsxRuntimeExports.jsx(pu,{...a,ref:c,disabled:n,onClick:K(e.onClick,i),onPointerDown:u=>{var l;(l=e.onPointerDown)==null||l.call(e,u),o.current=!0},onPointerUp:K(e.onPointerUp,u=>{var l;o.current||(l=u.currentTarget)==null||l.click()}),onKeyDown:K(e.onKeyDown,u=>{const l=d.searchRef.current!=="";n||l&&u.key===" "||Eo.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});Tr.displayName=fr;var pu=E.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...s}=e,f=ci(fr,n),d=su(n),c=E.useRef(null),o=oe(t,c),[i,u]=E.useState(!1),[l,p]=E.useState("");return E.useEffect(()=>{const h=c.current;h&&p((h.textContent??"").trim())},[s.children]),y.jsxRuntimeExports.jsx(Gt.ItemSlot,{scope:n,disabled:r,textValue:a??l,children:y.jsxRuntimeExports.jsx(ii,{asChild:!0,...d,focusable:!r,children:y.jsxRuntimeExports.jsx(ee.div,{role:"menuitem","data-highlighted":i?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:o,onPointerMove:K(e.onPointerMove,Vt(h=>{r?f.onItemLeave(h):(f.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:K(e.onPointerLeave,Vt(h=>f.onItemLeave(h))),onFocus:K(e.onFocus,()=>u(!0)),onBlur:K(e.onBlur,()=>u(!1))})})})}),ym="MenuCheckboxItem",hu=E.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return y.jsxRuntimeExports.jsx(yu,{scope:e.__scopeMenu,checked:n,children:y.jsxRuntimeExports.jsx(Tr,{role:"menuitemcheckbox","aria-checked":dr(n)?"mixed":n,...a,ref:t,"data-state":di(n),onSelect:K(a.onSelect,()=>r==null?void 0:r(dr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});hu.displayName=ym;var mu="MenuRadioGroup",[Em,bm]=lt(mu,{value:void 0,onValueChange:()=>{}}),vu=E.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,s=Me(r);return y.jsxRuntimeExports.jsx(Em,{scope:e.__scopeMenu,value:n,onValueChange:s,children:y.jsxRuntimeExports.jsx(li,{...a,ref:t})})});vu.displayName=mu;var gu="MenuRadioItem",xu=E.forwardRef((e,t)=>{const{value:n,...r}=e,a=bm(gu,e.__scopeMenu),s=n===a.value;return y.jsxRuntimeExports.jsx(yu,{scope:e.__scopeMenu,checked:s,children:y.jsxRuntimeExports.jsx(Tr,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":di(s),onSelect:K(r.onSelect,()=>{var f;return(f=a.onValueChange)==null?void 0:f.call(a,n)},{checkForDefaultPrevented:!1})})})});xu.displayName=gu;var fi="MenuItemIndicator",[yu,wm]=lt(fi,{checked:!1}),Eu=E.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,s=wm(fi,n);return y.jsxRuntimeExports.jsx(Ne,{present:r||dr(s.checked)||s.checked===!0,children:y.jsxRuntimeExports.jsx(ee.span,{...a,ref:t,"data-state":di(s.checked)})})});Eu.displayName=fi;var _m="MenuSeparator",bu=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return y.jsxRuntimeExports.jsx(ee.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});bu.displayName=_m;var Rm="MenuArrow",wu=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=Mr(n);return y.jsxRuntimeExports.jsx(ri,{...a,...r,ref:t})});wu.displayName=Rm;var Sm="MenuSub",[m1,_u]=lt(Sm),kt="MenuSubTrigger",Ru=E.forwardRef((e,t)=>{const n=ft(kt,e.__scopeMenu),r=tn(kt,e.__scopeMenu),a=_u(kt,e.__scopeMenu),s=ci(kt,e.__scopeMenu),f=E.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:c}=s,o={__scopeMenu:e.__scopeMenu},i=E.useCallback(()=>{f.current&&window.clearTimeout(f.current),f.current=null},[]);return E.useEffect(()=>i,[i]),E.useEffect(()=>{const u=d.current;return()=>{window.clearTimeout(u),c(null)}},[d,c]),y.jsxRuntimeExports.jsx(ai,{asChild:!0,...o,children:y.jsxRuntimeExports.jsx(pu,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":Ou(n.open),...e,ref:xr(t,a.onTriggerChange),onClick:u=>{var l;(l=e.onClick)==null||l.call(e,u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:K(e.onPointerMove,Vt(u=>{s.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!f.current&&(s.onPointerGraceIntentChange(null),f.current=window.setTimeout(()=>{n.onOpenChange(!0),i()},100))})),onPointerLeave:K(e.onPointerLeave,Vt(u=>{var p,h;i();const l=(p=n.content)==null?void 0:p.getBoundingClientRect();if(l){const m=(h=n.content)==null?void 0:h.dataset.side,v=m==="right",g=v?-5:5,x=l[v?"left":"right"],b=l[v?"right":"left"];s.onPointerGraceIntentChange({area:[{x:u.clientX+g,y:u.clientY},{x,y:l.top},{x:b,y:l.top},{x:b,y:l.bottom},{x,y:l.bottom}],side:m}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(u),u.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:K(e.onKeyDown,u=>{var p;const l=s.searchRef.current!=="";e.disabled||l&&u.key===" "||im[r.dir].includes(u.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),u.preventDefault())})})})});Ru.displayName=kt;var Su="MenuSubContent",Cu=E.forwardRef((e,t)=>{const n=uu(Oe,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,s=ft(Oe,e.__scopeMenu),f=tn(Oe,e.__scopeMenu),d=_u(Su,e.__scopeMenu),c=E.useRef(null),o=oe(t,c);return y.jsxRuntimeExports.jsx(Gt.Provider,{scope:e.__scopeMenu,children:y.jsxRuntimeExports.jsx(Ne,{present:r||s.open,children:y.jsxRuntimeExports.jsx(Gt.Slot,{scope:e.__scopeMenu,children:y.jsxRuntimeExports.jsx(ui,{id:d.contentId,"aria-labelledby":d.triggerId,...a,ref:o,align:"start",side:f.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:i=>{var u;f.isUsingKeyboardRef.current&&((u=c.current)==null||u.focus()),i.preventDefault()},onCloseAutoFocus:i=>i.preventDefault(),onFocusOutside:K(e.onFocusOutside,i=>{i.target!==d.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:K(e.onEscapeKeyDown,i=>{f.onClose(),i.preventDefault()}),onKeyDown:K(e.onKeyDown,i=>{var p;const u=i.currentTarget.contains(i.target),l=am[f.dir].includes(i.key);u&&l&&(s.onOpenChange(!1),(p=d.trigger)==null||p.focus(),i.preventDefault())})})})})})});Cu.displayName=Su;function Ou(e){return e?"open":"closed"}function dr(e){return e==="indeterminate"}function di(e){return dr(e)?"indeterminate":e?"checked":"unchecked"}function Cm(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Om(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Pm(e,t,n){const a=t.length>1&&Array.from(t).every(o=>o===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let f=Om(e,Math.max(s,0));a.length===1&&(f=f.filter(o=>o!==n));const c=f.find(o=>o.toLowerCase().startsWith(a.toLowerCase()));return c!==n?c:void 0}function Am(e,t){const{x:n,y:r}=e;let a=!1;for(let s=0,f=t.length-1;s<t.length;f=s++){const d=t[s],c=t[f],o=d.x,i=d.y,u=c.x,l=c.y;i>r!=l>r&&n<(u-o)*(r-i)/(l-i)+o&&(a=!a)}return a}function jm(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Am(n,t)}function Vt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Mm=cu,Tm=ai,Im=lu,Nm=fu,Dm=li,km=du,Lm=Tr,Fm=hu,$m=vu,Bm=xu,Gm=Eu,Vm=bu,zm=wu,Um=Ru,qm=Cu,Ir="DropdownMenu",[Hm]=we(Ir,[au]),me=au(),[Wm,Pu]=Hm(Ir),Au=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:s,onOpenChange:f,modal:d=!0}=e,c=me(t),o=E.useRef(null),[i,u]=be({prop:a,defaultProp:s??!1,onChange:f,caller:Ir});return y.jsxRuntimeExports.jsx(Wm,{scope:t,triggerId:Ce(),triggerRef:o,contentId:Ce(),open:i,onOpenChange:u,onOpenToggle:E.useCallback(()=>u(l=>!l),[u]),modal:d,children:y.jsxRuntimeExports.jsx(Mm,{...c,open:i,onOpenChange:u,dir:r,modal:d,children:n})})};Au.displayName=Ir;var ju="DropdownMenuTrigger",Mu=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,s=Pu(ju,n),f=me(n);return y.jsxRuntimeExports.jsx(Tm,{asChild:!0,...f,children:y.jsxRuntimeExports.jsx(ee.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:xr(t,s.triggerRef),onPointerDown:K(e.onPointerDown,d=>{!r&&d.button===0&&d.ctrlKey===!1&&(s.onOpenToggle(),s.open||d.preventDefault())}),onKeyDown:K(e.onKeyDown,d=>{r||(["Enter"," "].includes(d.key)&&s.onOpenToggle(),d.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})});Mu.displayName=ju;var Km="DropdownMenuPortal",Tu=e=>{const{__scopeDropdownMenu:t,...n}=e,r=me(t);return y.jsxRuntimeExports.jsx(Im,{...r,...n})};Tu.displayName=Km;var Iu="DropdownMenuContent",Nu=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Pu(Iu,n),s=me(n),f=E.useRef(!1);return y.jsxRuntimeExports.jsx(Nm,{id:a.contentId,"aria-labelledby":a.triggerId,...s,...r,ref:t,onCloseAutoFocus:K(e.onCloseAutoFocus,d=>{var c;f.current||(c=a.triggerRef.current)==null||c.focus(),f.current=!1,d.preventDefault()}),onInteractOutside:K(e.onInteractOutside,d=>{const c=d.detail.originalEvent,o=c.button===0&&c.ctrlKey===!0,i=c.button===2||o;(!a.modal||i)&&(f.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Nu.displayName=Iu;var Xm="DropdownMenuGroup",Ym=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=me(n);return y.jsxRuntimeExports.jsx(Dm,{...a,...r,ref:t})});Ym.displayName=Xm;var Qm="DropdownMenuLabel",Du=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=me(n);return y.jsxRuntimeExports.jsx(km,{...a,...r,ref:t})});Du.displayName=Qm;var Zm="DropdownMenuItem",ku=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=me(n);return y.jsxRuntimeExports.jsx(Lm,{...a,...r,ref:t})});ku.displayName=Zm;var Jm="DropdownMenuCheckboxItem",ev=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=me(n);return y.jsxRuntimeExports.jsx(Fm,{...a,...r,ref:t})});ev.displayName=Jm;var tv="DropdownMenuRadioGroup",nv=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=me(n);return y.jsxRuntimeExports.jsx($m,{...a,...r,ref:t})});nv.displayName=tv;var rv="DropdownMenuRadioItem",ov=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=me(n);return y.jsxRuntimeExports.jsx(Bm,{...a,...r,ref:t})});ov.displayName=rv;var iv="DropdownMenuItemIndicator",av=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=me(n);return y.jsxRuntimeExports.jsx(Gm,{...a,...r,ref:t})});av.displayName=iv;var sv="DropdownMenuSeparator",Lu=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=me(n);return y.jsxRuntimeExports.jsx(Vm,{...a,...r,ref:t})});Lu.displayName=sv;var cv="DropdownMenuArrow",uv=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=me(n);return y.jsxRuntimeExports.jsx(zm,{...a,...r,ref:t})});uv.displayName=cv;var lv="DropdownMenuSubTrigger",fv=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=me(n);return y.jsxRuntimeExports.jsx(Um,{...a,...r,ref:t})});fv.displayName=lv;var dv="DropdownMenuSubContent",pv=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=me(n);return y.jsxRuntimeExports.jsx(qm,{...a,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});pv.displayName=dv;var hv=Au,mv=Mu,vv=Tu,gv=Nu,xv=Du,yv=ku,Ev=Lu;function bo(e,[t,n]){return Math.min(n,Math.max(t,e))}var bv=[" ","Enter","ArrowUp","ArrowDown"],wv=[" ","Enter"],at="Select",[Nr,Dr,_v]=Ht(at),[Pt]=we(at,[_v,Qt]),kr=Qt(),[Rv,Qe]=Pt(at),[Sv,Cv]=Pt(at),Fu=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:s,value:f,defaultValue:d,onValueChange:c,dir:o,name:i,autoComplete:u,disabled:l,required:p,form:h}=e,m=kr(t),[v,g]=E.useState(null),[x,b]=E.useState(null),[w,_]=E.useState(!1),P=Rt(o),[C,j]=be({prop:r,defaultProp:a??!1,onChange:s,caller:at}),[O,T]=be({prop:f,defaultProp:d,onChange:c,caller:at}),M=E.useRef(null),D=v?h||!!v.closest("form"):!0,[F,k]=E.useState(new Set),U=Array.from(F).map($=>$.props.value).join(";");return y.jsxRuntimeExports.jsx(ei,{...m,children:y.jsxRuntimeExports.jsxs(Rv,{required:p,scope:t,trigger:v,onTriggerChange:g,valueNode:x,onValueNodeChange:b,valueNodeHasChildren:w,onValueNodeHasChildrenChange:_,contentId:Ce(),value:O,onValueChange:T,open:C,onOpenChange:j,dir:P,triggerPointerDownPosRef:M,disabled:l,children:[y.jsxRuntimeExports.jsx(Nr.Provider,{scope:t,children:y.jsxRuntimeExports.jsx(Sv,{scope:e.__scopeSelect,onNativeOptionAdd:E.useCallback($=>{k(Y=>new Set(Y).add($))},[]),onNativeOptionRemove:E.useCallback($=>{k(Y=>{const V=new Set(Y);return V.delete($),V})},[]),children:n})}),D?y.jsxRuntimeExports.jsxs(rl,{"aria-hidden":!0,required:p,tabIndex:-1,name:i,autoComplete:u,value:O,onChange:$=>T($.target.value),disabled:l,form:h,children:[O===void 0?y.jsxRuntimeExports.jsx("option",{value:""}):null,Array.from(F)]},U):null]})})};Fu.displayName=at;var $u="SelectTrigger",Bu=E.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,s=kr(n),f=Qe($u,n),d=f.disabled||r,c=oe(t,f.onTriggerChange),o=Dr(n),i=E.useRef("touch"),[u,l,p]=il(m=>{const v=o().filter(b=>!b.disabled),g=v.find(b=>b.value===f.value),x=al(v,m,g);x!==void 0&&f.onValueChange(x.value)}),h=m=>{d||(f.onOpenChange(!0),p()),m&&(f.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return y.jsxRuntimeExports.jsx(ti,{asChild:!0,...s,children:y.jsxRuntimeExports.jsx(ee.button,{type:"button",role:"combobox","aria-controls":f.contentId,"aria-expanded":f.open,"aria-required":f.required,"aria-autocomplete":"none",dir:f.dir,"data-state":f.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":ol(f.value)?"":void 0,...a,ref:c,onClick:K(a.onClick,m=>{m.currentTarget.focus(),i.current!=="mouse"&&h(m)}),onPointerDown:K(a.onPointerDown,m=>{i.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(h(m),m.preventDefault())}),onKeyDown:K(a.onKeyDown,m=>{const v=u.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&l(m.key),!(v&&m.key===" ")&&bv.includes(m.key)&&(h(),m.preventDefault())})})})});Bu.displayName=$u;var Gu="SelectValue",Vu=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:s,placeholder:f="",...d}=e,c=Qe(Gu,n),{onValueNodeHasChildrenChange:o}=c,i=s!==void 0,u=oe(t,c.onValueNodeChange);return fe(()=>{o(i)},[o,i]),y.jsxRuntimeExports.jsx(ee.span,{...d,ref:u,style:{pointerEvents:"none"},children:ol(c.value)?y.jsxRuntimeExports.jsx(y.jsxRuntimeExports.Fragment,{children:f}):s})});Vu.displayName=Gu;var Ov="SelectIcon",zu=E.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return y.jsxRuntimeExports.jsx(ee.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});zu.displayName=Ov;var Pv="SelectPortal",Uu=e=>y.jsxRuntimeExports.jsx(St,{asChild:!0,...e});Uu.displayName=Pv;var st="SelectContent",qu=E.forwardRef((e,t)=>{const n=Qe(st,e.__scopeSelect),[r,a]=E.useState();if(fe(()=>{a(new DocumentFragment)},[]),!n.open){const s=r;return s?gr.createPortal(y.jsxRuntimeExports.jsx(Hu,{scope:e.__scopeSelect,children:y.jsxRuntimeExports.jsx(Nr.Slot,{scope:e.__scopeSelect,children:y.jsxRuntimeExports.jsx("div",{children:e.children})})}),s):null}return y.jsxRuntimeExports.jsx(Wu,{...e,ref:t})});qu.displayName=st;var Ae=10,[Hu,Ze]=Pt(st),Av="SelectContentImpl",jv=Ke("SelectContent.RemoveScroll"),Wu=E.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:s,onPointerDownOutside:f,side:d,sideOffset:c,align:o,alignOffset:i,arrowPadding:u,collisionBoundary:l,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:v,...g}=e,x=Qe(st,n),[b,w]=E.useState(null),[_,P]=E.useState(null),C=oe(t,I=>w(I)),[j,O]=E.useState(null),[T,M]=E.useState(null),D=Dr(n),[F,k]=E.useState(!1),U=E.useRef(!1);E.useEffect(()=>{if(b)return Rr(b)},[b]),wr();const $=E.useCallback(I=>{const[B,...H]=D().map(R=>R.ref.current),[G]=H.slice(-1),q=document.activeElement;for(const R of I)if(R===q||(R==null||R.scrollIntoView({block:"nearest"}),R===B&&_&&(_.scrollTop=0),R===G&&_&&(_.scrollTop=_.scrollHeight),R==null||R.focus(),document.activeElement!==q))return},[D,_]),Y=E.useCallback(()=>$([j,b]),[$,j,b]);E.useEffect(()=>{F&&Y()},[F,Y]);const{onOpenChange:V,triggerPointerDownPosRef:L}=x;E.useEffect(()=>{if(b){let I={x:0,y:0};const B=G=>{var q,R;I={x:Math.abs(Math.round(G.pageX)-(((q=L.current)==null?void 0:q.x)??0)),y:Math.abs(Math.round(G.pageY)-(((R=L.current)==null?void 0:R.y)??0))}},H=G=>{I.x<=10&&I.y<=10?G.preventDefault():b.contains(G.target)||V(!1),document.removeEventListener("pointermove",B),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",B),document.addEventListener("pointerup",H,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",B),document.removeEventListener("pointerup",H,{capture:!0})}}},[b,V,L]),E.useEffect(()=>{const I=()=>V(!1);return window.addEventListener("blur",I),window.addEventListener("resize",I),()=>{window.removeEventListener("blur",I),window.removeEventListener("resize",I)}},[V]);const[A,N]=il(I=>{const B=D().filter(q=>!q.disabled),H=B.find(q=>q.ref.current===document.activeElement),G=al(B,I,H);G&&setTimeout(()=>G.ref.current.focus())}),z=E.useCallback((I,B,H)=>{const G=!U.current&&!H;(x.value!==void 0&&x.value===B||G)&&(O(I),G&&(U.current=!0))},[x.value]),X=E.useCallback(()=>b==null?void 0:b.focus(),[b]),W=E.useCallback((I,B,H)=>{const G=!U.current&&!H;(x.value!==void 0&&x.value===B||G)&&M(I)},[x.value]),te=r==="popper"?wo:Ku,Q=te===wo?{side:d,sideOffset:c,align:o,alignOffset:i,arrowPadding:u,collisionBoundary:l,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:v}:{};return y.jsxRuntimeExports.jsx(Hu,{scope:n,content:b,viewport:_,onViewportChange:P,itemRefCallback:z,selectedItem:j,onItemLeave:X,itemTextRefCallback:W,focusSelectedItem:Y,selectedItemText:T,position:r,isPositioned:F,searchRef:A,children:y.jsxRuntimeExports.jsx(Xt,{as:jv,allowPinchZoom:!0,children:y.jsxRuntimeExports.jsx(Kt,{asChild:!0,trapped:x.open,onMountAutoFocus:I=>{I.preventDefault()},onUnmountAutoFocus:K(a,I=>{var B;(B=x.trigger)==null||B.focus({preventScroll:!0}),I.preventDefault()}),children:y.jsxRuntimeExports.jsx(Wt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:f,onFocusOutside:I=>I.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:y.jsxRuntimeExports.jsx(te,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:I=>I.preventDefault(),...g,...Q,onPlaced:()=>k(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:K(g.onKeyDown,I=>{const B=I.ctrlKey||I.altKey||I.metaKey;if(I.key==="Tab"&&I.preventDefault(),!B&&I.key.length===1&&N(I.key),["ArrowUp","ArrowDown","Home","End"].includes(I.key)){let G=D().filter(q=>!q.disabled).map(q=>q.ref.current);if(["ArrowUp","End"].includes(I.key)&&(G=G.slice().reverse()),["ArrowUp","ArrowDown"].includes(I.key)){const q=I.target,R=G.indexOf(q);G=G.slice(R+1)}setTimeout(()=>$(G)),I.preventDefault()}})})})})})})});Wu.displayName=Av;var Mv="SelectItemAlignedPosition",Ku=E.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,s=Qe(st,n),f=Ze(st,n),[d,c]=E.useState(null),[o,i]=E.useState(null),u=oe(t,C=>i(C)),l=Dr(n),p=E.useRef(!1),h=E.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:g,focusSelectedItem:x}=f,b=E.useCallback(()=>{if(s.trigger&&s.valueNode&&d&&o&&m&&v&&g){const C=s.trigger.getBoundingClientRect(),j=o.getBoundingClientRect(),O=s.valueNode.getBoundingClientRect(),T=g.getBoundingClientRect();if(s.dir!=="rtl"){const q=T.left-j.left,R=O.left-q,Z=C.left-R,re=C.width+Z,se=Math.max(re,j.width),de=window.innerWidth-Ae,pe=bo(R,[Ae,Math.max(Ae,de-se)]);d.style.minWidth=re+"px",d.style.left=pe+"px"}else{const q=j.right-T.right,R=window.innerWidth-O.right-q,Z=window.innerWidth-C.right-R,re=C.width+Z,se=Math.max(re,j.width),de=window.innerWidth-Ae,pe=bo(R,[Ae,Math.max(Ae,de-se)]);d.style.minWidth=re+"px",d.style.right=pe+"px"}const M=l(),D=window.innerHeight-Ae*2,F=m.scrollHeight,k=window.getComputedStyle(o),U=parseInt(k.borderTopWidth,10),$=parseInt(k.paddingTop,10),Y=parseInt(k.borderBottomWidth,10),V=parseInt(k.paddingBottom,10),L=U+$+F+V+Y,A=Math.min(v.offsetHeight*5,L),N=window.getComputedStyle(m),z=parseInt(N.paddingTop,10),X=parseInt(N.paddingBottom,10),W=C.top+C.height/2-Ae,te=D-W,Q=v.offsetHeight/2,I=v.offsetTop+Q,B=U+$+I,H=L-B;if(B<=W){const q=M.length>0&&v===M[M.length-1].ref.current;d.style.bottom="0px";const R=o.clientHeight-m.offsetTop-m.offsetHeight,Z=Math.max(te,Q+(q?X:0)+R+Y),re=B+Z;d.style.height=re+"px"}else{const q=M.length>0&&v===M[0].ref.current;d.style.top="0px";const Z=Math.max(W,U+m.offsetTop+(q?z:0)+Q)+H;d.style.height=Z+"px",m.scrollTop=B-W+m.offsetTop}d.style.margin=`${Ae}px 0`,d.style.minHeight=A+"px",d.style.maxHeight=D+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[l,s.trigger,s.valueNode,d,o,m,v,g,s.dir,r]);fe(()=>b(),[b]);const[w,_]=E.useState();fe(()=>{o&&_(window.getComputedStyle(o).zIndex)},[o]);const P=E.useCallback(C=>{C&&h.current===!0&&(b(),x==null||x(),h.current=!1)},[b,x]);return y.jsxRuntimeExports.jsx(Iv,{scope:n,contentWrapper:d,shouldExpandOnScrollRef:p,onScrollButtonChange:P,children:y.jsxRuntimeExports.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:y.jsxRuntimeExports.jsx(ee.div,{...a,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});Ku.displayName=Mv;var Tv="SelectPopperPosition",wo=E.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=Ae,...s}=e,f=kr(n);return y.jsxRuntimeExports.jsx(ni,{...f,...s,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});wo.displayName=Tv;var[Iv,pi]=Pt(st,{}),_o="SelectViewport",Xu=E.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,s=Ze(_o,n),f=pi(_o,n),d=oe(t,s.onViewportChange),c=E.useRef(0);return y.jsxRuntimeExports.jsxs(y.jsxRuntimeExports.Fragment,{children:[y.jsxRuntimeExports.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),y.jsxRuntimeExports.jsx(Nr.Slot,{scope:n,children:y.jsxRuntimeExports.jsx(ee.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:K(a.onScroll,o=>{const i=o.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:l}=f;if(l!=null&&l.current&&u){const p=Math.abs(c.current-i.scrollTop);if(p>0){const h=window.innerHeight-Ae*2,m=parseFloat(u.style.minHeight),v=parseFloat(u.style.height),g=Math.max(m,v);if(g<h){const x=g+p,b=Math.min(h,x),w=x-b;u.style.height=b+"px",u.style.bottom==="0px"&&(i.scrollTop=w>0?w:0,u.style.justifyContent="flex-end")}}}c.current=i.scrollTop})})})]})});Xu.displayName=_o;var Yu="SelectGroup",[Nv,Dv]=Pt(Yu),kv=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Ce();return y.jsxRuntimeExports.jsx(Nv,{scope:n,id:a,children:y.jsxRuntimeExports.jsx(ee.div,{role:"group","aria-labelledby":a,...r,ref:t})})});kv.displayName=Yu;var Qu="SelectLabel",Lv=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Dv(Qu,n);return y.jsxRuntimeExports.jsx(ee.div,{id:a.id,...r,ref:t})});Lv.displayName=Qu;var pr="SelectItem",[Fv,Zu]=Pt(pr),Ju=E.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:s,...f}=e,d=Qe(pr,n),c=Ze(pr,n),o=d.value===r,[i,u]=E.useState(s??""),[l,p]=E.useState(!1),h=oe(t,x=>{var b;return(b=c.itemRefCallback)==null?void 0:b.call(c,x,r,a)}),m=Ce(),v=E.useRef("touch"),g=()=>{a||(d.onValueChange(r),d.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return y.jsxRuntimeExports.jsx(Fv,{scope:n,value:r,disabled:a,textId:m,isSelected:o,onItemTextChange:E.useCallback(x=>{u(b=>b||((x==null?void 0:x.textContent)??"").trim())},[]),children:y.jsxRuntimeExports.jsx(Nr.ItemSlot,{scope:n,value:r,disabled:a,textValue:i,children:y.jsxRuntimeExports.jsx(ee.div,{role:"option","aria-labelledby":m,"data-highlighted":l?"":void 0,"aria-selected":o&&l,"data-state":o?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...f,ref:h,onFocus:K(f.onFocus,()=>p(!0)),onBlur:K(f.onBlur,()=>p(!1)),onClick:K(f.onClick,()=>{v.current!=="mouse"&&g()}),onPointerUp:K(f.onPointerUp,()=>{v.current==="mouse"&&g()}),onPointerDown:K(f.onPointerDown,x=>{v.current=x.pointerType}),onPointerMove:K(f.onPointerMove,x=>{var b;v.current=x.pointerType,a?(b=c.onItemLeave)==null||b.call(c):v.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:K(f.onPointerLeave,x=>{var b;x.currentTarget===document.activeElement&&((b=c.onItemLeave)==null||b.call(c))}),onKeyDown:K(f.onKeyDown,x=>{var w;((w=c.searchRef)==null?void 0:w.current)!==""&&x.key===" "||(wv.includes(x.key)&&g(),x.key===" "&&x.preventDefault())})})})})});Ju.displayName=pr;var Lt="SelectItemText",el=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...s}=e,f=Qe(Lt,n),d=Ze(Lt,n),c=Zu(Lt,n),o=Cv(Lt,n),[i,u]=E.useState(null),l=oe(t,g=>u(g),c.onItemTextChange,g=>{var x;return(x=d.itemTextRefCallback)==null?void 0:x.call(d,g,c.value,c.disabled)}),p=i==null?void 0:i.textContent,h=E.useMemo(()=>y.jsxRuntimeExports.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=o;return fe(()=>(m(h),()=>v(h)),[m,v,h]),y.jsxRuntimeExports.jsxs(y.jsxRuntimeExports.Fragment,{children:[y.jsxRuntimeExports.jsx(ee.span,{id:c.textId,...s,ref:l}),c.isSelected&&f.valueNode&&!f.valueNodeHasChildren?gr.createPortal(s.children,f.valueNode):null]})});el.displayName=Lt;var tl="SelectItemIndicator",$v=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Zu(tl,n).isSelected?y.jsxRuntimeExports.jsx(ee.span,{"aria-hidden":!0,...r,ref:t}):null});$v.displayName=tl;var Ro="SelectScrollUpButton",Bv=E.forwardRef((e,t)=>{const n=Ze(Ro,e.__scopeSelect),r=pi(Ro,e.__scopeSelect),[a,s]=E.useState(!1),f=oe(t,r.onScrollButtonChange);return fe(()=>{if(n.viewport&&n.isPositioned){let d=function(){const o=c.scrollTop>0;s(o)};const c=n.viewport;return d(),c.addEventListener("scroll",d),()=>c.removeEventListener("scroll",d)}},[n.viewport,n.isPositioned]),a?y.jsxRuntimeExports.jsx(nl,{...e,ref:f,onAutoScroll:()=>{const{viewport:d,selectedItem:c}=n;d&&c&&(d.scrollTop=d.scrollTop-c.offsetHeight)}}):null});Bv.displayName=Ro;var So="SelectScrollDownButton",Gv=E.forwardRef((e,t)=>{const n=Ze(So,e.__scopeSelect),r=pi(So,e.__scopeSelect),[a,s]=E.useState(!1),f=oe(t,r.onScrollButtonChange);return fe(()=>{if(n.viewport&&n.isPositioned){let d=function(){const o=c.scrollHeight-c.clientHeight,i=Math.ceil(c.scrollTop)<o;s(i)};const c=n.viewport;return d(),c.addEventListener("scroll",d),()=>c.removeEventListener("scroll",d)}},[n.viewport,n.isPositioned]),a?y.jsxRuntimeExports.jsx(nl,{...e,ref:f,onAutoScroll:()=>{const{viewport:d,selectedItem:c}=n;d&&c&&(d.scrollTop=d.scrollTop+c.offsetHeight)}}):null});Gv.displayName=So;var nl=E.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,s=Ze("SelectScrollButton",n),f=E.useRef(null),d=Dr(n),c=E.useCallback(()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null)},[]);return E.useEffect(()=>()=>c(),[c]),fe(()=>{var i;const o=d().find(u=>u.ref.current===document.activeElement);(i=o==null?void 0:o.ref.current)==null||i.scrollIntoView({block:"nearest"})},[d]),y.jsxRuntimeExports.jsx(ee.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:K(a.onPointerDown,()=>{f.current===null&&(f.current=window.setInterval(r,50))}),onPointerMove:K(a.onPointerMove,()=>{var o;(o=s.onItemLeave)==null||o.call(s),f.current===null&&(f.current=window.setInterval(r,50))}),onPointerLeave:K(a.onPointerLeave,()=>{c()})})}),Vv="SelectSeparator",zv=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return y.jsxRuntimeExports.jsx(ee.div,{"aria-hidden":!0,...r,ref:t})});zv.displayName=Vv;var Co="SelectArrow",Uv=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=kr(n),s=Qe(Co,n),f=Ze(Co,n);return s.open&&f.position==="popper"?y.jsxRuntimeExports.jsx(ri,{...a,...r,ref:t}):null});Uv.displayName=Co;var qv="SelectBubbleInput",rl=E.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const a=E.useRef(null),s=oe(r,a),f=zo(t);return E.useEffect(()=>{const d=a.current;if(!d)return;const c=window.HTMLSelectElement.prototype,i=Object.getOwnPropertyDescriptor(c,"value").set;if(f!==t&&i){const u=new Event("change",{bubbles:!0});i.call(d,t),d.dispatchEvent(u)}},[f,t]),y.jsxRuntimeExports.jsx(ee.select,{...n,style:{...Ms,...n.style},ref:s,defaultValue:t})});rl.displayName=qv;function ol(e){return e===""||e===void 0}function il(e){const t=Me(e),n=E.useRef(""),r=E.useRef(0),a=E.useCallback(f=>{const d=n.current+f;t(d),(function c(o){n.current=o,window.clearTimeout(r.current),o!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(d)},[t]),s=E.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return E.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,s]}function al(e,t,n){const a=t.length>1&&Array.from(t).every(o=>o===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let f=Hv(e,Math.max(s,0));a.length===1&&(f=f.filter(o=>o!==n));const c=f.find(o=>o.textValue.toLowerCase().startsWith(a.toLowerCase()));return c!==n?c:void 0}function Hv(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Wv=Fu,Kv=Bu,Xv=Vu,Yv=zu,Qv=Uu,Zv=qu,Jv=Xu,e0=Ju,t0=el,sl="Toggle",hi=E.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:a,...s}=e,[f,d]=be({prop:n,onChange:a,defaultProp:r??!1,caller:sl});return y.jsxRuntimeExports.jsx(ee.button,{type:"button","aria-pressed":f,"data-state":f?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:K(e.onClick,()=>{e.disabled||d(!f)})})});hi.displayName=sl;var n0=hi,Je="ToggleGroup",[cl]=we(Je,[Jt]),ul=Jt(),mi=S.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const a=r;return y.jsxRuntimeExports.jsx(r0,{...a,ref:t})}if(n==="multiple"){const a=r;return y.jsxRuntimeExports.jsx(o0,{...a,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Je}\``)});mi.displayName=Je;var[ll,fl]=cl(Je),r0=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:a=()=>{},...s}=e,[f,d]=be({prop:n,defaultProp:r??"",onChange:a,caller:Je});return y.jsxRuntimeExports.jsx(ll,{scope:e.__scopeToggleGroup,type:"single",value:S.useMemo(()=>f?[f]:[],[f]),onItemActivate:d,onItemDeactivate:S.useCallback(()=>d(""),[d]),children:y.jsxRuntimeExports.jsx(dl,{...s,ref:t})})}),o0=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:a=()=>{},...s}=e,[f,d]=be({prop:n,defaultProp:r??[],onChange:a,caller:Je}),c=S.useCallback(i=>d((u=[])=>[...u,i]),[d]),o=S.useCallback(i=>d((u=[])=>u.filter(l=>l!==i)),[d]);return y.jsxRuntimeExports.jsx(ll,{scope:e.__scopeToggleGroup,type:"multiple",value:f,onItemActivate:c,onItemDeactivate:o,children:y.jsxRuntimeExports.jsx(dl,{...s,ref:t})})});mi.displayName=Je;var[i0,a0]=cl(Je),dl=S.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:a=!0,orientation:s,dir:f,loop:d=!0,...c}=e,o=ul(n),i=Rt(f),u={role:"group",dir:i,...c};return y.jsxRuntimeExports.jsx(i0,{scope:n,rovingFocus:a,disabled:r,children:a?y.jsxRuntimeExports.jsx(oi,{asChild:!0,...o,orientation:s,dir:i,loop:d,children:y.jsxRuntimeExports.jsx(ee.div,{...u,ref:t})}):y.jsxRuntimeExports.jsx(ee.div,{...u,ref:t})})}),hr="ToggleGroupItem",pl=S.forwardRef((e,t)=>{const n=fl(hr,e.__scopeToggleGroup),r=a0(hr,e.__scopeToggleGroup),a=ul(e.__scopeToggleGroup),s=n.value.includes(e.value),f=r.disabled||e.disabled,d={...e,pressed:s,disabled:f},c=S.useRef(null);return r.rovingFocus?y.jsxRuntimeExports.jsx(ii,{asChild:!0,...a,focusable:!f,active:s,ref:c,children:y.jsxRuntimeExports.jsx(oa,{...d,ref:t})}):y.jsxRuntimeExports.jsx(oa,{...d,ref:t})});pl.displayName=hr;var oa=S.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...a}=e,s=fl(hr,n),f={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},d=s.type==="single"?f:void 0;return y.jsxRuntimeExports.jsx(hi,{...d,...a,ref:t,onPressedChange:c=>{c?s.onItemActivate(r):s.onItemDeactivate(r)}})}),s0=mi,c0=pl;const u0=S.forwardRef(({children:e,className:t,...n},r)=>y.jsxRuntimeExports.jsx(Hf,{className:J.classNames("overflow-hidden rounded-xl shadow-(--box-shadow-accordion)",t),ref:r,...n,children:e})),l0=S.forwardRef(({children:e,className:t,triggerIcon:n,...r},a)=>y.jsxRuntimeExports.jsx(Wf,{className:"flex",children:y.jsxRuntimeExports.jsxs(Kf,{className:J.classNames("group flex h-14 flex-1 cursor-pointer items-center justify-between px-6 text-[15px] leading-none bg-white space-x-2",t),ref:a,...r,children:[e,n??y.jsxRuntimeExports.jsx(Se.SvgArrowMp,{className:"size-3 shrink-0 transition-transform duration-300 ease-in-out group-data-[state=open]:rotate-180 fill-primary-blue"})]})}));function ia(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function f0(...e){return t=>{let n=!1;const r=e.map(a=>{const s=ia(a,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let a=0;a<r.length;a++){const s=r[a];typeof s=="function"?s():ia(e[a],null)}}}}function d0(...e){return E.useCallback(f0(...e),e)}class p0 extends E.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,a=y.isHTMLElement(r)&&r.offsetWidth||0,s=y.isHTMLElement(r)&&r.offsetHeight||0,f=this.props.sizeRef.current;f.height=n.offsetHeight||0,f.width=n.offsetWidth||0,f.top=n.offsetTop,f.left=n.offsetLeft,f.right=a-f.width-f.left,f.bottom=s-f.height-f.top}return null}componentDidUpdate(){}render(){return this.props.children}}function h0({children:e,isPresent:t,anchorX:n,anchorY:r,root:a,pop:s}){var l;const f=S.useId(),d=S.useRef(null),c=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:o}=S.useContext(y.MotionConfigContext),i=((l=e.props)==null?void 0:l.ref)??(e==null?void 0:e.ref),u=d0(d,i);return S.useInsertionEffect(()=>{const{width:p,height:h,top:m,left:v,right:g,bottom:x}=c.current;if(t||s===!1||!d.current||!p||!h)return;const b=n==="left"?`left: ${v}`:`right: ${g}`,w=r==="bottom"?`bottom: ${x}`:`top: ${m}`;d.current.dataset.motionPopId=f;const _=document.createElement("style");o&&(_.nonce=o);const P=a??document.head;return P.appendChild(_),_.sheet&&_.sheet.insertRule(`
|
|
46
|
+
[data-motion-pop-id="${f}"] {
|
|
47
|
+
position: absolute !important;
|
|
48
|
+
width: ${p}px !important;
|
|
49
|
+
height: ${h}px !important;
|
|
50
|
+
${b}px !important;
|
|
51
|
+
${w}px !important;
|
|
52
|
+
}
|
|
53
|
+
`),()=>{P.contains(_)&&P.removeChild(_)}},[t]),y.jsxRuntimeExports.jsx(p0,{isPresent:t,childRef:d,sizeRef:c,pop:s,children:s===!1?e:E.cloneElement(e,{ref:u})})}const m0=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:s,mode:f,anchorX:d,anchorY:c,root:o})=>{const i=y.useConstant(v0),u=S.useId();let l=!0,p=S.useMemo(()=>(l=!1,{id:u,initial:t,isPresent:n,custom:a,onExitComplete:h=>{i.set(h,!0);for(const m of i.values())if(!m)return;r&&r()},register:h=>(i.set(h,!1),()=>i.delete(h))}),[n,i,r]);return s&&l&&(p={...p}),S.useMemo(()=>{i.forEach((h,m)=>i.set(m,!1))},[n]),E.useEffect(()=>{!n&&!i.size&&r&&r()},[n]),e=y.jsxRuntimeExports.jsx(h0,{pop:f==="popLayout",isPresent:n,anchorX:d,anchorY:c,root:o,children:e}),y.jsxRuntimeExports.jsx(y.PresenceContext.Provider,{value:p,children:e})};function v0(){return new Map}const gn=e=>e.key||"";function aa(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const _t=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:s="sync",propagate:f=!1,anchorX:d="left",anchorY:c="top",root:o})=>{const[i,u]=y.usePresence(f),l=S.useMemo(()=>aa(e),[e]),p=f&&!i?[]:l.map(gn),h=S.useRef(!0),m=S.useRef(l),v=y.useConstant(()=>new Map),g=S.useRef(new Set),[x,b]=S.useState(l),[w,_]=S.useState(l);y.useIsomorphicLayoutEffect(()=>{h.current=!1,m.current=l;for(let j=0;j<w.length;j++){const O=gn(w[j]);p.includes(O)?(v.delete(O),g.current.delete(O)):v.get(O)!==!0&&v.set(O,!1)}},[w,p.length,p.join("-")]);const P=[];if(l!==x){let j=[...l];for(let O=0;O<w.length;O++){const T=w[O],M=gn(T);p.includes(M)||(j.splice(O,0,T),P.push(T))}return s==="wait"&&P.length&&(j=P),_(aa(j)),b(l),null}process.env.NODE_ENV!=="production"&&s==="wait"&&w.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:C}=S.useContext(y.LayoutGroupContext);return y.jsxRuntimeExports.jsx(y.jsxRuntimeExports.Fragment,{children:w.map(j=>{const O=gn(j),T=f&&!i?!1:l===w||p.includes(O),M=()=>{if(g.current.has(O))return;if(g.current.add(O),v.has(O))v.set(O,!0);else return;let D=!0;v.forEach(F=>{F||(D=!1)}),D&&(C==null||C(),_(m.current),f&&(u==null||u()),r&&r())};return y.jsxRuntimeExports.jsx(m0,{isPresent:T,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:a,mode:s,root:o,onExitComplete:T?void 0:M,anchorX:d,anchorY:c,children:j},O)})})},g0=S.forwardRef(({children:e,className:t,dividerClassName:n,showDivider:r=!0,...a},s)=>y.jsxRuntimeExports.jsx(Xf,{...a,className:J.classNames("overflow-hidden bg-white",t),ref:s,asChild:!0,children:y.jsxRuntimeExports.jsxs(y.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:[.04,.62,.23,.98]},children:[r&&y.jsxRuntimeExports.jsx("hr",{className:J.classNames("bg-primary-blue h-0.5 border-0",n)}),y.jsxRuntimeExports.jsx("div",{className:"px-5 py-[15px]",children:e})]})})),x0={sm:"size-8 text-[1.3rem]",md:"size-10 text-[1.4rem]",lg:"size-12 text-[2.1rem]",xl:"size-14 text-[2.5rem]"},y0=({size:e="md",src:t,alt:n="avatar",icon:r=y.jsxRuntimeExports.jsx(Se.SvgUser,{}),bgClassName:a="bg-[#A1ADC0]",colorClassName:s="text-white",className:f="",onClick:d,style:c})=>y.jsxRuntimeExports.jsxs(Ep,{className:J.classNames("inline-flex shrink-0 overflow-hidden rounded-full",x0[e],f),onClick:d,style:c,children:[t&&y.jsxRuntimeExports.jsx(bp,{src:t,alt:n,className:"h-full w-full object-cover"}),y.jsxRuntimeExports.jsx(wp,{delayMs:0,className:J.classNames("flex h-full w-full items-center justify-center rounded-full",s,a),children:r})]}),E0={default:J.classNames("bg-primary-blue border-primary-blue text-white","hover:bg-darks-blue-Macropay-30 hover:border-darks-blue-Macropay-30"),primary:J.classNames("bg-primary-yellow border-primary-yellow text-primary-blue","hover:bg-shades-yellow-10 hover:border-shades-yellow-10"),secondary:J.classNames("bg-white text-primary-blue border-primary-blue","hover:border-darks-blue-Macropay-30 hover:text-darks-blue-Macropay-30"),text:J.classNames("bg-transparent text-primary-blue border-transparent shadow-none","hover:text-darks-blue-Macropay-30","disabled:bg-transparent disabled:border-transparent"),danger:J.classNames("bg-primary-red border-primary-red text-white","hover:bg-shades-red-10 hover:border-shades-red-10"),withoutColor:"bg-transparent border-transparent shadow-none"},b0={sm:"px-3 text-sm h-6 rounded-md",md:"px-4 py-2 h-8",lg:"px-6 py-[7px] text-base h-10 rounded-lg",xl:"px-6 py-[11px] h-12"},sa=["sm","md","lg","xl"],w0=e=>{const t=sa.indexOf(e);return t===-1?"":J.classNames(sa.slice(0,t+1).map(n=>b0[n]))},_0={pointer:"cursor-pointer",default:"cursor-default","not-allowed":"cursor-not-allowed",wait:"cursor-wait",text:"cursor-text"},R0=e=>J.classNames("flex items-center justify-center gap-2 border active:scale-95",_0[e],"disabled:bg-gray-3 disabled:text-gray-6 disabled:border-gray-5 disabled:cursor-not-allowed","transition-all duration-300 ease-in-out","shadow-button"),Oo=({icon:e,children:t,leftIcon:n,rightIcon:r,type:a="button",variant:s="default",size:f="md",className:d="",isLoading:c=!1,positionLoading:o="left",cursor:i="pointer",...u})=>{const l=S.useId(),p=R0(i),{isLeftLoading:h,isRightLoading:m}=S.useMemo(()=>({isLeftLoading:o==="left"&&c,isRightLoading:o==="right"&&c}),[c,o]),v=S.useMemo(()=>["primary","secondary","text","withoutColor"].includes(s)?y.jsxRuntimeExports.jsx(Se.SvgLoaderAnimBlue,{className:"animate-spin"}):y.jsxRuntimeExports.jsx(Se.SvgLoaderAnimWhite,{className:"animate-spin"}),[s]),g=S.useMemo(()=>e??n,[e,n]);return y.jsxRuntimeExports.jsxs(y.motion.button,{id:`${l}-button`,className:J.classNames(p,E0[s],w0(f),d),type:a,...u,children:[y.jsxRuntimeExports.jsx(_t,{mode:"wait",children:(h||g)&&y.jsxRuntimeExports.jsx(y.motion.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.2},children:h?v:g},"leftIcon")}),typeof t=="string"||typeof t=="number"?y.jsxRuntimeExports.jsx("span",{className:"whitespace-normal",children:t}):t,y.jsxRuntimeExports.jsx(_t,{mode:"wait",children:(m||r)&&y.jsxRuntimeExports.jsx(y.motion.div,{initial:{opacity:0,x:8},animate:{opacity:1,x:0},exit:{opacity:0,x:8},transition:{duration:.2},children:m?v:r},"rightIcon")})]})},S0={sm:"h-4 w-4",md:"h-6 w-6"},C0={sm:"h-3 w-3",md:"h-4 w-4"},O0={sm:"h-2 w-2",md:"h-4 w-4"},P0={sm:"text-sm",md:"text-base"},A0=({size:e,disabled:t})=>({checked:y.jsxRuntimeExports.jsx(Se.SvgCheckv2,{className:J.classNames(C0[e],t?"text-stone-300 fill-stone-300":"text-white")}),indeterminate:y.jsxRuntimeExports.jsx(Se.SvgIndeterminate,{className:J.classNames(O0[e],t?"text-stone-300 fill-stone-300":"text-blue-800")})}),j0=({size:e,disabled:t,children:n,checkboxId:r})=>n?y.jsxRuntimeExports.jsx("label",{htmlFor:r,className:J.classNames(P0[e],t&&"text-gray-400","cursor-pointer"),children:n}):null,hl=S.forwardRef(({size:e="md",checked:t,indeterminate:n=!1,disabled:r=!1,onCheckedChange:a,className:s,children:f,...d},c)=>{const o=S.useId(),i=n?"indeterminate":t?"checked":"none",u=l=>{r||a==null||a(l===!0)};return y.jsxRuntimeExports.jsxs("div",{className:J.classNames("flex gap-2 items-start sm:items-center select-none",r?"pointer-events-none":"cursor-pointer",s),children:[y.jsxRuntimeExports.jsx(Pc,{id:o,ref:c,checked:t,"aria-checked":n?"mixed":t,disabled:r,onCheckedChange:u,className:J.classNames("flex justify-center items-center rounded-sm border relative transition-[background-color] cursor-pointer",S0[e],{"bg-white border-gray-300 hover:border-blue-800":!t&&!r,"bg-blue-800 border-blue-800":t&&!n&&!r||n&&!r,"bg-neutral-100 border-stone-300":r}),...d,children:i!=="none"&&A0({size:e,disabled:r})[i]}),y.jsxRuntimeExports.jsx(j0,{size:e,disabled:r,children:f,checkboxId:o})]})});hl.displayName="Checkbox";const M0=({children:e,id:t,className:n=""})=>{const r=S.useRef(null),[a,s]=S.useState(!1);return S.useEffect(()=>{const f=document.getElementById(t)||document.createElement("div");return r.current=f,r.current.id=t,n&&(r.current.className=n),document.body.appendChild(r.current),s(!0),()=>{r.current.parentElement&&r.current.parentElement.removeChild(r.current)}},[t]),a?To.createPortal(e,r.current):null},T0=S.memo(M0),I0=S.forwardRef(({children:e,className:t,...n},r)=>y.jsxRuntimeExports.jsx(mv,{className:J.classNames("inline-flex items-center justify-center rounded px-4 py-2 text-sm font-medium","bg-white text-gray-12","hover:bg-gray-1 focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-offset-2 outline-none","disabled:cursor-not-allowed disabled:opacity-50","transition-colors",t),ref:r,...n,children:e})),N0=S.forwardRef(({children:e,className:t,...n},r)=>y.jsxRuntimeExports.jsx(vv,{children:y.jsxRuntimeExports.jsx(gv,{...n,className:J.classNames("min-w-[220px] rounded-lg bg-white shadow-(--box-shadow-accordion) border border-gray-2","overflow-hidden",t),ref:r,asChild:!0,children:y.jsxRuntimeExports.jsx(y.motion.div,{initial:{opacity:0,scale:.95,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:-10},transition:{duration:.2,ease:[.04,.62,.23,.98]},children:y.jsxRuntimeExports.jsx("div",{className:"p-1",children:e})})})})),D0=S.forwardRef(({children:e,className:t,icon:n,shortcut:r,...a},s)=>y.jsxRuntimeExports.jsxs(yv,{className:J.classNames("group relative flex cursor-pointer select-none items-center justify-between rounded px-3 py-2 text-sm outline-none","text-gray-12 hover:bg-blue-1 hover:text-blue-6","focus:bg-blue-1 focus:text-blue-6","data-disabled:pointer-events-none data-disabled:opacity-50","transition-colors",t),ref:s,...a,children:[y.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[n&&y.jsxRuntimeExports.jsx("span",{className:"inline-flex shrink-0",children:n}),y.jsxRuntimeExports.jsx("span",{children:e})]}),r&&y.jsxRuntimeExports.jsx("span",{className:"ml-auto pl-4 text-xs text-gray-6 group-hover:text-blue-6",children:r})]})),k0=S.forwardRef(({className:e,...t},n)=>y.jsxRuntimeExports.jsx(Ev,{className:J.classNames("my-1 h-px bg-gray-3",e),ref:n,...t})),L0=S.forwardRef(({children:e,className:t,...n},r)=>y.jsxRuntimeExports.jsx(xv,{className:J.classNames("px-3 py-2 text-xs font-semibold text-gray-6",t),ref:r,...n,children:e})),F0=(e,t)=>{const n={separator:()=>y.jsxRuntimeExports.jsx(k0,{className:t==null?void 0:t.separator},e.id),label:()=>y.jsxRuntimeExports.jsx(L0,{className:t==null?void 0:t.label,children:e.label},e.id),default:()=>y.jsxRuntimeExports.jsx(D0,{className:t==null?void 0:t.item,icon:e.icon,shortcut:e.shortcut,disabled:e.disabled,onSelect:e.onSelect,children:e.label},e.id)};return(n[e.type]||n.default)()},$0=({trigger:e,items:t=[],align:n="start",sideOffset:r=4,classNames:a})=>y.jsxRuntimeExports.jsxs(hv,{children:[y.jsxRuntimeExports.jsx(I0,{className:a==null?void 0:a.trigger,children:e}),y.jsxRuntimeExports.jsx(N0,{align:n,sideOffset:r,className:a==null?void 0:a.content,children:t.map(s=>y.jsxRuntimeExports.jsx("div",{children:F0(s,a)},s.id))})]});var ml=(e=>(e.justify="justify",e.align="items",e.gap="gap",e))(ml||{});const{align:B0,justify:G0,gap:V0}=ml,z0={horizontal:"flex-row",vertical:"flex-col"},U0={horizontal:"flex-row-reverse",vertical:"flex-col-reverse"},rt=({children:e,justify:t,align:n,gap:r,direction:a="horizontal",isReverse:s=!1,style:f,className:d="",onClick:c,wrap:o,...i})=>y.jsxRuntimeExports.jsx(y.motion.div,{"aria-hidden":!0,className:J.classNames(`flex ${s?U0[a]:z0[a]}`,Re.generateClasses(V0,r),Re.generateClasses(G0,t),Re.generateClasses(B0,n),{[d]:d,"flex-wrap":o}),onClick:c,style:f,children:e,...i}),q0={md:"py-[5px] min-h-8 rounded-md",lg:"py-2 text-base min-h-10 rounded-lg",xl:"py-3 text-base min-h-12 rounded-lg"},vl=(e,t,n,r,a)=>{const s=["px-3 py-px min-h-6 text-sm leading-[22px] w-full","transition-all ease-out duration-300","placeholder:text-gray-6 text-gray-10 outline-none appearance-none","disabled:bg-gray-3 disabled:text-gray-6 disabled:border-gray-5"],f=e==="default"?["rounded border shadow-button border-gray-7","focus:border-light-blue-30 focus:ring-light-blue-30 focus:shadow-[0_0_0_2px_#E6EDF8]"]:["border-0 border-b border-gray-7 rounded-none! bg-transparent","focus:border-light-blue-30"],d={"pl-8":a,[e==="default"?"border-red text-red focus:border-red focus:ring-red focus:shadow-[0_0_0_2px_#FFCCC7]":"border-b-red text-red focus:border-b-red"]:n,[e==="default"?"border-green text-green focus:border-green focus:ring-green focus:shadow-[0_0_0_2px_#D4F0E0]":"border-b-green text-green focus:border-b-green"]:r};return{sizeStyles:q0[t],stateStyles:d,baseStyles:s,variantStyles:f}},gl=({onClick:e,disabled:t})=>y.jsxRuntimeExports.jsx(y.motion.button,{initial:{opacity:0,y:"-50%"},animate:{opacity:1,y:"-50%"},exit:{opacity:0,y:"-50%"},transition:{duration:.2},type:"button",className:"absolute transition-colors ease-out duration-300 top-1/2 right-3 disabled:opacity-100 text-gray-6 hover:text-gray-7 disabled:hover:text-gray-6",onClick:e,disabled:t,children:y.jsxRuntimeExports.jsx(Se.SvgCloseCircle,{})},"clear-button"),H0=({num:e,format:t,useGrouping:n,minFractionDigits:r,maxFractionDigits:a,mode:s,currency:f,currencyDisplay:d,locale:c,prefix:o="",suffix:i=""})=>{if(e==null||!t)return(e==null?void 0:e.toString())??"";const u={useGrouping:n,minimumFractionDigits:r,maximumFractionDigits:a,...s==="currency"&&{style:"currency",currency:f,currencyDisplay:d}},l=new Intl.NumberFormat(c,u).format(e);return`${o} ${l} ${i}`.trim()},W0=(e,t="",n="",r=!0)=>{if(!e)return r?null:0;const a=e.replace(t,"").replace(n,"").replaceAll(/[^\d.-]/g,""),s=Number.parseFloat(a);return Number.isNaN(s)?null:s},K0=(e,t,n)=>e==null||(t==null||e>=t)&&(n==null||e<=n),X0=e=>{const{onChange:t,onValueChange:n,format:r=!0,locale:a="es-MX",mode:s="decimal",currency:f="MXN",currencyDisplay:d="symbol",useGrouping:c=!0,minFractionDigits:o,maxFractionDigits:i,min:u,max:l,allowEmpty:p=!0,prefix:h,suffix:m,...v}=e,[g,x]=S.useState(Number((v==null?void 0:v.value)??null)),[b,w]=S.useState(""),[_,P]=S.useState(!1),C=S.useMemo(()=>({format:r,useGrouping:c,minFractionDigits:o,maxFractionDigits:i,mode:s,currency:f,currencyDisplay:d,locale:a,prefix:h,suffix:m}),[r,c,o,i,s,f,d,a,h,m]),j=S.useCallback(k=>H0({num:k,...C}),[C]),O=S.useCallback(k=>W0(k,h,m,p),[h,m,p]);S.useEffect(()=>{_||w(j(g))},[g,j,_]);const T=S.useCallback(k=>{const U=k.target.value;w(U);const $=O(U);K0($,u,l)&&(x($),t==null||t($),n==null||n({originalEvent:k.nativeEvent,value:$}))},[O,u,l,t,n]),M=S.useCallback(k=>{var U;P(!0),g!=null&&w(g.toString()),(U=v.onFocus)==null||U.call(v,k)},[g,v]),D=S.useCallback(k=>{var U;P(!1),w(j(g)),(U=v.onBlur)==null||U.call(v,k)},[j,g,v]),F=S.useCallback(()=>{w(""),x(null),t==null||t(null)},[t]);return{displayValue:b,handleChange:T,handleFocus:M,handleBlur:D,handleClear:F,...v}},xl=S.forwardRef((e,t)=>{const{error:n,size:r="md",check:a,icon:s,leftIcon:f,clear:d=!0,disabled:c=!1,variant:o="default",className:i,displayValue:u,handleChange:l,handleFocus:p,handleBlur:h,handleClear:m,...v}=X0(e),{baseStyles:g,variantStyles:x,sizeStyles:b,stateStyles:w}=vl(o,r,n,a,!!s),_=S.useMemo(()=>d&&u?y.jsxRuntimeExports.jsx(gl,{disabled:c,onClick:m}):f?y.jsxRuntimeExports.jsx("div",{className:J.classNames("absolute right-3 top-1/2 -translate-y-1/2",{"opacity-40":c}),children:f}):null,[d,u,f,c,m]);return y.jsxRuntimeExports.jsxs("div",{className:J.classNames("relative",i),children:[s&&y.jsxRuntimeExports.jsx("div",{className:J.classNames("absolute left-3 top-1/2 -translate-y-1/2",{"opacity-40":c}),children:s}),y.jsxRuntimeExports.jsx(y.motion.input,{...v,ref:t,type:"text",value:u,disabled:c,onChange:l,onFocus:p,onBlur:h,className:J.classNames(...g,...x,b,w,i)}),y.jsxRuntimeExports.jsx(_t,{children:_})]})});xl.displayName="InputNumber";const ca=(e,t)=>`${e}-${t}`,Lr=S.forwardRef(({children:e,as:t,asChild:n=!1,className:r,italic:a=!1,size:s="base",weight:f="normal",...d},c)=>{if(!e)return null;const o=ca("text",s),i=ca("font",f),u=n?Ps:t??"p";return y.jsxRuntimeExports.jsx(u,{ref:c,className:J.classNames("text-grays-Macropay-10",o,i,r,{italic:a}),...d,children:e})});Lr.displayName="Typography";const Y0=({children:e,as:t="p",className:n,...r})=>y.jsxRuntimeExports.jsx(Lr,{as:t,className:n,...r,children:e}),Q0={1:"text-4xl",2:"text-3xl",3:"text-2xl",4:"text-xl",5:"text-lg",6:"text-base"},Z0={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"},J0=({children:e,className:t="",level:n=1,...r})=>{const a=Z0[n];return y.jsxRuntimeExports.jsx(Lr,{as:a,weight:"bold",className:`${Q0[n]} ${t}`,...r,children:e})},nn=Lr;nn.Text=Y0;nn.Title=J0;const eg={hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},tg={hidden:{opacity:0,scale:.95,y:8},visible:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:8}},yl=({blur:e=!0,className:t})=>y.jsxRuntimeExports.jsx(fp,{asChild:!0,children:y.jsxRuntimeExports.jsx(y.motion.div,{className:J.cn("fixed inset-0 z-10 bg-opacity-75 transition-opacity",t,{"backdrop-blur-sm backdrop-filter":e}),variants:eg,initial:"hidden",animate:"visible",exit:"exit",onClick:n=>n.stopPropagation()})}),ng=({children:e,panelClassName:t,isCloseAble:n,onClose:r})=>y.jsxRuntimeExports.jsx("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:y.jsxRuntimeExports.jsx(rt,{align:"center",justify:"center",className:"min-h-full p-4 text-center items-center",children:y.jsxRuntimeExports.jsx(dp,{asChild:!0,children:y.jsxRuntimeExports.jsx(y.motion.div,{variants:tg,initial:"hidden",animate:"visible",exit:"exit",transition:{duration:.2,ease:"easeOut"},className:J.cn("relative min-w-full md:min-w-104.5 p-6 md:p-8 transform rounded-lg bg-white text-left shadow-xl outline-none max-w-lg",t),children:y.jsxRuntimeExports.jsxs(rt,{className:"relative gap-6",direction:"vertical",align:"center",children:[n&&y.jsxRuntimeExports.jsx("button",{className:"absolute -right-4 -top-4 md:-right-5 w-auto h-auto",onClick:r,children:y.jsxRuntimeExports.jsx(Se.SvgClose,{className:"cursor-pointer text-gray-7 text-2xl"})}),e]})})})})}),rg=({type:e="default",title:t,message:n,titleAlign:r="left",children:a})=>!t&&!n?null:y.jsxRuntimeExports.jsxs(rt,{gap:4,className:J.classNames("w-full",{hidden:!t&&!n}),children:[e!=="default"&&y.jsxRuntimeExports.jsxs(rt,{align:"center",justify:"center",className:J.classNames("w-6 h-6 md:h-7 md:w-7 shrink-0 rounded-full text-white",{"bg-error":e==="error","bg-success":e==="success","bg-warning":e==="warning","bg-info":e==="info"}),children:[e==="error"&&y.jsxRuntimeExports.jsx(Se.SvgClose,{}),e==="success"&&y.jsxRuntimeExports.jsx(Se.SvgDone,{}),e==="warning"&&y.jsxRuntimeExports.jsx(Se.SvgExclamation,{}),e==="info"&&y.jsxRuntimeExports.jsx(Se.SvgInfo,{})]}),y.jsxRuntimeExports.jsxs(rt,{direction:"vertical",gap:2,className:"w-full",children:[typeof t!="string"?t:y.jsxRuntimeExports.jsx(pp,{asChild:!0,children:y.jsxRuntimeExports.jsx(nn.Title,{weight:"semibold",level:4,...typeof t!="string"?t:{},className:J.classNames("inline-block",{[`text-${r}`]:r}),children:typeof t=="string"?t:a})}),n&&y.jsxRuntimeExports.jsx(hp,{asChild:!0,children:y.jsxRuntimeExports.jsx("span",{className:"text-base font-normal text-black text-opacity-85",children:n})})]})]}),og=({buttonCancel:e,buttonOk:t})=>!e&&!t?null:y.jsxRuntimeExports.jsxs("div",{className:"w-full max-[400px]:grid grid-cols-1 flex flex-wrap justify-end gap-4",children:[t&&y.jsxRuntimeExports.jsx(Oo,{className:"outline-none inline-flex max-[400px]:order-1 order-2",variant:"primary",size:"xl",...t}),e&&y.jsxRuntimeExports.jsx(Oo,{className:"outline-none inline-flex max-[400px]:order-2 order-1",variant:"secondary",size:"xl",...e})]}),El=({isOpen:e,onClose:t=()=>{},children:n,header:r,title:a,message:s,type:f,titleAlign:d,buttonOk:c,buttonCancel:o,isCloseAble:i,overlay:u,className:l="",blur:p=!0})=>y.jsxRuntimeExports.jsx(up,{open:e,children:y.jsxRuntimeExports.jsx(_t,{children:e&&y.jsxRuntimeExports.jsxs(lp,{forceMount:!0,children:[u??y.jsxRuntimeExports.jsx(yl,{blur:p}),y.jsxRuntimeExports.jsxs(ng,{panelClassName:l,isCloseAble:i,onClose:t,children:[r,y.jsxRuntimeExports.jsx(rg,{type:f,title:a,message:s,titleAlign:d,children:n}),n&&y.jsxRuntimeExports.jsx("div",{children:n,className:"w-full"}),y.jsxRuntimeExports.jsx(og,{buttonOk:c,buttonCancel:o})]})]})})});El.Overlay=yl;const{Title:ig,Text:ag}=nn,sg=({title:e,message:t,children:n})=>y.jsxRuntimeExports.jsxs(rt,{gap:2,direction:"vertical",justify:"center",className:"w-full",children:[e&&y.jsxRuntimeExports.jsx(ig,{level:6,weight:"medium",children:e}),t&&y.jsxRuntimeExports.jsx(ag,{className:"leading-5",size:"sm",children:t}),n]}),cg=e=>{const t=S.createContext(void 0);return[({value:a,children:s})=>y.jsxRuntimeExports.jsx(t.Provider,{value:a,children:s}),()=>{const a=S.useContext(t);if(a===void 0)throw new Error(`useContext must be used within a ${e}Provider`);return a}]},[ug]=cg("PopoverContext");var lg=Object.defineProperty,mr=Object.getOwnPropertySymbols,bl=Object.prototype.hasOwnProperty,wl=Object.prototype.propertyIsEnumerable,ua=(e,t,n)=>t in e?lg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Po=(e,t)=>{for(var n in t||(t={}))bl.call(t,n)&&ua(e,n,t[n]);if(mr)for(var n of mr(t))wl.call(t,n)&&ua(e,n,t[n]);return e},Ao=(e,t)=>{var n={};for(var r in e)bl.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&mr)for(var r of mr(e))t.indexOf(r)<0&&wl.call(e,r)&&(n[r]=e[r]);return n};/**
|
|
54
|
+
* @license QR Code generator library (TypeScript)
|
|
55
|
+
* Copyright (c) Project Nayuki.
|
|
56
|
+
* SPDX-License-Identifier: MIT
|
|
57
|
+
*/var ct;(e=>{const t=class ne{constructor(c,o,i,u){if(this.version=c,this.errorCorrectionLevel=o,this.modules=[],this.isFunction=[],c<ne.MIN_VERSION||c>ne.MAX_VERSION)throw new RangeError("Version value out of range");if(u<-1||u>7)throw new RangeError("Mask value out of range");this.size=c*4+17;let l=[];for(let h=0;h<this.size;h++)l.push(!1);for(let h=0;h<this.size;h++)this.modules.push(l.slice()),this.isFunction.push(l.slice());this.drawFunctionPatterns();const p=this.addEccAndInterleave(i);if(this.drawCodewords(p),u==-1){let h=1e9;for(let m=0;m<8;m++){this.applyMask(m),this.drawFormatBits(m);const v=this.getPenaltyScore();v<h&&(u=m,h=v),this.applyMask(m)}}a(0<=u&&u<=7),this.mask=u,this.applyMask(u),this.drawFormatBits(u),this.isFunction=[]}static encodeText(c,o){const i=e.QrSegment.makeSegments(c);return ne.encodeSegments(i,o)}static encodeBinary(c,o){const i=e.QrSegment.makeBytes(c);return ne.encodeSegments([i],o)}static encodeSegments(c,o,i=1,u=40,l=-1,p=!0){if(!(ne.MIN_VERSION<=i&&i<=u&&u<=ne.MAX_VERSION)||l<-1||l>7)throw new RangeError("Invalid value");let h,m;for(h=i;;h++){const b=ne.getNumDataCodewords(h,o)*8,w=f.getTotalBits(c,h);if(w<=b){m=w;break}if(h>=u)throw new RangeError("Data too long")}for(const b of[ne.Ecc.MEDIUM,ne.Ecc.QUARTILE,ne.Ecc.HIGH])p&&m<=ne.getNumDataCodewords(h,b)*8&&(o=b);let v=[];for(const b of c){n(b.mode.modeBits,4,v),n(b.numChars,b.mode.numCharCountBits(h),v);for(const w of b.getData())v.push(w)}a(v.length==m);const g=ne.getNumDataCodewords(h,o)*8;a(v.length<=g),n(0,Math.min(4,g-v.length),v),n(0,(8-v.length%8)%8,v),a(v.length%8==0);for(let b=236;v.length<g;b^=253)n(b,8,v);let x=[];for(;x.length*8<v.length;)x.push(0);return v.forEach((b,w)=>x[w>>>3]|=b<<7-(w&7)),new ne(h,o,x,l)}getModule(c,o){return 0<=c&&c<this.size&&0<=o&&o<this.size&&this.modules[o][c]}getModules(){return this.modules}drawFunctionPatterns(){for(let i=0;i<this.size;i++)this.setFunctionModule(6,i,i%2==0),this.setFunctionModule(i,6,i%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const c=this.getAlignmentPatternPositions(),o=c.length;for(let i=0;i<o;i++)for(let u=0;u<o;u++)i==0&&u==0||i==0&&u==o-1||i==o-1&&u==0||this.drawAlignmentPattern(c[i],c[u]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(c){const o=this.errorCorrectionLevel.formatBits<<3|c;let i=o;for(let l=0;l<10;l++)i=i<<1^(i>>>9)*1335;const u=(o<<10|i)^21522;a(u>>>15==0);for(let l=0;l<=5;l++)this.setFunctionModule(8,l,r(u,l));this.setFunctionModule(8,7,r(u,6)),this.setFunctionModule(8,8,r(u,7)),this.setFunctionModule(7,8,r(u,8));for(let l=9;l<15;l++)this.setFunctionModule(14-l,8,r(u,l));for(let l=0;l<8;l++)this.setFunctionModule(this.size-1-l,8,r(u,l));for(let l=8;l<15;l++)this.setFunctionModule(8,this.size-15+l,r(u,l));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let c=this.version;for(let i=0;i<12;i++)c=c<<1^(c>>>11)*7973;const o=this.version<<12|c;a(o>>>18==0);for(let i=0;i<18;i++){const u=r(o,i),l=this.size-11+i%3,p=Math.floor(i/3);this.setFunctionModule(l,p,u),this.setFunctionModule(p,l,u)}}drawFinderPattern(c,o){for(let i=-4;i<=4;i++)for(let u=-4;u<=4;u++){const l=Math.max(Math.abs(u),Math.abs(i)),p=c+u,h=o+i;0<=p&&p<this.size&&0<=h&&h<this.size&&this.setFunctionModule(p,h,l!=2&&l!=4)}}drawAlignmentPattern(c,o){for(let i=-2;i<=2;i++)for(let u=-2;u<=2;u++)this.setFunctionModule(c+u,o+i,Math.max(Math.abs(u),Math.abs(i))!=1)}setFunctionModule(c,o,i){this.modules[o][c]=i,this.isFunction[o][c]=!0}addEccAndInterleave(c){const o=this.version,i=this.errorCorrectionLevel;if(c.length!=ne.getNumDataCodewords(o,i))throw new RangeError("Invalid argument");const u=ne.NUM_ERROR_CORRECTION_BLOCKS[i.ordinal][o],l=ne.ECC_CODEWORDS_PER_BLOCK[i.ordinal][o],p=Math.floor(ne.getNumRawDataModules(o)/8),h=u-p%u,m=Math.floor(p/u);let v=[];const g=ne.reedSolomonComputeDivisor(l);for(let b=0,w=0;b<u;b++){let _=c.slice(w,w+m-l+(b<h?0:1));w+=_.length;const P=ne.reedSolomonComputeRemainder(_,g);b<h&&_.push(0),v.push(_.concat(P))}let x=[];for(let b=0;b<v[0].length;b++)v.forEach((w,_)=>{(b!=m-l||_>=h)&&x.push(w[b])});return a(x.length==p),x}drawCodewords(c){if(c.length!=Math.floor(ne.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let o=0;for(let i=this.size-1;i>=1;i-=2){i==6&&(i=5);for(let u=0;u<this.size;u++)for(let l=0;l<2;l++){const p=i-l,m=(i+1&2)==0?this.size-1-u:u;!this.isFunction[m][p]&&o<c.length*8&&(this.modules[m][p]=r(c[o>>>3],7-(o&7)),o++)}}a(o==c.length*8)}applyMask(c){if(c<0||c>7)throw new RangeError("Mask value out of range");for(let o=0;o<this.size;o++)for(let i=0;i<this.size;i++){let u;switch(c){case 0:u=(i+o)%2==0;break;case 1:u=o%2==0;break;case 2:u=i%3==0;break;case 3:u=(i+o)%3==0;break;case 4:u=(Math.floor(i/3)+Math.floor(o/2))%2==0;break;case 5:u=i*o%2+i*o%3==0;break;case 6:u=(i*o%2+i*o%3)%2==0;break;case 7:u=((i+o)%2+i*o%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[o][i]&&u&&(this.modules[o][i]=!this.modules[o][i])}}getPenaltyScore(){let c=0;for(let l=0;l<this.size;l++){let p=!1,h=0,m=[0,0,0,0,0,0,0];for(let v=0;v<this.size;v++)this.modules[l][v]==p?(h++,h==5?c+=ne.PENALTY_N1:h>5&&c++):(this.finderPenaltyAddHistory(h,m),p||(c+=this.finderPenaltyCountPatterns(m)*ne.PENALTY_N3),p=this.modules[l][v],h=1);c+=this.finderPenaltyTerminateAndCount(p,h,m)*ne.PENALTY_N3}for(let l=0;l<this.size;l++){let p=!1,h=0,m=[0,0,0,0,0,0,0];for(let v=0;v<this.size;v++)this.modules[v][l]==p?(h++,h==5?c+=ne.PENALTY_N1:h>5&&c++):(this.finderPenaltyAddHistory(h,m),p||(c+=this.finderPenaltyCountPatterns(m)*ne.PENALTY_N3),p=this.modules[v][l],h=1);c+=this.finderPenaltyTerminateAndCount(p,h,m)*ne.PENALTY_N3}for(let l=0;l<this.size-1;l++)for(let p=0;p<this.size-1;p++){const h=this.modules[l][p];h==this.modules[l][p+1]&&h==this.modules[l+1][p]&&h==this.modules[l+1][p+1]&&(c+=ne.PENALTY_N2)}let o=0;for(const l of this.modules)o=l.reduce((p,h)=>p+(h?1:0),o);const i=this.size*this.size,u=Math.ceil(Math.abs(o*20-i*10)/i)-1;return a(0<=u&&u<=9),c+=u*ne.PENALTY_N4,a(0<=c&&c<=2568888),c}getAlignmentPatternPositions(){if(this.version==1)return[];{const c=Math.floor(this.version/7)+2,o=this.version==32?26:Math.ceil((this.version*4+4)/(c*2-2))*2;let i=[6];for(let u=this.size-7;i.length<c;u-=o)i.splice(1,0,u);return i}}static getNumRawDataModules(c){if(c<ne.MIN_VERSION||c>ne.MAX_VERSION)throw new RangeError("Version number out of range");let o=(16*c+128)*c+64;if(c>=2){const i=Math.floor(c/7)+2;o-=(25*i-10)*i-55,c>=7&&(o-=36)}return a(208<=o&&o<=29648),o}static getNumDataCodewords(c,o){return Math.floor(ne.getNumRawDataModules(c)/8)-ne.ECC_CODEWORDS_PER_BLOCK[o.ordinal][c]*ne.NUM_ERROR_CORRECTION_BLOCKS[o.ordinal][c]}static reedSolomonComputeDivisor(c){if(c<1||c>255)throw new RangeError("Degree out of range");let o=[];for(let u=0;u<c-1;u++)o.push(0);o.push(1);let i=1;for(let u=0;u<c;u++){for(let l=0;l<o.length;l++)o[l]=ne.reedSolomonMultiply(o[l],i),l+1<o.length&&(o[l]^=o[l+1]);i=ne.reedSolomonMultiply(i,2)}return o}static reedSolomonComputeRemainder(c,o){let i=o.map(u=>0);for(const u of c){const l=u^i.shift();i.push(0),o.forEach((p,h)=>i[h]^=ne.reedSolomonMultiply(p,l))}return i}static reedSolomonMultiply(c,o){if(c>>>8||o>>>8)throw new RangeError("Byte out of range");let i=0;for(let u=7;u>=0;u--)i=i<<1^(i>>>7)*285,i^=(o>>>u&1)*c;return a(i>>>8==0),i}finderPenaltyCountPatterns(c){const o=c[1];a(o<=this.size*3);const i=o>0&&c[2]==o&&c[3]==o*3&&c[4]==o&&c[5]==o;return(i&&c[0]>=o*4&&c[6]>=o?1:0)+(i&&c[6]>=o*4&&c[0]>=o?1:0)}finderPenaltyTerminateAndCount(c,o,i){return c&&(this.finderPenaltyAddHistory(o,i),o=0),o+=this.size,this.finderPenaltyAddHistory(o,i),this.finderPenaltyCountPatterns(i)}finderPenaltyAddHistory(c,o){o[0]==0&&(c+=this.size),o.pop(),o.unshift(c)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(d,c,o){if(c<0||c>31||d>>>c)throw new RangeError("Value out of range");for(let i=c-1;i>=0;i--)o.push(d>>>i&1)}function r(d,c){return(d>>>c&1)!=0}function a(d){if(!d)throw new Error("Assertion error")}const s=class le{constructor(c,o,i){if(this.mode=c,this.numChars=o,this.bitData=i,o<0)throw new RangeError("Invalid argument");this.bitData=i.slice()}static makeBytes(c){let o=[];for(const i of c)n(i,8,o);return new le(le.Mode.BYTE,c.length,o)}static makeNumeric(c){if(!le.isNumeric(c))throw new RangeError("String contains non-numeric characters");let o=[];for(let i=0;i<c.length;){const u=Math.min(c.length-i,3);n(parseInt(c.substring(i,i+u),10),u*3+1,o),i+=u}return new le(le.Mode.NUMERIC,c.length,o)}static makeAlphanumeric(c){if(!le.isAlphanumeric(c))throw new RangeError("String contains unencodable characters in alphanumeric mode");let o=[],i;for(i=0;i+2<=c.length;i+=2){let u=le.ALPHANUMERIC_CHARSET.indexOf(c.charAt(i))*45;u+=le.ALPHANUMERIC_CHARSET.indexOf(c.charAt(i+1)),n(u,11,o)}return i<c.length&&n(le.ALPHANUMERIC_CHARSET.indexOf(c.charAt(i)),6,o),new le(le.Mode.ALPHANUMERIC,c.length,o)}static makeSegments(c){return c==""?[]:le.isNumeric(c)?[le.makeNumeric(c)]:le.isAlphanumeric(c)?[le.makeAlphanumeric(c)]:[le.makeBytes(le.toUtf8ByteArray(c))]}static makeEci(c){let o=[];if(c<0)throw new RangeError("ECI assignment value out of range");if(c<128)n(c,8,o);else if(c<16384)n(2,2,o),n(c,14,o);else if(c<1e6)n(6,3,o),n(c,21,o);else throw new RangeError("ECI assignment value out of range");return new le(le.Mode.ECI,0,o)}static isNumeric(c){return le.NUMERIC_REGEX.test(c)}static isAlphanumeric(c){return le.ALPHANUMERIC_REGEX.test(c)}getData(){return this.bitData.slice()}static getTotalBits(c,o){let i=0;for(const u of c){const l=u.mode.numCharCountBits(o);if(u.numChars>=1<<l)return 1/0;i+=4+l+u.bitData.length}return i}static toUtf8ByteArray(c){c=encodeURI(c);let o=[];for(let i=0;i<c.length;i++)c.charAt(i)!="%"?o.push(c.charCodeAt(i)):(o.push(parseInt(c.substring(i+1,i+3),16)),i+=2);return o}};s.NUMERIC_REGEX=/^[0-9]*$/,s.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,s.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let f=s;e.QrSegment=s})(ct||(ct={}));(e=>{(t=>{const n=class{constructor(a,s){this.ordinal=a,this.formatBits=s}};n.LOW=new n(0,1),n.MEDIUM=new n(1,0),n.QUARTILE=new n(2,3),n.HIGH=new n(3,2),t.Ecc=n})(e.QrCode||(e.QrCode={}))})(ct||(ct={}));(e=>{(t=>{const n=class{constructor(a,s){this.modeBits=a,this.numBitsCharCount=s}numCharCountBits(a){return this.numBitsCharCount[Math.floor((a+7)/17)]}};n.NUMERIC=new n(1,[10,12,14]),n.ALPHANUMERIC=new n(2,[9,11,13]),n.BYTE=new n(4,[8,16,16]),n.KANJI=new n(8,[8,10,12]),n.ECI=new n(7,[0,0,0]),t.Mode=n})(e.QrSegment||(e.QrSegment={}))})(ct||(ct={}));var yt=ct;/**
|
|
58
|
+
* @license qrcode.react
|
|
59
|
+
* Copyright (c) Paul O'Shannessy
|
|
60
|
+
* SPDX-License-Identifier: ISC
|
|
61
|
+
*/var fg={L:yt.QrCode.Ecc.LOW,M:yt.QrCode.Ecc.MEDIUM,Q:yt.QrCode.Ecc.QUARTILE,H:yt.QrCode.Ecc.HIGH},_l=128,Rl="L",Sl="#FFFFFF",Cl="#000000",Ol=!1,Pl=1,dg=4,pg=0,hg=.1;function Al(e,t=0){const n=[];return e.forEach(function(r,a){let s=null;r.forEach(function(f,d){if(!f&&s!==null){n.push(`M${s+t} ${a+t}h${d-s}v1H${s+t}z`),s=null;return}if(d===r.length-1){if(!f)return;s===null?n.push(`M${d+t},${a+t} h1v1H${d+t}z`):n.push(`M${s+t},${a+t} h${d+1-s}v1H${s+t}z`);return}f&&s===null&&(s=d)})}),n.join("")}function jl(e,t){return e.slice().map((n,r)=>r<t.y||r>=t.y+t.h?n:n.map((a,s)=>s<t.x||s>=t.x+t.w?a:!1))}function mg(e,t,n,r){if(r==null)return null;const a=e.length+n*2,s=Math.floor(t*hg),f=a/t,d=(r.width||s)*f,c=(r.height||s)*f,o=r.x==null?e.length/2-d/2:r.x*f,i=r.y==null?e.length/2-c/2:r.y*f,u=r.opacity==null?1:r.opacity;let l=null;if(r.excavate){let h=Math.floor(o),m=Math.floor(i),v=Math.ceil(d+o-h),g=Math.ceil(c+i-m);l={x:h,y:m,w:v,h:g}}const p=r.crossOrigin;return{x:o,y:i,h:c,w:d,excavation:l,opacity:u,crossOrigin:p}}function vg(e,t){return t!=null?Math.max(Math.floor(t),0):e?dg:pg}function Ml({value:e,level:t,minVersion:n,includeMargin:r,marginSize:a,imageSettings:s,size:f,boostLevel:d}){let c=S.useMemo(()=>{const h=(Array.isArray(e)?e:[e]).reduce((m,v)=>(m.push(...yt.QrSegment.makeSegments(v)),m),[]);return yt.QrCode.encodeSegments(h,fg[t],n,void 0,void 0,d)},[e,t,n,d]);const{cells:o,margin:i,numCells:u,calculatedImageSettings:l}=S.useMemo(()=>{let p=c.getModules();const h=vg(r,a),m=p.length+h*2,v=mg(p,f,h,s);return{cells:p,margin:h,numCells:m,calculatedImageSettings:v}},[c,f,s,r,a]);return{qrcode:c,margin:i,cells:o,numCells:u,calculatedImageSettings:l}}var gg=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),xg=S.forwardRef(function(t,n){const r=t,{value:a,size:s=_l,level:f=Rl,bgColor:d=Sl,fgColor:c=Cl,includeMargin:o=Ol,minVersion:i=Pl,boostLevel:u,marginSize:l,imageSettings:p}=r,m=Ao(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:v}=m,g=Ao(m,["style"]),x=p==null?void 0:p.src,b=S.useRef(null),w=S.useRef(null),_=S.useCallback(k=>{b.current=k,typeof n=="function"?n(k):n&&(n.current=k)},[n]),[P,C]=S.useState(!1),{margin:j,cells:O,numCells:T,calculatedImageSettings:M}=Ml({value:a,level:f,minVersion:i,boostLevel:u,includeMargin:o,marginSize:l,imageSettings:p,size:s});S.useEffect(()=>{if(b.current!=null){const k=b.current,U=k.getContext("2d");if(!U)return;let $=O;const Y=w.current,V=M!=null&&Y!==null&&Y.complete&&Y.naturalHeight!==0&&Y.naturalWidth!==0;V&&M.excavation!=null&&($=jl(O,M.excavation));const L=window.devicePixelRatio||1;k.height=k.width=s*L;const A=s/T*L;U.scale(A,A),U.fillStyle=d,U.fillRect(0,0,T,T),U.fillStyle=c,gg?U.fill(new Path2D(Al($,j))):O.forEach(function(N,z){N.forEach(function(X,W){X&&U.fillRect(W+j,z+j,1,1)})}),M&&(U.globalAlpha=M.opacity),V&&U.drawImage(Y,M.x+j,M.y+j,M.w,M.h)}}),S.useEffect(()=>{C(!1)},[x]);const D=Po({height:s,width:s},v);let F=null;return x!=null&&(F=S.createElement("img",{src:x,key:x,style:{display:"none"},onLoad:()=>{C(!0)},ref:w,crossOrigin:M==null?void 0:M.crossOrigin})),S.createElement(S.Fragment,null,S.createElement("canvas",Po({style:D,height:s,width:s,ref:_,role:"img"},g)),F)});xg.displayName="QRCodeCanvas";var Tl=S.forwardRef(function(t,n){const r=t,{value:a,size:s=_l,level:f=Rl,bgColor:d=Sl,fgColor:c=Cl,includeMargin:o=Ol,minVersion:i=Pl,boostLevel:u,title:l,marginSize:p,imageSettings:h}=r,m=Ao(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:v,cells:g,numCells:x,calculatedImageSettings:b}=Ml({value:a,level:f,minVersion:i,boostLevel:u,includeMargin:o,marginSize:p,imageSettings:h,size:s});let w=g,_=null;h!=null&&b!=null&&(b.excavation!=null&&(w=jl(g,b.excavation)),_=S.createElement("image",{href:h.src,height:b.h,width:b.w,x:b.x+v,y:b.y+v,preserveAspectRatio:"none",opacity:b.opacity,crossOrigin:b.crossOrigin}));const P=Al(w,v);return S.createElement("svg",Po({height:s,width:s,viewBox:`0 0 ${x} ${x}`,ref:n,role:"img"},m),!!l&&S.createElement("title",null,l),S.createElement("path",{fill:d,d:`M0,0 h${x}v${x}H0z`,shapeRendering:"crispEdges"}),S.createElement("path",{fill:c,d:P,shapeRendering:"crispEdges"}),_)});Tl.displayName="QRCodeSVG";var xn={},jt={},yn={},la;function _e(){if(la)return yn;la=1,Object.defineProperty(yn,"__esModule",{value:!0});function e(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}var t=function n(r,a){e(this,n),this.data=r,this.text=a.text||r,this.options=a};return yn.default=t,yn}var fa;function yg(){if(fa)return jt;fa=1,Object.defineProperty(jt,"__esModule",{value:!0}),jt.CODE39=void 0;var e=(function(){function m(v,g){for(var x=0;x<g.length;x++){var b=g[x];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,g,x){return g&&m(v.prototype,g),x&&m(v,x),v}})(),t=_e(),n=r(t);function r(m){return m&&m.__esModule?m:{default:m}}function a(m,v){if(!(m instanceof v))throw new TypeError("Cannot call a class as a function")}function s(m,v){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:m}function f(m,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);m.prototype=Object.create(v&&v.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(m,v):m.__proto__=v)}var d=(function(m){f(v,m);function v(g,x){return a(this,v),g=g.toUpperCase(),x.mod43&&(g+=l(h(g))),s(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,g,x))}return e(v,[{key:"encode",value:function(){for(var x=i("*"),b=0;b<this.data.length;b++)x+=i(this.data[b])+"0";return x+=i("*"),{data:x,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),v})(n.default),c=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],o=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function i(m){return u(p(m))}function u(m){return o[m].toString(2)}function l(m){return c[m]}function p(m){return c.indexOf(m)}function h(m){for(var v=0,g=0;g<m.length;g++)v+=p(m[g]);return v=v%43,v}return jt.CODE39=d,jt}var Pe={},En={},bn={},ue={},da;function rn(){if(da)return ue;da=1,Object.defineProperty(ue,"__esModule",{value:!0});var e;function t(c,o,i){return o in c?Object.defineProperty(c,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):c[o]=i,c}var n=ue.SET_A=0,r=ue.SET_B=1,a=ue.SET_C=2;ue.SHIFT=98;var s=ue.START_A=103,f=ue.START_B=104,d=ue.START_C=105;return ue.MODULO=103,ue.STOP=106,ue.FNC1=207,ue.SET_BY_CODE=(e={},t(e,s,n),t(e,f,r),t(e,d,a),e),ue.SWAP={101:n,100:r,99:a},ue.A_START_CHAR="Ð",ue.B_START_CHAR="Ñ",ue.C_START_CHAR="Ò",ue.A_CHARS="[\0-_È-Ï]",ue.B_CHARS="[ -È-Ï]",ue.C_CHARS="(Ï*[0-9]{2}Ï*)",ue.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011],ue}var pa;function Fr(){if(pa)return bn;pa=1,Object.defineProperty(bn,"__esModule",{value:!0});var e=(function(){function o(i,u){for(var l=0;l<u.length;l++){var p=u[l];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}return function(i,u,l){return u&&o(i.prototype,u),l&&o(i,l),i}})(),t=_e(),n=a(t),r=rn();function a(o){return o&&o.__esModule?o:{default:o}}function s(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function f(o,i){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:o}function d(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(o,i):o.__proto__=i)}var c=(function(o){d(i,o);function i(u,l){s(this,i);var p=f(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,u.substring(1),l));return p.bytes=u.split("").map(function(h){return h.charCodeAt(0)}),p}return e(i,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var l=this.bytes,p=l.shift()-105,h=r.SET_BY_CODE[p];if(h===void 0)throw new RangeError("The encoding does not start with a start character.");this.shouldEncodeAsEan128()===!0&&l.unshift(r.FNC1);var m=i.next(l,1,h);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:i.getBar(p)+m.result+i.getBar((m.checksum+p)%r.MODULO)+i.getBar(r.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var l=this.options.ean128||!1;return typeof l=="string"&&(l=l.toLowerCase()==="true"),l}}],[{key:"getBar",value:function(l){return r.BARS[l]?r.BARS[l].toString():""}},{key:"correctIndex",value:function(l,p){if(p===r.SET_A){var h=l.shift();return h<32?h+64:h-32}else return p===r.SET_B?l.shift()-32:(l.shift()-48)*10+l.shift()-48}},{key:"next",value:function(l,p,h){if(!l.length)return{result:"",checksum:0};var m=void 0,v=void 0;if(l[0]>=200){v=l.shift()-105;var g=r.SWAP[v];g!==void 0?m=i.next(l,p+1,g):((h===r.SET_A||h===r.SET_B)&&v===r.SHIFT&&(l[0]=h===r.SET_A?l[0]>95?l[0]-96:l[0]:l[0]<32?l[0]+96:l[0]),m=i.next(l,p+1,h))}else v=i.correctIndex(l,h),m=i.next(l,p+1,h);var x=i.getBar(v),b=v*p;return{result:x+m.result,checksum:b+m.checksum}}}]),i})(n.default);return bn.default=c,bn}var wn={},ha;function Eg(){if(ha)return wn;ha=1,Object.defineProperty(wn,"__esModule",{value:!0});var e=rn(),t=function(d){return d.match(new RegExp("^"+e.A_CHARS+"*"))[0].length},n=function(d){return d.match(new RegExp("^"+e.B_CHARS+"*"))[0].length},r=function(d){return d.match(new RegExp("^"+e.C_CHARS+"*"))[0]};function a(f,d){var c=d?e.A_CHARS:e.B_CHARS,o=f.match(new RegExp("^("+c+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(o)return o[1]+"Ì"+s(f.substring(o[1].length));var i=f.match(new RegExp("^"+c+"+"))[0];return i.length===f.length?f:i+String.fromCharCode(d?205:206)+a(f.substring(i.length),!d)}function s(f){var d=r(f),c=d.length;if(c===f.length)return f;f=f.substring(c);var o=t(f)>=n(f);return d+String.fromCharCode(o?206:205)+a(f,o)}return wn.default=function(f){var d=void 0,c=r(f).length;if(c>=2)d=e.C_START_CHAR+s(f);else{var o=t(f)>n(f);d=(o?e.A_START_CHAR:e.B_START_CHAR)+a(f,o)}return d.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(i,u){return"Ë"+u})},wn}var ma;function bg(){if(ma)return En;ma=1,Object.defineProperty(En,"__esModule",{value:!0});var e=Fr(),t=a(e),n=Eg(),r=a(n);function a(o){return o&&o.__esModule?o:{default:o}}function s(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function f(o,i){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:o}function d(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(o,i):o.__proto__=i)}var c=(function(o){d(i,o);function i(u,l){if(s(this,i),/^[\x00-\x7F\xC8-\xD3]+$/.test(u))var p=f(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,(0,r.default)(u),l));else var p=f(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,u,l));return f(p)}return i})(t.default);return En.default=c,En}var _n={},va;function wg(){if(va)return _n;va=1,Object.defineProperty(_n,"__esModule",{value:!0});var e=(function(){function o(i,u){for(var l=0;l<u.length;l++){var p=u[l];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}return function(i,u,l){return u&&o(i.prototype,u),l&&o(i,l),i}})(),t=Fr(),n=a(t),r=rn();function a(o){return o&&o.__esModule?o:{default:o}}function s(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function f(o,i){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:o}function d(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(o,i):o.__proto__=i)}var c=(function(o){d(i,o);function i(u,l){return s(this,i),f(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,r.A_START_CHAR+u,l))}return e(i,[{key:"valid",value:function(){return new RegExp("^"+r.A_CHARS+"+$").test(this.data)}}]),i})(n.default);return _n.default=c,_n}var Rn={},ga;function _g(){if(ga)return Rn;ga=1,Object.defineProperty(Rn,"__esModule",{value:!0});var e=(function(){function o(i,u){for(var l=0;l<u.length;l++){var p=u[l];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}return function(i,u,l){return u&&o(i.prototype,u),l&&o(i,l),i}})(),t=Fr(),n=a(t),r=rn();function a(o){return o&&o.__esModule?o:{default:o}}function s(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function f(o,i){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:o}function d(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(o,i):o.__proto__=i)}var c=(function(o){d(i,o);function i(u,l){return s(this,i),f(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,r.B_START_CHAR+u,l))}return e(i,[{key:"valid",value:function(){return new RegExp("^"+r.B_CHARS+"+$").test(this.data)}}]),i})(n.default);return Rn.default=c,Rn}var Sn={},xa;function Rg(){if(xa)return Sn;xa=1,Object.defineProperty(Sn,"__esModule",{value:!0});var e=(function(){function o(i,u){for(var l=0;l<u.length;l++){var p=u[l];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}return function(i,u,l){return u&&o(i.prototype,u),l&&o(i,l),i}})(),t=Fr(),n=a(t),r=rn();function a(o){return o&&o.__esModule?o:{default:o}}function s(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function f(o,i){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:o}function d(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(o,i):o.__proto__=i)}var c=(function(o){d(i,o);function i(u,l){return s(this,i),f(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,r.C_START_CHAR+u,l))}return e(i,[{key:"valid",value:function(){return new RegExp("^"+r.C_CHARS+"+$").test(this.data)}}]),i})(n.default);return Sn.default=c,Sn}var ya;function Sg(){if(ya)return Pe;ya=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.CODE128C=Pe.CODE128B=Pe.CODE128A=Pe.CODE128=void 0;var e=bg(),t=c(e),n=wg(),r=c(n),a=_g(),s=c(a),f=Rg(),d=c(f);function c(o){return o&&o.__esModule?o:{default:o}}return Pe.CODE128=t.default,Pe.CODE128A=r.default,Pe.CODE128B=s.default,Pe.CODE128C=d.default,Pe}var he={},Cn={},ze={},Ea;function on(){return Ea||(Ea=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.SIDE_BIN="101",ze.MIDDLE_BIN="01010",ze.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},ze.EAN2_STRUCTURE=["LL","LG","GL","GG"],ze.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],ze.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]),ze}var On={},Pn={},ba;function an(){if(ba)return Pn;ba=1,Object.defineProperty(Pn,"__esModule",{value:!0});var e=on(),t=function(r,a,s){var f=r.split("").map(function(c,o){return e.BINARIES[a[o]]}).map(function(c,o){return c?c[r[o]]:""});if(s){var d=r.length-1;f=f.map(function(c,o){return o<d?c+s:c})}return f.join("")};return Pn.default=t,Pn}var wa;function Il(){if(wa)return On;wa=1,Object.defineProperty(On,"__esModule",{value:!0});var e=(function(){function u(l,p){for(var h=0;h<p.length;h++){var m=p[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(l,m.key,m)}}return function(l,p,h){return p&&u(l.prototype,p),h&&u(l,h),l}})(),t=on(),n=an(),r=f(n),a=_e(),s=f(a);function f(u){return u&&u.__esModule?u:{default:u}}function d(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}function c(u,l){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:u}function o(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(u,l):u.__proto__=l)}var i=(function(u){o(l,u);function l(p,h){d(this,l);var m=c(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,p,h));return m.fontSize=!h.flat&&h.fontSize>h.width*10?h.width*10:h.fontSize,m.guardHeight=h.height+m.fontSize/2+h.textMargin,m}return e(l,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(h,m){return this.text.substr(h,m)}},{key:"leftEncode",value:function(h,m){return(0,r.default)(h,m)}},{key:"rightText",value:function(h,m){return this.text.substr(h,m)}},{key:"rightEncode",value:function(h,m){return(0,r.default)(h,m)}},{key:"encodeGuarded",value:function(){var h={fontSize:this.fontSize},m={height:this.guardHeight};return[{data:t.SIDE_BIN,options:m},{data:this.leftEncode(),text:this.leftText(),options:h},{data:t.MIDDLE_BIN,options:m},{data:this.rightEncode(),text:this.rightText(),options:h},{data:t.SIDE_BIN,options:m}]}},{key:"encodeFlat",value:function(){var h=[t.SIDE_BIN,this.leftEncode(),t.MIDDLE_BIN,this.rightEncode(),t.SIDE_BIN];return{data:h.join(""),text:this.text}}}]),l})(s.default);return On.default=i,On}var _a;function Cg(){if(_a)return Cn;_a=1,Object.defineProperty(Cn,"__esModule",{value:!0});var e=(function(){function u(l,p){for(var h=0;h<p.length;h++){var m=p[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(l,m.key,m)}}return function(l,p,h){return p&&u(l.prototype,p),h&&u(l,h),l}})(),t=function u(l,p,h){l===null&&(l=Function.prototype);var m=Object.getOwnPropertyDescriptor(l,p);if(m===void 0){var v=Object.getPrototypeOf(l);return v===null?void 0:u(v,p,h)}else{if("value"in m)return m.value;var g=m.get;return g===void 0?void 0:g.call(h)}},n=on(),r=Il(),a=s(r);function s(u){return u&&u.__esModule?u:{default:u}}function f(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}function d(u,l){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:u}function c(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(u,l):u.__proto__=l)}var o=function(l){var p=l.substr(0,12).split("").map(function(h){return+h}).reduce(function(h,m,v){return v%2?h+m*3:h+m},0);return(10-p%10)%10},i=(function(u){c(l,u);function l(p,h){f(this,l),p.search(/^[0-9]{12}$/)!==-1&&(p+=o(p));var m=d(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,p,h));return m.lastChar=h.lastChar,m}return e(l,[{key:"valid",value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===o(this.data)}},{key:"leftText",value:function(){return t(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var h=this.data.substr(1,6),m=n.EAN13_STRUCTURE[this.data[0]];return t(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"leftEncode",this).call(this,h,m)}},{key:"rightText",value:function(){return t(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var h=this.data.substr(7,6);return t(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"rightEncode",this).call(this,h,"RRRRRR")}},{key:"encodeGuarded",value:function(){var h=t(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(h.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(h.push({data:"00"}),h.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),h}}]),l})(a.default);return Cn.default=i,Cn}var An={},Ra;function Og(){if(Ra)return An;Ra=1,Object.defineProperty(An,"__esModule",{value:!0});var e=(function(){function i(u,l){for(var p=0;p<l.length;p++){var h=l[p];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(u,h.key,h)}}return function(u,l,p){return l&&i(u.prototype,l),p&&i(u,p),u}})(),t=function i(u,l,p){u===null&&(u=Function.prototype);var h=Object.getOwnPropertyDescriptor(u,l);if(h===void 0){var m=Object.getPrototypeOf(u);return m===null?void 0:i(m,l,p)}else{if("value"in h)return h.value;var v=h.get;return v===void 0?void 0:v.call(p)}},n=Il(),r=a(n);function a(i){return i&&i.__esModule?i:{default:i}}function s(i,u){if(!(i instanceof u))throw new TypeError("Cannot call a class as a function")}function f(i,u){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:i}function d(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(i,u):i.__proto__=u)}var c=function(u){var l=u.substr(0,7).split("").map(function(p){return+p}).reduce(function(p,h,m){return m%2?p+h:p+h*3},0);return(10-l%10)%10},o=(function(i){d(u,i);function u(l,p){return s(this,u),l.search(/^[0-9]{7}$/)!==-1&&(l+=c(l)),f(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,l,p))}return e(u,[{key:"valid",value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===c(this.data)}},{key:"leftText",value:function(){return t(u.prototype.__proto__||Object.getPrototypeOf(u.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var p=this.data.substr(0,4);return t(u.prototype.__proto__||Object.getPrototypeOf(u.prototype),"leftEncode",this).call(this,p,"LLLL")}},{key:"rightText",value:function(){return t(u.prototype.__proto__||Object.getPrototypeOf(u.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var p=this.data.substr(4,4);return t(u.prototype.__proto__||Object.getPrototypeOf(u.prototype),"rightEncode",this).call(this,p,"RRRR")}}]),u})(r.default);return An.default=o,An}var jn={},Sa;function Pg(){if(Sa)return jn;Sa=1,Object.defineProperty(jn,"__esModule",{value:!0});var e=(function(){function l(p,h){for(var m=0;m<h.length;m++){var v=h[m];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(p,v.key,v)}}return function(p,h,m){return h&&l(p.prototype,h),m&&l(p,m),p}})(),t=on(),n=an(),r=f(n),a=_e(),s=f(a);function f(l){return l&&l.__esModule?l:{default:l}}function d(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")}function c(l,p){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:l}function o(l,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);l.prototype=Object.create(p&&p.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(l,p):l.__proto__=p)}var i=function(p){var h=p.split("").map(function(m){return+m}).reduce(function(m,v,g){return g%2?m+v*9:m+v*3},0);return h%10},u=(function(l){o(p,l);function p(h,m){return d(this,p),c(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,h,m))}return e(p,[{key:"valid",value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:"encode",value:function(){var m=t.EAN5_STRUCTURE[i(this.data)];return{data:"1011"+(0,r.default)(this.data,m,"01"),text:this.text}}}]),p})(s.default);return jn.default=u,jn}var Mn={},Ca;function Ag(){if(Ca)return Mn;Ca=1,Object.defineProperty(Mn,"__esModule",{value:!0});var e=(function(){function u(l,p){for(var h=0;h<p.length;h++){var m=p[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(l,m.key,m)}}return function(l,p,h){return p&&u(l.prototype,p),h&&u(l,h),l}})(),t=on(),n=an(),r=f(n),a=_e(),s=f(a);function f(u){return u&&u.__esModule?u:{default:u}}function d(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}function c(u,l){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:u}function o(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(u,l):u.__proto__=l)}var i=(function(u){o(l,u);function l(p,h){return d(this,l),c(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,p,h))}return e(l,[{key:"valid",value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:"encode",value:function(){var h=t.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,r.default)(this.data,h,"01"),text:this.text}}}]),l})(s.default);return Mn.default=i,Mn}var Mt={},Oa;function Nl(){if(Oa)return Mt;Oa=1,Object.defineProperty(Mt,"__esModule",{value:!0});var e=(function(){function u(l,p){for(var h=0;h<p.length;h++){var m=p[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(l,m.key,m)}}return function(l,p,h){return p&&u(l.prototype,p),h&&u(l,h),l}})();Mt.checksum=i;var t=an(),n=s(t),r=_e(),a=s(r);function s(u){return u&&u.__esModule?u:{default:u}}function f(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}function d(u,l){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:u}function c(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(u,l):u.__proto__=l)}var o=(function(u){c(l,u);function l(p,h){f(this,l),p.search(/^[0-9]{11}$/)!==-1&&(p+=i(p));var m=d(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,p,h));return m.displayValue=h.displayValue,h.fontSize>h.width*10?m.fontSize=h.width*10:m.fontSize=h.fontSize,m.guardHeight=h.height+m.fontSize/2+h.textMargin,m}return e(l,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==i(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var h="";return h+="101",h+=(0,n.default)(this.data.substr(0,6),"LLLLLL"),h+="01010",h+=(0,n.default)(this.data.substr(6,6),"RRRRRR"),h+="101",{data:h,text:this.text}}},{key:"guardedEncoding",value:function(){var h=[];return this.displayValue&&h.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),h.push({data:"101"+(0,n.default)(this.data[0],"L"),options:{height:this.guardHeight}}),h.push({data:(0,n.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),h.push({data:"01010",options:{height:this.guardHeight}}),h.push({data:(0,n.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),h.push({data:(0,n.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&h.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),h}}]),l})(a.default);function i(u){var l=0,p;for(p=1;p<11;p+=2)l+=parseInt(u[p]);for(p=0;p<11;p+=2)l+=parseInt(u[p])*3;return(10-l%10)%10}return Mt.default=o,Mt}var Tn={},Pa;function jg(){if(Pa)return Tn;Pa=1,Object.defineProperty(Tn,"__esModule",{value:!0});var e=(function(){function h(m,v){for(var g=0;g<v.length;g++){var x=v[g];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,v,g){return v&&h(m.prototype,v),g&&h(m,g),m}})(),t=an(),n=f(t),r=_e(),a=f(r),s=Nl();function f(h){return h&&h.__esModule?h:{default:h}}function d(h,m){if(!(h instanceof m))throw new TypeError("Cannot call a class as a function")}function c(h,m){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:h}function o(h,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);h.prototype=Object.create(m&&m.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(h,m):h.__proto__=m)}var i=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],u=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],l=(function(h){o(m,h);function m(v,g){d(this,m);var x=c(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,v,g));if(x.isValid=!1,v.search(/^[0-9]{6}$/)!==-1)x.middleDigits=v,x.upcA=p(v,"0"),x.text=g.text||""+x.upcA[0]+v+x.upcA[x.upcA.length-1],x.isValid=!0;else if(v.search(/^[01][0-9]{7}$/)!==-1)if(x.middleDigits=v.substring(1,v.length-1),x.upcA=p(x.middleDigits,v[0]),x.upcA[x.upcA.length-1]===v[v.length-1])x.isValid=!0;else return c(x);else return c(x);return x.displayValue=g.displayValue,g.fontSize>g.width*10?x.fontSize=g.width*10:x.fontSize=g.fontSize,x.guardHeight=g.height+x.fontSize/2+g.textMargin,x}return e(m,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var g="";return g+="101",g+=this.encodeMiddleDigits(),g+="010101",{data:g,text:this.text}}},{key:"guardedEncoding",value:function(){var g=[];return this.displayValue&&g.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),g.push({data:"101",options:{height:this.guardHeight}}),g.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),g.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&g.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),g}},{key:"encodeMiddleDigits",value:function(){var g=this.upcA[0],x=this.upcA[this.upcA.length-1],b=u[parseInt(x)][parseInt(g)];return(0,n.default)(this.middleDigits,b)}}]),m})(a.default);function p(h,m){for(var v=parseInt(h[h.length-1]),g=i[v],x="",b=0,w=0;w<g.length;w++){var _=g[w];_==="X"?x+=h[b++]:x+=_}return x=""+m+x,""+x+(0,s.checksum)(x)}return Tn.default=l,Tn}var Aa;function Mg(){if(Aa)return he;Aa=1,Object.defineProperty(he,"__esModule",{value:!0}),he.UPCE=he.UPC=he.EAN2=he.EAN5=he.EAN8=he.EAN13=void 0;var e=Cg(),t=l(e),n=Og(),r=l(n),a=Pg(),s=l(a),f=Ag(),d=l(f),c=Nl(),o=l(c),i=jg(),u=l(i);function l(p){return p&&p.__esModule?p:{default:p}}return he.EAN13=t.default,he.EAN8=r.default,he.EAN5=s.default,he.EAN2=d.default,he.UPC=o.default,he.UPCE=u.default,he}var tt={},In={},vt={},ja;function Tg(){return ja||(ja=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.START_BIN="1010",vt.END_BIN="11101",vt.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]),vt}var Ma;function Dl(){if(Ma)return In;Ma=1,Object.defineProperty(In,"__esModule",{value:!0});var e=(function(){function o(i,u){for(var l=0;l<u.length;l++){var p=u[l];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}return function(i,u,l){return u&&o(i.prototype,u),l&&o(i,l),i}})(),t=Tg(),n=_e(),r=a(n);function a(o){return o&&o.__esModule?o:{default:o}}function s(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function f(o,i){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:o}function d(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(o,i):o.__proto__=i)}var c=(function(o){d(i,o);function i(){return s(this,i),f(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return e(i,[{key:"valid",value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:"encode",value:function(){var l=this,p=this.data.match(/.{2}/g).map(function(h){return l.encodePair(h)}).join("");return{data:t.START_BIN+p+t.END_BIN,text:this.text}}},{key:"encodePair",value:function(l){var p=t.BINARIES[l[1]];return t.BINARIES[l[0]].split("").map(function(h,m){return(h==="1"?"111":"1")+(p[m]==="1"?"000":"0")}).join("")}}]),i})(r.default);return In.default=c,In}var Nn={},Ta;function Ig(){if(Ta)return Nn;Ta=1,Object.defineProperty(Nn,"__esModule",{value:!0});var e=(function(){function o(i,u){for(var l=0;l<u.length;l++){var p=u[l];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}return function(i,u,l){return u&&o(i.prototype,u),l&&o(i,l),i}})(),t=Dl(),n=r(t);function r(o){return o&&o.__esModule?o:{default:o}}function a(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function s(o,i){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:o}function f(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(o,i):o.__proto__=i)}var d=function(i){var u=i.substr(0,13).split("").map(function(l){return parseInt(l,10)}).reduce(function(l,p,h){return l+p*(3-h%2*2)},0);return Math.ceil(u/10)*10-u},c=(function(o){f(i,o);function i(u,l){return a(this,i),u.search(/^[0-9]{13}$/)!==-1&&(u+=d(u)),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,u,l))}return e(i,[{key:"valid",value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===d(this.data)}}]),i})(n.default);return Nn.default=c,Nn}var Ia;function Ng(){if(Ia)return tt;Ia=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.ITF14=tt.ITF=void 0;var e=Dl(),t=a(e),n=Ig(),r=a(n);function a(s){return s&&s.__esModule?s:{default:s}}return tt.ITF=t.default,tt.ITF14=r.default,tt}var ge={},Dn={},Na;function sn(){if(Na)return Dn;Na=1,Object.defineProperty(Dn,"__esModule",{value:!0});var e=(function(){function o(i,u){for(var l=0;l<u.length;l++){var p=u[l];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}return function(i,u,l){return u&&o(i.prototype,u),l&&o(i,l),i}})(),t=_e(),n=r(t);function r(o){return o&&o.__esModule?o:{default:o}}function a(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function s(o,i){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:o}function f(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(o,i):o.__proto__=i)}var d=(function(o){f(i,o);function i(u,l){return a(this,i),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,u,l))}return e(i,[{key:"encode",value:function(){for(var l="110",p=0;p<this.data.length;p++){var h=parseInt(this.data[p]),m=h.toString(2);m=c(m,4-m.length);for(var v=0;v<m.length;v++)l+=m[v]=="0"?"100":"110"}return l+="1001",{data:l,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),i})(n.default);function c(o,i){for(var u=0;u<i;u++)o="0"+o;return o}return Dn.default=d,Dn}var kn={},Tt={},Da;function $r(){if(Da)return Tt;Da=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.mod10=e,Tt.mod11=t;function e(n){for(var r=0,a=0;a<n.length;a++){var s=parseInt(n[a]);(a+n.length)%2===0?r+=s:r+=s*2%10+Math.floor(s*2/10)}return(10-r%10)%10}function t(n){for(var r=0,a=[2,3,4,5,6,7],s=0;s<n.length;s++){var f=parseInt(n[n.length-1-s]);r+=a[s%a.length]*f}return(11-r%11)%11}return Tt}var ka;function Dg(){if(ka)return kn;ka=1,Object.defineProperty(kn,"__esModule",{value:!0});var e=sn(),t=r(e),n=$r();function r(c){return c&&c.__esModule?c:{default:c}}function a(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}function s(c,o){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:c}function f(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);c.prototype=Object.create(o&&o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(c,o):c.__proto__=o)}var d=(function(c){f(o,c);function o(i,u){return a(this,o),s(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,i+(0,n.mod10)(i),u))}return o})(t.default);return kn.default=d,kn}var Ln={},La;function kg(){if(La)return Ln;La=1,Object.defineProperty(Ln,"__esModule",{value:!0});var e=sn(),t=r(e),n=$r();function r(c){return c&&c.__esModule?c:{default:c}}function a(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}function s(c,o){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:c}function f(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);c.prototype=Object.create(o&&o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(c,o):c.__proto__=o)}var d=(function(c){f(o,c);function o(i,u){return a(this,o),s(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,i+(0,n.mod11)(i),u))}return o})(t.default);return Ln.default=d,Ln}var Fn={},Fa;function Lg(){if(Fa)return Fn;Fa=1,Object.defineProperty(Fn,"__esModule",{value:!0});var e=sn(),t=r(e),n=$r();function r(c){return c&&c.__esModule?c:{default:c}}function a(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}function s(c,o){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:c}function f(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);c.prototype=Object.create(o&&o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(c,o):c.__proto__=o)}var d=(function(c){f(o,c);function o(i,u){return a(this,o),i+=(0,n.mod10)(i),i+=(0,n.mod10)(i),s(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,i,u))}return o})(t.default);return Fn.default=d,Fn}var $n={},$a;function Fg(){if($a)return $n;$a=1,Object.defineProperty($n,"__esModule",{value:!0});var e=sn(),t=r(e),n=$r();function r(c){return c&&c.__esModule?c:{default:c}}function a(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}function s(c,o){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:c}function f(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);c.prototype=Object.create(o&&o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(c,o):c.__proto__=o)}var d=(function(c){f(o,c);function o(i,u){return a(this,o),i+=(0,n.mod11)(i),i+=(0,n.mod10)(i),s(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,i,u))}return o})(t.default);return $n.default=d,$n}var Ba;function $g(){if(Ba)return ge;Ba=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.MSI1110=ge.MSI1010=ge.MSI11=ge.MSI10=ge.MSI=void 0;var e=sn(),t=i(e),n=Dg(),r=i(n),a=kg(),s=i(a),f=Lg(),d=i(f),c=Fg(),o=i(c);function i(u){return u&&u.__esModule?u:{default:u}}return ge.MSI=t.default,ge.MSI10=r.default,ge.MSI11=s.default,ge.MSI1010=d.default,ge.MSI1110=o.default,ge}var It={},Ga;function Bg(){if(Ga)return It;Ga=1,Object.defineProperty(It,"__esModule",{value:!0}),It.pharmacode=void 0;var e=(function(){function c(o,i){for(var u=0;u<i.length;u++){var l=i[u];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(o,l.key,l)}}return function(o,i,u){return i&&c(o.prototype,i),u&&c(o,u),o}})(),t=_e(),n=r(t);function r(c){return c&&c.__esModule?c:{default:c}}function a(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}function s(c,o){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:c}function f(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);c.prototype=Object.create(o&&o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(c,o):c.__proto__=o)}var d=(function(c){f(o,c);function o(i,u){a(this,o);var l=s(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,i,u));return l.number=parseInt(i,10),l}return e(o,[{key:"encode",value:function(){for(var u=this.number,l="";!isNaN(u)&&u!=0;)u%2===0?(l="11100"+l,u=(u-2)/2):(l="100"+l,u=(u-1)/2);return l=l.slice(0,-2),{data:l,text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),o})(n.default);return It.pharmacode=d,It}var Nt={},Va;function Gg(){if(Va)return Nt;Va=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.codabar=void 0;var e=(function(){function c(o,i){for(var u=0;u<i.length;u++){var l=i[u];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(o,l.key,l)}}return function(o,i,u){return i&&c(o.prototype,i),u&&c(o,u),o}})(),t=_e(),n=r(t);function r(c){return c&&c.__esModule?c:{default:c}}function a(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}function s(c,o){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:c}function f(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);c.prototype=Object.create(o&&o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(c,o):c.__proto__=o)}var d=(function(c){f(o,c);function o(i,u){a(this,o),i.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(i="A"+i+"A");var l=s(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,i.toUpperCase(),u));return l.text=l.options.text||l.text.replace(/[A-D]/g,""),l}return e(o,[{key:"valid",value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:"encode",value:function(){for(var u=[],l=this.getEncodings(),p=0;p<this.data.length;p++)u.push(l[this.data.charAt(p)]),p!==this.data.length-1&&u.push("0");return{text:this.text,data:u.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),o})(n.default);return Nt.codabar=d,Nt}var nt={},Bn={},gt={},za;function Vg(){return za||(za=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.SYMBOLS=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],gt.BINARIES=["100010100","101001000","101000100","101000010","100101000","100100100","100100010","101010000","100010010","100001010","110101000","110100100","110100010","110010100","110010010","110001010","101101000","101100100","101100010","100110100","100011010","101011000","101001100","101000110","100101100","100010110","110110100","110110010","110101100","110100110","110010110","110011010","101101100","101100110","100110110","100111010","100101110","111010100","111010010","111001010","101101110","101110110","110101110","100100110","111011010","111010110","100110010","101011110"],gt.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"\x07":["($)","G"],"\b":["($)","H"]," ":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"\x1B":["(%)","A"],"":["(%)","B"],"":["(%)","C"],"":["(%)","D"],"":["(%)","E"],"!":["(/)","A"],'"':["(/)","B"],"#":["(/)","C"],"&":["(/)","F"],"'":["(/)","G"],"(":["(/)","H"],")":["(/)","I"],"*":["(/)","J"],",":["(/)","L"],":":["(/)","Z"],";":["(%)","F"],"<":["(%)","G"],"=":["(%)","H"],">":["(%)","I"],"?":["(%)","J"],"@":["(%)","V"],"[":["(%)","K"],"\\":["(%)","L"],"]":["(%)","M"],"^":["(%)","N"],_:["(%)","O"],"`":["(%)","W"],a:["(+)","A"],b:["(+)","B"],c:["(+)","C"],d:["(+)","D"],e:["(+)","E"],f:["(+)","F"],g:["(+)","G"],h:["(+)","H"],i:["(+)","I"],j:["(+)","J"],k:["(+)","K"],l:["(+)","L"],m:["(+)","M"],n:["(+)","N"],o:["(+)","O"],p:["(+)","P"],q:["(+)","Q"],r:["(+)","R"],s:["(+)","S"],t:["(+)","T"],u:["(+)","U"],v:["(+)","V"],w:["(+)","W"],x:["(+)","X"],y:["(+)","Y"],z:["(+)","Z"],"{":["(%)","P"],"|":["(%)","Q"],"}":["(%)","R"],"~":["(%)","S"],"":["(%)","T"]}),gt}var Ua;function kl(){if(Ua)return Bn;Ua=1,Object.defineProperty(Bn,"__esModule",{value:!0});var e=(function(){function o(i,u){for(var l=0;l<u.length;l++){var p=u[l];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}return function(i,u,l){return u&&o(i.prototype,u),l&&o(i,l),i}})(),t=Vg(),n=_e(),r=a(n);function a(o){return o&&o.__esModule?o:{default:o}}function s(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function f(o,i){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:o}function d(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(o,i):o.__proto__=i)}var c=(function(o){d(i,o);function i(u,l){return s(this,i),f(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,u,l))}return e(i,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var l=this.data.split("").flatMap(function(v){return t.MULTI_SYMBOLS[v]||v}),p=l.map(function(v){return i.getEncoding(v)}).join(""),h=i.checksum(l,20),m=i.checksum(l.concat(h),15);return{text:this.text,data:i.getEncoding("ÿ")+p+i.getEncoding(h)+i.getEncoding(m)+i.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(l){return t.BINARIES[i.symbolValue(l)]}},{key:"getSymbol",value:function(l){return t.SYMBOLS[l]}},{key:"symbolValue",value:function(l){return t.SYMBOLS.indexOf(l)}},{key:"checksum",value:function(l,p){var h=l.slice().reverse().reduce(function(m,v,g){var x=g%p+1;return m+i.symbolValue(v)*x},0);return i.getSymbol(h%47)}}]),i})(r.default);return Bn.default=c,Bn}var Gn={},qa;function zg(){if(qa)return Gn;qa=1,Object.defineProperty(Gn,"__esModule",{value:!0});var e=(function(){function c(o,i){for(var u=0;u<i.length;u++){var l=i[u];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(o,l.key,l)}}return function(o,i,u){return i&&c(o.prototype,i),u&&c(o,u),o}})(),t=kl(),n=r(t);function r(c){return c&&c.__esModule?c:{default:c}}function a(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}function s(c,o){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:c}function f(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);c.prototype=Object.create(o&&o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(c,o):c.__proto__=o)}var d=(function(c){f(o,c);function o(i,u){return a(this,o),s(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,i,u))}return e(o,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),o})(n.default);return Gn.default=d,Gn}var Ha;function Ug(){if(Ha)return nt;Ha=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.CODE93FullASCII=nt.CODE93=void 0;var e=kl(),t=a(e),n=zg(),r=a(n);function a(s){return s&&s.__esModule?s:{default:s}}return nt.CODE93=t.default,nt.CODE93FullASCII=r.default,nt}var Dt={},Wa;function qg(){if(Wa)return Dt;Wa=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.GenericBarcode=void 0;var e=(function(){function c(o,i){for(var u=0;u<i.length;u++){var l=i[u];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(o,l.key,l)}}return function(o,i,u){return i&&c(o.prototype,i),u&&c(o,u),o}})(),t=_e(),n=r(t);function r(c){return c&&c.__esModule?c:{default:c}}function a(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}function s(c,o){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:c}function f(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);c.prototype=Object.create(o&&o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(c,o):c.__proto__=o)}var d=(function(c){f(o,c);function o(i,u){return a(this,o),s(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,i,u))}return e(o,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),o})(n.default);return Dt.GenericBarcode=d,Dt}var Ka;function Hg(){if(Ka)return xn;Ka=1,Object.defineProperty(xn,"__esModule",{value:!0});var e=yg(),t=Sg(),n=Mg(),r=Ng(),a=$g(),s=Bg(),f=Gg(),d=Ug(),c=qg();return xn.default={CODE39:e.CODE39,CODE128:t.CODE128,CODE128A:t.CODE128A,CODE128B:t.CODE128B,CODE128C:t.CODE128C,EAN13:n.EAN13,EAN8:n.EAN8,EAN5:n.EAN5,EAN2:n.EAN2,UPC:n.UPC,UPCE:n.UPCE,ITF14:r.ITF14,ITF:r.ITF,MSI:a.MSI,MSI10:a.MSI10,MSI11:a.MSI11,MSI1010:a.MSI1010,MSI1110:a.MSI1110,pharmacode:s.pharmacode,codabar:f.codabar,CODE93:d.CODE93,CODE93FullASCII:d.CODE93FullASCII,GenericBarcode:c.GenericBarcode},xn}var Vn={},Xa;function Br(){if(Xa)return Vn;Xa=1,Object.defineProperty(Vn,"__esModule",{value:!0});var e=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t};return Vn.default=function(t,n){return e({},t,n)},Vn}var zn={},Ya;function Wg(){if(Ya)return zn;Ya=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.default=e;function e(t){var n=[];function r(a){if(Array.isArray(a))for(var s=0;s<a.length;s++)r(a[s]);else a.text=a.text||"",a.data=a.data||"",n.push(a)}return r(t),n}return zn}var Un={},Qa;function Kg(){if(Qa)return Un;Qa=1,Object.defineProperty(Un,"__esModule",{value:!0}),Un.default=e;function e(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}return Un}var qn={},Hn={},Wn={},Za;function Ll(){if(Za)return Wn;Za=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.default=e;function e(t){var n=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var r in n)n.hasOwnProperty(r)&&(r=n[r],typeof t[r]=="string"&&(t[r]=parseInt(t[r],10)));return typeof t.displayValue=="string"&&(t.displayValue=t.displayValue!="false"),t}return Wn}var Kn={},Ja;function Fl(){if(Ja)return Kn;Ja=1,Object.defineProperty(Kn,"__esModule",{value:!0});var e={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}};return Kn.default=e,Kn}var es;function Xg(){if(es)return Hn;es=1,Object.defineProperty(Hn,"__esModule",{value:!0});var e=Ll(),t=a(e),n=Fl(),r=a(n);function a(f){return f&&f.__esModule?f:{default:f}}function s(f){var d={};for(var c in r.default)r.default.hasOwnProperty(c)&&(f.hasAttribute("jsbarcode-"+c.toLowerCase())&&(d[c]=f.getAttribute("jsbarcode-"+c.toLowerCase())),f.hasAttribute("data-"+c.toLowerCase())&&(d[c]=f.getAttribute("data-"+c.toLowerCase())));return d.value=f.getAttribute("jsbarcode-value")||f.getAttribute("data-value"),d=(0,t.default)(d),d}return Hn.default=s,Hn}var Xn={},Yn={},xe={},ts;function $l(){if(ts)return xe;ts=1,Object.defineProperty(xe,"__esModule",{value:!0}),xe.getTotalWidthOfEncodings=xe.calculateEncodingAttributes=xe.getBarcodePadding=xe.getEncodingHeight=xe.getMaximumHeightOfEncodings=void 0;var e=Br(),t=n(e);function n(o){return o&&o.__esModule?o:{default:o}}function r(o,i){return i.height+(i.displayValue&&o.text.length>0?i.fontSize+i.textMargin:0)+i.marginTop+i.marginBottom}function a(o,i,u){if(u.displayValue&&i<o){if(u.textAlign=="center")return Math.floor((o-i)/2);if(u.textAlign=="left")return 0;if(u.textAlign=="right")return Math.floor(o-i)}return 0}function s(o,i,u){for(var l=0;l<o.length;l++){var p=o[l],h=(0,t.default)(i,p.options),m;h.displayValue?m=c(p.text,h,u):m=0;var v=p.data.length*h.width;p.width=Math.ceil(Math.max(m,v)),p.height=r(p,h),p.barcodePadding=a(m,v,h)}}function f(o){for(var i=0,u=0;u<o.length;u++)i+=o[u].width;return i}function d(o){for(var i=0,u=0;u<o.length;u++)o[u].height>i&&(i=o[u].height);return i}function c(o,i,u){var l;if(u)l=u;else if(typeof document<"u")l=document.createElement("canvas").getContext("2d");else return 0;l.font=i.fontOptions+" "+i.fontSize+"px "+i.font;var p=l.measureText(o);if(!p)return 0;var h=p.width;return h}return xe.getMaximumHeightOfEncodings=d,xe.getEncodingHeight=r,xe.getBarcodePadding=a,xe.calculateEncodingAttributes=s,xe.getTotalWidthOfEncodings=f,xe}var ns;function Yg(){if(ns)return Yn;ns=1,Object.defineProperty(Yn,"__esModule",{value:!0});var e=(function(){function d(c,o){for(var i=0;i<o.length;i++){var u=o[i];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(c,u.key,u)}}return function(c,o,i){return o&&d(c.prototype,o),i&&d(c,i),c}})(),t=Br(),n=a(t),r=$l();function a(d){return d&&d.__esModule?d:{default:d}}function s(d,c){if(!(d instanceof c))throw new TypeError("Cannot call a class as a function")}var f=(function(){function d(c,o,i){s(this,d),this.canvas=c,this.encodings=o,this.options=i}return e(d,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var o=0;o<this.encodings.length;o++){var i=(0,n.default)(this.options,this.encodings[o].options);this.drawCanvasBarcode(i,this.encodings[o]),this.drawCanvasText(i,this.encodings[o]),this.moveCanvasDrawing(this.encodings[o])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var o=this.canvas.getContext("2d");o.save(),(0,r.calculateEncodingAttributes)(this.encodings,this.options,o);var i=(0,r.getTotalWidthOfEncodings)(this.encodings),u=(0,r.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=i+this.options.marginLeft+this.options.marginRight,this.canvas.height=u,o.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(o.fillStyle=this.options.background,o.fillRect(0,0,this.canvas.width,this.canvas.height)),o.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(o,i){var u=this.canvas.getContext("2d"),l=i.data,p;o.textPosition=="top"?p=o.marginTop+o.fontSize+o.textMargin:p=o.marginTop,u.fillStyle=o.lineColor;for(var h=0;h<l.length;h++){var m=h*o.width+i.barcodePadding;l[h]==="1"?u.fillRect(m,p,o.width,o.height):l[h]&&u.fillRect(m,p,o.width,o.height*l[h])}}},{key:"drawCanvasText",value:function(o,i){var u=this.canvas.getContext("2d"),l=o.fontOptions+" "+o.fontSize+"px "+o.font;if(o.displayValue){var p,h;o.textPosition=="top"?h=o.marginTop+o.fontSize-o.textMargin:h=o.height+o.textMargin+o.marginTop+o.fontSize,u.font=l,o.textAlign=="left"||i.barcodePadding>0?(p=0,u.textAlign="left"):o.textAlign=="right"?(p=i.width-1,u.textAlign="right"):(p=i.width/2,u.textAlign="center"),u.fillText(i.text,p,h)}}},{key:"moveCanvasDrawing",value:function(o){var i=this.canvas.getContext("2d");i.translate(o.width,0)}},{key:"restoreCanvas",value:function(){var o=this.canvas.getContext("2d");o.restore()}}]),d})();return Yn.default=f,Yn}var Qn={},rs;function Qg(){if(rs)return Qn;rs=1,Object.defineProperty(Qn,"__esModule",{value:!0});var e=(function(){function c(o,i){for(var u=0;u<i.length;u++){var l=i[u];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(o,l.key,l)}}return function(o,i,u){return i&&c(o.prototype,i),u&&c(o,u),o}})(),t=Br(),n=a(t),r=$l();function a(c){return c&&c.__esModule?c:{default:c}}function s(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}var f="http://www.w3.org/2000/svg",d=(function(){function c(o,i,u){s(this,c),this.svg=o,this.encodings=i,this.options=u,this.document=u.xmlDocument||document}return e(c,[{key:"render",value:function(){var i=this.options.marginLeft;this.prepareSVG();for(var u=0;u<this.encodings.length;u++){var l=this.encodings[u],p=(0,n.default)(this.options,l.options),h=this.createGroup(i,p.marginTop,this.svg);this.setGroupOptions(h,p),this.drawSvgBarcode(h,p,l),this.drawSVGText(h,p,l),i+=l.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,r.calculateEncodingAttributes)(this.encodings,this.options);var i=(0,r.getTotalWidthOfEncodings)(this.encodings),u=(0,r.getMaximumHeightOfEncodings)(this.encodings),l=i+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(l,u),this.options.background&&this.drawRect(0,0,l,u,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(i,u,l){var p=l.data,h;u.textPosition=="top"?h=u.fontSize+u.textMargin:h=0;for(var m=0,v=0,g=0;g<p.length;g++)v=g*u.width+l.barcodePadding,p[g]==="1"?m++:m>0&&(this.drawRect(v-u.width*m,h,u.width*m,u.height,i),m=0);m>0&&this.drawRect(v-u.width*(m-1),h,u.width*m,u.height,i)}},{key:"drawSVGText",value:function(i,u,l){var p=this.document.createElementNS(f,"text");if(u.displayValue){var h,m;p.setAttribute("font-family",u.font),p.setAttribute("font-size",u.fontSize),u.fontOptions.includes("bold")&&p.setAttribute("font-weight","bold"),u.fontOptions.includes("italic")&&p.setAttribute("font-style","italic"),u.textPosition=="top"?m=u.fontSize-u.textMargin:m=u.height+u.textMargin+u.fontSize,u.textAlign=="left"||l.barcodePadding>0?(h=0,p.setAttribute("text-anchor","start")):u.textAlign=="right"?(h=l.width-1,p.setAttribute("text-anchor","end")):(h=l.width/2,p.setAttribute("text-anchor","middle")),p.setAttribute("x",h),p.setAttribute("y",m),p.appendChild(this.document.createTextNode(l.text)),i.appendChild(p)}}},{key:"setSvgAttributes",value:function(i,u){var l=this.svg;l.setAttribute("width",i+"px"),l.setAttribute("height",u+"px"),l.setAttribute("x","0px"),l.setAttribute("y","0px"),l.setAttribute("viewBox","0 0 "+i+" "+u),l.setAttribute("xmlns",f),l.setAttribute("version","1.1")}},{key:"createGroup",value:function(i,u,l){var p=this.document.createElementNS(f,"g");return p.setAttribute("transform","translate("+i+", "+u+")"),l.appendChild(p),p}},{key:"setGroupOptions",value:function(i,u){i.setAttribute("fill",u.lineColor)}},{key:"drawRect",value:function(i,u,l,p,h){var m=this.document.createElementNS(f,"rect");return m.setAttribute("x",i),m.setAttribute("y",u),m.setAttribute("width",l),m.setAttribute("height",p),h.appendChild(m),m}}]),c})();return Qn.default=d,Qn}var Zn={},os;function Zg(){if(os)return Zn;os=1,Object.defineProperty(Zn,"__esModule",{value:!0});var e=(function(){function r(a,s){for(var f=0;f<s.length;f++){var d=s[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(a,s,f){return s&&r(a.prototype,s),f&&r(a,f),a}})();function t(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(a,s,f){t(this,r),this.object=a,this.encodings=s,this.options=f}return e(r,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),r})();return Zn.default=n,Zn}var is;function Jg(){if(is)return Xn;is=1,Object.defineProperty(Xn,"__esModule",{value:!0});var e=Yg(),t=f(e),n=Qg(),r=f(n),a=Zg(),s=f(a);function f(d){return d&&d.__esModule?d:{default:d}}return Xn.default={CanvasRenderer:t.default,SVGRenderer:r.default,ObjectRenderer:s.default},Xn}var xt={},as;function Bl(){if(as)return xt;as=1,Object.defineProperty(xt,"__esModule",{value:!0});function e(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function t(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function n(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var r=(function(f){n(d,f);function d(c,o){e(this,d);var i=t(this,(d.__proto__||Object.getPrototypeOf(d)).call(this));return i.name="InvalidInputException",i.symbology=c,i.input=o,i.message='"'+i.input+'" is not a valid input for '+i.symbology,i}return d})(Error),a=(function(f){n(d,f);function d(){e(this,d);var c=t(this,(d.__proto__||Object.getPrototypeOf(d)).call(this));return c.name="InvalidElementException",c.message="Not supported type to render on",c}return d})(Error),s=(function(f){n(d,f);function d(){e(this,d);var c=t(this,(d.__proto__||Object.getPrototypeOf(d)).call(this));return c.name="NoElementException",c.message="No element to render on.",c}return d})(Error);return xt.InvalidInputException=r,xt.InvalidElementException=a,xt.NoElementException=s,xt}var ss;function ex(){if(ss)return qn;ss=1,Object.defineProperty(qn,"__esModule",{value:!0});var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},t=Xg(),n=f(t),r=Jg(),a=f(r),s=Bl();function f(i){return i&&i.__esModule?i:{default:i}}function d(i){if(typeof i=="string")return c(i);if(Array.isArray(i)){for(var u=[],l=0;l<i.length;l++)u.push(d(i[l]));return u}else{if(typeof HTMLCanvasElement<"u"&&i instanceof HTMLImageElement)return o(i);if(i&&i.nodeName&&i.nodeName.toLowerCase()==="svg"||typeof SVGElement<"u"&&i instanceof SVGElement)return{element:i,options:(0,n.default)(i),renderer:a.default.SVGRenderer};if(typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement)return{element:i,options:(0,n.default)(i),renderer:a.default.CanvasRenderer};if(i&&i.getContext)return{element:i,renderer:a.default.CanvasRenderer};if(i&&(typeof i>"u"?"undefined":e(i))==="object"&&!i.nodeName)return{element:i,renderer:a.default.ObjectRenderer};throw new s.InvalidElementException}}function c(i){var u=document.querySelectorAll(i);if(u.length!==0){for(var l=[],p=0;p<u.length;p++)l.push(d(u[p]));return l}}function o(i){var u=document.createElement("canvas");return{element:u,options:(0,n.default)(i),renderer:a.default.CanvasRenderer,afterRender:function(){i.setAttribute("src",u.toDataURL())}}}return qn.default=d,qn}var Jn={},cs;function tx(){if(cs)return Jn;cs=1,Object.defineProperty(Jn,"__esModule",{value:!0});var e=(function(){function r(a,s){for(var f=0;f<s.length;f++){var d=s[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(a,s,f){return s&&r(a.prototype,s),f&&r(a,f),a}})();function t(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(a){t(this,r),this.api=a}return e(r,[{key:"handleCatch",value:function(s){if(s.name==="InvalidInputException")if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw s.message;else throw s;this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(s){try{var f=s.apply(void 0,arguments);return this.api._options.valid(!0),f}catch(d){return this.handleCatch(d),this.api}}}]),r})();return Jn.default=n,Jn}var oo,us;function nx(){if(us)return oo;us=1;var e=Hg(),t=g(e),n=Br(),r=g(n),a=Wg(),s=g(a),f=Kg(),d=g(f),c=ex(),o=g(c),i=Ll(),u=g(i),l=tx(),p=g(l),h=Bl(),m=Fl(),v=g(m);function g(O){return O&&O.__esModule?O:{default:O}}var x=function(){},b=function(T,M,D){var F=new x;if(typeof T>"u")throw Error("No element to render on was provided.");return F._renderProperties=(0,o.default)(T),F._encodings=[],F._options=v.default,F._errorHandler=new p.default(F),typeof M<"u"&&(D=D||{},D.format||(D.format=C()),F.options(D)[D.format](M,D).render()),F};b.getModule=function(O){return t.default[O]};for(var w in t.default)t.default.hasOwnProperty(w)&&_(t.default,w);function _(O,T){x.prototype[T]=x.prototype[T.toUpperCase()]=x.prototype[T.toLowerCase()]=function(M,D){var F=this;return F._errorHandler.wrapBarcodeCall(function(){D.text=typeof D.text>"u"?void 0:""+D.text;var k=(0,r.default)(F._options,D);k=(0,u.default)(k);var U=O[T],$=P(M,U,k);return F._encodings.push($),F})}}function P(O,T,M){O=""+O;var D=new T(O,M);if(!D.valid())throw new h.InvalidInputException(D.constructor.name,O);var F=D.encode();F=(0,s.default)(F);for(var k=0;k<F.length;k++)F[k].options=(0,r.default)(M,F[k].options);return F}function C(){return t.default.CODE128?"CODE128":Object.keys(t.default)[0]}x.prototype.options=function(O){return this._options=(0,r.default)(this._options,O),this},x.prototype.blank=function(O){var T=new Array(O+1).join("0");return this._encodings.push({data:T}),this},x.prototype.init=function(){if(this._renderProperties){Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]);var O;for(var T in this._renderProperties){O=this._renderProperties[T];var M=(0,r.default)(this._options,O.options);M.format=="auto"&&(M.format=C()),this._errorHandler.wrapBarcodeCall(function(){var D=M.value,F=t.default[M.format.toUpperCase()],k=P(D,F,M);j(O,k,M)})}}},x.prototype.render=function(){if(!this._renderProperties)throw new h.NoElementException;if(Array.isArray(this._renderProperties))for(var O=0;O<this._renderProperties.length;O++)j(this._renderProperties[O],this._encodings,this._options);else j(this._renderProperties,this._encodings,this._options);return this},x.prototype._defaults=v.default;function j(O,T,M){T=(0,s.default)(T);for(var D=0;D<T.length;D++)T[D].options=(0,r.default)(M,T[D].options),(0,d.default)(T[D].options);(0,d.default)(M);var F=O.renderer,k=new F(O.element,T,M);k.render(),O.afterRender&&O.afterRender()}return typeof window<"u"&&(window.JsBarcode=b),typeof jQuery<"u"&&(jQuery.fn.JsBarcode=function(O,T){var M=[];return jQuery(this).each(function(){M.push(this)}),b(M,O,T)}),oo=b,oo}var er={exports:{}},tr={exports:{}},ie={};/** @license React v16.13.1
|
|
62
|
+
* react-is.production.min.js
|
|
63
|
+
*
|
|
64
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
65
|
+
*
|
|
66
|
+
* This source code is licensed under the MIT license found in the
|
|
67
|
+
* LICENSE file in the root directory of this source tree.
|
|
68
|
+
*/var ls;function rx(){if(ls)return ie;ls=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,f=e?Symbol.for("react.provider"):60109,d=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,o=e?Symbol.for("react.concurrent_mode"):60111,i=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,l=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(_){if(typeof _=="object"&&_!==null){var P=_.$$typeof;switch(P){case t:switch(_=_.type,_){case c:case o:case r:case s:case a:case u:return _;default:switch(_=_&&_.$$typeof,_){case d:case i:case h:case p:case f:return _;default:return P}}case n:return P}}}function w(_){return b(_)===o}return ie.AsyncMode=c,ie.ConcurrentMode=o,ie.ContextConsumer=d,ie.ContextProvider=f,ie.Element=t,ie.ForwardRef=i,ie.Fragment=r,ie.Lazy=h,ie.Memo=p,ie.Portal=n,ie.Profiler=s,ie.StrictMode=a,ie.Suspense=u,ie.isAsyncMode=function(_){return w(_)||b(_)===c},ie.isConcurrentMode=w,ie.isContextConsumer=function(_){return b(_)===d},ie.isContextProvider=function(_){return b(_)===f},ie.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},ie.isForwardRef=function(_){return b(_)===i},ie.isFragment=function(_){return b(_)===r},ie.isLazy=function(_){return b(_)===h},ie.isMemo=function(_){return b(_)===p},ie.isPortal=function(_){return b(_)===n},ie.isProfiler=function(_){return b(_)===s},ie.isStrictMode=function(_){return b(_)===a},ie.isSuspense=function(_){return b(_)===u},ie.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===r||_===o||_===s||_===a||_===u||_===l||typeof _=="object"&&_!==null&&(_.$$typeof===h||_.$$typeof===p||_.$$typeof===f||_.$$typeof===d||_.$$typeof===i||_.$$typeof===v||_.$$typeof===g||_.$$typeof===x||_.$$typeof===m)},ie.typeOf=b,ie}var ae={};/** @license React v16.13.1
|
|
69
|
+
* react-is.development.js
|
|
70
|
+
*
|
|
71
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the MIT license found in the
|
|
74
|
+
* LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/var fs;function ox(){return fs||(fs=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,f=e?Symbol.for("react.provider"):60109,d=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,o=e?Symbol.for("react.concurrent_mode"):60111,i=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,l=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(R){return typeof R=="string"||typeof R=="function"||R===r||R===o||R===s||R===a||R===u||R===l||typeof R=="object"&&R!==null&&(R.$$typeof===h||R.$$typeof===p||R.$$typeof===f||R.$$typeof===d||R.$$typeof===i||R.$$typeof===v||R.$$typeof===g||R.$$typeof===x||R.$$typeof===m)}function w(R){if(typeof R=="object"&&R!==null){var Z=R.$$typeof;switch(Z){case t:var re=R.type;switch(re){case c:case o:case r:case s:case a:case u:return re;default:var se=re&&re.$$typeof;switch(se){case d:case i:case h:case p:case f:return se;default:return Z}}case n:return Z}}}var _=c,P=o,C=d,j=f,O=t,T=i,M=r,D=h,F=p,k=n,U=s,$=a,Y=u,V=!1;function L(R){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),A(R)||w(R)===c}function A(R){return w(R)===o}function N(R){return w(R)===d}function z(R){return w(R)===f}function X(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function W(R){return w(R)===i}function te(R){return w(R)===r}function Q(R){return w(R)===h}function I(R){return w(R)===p}function B(R){return w(R)===n}function H(R){return w(R)===s}function G(R){return w(R)===a}function q(R){return w(R)===u}ae.AsyncMode=_,ae.ConcurrentMode=P,ae.ContextConsumer=C,ae.ContextProvider=j,ae.Element=O,ae.ForwardRef=T,ae.Fragment=M,ae.Lazy=D,ae.Memo=F,ae.Portal=k,ae.Profiler=U,ae.StrictMode=$,ae.Suspense=Y,ae.isAsyncMode=L,ae.isConcurrentMode=A,ae.isContextConsumer=N,ae.isContextProvider=z,ae.isElement=X,ae.isForwardRef=W,ae.isFragment=te,ae.isLazy=Q,ae.isMemo=I,ae.isPortal=B,ae.isProfiler=H,ae.isStrictMode=G,ae.isSuspense=q,ae.isValidElementType=b,ae.typeOf=w})()),ae}var ds;function Gl(){return ds||(ds=1,process.env.NODE_ENV==="production"?tr.exports=rx():tr.exports=ox()),tr.exports}/*
|
|
76
|
+
object-assign
|
|
77
|
+
(c) Sindre Sorhus
|
|
78
|
+
@license MIT
|
|
79
|
+
*/var io,ps;function ix(){if(ps)return io;ps=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function a(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var f={},d=0;d<10;d++)f["_"+String.fromCharCode(d)]=d;var c=Object.getOwnPropertyNames(f).map(function(i){return f[i]});if(c.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(i){o[i]=i}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return io=a()?Object.assign:function(s,f){for(var d,c=r(s),o,i=1;i<arguments.length;i++){d=Object(arguments[i]);for(var u in d)t.call(d,u)&&(c[u]=d[u]);if(e){o=e(d);for(var l=0;l<o.length;l++)n.call(d,o[l])&&(c[o[l]]=d[o[l]])}}return c},io}var ao,hs;function vi(){if(hs)return ao;hs=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ao=e,ao}var so,ms;function Vl(){return ms||(ms=1,so=Function.call.bind(Object.prototype.hasOwnProperty)),so}var co,vs;function ax(){if(vs)return co;vs=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=vi(),n={},r=Vl();e=function(s){var f="Warning: "+s;typeof console<"u"&&console.error(f);try{throw new Error(f)}catch{}}}function a(s,f,d,c,o){if(process.env.NODE_ENV!=="production"){for(var i in s)if(r(s,i)){var u;try{if(typeof s[i]!="function"){var l=Error((c||"React class")+": "+d+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}u=s[i](f,i,c,d,null,t)}catch(h){u=h}if(u&&!(u instanceof Error)&&e((c||"React class")+": type specification of "+d+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var p=o?o():"";e("Failed "+d+" type: "+u.message+(p??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},co=a,co}var uo,gs;function sx(){if(gs)return uo;gs=1;var e=Gl(),t=ix(),n=vi(),r=Vl(),a=ax(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(d){var c="Warning: "+d;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function f(){return null}return uo=function(d,c){var o=typeof Symbol=="function"&&Symbol.iterator,i="@@iterator";function u(A){var N=A&&(o&&A[o]||A[i]);if(typeof N=="function")return N}var l="<<anonymous>>",p={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:x(),arrayOf:b,element:w(),elementType:_(),instanceOf:P,node:T(),objectOf:j,oneOf:C,oneOfType:O,shape:D,exact:F};function h(A,N){return A===N?A!==0||1/A===1/N:A!==A&&N!==N}function m(A,N){this.message=A,this.data=N&&typeof N=="object"?N:{},this.stack=""}m.prototype=Error.prototype;function v(A){if(process.env.NODE_ENV!=="production")var N={},z=0;function X(te,Q,I,B,H,G,q){if(B=B||l,G=G||I,q!==n){if(c){var R=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw R.name="Invariant Violation",R}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Z=B+":"+I;!N[Z]&&z<3&&(s("You are manually calling a React.PropTypes validation function for the `"+G+"` prop on `"+B+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),N[Z]=!0,z++)}}return Q[I]==null?te?Q[I]===null?new m("The "+H+" `"+G+"` is marked as required "+("in `"+B+"`, but its value is `null`.")):new m("The "+H+" `"+G+"` is marked as required in "+("`"+B+"`, but its value is `undefined`.")):null:A(Q,I,B,H,G)}var W=X.bind(null,!1);return W.isRequired=X.bind(null,!0),W}function g(A){function N(z,X,W,te,Q,I){var B=z[X],H=$(B);if(H!==A){var G=Y(B);return new m("Invalid "+te+" `"+Q+"` of type "+("`"+G+"` supplied to `"+W+"`, expected ")+("`"+A+"`."),{expectedType:A})}return null}return v(N)}function x(){return v(f)}function b(A){function N(z,X,W,te,Q){if(typeof A!="function")return new m("Property `"+Q+"` of component `"+W+"` has invalid PropType notation inside arrayOf.");var I=z[X];if(!Array.isArray(I)){var B=$(I);return new m("Invalid "+te+" `"+Q+"` of type "+("`"+B+"` supplied to `"+W+"`, expected an array."))}for(var H=0;H<I.length;H++){var G=A(I,H,W,te,Q+"["+H+"]",n);if(G instanceof Error)return G}return null}return v(N)}function w(){function A(N,z,X,W,te){var Q=N[z];if(!d(Q)){var I=$(Q);return new m("Invalid "+W+" `"+te+"` of type "+("`"+I+"` supplied to `"+X+"`, expected a single ReactElement."))}return null}return v(A)}function _(){function A(N,z,X,W,te){var Q=N[z];if(!e.isValidElementType(Q)){var I=$(Q);return new m("Invalid "+W+" `"+te+"` of type "+("`"+I+"` supplied to `"+X+"`, expected a single ReactElement type."))}return null}return v(A)}function P(A){function N(z,X,W,te,Q){if(!(z[X]instanceof A)){var I=A.name||l,B=L(z[X]);return new m("Invalid "+te+" `"+Q+"` of type "+("`"+B+"` supplied to `"+W+"`, expected ")+("instance of `"+I+"`."))}return null}return v(N)}function C(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),f;function N(z,X,W,te,Q){for(var I=z[X],B=0;B<A.length;B++)if(h(I,A[B]))return null;var H=JSON.stringify(A,function(q,R){var Z=Y(R);return Z==="symbol"?String(R):R});return new m("Invalid "+te+" `"+Q+"` of value `"+String(I)+"` "+("supplied to `"+W+"`, expected one of "+H+"."))}return v(N)}function j(A){function N(z,X,W,te,Q){if(typeof A!="function")return new m("Property `"+Q+"` of component `"+W+"` has invalid PropType notation inside objectOf.");var I=z[X],B=$(I);if(B!=="object")return new m("Invalid "+te+" `"+Q+"` of type "+("`"+B+"` supplied to `"+W+"`, expected an object."));for(var H in I)if(r(I,H)){var G=A(I,H,W,te,Q+"."+H,n);if(G instanceof Error)return G}return null}return v(N)}function O(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),f;for(var N=0;N<A.length;N++){var z=A[N];if(typeof z!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+V(z)+" at index "+N+"."),f}function X(W,te,Q,I,B){for(var H=[],G=0;G<A.length;G++){var q=A[G],R=q(W,te,Q,I,B,n);if(R==null)return null;R.data&&r(R.data,"expectedType")&&H.push(R.data.expectedType)}var Z=H.length>0?", expected one of type ["+H.join(", ")+"]":"";return new m("Invalid "+I+" `"+B+"` supplied to "+("`"+Q+"`"+Z+"."))}return v(X)}function T(){function A(N,z,X,W,te){return k(N[z])?null:new m("Invalid "+W+" `"+te+"` supplied to "+("`"+X+"`, expected a ReactNode."))}return v(A)}function M(A,N,z,X,W){return new m((A||"React class")+": "+N+" type `"+z+"."+X+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+W+"`.")}function D(A){function N(z,X,W,te,Q){var I=z[X],B=$(I);if(B!=="object")return new m("Invalid "+te+" `"+Q+"` of type `"+B+"` "+("supplied to `"+W+"`, expected `object`."));for(var H in A){var G=A[H];if(typeof G!="function")return M(W,te,Q,H,Y(G));var q=G(I,H,W,te,Q+"."+H,n);if(q)return q}return null}return v(N)}function F(A){function N(z,X,W,te,Q){var I=z[X],B=$(I);if(B!=="object")return new m("Invalid "+te+" `"+Q+"` of type `"+B+"` "+("supplied to `"+W+"`, expected `object`."));var H=t({},z[X],A);for(var G in H){var q=A[G];if(r(A,G)&&typeof q!="function")return M(W,te,Q,G,Y(q));if(!q)return new m("Invalid "+te+" `"+Q+"` key `"+G+"` supplied to `"+W+"`.\nBad object: "+JSON.stringify(z[X],null," ")+`
|
|
80
|
+
Valid keys: `+JSON.stringify(Object.keys(A),null," "));var R=q(I,G,W,te,Q+"."+G,n);if(R)return R}return null}return v(N)}function k(A){switch(typeof A){case"number":case"string":case"undefined":return!0;case"boolean":return!A;case"object":if(Array.isArray(A))return A.every(k);if(A===null||d(A))return!0;var N=u(A);if(N){var z=N.call(A),X;if(N!==A.entries){for(;!(X=z.next()).done;)if(!k(X.value))return!1}else for(;!(X=z.next()).done;){var W=X.value;if(W&&!k(W[1]))return!1}}else return!1;return!0;default:return!1}}function U(A,N){return A==="symbol"?!0:N?N["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&N instanceof Symbol:!1}function $(A){var N=typeof A;return Array.isArray(A)?"array":A instanceof RegExp?"object":U(N,A)?"symbol":N}function Y(A){if(typeof A>"u"||A===null)return""+A;var N=$(A);if(N==="object"){if(A instanceof Date)return"date";if(A instanceof RegExp)return"regexp"}return N}function V(A){var N=Y(A);switch(N){case"array":case"object":return"an "+N;case"boolean":case"date":case"regexp":return"a "+N;default:return N}}function L(A){return!A.constructor||!A.constructor.name?l:A.constructor.name}return p.checkPropTypes=a,p.resetWarningCache=a.resetWarningCache,p.PropTypes=p,p},uo}var lo,xs;function cx(){if(xs)return lo;xs=1;var e=vi();function t(){}function n(){}return n.resetWarningCache=t,lo=function(){function r(f,d,c,o,i,u){if(u!==e){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}r.isRequired=r;function a(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},lo}var ys;function ux(){if(ys)return er.exports;if(ys=1,process.env.NODE_ENV!=="production"){var e=Gl(),t=!0;er.exports=sx()(e.isElement,t)}else er.exports=cx()();return er.exports}var fo,Es;function lx(){if(Es)return fo;Es=1;function e(v){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(x){return typeof x}:e=function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x},e(v)}var t=a(S),n=a(nx()),r=a(ux());function a(v){return v&&v.__esModule?v:{default:v}}function s(v,g){if(!(v instanceof g))throw new TypeError("Cannot call a class as a function")}function f(v,g){for(var x=0;x<g.length;x++){var b=g[x];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}function d(v,g,x){return g&&f(v.prototype,g),v}function c(v,g){return g&&(e(g)==="object"||typeof g=="function")?g:i(v)}function o(v){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(x){return x.__proto__||Object.getPrototypeOf(x)},o(v)}function i(v){if(v===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v}function u(v,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(g&&g.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),g&&l(v,g)}function l(v,g){return l=Object.setPrototypeOf||function(b,w){return b.__proto__=w,b},l(v,g)}var p,h=t.default.version.split(/[.-]/);h[0]==="0"&&(h[1]==="13"||h[1]==="12")?p=function(g){return g.getDOMNode()}:p=function(g){return g};var m=(function(v){u(g,v);function g(x){var b;return s(this,g),b=c(this,o(g).call(this,x)),b.renderElementRef=t.default.createRef(),b.update=b.update.bind(i(b)),b}return d(g,[{key:"shouldComponentUpdate",value:function(b){var w=this;return Object.keys(g.propTypes).some(function(_){return w.props[_]!==b[_]})}},{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var b=p(this.renderElementRef.current);try{new n.default(b,this.props.value,Object.assign({text:this.props.text||this.props.value},this.props))}catch(w){window.console.error(w)}}},{key:"render",value:function(){var b=this.props,w=b.id,_=b.className;if(this.props.renderer==="svg")return t.default.createElement("svg",{ref:this.renderElementRef,id:w,className:_});if(this.props.renderer==="canvas")return t.default.createElement("canvas",{ref:this.renderElementRef,id:w,className:_});if(this.props.renderer==="img")return t.default.createElement("img",{ref:this.renderElementRef,id:w,className:_})}}]),g})(t.default.Component);return m.propTypes={value:r.default.string.isRequired,text:r.default.string,renderer:r.default.string,format:r.default.string,width:r.default.number,height:r.default.number,displayValue:r.default.bool,fontOptions:r.default.string,font:r.default.string,textAlign:r.default.string,textPosition:r.default.string,textMargin:r.default.number,fontSize:r.default.number,background:r.default.string,lineColor:r.default.string,margin:r.default.number,marginTop:r.default.number,marginBottom:r.default.number,marginLeft:r.default.number,marginRight:r.default.number,id:r.default.string,className:r.default.string,ean128:r.default.bool},m.defaultProps={format:"CODE128",renderer:"svg",width:2,height:100,displayValue:!0,fontOptions:"",font:"monospace",textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,className:"",ean128:!1},fo=m,fo}var fx=lx();const dx=lf(fx),zl=S.forwardRef(({children:e,className:t,disabled:n,...r},a)=>y.jsxRuntimeExports.jsx(e0,{ref:a,disabled:n,className:J.classNames("w-full h-auto outline-0 hover:bg-gray-3 px-4 py-[5px] cursor-pointer",{"text-gray-6 cursor-not-allowed":n},t),...r,children:y.jsxRuntimeExports.jsx(t0,{className:"whitespace-nowrap",children:e})}));zl.displayName="SelectItem";const Ul=S.forwardRef(({value:e,onChange:t,placeholder:n="Buscar...",disabled:r},a)=>y.jsxRuntimeExports.jsx("div",{className:"px-2 py-2 border-b border-gray-4 bg-white sticky top-0",onPointerDown:s=>{s.stopPropagation()},children:y.jsxRuntimeExports.jsx("input",{ref:a,type:"text",value:e,onChange:t,placeholder:n,disabled:r,autoComplete:"off",autoFocus:!0,className:J.classNames("w-full px-3 py-1.5 text-sm border border-gray-4 rounded outline-none","focus:border-primary-blue focus:ring-1 focus:ring-primary-blue","disabled:bg-gray-3 disabled:cursor-not-allowed"),onKeyDown:s=>{s.stopPropagation()},onMouseDown:s=>{s.stopPropagation()},onPointerDown:s=>{s.stopPropagation()}})}));Ul.displayName="SearchInput";var gi=(e=>(e.cols="grid-cols",e.rows="grid-rows",e.gap="gap",e.justifyItems="justify-items",e.alignContent="content",e.span="col-span",e.start="col-start",e.end="col-end",e.justifySelf="justify-self",e.alignSelf="self",e))(gi||{});const{cols:px,gap:hx,justifyItems:mx,alignContent:vx}=gi,gx=({cols:e,align:t,gap:n,justify:r,className:a="",...s})=>y.jsxRuntimeExports.jsx(y.motion.div,{className:J.classNames("grid",{[a]:a},Re.generateClasses(px,e),Re.generateClasses(hx,n),Re.generateClasses(mx,r),Re.generateClasses(vx,t)),...s}),{span:xx,start:yx,end:Ex,justifySelf:bx,alignSelf:wx}=gi,_x=({align:e,end:t,justify:n,span:r,start:a,className:s="",...f})=>y.jsxRuntimeExports.jsx(y.motion.div,{...f,className:J.classNames({[s]:s},Re.generateClasses(xx,r),Re.generateClasses(yx,a),Re.generateClasses(Ex,t),Re.generateClasses(bx,n),Re.generateClasses(wx,e))}),bs=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ws=J.clsx,Rx=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ws(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:s}=t,f=Object.keys(a).map(o=>{const i=n==null?void 0:n[o],u=s==null?void 0:s[o];if(i===null)return null;const l=bs(i)||bs(u);return a[o][l]}),d=n&&Object.entries(n).reduce((o,i)=>{let[u,l]=i;return l===void 0||(o[u]=l),o},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((o,i)=>{let{class:u,className:l,...p}=i;return Object.entries(p).every(h=>{let[m,v]=h;return Array.isArray(v)?v.includes({...s,...d}[m]):{...s,...d}[m]===v})?[...o,u,l]:o},[]);return ws(e,f,c,n==null?void 0:n.class,n==null?void 0:n.className)},ql=Rx("hover:text-white cursor-pointer aria-pressed:bg-primary-blue data-[state=on]:text-white focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[state=on]:bg-primary-blue gap-1 rounded-lg text-sm font-medium transition-all [&_svg:not([class*='size-'])]:size-4 group/toggle hover:bg-primary-blue inline-flex items-center justify-center whitespace-nowrap outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border-gray-5 hover:bg-primary-blue border bg-transparent"},size:{default:"h-8 min-w-8 px-2",sm:"h-7 min-w-7 rounded-md px-1.5 text-[0.8rem]",lg:"h-9 min-w-9 px-2.5"}},defaultVariants:{variant:"default",size:"default"}}),Hl=S.createContext({size:"default",variant:"default",spacing:0,orientation:"horizontal"}),Sx=({className:e,children:t,variant:n="default",size:r="default",...a})=>{const s=S.useContext(Hl);return y.jsxRuntimeExports.jsx(c0,{"data-slot":"toggle-group-item","data-variant":s.variant||n,"data-size":s.size||r,"data-spacing":s.spacing,className:J.cn("group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg shrink-0 focus:z-10 focus-visible:z-10 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",ql({variant:s.variant||n,size:s.size||r}),e),...a,children:t})},Wl=({className:e,variant:t,size:n,spacing:r=0,orientation:a="horizontal",children:s,...f})=>y.jsxRuntimeExports.jsx(s0,{"data-slot":"toggle-group","data-variant":t,"data-size":n,"data-spacing":r,"data-orientation":a,style:{"--gap":r},className:J.cn("rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch",e),...f,children:y.jsxRuntimeExports.jsx(Hl.Provider,{value:{variant:t,size:n,spacing:r,orientation:a},children:s})});Wl.Item=Sx;function Cx(e){return Object.prototype.toString.call(e)==="[object Object]"}function _s(e){return Cx(e)||Array.isArray(e)}function Ox(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function xi(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const a=JSON.stringify(Object.keys(e.breakpoints||{})),s=JSON.stringify(Object.keys(t.breakpoints||{}));return a!==s?!1:n.every(f=>{const d=e[f],c=t[f];return typeof d=="function"?`${d}`==`${c}`:!_s(d)||!_s(c)?d===c:xi(d,c)})}function Rs(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function Px(e,t){if(e.length!==t.length)return!1;const n=Rs(e),r=Rs(t);return n.every((a,s)=>{const f=r[s];return xi(a,f)})}function yi(e){return typeof e=="number"}function jo(e){return typeof e=="string"}function Gr(e){return typeof e=="boolean"}function Ss(e){return Object.prototype.toString.call(e)==="[object Object]"}function ce(e){return Math.abs(e)}function Ei(e){return Math.sign(e)}function $t(e,t){return ce(e-t)}function Ax(e,t){if(e===0||t===0||ce(e)<=ce(t))return 0;const n=$t(ce(e),ce(t));return ce(n/e)}function jx(e){return Math.round(e*100)/100}function zt(e){return Ut(e).map(Number)}function je(e){return e[cn(e)]}function cn(e){return Math.max(0,e.length-1)}function bi(e,t){return t===cn(e)}function Cs(e,t=0){return Array.from(Array(e),(n,r)=>t+r)}function Ut(e){return Object.keys(e)}function Kl(e,t){return[e,t].reduce((n,r)=>(Ut(r).forEach(a=>{const s=n[a],f=r[a],d=Ss(s)&&Ss(f);n[a]=d?Kl(s,f):f}),n),{})}function Mo(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function Mx(e,t){const n={start:r,center:a,end:s};function r(){return 0}function a(c){return s(c)/2}function s(c){return t-c}function f(c,o){return jo(e)?n[e](c):e(t,c,o)}return{measure:f}}function qt(){let e=[];function t(a,s,f,d={passive:!0}){let c;if("addEventListener"in a)a.addEventListener(s,f,d),c=()=>a.removeEventListener(s,f,d);else{const o=a;o.addListener(f),c=()=>o.removeListener(f)}return e.push(c),r}function n(){e=e.filter(a=>a())}const r={add:t,clear:n};return r}function Tx(e,t,n,r){const a=qt(),s=1e3/60;let f=null,d=0,c=0;function o(){a.add(e,"visibilitychange",()=>{e.hidden&&h()})}function i(){p(),a.clear()}function u(v){if(!c)return;f||(f=v,n(),n());const g=v-f;for(f=v,d+=g;d>=s;)n(),d-=s;const x=d/s;r(x),c&&(c=t.requestAnimationFrame(u))}function l(){c||(c=t.requestAnimationFrame(u))}function p(){t.cancelAnimationFrame(c),f=null,d=0,c=0}function h(){f=null,d=0}return{init:o,destroy:i,start:l,stop:p,update:n,render:r}}function Ix(e,t){const n=t==="rtl",r=e==="y",a=r?"y":"x",s=r?"x":"y",f=!r&&n?-1:1,d=i(),c=u();function o(h){const{height:m,width:v}=h;return r?m:v}function i(){return r?"top":n?"right":"left"}function u(){return r?"bottom":n?"left":"right"}function l(h){return h*f}return{scroll:a,cross:s,startEdge:d,endEdge:c,measureSize:o,direction:l}}function ut(e=0,t=0){const n=ce(e-t);function r(o){return o<e}function a(o){return o>t}function s(o){return r(o)||a(o)}function f(o){return s(o)?r(o)?e:t:o}function d(o){return n?o-n*Math.ceil((o-t)/n):o}return{length:n,max:t,min:e,constrain:f,reachedAny:s,reachedMax:a,reachedMin:r,removeOffset:d}}function Xl(e,t,n){const{constrain:r}=ut(0,e),a=e+1;let s=f(t);function f(l){return n?ce((a+l)%a):r(l)}function d(){return s}function c(l){return s=f(l),u}function o(l){return i().set(d()+l)}function i(){return Xl(e,d(),n)}const u={get:d,set:c,add:o,clone:i};return u}function Nx(e,t,n,r,a,s,f,d,c,o,i,u,l,p,h,m,v,g,x){const{cross:b,direction:w}=e,_=["INPUT","SELECT","TEXTAREA"],P={passive:!1},C=qt(),j=qt(),O=ut(50,225).constrain(p.measure(20)),T={mouse:300,touch:400},M={mouse:500,touch:600},D=h?43:25;let F=!1,k=0,U=0,$=!1,Y=!1,V=!1,L=!1;function A(R){if(!x)return;function Z(se){(Gr(x)||x(R,se))&&Q(se)}const re=t;C.add(re,"dragstart",se=>se.preventDefault(),P).add(re,"touchmove",()=>{},P).add(re,"touchend",()=>{}).add(re,"touchstart",Z).add(re,"mousedown",Z).add(re,"touchcancel",B).add(re,"contextmenu",B).add(re,"click",H,!0)}function N(){C.clear(),j.clear()}function z(){const R=L?n:t;j.add(R,"touchmove",I,P).add(R,"touchend",B).add(R,"mousemove",I,P).add(R,"mouseup",B)}function X(R){const Z=R.nodeName||"";return _.includes(Z)}function W(){return(h?M:T)[L?"mouse":"touch"]}function te(R,Z){const re=u.add(Ei(R)*-1),se=i.byDistance(R,!h).distance;return h||ce(R)<O?se:v&&Z?se*.5:i.byIndex(re.get(),0).distance}function Q(R){const Z=Mo(R,r);L=Z,V=h&&Z&&!R.buttons&&F,F=$t(a.get(),f.get())>=2,!(Z&&R.button!==0)&&(X(R.target)||($=!0,s.pointerDown(R),o.useFriction(0).useDuration(0),a.set(f),z(),k=s.readPoint(R),U=s.readPoint(R,b),l.emit("pointerDown")))}function I(R){if(!Mo(R,r)&&R.touches.length>=2)return B(R);const re=s.readPoint(R),se=s.readPoint(R,b),de=$t(re,k),pe=$t(se,U);if(!Y&&!L&&(!R.cancelable||(Y=de>pe,!Y)))return B(R);const Ve=s.pointerMove(R);de>m&&(V=!0),o.useFriction(.3).useDuration(.75),d.start(),a.add(w(Ve)),R.preventDefault()}function B(R){const re=i.byDistance(0,!1).index!==u.get(),se=s.pointerUp(R)*W(),de=te(w(se),re),pe=Ax(se,de),Ve=D-10*pe,ve=g+pe/50;Y=!1,$=!1,j.clear(),o.useDuration(Ve).useFriction(ve),c.distance(de,!h),L=!1,l.emit("pointerUp")}function H(R){V&&(R.stopPropagation(),R.preventDefault(),V=!1)}function G(){return $}return{init:A,destroy:N,pointerDown:G}}function Dx(e,t){let r,a;function s(u){return u.timeStamp}function f(u,l){const h=`client${(l||e.scroll)==="x"?"X":"Y"}`;return(Mo(u,t)?u:u.touches[0])[h]}function d(u){return r=u,a=u,f(u)}function c(u){const l=f(u)-f(a),p=s(u)-s(r)>170;return a=u,p&&(r=u),l}function o(u){if(!r||!a)return 0;const l=f(a)-f(r),p=s(u)-s(r),h=s(u)-s(a)>170,m=l/p;return p&&!h&&ce(m)>.1?m:0}return{pointerDown:d,pointerMove:c,pointerUp:o,readPoint:f}}function kx(){function e(n){const{offsetTop:r,offsetLeft:a,offsetWidth:s,offsetHeight:f}=n;return{top:r,right:a+s,bottom:r+f,left:a,width:s,height:f}}return{measure:e}}function Lx(e){function t(r){return e*(r/100)}return{measure:t}}function Fx(e,t,n,r,a,s,f){const d=[e].concat(r);let c,o,i=[],u=!1;function l(v){return a.measureSize(f.measure(v))}function p(v){if(!s)return;o=l(e),i=r.map(l);function g(x){for(const b of x){if(u)return;const w=b.target===e,_=r.indexOf(b.target),P=w?o:i[_],C=l(w?e:r[_]);if(ce(C-P)>=.5){v.reInit(),t.emit("resize");break}}}c=new ResizeObserver(x=>{(Gr(s)||s(v,x))&&g(x)}),n.requestAnimationFrame(()=>{d.forEach(x=>c.observe(x))})}function h(){u=!0,c&&c.disconnect()}return{init:p,destroy:h}}function $x(e,t,n,r,a,s){let f=0,d=0,c=a,o=s,i=e.get(),u=0;function l(){const P=r.get()-e.get(),C=!c;let j=0;return C?(f=0,n.set(r),e.set(r),j=P):(n.set(e),f+=P/c,f*=o,i+=f,e.add(f),j=i-u),d=Ei(j),u=i,_}function p(){const P=r.get()-t.get();return ce(P)<.001}function h(){return c}function m(){return d}function v(){return f}function g(){return b(a)}function x(){return w(s)}function b(P){return c=P,_}function w(P){return o=P,_}const _={direction:m,duration:h,velocity:v,seek:l,settled:p,useBaseFriction:x,useBaseDuration:g,useFriction:w,useDuration:b};return _}function Bx(e,t,n,r,a){const s=a.measure(10),f=a.measure(50),d=ut(.1,.99);let c=!1;function o(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function i(p){if(!o())return;const h=e.reachedMin(t.get())?"min":"max",m=ce(e[h]-t.get()),v=n.get()-t.get(),g=d.constrain(m/f);n.subtract(v*g),!p&&ce(v)<s&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function u(p){c=!p}return{shouldConstrain:o,constrain:i,toggleActive:u}}function Gx(e,t,n,r,a){const s=ut(-t+e,0),f=u(),d=i(),c=l();function o(h,m){return $t(h,m)<=1}function i(){const h=f[0],m=je(f),v=f.lastIndexOf(h),g=f.indexOf(m)+1;return ut(v,g)}function u(){return n.map((h,m)=>{const{min:v,max:g}=s,x=s.constrain(h),b=!m,w=bi(n,m);return b?g:w||o(v,x)?v:o(g,x)?g:x}).map(h=>parseFloat(h.toFixed(3)))}function l(){if(t<=e+a)return[s.max];if(r==="keepSnaps")return f;const{min:h,max:m}=d;return f.slice(h,m)}return{snapsContained:c,scrollContainLimit:d}}function Vx(e,t,n){const r=t[0],a=n?r-e:je(t);return{limit:ut(a,r)}}function zx(e,t,n,r){const s=t.min+.1,f=t.max+.1,{reachedMin:d,reachedMax:c}=ut(s,f);function o(l){return l===1?c(n.get()):l===-1?d(n.get()):!1}function i(l){if(!o(l))return;const p=e*(l*-1);r.forEach(h=>h.add(p))}return{loop:i}}function Ux(e){const{max:t,length:n}=e;function r(s){const f=s-t;return n?f/-n:0}return{get:r}}function qx(e,t,n,r,a){const{startEdge:s,endEdge:f}=e,{groupSlides:d}=a,c=u().map(t.measure),o=l(),i=p();function u(){return d(r).map(m=>je(m)[f]-m[0][s]).map(ce)}function l(){return r.map(m=>n[s]-m[s]).map(m=>-ce(m))}function p(){return d(o).map(m=>m[0]).map((m,v)=>m+c[v])}return{snaps:o,snapsAligned:i}}function Hx(e,t,n,r,a,s){const{groupSlides:f}=a,{min:d,max:c}=r,o=i();function i(){const l=f(s),p=!e||t==="keepSnaps";return n.length===1?[s]:p?l:l.slice(d,c).map((h,m,v)=>{const g=!m,x=bi(v,m);if(g){const b=je(v[0])+1;return Cs(b)}if(x){const b=cn(s)-je(v)[0]+1;return Cs(b,je(v)[0])}return h})}return{slideRegistry:o}}function Wx(e,t,n,r,a){const{reachedAny:s,removeOffset:f,constrain:d}=r;function c(h){return h.concat().sort((m,v)=>ce(m)-ce(v))[0]}function o(h){const m=e?f(h):d(h),v=t.map((x,b)=>({diff:i(x-m,0),index:b})).sort((x,b)=>ce(x.diff)-ce(b.diff)),{index:g}=v[0];return{index:g,distance:m}}function i(h,m){const v=[h,h+n,h-n];if(!e)return h;if(!m)return c(v);const g=v.filter(x=>Ei(x)===m);return g.length?c(g):je(v)-n}function u(h,m){const v=t[h]-a.get(),g=i(v,m);return{index:h,distance:g}}function l(h,m){const v=a.get()+h,{index:g,distance:x}=o(v),b=!e&&s(v);if(!m||b)return{index:g,distance:h};const w=t[g]-x,_=h+i(w,0);return{index:g,distance:_}}return{byDistance:l,byIndex:u,shortcut:i}}function Kx(e,t,n,r,a,s,f){function d(u){const l=u.distance,p=u.index!==t.get();s.add(l),l&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(n.set(t.get()),t.set(u.index),f.emit("select"))}function c(u,l){const p=a.byDistance(u,l);d(p)}function o(u,l){const p=t.clone().set(u),h=a.byIndex(p.get(),l);d(h)}return{distance:c,index:o}}function Xx(e,t,n,r,a,s,f,d){const c={passive:!0,capture:!0};let o=0;function i(p){if(!d)return;function h(m){if(new Date().getTime()-o>10)return;f.emit("slideFocusStart"),e.scrollLeft=0;const x=n.findIndex(b=>b.includes(m));yi(x)&&(a.useDuration(0),r.index(x,0),f.emit("slideFocus"))}s.add(document,"keydown",u,!1),t.forEach((m,v)=>{s.add(m,"focus",g=>{(Gr(d)||d(p,g))&&h(v)},c)})}function u(p){p.code==="Tab"&&(o=new Date().getTime())}return{init:i}}function Ft(e){let t=e;function n(){return t}function r(c){t=f(c)}function a(c){t+=f(c)}function s(c){t-=f(c)}function f(c){return yi(c)?c:c.get()}return{get:n,set:r,add:a,subtract:s}}function Yl(e,t){const n=e.scroll==="x"?f:d,r=t.style;let a=null,s=!1;function f(l){return`translate3d(${l}px,0px,0px)`}function d(l){return`translate3d(0px,${l}px,0px)`}function c(l){if(s)return;const p=jx(e.direction(l));p!==a&&(r.transform=n(p),a=p)}function o(l){s=!l}function i(){s||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:i,to:c,toggleActive:o}}function Yx(e,t,n,r,a,s,f,d,c){const i=zt(a),u=zt(a).reverse(),l=g().concat(x());function p(C,j){return C.reduce((O,T)=>O-a[T],j)}function h(C,j){return C.reduce((O,T)=>p(O,j)>0?O.concat([T]):O,[])}function m(C){return s.map((j,O)=>({start:j-r[O]+.5+C,end:j+t-.5+C}))}function v(C,j,O){const T=m(j);return C.map(M=>{const D=O?0:-n,F=O?n:0,k=O?"end":"start",U=T[M][k];return{index:M,loopPoint:U,slideLocation:Ft(-1),translate:Yl(e,c[M]),target:()=>d.get()>U?D:F}})}function g(){const C=f[0],j=h(u,C);return v(j,n,!1)}function x(){const C=t-f[0]-1,j=h(i,C);return v(j,-n,!0)}function b(){return l.every(({index:C})=>{const j=i.filter(O=>O!==C);return p(j,t)<=.1})}function w(){l.forEach(C=>{const{target:j,translate:O,slideLocation:T}=C,M=j();M!==T.get()&&(O.to(M),T.set(M))})}function _(){l.forEach(C=>C.translate.clear())}return{canLoop:b,clear:_,loop:w,loopPoints:l}}function Qx(e,t,n){let r,a=!1;function s(c){if(!n)return;function o(i){for(const u of i)if(u.type==="childList"){c.reInit(),t.emit("slidesChanged");break}}r=new MutationObserver(i=>{a||(Gr(n)||n(c,i))&&o(i)}),r.observe(e,{childList:!0})}function f(){r&&r.disconnect(),a=!0}return{init:s,destroy:f}}function Zx(e,t,n,r){const a={};let s=null,f=null,d,c=!1;function o(){d=new IntersectionObserver(h=>{c||(h.forEach(m=>{const v=t.indexOf(m.target);a[v]=m}),s=null,f=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:r}),t.forEach(h=>d.observe(h))}function i(){d&&d.disconnect(),c=!0}function u(h){return Ut(a).reduce((m,v)=>{const g=parseInt(v),{isIntersecting:x}=a[g];return(h&&x||!h&&!x)&&m.push(g),m},[])}function l(h=!0){if(h&&s)return s;if(!h&&f)return f;const m=u(h);return h&&(s=m),h||(f=m),m}return{init:o,destroy:i,get:l}}function Jx(e,t,n,r,a,s){const{measureSize:f,startEdge:d,endEdge:c}=e,o=n[0]&&a,i=h(),u=m(),l=n.map(f),p=v();function h(){if(!o)return 0;const x=n[0];return ce(t[d]-x[d])}function m(){if(!o)return 0;const x=s.getComputedStyle(je(r));return parseFloat(x.getPropertyValue(`margin-${c}`))}function v(){return n.map((x,b,w)=>{const _=!b,P=bi(w,b);return _?l[b]+i:P?l[b]+u:w[b+1][d]-x[d]}).map(ce)}return{slideSizes:l,slideSizesWithGaps:p,startGap:i,endGap:u}}function e1(e,t,n,r,a,s,f,d,c){const{startEdge:o,endEdge:i,direction:u}=e,l=yi(n);function p(g,x){return zt(g).filter(b=>b%x===0).map(b=>g.slice(b,b+x))}function h(g){return g.length?zt(g).reduce((x,b,w)=>{const _=je(x)||0,P=_===0,C=b===cn(g),j=a[o]-s[_][o],O=a[o]-s[b][i],T=!r&&P?u(f):0,M=!r&&C?u(d):0,D=ce(O-M-(j+T));return w&&D>t+c&&x.push(b),C&&x.push(g.length),x},[]).map((x,b,w)=>{const _=Math.max(w[b-1]||0);return g.slice(_,x)}):[]}function m(g){return l?p(g,n):h(g)}return{groupSlides:m}}function t1(e,t,n,r,a,s,f){const{align:d,axis:c,direction:o,startIndex:i,loop:u,duration:l,dragFree:p,dragThreshold:h,inViewThreshold:m,slidesToScroll:v,skipSnaps:g,containScroll:x,watchResize:b,watchSlides:w,watchDrag:_,watchFocus:P}=s,C=2,j=kx(),O=j.measure(t),T=n.map(j.measure),M=Ix(c,o),D=M.measureSize(O),F=Lx(D),k=Mx(d,D),U=!u&&!!x,$=u||!!x,{slideSizes:Y,slideSizesWithGaps:V,startGap:L,endGap:A}=Jx(M,O,T,n,$,a),N=e1(M,D,v,u,O,T,L,A,C),{snaps:z,snapsAligned:X}=qx(M,k,O,T,N),W=-je(z)+je(V),{snapsContained:te,scrollContainLimit:Q}=Gx(D,W,X,x,C),I=U?te:X,{limit:B}=Vx(W,I,u),H=Xl(cn(I),i,u),G=H.clone(),q=zt(n),R=({dragHandler:dt,scrollBody:Hr,scrollBounds:Wr,options:{loop:ln}})=>{ln||Wr.constrain(dt.pointerDown()),Hr.seek()},Z=({scrollBody:dt,translate:Hr,location:Wr,offsetLocation:ln,previousLocation:ef,scrollLooper:tf,slideLooper:nf,dragHandler:rf,animation:of,eventHandler:Ci,scrollBounds:af,options:{loop:Oi}},Pi)=>{const Ai=dt.settled(),sf=!af.shouldConstrain(),ji=Oi?Ai:Ai&&sf,Mi=ji&&!rf.pointerDown();Mi&&of.stop();const cf=Wr.get()*Pi+ef.get()*(1-Pi);ln.set(cf),Oi&&(tf.loop(dt.direction()),nf.loop()),Hr.to(ln.get()),Mi&&Ci.emit("settle"),ji||Ci.emit("scroll")},re=Tx(r,a,()=>R(qr),dt=>Z(qr,dt)),se=.68,de=I[H.get()],pe=Ft(de),Ve=Ft(de),ve=Ft(de),et=Ft(de),At=$x(pe,ve,Ve,et,l,se),zr=Wx(u,I,W,B,et),Ur=Kx(re,H,G,At,zr,et,f),_i=Ux(B),Ri=qt(),Zl=Zx(t,n,f,m),{slideRegistry:Si}=Hx(U,x,I,Q,N,q),Jl=Xx(e,n,Si,Ur,At,Ri,f,P),qr={ownerDocument:r,ownerWindow:a,eventHandler:f,containerRect:O,slideRects:T,animation:re,axis:M,dragHandler:Nx(M,e,r,a,et,Dx(M,a),pe,re,Ur,At,zr,H,f,F,p,h,g,se,_),eventStore:Ri,percentOfView:F,index:H,indexPrevious:G,limit:B,location:pe,offsetLocation:ve,previousLocation:Ve,options:s,resizeHandler:Fx(t,f,a,n,M,b,j),scrollBody:At,scrollBounds:Bx(B,ve,et,At,F),scrollLooper:zx(W,B,ve,[pe,ve,Ve,et]),scrollProgress:_i,scrollSnapList:I.map(_i.get),scrollSnaps:I,scrollTarget:zr,scrollTo:Ur,slideLooper:Yx(M,D,W,Y,V,z,I,ve,n),slideFocus:Jl,slidesHandler:Qx(t,f,w),slidesInView:Zl,slideIndexes:q,slideRegistry:Si,slidesToScroll:N,target:et,translate:Yl(M,t)};return qr}function n1(){let e={},t;function n(o){t=o}function r(o){return e[o]||[]}function a(o){return r(o).forEach(i=>i(t,o)),c}function s(o,i){return e[o]=r(o).concat([i]),c}function f(o,i){return e[o]=r(o).filter(u=>u!==i),c}function d(){e={}}const c={init:n,emit:a,off:f,on:s,clear:d};return c}const r1={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function o1(e){function t(s,f){return Kl(s,f||{})}function n(s){const f=s.breakpoints||{},d=Ut(f).filter(c=>e.matchMedia(c).matches).map(c=>f[c]).reduce((c,o)=>t(c,o),{});return t(s,d)}function r(s){return s.map(f=>Ut(f.breakpoints||{})).reduce((f,d)=>f.concat(d),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function i1(e){let t=[];function n(s,f){return t=f.filter(({options:d})=>e.optionsAtMedia(d).active!==!1),t.forEach(d=>d.init(s,e)),f.reduce((d,c)=>Object.assign(d,{[c.name]:c}),{})}function r(){t=t.filter(s=>s.destroy())}return{init:n,destroy:r}}function vr(e,t,n){const r=e.ownerDocument,a=r.defaultView,s=o1(a),f=i1(s),d=qt(),c=n1(),{mergeOptions:o,optionsAtMedia:i,optionsMediaQueries:u}=s,{on:l,off:p,emit:h}=c,m=M;let v=!1,g,x=o(r1,vr.globalOptions),b=o(x),w=[],_,P,C;function j(){const{container:q,slides:R}=b;P=(jo(q)?e.querySelector(q):q)||e.children[0];const re=jo(R)?P.querySelectorAll(R):R;C=[].slice.call(re||P.children)}function O(q){const R=t1(e,P,C,r,a,q,c);if(q.loop&&!R.slideLooper.canLoop()){const Z=Object.assign({},q,{loop:!1});return O(Z)}return R}function T(q,R){v||(x=o(x,q),b=i(x),w=R||w,j(),g=O(b),u([x,...w.map(({options:Z})=>Z)]).forEach(Z=>d.add(Z,"change",M)),b.active&&(g.translate.to(g.location.get()),g.animation.init(),g.slidesInView.init(),g.slideFocus.init(G),g.eventHandler.init(G),g.resizeHandler.init(G),g.slidesHandler.init(G),g.options.loop&&g.slideLooper.loop(),P.offsetParent&&C.length&&g.dragHandler.init(G),_=f.init(G,w)))}function M(q,R){const Z=N();D(),T(o({startIndex:Z},q),R),c.emit("reInit")}function D(){g.dragHandler.destroy(),g.eventStore.clear(),g.translate.clear(),g.slideLooper.clear(),g.resizeHandler.destroy(),g.slidesHandler.destroy(),g.slidesInView.destroy(),g.animation.destroy(),f.destroy(),d.clear()}function F(){v||(v=!0,d.clear(),D(),c.emit("destroy"),c.clear())}function k(q,R,Z){!b.active||v||(g.scrollBody.useBaseFriction().useDuration(R===!0?0:b.duration),g.scrollTo.index(q,Z||0))}function U(q){const R=g.index.add(1).get();k(R,q,-1)}function $(q){const R=g.index.add(-1).get();k(R,q,1)}function Y(){return g.index.add(1).get()!==N()}function V(){return g.index.add(-1).get()!==N()}function L(){return g.scrollSnapList}function A(){return g.scrollProgress.get(g.offsetLocation.get())}function N(){return g.index.get()}function z(){return g.indexPrevious.get()}function X(){return g.slidesInView.get()}function W(){return g.slidesInView.get(!1)}function te(){return _}function Q(){return g}function I(){return e}function B(){return P}function H(){return C}const G={canScrollNext:Y,canScrollPrev:V,containerNode:B,internalEngine:Q,destroy:F,off:p,on:l,emit:h,plugins:te,previousScrollSnap:z,reInit:m,rootNode:I,scrollNext:U,scrollPrev:$,scrollProgress:A,scrollSnapList:L,scrollTo:k,selectedScrollSnap:N,slideNodes:H,slidesInView:X,slidesNotInView:W};return T(t,n),setTimeout(()=>c.emit("init"),0),G}vr.globalOptions=void 0;function wi(e={},t=[]){const n=S.useRef(e),r=S.useRef(t),[a,s]=S.useState(),[f,d]=S.useState(),c=S.useCallback(()=>{a&&a.reInit(n.current,r.current)},[a]);return S.useEffect(()=>{xi(n.current,e)||(n.current=e,c())},[e,c]),S.useEffect(()=>{Px(r.current,t)||(r.current=t,c())},[t,c]),S.useEffect(()=>{if(Ox()&&f){vr.globalOptions=wi.globalOptions;const o=vr(f,n.current,r.current);return s(o),()=>o.destroy()}else s(void 0)},[f,s]),[d,a]}wi.globalOptions=void 0;const Ql=S.createContext(void 0),Vr=()=>{const e=S.useContext(Ql);if(!e)throw new Error("useCarousel must be used within a Carousel component");return e},a1=.52,s1=({event:e,emblaApi:t,orientation:n,direction:r,onNext:a,onPrev:s})=>{if(t)switch(e.key){case"ArrowLeft":if(e.preventDefault(),n==="vertical")return;if(r==="rtl"){a();return}s();break;case"ArrowRight":if(e.preventDefault(),n==="vertical")return;if(r==="rtl"){s();return}a();break;case"ArrowUp":e.preventDefault(),n==="vertical"&&s();break;case"ArrowDown":e.preventDefault(),n==="vertical"&&a();break}},c1=(e,t,n)=>Math.min(Math.max(e,t),n),u1=({isScale:e,emblaApi:t,eventName:n,tweenFactor:r,tweenNodes:a})=>{if(!e)return;const s=t.internalEngine(),f=t.scrollProgress(),d=t.slidesInView(),c=n==="scroll";t.scrollSnapList().forEach((o,i)=>{let u=o-f;s.slideRegistry[i].forEach(p=>{if(c&&!d.includes(p))return;s.options.loop&&s.slideLooper.loopPoints.forEach(g=>{const x=g.target();if(p===g.index&&x!==0){const b=Math.sign(x);b===-1&&(u=o-(1+f)),b===1&&(u=o+(1-f))}});const h=1-Math.abs(u*r.current),m=c1(h,0,1).toString(),v=a.current[p];v&&(v.style.transform=`scale(${m})`)})})},l1=S.forwardRef(({className:e,children:t,...n},r)=>{const{emblaRef:a,orientation:s}=Vr();return y.jsxRuntimeExports.jsx("div",{ref:a,className:"overflow-hidden",...n,children:y.jsxRuntimeExports.jsx("div",{ref:r,className:J.cn("flex",s==="vertical"?"flex-col":"flex-row",e),style:{touchAction:"pan-y pinch-zoom"},children:t})})}),f1=S.forwardRef(({children:e,className:t,...n},r)=>{const{isScale:a}=Vr();return y.jsxRuntimeExports.jsx("div",{ref:r,className:J.cn("min-w-0 shrink-0 grow-0",t),...n,children:a?y.jsxRuntimeExports.jsx("div",{className:"slider_content",children:e}):e})}),d1=S.forwardRef(({className:e,activeClass:t,...n},r)=>{const{selectedIndex:a,scrollSnaps:s,orientation:f,onDotButtonClick:d,carouselId:c}=Vr();return y.jsxRuntimeExports.jsx("div",{ref:r,className:J.cn("flex gap-2",e),...n,children:s.map((o,i)=>y.jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>d(i),className:J.cn("relative m-0 inline-flex p-0",f==="vertical"?"h-6 w-1":"h-1 w-6"),children:[y.jsxRuntimeExports.jsx("div",{className:J.cn("rounded-full bg-neutral-500/40",f==="vertical"?"h-6 w-1":"h-1 w-6")}),i===a&&y.jsxRuntimeExports.jsx(_t,{mode:"wait",children:y.jsxRuntimeExports.jsx(y.motion.div,{transition:{layout:{duration:.4,ease:"easeInOut",delay:.04}},layoutId:`hover-${c}`,className:J.cn("absolute top-0 left-0 z-3 h-full w-full rounded-full bg-black dark:bg-white",f==="vertical"?"h-6 w-1":"h-1 w-6",t)})})]},i))})}),p1=S.forwardRef(({children:e,options:t={},plugins:n=[],className:r,isScale:a=!1,dir:s,...f},d)=>{const c=S.useId(),[o,i]=S.useState([]),u=t.axis==="y"?"vertical":"horizontal",l=t.direction??s,[p,h]=wi({...t,axis:u==="vertical"?"y":"x",direction:l},n),[m,v]=S.useState(!0),[g,x]=S.useState(!0),[b,w]=S.useState(0),[_,P]=S.useState([]),[C,j]=S.useState(0),[O,T]=S.useState(0),M=S.useCallback(()=>{h==null||h.scrollPrev()},[h]),D=S.useCallback(()=>{h==null||h.scrollNext()},[h]),F=S.useCallback(z=>{h==null||h.scrollTo(z)},[h]),k=S.useCallback(z=>s1({event:z,emblaApi:h,orientation:u,direction:l,onPrev:M,onNext:D}),[h,u,l,M,D]),U=S.useCallback(()=>{h&&(w(h.selectedScrollSnap()),v(!h.canScrollPrev()),x(!h.canScrollNext()))},[h]),$=S.useCallback(z=>{const X=Math.max(0,Math.min(1,z.scrollProgress()));j(X*100)},[]),Y=S.useRef(0),V=S.useRef([]),L=S.useCallback(z=>{a&&(V.current=z.slideNodes().map(X=>X.querySelector(".slider_content")))},[a]),A=S.useCallback(z=>{a&&(Y.current=a1*z.scrollSnapList().length)},[a]),N=S.useCallback((z,X)=>u1({emblaApi:z,isScale:a,eventName:X,tweenFactor:Y,tweenNodes:V}),[a]);return S.useEffect(()=>{h&&(P(()=>h.scrollSnapList()),T(h.scrollSnapList().length),U(),$(h),h.on("reInit",U).on("select",U).on("reInit",$).on("scroll",$),a&&(L(h),A(h),N(h),h.on("reInit",L).on("reInit",A).on("reInit",N).on("scroll",N)))},[h,U,$,a,L,A,N]),y.jsxRuntimeExports.jsx(Ql.Provider,{value:{emblaApi:h,emblaRef:p,prevBtnDisabled:m,nextBtnDisabled:g,onPrevButtonClick:M,onNextButtonClick:D,selectedIndex:b,scrollSnaps:_,onDotButtonClick:F,scrollProgress:C,selectedSnap:b,snapCount:O,isScale:a,slidesArr:o,setSlidesArr:i,carouselId:c,orientation:u,direction:l,handleKeyDown:k},children:y.jsxRuntimeExports.jsx("div",{ref:d,tabIndex:0,onKeyDownCapture:k,className:J.cn("relative w-full focus:outline-hidden",r),dir:l,...f,children:e})})}),un=p1;un.Item=f1;un.Container=l1;un.Dots=d1;un.useCarousel=Vr;exports.Anchor=ti;exports.AnimatePresence=_t;exports.Arrow=ri;exports.Avatar=y0;exports.Barcode=dx;exports.Button=Oo;exports.Carousel=un;exports.Checkbox=hl;exports.ClearButton=gl;exports.Col=_x;exports.Content=ni;exports.Content$1=g0;exports.Content2=Zv;exports.DismissableLayer=Wt;exports.Dropdown=$0;exports.Flex=rt;exports.FocusScope=Kt;exports.Icon=Yv;exports.InputNumber=xl;exports.Item=ii;exports.Item$1=u0;exports.Item$2=zl;exports.Modal=El;exports.NotificationContent=sg;exports.PopoverProvider=ug;exports.Portal=St;exports.Portal$1=T0;exports.Portal$2=Qv;exports.Presence=Ne;exports.Primitive=ee;exports.QRCodeSVG=Tl;exports.ReactRemoveScroll=Xt;exports.Root=oi;exports.Root$1=xf;exports.Root$2=n0;exports.Root$3=dd;exports.Root2=ei;exports.Root2$1=qf;exports.Root2$2=Wv;exports.Row=gx;exports.SearchInput=Ul;exports.Slot=Ps;exports.ToggleGroup=Wl;exports.Trigger=l0;exports.Trigger$1=Kv;exports.Typography=nn;exports.Value=Xv;exports.Viewport=Jv;exports.clamp=bo;exports.composeEventHandlers=K;exports.createCollection=Ht;exports.createContextScope=we;exports.createPopperScope=Qt;exports.createRovingFocusGroupScope=Jt;exports.createSlot=Ke;exports.createSlottable=df;exports.getInputStyles=vl;exports.hideOthers=Rr;exports.toggleVariants=ql;exports.useComposedRefs=oe;exports.useControllableState=be;exports.useDirection=Rt;exports.useFocusGuards=wr;exports.useId=Ce;exports.usePrevious=zo;exports.useSize=Uo;
|