@segmentify/ui 0.0.68 → 0.0.69

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.
@@ -8,8 +8,13 @@ declare function SelectTrigger({ className, size, children, ...props }: React.Co
8
8
  }): import("react/jsx-runtime").JSX.Element;
9
9
  type SelectContentProps = React.ComponentProps<typeof SelectPrimitive.Content> & {
10
10
  isPortal?: boolean;
11
+ /**
12
+ * When true, positions the menu relative to the selected item (native macOS-style).
13
+ * When false (default), uses popper positioning below the trigger.
14
+ */
15
+ alignItemWithTrigger?: boolean;
11
16
  };
12
- declare function SelectContent({ className, children, position, isPortal, align, style, ...props }: SelectContentProps): import("react/jsx-runtime").JSX.Element;
17
+ declare function SelectContent({ className, children, position, isPortal, align, alignItemWithTrigger, side, sideOffset, style, ...props }: SelectContentProps): import("react/jsx-runtime").JSX.Element;
13
18
  declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): import("react/jsx-runtime").JSX.Element;
14
19
  declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
15
20
  declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
@@ -5,5 +5,5 @@ interface SearchProps {
5
5
  label?: string;
6
6
  autoFocus?: boolean;
7
7
  }
8
- export declare function Search({ placeholder, filterColumn, className, label, autoFocus, }: SearchProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function Search({ placeholder, filterColumn, className, label, autoFocus }: SearchProps): import("react/jsx-runtime").JSX.Element;
9
9
  export {};
@@ -231,7 +231,7 @@ ${p5(this.code(t,n))}
231
231
  `,{[si.blotName]:n}),a.insert(s)),o)],new WeakMap)}}Jue.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};class la extends Fr{static blotName="table";static tagName="TD";static create(t){const n=super.create();return t?n.setAttribute("data-row",t):n.setAttribute("data-row",VR()),n}static formats(t){if(t.hasAttribute("data-row"))return t.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(t,n){t===la.blotName&&n?this.domNode.setAttribute("data-row",n):super.format(t,n)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}}class pu extends Hu{static blotName="table-row";static tagName="TR";checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const t=this.children.head.formats(),n=this.children.tail.formats(),r=this.next.children.head.formats(),i=this.next.children.tail.formats();return t.table===n.table&&t.table===r.table&&t.table===i.table}return!1}optimize(t){super.optimize(t),this.children.forEach(n=>{if(n.next==null)return;const r=n.formats(),i=n.next.formats();if(r.table!==i.table){const o=this.splitAfter(n);o&&o.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}class Ws extends Hu{static blotName="table-body";static tagName="TBODY"}class Dg extends Hu{static blotName="table-container";static tagName="TABLE";balanceCells(){const t=this.descendants(pu),n=t.reduce((r,i)=>Math.max(i.children.length,r),0);t.forEach(r=>{new Array(n-r.children.length).fill(0).forEach(()=>{let i;r.children.head!=null&&(i=la.formats(r.children.head.domNode));const o=this.scroll.create(la.blotName,i);r.appendChild(o),o.optimize()})})}cells(t){return this.rows().map(n=>n.children.at(t))}deleteColumn(t){const[n]=this.descendant(Ws);n==null||n.children.head==null||n.children.forEach(r=>{r.children.at(t)?.remove()})}insertColumn(t){const[n]=this.descendant(Ws);n==null||n.children.head==null||n.children.forEach(r=>{const i=r.children.at(t),o=la.formats(r.children.head.domNode),a=this.scroll.create(la.blotName,o);r.insertBefore(a,i)})}insertRow(t){const[n]=this.descendant(Ws);if(n==null||n.children.head==null)return;const r=VR(),i=this.scroll.create(pu.blotName);n.children.head.children.forEach(()=>{const a=this.scroll.create(la.blotName,r);i.appendChild(a)});const o=n.children.at(t);n.insertBefore(i,o)}rows(){const t=this.children.head;return t==null?[]:t.children.map(n=>n)}}Dg.allowedChildren=[Ws];Ws.requiredContainer=Dg;Ws.allowedChildren=[pu];pu.requiredContainer=Ws;pu.allowedChildren=[la];la.requiredContainer=pu;function VR(){return`row-${Math.random().toString(36).slice(2,6)}`}class xht extends Sl{static register(){xe.register(la),xe.register(pu),xe.register(Ws),xe.register(Dg)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Dg).forEach(t=>{t.balanceCells()})}deleteColumn(){const[t,,n]=this.getTable();n!=null&&(t.deleteColumn(n.cellOffset()),this.quill.update(xe.sources.USER))}deleteRow(){const[,t]=this.getTable();t!=null&&(t.remove(),this.quill.update(xe.sources.USER))}deleteTable(){const[t]=this.getTable();if(t==null)return;const n=t.offset();t.remove(),this.quill.update(xe.sources.USER),this.quill.setSelection(n,xe.sources.SILENT)}getTable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(t==null)return[null,null,null,-1];const[n,r]=this.quill.getLine(t.index);if(n==null||n.statics.blotName!==la.blotName)return[null,null,null,-1];const i=n.parent;return[i.parent.parent,i,n,r]}insertColumn(t){const n=this.quill.getSelection();if(!n)return;const[r,i,o]=this.getTable(n);if(o==null)return;const a=o.cellOffset();r.insertColumn(a+t),this.quill.update(xe.sources.USER);let s=i.rowOffset();t===0&&(s+=1),this.quill.setSelection(n.index+s,n.length,xe.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(t){const n=this.quill.getSelection();if(!n)return;const[r,i,o]=this.getTable(n);if(o==null)return;const a=i.rowOffset();r.insertRow(a+t),this.quill.update(xe.sources.USER),t>0?this.quill.setSelection(n,xe.sources.SILENT):this.quill.setSelection(n.index+i.children.length,n.length,xe.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(t,n){const r=this.quill.getSelection();if(r==null)return;const i=new Array(t).fill(0).reduce(o=>{const a=new Array(n).fill(`
232
232
  `).join("");return o.insert(a,{table:VR()})},new ct().retain(r.index));this.quill.updateContents(i,xe.sources.USER),this.quill.setSelection(r.index,xe.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(xe.events.SCROLL_OPTIMIZE,t=>{t.some(n=>["TD","TR","TBODY","TABLE"].includes(n.target.tagName)?(this.quill.once(xe.events.TEXT_CHANGE,(r,i,o)=>{o===xe.sources.USER&&this.balanceTables()}),!0):!1)})}}const XG=ws("quill:toolbar");let GR=class extends Sl{constructor(e,t){if(super(e,t),Array.isArray(this.options.container)){const n=document.createElement("div");n.setAttribute("role","toolbar"),Eht(n,this.options.container),e.container?.parentNode?.insertBefore(n,e.container),this.container=n}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){XG.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(n=>{const r=this.options.handlers?.[n];r&&this.addHandler(n,r)}),Array.from(this.container.querySelectorAll("button, select")).forEach(n=>{this.attach(n)}),this.quill.on(xe.events.EDITOR_CHANGE,()=>{const[n]=this.quill.selection.getRange();this.update(n)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(r=>r.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),e.tagName==="BUTTON"&&e.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){XG.warn("ignoring attaching to nonexistent format",t,e);return}const n=e.tagName==="SELECT"?"change":"click";e.addEventListener(n,r=>{let i;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const a=e.options[e.selectedIndex];a.hasAttribute("selected")?i=!1:i=a.value||!1}else e.classList.contains("ql-active")?i=!1:i=e.value||!e.hasAttribute("value"),r.preventDefault();this.quill.focus();const[o]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,i);else if(this.quill.scroll.query(t).prototype instanceof Ki){if(i=prompt(`Enter ${t}`),!i)return;this.quill.updateContents(new ct().retain(o.index).delete(o.length).insert({[t]:i}),xe.sources.USER)}else this.quill.format(t,i,xe.sources.USER);this.update(o)}),this.controls.push([t,e])}update(e){const t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(n=>{const[r,i]=n;if(i.tagName==="SELECT"){let o=null;if(e==null)o=null;else if(t[r]==null)o=i.querySelector("option[selected]");else if(!Array.isArray(t[r])){let a=t[r];typeof a=="string"&&(a=a.replace(/"/g,'\\"')),o=i.querySelector(`option[value="${a}"]`)}o==null?(i.value="",i.selectedIndex=-1):o.selected=!0}else if(e==null)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const o=t[r],a=o===i.getAttribute("value")||o!=null&&o.toString()===i.getAttribute("value")||o==null&&!i.getAttribute("value");i.classList.toggle("ql-active",a),i.setAttribute("aria-pressed",a.toString())}else{const o=t[r]!=null;i.classList.toggle("ql-active",o),i.setAttribute("aria-pressed",o.toString())}})}};GR.DEFAULTS={};function KG(e,t,n){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${t}`),r.setAttribute("aria-pressed","false"),n!=null?(r.value=n,r.setAttribute("aria-label",`${t}: ${n}`)):r.setAttribute("aria-label",t),e.appendChild(r)}function Eht(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(n=>{const r=document.createElement("span");r.classList.add("ql-formats"),n.forEach(i=>{if(typeof i=="string")KG(r,i);else{const o=Object.keys(i)[0],a=i[o];Array.isArray(a)?Cht(r,o,a):KG(r,o,a)}}),e.appendChild(r)})}function Cht(e,t,n){const r=document.createElement("select");r.classList.add(`ql-${t}`),n.forEach(i=>{const o=document.createElement("option");i!==!1?o.setAttribute("value",String(i)):o.setAttribute("selected","selected"),r.appendChild(o)}),e.appendChild(r)}GR.DEFAULTS={container:null,handlers:{clean(){const e=this.quill.getSelection();if(e!=null)if(e.length===0){const t=this.quill.getFormat();Object.keys(t).forEach(n=>{this.quill.scroll.query(n,dt.INLINE)!=null&&this.quill.format(n,!1,xe.sources.USER)})}else this.quill.removeFormat(e.index,e.length,xe.sources.USER)},direction(e){const{align:t}=this.quill.getFormat();e==="rtl"&&t==null?this.quill.format("align","right",xe.sources.USER):!e&&t==="right"&&this.quill.format("align",!1,xe.sources.USER),this.quill.format("direction",e,xe.sources.USER)},indent(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0,10);if(e==="+1"||e==="-1"){let i=e==="+1"?1:-1;n.direction==="rtl"&&(i*=-1),this.quill.format("indent",r+i,xe.sources.USER)}},link(e){e===!0&&(e=prompt("Enter link URL:")),this.quill.format("link",e,xe.sources.USER)},list(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t);e==="check"?n.list==="checked"||n.list==="unchecked"?this.quill.format("list",!1,xe.sources.USER):this.quill.format("list","unchecked",xe.sources.USER):this.quill.format("list",e,xe.sources.USER)}}};const Sht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',$ht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',Mht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',Aht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',Nht='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',Oht='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',Rht='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',Iht='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',ZG='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',Pht='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',Fht='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',Tht='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',Dht='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',zht='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',_ht='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',kht='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',Lht='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',jht='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',Hht='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',Bht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',Vht='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',Ght='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',qht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',Wht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',Uht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',Yht='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',Xht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',Kht='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',Zht='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',Jht='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',Qht='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',e2t='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',t2t='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',Ch={align:{"":Sht,center:$ht,right:Mht,justify:Aht},background:Nht,blockquote:Oht,bold:Rht,clean:Iht,code:ZG,"code-block":ZG,color:Pht,direction:{"":Fht,rtl:Tht},formula:Dht,header:{1:zht,2:_ht,3:kht,4:Lht,5:jht,6:Hht},italic:Bht,image:Vht,indent:{"+1":Ght,"-1":qht},link:Wht,list:{bullet:Uht,check:Yht,ordered:Xht},script:{sub:Kht,super:Zht},strike:Jht,table:Qht,underline:e2t,video:t2t},n2t='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let JG=0;function QG(e,t){e.setAttribute(t,`${e.getAttribute(t)!=="true"}`)}class g5{constructor(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",n=>{switch(n.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),n.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),QG(this.label,"aria-expanded"),QG(this.options,"aria-hidden")}buildItem(t){const n=document.createElement("span");n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item");const r=t.getAttribute("value");return r&&n.setAttribute("data-value",r),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",()=>{this.selectItem(n,!0)}),n.addEventListener("keydown",i=>{switch(i.key){case"Enter":this.selectItem(n,!0),i.preventDefault();break;case"Escape":this.escape(),i.preventDefault();break}}),n}buildLabel(){const t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=n2t,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}buildOptions(){const t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id=`ql-picker-options-${JG}`,JG+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,Array.from(this.select.options).forEach(n=>{const r=this.buildItem(n);t.appendChild(r),n.selected===!0&&this.selectItem(r)}),this.container.appendChild(t)}buildPicker(){Array.from(this.select.attributes).forEach(t=>{this.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.container.querySelector(".ql-selected");t!==r&&(r?.classList.remove("ql-selected"),t!=null&&(t.classList.add("ql-selected"),this.select.selectedIndex=Array.from(t.parentNode.children).indexOf(t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),n&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let t;if(this.select.selectedIndex>-1){const r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);const n=t!=null&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}class Que extends g5{constructor(t,n){super(t),this.label.innerHTML=n,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(t){const n=super.buildItem(t);return n.style.backgroundColor=t.getAttribute("value")||"",n}selectItem(t,n){super.selectItem(t,n);const r=this.label.querySelector(".ql-color-label"),i=t&&t.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=i:r.style.fill=i)}}class ede extends g5{constructor(t,n){super(t),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=n[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(t,n){super.selectItem(t,n);const r=t||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}}const r2t=e=>{const{overflowY:t}=getComputedStyle(e,null);return t!=="visible"&&t!=="clip"};class tde{constructor(t,n){this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,r2t(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(t){const n=t.left+t.width/2-this.root.offsetWidth/2,r=t.bottom+this.quill.root.scrollTop;this.root.style.left=`${n}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const i=this.boundsContainer.getBoundingClientRect(),o=this.root.getBoundingClientRect();let a=0;if(o.right>i.right&&(a=i.right-o.right,this.root.style.left=`${n+a}px`),o.left<i.left&&(a=i.left-o.left,this.root.style.left=`${n+a}px`),o.bottom>i.bottom){const s=o.bottom-o.top,c=t.bottom-t.top+s;this.root.style.top=`${r-c}px`,this.root.classList.add("ql-flip")}return a}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const i2t=[!1,"center","right","justify"],o2t=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],a2t=[!1,"serif","monospace"],l2t=["1","2","3",!1],s2t=["small",!1,"large","huge"];class q2 extends J1{constructor(t,n){super(t,n);const r=i=>{if(!document.body.contains(t.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(i.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(o=>{o.container.contains(i.target)||o.close()})};t.emitter.listenDOM("click",document.body,r)}addModule(t){const n=super.addModule(t);return t==="toolbar"&&this.extendToolbar(n),n}buildButtons(t,n){Array.from(t).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(i=>{if(i.startsWith("ql-")&&(i=i.slice(3),n[i]!=null))if(i==="direction")r.innerHTML=n[i][""]+n[i].rtl;else if(typeof n[i]=="string")r.innerHTML=n[i];else{const o=r.value||"";o!=null&&n[i][o]&&(r.innerHTML=n[i][o])}})})}buildPickers(t,n){this.pickers=Array.from(t).map(i=>{if(i.classList.contains("ql-align")&&(i.querySelector("option")==null&&Nf(i,i2t),typeof n.align=="object"))return new ede(i,n.align);if(i.classList.contains("ql-background")||i.classList.contains("ql-color")){const o=i.classList.contains("ql-background")?"background":"color";return i.querySelector("option")==null&&Nf(i,o2t,o==="background"?"#ffffff":"#000000"),new Que(i,n[o])}return i.querySelector("option")==null&&(i.classList.contains("ql-font")?Nf(i,a2t):i.classList.contains("ql-header")?Nf(i,l2t):i.classList.contains("ql-size")&&Nf(i,s2t)),new g5(i)});const r=()=>{this.pickers.forEach(i=>{i.update()})};this.quill.on(at.events.EDITOR_CHANGE,r)}}q2.DEFAULTS=qs({},J1.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let e=this.container.querySelector("input.ql-image[type=file]");e==null&&(e=document.createElement("input"),e.setAttribute("type","file"),e.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),e.classList.add("ql-image"),e.addEventListener("change",()=>{const t=this.quill.getSelection(!0);this.quill.uploader.upload(t,e.files),e.value=""}),this.container.appendChild(e)),e.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class nde extends tde{constructor(t,n){super(t,n),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",t=>{t.key==="Enter"?(this.save(),t.preventDefault()):t.key==="Escape"&&(this.cancel(),t.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;n!=null?this.textbox.value=n:t!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${t}`)||""),this.root.setAttribute("data-mode",t)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:t}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:n}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,at.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,at.sources.USER)),this.quill.root.scrollTop=n;break}case"video":t=c2t(t);case"formula":{if(!t)break;const n=this.quill.getSelection(!0);if(n!=null){const r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,at.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",at.sources.USER),this.quill.setSelection(r+2,at.sources.USER)}break}}this.textbox.value="",this.hide()}}function c2t(e){let t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?`${t[1]||"https"}://www.youtube.com/embed/${t[2]}?showinfo=0`:(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${t[1]||"https"}://player.vimeo.com/video/${t[2]}/`:e}function Nf(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;t.forEach(r=>{const i=document.createElement("option");r===n?i.setAttribute("selected","selected"):i.setAttribute("value",String(r)),e.appendChild(i)})}const u2t=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class d2t extends nde{static TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join("");constructor(t,n){super(t,n),this.quill.on(at.events.EDITOR_CHANGE,(r,i,o,a)=>{if(r===at.events.SELECTION_CHANGE)if(i!=null&&i.length>0&&a===at.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const s=this.quill.getLines(i.index,i.length);if(s.length===1){const c=this.quill.getBounds(i);c!=null&&this.position(c)}else{const c=s[s.length-1],u=this.quill.getIndex(c),d=Math.min(c.length()-1,i.index+i.length-u),f=this.quill.getBounds(new hu(u,d));f!=null&&this.position(f)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(at.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const t=this.quill.getSelection();if(t!=null){const n=this.quill.getBounds(t);n!=null&&this.position(n)}},1)})}cancel(){this.show()}position(t){const n=super.position(t),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",n!==0&&(r.style.marginLeft=`${-1*n-r.offsetWidth/2}px`),n}}class rde extends q2{constructor(t,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=u2t),super(t,n),this.quill.container.classList.add("ql-bubble")}extendToolbar(t){this.tooltip=new d2t(this.quill,this.options.bounds),t.container!=null&&(this.tooltip.root.appendChild(t.container),this.buildButtons(t.container.querySelectorAll("button"),Ch),this.buildPickers(t.container.querySelectorAll("select"),Ch))}}rde.DEFAULTS=qs({},q2.DEFAULTS,{modules:{toolbar:{handlers:{link(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1,xe.sources.USER)}}}}});const f2t=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class h2t extends nde{static TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join("");preview=this.root.querySelector("a.ql-preview");listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){const n=this.linkRange;this.restoreFocus(),this.quill.formatText(n,"link",!1,at.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(at.events.SELECTION_CHANGE,(t,n,r)=>{if(t!=null){if(t.length===0&&r===at.sources.USER){const[i,o]=this.quill.scroll.descendant(Tg,t.index);if(i!=null){this.linkRange=new hu(t.index-o,i.length());const a=Tg.formats(i.domNode);this.preview.textContent=a,this.preview.setAttribute("href",a),this.show();const s=this.quill.getBounds(this.linkRange);s!=null&&this.position(s);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}class ide extends q2{constructor(t,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=f2t),super(t,n),this.quill.container.classList.add("ql-snow")}extendToolbar(t){t.container!=null&&(t.container.classList.add("ql-snow"),this.buildButtons(t.container.querySelectorAll("button"),Ch),this.buildPickers(t.container.querySelectorAll("select"),Ch),this.tooltip=new h2t(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(n,r)=>{t.handlers.link.call(t,!r.format.link)}))}}ide.DEFAULTS=qs({},q2.DEFAULTS,{modules:{toolbar:{handlers:{link(e){if(e){const t=this.quill.getSelection();if(t==null||t.length===0)return;let n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&n.indexOf("mailto:")!==0&&(n=`mailto:${n}`);const{tooltip:r}=this.quill.theme;r.edit("link",n)}else this.quill.format("link",!1,xe.sources.USER)}}}}});xe.register({"attributors/attribute/direction":Hue,"attributors/class/align":kue,"attributors/class/background":b0t,"attributors/class/color":v0t,"attributors/class/direction":Bue,"attributors/class/font":que,"attributors/class/size":Uue,"attributors/style/align":Lue,"attributors/style/background":_R,"attributors/style/color":zR,"attributors/style/direction":Vue,"attributors/style/font":Wue,"attributors/style/size":Yue},!0);xe.register({"formats/align":kue,"formats/direction":Bue,"formats/indent":uht,"formats/background":_R,"formats/color":zR,"formats/font":que,"formats/size":Uue,"formats/blockquote":dht,"formats/code-block":si,"formats/header":fht,"formats/list":G2,"formats/bold":BR,"formats/code":kR,"formats/italic":hht,"formats/link":Tg,"formats/script":pht,"formats/strike":mht,"formats/underline":ght,"formats/formula":vht,"formats/image":bht,"formats/video":yht,"modules/syntax":Jue,"modules/table":xht,"modules/toolbar":GR,"themes/bubble":rde,"themes/snow":ide,"ui/icons":Ch,"ui/picker":g5,"ui/icon-picker":ede,"ui/color-picker":Que,"ui/tooltip":tde},!0);const p2t=l.forwardRef(({readOnly:e,defaultValue:t,onTextChange:n,onSelectionChange:r,theme:i="snow"},o)=>{const a=l.useRef(null),s=l.useRef(t),c=l.useRef(n),u=l.useRef(r),d=l.useRef(null);return l.useLayoutEffect(()=>{c.current=n,u.current=r}),l.useEffect(()=>{o&&typeof o=="object"&&o.current&&o.current.enable(!e)},[o,e]),l.useEffect(()=>{const f=a.current;if(!f)return;const h=f.appendChild(f.ownerDocument.createElement("div")),p=new xe(h,{theme:i});return d.current=p,o&&typeof o=="object"&&(o.current=p),s.current&&p.setContents(s.current),p.on(xe.events.TEXT_CHANGE,()=>{const g=p.getSemanticHTML();c.current?.(g)}),p.on(xe.events.SELECTION_CHANGE,(g,m,b)=>{u.current?.(g,m,b)}),()=>{d.current=null,o&&typeof o=="object"&&(o.current=null),f.innerHTML=""}},[o,i]),y.jsx("div",{ref:a})});p2t.displayName="QuillEditor";l.createContext(null);l.createContext(null);function m2t(e,t){let[n,r]=l.useState(e);return l.useEffect(()=>{let i=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(i)}},[e,t]),n}l.createContext({});function W2({...e}){return y.jsx(a5e,{"data-slot":"popover",...e})}const Q1=v.forwardRef(({...e},t)=>y.jsx(CZ,{"data-slot":"popover-trigger",ref:t,...e}));Q1.displayName=CZ.displayName;const ef=v.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},i)=>y.jsx(l5e,{children:y.jsx(SZ,{ref:i,"data-slot":"popover-content",align:t,sideOffset:n,className:te("ui-lib-root ui:z-[102] ui:w-72 ui:rounded-md ui:border ui:bg-popover ui:p-4 ui:text-popover-foreground ui:shadow-md ui:outline-none ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2",e),...r})}));ef.displayName=SZ.displayName;const ode=v.forwardRef(({...e},t)=>y.jsx(EZ,{"data-slot":"popover-anchor",ref:t,...e}));ode.displayName=EZ.displayName;function g2t({selectedItem:e,fetchItems:t,searchPlaceholder:n="Search...",placeholder:r="Select an item",className:i,disabled:o=!1,align:a,onSelect:s}){const[c,u]=l.useState(!1),[d,f]=l.useState([e]),[h,p]=l.useState(""),[g,m]=l.useState(!1),b=m2t(h,300),w=l.useRef(t),x=l.useRef(e);l.useEffect(()=>{w.current=t},[t]),l.useEffect(()=>{x.current=e},[e]);const E=l.useCallback((M,A)=>{w.current(M,A).then(R=>{if(A?.aborted)return;let T=[...R];const k=x.current;k.value&&!M&&!T.find(N=>N.value===k.value)&&(T=[k,...T]),f(T)}).catch(()=>{if(A?.aborted)return;const R=x.current;f(R.value?[R]:[])}).finally(()=>{A?.aborted||m(!1)})},[]);l.useEffect(()=>{if(!c||h===""&&b!=="")return;const M=new AbortController;return E(b,M.signal),()=>{M.abort()}},[b,E,c,h]);function S(M){M&&(f([]),p(""),m(!0)),u(M)}const $=M=>{p(M),m(M!==b)};return y.jsxs(W2,{open:c,onOpenChange:S,children:[y.jsx(Q1,{asChild:!0,children:y.jsxs(Gn,{variant:"outline",role:"combobox","aria-expanded":c,className:te("ui:justify-between ui:w-full ui:h-10",i),disabled:o,children:[y.jsx("span",{className:"ui:truncate ui:flex ui:items-center",children:e.label||r}),y.jsx(qe.ChevronDownIcon,{className:"ui:ml-2 ui:h-4 ui:w-4 ui:shrink-0 ui:opacity-50"})]})}),y.jsx(ef,{style:{width:"var(--radix-popover-trigger-width)"},className:"ui:p-0",align:a,children:y.jsxs(Jv,{shouldFilter:!1,children:[y.jsx(qA,{placeholder:n,value:h,onValueChange:$}),y.jsxs(WA,{children:[!g&&y.jsx(UA,{children:"No results found."}),y.jsx(YA,{children:d.map(M=>{if(!M.value)return null;const A=e.value===M.value;return y.jsxs(XA,{value:M.value,onSelect:()=>{s(M),S(!1)},children:[M.label,y.jsx(qe.Check,{className:te("ui:ml-auto ui:h-4 ui:w-4",A?"ui:opacity-100":"ui:opacity-0")})]},M.value)})})]})]})})]})}const v2t="dd/MM/yyyy",b2t=({date:e,format:t=v2t})=>e?y.jsx(y.Fragment,{children:qc(e,t)}):null,ade=({start:e,end:t,onConfirm:n,className:r,triggerButtonClassName:i,label:o,placeholder:a,confirmLabel:s="Confirm",disabledCondition:c,dateLocale:u})=>{const[d,f]=l.useState(!1),[h,p]=l.useState(e&&t?{from:e,to:t}:void 0),g=()=>{!h?.from||!h?.to||(n({from:h.from,to:h.to}),f(!1))};return y.jsxs("div",{className:te("ui:grid ui:gap-2",r),children:[o&&y.jsx(Io,{children:o}),y.jsxs(W2,{open:d,onOpenChange:f,children:[y.jsx(Q1,{asChild:!0,children:y.jsxs(Gn,{id:"date",variant:"outline",className:te("ui:h-auto ui:text-muted-foreground ui:justify-start ui:text-left ui:font-normal",!h&&"ui:text-muted-foreground",i),children:[y.jsx(qe.Calendar,{className:"ui:h-4 ui:w-4"}),h?.from?h.to?y.jsxs(y.Fragment,{children:[qc(h.from,"LLL dd, y",{locale:u})," -",qc(h.to,"LLL dd, y",{locale:u})]}):qc(h.from,"LLL dd, y",{locale:u}):y.jsx("span",{children:a})]})}),y.jsxs(ef,{className:"ui:w-auto ui:p-0",align:"start",children:[y.jsx(gA,{mode:"range",defaultMonth:h?.from??new Date,selected:h,onSelect:p,numberOfMonths:2,disabled:c,locale:u}),y.jsx("div",{className:te("ui:px-3 ui:pb-4 ui:pt-2","ui:flex ui:justify-start ui:md:justify-end"),children:y.jsx(Gn,{variant:"success",onClick:g,className:"ui:w-full ui:md:w-max",children:s})})]})]})]})};function lde({value:e,onChange:t,className:n,inputClassName:r,name:i,placeholder:o,label:a,autoFocus:s=!1}){const[c,u]=l.useState(e),d=l.useRef(null),f=l.useRef(t);l.useEffect(()=>{f.current=t},[t]);const h=l.useCallback(g=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{g.length>=3?f.current(g):f.current("")},300)},[]),p=g=>{const m=decodeURIComponent(g);u(m),h(m)};return y.jsxs("search",{className:te("ui:w-full",n),children:[a&&y.jsx(Io,{htmlFor:i,className:"ui:leading-6 ui:w-full ui:mb-2",children:a}),y.jsx(gs,{type:"search",name:i,id:i,"data-test-id":i,placeholder:o,value:c,onChange:({target:g})=>p(g.value),className:te("ui:max-h-10",r),autoFocus:s})]})}const y2t=({banner:e,campaignName:t,isControlled:n,open:r,setOpen:i,imageClassName:o})=>y.jsxs(HA,{...n&&{open:r,onOpenChange:i},children:[!n&&y.jsx(Jee,{asChild:!0,children:y.jsx("div",{className:"ui:cursor-pointer",children:y.jsx("img",{className:te("ui:w-full ui:max-w-80 ui:mx-auto ui:mt-4! ui:scale-100 ui:hover:scale-110 ui:transition-all ui:duration-300 ui:aspect-video",o),src:e,alt:t})})}),y.jsxs(BA,{className:"ui:max-w-2xl",children:[y.jsx(VA,{children:y.jsx(GA,{children:t})}),y.jsx("img",{className:te("ui:w-full ui:aspect-video",o),src:e,alt:t})]})]});function w2t(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const sde=l.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),U2=()=>{const e=l.useContext(sde);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};w2t(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
233
233
  [data-state=closed]
234
- ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function x2t(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function E2t(){return qR(/^Mac/)}function C2t(){return qR(/^iPhone/)}function eq(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function S2t(){return qR(/^iPad/)||E2t()&&navigator.maxTouchPoints>1}function cde(){return C2t()||S2t()}function qR(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const $2t=24,M2t=typeof window<"u"?l.useLayoutEffect:l.useEffect;function tq(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const qx=typeof document<"u"&&window.visualViewport;function nq(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function ude(e){for(nq(e)&&(e=e.parentElement);e&&!nq(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const A2t=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let sm=0,Wx;function N2t(e={}){let{isDisabled:t}=e;M2t(()=>{if(!t)return sm++,sm===1&&cde()&&(Wx=O2t()),()=>{sm--,sm===0&&Wx?.()}},[t])}function O2t(){let e,t=0,n=f=>{e=ude(f.target),!(e===document.documentElement&&e===document.body)&&(t=f.changedTouches[0].pageY)},r=f=>{if(!e||e===document.documentElement||e===document.body){f.preventDefault();return}let h=f.changedTouches[0].pageY,p=e.scrollTop,g=e.scrollHeight-e.clientHeight;g!==0&&((p<=0&&h>t||p>=g&&h<t)&&f.preventDefault(),t=h)},i=f=>{let h=f.target;d$(h)&&h!==document.activeElement&&(f.preventDefault(),h.style.transform="translateY(-2000px)",h.focus(),requestAnimationFrame(()=>{h.style.transform=""}))},o=f=>{let h=f.target;d$(h)&&(h.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{h.style.transform="",qx&&(qx.height<window.innerHeight?requestAnimationFrame(()=>{rq(h)}):qx.addEventListener("resize",()=>rq(h),{once:!0}))}))},a=()=>{window.scrollTo(0,0)},s=window.pageXOffset,c=window.pageYOffset,u=tq(R2t(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let d=tq(Of(document,"touchstart",n,{passive:!1,capture:!0}),Of(document,"touchmove",r,{passive:!1,capture:!0}),Of(document,"touchend",i,{passive:!1,capture:!0}),Of(document,"focus",o,!0),Of(window,"scroll",a));return()=>{u(),d(),window.scrollTo(s,c)}}function R2t(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Of(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function rq(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=ude(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,i=e.getBoundingClientRect().top,o=e.getBoundingClientRect().bottom;const a=n.getBoundingClientRect().bottom+$2t;o>a&&(n.scrollTop+=i-r)}e=n.parentElement}}function d$(e){return e instanceof HTMLInputElement&&!A2t.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function I2t(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function P2t(...e){return t=>e.forEach(n=>I2t(n,t))}function dde(...e){return v.useCallback(P2t(...e),e)}const fde=new WeakMap;function vr(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([i,o])=>{if(i.startsWith("--")){e.style.setProperty(i,o);return}r[i]=e.style[i],e.style[i]=o}),!n&&fde.set(e,r)}function F2t(e,t){if(!e||!(e instanceof HTMLElement))return;let n=fde.get(e);n&&(e.style[t]=n[t])}const tr=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function cm(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let i=r.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(", ")[tr(t)?13:12]):(i=r.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(", ")[tr(t)?5:4]):null)}function T2t(e){return 8*(Math.log(e+1)-2)}function Ux(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function D2t(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const kn={DURATION:.5,EASE:[.32,.72,0,1]},hde=.4,z2t=.25,_2t=100,pde=8,Dc=16,f$=26,Yx="vaul-dragging";function mde(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function k2t({defaultProp:e,onChange:t}){const n=l.useState(e),[r]=n,i=l.useRef(r),o=mde(t);return l.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function gde({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=k2t({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=mde(n),c=l.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&s(f)}else i(u)},[o,e,i,s]);return[a,c]}function L2t({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:i,fadeFromIndex:o,onSnapPointChange:a,direction:s="bottom",container:c,snapToSequentialPoint:u}){const[d,f]=gde({prop:e,defaultProp:n?.[0],onChange:t}),[h,p]=l.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);l.useEffect(()=>{function A(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",A),()=>window.removeEventListener("resize",A)},[]);const g=l.useMemo(()=>d===n?.[n.length-1]||null,[n,d]),m=l.useMemo(()=>{var A;return(A=n?.findIndex(R=>R===d))!=null?A:null},[n,d]),b=n&&n.length>0&&(o||o===0)&&!Number.isNaN(o)&&n[o]===d||!n,w=l.useMemo(()=>{const A=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var R;return(R=n?.map(T=>{const k=typeof T=="string";let N=0;if(k&&(N=parseInt(T,10)),tr(s)){const O=k?N:h?T*A.height:0;return h?s==="bottom"?A.height-O:-A.height+O:O}const P=k?N:h?T*A.width:0;return h?s==="right"?A.width-P:-A.width+P:P}))!=null?R:[]},[n,h,c]),x=l.useMemo(()=>m!==null?w?.[m]:null,[w,m]),E=l.useCallback(A=>{var R;const T=(R=w?.findIndex(k=>k===A))!=null?R:null;a(T),vr(r.current,{transition:`transform ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,transform:tr(s)?`translate3d(0, ${A}px, 0)`:`translate3d(${A}px, 0, 0)`}),w&&T!==w.length-1&&o!==void 0&&T!==o&&T<o?vr(i.current,{transition:`opacity ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,opacity:"0"}):vr(i.current,{transition:`opacity ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,opacity:"1"}),f(n?.[Math.max(T,0)])},[r.current,n,w,o,i,f]);l.useEffect(()=>{if(d||e){var A;const R=(A=n?.findIndex(T=>T===e||T===d))!=null?A:-1;w&&R!==-1&&typeof w[R]=="number"&&E(w[R])}},[d,e,n,w,E]);function S({draggedDistance:A,closeDrawer:R,velocity:T,dismissible:k}){if(o===void 0)return;const N=s==="bottom"||s==="right"?(x??0)-A:(x??0)+A,P=m===o-1,O=m===0,z=A>0;if(P&&vr(i.current,{transition:`opacity ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`}),!u&&T>2&&!z){k?R():E(w[0]);return}if(!u&&T>2&&z&&w&&n){E(w[n.length-1]);return}const L=w?.reduce((_,H)=>typeof _!="number"||typeof H!="number"?_:Math.abs(H-N)<Math.abs(_-N)?H:_),D=tr(s)?window.innerHeight:window.innerWidth;if(T>hde&&Math.abs(A)<D*.4){const _=z?1:-1;if(_>0&&g&&n){E(w[n.length-1]);return}if(O&&_<0&&k&&R(),m===null)return;E(w[m+_]);return}E(L)}function $({draggedDistance:A}){if(x===null)return;const R=s==="bottom"||s==="right"?x-A:x+A;(s==="bottom"||s==="right")&&R<w[w.length-1]||(s==="top"||s==="left")&&R>w[w.length-1]||vr(r.current,{transform:tr(s)?`translate3d(0, ${R}px, 0)`:`translate3d(${R}px, 0, 0)`})}function M(A,R){if(!n||typeof m!="number"||!w||o===void 0)return null;const T=m===o-1;if(m>=o&&R)return 0;if(T&&!R)return 1;if(!b&&!T)return null;const N=T?m+1:m-1,P=T?w[N]-w[N-1]:w[N+1]-w[N],O=A/Math.abs(P);return T?1-O:O}return{isLastSnapPoint:g,activeSnapPoint:d,shouldFade:b,getPercentageDragged:M,setActiveSnapPoint:f,activeSnapPointIndex:m,onRelease:S,onDrag:$,snapPointsOffset:w}}const j2t=()=>()=>{};function H2t(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:i}=U2(),o=l.useRef(null),a=l.useMemo(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-f$)/window.innerWidth}l.useEffect(()=>{if(t&&n){o.current&&clearTimeout(o.current);const c=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!c)return;D2t(r&&!i?Ux(document.body,{background:"black"}):j2t,Ux(c,{transformOrigin:tr(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${kn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${kn.EASE.join(",")})`}));const u=Ux(c,{borderRadius:`${pde}px`,overflow:"hidden",...tr(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u(),o.current=window.setTimeout(()=>{a?document.body.style.background=a:document.body.style.removeProperty("background")},kn.DURATION*1e3)}}},[t,n,a])}let Rf=null;function B2t({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:i,noBodyStyles:o}){const[a,s]=l.useState(()=>typeof window<"u"?window.location.href:""),c=l.useRef(0),u=l.useCallback(()=>{if(eq()&&Rf===null&&e&&!o){Rf={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:f,innerHeight:h}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-f}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const p=h-window.innerHeight;p&&c.current>=h&&(document.body.style.top=`${-(c.current+p)}px`)}),300)}},[e]),d=l.useCallback(()=>{if(eq()&&Rf!==null&&!o){const f=-parseInt(document.body.style.top,10),h=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Rf),window.requestAnimationFrame(()=>{if(i&&a!==window.location.href){s(window.location.href);return}window.scrollTo(h,f)}),Rf=null}},[a]);return l.useEffect(()=>{function f(){c.current=window.scrollY}return f(),window.addEventListener("scroll",f),()=>{window.removeEventListener("scroll",f)}},[]),l.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||d()}},[t,d]),l.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout(()=>{d()},500)):d())},[e,r,a,t,n,u,d]),{restorePositionSetting:d}}function V2t({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:i,snapPoints:o,shouldScaleBackground:a=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=z2t,scrollLockTimeout:u=_2t,dismissible:d=!0,handleOnly:f=!1,fadeFromIndex:h=o&&o.length-1,activeSnapPoint:p,setActiveSnapPoint:g,fixed:m,modal:b=!0,onClose:w,nested:x,noBodyStyles:E=!1,direction:S="bottom",defaultOpen:$=!1,disablePreventScroll:M=!0,snapToSequentialPoint:A=!1,preventScrollRestoration:R=!1,repositionInputs:T=!0,onAnimationEnd:k,container:N,autoFocus:P=!1}){var O,z;const[L=!1,D]=gde({defaultProp:$,prop:e,onChange:fe=>{t?.(fe),!fe&&!x&&ve(),setTimeout(()=>{k?.(fe)},kn.DURATION*1e3),fe&&!b&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),fe||(document.body.style.pointerEvents="auto")}}),[_,H]=l.useState(!1),[W,F]=l.useState(!1),[K,j]=l.useState(!1),U=l.useRef(null),Y=l.useRef(null),G=l.useRef(null),Q=l.useRef(null),X=l.useRef(null),Z=l.useRef(!1),J=l.useRef(null),ee=l.useRef(0),ce=l.useRef(!1),B=l.useRef(!$),ne=l.useRef(0),q=l.useRef(null),se=l.useRef(((O=q.current)==null?void 0:O.getBoundingClientRect().height)||0),he=l.useRef(((z=q.current)==null?void 0:z.getBoundingClientRect().width)||0),pe=l.useRef(0),me=l.useCallback(fe=>{o&&fe===ke.length-1&&(Y.current=new Date)},[]),{activeSnapPoint:de,activeSnapPointIndex:ye,setActiveSnapPoint:Ae,onRelease:De,snapPointsOffset:ke,onDrag:be,shouldFade:ue,getPercentageDragged:ge}=L2t({snapPoints:o,activeSnapPointProp:p,setActiveSnapPointProp:g,drawerRef:q,fadeFromIndex:h,overlayRef:U,onSnapPointChange:me,direction:S,container:N,snapToSequentialPoint:A});N2t({isDisabled:!L||W||!b||K||!_||!T||!M});const{restorePositionSetting:ve}=B2t({isOpen:L,modal:b,nested:x??!1,hasBeenOpened:_,preventScrollRestoration:R,noBodyStyles:E});function Ce(){return(window.innerWidth-f$)/window.innerWidth}function Xe(fe){var Me,Se;!d&&!o||q.current&&!q.current.contains(fe.target)||(se.current=((Me=q.current)==null?void 0:Me.getBoundingClientRect().height)||0,he.current=((Se=q.current)==null?void 0:Se.getBoundingClientRect().width)||0,F(!0),G.current=new Date,cde()&&window.addEventListener("touchend",()=>Z.current=!1,{once:!0}),fe.target.setPointerCapture(fe.pointerId),ee.current=tr(S)?fe.pageY:fe.pageX)}function Ge(fe,Me){var Se;let we=fe;const Ve=(Se=window.getSelection())==null?void 0:Se.toString(),Ne=q.current?cm(q.current,S):null,ze=new Date;if(we.tagName==="SELECT"||we.hasAttribute("data-vaul-no-drag")||we.closest("[data-vaul-no-drag]"))return!1;if(S==="right"||S==="left")return!0;if(Y.current&&ze.getTime()-Y.current.getTime()<500)return!1;if(Ne!==null&&(S==="bottom"?Ne>0:Ne<0))return!0;if(Ve&&Ve.length>0)return!1;if(X.current&&ze.getTime()-X.current.getTime()<u&&Ne===0||Me)return X.current=ze,!1;for(;we;){if(we.scrollHeight>we.clientHeight){if(we.scrollTop!==0)return X.current=new Date,!1;if(we.getAttribute("role")==="dialog")return!0}we=we.parentNode}return!0}function Ze(fe){if(q.current&&W){const Me=S==="bottom"||S==="right"?1:-1,Se=(ee.current-(tr(S)?fe.pageY:fe.pageX))*Me,we=Se>0,Ve=o&&!d&&!we;if(Ve&&ye===0)return;const Ne=Math.abs(Se),ze=document.querySelector("[data-vaul-drawer-wrapper]"),It=S==="bottom"||S==="top"?se.current:he.current;let vt=Ne/It;const At=ge(Ne,we);if(At!==null&&(vt=At),Ve&&vt>=1||!Z.current&&!Ge(fe.target,we))return;if(q.current.classList.add(Yx),Z.current=!0,vr(q.current,{transition:"none"}),vr(U.current,{transition:"none"}),o&&be({draggedDistance:Se}),we&&!o){const mt=T2t(Se),Pt=Math.min(mt*-1,0)*Me;vr(q.current,{transform:tr(S)?`translate3d(0, ${Pt}px, 0)`:`translate3d(${Pt}px, 0, 0)`});return}const Nt=1-vt;if((ue||h&&ye===h-1)&&(r?.(fe,vt),vr(U.current,{opacity:`${Nt}`,transition:"none"},!0)),ze&&U.current&&a){const mt=Math.min(Ce()+vt*(1-Ce()),1),Pt=8-vt*8,dn=Math.max(0,14-vt*14);vr(ze,{borderRadius:`${Pt}px`,transform:tr(S)?`scale(${mt}) translate3d(0, ${dn}px, 0)`:`scale(${mt}) translate3d(${dn}px, 0, 0)`,transition:"none"},!0)}if(!o){const mt=Ne*Me;vr(q.current,{transform:tr(S)?`translate3d(0, ${mt}px, 0)`:`translate3d(${mt}px, 0, 0)`})}}}l.useEffect(()=>{window.requestAnimationFrame(()=>{B.current=!0})},[]),l.useEffect(()=>{var fe;function Me(){if(!q.current||!T)return;const Se=document.activeElement;if(d$(Se)||ce.current){var we;const Ve=((we=window.visualViewport)==null?void 0:we.height)||0,Ne=window.innerHeight;let ze=Ne-Ve;const It=q.current.getBoundingClientRect().height||0,vt=It>Ne*.8;pe.current||(pe.current=It);const At=q.current.getBoundingClientRect().top;if(Math.abs(ne.current-ze)>60&&(ce.current=!ce.current),o&&o.length>0&&ke&&ye){const Nt=ke[ye]||0;ze+=Nt}if(ne.current=ze,It>Ve||ce.current){const Nt=q.current.getBoundingClientRect().height;let mt=Nt;Nt>Ve&&(mt=Ve-(vt?At:f$)),m?q.current.style.height=`${Nt-Math.max(ze,0)}px`:q.current.style.height=`${Math.max(mt,Ve-At)}px`}else x2t()||(q.current.style.height=`${pe.current}px`);o&&o.length>0&&!ce.current?q.current.style.bottom="0px":q.current.style.bottom=`${Math.max(ze,0)}px`}}return(fe=window.visualViewport)==null||fe.addEventListener("resize",Me),()=>{var Se;return(Se=window.visualViewport)==null?void 0:Se.removeEventListener("resize",Me)}},[ye,o,ke]);function We(fe){Ke(),w?.(),fe||D(!1),setTimeout(()=>{o&&Ae(o[0])},kn.DURATION*1e3)}function Be(){if(!q.current)return;const fe=document.querySelector("[data-vaul-drawer-wrapper]"),Me=cm(q.current,S);vr(q.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`}),vr(U.current,{transition:`opacity ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,opacity:"1"}),a&&Me&&Me>0&&L&&vr(fe,{borderRadius:`${pde}px`,overflow:"hidden",...tr(S)?{transform:`scale(${Ce()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Ce()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${kn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${kn.EASE.join(",")})`},!0)}function Ke(){!W||!q.current||(q.current.classList.remove(Yx),Z.current=!1,F(!1),Q.current=new Date)}function ht(fe){if(!W||!q.current)return;q.current.classList.remove(Yx),Z.current=!1,F(!1),Q.current=new Date;const Me=cm(q.current,S);if(!fe||!Ge(fe.target,!1)||!Me||Number.isNaN(Me)||G.current===null)return;const Se=Q.current.getTime()-G.current.getTime(),we=ee.current-(tr(S)?fe.pageY:fe.pageX),Ve=Math.abs(we)/Se;if(Ve>.05&&(j(!0),setTimeout(()=>{j(!1)},200)),o){De({draggedDistance:we*(S==="bottom"||S==="right"?1:-1),closeDrawer:We,velocity:Ve,dismissible:d}),i?.(fe,!0);return}if(S==="bottom"||S==="right"?we>0:we<0){Be(),i?.(fe,!0);return}if(Ve>hde){We(),i?.(fe,!1);return}var Ne;const ze=Math.min((Ne=q.current.getBoundingClientRect().height)!=null?Ne:0,window.innerHeight);var It;const vt=Math.min((It=q.current.getBoundingClientRect().width)!=null?It:0,window.innerWidth),At=S==="left"||S==="right";if(Math.abs(Me)>=(At?vt:ze)*c){We(),i?.(fe,!1);return}i?.(fe,!0),Be()}l.useEffect(()=>(L&&(vr(document.documentElement,{scrollBehavior:"auto"}),Y.current=new Date),()=>{F2t(document.documentElement,"scrollBehavior")}),[L]);function _t(fe){const Me=fe?(window.innerWidth-Dc)/window.innerWidth:1,Se=fe?-Dc:0;J.current&&window.clearTimeout(J.current),vr(q.current,{transition:`transform ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,transform:tr(S)?`scale(${Me}) translate3d(0, ${Se}px, 0)`:`scale(${Me}) translate3d(${Se}px, 0, 0)`}),!fe&&q.current&&(J.current=setTimeout(()=>{const we=cm(q.current,S);vr(q.current,{transition:"none",transform:tr(S)?`translate3d(0, ${we}px, 0)`:`translate3d(${we}px, 0, 0)`})},500))}function Tt(fe,Me){if(Me<0)return;const Se=(window.innerWidth-Dc)/window.innerWidth,we=Se+Me*(1-Se),Ve=-Dc+Me*Dc;vr(q.current,{transform:tr(S)?`scale(${we}) translate3d(0, ${Ve}px, 0)`:`scale(${we}) translate3d(${Ve}px, 0, 0)`,transition:"none"})}function Rt(fe,Me){const Se=tr(S)?window.innerHeight:window.innerWidth,we=Me?(Se-Dc)/Se:1,Ve=Me?-Dc:0;Me&&vr(q.current,{transition:`transform ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,transform:tr(S)?`scale(${we}) translate3d(0, ${Ve}px, 0)`:`scale(${we}) translate3d(${Ve}px, 0, 0)`})}return l.useEffect(()=>{b||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[b]),l.createElement(e2,{defaultOpen:$,onOpenChange:fe=>{!d&&!fe||(fe?H(!0):We(!0),D(fe))},open:L},l.createElement(sde.Provider,{value:{activeSnapPoint:de,snapPoints:o,setActiveSnapPoint:Ae,drawerRef:q,overlayRef:U,onOpenChange:t,onPress:Xe,onRelease:ht,onDrag:Ze,dismissible:d,shouldAnimate:B,handleOnly:f,isOpen:L,isDragging:W,shouldFade:ue,closeDrawer:We,onNestedDrag:Tt,onNestedOpenChange:_t,onNestedRelease:Rt,keyboardIsOpen:ce,modal:b,snapPointsOffset:ke,activeSnapPointIndex:ye,direction:S,shouldScaleBackground:a,setBackgroundColorOnScale:s,noBodyStyles:E,container:N,autoFocus:P}},n))}const vde=l.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:i,shouldFade:o,isOpen:a,modal:s,shouldAnimate:c}=U2(),u=dde(t,n),d=r&&r.length>0;if(!s)return null;const f=l.useCallback(h=>i(h),[i]);return l.createElement(n2,{onMouseUp:f,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":a&&d?"true":"false","data-vaul-snap-points-overlay":a&&o?"true":"false","data-vaul-animate":c?.current?"true":"false",...e})});vde.displayName="Drawer.Overlay";const bde=l.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},i){const{drawerRef:o,onPress:a,onRelease:s,onDrag:c,keyboardIsOpen:u,snapPointsOffset:d,activeSnapPointIndex:f,modal:h,isOpen:p,direction:g,snapPoints:m,container:b,handleOnly:w,shouldAnimate:x,autoFocus:E}=U2(),[S,$]=l.useState(!1),M=dde(i,o),A=l.useRef(null),R=l.useRef(null),T=l.useRef(!1),k=m&&m.length>0;H2t();const N=(O,z,L=0)=>{if(T.current)return!0;const D=Math.abs(O.y),_=Math.abs(O.x),H=_>D,W=["bottom","right"].includes(z)?1:-1;if(z==="left"||z==="right"){if(!(O.x*W<0)&&_>=0&&_<=L)return H}else if(!(O.y*W<0)&&D>=0&&D<=L)return!H;return T.current=!0,!0};l.useEffect(()=>{k&&window.requestAnimationFrame(()=>{$(!0)})},[]);function P(O){A.current=null,T.current=!1,s(O)}return l.createElement(r2,{"data-vaul-drawer-direction":g,"data-vaul-drawer":"","data-vaul-delayed-snap-points":S?"true":"false","data-vaul-snap-points":p&&k?"true":"false","data-vaul-custom-container":b?"true":"false","data-vaul-animate":x?.current?"true":"false",...r,ref:M,style:d&&d.length>0?{"--snap-point-height":`${d[f??0]}px`,...t}:t,onPointerDown:O=>{w||(r.onPointerDown==null||r.onPointerDown.call(r,O),A.current={x:O.pageX,y:O.pageY},a(O))},onOpenAutoFocus:O=>{n?.(O),E||O.preventDefault()},onPointerDownOutside:O=>{if(e?.(O),!h||O.defaultPrevented){O.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:O=>{if(!h){O.preventDefault();return}},onPointerMove:O=>{if(R.current=O,w||(r.onPointerMove==null||r.onPointerMove.call(r,O),!A.current))return;const z=O.pageY-A.current.y,L=O.pageX-A.current.x,D=O.pointerType==="touch"?10:2;N({x:L,y:z},g,D)?c(O):(Math.abs(L)>D||Math.abs(z)>D)&&(A.current=null)},onPointerUp:O=>{r.onPointerUp==null||r.onPointerUp.call(r,O),A.current=null,T.current=!1,s(O)},onPointerOut:O=>{r.onPointerOut==null||r.onPointerOut.call(r,O),P(R.current)},onContextMenu:O=>{r.onContextMenu==null||r.onContextMenu.call(r,O),R.current&&P(R.current)}})});bde.displayName="Drawer.Content";const G2t=250,q2t=120,W2t=l.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:i,isDragging:o,snapPoints:a,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:u,handleOnly:d,isOpen:f,onPress:h,onDrag:p}=U2(),g=l.useRef(null),m=l.useRef(!1);function b(){if(m.current){E();return}window.setTimeout(()=>{w()},q2t)}function w(){if(o||e||m.current){E();return}if(E(),!a||a.length===0){u||i();return}if(s===a[a.length-1]&&u){i();return}const $=a.findIndex(A=>A===s);if($===-1)return;const M=a[$+1];c(M)}function x(){g.current=window.setTimeout(()=>{m.current=!0},G2t)}function E(){g.current&&window.clearTimeout(g.current),m.current=!1}return l.createElement("div",{onClick:b,onPointerCancel:E,onPointerDown:S=>{d&&h(S),x()},onPointerMove:S=>{d&&p(S)},ref:r,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},l.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});W2t.displayName="Drawer.Handle";function U2t(e){const t=U2(),{container:n=t.container,...r}=e;return l.createElement(t2,{container:n,...r})}const Ac={Root:V2t,Content:bde,Overlay:vde,Trigger:hv,Portal:U2t,Close:Cu,Title:pv,Description:mv};function Y2t({...e}){return y.jsx(Ac.Root,{"data-slot":"drawer",...e})}function X2t({...e}){return y.jsx(Ac.Trigger,{"data-slot":"drawer-trigger",...e})}function yde({...e}){return y.jsx(Ac.Portal,{"data-slot":"drawer-portal",...e})}function K2t({...e}){return y.jsx(Ac.Close,{"data-slot":"drawer-close",...e})}function wde({className:e,...t}){return y.jsx(Ac.Overlay,{"data-slot":"drawer-overlay",className:te("ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:fixed ui:inset-0 ui:z-50 ui:bg-black/50",e),...t})}function Z2t({className:e,children:t,...n}){return y.jsxs(yde,{"data-slot":"drawer-portal",children:[y.jsx(wde,{}),y.jsxs(Ac.Content,{"data-slot":"drawer-content",className:te("ui:group/drawer-content ui:bg-background ui:fixed ui:flex ui:h-auto ui:flex-col ui:rounded-t-[10px] ui:z-100 ui:mt-24","ui:data-[vaul-drawer-direction=top]:inset-x-0 ui:data-[vaul-drawer-direction=top]:top-0 ui:data-[vaul-drawer-direction=top]:mb-24 ui:data-[vaul-drawer-direction=top]:max-h-[80vh] ui:data-[vaul-drawer-direction=top]:rounded-b-lg ui:data-[vaul-drawer-direction=top]:border-b","ui:data-[vaul-drawer-direction=bottom]:inset-x-0 ui:data-[vaul-drawer-direction=bottom]:bottom-0 ui:data-[vaul-drawer-direction=bottom]:mt-24 ui:data-[vaul-drawer-direction=bottom]:max-h-[80vh] ui:data-[vaul-drawer-direction=bottom]:rounded-t-lg ui:data-[vaul-drawer-direction=bottom]:border-t","ui:data-[vaul-drawer-direction=right]:inset-y-0 ui:data-[vaul-drawer-direction=right]:right-0 ui:data-[vaul-drawer-direction=right]:w-3/4 ui:data-[vaul-drawer-direction=right]:border-l ui:data-[vaul-drawer-direction=right]:sm:max-w-sm","ui:data-[vaul-drawer-direction=left]:inset-y-0 ui:data-[vaul-drawer-direction=left]:left-0 ui:data-[vaul-drawer-direction=left]:w-3/4 ui:data-[vaul-drawer-direction=left]:border-r ui:data-[vaul-drawer-direction=left]:sm:max-w-sm",e),...n,children:[y.jsx("div",{className:"ui:bg-muted ui:mx-auto ui:mt-4 ui:hidden ui:h-2 ui:w-[100px] ui:shrink-0 ui:rounded-full ui:group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),t]})]})}function J2t({className:e,...t}){return y.jsx("div",{"data-slot":"drawer-header",className:te("ui:flex ui:flex-col ui:gap-0.5 ui:p-4 ui:group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center ui:group-data-[vaul-drawer-direction=top]/drawer-content:text-center ui:md:gap-1.5 ui:md:text-left",e),...t})}function Q2t({className:e,...t}){return y.jsx("div",{"data-slot":"drawer-footer",className:te("ui:mt-auto ui:flex ui:flex-col ui:gap-2 ui:p-4",e),...t})}function ept({className:e,...t}){return y.jsx(Ac.Title,{"data-slot":"drawer-title",className:te("ui:text-foreground ui:font-semibold",e),...t})}function tpt({className:e,...t}){return y.jsx(Ac.Description,{"data-slot":"drawer-description",className:te("ui:text-muted-foreground ui:text-sm",e),...t})}function WR({...e}){return y.jsx(A4e,{"data-slot":"dropdown-menu",...e})}function npt({...e}){return y.jsx(rZ,{"data-slot":"dropdown-menu-portal",...e})}function UR({...e}){return y.jsx(N4e,{"data-slot":"dropdown-menu-trigger",...e})}function YR({className:e,sideOffset:t=4,...n}){return y.jsx(rZ,{children:y.jsx(O4e,{"data-slot":"dropdown-menu-content",sideOffset:t,className:te("ui:bg-popover ui:text-popover-foreground ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2 ui:z-50 ui:max-h-(--radix-dropdown-menu-content-available-height) ui:min-w-[8rem] ui:origin-(--radix-dropdown-menu-content-transform-origin) ui:overflow-x-hidden ui:overflow-y-auto ui:rounded-md ui:border ui:p-1 ui:shadow-md",e),...n})})}function rpt({...e}){return y.jsx(R4e,{"data-slot":"dropdown-menu-group",...e})}function xde({className:e,inset:t,variant:n="default",...r}){return y.jsx(P4e,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:te("ui:focus:bg-accent ui:focus:text-accent-foreground ui:data-[variant=destructive]:text-destructive ui:data-[variant=destructive]:focus:bg-destructive/10 ui:dark:data-[variant=destructive]:focus:bg-destructive/20 ui:data-[variant=destructive]:focus:text-destructive ui:data-[variant=destructive]:*:[svg]:!text-destructive ui:[&_svg:not([class*='text-'])]:text-muted-foreground ui:relative ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:px-2 ui:py-1.5 ui:text-sm ui:outline-hidden ui:select-none ui:data-[disabled]:pointer-events-none ui:data-[disabled]:opacity-50 ui:data-[inset]:pl-8 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),...r})}function h$({className:e,children:t,checked:n,...r}){return y.jsxs(F4e,{"data-slot":"dropdown-menu-checkbox-item",className:te("ui:focus:bg-accent ui:focus:text-accent-foreground ui:relative ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:py-1.5 ui:pr-2 ui:pl-8 ui:text-sm ui:outline-hidden ui:select-none ui:data-[disabled]:pointer-events-none ui:data-[disabled]:opacity-50 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[y.jsx("span",{className:"ui:pointer-events-none ui:absolute ui:left-2 ui:flex size-3.5 ui:items-center ui:justify-center",children:y.jsx(iZ,{children:y.jsx(qe.CheckIcon,{className:"ui:size-4"})})}),t]})}function ipt({...e}){return y.jsx(T4e,{"data-slot":"dropdown-menu-radio-group",...e})}function opt({className:e,children:t,...n}){return y.jsxs(D4e,{"data-slot":"dropdown-menu-radio-item",className:te("ui:focus:bg-accent ui:focus:text-accent-foreground ui:relative ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:py-1.5 ui:pr-2 ui:pl-8 ui:text-sm ui:outline-hidden ui:select-none ui:data-[disabled]:pointer-events-none ui:data-[disabled]:opacity-50 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),...n,children:[y.jsx("span",{className:"ui:pointer-events-none ui:absolute ui:left-2 ui:flex size-3.5 ui:items-center ui:justify-center",children:y.jsx(iZ,{children:y.jsx(qe.CircleIcon,{className:"ui:size-2 ui:fill-current"})})}),t]})}function apt({className:e,inset:t,...n}){return y.jsx(I4e,{"data-slot":"dropdown-menu-label","data-inset":t,className:te("ui:px-2 ui:py-1.5 ui:text-sm ui:font-medium ui:data-[inset]:pl-8",e),...n})}function lpt({className:e,...t}){return y.jsx(z4e,{"data-slot":"dropdown-menu-separator",className:te("ui:bg-border ui:-mx-1 ui:my-1 ui:h-px",e),...t})}function spt({className:e,...t}){return y.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:te("ui:text-muted-foreground ui:ml-auto ui:text-xs ui:tracking-widest",e),...t})}function cpt({...e}){return y.jsx(_4e,{"data-slot":"dropdown-menu-sub",...e})}function upt({className:e,inset:t,children:n,...r}){return y.jsxs(k4e,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:te("ui:focus:bg-accent ui:focus:text-accent-foreground ui:data-[state=open]:bg-accent ui:data-[state=open]:text-accent-foreground ui:[&_svg:not([class*='text-'])]:text-muted-foreground ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:px-2 ui:py-1.5 ui:text-sm ui:outline-hidden ui:select-none ui:data-[inset]:pl-8 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,y.jsx(qe.ChevronRightIcon,{className:"ui:ml-auto ui:size-4"})]})}function dpt({className:e,...t}){return y.jsx(L4e,{"data-slot":"dropdown-menu-sub-content",className:te("ui:bg-popover ui:text-popover-foreground ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2 ui:z-50 ui:min-w-[8rem] ui:origin-(--radix-dropdown-menu-content-transform-origin) ui:overflow-hidden ui:rounded-md ui:border ui:p-1 ui:shadow-lg",e),...t})}function fpt({className:e,...t}){return y.jsx("div",{"data-slot":"empty",className:te("ui:flex ui:min-w-0 ui:flex-1 ui:flex-col ui:items-center ui:justify-center ui:gap-6 ui:rounded-lg ui:border-dashed ui:p-6 ui:text-center ui:text-balance ui:md:p-12",e),...t})}function hpt({className:e,...t}){return y.jsx("div",{"data-slot":"empty-header",className:te("ui:flex ui:max-w-sm ui:flex-col ui:items-center ui:gap-2 ui:text-center",e),...t})}const ppt=fc("ui:flex ui:shrink-0 ui:items-center ui:justify-center ui:mb-2 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0",{variants:{variant:{default:"ui:bg-transparent",icon:"ui:bg-muted ui:text-foreground ui:flex ui:size-10 ui:shrink-0 ui:items-center ui:justify-center ui:rounded-lg ui:[&_svg:not([class*='size-'])]:size-6"}},defaultVariants:{variant:"default"}});function mpt({className:e,variant:t="default",...n}){return y.jsx("div",{"data-slot":"empty-icon","data-variant":t,className:te(ppt({variant:t,className:e})),...n})}function gpt({className:e,...t}){return y.jsx("div",{"data-slot":"empty-title",className:te("ui:text-lg ui:font-medium ui:tracking-tight",e),...t})}function vpt({className:e,...t}){return y.jsx("div",{"data-slot":"empty-description",className:te("ui:text-muted-foreground ui:[&>a:hover]:text-primary ui:text-sm/relaxed ui:[&>a]:underline ui:[&>a]:underline-offset-4",e),...t})}function bpt({className:e,...t}){return y.jsx("div",{"data-slot":"empty-content",className:te("ui:flex ui:w-full ui:max-w-sm ui:min-w-0 ui:flex-col ui:items-center ui:gap-4 ui:text-sm ui:text-balance",e),...t})}function Ede({message:e,className:t}){return y.jsx("p",{className:te("ui:text-red-500 ui:text-xs ui:mt-2 ui:has-error",t),children:e})}const Cde=v.createContext(null),Sde=v.createContext(null),v5=()=>{const e=v.useContext(Cde),t=v.useContext(Sde);if(!e)throw new Error("useFormField must be used within <FormField>");if(!t)throw new Error("useFormField must be used within <FormItem>");const{id:n}=t,{name:r,error:i}=e;return{name:r,error:i,formItemId:`${n}-form-item`,formDescriptionId:`${n}-form-item-description`,formMessageId:`${n}-form-item-message`}},Zr=e=>y.jsx(Dr.Controller,{...e,render:t=>y.jsx(Cde.Provider,{value:{name:e.name,error:t.fieldState.error},children:e.render?.(t)})});function _r({className:e,...t}){const n=v.useId();return y.jsx(Sde.Provider,{value:{id:n},children:y.jsx("div",{"data-slot":"form-item",className:te("ui:grid ui:gap-2",e),...t})})}function yi({className:e,required:t=!1,...n}){const{error:r,formItemId:i}=v5();return y.jsxs(Io,{"data-slot":"form-label","data-error":!!r,htmlFor:i,className:te("ui:text-sm",r?"ui:text-destructive":"ui:text-black-950",e),...n,children:[n.children,t&&y.jsx("span",{className:"ui:text-destructive ml-1",children:"*"})]})}function wi(e){const{error:t,formItemId:n,formDescriptionId:r,formMessageId:i}=v5();return y.jsx(ms,{"data-slot":"form-control",id:n,"aria-invalid":!!t,"aria-describedby":t?`${r} ${i}`:r,...e})}function Ni({className:e,...t}){const{formDescriptionId:n}=v5();return y.jsx("p",{"data-slot":"form-description",id:n,className:te("ui:text-muted-foreground ui:text-sm",e),...t})}function Jr({className:e,showErrorPlaceholder:t,...n}){const{error:r,formMessageId:i}=v5(),o=r?String(r.message??""):n.children;return o?y.jsx("p",{"data-slot":"form-message",id:i,className:te("ui:text-destructive ui:text-sm",e),...n,children:o}):t?y.jsx("p",{className:"ui:h-4"}):null}const Zm=({name:e,control:t,containerClassName:n,...r})=>{const i=Dr.useFormContext(),o=t??i?.control;if(!o)throw new Error("FormCheckbox must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:o,name:e,render:({field:a})=>y.jsxs(_r,{className:n,children:[y.jsx(wi,{children:y.jsx(ite,{...a,checked:!!a.value,onCheckedChange:a.onChange,...r})}),y.jsx(Jr,{})]})})};function XR({delayDuration:e=0,...t}){return y.jsx(l7e,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function KR({...e}){return y.jsx(XR,{children:y.jsx(s7e,{"data-slot":"tooltip",...e})})}function ZR({...e}){return y.jsx(c7e,{"data-slot":"tooltip-trigger",...e})}function b5({className:e,sideOffset:t=0,children:n,...r}){return y.jsx(cQ,{children:y.jsxs(uQ,{"data-slot":"tooltip-content",sideOffset:t,className:te("ui:bg-foreground ui:text-background ui:animate-in ui:fade-in-0 ui:zoom-in-95 ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=closed]:zoom-out-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2 ui:z-50 ui:w-fit ui:origin-(--radix-tooltip-content-transform-origin) ui:rounded-md ui:px-3 ui:py-1.5 ui:text-xs ui:text-balance",e),...r,children:[n,y.jsx(u7e,{className:"ui:bg-foreground ui:fill-foreground ui:z-50 ui:size-2.5 ui:translate-y-[calc(-50%-2px)] ui:rotate-45 ui:rounded-[2px]"})]})})}const $de=v.forwardRef(({children:e,...t},n)=>y.jsx(cQ,{children:y.jsx(b5,{ref:n,...t,children:e})}));$de.displayName=uQ.displayName;const Gu=({trigger:e,content:t,asChild:n=!0,wrapTrigger:r=!0,triggerClassName:i="",contentClassName:o="ui:max-w-sm",disableContent:a=!1,isPortal:s=!1})=>a?e:y.jsxs(KR,{children:[y.jsx(ZR,{asChild:n,children:r?y.jsx("div",{className:te("ui:truncate",i),children:e}):e}),s?y.jsx($de,{className:o,children:t}):y.jsx(b5,{className:o,children:t})]}),ypt=({name:e,label:t,placeholder:n,items:r=[],description:i,multiple:o=!1,emptyMessage:a="No results found",containerClassName:s,hasClearButton:c=!1,hasAllOption:u=!1,allOptionLabel:d="All",disabled:f=!1,tooltipContent:h,control:p,inputMode:g="input"})=>{const m=Dr.useFormContext(),b=p??m?.control;if(!b)throw new Error("FormCombobox must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:b,name:e,render:({field:w})=>y.jsxs(_r,{className:te("ui:flex ui:flex-col",s),children:[t&&y.jsxs(yi,{className:te({"ui:flex ui:items-center ui:gap-2":!!h}),children:[t,h&&y.jsx(Gu,{triggerClassName:"ui:order-last",content:h,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,className:"ui:cursor-pointer ui:text-segmentify-gray-500"})})]}),y.jsx(TN,{items:r,multiple:o,value:w.value,onValueChange:w.onChange,placeholder:n,emptyMessage:a,disabled:f,hasClearButton:c,hasAllOption:u,allOptionLabel:d,inputMode:g}),i&&y.jsx(Ni,{children:i}),y.jsx(Jr,{})]})})};function Mde({...e}){return y.jsx(ebe,{"data-slot":"select",...e})}function wpt({...e}){return y.jsx(lbe,{"data-slot":"select-group",...e})}function Ade({...e}){return y.jsx(nbe,{"data-slot":"select-value",...e})}function Nde({className:e,size:t="default",children:n,...r}){return y.jsxs(tbe,{"data-slot":"select-trigger","data-size":t,className:te("ui:flex ui:h-10 ui:w-full ui:items-center ui:justify-between ui:rounded-md ui:border-solid ui:border ui:border-input ui:bg-background ui:px-3 ui:py-2 ui:text-sm ui:placeholder:text-muted-foreground ui:hover:bg-background ui:focus:outline-none ui:disabled:cursor-not-allowed ui:disabled:opacity-50 ui:[&>span]:line-clamp-1",e),...r,children:[n,y.jsx(rbe,{asChild:!0,children:y.jsx(qe.ChevronDownIcon,{className:"ui:size-4 ui:opacity-50"})})]})}function Ode({className:e,children:t,position:n="item-aligned",isPortal:r=!1,align:i="center",style:o,...a}){const{layer:s}=kne(),c=s!=null?parseInt(getComputedStyle(s).zIndex,10):NaN,u=Number.isFinite(c)?c+1:void 0,d=y.jsxs(obe,{"data-slot":"select-content",className:te("ui:relative ui:z-50 ui:max-h-96 ui:min-w-32 ui:overflow-hidden ui:rounded-md ui:border ui:bg-popover ui:text-popover-foreground ui:shadow-md ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"ui:data-[side=bottom]:translate-y-1 ui:data-[side=left]:-translate-x-1 ui:data-[side=right]:translate-x-1 ui:data-[side=top]:-translate-y-1",e),position:n,align:i,style:u!=null?{zIndex:u,...o}:o,...a,children:[y.jsx(Ide,{}),y.jsx(abe,{className:te("ui:p-1",n==="popper"&&"ui:h-(--radix-select-trigger-height) ui:w-full ui:min-w-(--radix-select-trigger-width) ui:scroll-my-1"),children:t}),y.jsx(Pde,{})]});return r?y.jsx(ibe,{children:d}):d}function xpt({className:e,...t}){return y.jsx(sbe,{"data-slot":"select-label",className:te("ui:text-muted-foreground ui:px-2 ui:py-1.5 ui:text-xs",e),...t})}function Rde({className:e,children:t,...n}){return y.jsxs(cbe,{"data-slot":"select-item",className:te("ui:focus:bg-accent ui:focus:text-accent-foreground ui:[&_svg:not([class*='text-'])]:text-muted-foreground ui:relative ui:flex ui:w-full ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:py-1.5 ui:pr-8 ui:pl-2 ui:text-sm ui:outline-hidden ui:select-none ui:data-disabled:pointer-events-none ui:data-disabled:opacity-50 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4 ui:*:[span]:last:flex ui:*:[span]:last:items-center ui:*:[span]:last:gap-2",e),...n,children:[y.jsx("span",{"data-slot":"select-item-indicator",className:"ui:absolute ui:right-2 ui:flex ui:size-3.5 ui:items-center ui:justify-center",children:y.jsx(dbe,{children:y.jsx(qe.CheckIcon,{className:"ui:size-4"})})}),y.jsx(ube,{children:t})]})}function Ept({className:e,...t}){return y.jsx(pbe,{"data-slot":"select-separator",className:te("ui:bg-border ui:pointer-events-none ui:-mx-1 ui:my-1 ui:h-px",e),...t})}function Ide({className:e,...t}){return y.jsx(fbe,{"data-slot":"select-scroll-up-button",className:te("ui:flex ui:cursor-default ui:items-center ui:justify-center ui:py-1",e),...t,children:y.jsx(qe.ChevronUpIcon,{className:"ui:size-4"})})}function Pde({className:e,...t}){return y.jsx(hbe,{"data-slot":"select-scroll-down-button",className:te("ui:flex ui:cursor-default ui:items-center ui:justify-center ui:py-1",e),...t,children:y.jsx(qe.ChevronDownIcon,{className:"ui:size-4"})})}const Cpt=({hasFormControlWrapper:e=!1,children:t})=>e?y.jsx(wi,{children:t}):t,JR=({options:e,placeholder:t,hasFormControlWrapper:n=!1,selectContentClassName:r,onChange:i,value:o,label:a,triggerClassName:s,labelClassName:c,containerClassName:u,isPortal:d=!1,...f})=>y.jsxs("article",{className:u,children:[a&&y.jsx(Io,{className:te("ui:mb-2 ui:block",c),children:a}),y.jsxs(Mde,{onValueChange:i,value:o,...f,children:[y.jsx(Cpt,{hasFormControlWrapper:n,children:y.jsx(Nde,{className:te("ui:h-10",s),children:y.jsx(Ade,{placeholder:t})})}),y.jsx(Ode,{className:r,isPortal:d,children:e.map(h=>y.jsx(Rde,{value:h.value,children:h.label},h.value))})]})]}),Spt=({name:e,label:t,options:n,placeholder:r,description:i,tooltipContent:o,hasRequiredIndicator:a=!1,containerClassName:s,control:c,...u})=>{const d=Dr.useFormContext(),f=c??d?.control;if(!f)throw new Error("FormSelect must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:f,name:e,render:({field:h})=>y.jsxs(_r,{className:te("ui:w-full",s),children:[y.jsxs(yi,{className:o?"ui:flex ui:items-center ui:gap-2":void 0,children:[t,a&&y.jsx("span",{className:"ui:text-destructive",children:"*"}),o&&y.jsx(Gu,{content:o,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,className:"ui:cursor-pointer ui:text-segmentify-gray-500"})})]}),y.jsx(JR,{...u,options:n,placeholder:r,hasFormControlWrapper:!0,value:h.value??"",onChange:p=>{h.onChange(p),h.onBlur()}}),i&&y.jsx(Ni,{children:i}),y.jsx(Jr,{})]})})},$pt=({name:e,label:t,description:n,containerClassName:r,showErrorPlaceholder:i,step:o=60})=>{const{control:a}=Dr.useFormContext();return y.jsx(Zr,{control:a,name:e,render:({field:s})=>y.jsxs(_r,{className:te("ui:flex ui:flex-col ui:gap-2 ui:w-full ui:space-y-0",r),children:[t&&y.jsx(yi,{children:t}),y.jsx(wi,{children:y.jsx(gs,{type:"time",step:o,className:"ui:bg-background ui:appearance-none [&::-webkit-calendar-picker-indicator]:ui:hidden [&::-webkit-calendar-picker-indicator]:ui:appearance-none",...s})}),n&&y.jsx(Ni,{children:n}),y.jsx(Jr,{showErrorPlaceholder:i})]})})},Mpt=({name:e,control:t,disabledCondition:n=!1,label:r,placeholder:i,description:o,containerClassName:a,triggerClassName:s,showErrorPlaceholder:c})=>{const u=Dr.useFormContext(),d=t??u?.control;if(!d)throw new Error("FormDatePicker must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:d,name:e,render:({field:f})=>y.jsxs(_r,{className:te("ui:flex ui:flex-col",a),children:[y.jsx(Ur,{children:y.jsx(Bn,{condition:!!r,children:y.jsx(yi,{children:r})})}),y.jsxs(W2,{children:[y.jsx(wi,{children:y.jsx(Q1,{asChild:!0,children:y.jsxs(Gn,{variant:"outline",className:te("ui:w-[240px] ui:pl-3 ui:text-left ui:font-normal",!f.value&&"ui:text-muted-foreground",s),children:[f.value?Ds(new Date(f.value),"dd/MM/yyyy"):y.jsx("span",{children:i}),y.jsx(qe.CalendarIcon,{className:"ui:ml-auto ui:h-4 ui:w-4 ui:opacity-50"})]})})}),y.jsx(ef,{className:"ui:w-auto ui:p-0",align:"start",children:y.jsx(gA,{mode:"single",selected:f.value?new Date(f.value):void 0,onSelect:h=>{h&&f.onChange(h)},disabled:n,initialFocus:!0})})]}),y.jsx(Ur,{children:y.jsx(Bn,{condition:!!o,children:y.jsx(Ni,{children:o})})}),y.jsx(Jr,{showErrorPlaceholder:c})]})})},Apt=e=>{if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]},Npt=e=>e.type.startsWith("image/"),Opt=({uploadedFile:e,onRemove:t})=>y.jsx("div",{className:"ui:p-3 ui:bg-muted/50 ui:border ui:border-border ui:rounded-lg",children:y.jsxs("div",{className:"ui:flex ui:items-center ui:justify-between ui:gap-3",children:[y.jsxs("div",{className:"ui:flex ui:items-center ui:gap-3 ui:min-w-0",children:[Npt(e.file)?y.jsx("img",{src:e.url,alt:e.file.name,className:"ui:shrink-0 ui:w-10 ui:h-10 ui:object-cover ui:rounded-md"}):y.jsx("div",{className:"ui:shrink-0 ui:p-2 ui:bg-primary/10 ui:rounded-md",children:y.jsx(qe.FileText,{size:20,className:"ui:text-primary"})}),y.jsxs("div",{className:"ui:min-w-0",children:[y.jsx("p",{className:"ui:text-sm ui:font-medium ui:text-foreground ui:truncate",children:e.file.name}),y.jsx("p",{className:"ui:text-xs ui:text-muted-foreground",children:Apt(e.file.size)})]})]}),y.jsx(ca,{variant:"ghost",size:"sm",isIconOnly:!0,onClick:t,icon:y.jsx(qe.X,{size:16}),className:te("ui:shrink-0 ui:text-muted-foreground","ui:hover:text-destructive ui:hover:bg-destructive/10")})]})}),Fde=({name:e,control:t,label:n,uploadButtonLabel:r="Upload File",uploadingLabel:i="Uploading...",uploadFailedMessage:o="Upload failed",description:a,accept:s="*",disabled:c=!1,multiple:u=!1,containerClassName:d,tooltipContent:f,hasRequiredIndicator:h=!1,onUpload:p})=>{const g=Dr.useFormContext(),m=t??g?.control;if(!m)throw new Error("FormFileUpload must be used within a FormProvider or receive a control prop");const b=l.useRef(null),[w,x]=l.useState(!1),E=async($,M,A)=>{const R=$.target.files;if(R?.length){x(!0);try{if(u){const T=Array.from(R),k=[];for(const P of T){const O=p?await p(P):URL.createObjectURL(P);k.push({file:P,url:O})}const N=Array.isArray(A)?A:[];M([...N,...k])}else{const T=R[0],k=p?await p(T):URL.createObjectURL(T);M({file:T,url:k})}}catch(T){const k=T instanceof Error?T.message:o;hM.toast.error(k)}finally{x(!1),b.current&&(b.current.value="")}}},S=($,M,A)=>{if(u&&Array.isArray(M)&&A){const R=M.filter(T=>T!==A);$(R.length>0?R:null)}else $(null);b.current&&(b.current.value="")};return y.jsx(Zr,{control:m,name:e,render:({field:$})=>{const M=$.value,A=u?Array.isArray(M)?M:[]:M&&"file"in M?[M]:[];return y.jsxs(_r,{className:te("ui:w-full",d),children:[n&&y.jsxs(yi,{className:te({"ui:flex ui:items-center ui:gap-2":!!f}),children:[n,h&&y.jsx("span",{children:"*"}),f&&y.jsx(Gu,{content:f,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,className:"ui:text-muted-foreground ui:cursor-pointer"})})]}),y.jsx(wi,{children:y.jsxs("div",{className:"ui:space-y-3",children:[y.jsxs("div",{className:"ui:relative ui:inline-block",children:[y.jsx("input",{ref:b,type:"file",accept:s,multiple:u,onChange:R=>E(R,$.onChange,M),disabled:c||w,className:te("ui:absolute ui:inset-0 ui:w-full ui:h-full ui:opacity-0 ui:cursor-pointer","ui:disabled:cursor-not-allowed")}),y.jsx(ca,{variant:"outline",label:w?i:r,icon:w?y.jsx(qe.Loader2,{size:16,className:"ui:animate-spin"}):y.jsx(qe.Upload,{size:16}),disabled:c||w})]}),A.length>0&&y.jsx("div",{className:"ui:space-y-2",children:A.map((R,T)=>y.jsx(Opt,{uploadedFile:R,onRemove:()=>S($.onChange,M,R)},`${R.file.name}-${R.file.size}-${T}`))})]})}),y.jsx(Jr,{}),a&&y.jsx(Ni,{children:a})]})}})};Fde.displayName="FormFileUpload";const y5=l.forwardRef(({name:e,label:t,labelVariant:n,type:r="text",value:i,onChange:o,description:a="",placeholder:s,className:c,inputClassName:u,isReadOnly:d=!1,readOnly:f,hasRequiredIndicator:h=!1,...p},g)=>y.jsxs("article",{className:c,children:[t&&y.jsxs(Io,{variant:n,className:"ui:mb-2",children:[t,h&&y.jsx("span",{className:"ui:text-destructive",children:"*"})]}),y.jsx(gs,{ref:g,"data-test-id":e,name:e,placeholder:s,value:i,type:r,onChange:o,readOnly:d||f,className:te({"ui:pointer-events-none ui:opacity-30":d||f},u),...p}),a&&y.jsx(Qv,{description:a})]}));y5.displayName="InputField";const Rpt=({label:e,containerClassName:t,inputClassName:n,name:r,description:i,placeholder:o="",tooltipContent:a,hasRequiredIndicator:s=!1,control:c,type:u="text",...d})=>{const f=Dr.useFormContext(),h=c??f?.control;if(!h)throw new Error("FormInput must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:h,name:r,render:({field:p})=>y.jsxs(_r,{className:te("ui:w-full",t),children:[y.jsxs(yi,{className:a?"ui:flex ui:items-center ui:gap-2":void 0,children:[e,s&&y.jsx("span",{className:"ui:text-destructive",children:"*"}),a&&y.jsx(Gu,{content:a,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,className:"ui:cursor-pointer ui:text-segmentify-gray-500"})})]}),y.jsx(wi,{children:y.jsx(y5,{...p,...d,type:u,placeholder:o,inputClassName:te(n)})}),i&&y.jsx(Ni,{children:i}),y.jsx(Jr,{})]})})},Ipt=({label:e,name:t,containerClassName:n,description:r,placeholder:i,tooltipContent:o,control:a,hasRequiredIndicator:s=!1,...c})=>{const u=Dr.useFormContext(),d=a??u?.control;if(!d)throw new Error("FormPassword must be used within a FormProvider or receive a control prop");const[f,h]=l.useState(!1),p=()=>{h(g=>!g)};return y.jsx(Zr,{control:d,name:t,render:({field:g})=>y.jsxs(_r,{className:te("ui:w-full",n),children:[e&&y.jsxs(yi,{className:te({"ui:flex ui:items-center ui:gap-2":!!o}),children:[e,s&&y.jsx("span",{children:"*"}),o&&y.jsx(Gu,{content:o,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,className:"ui:cursor-pointer ui:text-segmentify-gray-500"})})]}),y.jsx(wi,{children:y.jsxs("div",{className:"ui:relative",children:[y.jsx(y5,{...g,...c,type:f?"text":"password",placeholder:i,hasRequiredIndicator:s,inputClassName:"pr-8"}),y.jsx("button",{type:"button",onClick:p,className:"ui:absolute ui:right-3 ui:top-1/2 ui:-translate-y-1/2 ui:text-muted-foreground ui:hover:text-foreground ui:transition-colors",tabIndex:-1,children:f?y.jsx(qe.EyeOff,{size:16,className:"ui:cursor-pointer"}):y.jsx(qe.Eye,{size:16,className:"ui:cursor-pointer"})})]})}),r&&y.jsx(Ni,{children:r}),y.jsx(Jr,{})]})})};function Tde({className:e,...t}){return y.jsx(v5e,{"data-slot":"radio-group",className:te("ui:grid ui:gap-3",e),...t})}function Dde({className:e,...t}){return y.jsx(b5e,{"data-slot":"radio-group-item",className:te("ui:p-0! ui:aspect-square ui:h-4 ui:w-4 ui:rounded-full ui:border ui:border-solid ui:border-primary ui:text-primary ui:bg-transparent ui:hover:bg-transparent ui:ring-offset-background ui:focus:outline-none ui:focus-visible:ring-2 ui:focus-visible:ring-ring ui:focus-visible:ring-offset-2 ui:disabled:cursor-not-allowed ui:disabled:opacity-50 ui:transition-none",e),...t,children:y.jsx(y5e,{"data-slot":"radio-group-indicator",className:"ui:relative ui:flex ui:items-center ui:justify-center",children:y.jsx(qe.CircleIcon,{className:"ui:fill-primary ui:absolute ui:top-1/2 ui:left-1/2 ui:size-2 ui:-translate-x-1/2 ui:-translate-y-1/2"})})})}const Ppt=({name:e,label:t,items:n,control:r,containerClassName:i,itemClassName:o,itemLabelClassName:a,selectedClassName:s,description:c})=>{const u=Dr.useFormContext(),d=r??u?.control;if(!d)throw new Error("FormRadio must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:d,name:e,render:({field:f})=>y.jsxs(_r,{className:te("ui:space-y-3",i),children:[t&&y.jsx(yi,{children:t}),y.jsx(wi,{children:y.jsx(Tde,{onValueChange:f.onChange,defaultValue:f.value,className:"ui:flex ui:flex-col ui:space-y-1",children:n.map(h=>y.jsxs(_r,{className:te("ui:flex ui:items-center ui:space-y-0",o,f.value===h.value&&s),children:[y.jsx(wi,{children:y.jsx(Dde,{value:h.value})}),y.jsx(yi,{className:te("ui:font-normal",a),children:h.label})]},h.value))})}),y.jsx(Jr,{}),c&&y.jsx(Ni,{children:c})]})})};function zde({className:e,defaultValue:t,value:n,min:r=0,max:i=100,...o}){const a=v.useMemo(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r,i],[n,t,r,i]);return y.jsxs(Rbe,{"data-slot":"slider",defaultValue:t,value:n,min:r,max:i,className:te("ui:relative ui:flex ui:w-full ui:touch-none ui:items-center ui:select-none ui:data-[disabled]:opacity-50 ui:data-[orientation=vertical]:h-full ui:data-[orientation=vertical]:min-h-44 ui:data-[orientation=vertical]:w-auto ui:data-[orientation=vertical]:flex-col",e),...o,children:[y.jsx(Ibe,{"data-slot":"slider-track",className:te("ui:bg-muted ui:relative ui:grow ui:overflow-hidden ui:rounded-full ui:data-[orientation=horizontal]:h-1.5 ui:data-[orientation=horizontal]:w-full ui:data-[orientation=vertical]:h-full ui:data-[orientation=vertical]:w-1.5"),children:y.jsx(Pbe,{"data-slot":"slider-range",className:te("ui:bg-primary ui:absolute ui:data-[orientation=horizontal]:h-full ui:data-[orientation=vertical]:w-full")})}),Array.from({length:a.length},(s,c)=>y.jsx(Fbe,{"data-slot":"slider-thumb",className:"ui:border-primary ui:ring-ring/50 ui:block ui:size-4 ui:shrink-0 ui:rounded-full ui:border ui:bg-white ui:shadow-sm ui:transition-[color,box-shadow] ui:hover:ring-4 ui:focus-visible:ring-4 ui:focus-visible:outline-hidden ui:disabled:pointer-events-none ui:disabled:opacity-50"},c))]})}const Fpt=({name:e,control:t,label:n,description:r,min:i=0,max:o=100,step:a=1,leftLabel:s,rightLabel:c,showLabels:u=!0,complementaryField:d,onValueChange:f,containerClassName:h,labelClassName:p,showErrorPlaceholder:g=!1,tooltipContent:m,...b})=>{const w=Dr.useFormContext(),x=t??w?.control;if(!x)throw new Error("FormSlider must be used within a FormProvider or receive a control prop");const E=l.useRef(!1),S=Dr.useWatch({control:x,name:e});return y.jsx(Zr,{control:x,name:e,render:({field:$})=>{const M=R=>{if(E.current)return;const T=R[0];E.current=!0,$.onChange(String(T)),d&&w?.setValue&&w.setValue(d,String(o-T),{shouldValidate:!0}),f&&f(T),setTimeout(()=>{E.current=!1},0)},A=Number(S)||i+(o-i)/2;return y.jsxs(_r,{className:te("ui:w-full",h),children:[y.jsx(Ur,{children:y.jsx(Bn,{condition:!!n,children:y.jsxs(yi,{className:te(p,{"ui:flex ui:items-center ui:gap-2":!!m}),children:[n,m&&y.jsx(Gu,{content:m,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,color:"#737373",className:"ui:cursor-pointer"})})]})})}),y.jsx(wi,{children:y.jsxs("div",{className:"ui:space-y-2",children:[y.jsx(zde,{value:[A],onValueChange:M,min:i,max:o,step:a,className:"ui:w-full",...b}),u&&y.jsxs("div",{className:"ui:flex ui:justify-between ui:text-sm ui:text-gray-600",children:[s&&y.jsxs("span",{children:[s,": ",A,o===100?"%":""]}),c&&y.jsxs("span",{children:[c,": ",d?o-A:A,o===100?"%":""]})]})]})}),y.jsx(Ur,{children:y.jsx(Bn,{condition:!!r,children:y.jsx(Ni,{className:"ui:text-xs",children:r})})}),y.jsx(Jr,{showErrorPlaceholder:g})]})}})};function Tpt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.useMemo(()=>r=>{t.forEach(i=>i(r))},t)}const w5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function tf(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function QR(e){return"nodeType"in e}function Oi(e){var t,n;return e?tf(e)?e:QR(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function eI(e){const{Document:t}=Oi(e);return e instanceof t}function Y2(e){return tf(e)?!1:e instanceof Oi(e).HTMLElement}function _de(e){return e instanceof Oi(e).SVGElement}function nf(e){return e?tf(e)?e.document:QR(e)?eI(e)?e:Y2(e)||_de(e)?e.ownerDocument:document:document:document}const dl=w5?l.useLayoutEffect:l.useEffect;function tI(e){const t=l.useRef(e);return dl(()=>{t.current=e}),l.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function Dpt(){const e=l.useRef(null),t=l.useCallback((r,i)=>{e.current=setInterval(r,i)},[]),n=l.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Sh(e,t){t===void 0&&(t=[e]);const n=l.useRef(e);return dl(()=>{n.current!==e&&(n.current=e)},t),n}function X2(e,t){const n=l.useRef();return l.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function zg(e){const t=tI(e),n=l.useRef(null),r=l.useCallback(i=>{i!==n.current&&t?.(i,n.current),n.current=i},[]);return[n,r]}function p$(e){const t=l.useRef();return l.useEffect(()=>{t.current=e},[e]),t.current}let Xx={};function K2(e,t){return l.useMemo(()=>{if(t)return t;const n=Xx[e]==null?0:Xx[e]+1;return Xx[e]=n,e+"-"+n},[e,t])}function kde(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((o,a)=>{const s=Object.entries(a);for(const[c,u]of s){const d=o[c];d!=null&&(o[c]=d+e*u)}return o},{...t})}}const Yd=kde(1),$h=kde(-1);function zpt(e){return"clientX"in e&&"clientY"in e}function nI(e){if(!e)return!1;const{KeyboardEvent:t}=Oi(e.target);return t&&e instanceof t}function _pt(e){if(!e)return!1;const{TouchEvent:t}=Oi(e.target);return t&&e instanceof t}function m$(e){if(_pt(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return zpt(e)?{x:e.clientX,y:e.clientY}:null}const Mh=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Mh.Translate.toString(e),Mh.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),iq="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function kpt(e){return e.matches(iq)?e:e.querySelector(iq)}const Lpt={display:"none"};function jpt(e){let{id:t,value:n}=e;return l.createElement("div",{id:t,style:Lpt},n)}function Hpt(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return l.createElement("div",{id:t,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function Bpt(){const[e,t]=l.useState("");return{announce:l.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Lde=l.createContext(null);function Vpt(e){const t=l.useContext(Lde);l.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Gpt(){const[e]=l.useState(()=>new Set),t=l.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[l.useCallback(r=>{let{type:i,event:o}=r;e.forEach(a=>{var s;return(s=a[i])==null?void 0:s.call(a,o)})},[e]),t]}const qpt={draggable:`
234
+ ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function x2t(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function E2t(){return qR(/^Mac/)}function C2t(){return qR(/^iPhone/)}function eq(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function S2t(){return qR(/^iPad/)||E2t()&&navigator.maxTouchPoints>1}function cde(){return C2t()||S2t()}function qR(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const $2t=24,M2t=typeof window<"u"?l.useLayoutEffect:l.useEffect;function tq(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const qx=typeof document<"u"&&window.visualViewport;function nq(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function ude(e){for(nq(e)&&(e=e.parentElement);e&&!nq(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const A2t=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let sm=0,Wx;function N2t(e={}){let{isDisabled:t}=e;M2t(()=>{if(!t)return sm++,sm===1&&cde()&&(Wx=O2t()),()=>{sm--,sm===0&&Wx?.()}},[t])}function O2t(){let e,t=0,n=f=>{e=ude(f.target),!(e===document.documentElement&&e===document.body)&&(t=f.changedTouches[0].pageY)},r=f=>{if(!e||e===document.documentElement||e===document.body){f.preventDefault();return}let h=f.changedTouches[0].pageY,p=e.scrollTop,g=e.scrollHeight-e.clientHeight;g!==0&&((p<=0&&h>t||p>=g&&h<t)&&f.preventDefault(),t=h)},i=f=>{let h=f.target;d$(h)&&h!==document.activeElement&&(f.preventDefault(),h.style.transform="translateY(-2000px)",h.focus(),requestAnimationFrame(()=>{h.style.transform=""}))},o=f=>{let h=f.target;d$(h)&&(h.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{h.style.transform="",qx&&(qx.height<window.innerHeight?requestAnimationFrame(()=>{rq(h)}):qx.addEventListener("resize",()=>rq(h),{once:!0}))}))},a=()=>{window.scrollTo(0,0)},s=window.pageXOffset,c=window.pageYOffset,u=tq(R2t(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let d=tq(Of(document,"touchstart",n,{passive:!1,capture:!0}),Of(document,"touchmove",r,{passive:!1,capture:!0}),Of(document,"touchend",i,{passive:!1,capture:!0}),Of(document,"focus",o,!0),Of(window,"scroll",a));return()=>{u(),d(),window.scrollTo(s,c)}}function R2t(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Of(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function rq(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=ude(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,i=e.getBoundingClientRect().top,o=e.getBoundingClientRect().bottom;const a=n.getBoundingClientRect().bottom+$2t;o>a&&(n.scrollTop+=i-r)}e=n.parentElement}}function d$(e){return e instanceof HTMLInputElement&&!A2t.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function I2t(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function P2t(...e){return t=>e.forEach(n=>I2t(n,t))}function dde(...e){return v.useCallback(P2t(...e),e)}const fde=new WeakMap;function vr(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([i,o])=>{if(i.startsWith("--")){e.style.setProperty(i,o);return}r[i]=e.style[i],e.style[i]=o}),!n&&fde.set(e,r)}function F2t(e,t){if(!e||!(e instanceof HTMLElement))return;let n=fde.get(e);n&&(e.style[t]=n[t])}const tr=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function cm(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let i=r.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(", ")[tr(t)?13:12]):(i=r.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(", ")[tr(t)?5:4]):null)}function T2t(e){return 8*(Math.log(e+1)-2)}function Ux(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function D2t(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const kn={DURATION:.5,EASE:[.32,.72,0,1]},hde=.4,z2t=.25,_2t=100,pde=8,Dc=16,f$=26,Yx="vaul-dragging";function mde(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function k2t({defaultProp:e,onChange:t}){const n=l.useState(e),[r]=n,i=l.useRef(r),o=mde(t);return l.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function gde({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=k2t({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=mde(n),c=l.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&s(f)}else i(u)},[o,e,i,s]);return[a,c]}function L2t({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:i,fadeFromIndex:o,onSnapPointChange:a,direction:s="bottom",container:c,snapToSequentialPoint:u}){const[d,f]=gde({prop:e,defaultProp:n?.[0],onChange:t}),[h,p]=l.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);l.useEffect(()=>{function A(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",A),()=>window.removeEventListener("resize",A)},[]);const g=l.useMemo(()=>d===n?.[n.length-1]||null,[n,d]),m=l.useMemo(()=>{var A;return(A=n?.findIndex(R=>R===d))!=null?A:null},[n,d]),b=n&&n.length>0&&(o||o===0)&&!Number.isNaN(o)&&n[o]===d||!n,w=l.useMemo(()=>{const A=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var R;return(R=n?.map(T=>{const k=typeof T=="string";let N=0;if(k&&(N=parseInt(T,10)),tr(s)){const O=k?N:h?T*A.height:0;return h?s==="bottom"?A.height-O:-A.height+O:O}const P=k?N:h?T*A.width:0;return h?s==="right"?A.width-P:-A.width+P:P}))!=null?R:[]},[n,h,c]),x=l.useMemo(()=>m!==null?w?.[m]:null,[w,m]),E=l.useCallback(A=>{var R;const T=(R=w?.findIndex(k=>k===A))!=null?R:null;a(T),vr(r.current,{transition:`transform ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,transform:tr(s)?`translate3d(0, ${A}px, 0)`:`translate3d(${A}px, 0, 0)`}),w&&T!==w.length-1&&o!==void 0&&T!==o&&T<o?vr(i.current,{transition:`opacity ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,opacity:"0"}):vr(i.current,{transition:`opacity ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,opacity:"1"}),f(n?.[Math.max(T,0)])},[r.current,n,w,o,i,f]);l.useEffect(()=>{if(d||e){var A;const R=(A=n?.findIndex(T=>T===e||T===d))!=null?A:-1;w&&R!==-1&&typeof w[R]=="number"&&E(w[R])}},[d,e,n,w,E]);function S({draggedDistance:A,closeDrawer:R,velocity:T,dismissible:k}){if(o===void 0)return;const N=s==="bottom"||s==="right"?(x??0)-A:(x??0)+A,P=m===o-1,O=m===0,z=A>0;if(P&&vr(i.current,{transition:`opacity ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`}),!u&&T>2&&!z){k?R():E(w[0]);return}if(!u&&T>2&&z&&w&&n){E(w[n.length-1]);return}const L=w?.reduce((_,H)=>typeof _!="number"||typeof H!="number"?_:Math.abs(H-N)<Math.abs(_-N)?H:_),D=tr(s)?window.innerHeight:window.innerWidth;if(T>hde&&Math.abs(A)<D*.4){const _=z?1:-1;if(_>0&&g&&n){E(w[n.length-1]);return}if(O&&_<0&&k&&R(),m===null)return;E(w[m+_]);return}E(L)}function $({draggedDistance:A}){if(x===null)return;const R=s==="bottom"||s==="right"?x-A:x+A;(s==="bottom"||s==="right")&&R<w[w.length-1]||(s==="top"||s==="left")&&R>w[w.length-1]||vr(r.current,{transform:tr(s)?`translate3d(0, ${R}px, 0)`:`translate3d(${R}px, 0, 0)`})}function M(A,R){if(!n||typeof m!="number"||!w||o===void 0)return null;const T=m===o-1;if(m>=o&&R)return 0;if(T&&!R)return 1;if(!b&&!T)return null;const N=T?m+1:m-1,P=T?w[N]-w[N-1]:w[N+1]-w[N],O=A/Math.abs(P);return T?1-O:O}return{isLastSnapPoint:g,activeSnapPoint:d,shouldFade:b,getPercentageDragged:M,setActiveSnapPoint:f,activeSnapPointIndex:m,onRelease:S,onDrag:$,snapPointsOffset:w}}const j2t=()=>()=>{};function H2t(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:i}=U2(),o=l.useRef(null),a=l.useMemo(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-f$)/window.innerWidth}l.useEffect(()=>{if(t&&n){o.current&&clearTimeout(o.current);const c=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!c)return;D2t(r&&!i?Ux(document.body,{background:"black"}):j2t,Ux(c,{transformOrigin:tr(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${kn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${kn.EASE.join(",")})`}));const u=Ux(c,{borderRadius:`${pde}px`,overflow:"hidden",...tr(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u(),o.current=window.setTimeout(()=>{a?document.body.style.background=a:document.body.style.removeProperty("background")},kn.DURATION*1e3)}}},[t,n,a])}let Rf=null;function B2t({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:i,noBodyStyles:o}){const[a,s]=l.useState(()=>typeof window<"u"?window.location.href:""),c=l.useRef(0),u=l.useCallback(()=>{if(eq()&&Rf===null&&e&&!o){Rf={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:f,innerHeight:h}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-f}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const p=h-window.innerHeight;p&&c.current>=h&&(document.body.style.top=`${-(c.current+p)}px`)}),300)}},[e]),d=l.useCallback(()=>{if(eq()&&Rf!==null&&!o){const f=-parseInt(document.body.style.top,10),h=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Rf),window.requestAnimationFrame(()=>{if(i&&a!==window.location.href){s(window.location.href);return}window.scrollTo(h,f)}),Rf=null}},[a]);return l.useEffect(()=>{function f(){c.current=window.scrollY}return f(),window.addEventListener("scroll",f),()=>{window.removeEventListener("scroll",f)}},[]),l.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||d()}},[t,d]),l.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout(()=>{d()},500)):d())},[e,r,a,t,n,u,d]),{restorePositionSetting:d}}function V2t({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:i,snapPoints:o,shouldScaleBackground:a=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=z2t,scrollLockTimeout:u=_2t,dismissible:d=!0,handleOnly:f=!1,fadeFromIndex:h=o&&o.length-1,activeSnapPoint:p,setActiveSnapPoint:g,fixed:m,modal:b=!0,onClose:w,nested:x,noBodyStyles:E=!1,direction:S="bottom",defaultOpen:$=!1,disablePreventScroll:M=!0,snapToSequentialPoint:A=!1,preventScrollRestoration:R=!1,repositionInputs:T=!0,onAnimationEnd:k,container:N,autoFocus:P=!1}){var O,z;const[L=!1,D]=gde({defaultProp:$,prop:e,onChange:fe=>{t?.(fe),!fe&&!x&&ve(),setTimeout(()=>{k?.(fe)},kn.DURATION*1e3),fe&&!b&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),fe||(document.body.style.pointerEvents="auto")}}),[_,H]=l.useState(!1),[W,F]=l.useState(!1),[K,j]=l.useState(!1),U=l.useRef(null),Y=l.useRef(null),G=l.useRef(null),Q=l.useRef(null),X=l.useRef(null),Z=l.useRef(!1),J=l.useRef(null),ee=l.useRef(0),ce=l.useRef(!1),B=l.useRef(!$),ne=l.useRef(0),q=l.useRef(null),se=l.useRef(((O=q.current)==null?void 0:O.getBoundingClientRect().height)||0),he=l.useRef(((z=q.current)==null?void 0:z.getBoundingClientRect().width)||0),pe=l.useRef(0),me=l.useCallback(fe=>{o&&fe===ke.length-1&&(Y.current=new Date)},[]),{activeSnapPoint:de,activeSnapPointIndex:ye,setActiveSnapPoint:Ae,onRelease:De,snapPointsOffset:ke,onDrag:be,shouldFade:ue,getPercentageDragged:ge}=L2t({snapPoints:o,activeSnapPointProp:p,setActiveSnapPointProp:g,drawerRef:q,fadeFromIndex:h,overlayRef:U,onSnapPointChange:me,direction:S,container:N,snapToSequentialPoint:A});N2t({isDisabled:!L||W||!b||K||!_||!T||!M});const{restorePositionSetting:ve}=B2t({isOpen:L,modal:b,nested:x??!1,hasBeenOpened:_,preventScrollRestoration:R,noBodyStyles:E});function Ce(){return(window.innerWidth-f$)/window.innerWidth}function Xe(fe){var Me,Se;!d&&!o||q.current&&!q.current.contains(fe.target)||(se.current=((Me=q.current)==null?void 0:Me.getBoundingClientRect().height)||0,he.current=((Se=q.current)==null?void 0:Se.getBoundingClientRect().width)||0,F(!0),G.current=new Date,cde()&&window.addEventListener("touchend",()=>Z.current=!1,{once:!0}),fe.target.setPointerCapture(fe.pointerId),ee.current=tr(S)?fe.pageY:fe.pageX)}function Ge(fe,Me){var Se;let we=fe;const Ve=(Se=window.getSelection())==null?void 0:Se.toString(),Ne=q.current?cm(q.current,S):null,ze=new Date;if(we.tagName==="SELECT"||we.hasAttribute("data-vaul-no-drag")||we.closest("[data-vaul-no-drag]"))return!1;if(S==="right"||S==="left")return!0;if(Y.current&&ze.getTime()-Y.current.getTime()<500)return!1;if(Ne!==null&&(S==="bottom"?Ne>0:Ne<0))return!0;if(Ve&&Ve.length>0)return!1;if(X.current&&ze.getTime()-X.current.getTime()<u&&Ne===0||Me)return X.current=ze,!1;for(;we;){if(we.scrollHeight>we.clientHeight){if(we.scrollTop!==0)return X.current=new Date,!1;if(we.getAttribute("role")==="dialog")return!0}we=we.parentNode}return!0}function Ze(fe){if(q.current&&W){const Me=S==="bottom"||S==="right"?1:-1,Se=(ee.current-(tr(S)?fe.pageY:fe.pageX))*Me,we=Se>0,Ve=o&&!d&&!we;if(Ve&&ye===0)return;const Ne=Math.abs(Se),ze=document.querySelector("[data-vaul-drawer-wrapper]"),It=S==="bottom"||S==="top"?se.current:he.current;let vt=Ne/It;const At=ge(Ne,we);if(At!==null&&(vt=At),Ve&&vt>=1||!Z.current&&!Ge(fe.target,we))return;if(q.current.classList.add(Yx),Z.current=!0,vr(q.current,{transition:"none"}),vr(U.current,{transition:"none"}),o&&be({draggedDistance:Se}),we&&!o){const mt=T2t(Se),Pt=Math.min(mt*-1,0)*Me;vr(q.current,{transform:tr(S)?`translate3d(0, ${Pt}px, 0)`:`translate3d(${Pt}px, 0, 0)`});return}const Nt=1-vt;if((ue||h&&ye===h-1)&&(r?.(fe,vt),vr(U.current,{opacity:`${Nt}`,transition:"none"},!0)),ze&&U.current&&a){const mt=Math.min(Ce()+vt*(1-Ce()),1),Pt=8-vt*8,dn=Math.max(0,14-vt*14);vr(ze,{borderRadius:`${Pt}px`,transform:tr(S)?`scale(${mt}) translate3d(0, ${dn}px, 0)`:`scale(${mt}) translate3d(${dn}px, 0, 0)`,transition:"none"},!0)}if(!o){const mt=Ne*Me;vr(q.current,{transform:tr(S)?`translate3d(0, ${mt}px, 0)`:`translate3d(${mt}px, 0, 0)`})}}}l.useEffect(()=>{window.requestAnimationFrame(()=>{B.current=!0})},[]),l.useEffect(()=>{var fe;function Me(){if(!q.current||!T)return;const Se=document.activeElement;if(d$(Se)||ce.current){var we;const Ve=((we=window.visualViewport)==null?void 0:we.height)||0,Ne=window.innerHeight;let ze=Ne-Ve;const It=q.current.getBoundingClientRect().height||0,vt=It>Ne*.8;pe.current||(pe.current=It);const At=q.current.getBoundingClientRect().top;if(Math.abs(ne.current-ze)>60&&(ce.current=!ce.current),o&&o.length>0&&ke&&ye){const Nt=ke[ye]||0;ze+=Nt}if(ne.current=ze,It>Ve||ce.current){const Nt=q.current.getBoundingClientRect().height;let mt=Nt;Nt>Ve&&(mt=Ve-(vt?At:f$)),m?q.current.style.height=`${Nt-Math.max(ze,0)}px`:q.current.style.height=`${Math.max(mt,Ve-At)}px`}else x2t()||(q.current.style.height=`${pe.current}px`);o&&o.length>0&&!ce.current?q.current.style.bottom="0px":q.current.style.bottom=`${Math.max(ze,0)}px`}}return(fe=window.visualViewport)==null||fe.addEventListener("resize",Me),()=>{var Se;return(Se=window.visualViewport)==null?void 0:Se.removeEventListener("resize",Me)}},[ye,o,ke]);function We(fe){Ke(),w?.(),fe||D(!1),setTimeout(()=>{o&&Ae(o[0])},kn.DURATION*1e3)}function Be(){if(!q.current)return;const fe=document.querySelector("[data-vaul-drawer-wrapper]"),Me=cm(q.current,S);vr(q.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`}),vr(U.current,{transition:`opacity ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,opacity:"1"}),a&&Me&&Me>0&&L&&vr(fe,{borderRadius:`${pde}px`,overflow:"hidden",...tr(S)?{transform:`scale(${Ce()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Ce()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${kn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${kn.EASE.join(",")})`},!0)}function Ke(){!W||!q.current||(q.current.classList.remove(Yx),Z.current=!1,F(!1),Q.current=new Date)}function ht(fe){if(!W||!q.current)return;q.current.classList.remove(Yx),Z.current=!1,F(!1),Q.current=new Date;const Me=cm(q.current,S);if(!fe||!Ge(fe.target,!1)||!Me||Number.isNaN(Me)||G.current===null)return;const Se=Q.current.getTime()-G.current.getTime(),we=ee.current-(tr(S)?fe.pageY:fe.pageX),Ve=Math.abs(we)/Se;if(Ve>.05&&(j(!0),setTimeout(()=>{j(!1)},200)),o){De({draggedDistance:we*(S==="bottom"||S==="right"?1:-1),closeDrawer:We,velocity:Ve,dismissible:d}),i?.(fe,!0);return}if(S==="bottom"||S==="right"?we>0:we<0){Be(),i?.(fe,!0);return}if(Ve>hde){We(),i?.(fe,!1);return}var Ne;const ze=Math.min((Ne=q.current.getBoundingClientRect().height)!=null?Ne:0,window.innerHeight);var It;const vt=Math.min((It=q.current.getBoundingClientRect().width)!=null?It:0,window.innerWidth),At=S==="left"||S==="right";if(Math.abs(Me)>=(At?vt:ze)*c){We(),i?.(fe,!1);return}i?.(fe,!0),Be()}l.useEffect(()=>(L&&(vr(document.documentElement,{scrollBehavior:"auto"}),Y.current=new Date),()=>{F2t(document.documentElement,"scrollBehavior")}),[L]);function _t(fe){const Me=fe?(window.innerWidth-Dc)/window.innerWidth:1,Se=fe?-Dc:0;J.current&&window.clearTimeout(J.current),vr(q.current,{transition:`transform ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,transform:tr(S)?`scale(${Me}) translate3d(0, ${Se}px, 0)`:`scale(${Me}) translate3d(${Se}px, 0, 0)`}),!fe&&q.current&&(J.current=setTimeout(()=>{const we=cm(q.current,S);vr(q.current,{transition:"none",transform:tr(S)?`translate3d(0, ${we}px, 0)`:`translate3d(${we}px, 0, 0)`})},500))}function Tt(fe,Me){if(Me<0)return;const Se=(window.innerWidth-Dc)/window.innerWidth,we=Se+Me*(1-Se),Ve=-Dc+Me*Dc;vr(q.current,{transform:tr(S)?`scale(${we}) translate3d(0, ${Ve}px, 0)`:`scale(${we}) translate3d(${Ve}px, 0, 0)`,transition:"none"})}function Rt(fe,Me){const Se=tr(S)?window.innerHeight:window.innerWidth,we=Me?(Se-Dc)/Se:1,Ve=Me?-Dc:0;Me&&vr(q.current,{transition:`transform ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,transform:tr(S)?`scale(${we}) translate3d(0, ${Ve}px, 0)`:`scale(${we}) translate3d(${Ve}px, 0, 0)`})}return l.useEffect(()=>{b||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[b]),l.createElement(e2,{defaultOpen:$,onOpenChange:fe=>{!d&&!fe||(fe?H(!0):We(!0),D(fe))},open:L},l.createElement(sde.Provider,{value:{activeSnapPoint:de,snapPoints:o,setActiveSnapPoint:Ae,drawerRef:q,overlayRef:U,onOpenChange:t,onPress:Xe,onRelease:ht,onDrag:Ze,dismissible:d,shouldAnimate:B,handleOnly:f,isOpen:L,isDragging:W,shouldFade:ue,closeDrawer:We,onNestedDrag:Tt,onNestedOpenChange:_t,onNestedRelease:Rt,keyboardIsOpen:ce,modal:b,snapPointsOffset:ke,activeSnapPointIndex:ye,direction:S,shouldScaleBackground:a,setBackgroundColorOnScale:s,noBodyStyles:E,container:N,autoFocus:P}},n))}const vde=l.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:i,shouldFade:o,isOpen:a,modal:s,shouldAnimate:c}=U2(),u=dde(t,n),d=r&&r.length>0;if(!s)return null;const f=l.useCallback(h=>i(h),[i]);return l.createElement(n2,{onMouseUp:f,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":a&&d?"true":"false","data-vaul-snap-points-overlay":a&&o?"true":"false","data-vaul-animate":c?.current?"true":"false",...e})});vde.displayName="Drawer.Overlay";const bde=l.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},i){const{drawerRef:o,onPress:a,onRelease:s,onDrag:c,keyboardIsOpen:u,snapPointsOffset:d,activeSnapPointIndex:f,modal:h,isOpen:p,direction:g,snapPoints:m,container:b,handleOnly:w,shouldAnimate:x,autoFocus:E}=U2(),[S,$]=l.useState(!1),M=dde(i,o),A=l.useRef(null),R=l.useRef(null),T=l.useRef(!1),k=m&&m.length>0;H2t();const N=(O,z,L=0)=>{if(T.current)return!0;const D=Math.abs(O.y),_=Math.abs(O.x),H=_>D,W=["bottom","right"].includes(z)?1:-1;if(z==="left"||z==="right"){if(!(O.x*W<0)&&_>=0&&_<=L)return H}else if(!(O.y*W<0)&&D>=0&&D<=L)return!H;return T.current=!0,!0};l.useEffect(()=>{k&&window.requestAnimationFrame(()=>{$(!0)})},[]);function P(O){A.current=null,T.current=!1,s(O)}return l.createElement(r2,{"data-vaul-drawer-direction":g,"data-vaul-drawer":"","data-vaul-delayed-snap-points":S?"true":"false","data-vaul-snap-points":p&&k?"true":"false","data-vaul-custom-container":b?"true":"false","data-vaul-animate":x?.current?"true":"false",...r,ref:M,style:d&&d.length>0?{"--snap-point-height":`${d[f??0]}px`,...t}:t,onPointerDown:O=>{w||(r.onPointerDown==null||r.onPointerDown.call(r,O),A.current={x:O.pageX,y:O.pageY},a(O))},onOpenAutoFocus:O=>{n?.(O),E||O.preventDefault()},onPointerDownOutside:O=>{if(e?.(O),!h||O.defaultPrevented){O.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:O=>{if(!h){O.preventDefault();return}},onPointerMove:O=>{if(R.current=O,w||(r.onPointerMove==null||r.onPointerMove.call(r,O),!A.current))return;const z=O.pageY-A.current.y,L=O.pageX-A.current.x,D=O.pointerType==="touch"?10:2;N({x:L,y:z},g,D)?c(O):(Math.abs(L)>D||Math.abs(z)>D)&&(A.current=null)},onPointerUp:O=>{r.onPointerUp==null||r.onPointerUp.call(r,O),A.current=null,T.current=!1,s(O)},onPointerOut:O=>{r.onPointerOut==null||r.onPointerOut.call(r,O),P(R.current)},onContextMenu:O=>{r.onContextMenu==null||r.onContextMenu.call(r,O),R.current&&P(R.current)}})});bde.displayName="Drawer.Content";const G2t=250,q2t=120,W2t=l.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:i,isDragging:o,snapPoints:a,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:u,handleOnly:d,isOpen:f,onPress:h,onDrag:p}=U2(),g=l.useRef(null),m=l.useRef(!1);function b(){if(m.current){E();return}window.setTimeout(()=>{w()},q2t)}function w(){if(o||e||m.current){E();return}if(E(),!a||a.length===0){u||i();return}if(s===a[a.length-1]&&u){i();return}const $=a.findIndex(A=>A===s);if($===-1)return;const M=a[$+1];c(M)}function x(){g.current=window.setTimeout(()=>{m.current=!0},G2t)}function E(){g.current&&window.clearTimeout(g.current),m.current=!1}return l.createElement("div",{onClick:b,onPointerCancel:E,onPointerDown:S=>{d&&h(S),x()},onPointerMove:S=>{d&&p(S)},ref:r,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},l.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});W2t.displayName="Drawer.Handle";function U2t(e){const t=U2(),{container:n=t.container,...r}=e;return l.createElement(t2,{container:n,...r})}const Ac={Root:V2t,Content:bde,Overlay:vde,Trigger:hv,Portal:U2t,Close:Cu,Title:pv,Description:mv};function Y2t({...e}){return y.jsx(Ac.Root,{"data-slot":"drawer",...e})}function X2t({...e}){return y.jsx(Ac.Trigger,{"data-slot":"drawer-trigger",...e})}function yde({...e}){return y.jsx(Ac.Portal,{"data-slot":"drawer-portal",...e})}function K2t({...e}){return y.jsx(Ac.Close,{"data-slot":"drawer-close",...e})}function wde({className:e,...t}){return y.jsx(Ac.Overlay,{"data-slot":"drawer-overlay",className:te("ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:fixed ui:inset-0 ui:z-50 ui:bg-black/50",e),...t})}function Z2t({className:e,children:t,...n}){return y.jsxs(yde,{"data-slot":"drawer-portal",children:[y.jsx(wde,{}),y.jsxs(Ac.Content,{"data-slot":"drawer-content",className:te("ui:group/drawer-content ui:bg-background ui:fixed ui:flex ui:h-auto ui:flex-col ui:rounded-t-[10px] ui:z-100 ui:mt-24","ui:data-[vaul-drawer-direction=top]:inset-x-0 ui:data-[vaul-drawer-direction=top]:top-0 ui:data-[vaul-drawer-direction=top]:mb-24 ui:data-[vaul-drawer-direction=top]:max-h-[80vh] ui:data-[vaul-drawer-direction=top]:rounded-b-lg ui:data-[vaul-drawer-direction=top]:border-b","ui:data-[vaul-drawer-direction=bottom]:inset-x-0 ui:data-[vaul-drawer-direction=bottom]:bottom-0 ui:data-[vaul-drawer-direction=bottom]:mt-24 ui:data-[vaul-drawer-direction=bottom]:max-h-[80vh] ui:data-[vaul-drawer-direction=bottom]:rounded-t-lg ui:data-[vaul-drawer-direction=bottom]:border-t","ui:data-[vaul-drawer-direction=right]:inset-y-0 ui:data-[vaul-drawer-direction=right]:right-0 ui:data-[vaul-drawer-direction=right]:w-3/4 ui:data-[vaul-drawer-direction=right]:border-l ui:data-[vaul-drawer-direction=right]:sm:max-w-sm","ui:data-[vaul-drawer-direction=left]:inset-y-0 ui:data-[vaul-drawer-direction=left]:left-0 ui:data-[vaul-drawer-direction=left]:w-3/4 ui:data-[vaul-drawer-direction=left]:border-r ui:data-[vaul-drawer-direction=left]:sm:max-w-sm",e),...n,children:[y.jsx("div",{className:"ui:bg-muted ui:mx-auto ui:mt-4 ui:hidden ui:h-2 ui:w-[100px] ui:shrink-0 ui:rounded-full ui:group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),t]})]})}function J2t({className:e,...t}){return y.jsx("div",{"data-slot":"drawer-header",className:te("ui:flex ui:flex-col ui:gap-0.5 ui:p-4 ui:group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center ui:group-data-[vaul-drawer-direction=top]/drawer-content:text-center ui:md:gap-1.5 ui:md:text-left",e),...t})}function Q2t({className:e,...t}){return y.jsx("div",{"data-slot":"drawer-footer",className:te("ui:mt-auto ui:flex ui:flex-col ui:gap-2 ui:p-4",e),...t})}function ept({className:e,...t}){return y.jsx(Ac.Title,{"data-slot":"drawer-title",className:te("ui:text-foreground ui:font-semibold",e),...t})}function tpt({className:e,...t}){return y.jsx(Ac.Description,{"data-slot":"drawer-description",className:te("ui:text-muted-foreground ui:text-sm",e),...t})}function WR({...e}){return y.jsx(A4e,{"data-slot":"dropdown-menu",...e})}function npt({...e}){return y.jsx(rZ,{"data-slot":"dropdown-menu-portal",...e})}function UR({...e}){return y.jsx(N4e,{"data-slot":"dropdown-menu-trigger",...e})}function YR({className:e,sideOffset:t=4,...n}){return y.jsx(rZ,{children:y.jsx(O4e,{"data-slot":"dropdown-menu-content",sideOffset:t,className:te("ui:bg-popover ui:text-popover-foreground ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2 ui:z-50 ui:max-h-(--radix-dropdown-menu-content-available-height) ui:min-w-[8rem] ui:origin-(--radix-dropdown-menu-content-transform-origin) ui:overflow-x-hidden ui:overflow-y-auto ui:rounded-md ui:border ui:p-1 ui:shadow-md",e),...n})})}function rpt({...e}){return y.jsx(R4e,{"data-slot":"dropdown-menu-group",...e})}function xde({className:e,inset:t,variant:n="default",...r}){return y.jsx(P4e,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:te("ui:focus:bg-accent ui:focus:text-accent-foreground ui:data-[variant=destructive]:text-destructive ui:data-[variant=destructive]:focus:bg-destructive/10 ui:dark:data-[variant=destructive]:focus:bg-destructive/20 ui:data-[variant=destructive]:focus:text-destructive ui:data-[variant=destructive]:*:[svg]:!text-destructive ui:[&_svg:not([class*='text-'])]:text-muted-foreground ui:relative ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:px-2 ui:py-1.5 ui:text-sm ui:outline-hidden ui:select-none ui:data-[disabled]:pointer-events-none ui:data-[disabled]:opacity-50 ui:data-[inset]:pl-8 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),...r})}function h$({className:e,children:t,checked:n,...r}){return y.jsxs(F4e,{"data-slot":"dropdown-menu-checkbox-item",className:te("ui:focus:bg-accent ui:focus:text-accent-foreground ui:relative ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:py-1.5 ui:pr-2 ui:pl-8 ui:text-sm ui:outline-hidden ui:select-none ui:data-[disabled]:pointer-events-none ui:data-[disabled]:opacity-50 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[y.jsx("span",{className:"ui:pointer-events-none ui:absolute ui:left-2 ui:flex size-3.5 ui:items-center ui:justify-center",children:y.jsx(iZ,{children:y.jsx(qe.CheckIcon,{className:"ui:size-4"})})}),t]})}function ipt({...e}){return y.jsx(T4e,{"data-slot":"dropdown-menu-radio-group",...e})}function opt({className:e,children:t,...n}){return y.jsxs(D4e,{"data-slot":"dropdown-menu-radio-item",className:te("ui:focus:bg-accent ui:focus:text-accent-foreground ui:relative ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:py-1.5 ui:pr-2 ui:pl-8 ui:text-sm ui:outline-hidden ui:select-none ui:data-[disabled]:pointer-events-none ui:data-[disabled]:opacity-50 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),...n,children:[y.jsx("span",{className:"ui:pointer-events-none ui:absolute ui:left-2 ui:flex size-3.5 ui:items-center ui:justify-center",children:y.jsx(iZ,{children:y.jsx(qe.CircleIcon,{className:"ui:size-2 ui:fill-current"})})}),t]})}function apt({className:e,inset:t,...n}){return y.jsx(I4e,{"data-slot":"dropdown-menu-label","data-inset":t,className:te("ui:px-2 ui:py-1.5 ui:text-sm ui:font-medium ui:data-[inset]:pl-8",e),...n})}function lpt({className:e,...t}){return y.jsx(z4e,{"data-slot":"dropdown-menu-separator",className:te("ui:bg-border ui:-mx-1 ui:my-1 ui:h-px",e),...t})}function spt({className:e,...t}){return y.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:te("ui:text-muted-foreground ui:ml-auto ui:text-xs ui:tracking-widest",e),...t})}function cpt({...e}){return y.jsx(_4e,{"data-slot":"dropdown-menu-sub",...e})}function upt({className:e,inset:t,children:n,...r}){return y.jsxs(k4e,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:te("ui:focus:bg-accent ui:focus:text-accent-foreground ui:data-[state=open]:bg-accent ui:data-[state=open]:text-accent-foreground ui:[&_svg:not([class*='text-'])]:text-muted-foreground ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:px-2 ui:py-1.5 ui:text-sm ui:outline-hidden ui:select-none ui:data-[inset]:pl-8 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,y.jsx(qe.ChevronRightIcon,{className:"ui:ml-auto ui:size-4"})]})}function dpt({className:e,...t}){return y.jsx(L4e,{"data-slot":"dropdown-menu-sub-content",className:te("ui:bg-popover ui:text-popover-foreground ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2 ui:z-50 ui:min-w-[8rem] ui:origin-(--radix-dropdown-menu-content-transform-origin) ui:overflow-hidden ui:rounded-md ui:border ui:p-1 ui:shadow-lg",e),...t})}function fpt({className:e,...t}){return y.jsx("div",{"data-slot":"empty",className:te("ui:flex ui:min-w-0 ui:flex-1 ui:flex-col ui:items-center ui:justify-center ui:gap-6 ui:rounded-lg ui:border-dashed ui:p-6 ui:text-center ui:text-balance ui:md:p-12",e),...t})}function hpt({className:e,...t}){return y.jsx("div",{"data-slot":"empty-header",className:te("ui:flex ui:max-w-sm ui:flex-col ui:items-center ui:gap-2 ui:text-center",e),...t})}const ppt=fc("ui:flex ui:shrink-0 ui:items-center ui:justify-center ui:mb-2 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0",{variants:{variant:{default:"ui:bg-transparent",icon:"ui:bg-muted ui:text-foreground ui:flex ui:size-10 ui:shrink-0 ui:items-center ui:justify-center ui:rounded-lg ui:[&_svg:not([class*='size-'])]:size-6"}},defaultVariants:{variant:"default"}});function mpt({className:e,variant:t="default",...n}){return y.jsx("div",{"data-slot":"empty-icon","data-variant":t,className:te(ppt({variant:t,className:e})),...n})}function gpt({className:e,...t}){return y.jsx("div",{"data-slot":"empty-title",className:te("ui:text-lg ui:font-medium ui:tracking-tight",e),...t})}function vpt({className:e,...t}){return y.jsx("div",{"data-slot":"empty-description",className:te("ui:text-muted-foreground ui:[&>a:hover]:text-primary ui:text-sm/relaxed ui:[&>a]:underline ui:[&>a]:underline-offset-4",e),...t})}function bpt({className:e,...t}){return y.jsx("div",{"data-slot":"empty-content",className:te("ui:flex ui:w-full ui:max-w-sm ui:min-w-0 ui:flex-col ui:items-center ui:gap-4 ui:text-sm ui:text-balance",e),...t})}function Ede({message:e,className:t}){return y.jsx("p",{className:te("ui:text-red-500 ui:text-xs ui:mt-2 ui:has-error",t),children:e})}const Cde=v.createContext(null),Sde=v.createContext(null),v5=()=>{const e=v.useContext(Cde),t=v.useContext(Sde);if(!e)throw new Error("useFormField must be used within <FormField>");if(!t)throw new Error("useFormField must be used within <FormItem>");const{id:n}=t,{name:r,error:i}=e;return{name:r,error:i,formItemId:`${n}-form-item`,formDescriptionId:`${n}-form-item-description`,formMessageId:`${n}-form-item-message`}},Zr=e=>y.jsx(Dr.Controller,{...e,render:t=>y.jsx(Cde.Provider,{value:{name:e.name,error:t.fieldState.error},children:e.render?.(t)})});function _r({className:e,...t}){const n=v.useId();return y.jsx(Sde.Provider,{value:{id:n},children:y.jsx("div",{"data-slot":"form-item",className:te("ui:grid ui:gap-2",e),...t})})}function yi({className:e,required:t=!1,...n}){const{error:r,formItemId:i}=v5();return y.jsxs(Io,{"data-slot":"form-label","data-error":!!r,htmlFor:i,className:te("ui:text-sm",r?"ui:text-destructive":"ui:text-black-950",e),...n,children:[n.children,t&&y.jsx("span",{className:"ui:text-destructive ml-1",children:"*"})]})}function wi(e){const{error:t,formItemId:n,formDescriptionId:r,formMessageId:i}=v5();return y.jsx(ms,{"data-slot":"form-control",id:n,"aria-invalid":!!t,"aria-describedby":t?`${r} ${i}`:r,...e})}function Ni({className:e,...t}){const{formDescriptionId:n}=v5();return y.jsx("p",{"data-slot":"form-description",id:n,className:te("ui:text-muted-foreground ui:text-sm",e),...t})}function Jr({className:e,showErrorPlaceholder:t,...n}){const{error:r,formMessageId:i}=v5(),o=r?String(r.message??""):n.children;return o?y.jsx("p",{"data-slot":"form-message",id:i,className:te("ui:text-destructive ui:text-sm",e),...n,children:o}):t?y.jsx("p",{className:"ui:h-4"}):null}const Zm=({name:e,control:t,containerClassName:n,...r})=>{const i=Dr.useFormContext(),o=t??i?.control;if(!o)throw new Error("FormCheckbox must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:o,name:e,render:({field:a})=>y.jsxs(_r,{className:n,children:[y.jsx(wi,{children:y.jsx(ite,{...a,checked:!!a.value,onCheckedChange:a.onChange,...r})}),y.jsx(Jr,{})]})})};function XR({delayDuration:e=0,...t}){return y.jsx(l7e,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function KR({...e}){return y.jsx(XR,{children:y.jsx(s7e,{"data-slot":"tooltip",...e})})}function ZR({...e}){return y.jsx(c7e,{"data-slot":"tooltip-trigger",...e})}function b5({className:e,sideOffset:t=0,children:n,...r}){return y.jsx(cQ,{children:y.jsxs(uQ,{"data-slot":"tooltip-content",sideOffset:t,className:te("ui:bg-foreground ui:text-background ui:animate-in ui:fade-in-0 ui:zoom-in-95 ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=closed]:zoom-out-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2 ui:z-50 ui:w-fit ui:origin-(--radix-tooltip-content-transform-origin) ui:rounded-md ui:px-3 ui:py-1.5 ui:text-xs ui:text-balance",e),...r,children:[n,y.jsx(u7e,{className:"ui:bg-foreground ui:fill-foreground ui:z-50 ui:size-2.5 ui:translate-y-[calc(-50%-2px)] ui:rotate-45 ui:rounded-[2px]"})]})})}const $de=v.forwardRef(({children:e,...t},n)=>y.jsx(cQ,{children:y.jsx(b5,{ref:n,...t,children:e})}));$de.displayName=uQ.displayName;const Gu=({trigger:e,content:t,asChild:n=!0,wrapTrigger:r=!0,triggerClassName:i="",contentClassName:o="ui:max-w-sm",disableContent:a=!1,isPortal:s=!1})=>a?e:y.jsxs(KR,{children:[y.jsx(ZR,{asChild:n,children:r?y.jsx("div",{className:te("ui:truncate",i),children:e}):e}),s?y.jsx($de,{className:o,children:t}):y.jsx(b5,{className:o,children:t})]}),ypt=({name:e,label:t,placeholder:n,items:r=[],description:i,multiple:o=!1,emptyMessage:a="No results found",containerClassName:s,hasClearButton:c=!1,hasAllOption:u=!1,allOptionLabel:d="All",disabled:f=!1,tooltipContent:h,control:p,inputMode:g="input"})=>{const m=Dr.useFormContext(),b=p??m?.control;if(!b)throw new Error("FormCombobox must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:b,name:e,render:({field:w})=>y.jsxs(_r,{className:te("ui:flex ui:flex-col",s),children:[t&&y.jsxs(yi,{className:te({"ui:flex ui:items-center ui:gap-2":!!h}),children:[t,h&&y.jsx(Gu,{triggerClassName:"ui:order-last",content:h,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,className:"ui:cursor-pointer ui:text-segmentify-gray-500"})})]}),y.jsx(TN,{items:r,multiple:o,value:w.value,onValueChange:w.onChange,placeholder:n,emptyMessage:a,disabled:f,hasClearButton:c,hasAllOption:u,allOptionLabel:d,inputMode:g}),i&&y.jsx(Ni,{children:i}),y.jsx(Jr,{})]})})};function Mde({...e}){return y.jsx(ebe,{"data-slot":"select",...e})}function wpt({...e}){return y.jsx(lbe,{"data-slot":"select-group",...e})}function Ade({...e}){return y.jsx(nbe,{"data-slot":"select-value",...e})}function Nde({className:e,size:t="default",children:n,...r}){return y.jsxs(tbe,{"data-slot":"select-trigger","data-size":t,className:te("ui:flex ui:h-10 ui:w-full ui:items-center ui:justify-between ui:rounded-md ui:border-solid ui:border ui:border-input ui:bg-background ui:px-3 ui:py-2 ui:text-sm ui:placeholder:text-muted-foreground ui:hover:bg-background ui:focus:outline-none ui:disabled:cursor-not-allowed ui:disabled:opacity-50 ui:[&>span]:line-clamp-1",e),...r,children:[n,y.jsx(rbe,{asChild:!0,children:y.jsx(qe.ChevronDownIcon,{className:"ui:size-4 ui:opacity-50"})})]})}function Ode({className:e,children:t,position:n,isPortal:r=!1,align:i="center",alignItemWithTrigger:o=!1,side:a="bottom",sideOffset:s=4,style:c,...u}){const d=n??(o?"item-aligned":"popper"),{layer:f}=kne(),h=f!=null?parseInt(getComputedStyle(f).zIndex,10):NaN,p=Number.isFinite(h)?h+1:void 0,g=y.jsxs(obe,{"data-slot":"select-content",className:te("ui:relative ui:z-50 ui:max-h-96 ui:min-w-32 ui:overflow-hidden ui:rounded-md ui:border ui:bg-popover ui:text-popover-foreground ui:shadow-md ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2",d==="popper"&&"ui:data-[side=bottom]:translate-y-1 ui:data-[side=left]:-translate-x-1 ui:data-[side=right]:translate-x-1 ui:data-[side=top]:-translate-y-1",e),position:d,align:i,side:d==="popper"?a:void 0,sideOffset:d==="popper"?s:void 0,style:p!=null?{zIndex:p,...c}:c,...u,children:[y.jsx(Ide,{}),y.jsx(abe,{className:te("ui:p-1",d==="popper"&&"ui:h-(--radix-select-trigger-height) ui:w-full ui:min-w-(--radix-select-trigger-width) ui:scroll-my-1"),children:t}),y.jsx(Pde,{})]});return r?y.jsx(ibe,{children:g}):g}function xpt({className:e,...t}){return y.jsx(sbe,{"data-slot":"select-label",className:te("ui:text-muted-foreground ui:px-2 ui:py-1.5 ui:text-xs",e),...t})}function Rde({className:e,children:t,...n}){return y.jsxs(cbe,{"data-slot":"select-item",className:te("ui:focus:bg-accent ui:focus:text-accent-foreground ui:[&_svg:not([class*='text-'])]:text-muted-foreground ui:relative ui:flex ui:w-full ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:py-1.5 ui:pr-8 ui:pl-2 ui:text-sm ui:outline-hidden ui:select-none ui:data-disabled:pointer-events-none ui:data-disabled:opacity-50 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4 ui:*:[span]:last:flex ui:*:[span]:last:items-center ui:*:[span]:last:gap-2",e),...n,children:[y.jsx("span",{"data-slot":"select-item-indicator",className:"ui:absolute ui:right-2 ui:flex ui:size-3.5 ui:items-center ui:justify-center",children:y.jsx(dbe,{children:y.jsx(qe.CheckIcon,{className:"ui:size-4"})})}),y.jsx(ube,{children:t})]})}function Ept({className:e,...t}){return y.jsx(pbe,{"data-slot":"select-separator",className:te("ui:bg-border ui:pointer-events-none ui:-mx-1 ui:my-1 ui:h-px",e),...t})}function Ide({className:e,...t}){return y.jsx(fbe,{"data-slot":"select-scroll-up-button",className:te("ui:flex ui:cursor-default ui:items-center ui:justify-center ui:py-1",e),...t,children:y.jsx(qe.ChevronUpIcon,{className:"ui:size-4"})})}function Pde({className:e,...t}){return y.jsx(hbe,{"data-slot":"select-scroll-down-button",className:te("ui:flex ui:cursor-default ui:items-center ui:justify-center ui:py-1",e),...t,children:y.jsx(qe.ChevronDownIcon,{className:"ui:size-4"})})}const Cpt=({hasFormControlWrapper:e=!1,children:t})=>e?y.jsx(wi,{children:t}):t,JR=({options:e,placeholder:t,hasFormControlWrapper:n=!1,selectContentClassName:r,onChange:i,value:o,label:a,triggerClassName:s,labelClassName:c,containerClassName:u,isPortal:d=!1,...f})=>y.jsxs("article",{className:u,children:[a&&y.jsx(Io,{className:te("ui:mb-2 ui:block",c),children:a}),y.jsxs(Mde,{onValueChange:i,value:o,...f,children:[y.jsx(Cpt,{hasFormControlWrapper:n,children:y.jsx(Nde,{className:te("ui:h-10",s),children:y.jsx(Ade,{placeholder:t})})}),y.jsx(Ode,{className:r,isPortal:d,children:e.map(h=>y.jsx(Rde,{value:h.value,children:h.label},h.value))})]})]}),Spt=({name:e,label:t,options:n,placeholder:r,description:i,tooltipContent:o,hasRequiredIndicator:a=!1,containerClassName:s,control:c,...u})=>{const d=Dr.useFormContext(),f=c??d?.control;if(!f)throw new Error("FormSelect must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:f,name:e,render:({field:h})=>y.jsxs(_r,{className:te("ui:w-full",s),children:[y.jsxs(yi,{className:o?"ui:flex ui:items-center ui:gap-2":void 0,children:[t,a&&y.jsx("span",{className:"ui:text-destructive",children:"*"}),o&&y.jsx(Gu,{content:o,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,className:"ui:cursor-pointer ui:text-segmentify-gray-500"})})]}),y.jsx(JR,{...u,options:n,placeholder:r,hasFormControlWrapper:!0,value:h.value??"",onChange:p=>{h.onChange(p),h.onBlur()}}),i&&y.jsx(Ni,{children:i}),y.jsx(Jr,{})]})})},$pt=({name:e,label:t,description:n,containerClassName:r,showErrorPlaceholder:i,step:o=60})=>{const{control:a}=Dr.useFormContext();return y.jsx(Zr,{control:a,name:e,render:({field:s})=>y.jsxs(_r,{className:te("ui:flex ui:flex-col ui:gap-2 ui:w-full ui:space-y-0",r),children:[t&&y.jsx(yi,{children:t}),y.jsx(wi,{children:y.jsx(gs,{type:"time",step:o,className:"ui:bg-background ui:appearance-none [&::-webkit-calendar-picker-indicator]:ui:hidden [&::-webkit-calendar-picker-indicator]:ui:appearance-none",...s})}),n&&y.jsx(Ni,{children:n}),y.jsx(Jr,{showErrorPlaceholder:i})]})})},Mpt=({name:e,control:t,disabledCondition:n=!1,label:r,placeholder:i,description:o,containerClassName:a,triggerClassName:s,showErrorPlaceholder:c})=>{const u=Dr.useFormContext(),d=t??u?.control;if(!d)throw new Error("FormDatePicker must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:d,name:e,render:({field:f})=>y.jsxs(_r,{className:te("ui:flex ui:flex-col",a),children:[y.jsx(Ur,{children:y.jsx(Bn,{condition:!!r,children:y.jsx(yi,{children:r})})}),y.jsxs(W2,{children:[y.jsx(wi,{children:y.jsx(Q1,{asChild:!0,children:y.jsxs(Gn,{variant:"outline",className:te("ui:w-[240px] ui:pl-3 ui:text-left ui:font-normal",!f.value&&"ui:text-muted-foreground",s),children:[f.value?Ds(new Date(f.value),"dd/MM/yyyy"):y.jsx("span",{children:i}),y.jsx(qe.CalendarIcon,{className:"ui:ml-auto ui:h-4 ui:w-4 ui:opacity-50"})]})})}),y.jsx(ef,{className:"ui:w-auto ui:p-0",align:"start",children:y.jsx(gA,{mode:"single",selected:f.value?new Date(f.value):void 0,onSelect:h=>{h&&f.onChange(h)},disabled:n,initialFocus:!0})})]}),y.jsx(Ur,{children:y.jsx(Bn,{condition:!!o,children:y.jsx(Ni,{children:o})})}),y.jsx(Jr,{showErrorPlaceholder:c})]})})},Apt=e=>{if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]},Npt=e=>e.type.startsWith("image/"),Opt=({uploadedFile:e,onRemove:t})=>y.jsx("div",{className:"ui:p-3 ui:bg-muted/50 ui:border ui:border-border ui:rounded-lg",children:y.jsxs("div",{className:"ui:flex ui:items-center ui:justify-between ui:gap-3",children:[y.jsxs("div",{className:"ui:flex ui:items-center ui:gap-3 ui:min-w-0",children:[Npt(e.file)?y.jsx("img",{src:e.url,alt:e.file.name,className:"ui:shrink-0 ui:w-10 ui:h-10 ui:object-cover ui:rounded-md"}):y.jsx("div",{className:"ui:shrink-0 ui:p-2 ui:bg-primary/10 ui:rounded-md",children:y.jsx(qe.FileText,{size:20,className:"ui:text-primary"})}),y.jsxs("div",{className:"ui:min-w-0",children:[y.jsx("p",{className:"ui:text-sm ui:font-medium ui:text-foreground ui:truncate",children:e.file.name}),y.jsx("p",{className:"ui:text-xs ui:text-muted-foreground",children:Apt(e.file.size)})]})]}),y.jsx(ca,{variant:"ghost",size:"sm",isIconOnly:!0,onClick:t,icon:y.jsx(qe.X,{size:16}),className:te("ui:shrink-0 ui:text-muted-foreground","ui:hover:text-destructive ui:hover:bg-destructive/10")})]})}),Fde=({name:e,control:t,label:n,uploadButtonLabel:r="Upload File",uploadingLabel:i="Uploading...",uploadFailedMessage:o="Upload failed",description:a,accept:s="*",disabled:c=!1,multiple:u=!1,containerClassName:d,tooltipContent:f,hasRequiredIndicator:h=!1,onUpload:p})=>{const g=Dr.useFormContext(),m=t??g?.control;if(!m)throw new Error("FormFileUpload must be used within a FormProvider or receive a control prop");const b=l.useRef(null),[w,x]=l.useState(!1),E=async($,M,A)=>{const R=$.target.files;if(R?.length){x(!0);try{if(u){const T=Array.from(R),k=[];for(const P of T){const O=p?await p(P):URL.createObjectURL(P);k.push({file:P,url:O})}const N=Array.isArray(A)?A:[];M([...N,...k])}else{const T=R[0],k=p?await p(T):URL.createObjectURL(T);M({file:T,url:k})}}catch(T){const k=T instanceof Error?T.message:o;hM.toast.error(k)}finally{x(!1),b.current&&(b.current.value="")}}},S=($,M,A)=>{if(u&&Array.isArray(M)&&A){const R=M.filter(T=>T!==A);$(R.length>0?R:null)}else $(null);b.current&&(b.current.value="")};return y.jsx(Zr,{control:m,name:e,render:({field:$})=>{const M=$.value,A=u?Array.isArray(M)?M:[]:M&&"file"in M?[M]:[];return y.jsxs(_r,{className:te("ui:w-full",d),children:[n&&y.jsxs(yi,{className:te({"ui:flex ui:items-center ui:gap-2":!!f}),children:[n,h&&y.jsx("span",{children:"*"}),f&&y.jsx(Gu,{content:f,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,className:"ui:text-muted-foreground ui:cursor-pointer"})})]}),y.jsx(wi,{children:y.jsxs("div",{className:"ui:space-y-3",children:[y.jsxs("div",{className:"ui:relative ui:inline-block",children:[y.jsx("input",{ref:b,type:"file",accept:s,multiple:u,onChange:R=>E(R,$.onChange,M),disabled:c||w,className:te("ui:absolute ui:inset-0 ui:w-full ui:h-full ui:opacity-0 ui:cursor-pointer","ui:disabled:cursor-not-allowed")}),y.jsx(ca,{variant:"outline",label:w?i:r,icon:w?y.jsx(qe.Loader2,{size:16,className:"ui:animate-spin"}):y.jsx(qe.Upload,{size:16}),disabled:c||w})]}),A.length>0&&y.jsx("div",{className:"ui:space-y-2",children:A.map((R,T)=>y.jsx(Opt,{uploadedFile:R,onRemove:()=>S($.onChange,M,R)},`${R.file.name}-${R.file.size}-${T}`))})]})}),y.jsx(Jr,{}),a&&y.jsx(Ni,{children:a})]})}})};Fde.displayName="FormFileUpload";const y5=l.forwardRef(({name:e,label:t,labelVariant:n,type:r="text",value:i,onChange:o,description:a="",placeholder:s,className:c,inputClassName:u,isReadOnly:d=!1,readOnly:f,hasRequiredIndicator:h=!1,...p},g)=>y.jsxs("article",{className:c,children:[t&&y.jsxs(Io,{variant:n,className:"ui:mb-2",children:[t,h&&y.jsx("span",{className:"ui:text-destructive",children:"*"})]}),y.jsx(gs,{ref:g,"data-test-id":e,name:e,placeholder:s,value:i,type:r,onChange:o,readOnly:d||f,className:te({"ui:pointer-events-none ui:opacity-30":d||f},u),...p}),a&&y.jsx(Qv,{description:a})]}));y5.displayName="InputField";const Rpt=({label:e,containerClassName:t,inputClassName:n,name:r,description:i,placeholder:o="",tooltipContent:a,hasRequiredIndicator:s=!1,control:c,type:u="text",...d})=>{const f=Dr.useFormContext(),h=c??f?.control;if(!h)throw new Error("FormInput must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:h,name:r,render:({field:p})=>y.jsxs(_r,{className:te("ui:w-full",t),children:[y.jsxs(yi,{className:a?"ui:flex ui:items-center ui:gap-2":void 0,children:[e,s&&y.jsx("span",{className:"ui:text-destructive",children:"*"}),a&&y.jsx(Gu,{content:a,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,className:"ui:cursor-pointer ui:text-segmentify-gray-500"})})]}),y.jsx(wi,{children:y.jsx(y5,{...p,...d,type:u,placeholder:o,inputClassName:te(n)})}),i&&y.jsx(Ni,{children:i}),y.jsx(Jr,{})]})})},Ipt=({label:e,name:t,containerClassName:n,description:r,placeholder:i,tooltipContent:o,control:a,hasRequiredIndicator:s=!1,...c})=>{const u=Dr.useFormContext(),d=a??u?.control;if(!d)throw new Error("FormPassword must be used within a FormProvider or receive a control prop");const[f,h]=l.useState(!1),p=()=>{h(g=>!g)};return y.jsx(Zr,{control:d,name:t,render:({field:g})=>y.jsxs(_r,{className:te("ui:w-full",n),children:[e&&y.jsxs(yi,{className:te({"ui:flex ui:items-center ui:gap-2":!!o}),children:[e,s&&y.jsx("span",{children:"*"}),o&&y.jsx(Gu,{content:o,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,className:"ui:cursor-pointer ui:text-segmentify-gray-500"})})]}),y.jsx(wi,{children:y.jsxs("div",{className:"ui:relative",children:[y.jsx(y5,{...g,...c,type:f?"text":"password",placeholder:i,hasRequiredIndicator:s,inputClassName:"pr-8"}),y.jsx("button",{type:"button",onClick:p,className:"ui:absolute ui:right-3 ui:top-1/2 ui:-translate-y-1/2 ui:text-muted-foreground ui:hover:text-foreground ui:transition-colors",tabIndex:-1,children:f?y.jsx(qe.EyeOff,{size:16,className:"ui:cursor-pointer"}):y.jsx(qe.Eye,{size:16,className:"ui:cursor-pointer"})})]})}),r&&y.jsx(Ni,{children:r}),y.jsx(Jr,{})]})})};function Tde({className:e,...t}){return y.jsx(v5e,{"data-slot":"radio-group",className:te("ui:grid ui:gap-3",e),...t})}function Dde({className:e,...t}){return y.jsx(b5e,{"data-slot":"radio-group-item",className:te("ui:p-0! ui:aspect-square ui:h-4 ui:w-4 ui:rounded-full ui:border ui:border-solid ui:border-primary ui:text-primary ui:bg-transparent ui:hover:bg-transparent ui:ring-offset-background ui:focus:outline-none ui:focus-visible:ring-2 ui:focus-visible:ring-ring ui:focus-visible:ring-offset-2 ui:disabled:cursor-not-allowed ui:disabled:opacity-50 ui:transition-none",e),...t,children:y.jsx(y5e,{"data-slot":"radio-group-indicator",className:"ui:relative ui:flex ui:items-center ui:justify-center",children:y.jsx(qe.CircleIcon,{className:"ui:fill-primary ui:absolute ui:top-1/2 ui:left-1/2 ui:size-2 ui:-translate-x-1/2 ui:-translate-y-1/2"})})})}const Ppt=({name:e,label:t,items:n,control:r,containerClassName:i,itemClassName:o,itemLabelClassName:a,selectedClassName:s,description:c})=>{const u=Dr.useFormContext(),d=r??u?.control;if(!d)throw new Error("FormRadio must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:d,name:e,render:({field:f})=>y.jsxs(_r,{className:te("ui:space-y-3",i),children:[t&&y.jsx(yi,{children:t}),y.jsx(wi,{children:y.jsx(Tde,{onValueChange:f.onChange,defaultValue:f.value,className:"ui:flex ui:flex-col ui:space-y-1",children:n.map(h=>y.jsxs(_r,{className:te("ui:flex ui:items-center ui:space-y-0",o,f.value===h.value&&s),children:[y.jsx(wi,{children:y.jsx(Dde,{value:h.value})}),y.jsx(yi,{className:te("ui:font-normal",a),children:h.label})]},h.value))})}),y.jsx(Jr,{}),c&&y.jsx(Ni,{children:c})]})})};function zde({className:e,defaultValue:t,value:n,min:r=0,max:i=100,...o}){const a=v.useMemo(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r,i],[n,t,r,i]);return y.jsxs(Rbe,{"data-slot":"slider",defaultValue:t,value:n,min:r,max:i,className:te("ui:relative ui:flex ui:w-full ui:touch-none ui:items-center ui:select-none ui:data-[disabled]:opacity-50 ui:data-[orientation=vertical]:h-full ui:data-[orientation=vertical]:min-h-44 ui:data-[orientation=vertical]:w-auto ui:data-[orientation=vertical]:flex-col",e),...o,children:[y.jsx(Ibe,{"data-slot":"slider-track",className:te("ui:bg-muted ui:relative ui:grow ui:overflow-hidden ui:rounded-full ui:data-[orientation=horizontal]:h-1.5 ui:data-[orientation=horizontal]:w-full ui:data-[orientation=vertical]:h-full ui:data-[orientation=vertical]:w-1.5"),children:y.jsx(Pbe,{"data-slot":"slider-range",className:te("ui:bg-primary ui:absolute ui:data-[orientation=horizontal]:h-full ui:data-[orientation=vertical]:w-full")})}),Array.from({length:a.length},(s,c)=>y.jsx(Fbe,{"data-slot":"slider-thumb",className:"ui:border-primary ui:ring-ring/50 ui:block ui:size-4 ui:shrink-0 ui:rounded-full ui:border ui:bg-white ui:shadow-sm ui:transition-[color,box-shadow] ui:hover:ring-4 ui:focus-visible:ring-4 ui:focus-visible:outline-hidden ui:disabled:pointer-events-none ui:disabled:opacity-50"},c))]})}const Fpt=({name:e,control:t,label:n,description:r,min:i=0,max:o=100,step:a=1,leftLabel:s,rightLabel:c,showLabels:u=!0,complementaryField:d,onValueChange:f,containerClassName:h,labelClassName:p,showErrorPlaceholder:g=!1,tooltipContent:m,...b})=>{const w=Dr.useFormContext(),x=t??w?.control;if(!x)throw new Error("FormSlider must be used within a FormProvider or receive a control prop");const E=l.useRef(!1),S=Dr.useWatch({control:x,name:e});return y.jsx(Zr,{control:x,name:e,render:({field:$})=>{const M=R=>{if(E.current)return;const T=R[0];E.current=!0,$.onChange(String(T)),d&&w?.setValue&&w.setValue(d,String(o-T),{shouldValidate:!0}),f&&f(T),setTimeout(()=>{E.current=!1},0)},A=Number(S)||i+(o-i)/2;return y.jsxs(_r,{className:te("ui:w-full",h),children:[y.jsx(Ur,{children:y.jsx(Bn,{condition:!!n,children:y.jsxs(yi,{className:te(p,{"ui:flex ui:items-center ui:gap-2":!!m}),children:[n,m&&y.jsx(Gu,{content:m,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,color:"#737373",className:"ui:cursor-pointer"})})]})})}),y.jsx(wi,{children:y.jsxs("div",{className:"ui:space-y-2",children:[y.jsx(zde,{value:[A],onValueChange:M,min:i,max:o,step:a,className:"ui:w-full",...b}),u&&y.jsxs("div",{className:"ui:flex ui:justify-between ui:text-sm ui:text-gray-600",children:[s&&y.jsxs("span",{children:[s,": ",A,o===100?"%":""]}),c&&y.jsxs("span",{children:[c,": ",d?o-A:A,o===100?"%":""]})]})]})}),y.jsx(Ur,{children:y.jsx(Bn,{condition:!!r,children:y.jsx(Ni,{className:"ui:text-xs",children:r})})}),y.jsx(Jr,{showErrorPlaceholder:g})]})}})};function Tpt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.useMemo(()=>r=>{t.forEach(i=>i(r))},t)}const w5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function tf(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function QR(e){return"nodeType"in e}function Oi(e){var t,n;return e?tf(e)?e:QR(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function eI(e){const{Document:t}=Oi(e);return e instanceof t}function Y2(e){return tf(e)?!1:e instanceof Oi(e).HTMLElement}function _de(e){return e instanceof Oi(e).SVGElement}function nf(e){return e?tf(e)?e.document:QR(e)?eI(e)?e:Y2(e)||_de(e)?e.ownerDocument:document:document:document}const dl=w5?l.useLayoutEffect:l.useEffect;function tI(e){const t=l.useRef(e);return dl(()=>{t.current=e}),l.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function Dpt(){const e=l.useRef(null),t=l.useCallback((r,i)=>{e.current=setInterval(r,i)},[]),n=l.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Sh(e,t){t===void 0&&(t=[e]);const n=l.useRef(e);return dl(()=>{n.current!==e&&(n.current=e)},t),n}function X2(e,t){const n=l.useRef();return l.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function zg(e){const t=tI(e),n=l.useRef(null),r=l.useCallback(i=>{i!==n.current&&t?.(i,n.current),n.current=i},[]);return[n,r]}function p$(e){const t=l.useRef();return l.useEffect(()=>{t.current=e},[e]),t.current}let Xx={};function K2(e,t){return l.useMemo(()=>{if(t)return t;const n=Xx[e]==null?0:Xx[e]+1;return Xx[e]=n,e+"-"+n},[e,t])}function kde(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((o,a)=>{const s=Object.entries(a);for(const[c,u]of s){const d=o[c];d!=null&&(o[c]=d+e*u)}return o},{...t})}}const Yd=kde(1),$h=kde(-1);function zpt(e){return"clientX"in e&&"clientY"in e}function nI(e){if(!e)return!1;const{KeyboardEvent:t}=Oi(e.target);return t&&e instanceof t}function _pt(e){if(!e)return!1;const{TouchEvent:t}=Oi(e.target);return t&&e instanceof t}function m$(e){if(_pt(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return zpt(e)?{x:e.clientX,y:e.clientY}:null}const Mh=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Mh.Translate.toString(e),Mh.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),iq="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function kpt(e){return e.matches(iq)?e:e.querySelector(iq)}const Lpt={display:"none"};function jpt(e){let{id:t,value:n}=e;return l.createElement("div",{id:t,style:Lpt},n)}function Hpt(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return l.createElement("div",{id:t,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function Bpt(){const[e,t]=l.useState("");return{announce:l.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Lde=l.createContext(null);function Vpt(e){const t=l.useContext(Lde);l.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Gpt(){const[e]=l.useState(()=>new Set),t=l.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[l.useCallback(r=>{let{type:i,event:o}=r;e.forEach(a=>{var s;return(s=a[i])==null?void 0:s.call(a,o)})},[e]),t]}const qpt={draggable:`
235
235
  To pick up a draggable item, press the space bar.
236
236
  While dragging, use the arrow keys to move the item.
237
237
  Press space again to drop the item in its new position, or press escape to cancel.
@@ -73563,25 +73563,30 @@ function L2t({
73563
73563
  function H2t({
73564
73564
  className: e,
73565
73565
  children: t,
73566
- position: n = "item-aligned",
73566
+ position: n,
73567
73567
  isPortal: r = !1,
73568
73568
  align: i = "center",
73569
- style: o,
73570
- ...a
73569
+ alignItemWithTrigger: o = !1,
73570
+ side: a = "bottom",
73571
+ sideOffset: l = 4,
73572
+ style: c,
73573
+ ...u
73571
73574
  }) {
73572
- const { layer: l } = Ine(), c = l != null ? parseInt(getComputedStyle(l).zIndex, 10) : NaN, u = Number.isFinite(c) ? c + 1 : void 0, d = /* @__PURE__ */ ue(
73575
+ const d = n ?? (o ? "item-aligned" : "popper"), { layer: f } = Ine(), h = f != null ? parseInt(getComputedStyle(f).zIndex, 10) : NaN, p = Number.isFinite(h) ? h + 1 : void 0, g = /* @__PURE__ */ ue(
73573
73576
  gbe,
73574
73577
  {
73575
73578
  "data-slot": "select-content",
73576
73579
  className: te(
73577
73580
  "ui:relative ui:z-50 ui:max-h-96 ui:min-w-32 ui:overflow-hidden ui:rounded-md ui:border ui:bg-popover ui:text-popover-foreground ui:shadow-md ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2",
73578
- n === "popper" && "ui:data-[side=bottom]:translate-y-1 ui:data-[side=left]:-translate-x-1 ui:data-[side=right]:translate-x-1 ui:data-[side=top]:-translate-y-1",
73581
+ d === "popper" && "ui:data-[side=bottom]:translate-y-1 ui:data-[side=left]:-translate-x-1 ui:data-[side=right]:translate-x-1 ui:data-[side=top]:-translate-y-1",
73579
73582
  e
73580
73583
  ),
73581
- position: n,
73584
+ position: d,
73582
73585
  align: i,
73583
- style: u != null ? { zIndex: u, ...o } : o,
73584
- ...a,
73586
+ side: d === "popper" ? a : void 0,
73587
+ sideOffset: d === "popper" ? l : void 0,
73588
+ style: p != null ? { zIndex: p, ...c } : c,
73589
+ ...u,
73585
73590
  children: [
73586
73591
  /* @__PURE__ */ w(V2t, {}),
73587
73592
  /* @__PURE__ */ w(
@@ -73589,7 +73594,7 @@ function H2t({
73589
73594
  {
73590
73595
  className: te(
73591
73596
  "ui:p-1",
73592
- n === "popper" && "ui:h-(--radix-select-trigger-height) ui:w-full ui:min-w-(--radix-select-trigger-width) ui:scroll-my-1"
73597
+ d === "popper" && "ui:h-(--radix-select-trigger-height) ui:w-full ui:min-w-(--radix-select-trigger-width) ui:scroll-my-1"
73593
73598
  ),
73594
73599
  children: t
73595
73600
  }
@@ -73598,7 +73603,7 @@ function H2t({
73598
73603
  ]
73599
73604
  }
73600
73605
  );
73601
- return r ? /* @__PURE__ */ w(mbe, { children: d }) : d;
73606
+ return r ? /* @__PURE__ */ w(mbe, { children: g }) : g;
73602
73607
  }
73603
73608
  function Mkt({ className: e, ...t }) {
73604
73609
  return /* @__PURE__ */ w(
@@ -104662,13 +104667,7 @@ function zDt({
104662
104667
  };
104663
104668
  return /* @__PURE__ */ w(N0e.Provider, { value: l, children: /* @__PURE__ */ w("div", { className: te("ui:w-full", a), children: t }) });
104664
104669
  }
104665
- function DDt({
104666
- placeholder: e = "Search...",
104667
- filterColumn: t,
104668
- className: n,
104669
- label: r,
104670
- autoFocus: i = !1
104671
- }) {
104670
+ function DDt({ placeholder: e = "Search...", filterColumn: t, className: n, label: r, autoFocus: i = !1 }) {
104672
104671
  const { table: o, search: a, onSearchChange: l } = tb(), c = (d) => {
104673
104672
  const f = String(d);
104674
104673
  t ? o.getColumn(t)?.setFilterValue(f) : l(f);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@segmentify/ui",
3
- "version": "0.0.68",
3
+ "version": "0.0.69",
4
4
  "description": "A collection of reusable React UI components built with Tailwind CSS and Radix UI",
5
5
  "repository": {
6
6
  "type": "git",