File: /var/www/html/wp-content/plugins/wptelegram/assets/build/dist/settings-B6icb2PJ.js
var bg=Object.defineProperty;var xg=(e,t,n)=>t in e?bg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var We=(e,t,n)=>xg(e,typeof t!="symbol"?t+"":t,n);import{s as wg,r as _g,j as c,_ as w,a as me,i as Yu}from"./index-Cg7uBMVa.js";import{$ as Hr}from"./jquery-BNSPwlrv.js";import{g as _s}from"./_commonjsHelpers-CqkleIqs.js";function Sg(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const Cg=(e="",{disableFormCSS:t=!0,disableCommonCSS:n=!1}={})=>{const r=e==null?void 0:e.replace(/^#?/,"#");Hr(()=>{r&&Hr(r).length&&Hr(r).siblings().remove(),t&&Hr("#forms-css").prop("disabled",!0),n&&Hr("#common-css").prop("disabled",!0)})},kg=(e,t)=>{const n=window[e].i18n;wg(n,t)};var f=_g();const O=_s(f),Qa=Sg({__proto__:null,default:O},[f]);var ua,ec;function jg(){return ec||(ec=1,ua=ReactDOM),ua}var Nr=jg();const Ku=_s(Nr);function Eg(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 Rg=e=>{switch(e){case"success":return Ag;case"info":return Ng;case"warning":return Ig;case"error":return Pg;default:return null}},Tg=Array(12).fill(0),Og=({visible:e,className:t})=>O.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},O.createElement("div",{className:"sonner-spinner"},Tg.map((n,r)=>O.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Ag=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Ig=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},O.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Ng=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Pg=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Mg=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},O.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),O.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Dg=()=>{const[e,t]=O.useState(document.hidden);return O.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let ei=1;class Fg{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...s}=t,o=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:ei++,a=this.toasts.find(l=>l.id===o),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(l=>l.id===o?(this.publish({...l,...t,id:o,title:r}),{...l,...t,id:o,dismissible:i,title:r}):l):this.addToast({title:r,...s,dismissible:i,id:o}),o},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const s=Promise.resolve(t instanceof Function?t():t);let o=r!==void 0,a;const i=s.then(async u=>{if(a=["resolve",u],O.isValidElement(u))o=!1,this.create({id:r,type:"default",message:u});else if(Lg(u)&&!u.ok){o=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,m=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,y=typeof d=="object"&&!O.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:m,...y})}else if(u instanceof Error){o=!1;const d=typeof n.error=="function"?await n.error(u):n.error,m=typeof n.description=="function"?await n.description(u):n.description,y=typeof d=="object"&&!O.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:m,...y})}else if(n.success!==void 0){o=!1;const d=typeof n.success=="function"?await n.success(u):n.success,m=typeof n.description=="function"?await n.description(u):n.description,y=typeof d=="object"&&!O.isValidElement(d)?d:{message:d};this.create({id:r,type:"success",description:m,...y})}}).catch(async u=>{if(a=["reject",u],n.error!==void 0){o=!1;const p=typeof n.error=="function"?await n.error(u):n.error,d=typeof n.description=="function"?await n.description(u):n.description,v=typeof p=="object"&&!O.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:d,...v})}}).finally(()=>{o&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,p)=>i.then(()=>a[0]==="reject"?p(a[1]):u(a[1])).catch(p));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||ei++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Ct=new Fg,Vg=(e,t)=>{const n=(t==null?void 0:t.id)||ei++;return Ct.addToast({title:e,...t,id:n}),n},Lg=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",$g=Vg,Bg=()=>Ct.toasts,Ug=()=>Ct.getActiveToasts(),tc=Object.assign($g,{success:Ct.success,info:Ct.info,warning:Ct.warning,error:Ct.error,custom:Ct.custom,message:Ct.message,promise:Ct.promise,dismiss:Ct.dismiss,loading:Ct.loading},{getHistory:Bg,getToasts:Ug});Eg("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Ds(e){return e.label!==void 0}const zg=3,Hg="24px",Wg="16px",nc=4e3,Zg=356,Gg=14,qg=45,Yg=200;function Kt(...e){return e.filter(Boolean).join(" ")}function Kg(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Xg=e=>{var t,n,r,s,o,a,i,l,u;const{invert:p,toast:d,unstyled:m,interacting:v,setHeights:y,visibleToasts:h,heights:g,index:x,toasts:b,expanded:S,removeToast:E,defaultRichColors:_,closeButton:j,style:k,cancelButtonStyle:R,actionButtonStyle:N,className:F="",descriptionClassName:z="",duration:M,position:B,gap:q,expandByDefault:L,classNames:I,icons:U,closeButtonAriaLabel:P="Close toast"}=e,[ae,Pe]=O.useState(null),[ie,ne]=O.useState(null),[J,le]=O.useState(!1),[Re,ce]=O.useState(!1),[H,ue]=O.useState(!1),[je,ge]=O.useState(!1),[ve,he]=O.useState(!1),[Ke,qe]=O.useState(0),[xt,Et]=O.useState(0),ut=O.useRef(d.duration||M||nc),Mt=O.useRef(null),He=O.useRef(null),dt=x===0,rr=x+1<=h,C=d.type,T=d.dismissible!==!1,A=d.className||"",K=d.descriptionClassName||"",Z=O.useMemo(()=>g.findIndex(_e=>_e.toastId===d.id)||0,[g,d.id]),V=O.useMemo(()=>{var _e;return(_e=d.closeButton)!=null?_e:j},[d.closeButton,j]),Q=O.useMemo(()=>d.duration||M||nc,[d.duration,M]),Oe=O.useRef(0),Ve=O.useRef(0),tt=O.useRef(0),Cn=O.useRef(null),[Br,Ur]=B.split("-"),Ns=O.useMemo(()=>g.reduce((_e,st,ft)=>ft>=Z?_e:_e+st.height,0),[g,Z]),zr=Dg(),ca=d.invert||p,sr=C==="loading";Ve.current=O.useMemo(()=>Z*q+Ns,[Z,Ns]),O.useEffect(()=>{ut.current=Q},[Q]),O.useEffect(()=>{le(!0)},[]),O.useEffect(()=>{const _e=He.current;if(_e){const st=_e.getBoundingClientRect().height;return Et(st),y(ft=>[{toastId:d.id,height:st,position:d.position},...ft]),()=>y(ft=>ft.filter(Rt=>Rt.toastId!==d.id))}},[y,d.id]),O.useLayoutEffect(()=>{if(!J)return;const _e=He.current,st=_e.style.height;_e.style.height="auto";const ft=_e.getBoundingClientRect().height;_e.style.height=st,Et(ft),y(Rt=>Rt.find(it=>it.toastId===d.id)?Rt.map(it=>it.toastId===d.id?{...it,height:ft}:it):[{toastId:d.id,height:ft,position:d.position},...Rt])},[J,d.title,d.description,y,d.id]);const kn=O.useCallback(()=>{ce(!0),qe(Ve.current),y(_e=>_e.filter(st=>st.toastId!==d.id)),setTimeout(()=>{E(d)},Yg)},[d,E,y,Ve]);O.useEffect(()=>{if(d.promise&&C==="loading"||d.duration===1/0||d.type==="loading")return;let _e;return S||v||zr?(()=>{if(tt.current<Oe.current){const Rt=new Date().getTime()-Oe.current;ut.current=ut.current-Rt}tt.current=new Date().getTime()})():(()=>{ut.current!==1/0&&(Oe.current=new Date().getTime(),_e=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),kn()},ut.current))})(),()=>clearTimeout(_e)},[S,v,d,C,zr,kn]),O.useEffect(()=>{d.delete&&kn()},[kn,d.delete]);function vg(){var _e;if(U!=null&&U.loading){var st;return O.createElement("div",{className:Kt(I==null?void 0:I.loader,d==null||(st=d.classNames)==null?void 0:st.loader,"sonner-loader"),"data-visible":C==="loading"},U.loading)}return O.createElement(Og,{className:Kt(I==null?void 0:I.loader,d==null||(_e=d.classNames)==null?void 0:_e.loader),visible:C==="loading"})}const yg=d.icon||(U==null?void 0:U[C])||Rg(C);var Xl,Jl;return O.createElement("li",{tabIndex:0,ref:He,className:Kt(F,A,I==null?void 0:I.toast,d==null||(t=d.classNames)==null?void 0:t.toast,I==null?void 0:I.default,I==null?void 0:I[C],d==null||(n=d.classNames)==null?void 0:n[C]),"data-sonner-toast":"","data-rich-colors":(Xl=d.richColors)!=null?Xl:_,"data-styled":!(d.jsx||d.unstyled||m),"data-mounted":J,"data-promise":!!d.promise,"data-swiped":ve,"data-removed":Re,"data-visible":rr,"data-y-position":Br,"data-x-position":Ur,"data-index":x,"data-front":dt,"data-swiping":H,"data-dismissible":T,"data-type":C,"data-invert":ca,"data-swipe-out":je,"data-swipe-direction":ie,"data-expanded":!!(S||L&&J),style:{"--index":x,"--toasts-before":x,"--z-index":b.length-x,"--offset":`${Re?Ke:Ve.current}px`,"--initial-height":L?"auto":`${xt}px`,...k,...d.style},onDragEnd:()=>{ue(!1),Pe(null),Cn.current=null},onPointerDown:_e=>{sr||!T||(Mt.current=new Date,qe(Ve.current),_e.target.setPointerCapture(_e.pointerId),_e.target.tagName!=="BUTTON"&&(ue(!0),Cn.current={x:_e.clientX,y:_e.clientY}))},onPointerUp:()=>{var _e,st,ft;if(je||!T)return;Cn.current=null;const Rt=Number(((_e=He.current)==null?void 0:_e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ps=Number(((st=He.current)==null?void 0:st.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),it=new Date().getTime()-((ft=Mt.current)==null?void 0:ft.getTime()),Dt=ae==="x"?Rt:Ps,Ms=Math.abs(Dt)/it;if(Math.abs(Dt)>=qg||Ms>.11){qe(Ve.current),d.onDismiss==null||d.onDismiss.call(d,d),ne(ae==="x"?Rt>0?"right":"left":Ps>0?"down":"up"),kn(),ge(!0);return}else{var Bt,Ut;(Bt=He.current)==null||Bt.style.setProperty("--swipe-amount-x","0px"),(Ut=He.current)==null||Ut.style.setProperty("--swipe-amount-y","0px")}he(!1),ue(!1),Pe(null)},onPointerMove:_e=>{var st,ft,Rt;if(!Cn.current||!T||((st=window.getSelection())==null?void 0:st.toString().length)>0)return;const it=_e.clientY-Cn.current.y,Dt=_e.clientX-Cn.current.x;var Ms;const Bt=(Ms=e.swipeDirections)!=null?Ms:Kg(B);!ae&&(Math.abs(Dt)>1||Math.abs(it)>1)&&Pe(Math.abs(Dt)>Math.abs(it)?"x":"y");let Ut={x:0,y:0};const Ql=Hn=>1/(1.5+Math.abs(Hn)/20);if(ae==="y"){if(Bt.includes("top")||Bt.includes("bottom"))if(Bt.includes("top")&&it<0||Bt.includes("bottom")&&it>0)Ut.y=it;else{const Hn=it*Ql(it);Ut.y=Math.abs(Hn)<Math.abs(it)?Hn:it}}else if(ae==="x"&&(Bt.includes("left")||Bt.includes("right")))if(Bt.includes("left")&&Dt<0||Bt.includes("right")&&Dt>0)Ut.x=Dt;else{const Hn=Dt*Ql(Dt);Ut.x=Math.abs(Hn)<Math.abs(Dt)?Hn:Dt}(Math.abs(Ut.x)>0||Math.abs(Ut.y)>0)&&he(!0),(ft=He.current)==null||ft.style.setProperty("--swipe-amount-x",`${Ut.x}px`),(Rt=He.current)==null||Rt.style.setProperty("--swipe-amount-y",`${Ut.y}px`)}},V&&!d.jsx&&C!=="loading"?O.createElement("button",{"aria-label":P,"data-disabled":sr,"data-close-button":!0,onClick:sr||!T?()=>{}:()=>{kn(),d.onDismiss==null||d.onDismiss.call(d,d)},className:Kt(I==null?void 0:I.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},(Jl=U==null?void 0:U.close)!=null?Jl:Mg):null,(C||d.icon||d.promise)&&d.icon!==null&&((U==null?void 0:U[C])!==null||d.icon)?O.createElement("div",{"data-icon":"",className:Kt(I==null?void 0:I.icon,d==null||(s=d.classNames)==null?void 0:s.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||vg():null,d.type!=="loading"?yg:null):null,O.createElement("div",{"data-content":"",className:Kt(I==null?void 0:I.content,d==null||(o=d.classNames)==null?void 0:o.content)},O.createElement("div",{"data-title":"",className:Kt(I==null?void 0:I.title,d==null||(a=d.classNames)==null?void 0:a.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?O.createElement("div",{"data-description":"",className:Kt(z,K,I==null?void 0:I.description,d==null||(i=d.classNames)==null?void 0:i.description)},typeof d.description=="function"?d.description():d.description):null),O.isValidElement(d.cancel)?d.cancel:d.cancel&&Ds(d.cancel)?O.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||R,onClick:_e=>{Ds(d.cancel)&&T&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,_e),kn())},className:Kt(I==null?void 0:I.cancelButton,d==null||(l=d.classNames)==null?void 0:l.cancelButton)},d.cancel.label):null,O.isValidElement(d.action)?d.action:d.action&&Ds(d.action)?O.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||N,onClick:_e=>{Ds(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,_e),!_e.defaultPrevented&&kn())},className:Kt(I==null?void 0:I.actionButton,d==null||(u=d.classNames)==null?void 0:u.actionButton)},d.action.label):null)};function rc(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Jg(e,t){const n={};return[e,t].forEach((r,s)=>{const o=s===1,a=o?"--mobile-offset":"--offset",i=o?Wg:Hg;function l(u){["top","right","bottom","left"].forEach(p=>{n[`${a}-${p}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${a}-${u}`]=i:n[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(i)}),n}const Qg=O.forwardRef(function(t,n){const{invert:r,position:s="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:i,className:l,offset:u,mobileOffset:p,theme:d="light",richColors:m,duration:v,style:y,visibleToasts:h=zg,toastOptions:g,dir:x=rc(),gap:b=Gg,icons:S,containerAriaLabel:E="Notifications"}=t,[_,j]=O.useState([]),k=O.useMemo(()=>Array.from(new Set([s].concat(_.filter(ie=>ie.position).map(ie=>ie.position)))),[_,s]),[R,N]=O.useState([]),[F,z]=O.useState(!1),[M,B]=O.useState(!1),[q,L]=O.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),I=O.useRef(null),U=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=O.useRef(null),ae=O.useRef(!1),Pe=O.useCallback(ie=>{j(ne=>{var J;return(J=ne.find(le=>le.id===ie.id))!=null&&J.delete||Ct.dismiss(ie.id),ne.filter(({id:le})=>le!==ie.id)})},[]);return O.useEffect(()=>Ct.subscribe(ie=>{if(ie.dismiss){requestAnimationFrame(()=>{j(ne=>ne.map(J=>J.id===ie.id?{...J,delete:!0}:J))});return}setTimeout(()=>{Ku.flushSync(()=>{j(ne=>{const J=ne.findIndex(le=>le.id===ie.id);return J!==-1?[...ne.slice(0,J),{...ne[J],...ie},...ne.slice(J+1)]:[ie,...ne]})})})}),[_]),O.useEffect(()=>{if(d!=="system"){L(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?L("dark"):L("light")),typeof window>"u")return;const ie=window.matchMedia("(prefers-color-scheme: dark)");try{ie.addEventListener("change",({matches:ne})=>{L(ne?"dark":"light")})}catch{ie.addListener(({matches:J})=>{try{L(J?"dark":"light")}catch(le){console.error(le)}})}},[d]),O.useEffect(()=>{_.length<=1&&z(!1)},[_]),O.useEffect(()=>{const ie=ne=>{var J;if(o.every(ce=>ne[ce]||ne.code===ce)){var Re;z(!0),(Re=I.current)==null||Re.focus()}ne.code==="Escape"&&(document.activeElement===I.current||(J=I.current)!=null&&J.contains(document.activeElement))&&z(!1)};return document.addEventListener("keydown",ie),()=>document.removeEventListener("keydown",ie)},[o]),O.useEffect(()=>{if(I.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,ae.current=!1)}},[I.current]),O.createElement("section",{ref:n,"aria-label":`${E} ${U}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((ie,ne)=>{var J;const[le,Re]=ie.split("-");return _.length?O.createElement("ol",{key:ie,dir:x==="auto"?rc():x,tabIndex:-1,ref:I,className:l,"data-sonner-toaster":!0,"data-sonner-theme":q,"data-y-position":le,"data-lifted":F&&_.length>1&&!a,"data-x-position":Re,style:{"--front-toast-height":`${((J=R[0])==null?void 0:J.height)||0}px`,"--width":`${Zg}px`,"--gap":`${b}px`,...y,...Jg(u,p)},onBlur:ce=>{ae.current&&!ce.currentTarget.contains(ce.relatedTarget)&&(ae.current=!1,P.current&&(P.current.focus({preventScroll:!0}),P.current=null))},onFocus:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||ae.current||(ae.current=!0,P.current=ce.relatedTarget)},onMouseEnter:()=>z(!0),onMouseMove:()=>z(!0),onMouseLeave:()=>{M||z(!1)},onDragEnd:()=>z(!1),onPointerDown:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||B(!0)},onPointerUp:()=>B(!1)},_.filter(ce=>!ce.position&&ne===0||ce.position===ie).map((ce,H)=>{var ue,je;return O.createElement(Xg,{key:ce.id,icons:S,index:H,toast:ce,defaultRichColors:m,duration:(ue=g==null?void 0:g.duration)!=null?ue:v,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:r,visibleToasts:h,closeButton:(je=g==null?void 0:g.closeButton)!=null?je:i,interacting:M,position:ie,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,closeButtonAriaLabel:g==null?void 0:g.closeButtonAriaLabel,removeToast:Pe,toasts:_.filter(ge=>ge.position==ce.position),heights:R.filter(ge=>ge.position==ce.position),setHeights:N,expandByDefault:a,gap:b,expanded:F,swipeDirections:t.swipeDirections})})):null}))}),ev=({...e})=>c.jsx(Qg,{theme:"light",className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...e});var da,sc;function tv(){return sc||(sc=1,da=ReactDOM),da}var nv=tv();const rv=_s(nv),wr="wptelegram-settings";var Ss=e=>e.type==="checkbox",Gn=e=>e instanceof Date,wt=e=>e==null;const Xu=e=>typeof e=="object";var Je=e=>!wt(e)&&!Array.isArray(e)&&Xu(e)&&!Gn(e),Ju=e=>Je(e)&&e.target?Ss(e.target)?e.target.checked:e.target.value:e,sv=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Qu=(e,t)=>e.has(sv(t)),ov=e=>{const t=e.constructor&&e.constructor.prototype;return Je(t)&&t.hasOwnProperty("isPrototypeOf")},Vi=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ze(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Vi&&(e instanceof Blob||r))&&(n||Je(e)))if(t=n?[]:{},!n&&!ov(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=Ze(e[s]));else return e;return t}var Cs=e=>Array.isArray(e)?e.filter(Boolean):[],Be=e=>e===void 0,W=(e,t,n)=>{if(!t||!Je(e))return n;const r=Cs(t.split(/[,[\].]+?/)).reduce((s,o)=>wt(s)?s:s[o],e);return Be(r)||r===e?Be(e[t])?n:e[t]:r},Tt=e=>typeof e=="boolean",Li=e=>/^\w*$/.test(e),ed=e=>Cs(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ne=(e,t,n)=>{let r=-1;const s=Li(t)?[t]:ed(t),o=s.length,a=o-1;for(;++r<o;){const i=s[r];let l=n;if(r!==a){const u=e[i];l=Je(u)||Array.isArray(u)?u:isNaN(+s[r+1])?{}:[]}if(i==="__proto__"||i==="constructor"||i==="prototype")return;e[i]=l,e=e[i]}};const ao={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ft={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},fn={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},td=O.createContext(null),Pt=()=>O.useContext(td),av=e=>{const{children:t,...n}=e;return O.createElement(td.Provider,{value:n},t)};var nd=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const a=o;return t._proxyFormState[a]!==Ft.all&&(t._proxyFormState[a]=!r||Ft.all),n&&(n[a]=!0),e[a]}});return s};function Io(e){const t=Pt(),{control:n=t.control,disabled:r,name:s,exact:o}=e||{},[a,i]=O.useState(n._formState),l=O.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),u=O.useRef(s);return u.current=s,O.useEffect(()=>n._subscribe({name:u.current,formState:l.current,exact:o,callback:p=>{!r&&i({...n._formState,...p})}}),[n,r,o]),O.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),O.useMemo(()=>nd(a,n,l.current,!1),[a,n])}var tn=e=>typeof e=="string",rd=(e,t,n,r,s)=>tn(e)?(r&&t.watch.add(e),W(n,e,s)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),W(n,o))):(r&&(t.watchAll=!0),n);function ct(e){const t=Pt(),{control:n=t.control,name:r,defaultValue:s,disabled:o,exact:a}=e||{},i=O.useRef(r),l=O.useRef(s);i.current=r,O.useEffect(()=>n._subscribe({name:i.current,formState:{values:!0},exact:a,callback:d=>!o&&p(rd(i.current,n._names,d.values||n._formValues,!1,l.current))}),[n,o,a]);const[u,p]=O.useState(n._getWatch(r,s));return O.useEffect(()=>n._removeUnmounted()),u}function iv(e){const t=Pt(),{name:n,disabled:r,control:s=t.control,shouldUnregister:o}=e,a=Qu(s._names.array,n),i=ct({control:s,name:n,defaultValue:W(s._formValues,n,W(s._defaultValues,n,e.defaultValue)),exact:!0}),l=Io({control:s,name:n,exact:!0}),u=O.useRef(e),p=O.useRef(s.register(n,{...e.rules,value:i,...Tt(e.disabled)?{disabled:e.disabled}:{}})),d=O.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!W(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!W(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!W(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!W(l.validatingFields,n)},error:{enumerable:!0,get:()=>W(l.errors,n)}}),[l,n]),m=O.useCallback(g=>p.current.onChange({target:{value:Ju(g),name:n},type:ao.CHANGE}),[n]),v=O.useCallback(()=>p.current.onBlur({target:{value:W(s._formValues,n),name:n},type:ao.BLUR}),[n,s._formValues]),y=O.useCallback(g=>{const x=W(s._fields,n);x&&g&&(x._f.ref={focus:()=>g.focus(),select:()=>g.select(),setCustomValidity:b=>g.setCustomValidity(b),reportValidity:()=>g.reportValidity()})},[s._fields,n]),h=O.useMemo(()=>({name:n,value:i,...Tt(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:m,onBlur:v,ref:y}),[n,r,l.disabled,m,v,y,i]);return O.useEffect(()=>{const g=s._options.shouldUnregister||o;s.register(n,{...u.current.rules,...Tt(u.current.disabled)?{disabled:u.current.disabled}:{}});const x=(b,S)=>{const E=W(s._fields,b);E&&E._f&&(E._f.mount=S)};if(x(n,!0),g){const b=Ze(W(s._options.defaultValues,n));Ne(s._defaultValues,n,b),Be(W(s._formValues,n))&&Ne(s._formValues,n,b)}return!a&&s.register(n),()=>{(a?g&&!s._state.action:g)?s.unregister(n):x(n,!1)}},[n,s,a,o]),O.useEffect(()=>{s._setDisabledField({disabled:r,name:n})},[r,n,s]),O.useMemo(()=>({field:h,formState:l,fieldState:d}),[h,l,d])}const lv=e=>e.render(iv(e));var sd=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},kt=e=>Array.isArray(e)?e:[e],oc=()=>{let e=[];return{get observers(){return e},next:s=>{for(const o of e)o.next&&o.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(o=>o!==s)}}),unsubscribe:()=>{e=[]}}},ti=e=>wt(e)||!Xu(e);function Tn(e,t){if(ti(e)||ti(t))return e===t;if(Gn(e)&&Gn(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const o=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const a=t[s];if(Gn(o)&&Gn(a)||Je(o)&&Je(a)||Array.isArray(o)&&Array.isArray(a)?!Tn(o,a):o!==a)return!1}}return!0}var mt=e=>Je(e)&&!Object.keys(e).length,$i=e=>e.type==="file",Ht=e=>typeof e=="function",io=e=>{if(!Vi)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},od=e=>e.type==="select-multiple",Bi=e=>e.type==="radio",cv=e=>Bi(e)||Ss(e),fa=e=>io(e)&&e.isConnected;function uv(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Be(e)?r++:e[t[r++]];return e}function dv(e){for(const t in e)if(e.hasOwnProperty(t)&&!Be(e[t]))return!1;return!0}function Qe(e,t){const n=Array.isArray(t)?t:Li(t)?[t]:ed(t),r=n.length===1?e:uv(e,n),s=n.length-1,o=n[s];return r&&delete r[o],s!==0&&(Je(r)&&mt(r)||Array.isArray(r)&&dv(r))&&Qe(e,n.slice(0,-1)),e}var ad=e=>{for(const t in e)if(Ht(e[t]))return!0;return!1};function lo(e,t={}){const n=Array.isArray(e);if(Je(e)||n)for(const r in e)Array.isArray(e[r])||Je(e[r])&&!ad(e[r])?(t[r]=Array.isArray(e[r])?[]:{},lo(e[r],t[r])):wt(e[r])||(t[r]=!0);return t}function id(e,t,n){const r=Array.isArray(e);if(Je(e)||r)for(const s in e)Array.isArray(e[s])||Je(e[s])&&!ad(e[s])?Be(t)||ti(n[s])?n[s]=Array.isArray(e[s])?lo(e[s],[]):{...lo(e[s])}:id(e[s],wt(t)?{}:t[s],n[s]):n[s]=!Tn(e[s],t[s]);return n}var Wr=(e,t)=>id(e,t,lo(t));const ac={value:!1,isValid:!1},ic={value:!0,isValid:!0};var ld=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Be(e[0].attributes.value)?Be(e[0].value)||e[0].value===""?ic:{value:e[0].value,isValid:!0}:ic:ac}return ac},cd=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Be(e)?e:t?e===""?NaN:e&&+e:n&&tn(e)?new Date(e):r?r(e):e;const lc={isValid:!1,value:null};var ud=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,lc):lc;function cc(e){const t=e.ref;return $i(t)?t.files:Bi(t)?ud(e.refs).value:od(t)?[...t.selectedOptions].map(({value:n})=>n):Ss(t)?ld(e.refs).value:cd(Be(t.value)?e.ref.value:t.value,e)}var fv=(e,t,n,r)=>{const s={};for(const o of e){const a=W(t,o);a&&Ne(s,o,a._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},co=e=>e instanceof RegExp,Zr=e=>Be(e)?e:co(e)?e.source:Je(e)?co(e.value)?e.value.source:e.value:e,fr=e=>({isOnSubmit:!e||e===Ft.onSubmit,isOnBlur:e===Ft.onBlur,isOnChange:e===Ft.onChange,isOnAll:e===Ft.all,isOnTouch:e===Ft.onTouched});const uc="AsyncFunction";var pv=e=>!!e&&!!e.validate&&!!(Ht(e.validate)&&e.validate.constructor.name===uc||Je(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===uc)),mv=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ni=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const hr=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const o=W(e,s);if(o){const{_f:a,...i}=o;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],s)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(hr(i,t))break}else if(Je(i)&&hr(i,t))break}}};function dc(e,t,n){const r=W(e,n);if(r||Li(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const o=s.join("."),a=W(t,o),i=W(e,o);if(a&&!Array.isArray(a)&&n!==o)return{name:n};if(i&&i.type)return{name:o,error:i};s.pop()}return{name:n}}var hv=(e,t,n,r)=>{n(e);const{name:s,...o}=e;return mt(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!r||Ft.all))},gv=(e,t,n)=>!e||!t||e===t||kt(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),vv=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,yv=(e,t)=>!Cs(W(e,t)).length&&Qe(e,t),dd=(e,t,n)=>{const r=kt(W(e,n));return Ne(r,"root",t[n]),Ne(e,n,r),e},Ys=e=>tn(e);function fc(e,t,n="validate"){if(Ys(e)||Array.isArray(e)&&e.every(Ys)||Tt(e)&&!e)return{type:n,message:Ys(e)?e:"",ref:t}}var or=e=>Je(e)&&!co(e)?e:{value:e,message:""},ri=async(e,t,n,r,s,o)=>{const{ref:a,refs:i,required:l,maxLength:u,minLength:p,min:d,max:m,pattern:v,validate:y,name:h,valueAsNumber:g,mount:x}=e._f,b=W(n,h);if(!x||t.has(h))return{};const S=i?i[0]:a,E=M=>{s&&S.reportValidity&&(S.setCustomValidity(Tt(M)?"":M||""),S.reportValidity())},_={},j=Bi(a),k=Ss(a),R=j||k,N=(g||$i(a))&&Be(a.value)&&Be(b)||io(a)&&a.value===""||b===""||Array.isArray(b)&&!b.length,F=sd.bind(null,h,r,_),z=(M,B,q,L=fn.maxLength,I=fn.minLength)=>{const U=M?B:q;_[h]={type:M?L:I,message:U,ref:a,...F(M?L:I,U)}};if(o?!Array.isArray(b)||!b.length:l&&(!R&&(N||wt(b))||Tt(b)&&!b||k&&!ld(i).isValid||j&&!ud(i).isValid)){const{value:M,message:B}=Ys(l)?{value:!!l,message:l}:or(l);if(M&&(_[h]={type:fn.required,message:B,ref:S,...F(fn.required,B)},!r))return E(B),_}if(!N&&(!wt(d)||!wt(m))){let M,B;const q=or(m),L=or(d);if(!wt(b)&&!isNaN(b)){const I=a.valueAsNumber||b&&+b;wt(q.value)||(M=I>q.value),wt(L.value)||(B=I<L.value)}else{const I=a.valueAsDate||new Date(b),U=Pe=>new Date(new Date().toDateString()+" "+Pe),P=a.type=="time",ae=a.type=="week";tn(q.value)&&b&&(M=P?U(b)>U(q.value):ae?b>q.value:I>new Date(q.value)),tn(L.value)&&b&&(B=P?U(b)<U(L.value):ae?b<L.value:I<new Date(L.value))}if((M||B)&&(z(!!M,q.message,L.message,fn.max,fn.min),!r))return E(_[h].message),_}if((u||p)&&!N&&(tn(b)||o&&Array.isArray(b))){const M=or(u),B=or(p),q=!wt(M.value)&&b.length>+M.value,L=!wt(B.value)&&b.length<+B.value;if((q||L)&&(z(q,M.message,B.message),!r))return E(_[h].message),_}if(v&&!N&&tn(b)){const{value:M,message:B}=or(v);if(co(M)&&!b.match(M)&&(_[h]={type:fn.pattern,message:B,ref:a,...F(fn.pattern,B)},!r))return E(B),_}if(y){if(Ht(y)){const M=await y(b,n),B=fc(M,S);if(B&&(_[h]={...B,...F(fn.validate,B.message)},!r))return E(B.message),_}else if(Je(y)){let M={};for(const B in y){if(!mt(M)&&!r)break;const q=fc(await y[B](b,n),S,B);q&&(M={...q,...F(B,q.message)},E(q.message),r&&(_[h]=M))}if(!mt(M)&&(_[h]={ref:S,...M},!r))return _}}return E(!0),_};const bv={mode:Ft.onSubmit,reValidateMode:Ft.onChange,shouldFocusError:!0};function xv(e={}){let t={...bv,...e},n={submitCount:0,isDirty:!1,isLoading:Ht(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const r={};let s=Je(t.defaultValues)||Je(t.values)?Ze(t.values||t.defaultValues)||{}:{},o=t.shouldUnregister?{}:Ze(s),a={action:!1,mount:!1,watch:!1},i={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let d={...p};const m={array:oc(),state:oc()},v=fr(t.mode),y=fr(t.reValidateMode),h=t.criteriaMode===Ft.all,g=C=>T=>{clearTimeout(u),u=setTimeout(C,T)},x=async C=>{if(!t.disabled&&(p.isValid||d.isValid||C)){const T=t.resolver?mt((await N()).errors):await z(r,!0);T!==n.isValid&&m.state.next({isValid:T})}},b=(C,T)=>{!t.disabled&&(p.isValidating||p.validatingFields||d.isValidating||d.validatingFields)&&((C||Array.from(i.mount)).forEach(A=>{A&&(T?Ne(n.validatingFields,A,T):Qe(n.validatingFields,A))}),m.state.next({validatingFields:n.validatingFields,isValidating:!mt(n.validatingFields)}))},S=(C,T=[],A,K,Z=!0,V=!0)=>{if(K&&A&&!t.disabled){if(a.action=!0,V&&Array.isArray(W(r,C))){const Q=A(W(r,C),K.argA,K.argB);Z&&Ne(r,C,Q)}if(V&&Array.isArray(W(n.errors,C))){const Q=A(W(n.errors,C),K.argA,K.argB);Z&&Ne(n.errors,C,Q),yv(n.errors,C)}if((p.touchedFields||d.touchedFields)&&V&&Array.isArray(W(n.touchedFields,C))){const Q=A(W(n.touchedFields,C),K.argA,K.argB);Z&&Ne(n.touchedFields,C,Q)}(p.dirtyFields||d.dirtyFields)&&(n.dirtyFields=Wr(s,o)),m.state.next({name:C,isDirty:B(C,T),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ne(o,C,T)},E=(C,T)=>{Ne(n.errors,C,T),m.state.next({errors:n.errors})},_=C=>{n.errors=C,m.state.next({errors:n.errors,isValid:!1})},j=(C,T,A,K)=>{const Z=W(r,C);if(Z){const V=W(o,C,Be(A)?W(s,C):A);Be(V)||K&&K.defaultChecked||T?Ne(o,C,T?V:cc(Z._f)):I(C,V),a.mount&&x()}},k=(C,T,A,K,Z)=>{let V=!1,Q=!1;const Oe={name:C};if(!t.disabled){if(!A||K){(p.isDirty||d.isDirty)&&(Q=n.isDirty,n.isDirty=Oe.isDirty=B(),V=Q!==Oe.isDirty);const Ve=Tn(W(s,C),T);Q=!!W(n.dirtyFields,C),Ve?Qe(n.dirtyFields,C):Ne(n.dirtyFields,C,!0),Oe.dirtyFields=n.dirtyFields,V=V||(p.dirtyFields||d.dirtyFields)&&Q!==!Ve}if(A){const Ve=W(n.touchedFields,C);Ve||(Ne(n.touchedFields,C,A),Oe.touchedFields=n.touchedFields,V=V||(p.touchedFields||d.touchedFields)&&Ve!==A)}V&&Z&&m.state.next(Oe)}return V?Oe:{}},R=(C,T,A,K)=>{const Z=W(n.errors,C),V=(p.isValid||d.isValid)&&Tt(T)&&n.isValid!==T;if(t.delayError&&A?(l=g(()=>E(C,A)),l(t.delayError)):(clearTimeout(u),l=null,A?Ne(n.errors,C,A):Qe(n.errors,C)),(A?!Tn(Z,A):Z)||!mt(K)||V){const Q={...K,...V&&Tt(T)?{isValid:T}:{},errors:n.errors,name:C};n={...n,...Q},m.state.next(Q)}},N=async C=>{b(C,!0);const T=await t.resolver(o,t.context,fv(C||i.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return b(C),T},F=async C=>{const{errors:T}=await N(C);if(C)for(const A of C){const K=W(T,A);K?Ne(n.errors,A,K):Qe(n.errors,A)}else n.errors=T;return T},z=async(C,T,A={valid:!0})=>{for(const K in C){const Z=C[K];if(Z){const{_f:V,...Q}=Z;if(V){const Oe=i.array.has(V.name),Ve=Z._f&&pv(Z._f);Ve&&p.validatingFields&&b([K],!0);const tt=await ri(Z,i.disabled,o,h,t.shouldUseNativeValidation&&!T,Oe);if(Ve&&p.validatingFields&&b([K]),tt[V.name]&&(A.valid=!1,T))break;!T&&(W(tt,V.name)?Oe?dd(n.errors,tt,V.name):Ne(n.errors,V.name,tt[V.name]):Qe(n.errors,V.name))}!mt(Q)&&await z(Q,T,A)}}return A.valid},M=()=>{for(const C of i.unMount){const T=W(r,C);T&&(T._f.refs?T._f.refs.every(A=>!fa(A)):!fa(T._f.ref))&&je(C)}i.unMount=new Set},B=(C,T)=>!t.disabled&&(C&&T&&Ne(o,C,T),!Tn(ne(),s)),q=(C,T,A)=>rd(C,i,{...a.mount?o:Be(T)?s:tn(C)?{[C]:T}:T},A,T),L=C=>Cs(W(a.mount?o:s,C,t.shouldUnregister?W(s,C,[]):[])),I=(C,T,A={})=>{const K=W(r,C);let Z=T;if(K){const V=K._f;V&&(!V.disabled&&Ne(o,C,cd(T,V)),Z=io(V.ref)&&wt(T)?"":T,od(V.ref)?[...V.ref.options].forEach(Q=>Q.selected=Z.includes(Q.value)):V.refs?Ss(V.ref)?V.refs.length>1?V.refs.forEach(Q=>(!Q.defaultChecked||!Q.disabled)&&(Q.checked=Array.isArray(Z)?!!Z.find(Oe=>Oe===Q.value):Z===Q.value)):V.refs[0]&&(V.refs[0].checked=!!Z):V.refs.forEach(Q=>Q.checked=Q.value===Z):$i(V.ref)?V.ref.value="":(V.ref.value=Z,V.ref.type||m.state.next({name:C,values:Ze(o)})))}(A.shouldDirty||A.shouldTouch)&&k(C,Z,A.shouldTouch,A.shouldDirty,!0),A.shouldValidate&&ie(C)},U=(C,T,A)=>{for(const K in T){const Z=T[K],V=`${C}.${K}`,Q=W(r,V);(i.array.has(C)||Je(Z)||Q&&!Q._f)&&!Gn(Z)?U(V,Z,A):I(V,Z,A)}},P=(C,T,A={})=>{const K=W(r,C),Z=i.array.has(C),V=Ze(T);Ne(o,C,V),Z?(m.array.next({name:C,values:Ze(o)}),(p.isDirty||p.dirtyFields||d.isDirty||d.dirtyFields)&&A.shouldDirty&&m.state.next({name:C,dirtyFields:Wr(s,o),isDirty:B(C,V)})):K&&!K._f&&!wt(V)?U(C,V,A):I(C,V,A),ni(C,i)&&m.state.next({...n}),m.state.next({name:a.mount?C:void 0,values:Ze(o)})},ae=async C=>{a.mount=!0;const T=C.target;let A=T.name,K=!0;const Z=W(r,A),V=Q=>{K=Number.isNaN(Q)||Gn(Q)&&isNaN(Q.getTime())||Tn(Q,W(o,A,Q))};if(Z){let Q,Oe;const Ve=T.type?cc(Z._f):Ju(C),tt=C.type===ao.BLUR||C.type===ao.FOCUS_OUT,Cn=!mv(Z._f)&&!t.resolver&&!W(n.errors,A)&&!Z._f.deps||vv(tt,W(n.touchedFields,A),n.isSubmitted,y,v),Br=ni(A,i,tt);Ne(o,A,Ve),tt?(Z._f.onBlur&&Z._f.onBlur(C),l&&l(0)):Z._f.onChange&&Z._f.onChange(C);const Ur=k(A,Ve,tt),Ns=!mt(Ur)||Br;if(!tt&&m.state.next({name:A,type:C.type,values:Ze(o)}),Cn)return(p.isValid||d.isValid)&&(t.mode==="onBlur"?tt&&x():tt||x()),Ns&&m.state.next({name:A,...Br?{}:Ur});if(!tt&&Br&&m.state.next({...n}),t.resolver){const{errors:zr}=await N([A]);if(V(Ve),K){const ca=dc(n.errors,r,A),sr=dc(zr,r,ca.name||A);Q=sr.error,A=sr.name,Oe=mt(zr)}}else b([A],!0),Q=(await ri(Z,i.disabled,o,h,t.shouldUseNativeValidation))[A],b([A]),V(Ve),K&&(Q?Oe=!1:(p.isValid||d.isValid)&&(Oe=await z(r,!0)));K&&(Z._f.deps&&ie(Z._f.deps),R(A,Oe,Q,Ur))}},Pe=(C,T)=>{if(W(n.errors,T)&&C.focus)return C.focus(),1},ie=async(C,T={})=>{let A,K;const Z=kt(C);if(t.resolver){const V=await F(Be(C)?C:Z);A=mt(V),K=C?!Z.some(Q=>W(V,Q)):A}else C?(K=(await Promise.all(Z.map(async V=>{const Q=W(r,V);return await z(Q&&Q._f?{[V]:Q}:Q)}))).every(Boolean),!(!K&&!n.isValid)&&x()):K=A=await z(r);return m.state.next({...!tn(C)||(p.isValid||d.isValid)&&A!==n.isValid?{}:{name:C},...t.resolver||!C?{isValid:A}:{},errors:n.errors}),T.shouldFocus&&!K&&hr(r,Pe,C?Z:i.mount),K},ne=C=>{const T={...a.mount?o:s};return Be(C)?T:tn(C)?W(T,C):C.map(A=>W(T,A))},J=(C,T)=>({invalid:!!W((T||n).errors,C),isDirty:!!W((T||n).dirtyFields,C),error:W((T||n).errors,C),isValidating:!!W(n.validatingFields,C),isTouched:!!W((T||n).touchedFields,C)}),le=C=>{C&&kt(C).forEach(T=>Qe(n.errors,T)),m.state.next({errors:C?n.errors:{}})},Re=(C,T,A)=>{const K=(W(r,C,{_f:{}})._f||{}).ref,Z=W(n.errors,C)||{},{ref:V,message:Q,type:Oe,...Ve}=Z;Ne(n.errors,C,{...Ve,...T,ref:K}),m.state.next({name:C,errors:n.errors,isValid:!1}),A&&A.shouldFocus&&K&&K.focus&&K.focus()},ce=(C,T)=>Ht(C)?m.state.subscribe({next:A=>C(q(void 0,T),A)}):q(C,T,!0),H=C=>m.state.subscribe({next:T=>{gv(C.name,T.name,C.exact)&&hv(T,C.formState||p,He,C.reRenderRoot)&&C.callback({values:{...o},...n,...T})}}).unsubscribe,ue=C=>(a.mount=!0,d={...d,...C.formState},H({...C,formState:d})),je=(C,T={})=>{for(const A of C?kt(C):i.mount)i.mount.delete(A),i.array.delete(A),T.keepValue||(Qe(r,A),Qe(o,A)),!T.keepError&&Qe(n.errors,A),!T.keepDirty&&Qe(n.dirtyFields,A),!T.keepTouched&&Qe(n.touchedFields,A),!T.keepIsValidating&&Qe(n.validatingFields,A),!t.shouldUnregister&&!T.keepDefaultValue&&Qe(s,A);m.state.next({values:Ze(o)}),m.state.next({...n,...T.keepDirty?{isDirty:B()}:{}}),!T.keepIsValid&&x()},ge=({disabled:C,name:T})=>{(Tt(C)&&a.mount||C||i.disabled.has(T))&&(C?i.disabled.add(T):i.disabled.delete(T))},ve=(C,T={})=>{let A=W(r,C);const K=Tt(T.disabled)||Tt(t.disabled);return Ne(r,C,{...A||{},_f:{...A&&A._f?A._f:{ref:{name:C}},name:C,mount:!0,...T}}),i.mount.add(C),A?ge({disabled:Tt(T.disabled)?T.disabled:t.disabled,name:C}):j(C,!0,T.value),{...K?{disabled:T.disabled||t.disabled}:{},...t.progressive?{required:!!T.required,min:Zr(T.min),max:Zr(T.max),minLength:Zr(T.minLength),maxLength:Zr(T.maxLength),pattern:Zr(T.pattern)}:{},name:C,onChange:ae,onBlur:ae,ref:Z=>{if(Z){ve(C,T),A=W(r,C);const V=Be(Z.value)&&Z.querySelectorAll&&Z.querySelectorAll("input,select,textarea")[0]||Z,Q=cv(V),Oe=A._f.refs||[];if(Q?Oe.find(Ve=>Ve===V):V===A._f.ref)return;Ne(r,C,{_f:{...A._f,...Q?{refs:[...Oe.filter(fa),V,...Array.isArray(W(s,C))?[{}]:[]],ref:{type:V.type,name:C}}:{ref:V}}}),j(C,!1,void 0,V)}else A=W(r,C,{}),A._f&&(A._f.mount=!1),(t.shouldUnregister||T.shouldUnregister)&&!(Qu(i.array,C)&&a.action)&&i.unMount.add(C)}}},he=()=>t.shouldFocusError&&hr(r,Pe,i.mount),Ke=C=>{Tt(C)&&(m.state.next({disabled:C}),hr(r,(T,A)=>{const K=W(r,A);K&&(T.disabled=K._f.disabled||C,Array.isArray(K._f.refs)&&K._f.refs.forEach(Z=>{Z.disabled=K._f.disabled||C}))},0,!1))},qe=(C,T)=>async A=>{let K;A&&(A.preventDefault&&A.preventDefault(),A.persist&&A.persist());let Z=Ze(o);if(m.state.next({isSubmitting:!0}),t.resolver){const{errors:V,values:Q}=await N();n.errors=V,Z=Q}else await z(r);if(i.disabled.size)for(const V of i.disabled)Ne(Z,V,void 0);if(Qe(n.errors,"root"),mt(n.errors)){m.state.next({errors:{}});try{await C(Z,A)}catch(V){K=V}}else T&&await T({...n.errors},A),he(),setTimeout(he);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:mt(n.errors)&&!K,submitCount:n.submitCount+1,errors:n.errors}),K)throw K},xt=(C,T={})=>{W(r,C)&&(Be(T.defaultValue)?P(C,Ze(W(s,C))):(P(C,T.defaultValue),Ne(s,C,Ze(T.defaultValue))),T.keepTouched||Qe(n.touchedFields,C),T.keepDirty||(Qe(n.dirtyFields,C),n.isDirty=T.defaultValue?B(C,Ze(W(s,C))):B()),T.keepError||(Qe(n.errors,C),p.isValid&&x()),m.state.next({...n}))},Et=(C,T={})=>{const A=C?Ze(C):s,K=Ze(A),Z=mt(C),V=Z?s:K;if(T.keepDefaultValues||(s=A),!T.keepValues){if(T.keepDirtyValues){const Q=new Set([...i.mount,...Object.keys(Wr(s,o))]);for(const Oe of Array.from(Q))W(n.dirtyFields,Oe)?Ne(V,Oe,W(o,Oe)):P(Oe,W(V,Oe))}else{if(Vi&&Be(C))for(const Q of i.mount){const Oe=W(r,Q);if(Oe&&Oe._f){const Ve=Array.isArray(Oe._f.refs)?Oe._f.refs[0]:Oe._f.ref;if(io(Ve)){const tt=Ve.closest("form");if(tt){tt.reset();break}}}}for(const Q of i.mount)P(Q,W(V,Q))}o=Ze(V),m.array.next({values:{...V}}),m.state.next({values:{...V}})}i={mount:T.keepDirtyValues?i.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!p.isValid||!!T.keepIsValid||!!T.keepDirtyValues,a.watch=!!t.shouldUnregister,m.state.next({submitCount:T.keepSubmitCount?n.submitCount:0,isDirty:Z?!1:T.keepDirty?n.isDirty:!!(T.keepDefaultValues&&!Tn(C,s)),isSubmitted:T.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Z?{}:T.keepDirtyValues?T.keepDefaultValues&&o?Wr(s,o):n.dirtyFields:T.keepDefaultValues&&C?Wr(s,C):T.keepDirty?n.dirtyFields:{},touchedFields:T.keepTouched?n.touchedFields:{},errors:T.keepErrors?n.errors:{},isSubmitSuccessful:T.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},ut=(C,T)=>Et(Ht(C)?C(o):C,T),Mt=(C,T={})=>{const A=W(r,C),K=A&&A._f;if(K){const Z=K.refs?K.refs[0]:K.ref;Z.focus&&(Z.focus(),T.shouldSelect&&Ht(Z.select)&&Z.select())}},He=C=>{n={...n,...C}},rr={control:{register:ve,unregister:je,getFieldState:J,handleSubmit:qe,setError:Re,_subscribe:H,_runSchema:N,_getWatch:q,_getDirty:B,_setValid:x,_setFieldArray:S,_setDisabledField:ge,_setErrors:_,_getFieldArray:L,_reset:Et,_resetDefaultValues:()=>Ht(t.defaultValues)&&t.defaultValues().then(C=>{ut(C,t.resetOptions),m.state.next({isLoading:!1})}),_removeUnmounted:M,_disableForm:Ke,_subjects:m,_proxyFormState:p,get _fields(){return r},get _formValues(){return o},get _state(){return a},set _state(C){a=C},get _defaultValues(){return s},get _names(){return i},set _names(C){i=C},get _formState(){return n},get _options(){return t},set _options(C){t={...t,...C}}},subscribe:ue,trigger:ie,register:ve,handleSubmit:qe,watch:ce,setValue:P,getValues:ne,reset:ut,resetField:xt,clearErrors:le,unregister:je,setError:Re,setFocus:Mt,getFieldState:J};return{...rr,formControl:rr}}var jn=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(Math.random()*16+e)%16|0;return(t=="x"?n:n&3|8).toString(16)})},pa=(e,t,n={})=>n.shouldFocus||Be(n.shouldFocus)?n.focusName||`${e}.${Be(n.focusIndex)?t:n.focusIndex}.`:"",ma=(e,t)=>[...e,...kt(t)],ha=e=>Array.isArray(e)?e.map(()=>{}):void 0;function ga(e,t,n){return[...e.slice(0,t),...kt(n),...e.slice(t)]}var va=(e,t,n)=>Array.isArray(e)?(Be(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],ya=(e,t)=>[...kt(t),...kt(e)];function wv(e,t){let n=0;const r=[...e];for(const s of t)r.splice(s-n,1),n++;return Cs(r).length?r:[]}var ba=(e,t)=>Be(t)?[]:wv(e,kt(t).sort((n,r)=>n-r)),xa=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},pc=(e,t,n)=>(e[t]=n,e);function Ui(e){const t=Pt(),{control:n=t.control,name:r,keyName:s="id",shouldUnregister:o,rules:a}=e,[i,l]=O.useState(n._getFieldArray(r)),u=O.useRef(n._getFieldArray(r).map(jn)),p=O.useRef(i),d=O.useRef(r),m=O.useRef(!1);d.current=r,p.current=i,n._names.array.add(r),a&&n.register(r,a),O.useEffect(()=>n._subjects.array.subscribe({next:({values:j,name:k})=>{if(k===d.current||!k){const R=W(j,d.current);Array.isArray(R)&&(l(R),u.current=R.map(jn))}}}).unsubscribe,[n]);const v=O.useCallback(j=>{m.current=!0,n._setFieldArray(r,j)},[n,r]),y=(j,k)=>{const R=kt(Ze(j)),N=ma(n._getFieldArray(r),R);n._names.focus=pa(r,N.length-1,k),u.current=ma(u.current,R.map(jn)),v(N),l(N),n._setFieldArray(r,N,ma,{argA:ha(j)})},h=(j,k)=>{const R=kt(Ze(j)),N=ya(n._getFieldArray(r),R);n._names.focus=pa(r,0,k),u.current=ya(u.current,R.map(jn)),v(N),l(N),n._setFieldArray(r,N,ya,{argA:ha(j)})},g=j=>{const k=ba(n._getFieldArray(r),j);u.current=ba(u.current,j),v(k),l(k),!Array.isArray(W(n._fields,r))&&Ne(n._fields,r,void 0),n._setFieldArray(r,k,ba,{argA:j})},x=(j,k,R)=>{const N=kt(Ze(k)),F=ga(n._getFieldArray(r),j,N);n._names.focus=pa(r,j,R),u.current=ga(u.current,j,N.map(jn)),v(F),l(F),n._setFieldArray(r,F,ga,{argA:j,argB:ha(k)})},b=(j,k)=>{const R=n._getFieldArray(r);xa(R,j,k),xa(u.current,j,k),v(R),l(R),n._setFieldArray(r,R,xa,{argA:j,argB:k},!1)},S=(j,k)=>{const R=n._getFieldArray(r);va(R,j,k),va(u.current,j,k),v(R),l(R),n._setFieldArray(r,R,va,{argA:j,argB:k},!1)},E=(j,k)=>{const R=Ze(k),N=pc(n._getFieldArray(r),j,R);u.current=[...N].map((F,z)=>!F||z===j?jn():u.current[z]),v(N),l([...N]),n._setFieldArray(r,N,pc,{argA:j,argB:R},!0,!1)},_=j=>{const k=kt(Ze(j));u.current=k.map(jn),v([...k]),l([...k]),n._setFieldArray(r,[...k],R=>R,{},!0,!1)};return O.useEffect(()=>{if(n._state.action=!1,ni(r,n._names)&&n._subjects.state.next({...n._formState}),m.current&&(!fr(n._options.mode).isOnSubmit||n._formState.isSubmitted)&&!fr(n._options.reValidateMode).isOnSubmit)if(n._options.resolver)n._runSchema([r]).then(j=>{const k=W(j.errors,r),R=W(n._formState.errors,r);(R?!k&&R.type||k&&(R.type!==k.type||R.message!==k.message):k&&k.type)&&(k?Ne(n._formState.errors,r,k):Qe(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const j=W(n._fields,r);j&&j._f&&!(fr(n._options.reValidateMode).isOnSubmit&&fr(n._options.mode).isOnSubmit)&&ri(j,n._names.disabled,n._formValues,n._options.criteriaMode===Ft.all,n._options.shouldUseNativeValidation,!0).then(k=>!mt(k)&&n._subjects.state.next({errors:dd(n._formState.errors,k,r)}))}n._subjects.state.next({name:r,values:Ze(n._formValues)}),n._names.focus&&hr(n._fields,(j,k)=>{if(n._names.focus&&k.startsWith(n._names.focus)&&j.focus)return j.focus(),1}),n._names.focus="",n._setValid(),m.current=!1},[i,r,n]),O.useEffect(()=>(!W(n._formValues,r)&&n._setFieldArray(r),()=>{const j=(k,R)=>{const N=W(n._fields,k);N&&N._f&&(N._f.mount=R)};n._options.shouldUnregister||o?n.unregister(r):j(r,!1)}),[r,n,s,o]),{swap:O.useCallback(b,[v,r,n]),move:O.useCallback(S,[v,r,n]),prepend:O.useCallback(h,[v,r,n]),append:O.useCallback(y,[v,r,n]),remove:O.useCallback(g,[v,r,n]),insert:O.useCallback(x,[v,r,n]),update:O.useCallback(E,[v,r,n]),replace:O.useCallback(_,[v,r,n]),fields:O.useMemo(()=>i.map((j,k)=>({...j,[s]:u.current[k]||jn()})),[i,s])}}function _v(e={}){const t=O.useRef(void 0),n=O.useRef(void 0),[r,s]=O.useState({isDirty:!1,isValidating:!1,isLoading:Ht(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Ht(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...e.formControl?e.formControl:xv(e),formState:r},e.formControl&&e.defaultValues&&!Ht(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions));const o=t.current.control;return o._options=e,O.useLayoutEffect(()=>o._subscribe({formState:o._proxyFormState,callback:()=>s({...o._formState}),reRenderRoot:!0}),[o]),O.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),O.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==r.isDirty&&o._subjects.state.next({isDirty:a})}},[o,r.isDirty]),O.useEffect(()=>{e.values&&!Tn(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,s(a=>({...a}))):o._resetDefaultValues()},[e.values,o]),O.useEffect(()=>{e.errors&&!mt(e.errors)&&o._setErrors(e.errors)},[e.errors,o]),O.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),O.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=nd(r,o),t.current}const Sv=({children:e,form:t,as:n="form",id:r,...s})=>(f.useEffect(()=>{window.__WP_RHF_FORMS__={...window.__WP_RHF_FORMS__,[r]:t}},[t,r]),c.jsx(av,{...t,children:c.jsx(n,{...s,id:r,children:e})}));function $e(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function Xe(e){return function t(n){return arguments.length===0||$e(n)?t:e.apply(this,arguments)}}function Ue(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return $e(n)?t:Xe(function(s){return e(n,s)});default:return $e(n)&&$e(r)?t:$e(n)?Xe(function(s){return e(s,r)}):$e(r)?Xe(function(s){return e(n,s)}):e(n,r)}}}function No(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(n){return t.apply(this,arguments)};case 2:return function(n,r){return t.apply(this,arguments)};case 3:return function(n,r,s){return t.apply(this,arguments)};case 4:return function(n,r,s,o){return t.apply(this,arguments)};case 5:return function(n,r,s,o,a){return t.apply(this,arguments)};case 6:return function(n,r,s,o,a,i){return t.apply(this,arguments)};case 7:return function(n,r,s,o,a,i,l){return t.apply(this,arguments)};case 8:return function(n,r,s,o,a,i,l,u){return t.apply(this,arguments)};case 9:return function(n,r,s,o,a,i,l,u,p){return t.apply(this,arguments)};case 10:return function(n,r,s,o,a,i,l,u,p,d){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function fd(e,t,n){return function(){for(var r=[],s=0,o=e,a=0,i=!1;a<t.length||s<arguments.length;){var l;a<t.length&&(!$e(t[a])||s>=arguments.length)?l=t[a]:(l=arguments[s],s+=1),r[a]=l,$e(l)?i=!0:o-=1,a+=1}return!i&&o<=0?n.apply(this,r):No(Math.max(0,o),fd(e,r,n))}}var zi=Ue(function(t,n){return t===1?Xe(n):No(t,fd(t,[],n))});function nr(e){return function t(n,r,s){switch(arguments.length){case 0:return t;case 1:return $e(n)?t:Ue(function(o,a){return e(n,o,a)});case 2:return $e(n)&&$e(r)?t:$e(n)?Ue(function(o,a){return e(o,r,a)}):$e(r)?Ue(function(o,a){return e(n,o,a)}):Xe(function(o){return e(n,r,o)});default:return $e(n)&&$e(r)&&$e(s)?t:$e(n)&&$e(r)?Ue(function(o,a){return e(o,a,s)}):$e(n)&&$e(s)?Ue(function(o,a){return e(o,r,a)}):$e(r)&&$e(s)?Ue(function(o,a){return e(n,o,a)}):$e(n)?Xe(function(o){return e(o,r,s)}):$e(r)?Xe(function(o){return e(n,o,s)}):$e(s)?Xe(function(o){return e(n,r,o)}):e(n,r,s)}}}const _r=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function Cv(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function Hi(e,t,n){return function(){if(arguments.length===0)return n();var r=arguments[arguments.length-1];if(!_r(r)){for(var s=0;s<e.length;){if(typeof r[e[s]]=="function")return r[e[s]].apply(r,Array.prototype.slice.call(arguments,0,-1));s+=1}if(Cv(r)){var o=t.apply(null,Array.prototype.slice.call(arguments,0,-1));return o(r)}}return n.apply(this,arguments)}}const Sr={init:function(){return this.xf["@@transducer/init"]()},result:function(e){return this.xf["@@transducer/result"](e)}};function mc(e){for(var t=[],n;!(n=e.next()).done;)t.push(n.value);return t}function hc(e,t,n){for(var r=0,s=n.length;r<s;){if(e(t,n[r]))return!0;r+=1}return!1}function kv(e){var t=String(e).match(/^function (\w*)/);return t==null?"":t[1]}function Cr(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function jv(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}const wa=typeof Object.is=="function"?Object.is:jv;var gc=Object.prototype.toString,Ev=function(){return gc.call(arguments)==="[object Arguments]"?function(t){return gc.call(t)==="[object Arguments]"}:function(t){return Cr("callee",t)}}(),Rv=!{toString:null}.propertyIsEnumerable("toString"),vc=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],yc=function(){return arguments.propertyIsEnumerable("length")}(),Tv=function(t,n){for(var r=0;r<t.length;){if(t[r]===n)return!0;r+=1}return!1},kr=Xe(typeof Object.keys=="function"&&!yc?function(t){return Object(t)!==t?[]:Object.keys(t)}:function(t){if(Object(t)!==t)return[];var n,r,s=[],o=yc&&Ev(t);for(n in t)Cr(n,t)&&(!o||n!=="length")&&(s[s.length]=n);if(Rv)for(r=vc.length-1;r>=0;)n=vc[r],Cr(n,t)&&!Tv(s,n)&&(s[s.length]=n),r-=1;return s}),bc=Xe(function(t){return t===null?"Null":t===void 0?"Undefined":Object.prototype.toString.call(t).slice(8,-1)});function xc(e,t,n,r){var s=mc(e),o=mc(t);function a(i,l){return Wi(i,l,n.slice(),r.slice())}return!hc(function(i,l){return!hc(a,l,i)},o,s)}function Wi(e,t,n,r){if(wa(e,t))return!0;var s=bc(e);if(s!==bc(t))return!1;if(typeof e["fantasy-land/equals"]=="function"||typeof t["fantasy-land/equals"]=="function")return typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](t)&&typeof t["fantasy-land/equals"]=="function"&&t["fantasy-land/equals"](e);if(typeof e.equals=="function"||typeof t.equals=="function")return typeof e.equals=="function"&&e.equals(t)&&typeof t.equals=="function"&&t.equals(e);switch(s){case"Arguments":case"Array":case"Object":if(typeof e.constructor=="function"&&kv(e.constructor)==="Promise")return e===t;break;case"Boolean":case"Number":case"String":if(!(typeof e==typeof t&&wa(e.valueOf(),t.valueOf())))return!1;break;case"Date":if(!wa(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(!(e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.sticky===t.sticky&&e.unicode===t.unicode))return!1;break}for(var o=n.length-1;o>=0;){if(n[o]===e)return r[o]===t;o-=1}switch(s){case"Map":return e.size!==t.size?!1:xc(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:xc(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var a=kr(e);if(a.length!==kr(t).length)return!1;var i=n.concat([e]),l=r.concat([t]);for(o=a.length-1;o>=0;){var u=a[o];if(!(Cr(u,t)&&Wi(t[u],e[u],i,l)))return!1;o-=1}return!0}var Ov=Ue(function(t,n){return Wi(t,n,[],[])});function Av(e,t,n){var r,s;if(typeof e.indexOf=="function")switch(typeof t){case"number":if(t===0){for(r=1/t;n<e.length;){if(s=e[n],s===0&&1/s===r)return n;n+=1}return-1}else if(t!==t){for(;n<e.length;){if(s=e[n],typeof s=="number"&&s!==s)return n;n+=1}return-1}return e.indexOf(t,n);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,n);case"object":if(t===null)return e.indexOf(t,n)}for(;n<e.length;){if(Ov(e[n],t))return n;n+=1}return-1}function si(e,t){return Av(t,e,0)>=0}function Ks(e,t){for(var n=0,r=t.length,s=Array(r);n<r;)s[n]=e(t[n]),n+=1;return s}function _a(e){var t=e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+t.replace(/"/g,'\\"')+'"'}var Gr=function(t){return(t<10?"0":"")+t},Iv=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+Gr(t.getUTCMonth()+1)+"-"+Gr(t.getUTCDate())+"T"+Gr(t.getUTCHours())+":"+Gr(t.getUTCMinutes())+":"+Gr(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function Nv(e){return function(){return!e.apply(this,arguments)}}function pd(e,t,n){for(var r=0,s=n.length;r<s;)t=e(t,n[r]),r+=1;return t}function Pv(e,t){for(var n=0,r=t.length,s=[];n<r;)e(t[n])&&(s[s.length]=t[n]),n+=1;return s}function Mv(e){return Object.prototype.toString.call(e)==="[object Object]"}var Dv=function(){function e(t,n){this.xf=n,this.f=t}return e.prototype["@@transducer/init"]=Sr.init,e.prototype["@@transducer/result"]=Sr.result,e.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):t},e}();function Fv(e){return function(t){return new Dv(e,t)}}var Vv=Ue(Hi(["fantasy-land/filter","filter"],Fv,function(e,t){return Mv(t)?pd(function(n,r){return e(t[r])&&(n[r]=t[r]),n},{},kr(t)):Pv(e,t)})),Lv=Ue(function(t,n){return Vv(Nv(t),n)});function md(e,t){var n=function(a){var i=t.concat([e]);return si(a,i)?"<Circular>":md(a,i)},r=function(o,a){return Ks(function(i){return _a(i)+": "+n(o[i])},a.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+Ks(n,e).join(", ")+"))";case"[object Array]":return"["+Ks(n,e).concat(r(e,Lv(function(o){return/^\d+$/.test(o)},kr(e)))).join(", ")+"]";case"[object Boolean]":return typeof e=="object"?"new Boolean("+n(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?n(NaN):_a(Iv(e)))+")";case"[object Map]":return"new Map("+n(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return typeof e=="object"?"new Number("+n(e.valueOf())+")":1/e===-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+n(Array.from(e).sort())+")";case"[object String]":return typeof e=="object"?"new String("+n(e.valueOf())+")":_a(e);case"[object Undefined]":return"undefined";default:if(typeof e.toString=="function"){var s=e.toString();if(s!=="[object Object]")return s}return"{"+r(e,kr(e)).join(", ")+"}"}}var gr=Xe(function(t){return md(t,[])}),$v=Ue(function(t,n){if(t===n)return n;function r(l,u){if(l>u!=u>l)return u>l?u:l}var s=r(t,n);if(s!==void 0)return s;var o=r(typeof t,typeof n);if(o!==void 0)return o===typeof t?t:n;var a=gr(t),i=r(a,gr(n));return i!==void 0&&i===a?t:n}),Bv=function(){function e(t,n){this.xf=n,this.f=t}return e.prototype["@@transducer/init"]=Sr.init,e.prototype["@@transducer/result"]=Sr.result,e.prototype["@@transducer/step"]=function(t,n){return this.xf["@@transducer/step"](t,this.f(n))},e}(),Uv=function(t){return function(n){return new Bv(t,n)}},Zi=Ue(Hi(["fantasy-land/map","map"],Uv,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return zi(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return pd(function(r,s){return r[s]=t(n[s]),r},{},kr(n));default:return Ks(t,n)}}));const Po=Number.isInteger||function(t){return t<<0===t};function uo(e){return Object.prototype.toString.call(e)==="[object String]"}function Gi(e,t){var n=e<0?t.length+e:e;return uo(t)?t.charAt(n):t[n]}var qi=Ue(function(t,n){if(n!=null)return Po(t)?Gi(t,n):n[t]}),zv=Ue(function(t,n){return Zi(qi(t),n)}),Hv=Xe(function(t){return _r(t)?!0:!t||typeof t!="object"||uo(t)?!1:t.length===0?!0:t.length>0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1}),wc=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function Wv(e,t,n){return function(s,o,a){if(Hv(a))return e(s,o,a);if(a==null)return o;if(typeof a["fantasy-land/reduce"]=="function")return t(s,o,a,"fantasy-land/reduce");if(a[wc]!=null)return n(s,o,a[wc]());if(typeof a.next=="function")return n(s,o,a);if(typeof a.reduce=="function")return t(s,o,a,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function Zv(e,t,n){for(var r=0,s=n.length;r<s;){if(t=e["@@transducer/step"](t,n[r]),t&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}var Gv=Ue(function(t,n){return No(t.length,function(){return t.apply(n,arguments)})});function qv(e,t,n){for(var r=n.next();!r.done;){if(t=e["@@transducer/step"](t,r.value),t&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function Yv(e,t,n,r){return e["@@transducer/result"](n[r](Gv(e["@@transducer/step"],e),t))}var Kv=Wv(Zv,Yv,qv),Xv=function(){function e(t){this.f=t}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(t){return t},e.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},e}();function Jv(e){return new Xv(e)}var hd=nr(function(e,t,n){return Kv(typeof e=="function"?Jv(e):e,t,n)}),Qv=Xe(function(t){return zi(hd($v,0,zv("length",t)),function(){for(var n=0,r=t.length;n<r;){if(!t[n].apply(this,arguments))return!1;n+=1}return!0})});function ey(e,t,n){if(Po(e)&&_r(n)){var r=[].concat(n);return r[e]=t,r}var s={};for(var o in n)s[o]=n[o];return s[e]=t,s}var oi=Xe(function(t){return t==null}),Xs=nr(function e(t,n,r){if(t.length===0)return n;var s=t[0];if(t.length>1){var o=!oi(r)&&Cr(s,r)&&typeof r[s]=="object"?r[s]:Po(t[1])?[]:{};n=e(Array.prototype.slice.call(t,1),n,o)}return ey(s,n,r)});function _c(e){var t=Object.prototype.toString.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"}function ty(e){return new RegExp(e.source,e.flags?e.flags:(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":"")+(e.dotAll?"s":""))}function ny(e,t){return function(){return t.call(this,e.apply(this,arguments))}}function gd(e,t){return function(){var n=arguments.length;if(n===0)return t();var r=arguments[n-1];return _r(r)||typeof r[e]!="function"?t.apply(this,arguments):r[e].apply(r,Array.prototype.slice.call(arguments,0,n-1))}}var ry=nr(gd("slice",function(t,n,r){return Array.prototype.slice.call(r,t,n)})),sy=Xe(gd("tail",ry(1,1/0)));function vd(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return No(arguments[0].length,hd(ny,arguments[0],sy(arguments)))}function oy(e){return e}var yd=Xe(oy),ay=Ue(function(t,n){if(_r(t)){if(_r(n))return t.concat(n);throw new TypeError(gr(n)+" is not an array")}if(uo(t)){if(uo(n))return t+n;throw new TypeError(gr(n)+" is not a string")}if(t!=null&&_c(t["fantasy-land/concat"]))return t["fantasy-land/concat"](n);if(t!=null&&_c(t.concat))return t.concat(n);throw new TypeError(gr(t)+' does not have a method named "concat" or "fantasy-land/concat"')}),iy=Ue(function(t,n){return n==null||n!==n?t:n}),bd=function(){function e(){this._nativeSet=typeof Set=="function"?new Set:null,this._items={}}return e.prototype.add=function(t){return!Sc(t,!0,this)},e.prototype.has=function(t){return Sc(t,!1,this)},e}();function Sc(e,t,n){var r=typeof e,s,o;switch(r){case"string":case"number":return e===0&&1/e===-1/0?n._items["-0"]?!0:(t&&(n._items["-0"]=!0),!1):n._nativeSet!==null?t?(s=n._nativeSet.size,n._nativeSet.add(e),o=n._nativeSet.size,o===s):n._nativeSet.has(e):r in n._items?e in n._items[r]?!0:(t&&(n._items[r][e]=!0),!1):(t&&(n._items[r]={},n._items[r][e]=!0),!1);case"boolean":if(r in n._items){var a=e?1:0;return n._items[r][a]?!0:(t&&(n._items[r][a]=!0),!1)}else return t&&(n._items[r]=e?[!1,!0]:[!0,!1]),!1;case"function":return n._nativeSet!==null?t?(s=n._nativeSet.size,n._nativeSet.add(e),o=n._nativeSet.size,o===s):n._nativeSet.has(e):r in n._items?si(e,n._items[r])?!0:(t&&n._items[r].push(e),!1):(t&&(n._items[r]=[e]),!1);case"undefined":return n._items[r]?!0:(t&&(n._items[r]=!0),!1);case"object":if(e===null)return n._items.null?!0:(t&&(n._items.null=!0),!1);default:return r=Object.prototype.toString.call(e),r in n._items?si(e,n._items[r])?!0:(t&&n._items[r].push(e),!1):(t&&(n._items[r]=[e]),!1)}}var Cc=Xe(function(e){return Gi(-1,e)}),ly=Ue(function(t,n){if(t.length===0||oi(n))return!1;for(var r=n,s=0;s<t.length;)if(!oi(r)&&Cr(t[s],r))r=r[t[s]],s+=1;else return!1;return!0}),kc=Ue(function(t,n){return ly([t],n)}),cy=nr(function(t,n,r){return zi(Math.max(t.length,n.length,r.length),function(){return t.apply(this,arguments)?n.apply(this,arguments):r.apply(this,arguments)})}),uy=function(){function e(t,n){this.xf=n,this.f=t,this.set=new bd}return e.prototype["@@transducer/init"]=Sr.init,e.prototype["@@transducer/result"]=Sr.result,e.prototype["@@transducer/step"]=function(t,n){return this.set.add(this.f(n))?this.xf["@@transducer/step"](t,n):t},e}();function dy(e){return function(t){return new uy(e,t)}}var fy=Ue(Hi([],dy,function(e,t){for(var n=new bd,r=[],s=0,o,a;s<t.length;)a=t[s],o=e(a),n.add(o)&&r.push(a),s+=1;return r})),py=fy(yd),my=Ue(function(t,n){var r={};return r[t]=n,r}),hy=Ue(function(t,n){return n instanceof t||n!=null&&(n.constructor===t||t.name==="Object"&&typeof n=="object")}),gy=Ue(function(t,n){return function(r){return function(s){return Zi(function(o){return n(o,s)},r(t(s)))}}});function Yi(e,t){for(var n=t,r=0;r<e.length;r+=1){if(n==null)return;var s=e[r];Po(s)?n=Gi(s,n):n=n[s]}return n}var vy=Xe(function(t){return gy(function(n){return Yi(t,n)},Xs(t))}),xd=function(e){return{value:e,map:function(t){return xd(t(e))}}},yy=nr(function(t,n,r){return t(function(s){return xd(n(s))})(r).value}),by=Ue(Yi),Js=nr(function(t,n,r){return iy(t,Yi(n,r))}),jc=nr(function(t,n,r){return hy(t,qi(n,r))});function xy(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var wy=Ue(function(t,n){if(!xy(t))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+gr(t));return ty(t).test(n)}),qr=`
\v\f\r \u2028\u2029\uFEFF`,_y="",Sy=typeof String.prototype.trim=="function",Cy=Xe(!Sy||qr.trim()||!_y.trim()?function(t){var n=new RegExp("^["+qr+"]["+qr+"]*"),r=new RegExp("["+qr+"]["+qr+"]*$");return t.replace(n,"").replace(r,"")}:function(t){return t.trim()});const wd=/^\d{9,11}:[a-z0-9_-]{35}$/i,Ki=/^[a-z][a-z0-9_]{3,30}[a-z0-9]$/i,_d=/^(?<chat_id>@?[a-z][a-z0-9_]{3,30}[a-z0-9]|-?[1-9][0-9]{6,20})(?::(?<thread_id>[0-9]+))?(?:\s*\|\s*(?<note>.*))?$/i,ky=/^(?<chat_id>-?[1-9][0-9]{6,20})(?::(?<thread_id>[0-9]+))?(?:\s*\|\s*(?<note>.*))?$/i,Sd="form/error",jy=Qv([kc("message"),kc("type"),jc(String,"message"),jc(String,"type")]),Cd=(e,t)=>jy(t)&&t&&typeof t=="object"&&"message"in t?[...e,t.message]:typeof t=="object"&&t?Object.values(t).reduce(Cd,e):e,Ey=e=>{const t=Object.values(e||{}).reduce(Cd,[]);return py(t)},Ec=(e,t)=>{var s;if(document.getElementById(e))return;const n=document.getElementsByTagName("script")[0],r=document.createElement("script");r.id=e,r.setAttribute("src",t),(s=n==null?void 0:n.parentNode)==null||s.insertBefore(r,n)},fo=e=>e.split(/[[\].]+/).filter(Boolean),Ry=e=>by(fo(e)),Ee=(e,t)=>t?`${t}.${e}`:e,Rc=e=>(Ki.test(e)?`@${e}`:e).trim(),kd=e=>{var t;return{chat_id:"",thread_id:"",note:"",...(t=e.match(_d))==null?void 0:t.groups}},jd=e=>{const{errors:t}=Io({name:e});return Ry(e)(t)},Tc=(e,t,n)=>{if(e&&"reportValidity"in e){const r=W(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Ed=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Tc(r.ref,n,e):r&&r.refs&&r.refs.forEach(s=>Tc(s,n,e))}},Ty=(e,t)=>{t.shouldUseNativeValidation&&Ed(e,t);const n={};for(const r in e){const s=W(t.fields,r),o=Object.assign(e[r]||{},{ref:s&&s.ref});if(Oy(t.names||Object.keys(e),r)){const a=Object.assign({},W(n,r));Ne(a,"root",o),Ne(n,r,a)}else Ne(n,r,o)}return n},Oy=(e,t)=>{const n=Oc(t);return e.some(r=>Oc(r).match(`^${n}\\.\\d+`))};function Oc(e){return e.replace(/\]|\[/g,"")}function Ay(e,t){for(var n={};e.length;){var r=e[0],s=r.code,o=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var i=r.unionErrors[0].errors[0];n[a]={message:i.message,type:i.code}}else n[a]={message:o,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(p){return p.errors.forEach(function(d){return e.push(d)})}),t){var l=n[a].types,u=l&&l[r.code];n[a]=sd(a,t,n,s,u?[].concat(u,r.message):r.message)}e.shift()}return n}function Iy(e,t,n){return n===void 0&&(n={}),function(r,s,o){try{return Promise.resolve(function(a,i){try{var l=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return o.shouldUseNativeValidation&&Ed({},o),{errors:{},values:n.raw?Object.assign({},r):u}})}catch(u){return i(u)}return l&&l.then?l.then(void 0,i):l}(0,function(a){if(function(i){return Array.isArray(i==null?void 0:i.errors)}(a))return{values:{},errors:Ty(Ay(a.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}}}function Rd(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Rd(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Td(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Rd(e))&&(r&&(r+=" "),r+=t);return r}const Xi="-",Ny=e=>{const t=My(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const i=a.split(Xi);return i[0]===""&&i.length!==1&&i.shift(),Od(i,t)||Py(a)},getConflictingClassGroupIds:(a,i)=>{const l=n[a]||[];return i&&r[a]?[...l,...r[a]]:l}}},Od=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Od(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(Xi);return(a=t.validators.find(({validator:i})=>i(o)))==null?void 0:a.classGroupId},Ac=/^\[(.+)\]$/,Py=e=>{if(Ac.test(e)){const t=Ac.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},My=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const s in n)ai(n[s],r,s,t);return r},ai=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:Ic(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(Dy(s)){ai(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,a])=>{ai(a,Ic(t,o),n,r)})})},Ic=(e,t)=>{let n=e;return t.split(Xi).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Dy=e=>e.isThemeGetter,Fy=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return s(o,a),a},set(o,a){n.has(o)?n.set(o,a):s(o,a)}}},ii="!",li=":",Vy=li.length,Ly=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=s=>{const o=[];let a=0,i=0,l=0,u;for(let y=0;y<s.length;y++){let h=s[y];if(a===0&&i===0){if(h===li){o.push(s.slice(l,y)),l=y+Vy;continue}if(h==="/"){u=y;continue}}h==="["?a++:h==="]"?a--:h==="("?i++:h===")"&&i--}const p=o.length===0?s:s.substring(l),d=$y(p),m=d!==p,v=u&&u>l?u-l:void 0;return{modifiers:o,hasImportantModifier:m,baseClassName:d,maybePostfixModifierPosition:v}};if(t){const s=t+li,o=r;r=a=>a.startsWith(s)?o(a.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const s=r;r=o=>n({className:o,parseClassName:s})}return r},$y=e=>e.endsWith(ii)?e.substring(0,e.length-1):e.startsWith(ii)?e.substring(1):e,By=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const s=[];let o=[];return r.forEach(a=>{a[0]==="["||t[a]?(s.push(...o.sort(),a),o=[]):o.push(a)}),s.push(...o.sort()),s}},Uy=e=>({cache:Fy(e.cacheSize),parseClassName:Ly(e),sortModifiers:By(e),...Ny(e)}),zy=/\s+/,Hy=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:o}=t,a=[],i=e.trim().split(zy);let l="";for(let u=i.length-1;u>=0;u-=1){const p=i[u],{isExternal:d,modifiers:m,hasImportantModifier:v,baseClassName:y,maybePostfixModifierPosition:h}=n(p);if(d){l=p+(l.length>0?" "+l:l);continue}let g=!!h,x=r(g?y.substring(0,h):y);if(!x){if(!g){l=p+(l.length>0?" "+l:l);continue}if(x=r(y),!x){l=p+(l.length>0?" "+l:l);continue}g=!1}const b=o(m).join(":"),S=v?b+ii:b,E=S+x;if(a.includes(E))continue;a.push(E);const _=s(x,g);for(let j=0;j<_.length;++j){const k=_[j];a.push(S+k)}l=p+(l.length>0?" "+l:l)}return l};function Wy(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ad(t))&&(r&&(r+=" "),r+=n);return r}const Ad=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ad(e[r]))&&(n&&(n+=" "),n+=t);return n};function Zy(e,...t){let n,r,s,o=a;function a(l){const u=t.reduce((p,d)=>d(p),e());return n=Uy(u),r=n.cache.get,s=n.cache.set,o=i,i(l)}function i(l){const u=r(l);if(u)return u;const p=Hy(l,n);return s(l,p),p}return function(){return o(Wy.apply(null,arguments))}}const nt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Id=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Nd=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Gy=/^\d+\/\d+$/,qy=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Yy=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ky=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Xy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Jy=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ar=e=>Gy.test(e),ke=e=>!!e&&!Number.isNaN(Number(e)),En=e=>!!e&&Number.isInteger(Number(e)),Sa=e=>e.endsWith("%")&&ke(e.slice(0,-1)),pn=e=>qy.test(e),Qy=()=>!0,eb=e=>Yy.test(e)&&!Ky.test(e),Pd=()=>!1,tb=e=>Xy.test(e),nb=e=>Jy.test(e),rb=e=>!ee(e)&&!te(e),sb=e=>Pr(e,Fd,Pd),ee=e=>Id.test(e),Wn=e=>Pr(e,Vd,eb),Ca=e=>Pr(e,cb,ke),Nc=e=>Pr(e,Md,Pd),ob=e=>Pr(e,Dd,nb),Fs=e=>Pr(e,Ld,tb),te=e=>Nd.test(e),Yr=e=>Mr(e,Vd),ab=e=>Mr(e,ub),Pc=e=>Mr(e,Md),ib=e=>Mr(e,Fd),lb=e=>Mr(e,Dd),Vs=e=>Mr(e,Ld,!0),Pr=(e,t,n)=>{const r=Id.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Mr=(e,t,n=!1)=>{const r=Nd.exec(e);return r?r[1]?t(r[1]):n:!1},Md=e=>e==="position"||e==="percentage",Dd=e=>e==="image"||e==="url",Fd=e=>e==="length"||e==="size"||e==="bg-size",Vd=e=>e==="length",cb=e=>e==="number",ub=e=>e==="family-name",Ld=e=>e==="shadow",db=()=>{const e=nt("color"),t=nt("font"),n=nt("text"),r=nt("font-weight"),s=nt("tracking"),o=nt("leading"),a=nt("breakpoint"),i=nt("container"),l=nt("spacing"),u=nt("radius"),p=nt("shadow"),d=nt("inset-shadow"),m=nt("text-shadow"),v=nt("drop-shadow"),y=nt("blur"),h=nt("perspective"),g=nt("aspect"),x=nt("ease"),b=nt("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...E(),te,ee],j=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],R=()=>[te,ee,l],N=()=>[ar,"full","auto",...R()],F=()=>[En,"none","subgrid",te,ee],z=()=>["auto",{span:["full",En,te,ee]},En,te,ee],M=()=>[En,"auto",te,ee],B=()=>["auto","min","max","fr",te,ee],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...R()],U=()=>[ar,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],P=()=>[e,te,ee],ae=()=>[...E(),Pc,Nc,{position:[te,ee]}],Pe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ie=()=>["auto","cover","contain",ib,sb,{size:[te,ee]}],ne=()=>[Sa,Yr,Wn],J=()=>["","none","full",u,te,ee],le=()=>["",ke,Yr,Wn],Re=()=>["solid","dashed","dotted","double"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>[ke,Sa,Pc,Nc],ue=()=>["","none",y,te,ee],je=()=>["none",ke,te,ee],ge=()=>["none",ke,te,ee],ve=()=>[ke,te,ee],he=()=>[ar,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pn],breakpoint:[pn],color:[Qy],container:[pn],"drop-shadow":[pn],ease:["in","out","in-out"],font:[rb],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pn],shadow:[pn],spacing:["px",ke],text:[pn],"text-shadow":[pn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ar,ee,te,g]}],container:["container"],columns:[{columns:[ke,ee,te,i]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[En,"auto",te,ee]}],basis:[{basis:[ar,"full","auto",i,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,ar,"auto","initial","none",ee]}],grow:[{grow:["",ke,te,ee]}],shrink:[{shrink:["",ke,te,ee]}],order:[{order:[En,"first","last","none",te,ee]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[i,"screen",...U()]}],"min-w":[{"min-w":[i,"screen","none",...U()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...U()]}],h:[{h:["screen",...U()]}],"min-h":[{"min-h":["screen","none",...U()]}],"max-h":[{"max-h":["screen",...U()]}],"font-size":[{text:["base",n,Yr,Wn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,te,Ca]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Sa,ee]}],"font-family":[{font:[ab,ee,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,te,ee]}],"line-clamp":[{"line-clamp":[ke,"none",te,Ca]}],leading:[{leading:[o,...R()]}],"list-image":[{"list-image":["none",te,ee]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",te,ee]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Re(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",te,Wn]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[ke,"auto",te,ee]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",te,ee]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",te,ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ae()}],"bg-repeat":[{bg:Pe()}],"bg-size":[{bg:ie()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},En,te,ee],radial:["",te,ee],conic:[En,te,ee]},lb,ob]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:J()}],"rounded-s":[{"rounded-s":J()}],"rounded-e":[{"rounded-e":J()}],"rounded-t":[{"rounded-t":J()}],"rounded-r":[{"rounded-r":J()}],"rounded-b":[{"rounded-b":J()}],"rounded-l":[{"rounded-l":J()}],"rounded-ss":[{"rounded-ss":J()}],"rounded-se":[{"rounded-se":J()}],"rounded-ee":[{"rounded-ee":J()}],"rounded-es":[{"rounded-es":J()}],"rounded-tl":[{"rounded-tl":J()}],"rounded-tr":[{"rounded-tr":J()}],"rounded-br":[{"rounded-br":J()}],"rounded-bl":[{"rounded-bl":J()}],"border-w":[{border:le()}],"border-w-x":[{"border-x":le()}],"border-w-y":[{"border-y":le()}],"border-w-s":[{"border-s":le()}],"border-w-e":[{"border-e":le()}],"border-w-t":[{"border-t":le()}],"border-w-r":[{"border-r":le()}],"border-w-b":[{"border-b":le()}],"border-w-l":[{"border-l":le()}],"divide-x":[{"divide-x":le()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":le()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Re(),"hidden","none"]}],"divide-style":[{divide:[...Re(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...Re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,te,ee]}],"outline-w":[{outline:["",ke,Yr,Wn]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",p,Vs,Fs]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",d,Vs,Fs]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:le()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[ke,Wn]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":le()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",m,Vs,Fs]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[ke,te,ee]}],"mix-blend":[{"mix-blend":[...ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":H()}],"mask-image-linear-to-pos":[{"mask-linear-to":H()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":H()}],"mask-image-t-to-pos":[{"mask-t-to":H()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":H()}],"mask-image-r-to-pos":[{"mask-r-to":H()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":H()}],"mask-image-b-to-pos":[{"mask-b-to":H()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":H()}],"mask-image-l-to-pos":[{"mask-l-to":H()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":H()}],"mask-image-x-to-pos":[{"mask-x-to":H()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":H()}],"mask-image-y-to-pos":[{"mask-y-to":H()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[te,ee]}],"mask-image-radial-from-pos":[{"mask-radial-from":H()}],"mask-image-radial-to-pos":[{"mask-radial-to":H()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":H()}],"mask-image-conic-to-pos":[{"mask-conic-to":H()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:Pe()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",te,ee]}],filter:[{filter:["","none",te,ee]}],blur:[{blur:ue()}],brightness:[{brightness:[ke,te,ee]}],contrast:[{contrast:[ke,te,ee]}],"drop-shadow":[{"drop-shadow":["","none",v,Vs,Fs]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",ke,te,ee]}],"hue-rotate":[{"hue-rotate":[ke,te,ee]}],invert:[{invert:["",ke,te,ee]}],saturate:[{saturate:[ke,te,ee]}],sepia:[{sepia:["",ke,te,ee]}],"backdrop-filter":[{"backdrop-filter":["","none",te,ee]}],"backdrop-blur":[{"backdrop-blur":ue()}],"backdrop-brightness":[{"backdrop-brightness":[ke,te,ee]}],"backdrop-contrast":[{"backdrop-contrast":[ke,te,ee]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,te,ee]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,te,ee]}],"backdrop-invert":[{"backdrop-invert":["",ke,te,ee]}],"backdrop-opacity":[{"backdrop-opacity":[ke,te,ee]}],"backdrop-saturate":[{"backdrop-saturate":[ke,te,ee]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,te,ee]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",te,ee]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",te,ee]}],ease:[{ease:["linear","initial",x,te,ee]}],delay:[{delay:[ke,te,ee]}],animate:[{animate:["none",b,te,ee]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,te,ee]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:je()}],"rotate-x":[{"rotate-x":je()}],"rotate-y":[{"rotate-y":je()}],"rotate-z":[{"rotate-z":je()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[te,ee,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:he()}],"translate-x":[{"translate-x":he()}],"translate-y":[{"translate-y":he()}],"translate-z":[{"translate-z":he()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",te,ee]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",te,ee]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[ke,Yr,Wn,Ca]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},fb=Zy(db);function $(...e){return fb(Td(e))}function pb({children:e,sidebar:t,wrapperClassName:n}){return c.jsxs(c.Fragment,{children:[c.jsx("style",{children:"#wpcontent { padding-left: 0 !important; padding-right: 0 !important; }"}),c.jsxs("div",{className:$("flex flex-col md:flex-row gap-4 p-3 sm:p-6",n),children:[c.jsx("div",{className:"md:basis-2/3 xl:basis-3/4 shrink-0",children:e}),c.jsx("div",{className:"md:basis-1/3 xl:basis-1/4",children:t})]})]})}function Mc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function $d(...e){return t=>{let n=!1;const r=e.map(s=>{const o=Mc(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():Mc(e[s],null)}}}}function Le(...e){return f.useCallback($d(...e),e)}function ns(e){const t=mb(e),n=f.forwardRef((r,s)=>{const{children:o,...a}=r,i=f.Children.toArray(o),l=i.find(gb);if(l){const u=l.props.children,p=i.map(d=>d===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:d);return c.jsx(t,{...a,ref:s,children:f.isValidElement(u)?f.cloneElement(u,void 0,p):null})}return c.jsx(t,{...a,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}var Bd=ns("Slot");function mb(e){const t=f.forwardRef((n,r)=>{const{children:s,...o}=n;if(f.isValidElement(s)){const a=yb(s),i=vb(o,s.props);return s.type!==f.Fragment&&(i.ref=r?$d(r,a):a),f.cloneElement(s,i)}return f.Children.count(s)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ud=Symbol("radix.slottable");function hb(e){const t=({children:n})=>c.jsx(c.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ud,t}function gb(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ud}function vb(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...i)=>{o(...i),s(...i)}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function yb(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],we=bb.reduce((e,t)=>{const n=ns(`Primitive.${t}`),r=f.forwardRef((s,o)=>{const{asChild:a,...i}=s,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...i,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function xb(e,t){e&&Nr.flushSync(()=>e.dispatchEvent(t))}var wb="Separator",Dc="horizontal",_b=["horizontal","vertical"],zd=f.forwardRef((e,t)=>{const{decorative:n,orientation:r=Dc,...s}=e,o=Sb(r)?r:Dc,i=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return c.jsx(we.div,{"data-orientation":o,...i,...s,ref:t})});zd.displayName=wb;function Sb(e){return _b.includes(e)}var Hd=zd;const _t=f.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>c.jsx(Hd,{ref:s,decorative:n,orientation:t,className:$("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));_t.displayName=Hd.displayName;const Fc=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Vc=Td,Ji=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Vc(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,a=Object.keys(s).map(u=>{const p=n==null?void 0:n[u],d=o==null?void 0:o[u];if(p===null)return null;const m=Fc(p)||Fc(d);return s[u][m]}),i=n&&Object.entries(n).reduce((u,p)=>{let[d,m]=p;return m===void 0||(u[d]=m),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,p)=>{let{class:d,className:m,...v}=p;return Object.entries(v).every(y=>{let[h,g]=y;return Array.isArray(g)?g.includes({...o,...i}[h]):{...o,...i}[h]===g})?[...u,d,m]:u},[]);return Vc(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)},Cb=Ji("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),ci=f.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},o)=>{const a=r?Bd:"button";return c.jsx(a,{className:$(Cb({variant:t,size:n,className:e})),ref:o,...s})});ci.displayName="Button";/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jb=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Lc=e=>{const t=jb(e);return t.charAt(0).toUpperCase()+t.slice(1)},Wd=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var Eb={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Rb=f.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:a,...i},l)=>f.createElement("svg",{ref:l,...Eb,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Wd("lucide",s),...i},[...a.map(([u,p])=>f.createElement(u,p)),...Array.isArray(o)?o:[o]]));/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Lt=(e,t)=>{const n=f.forwardRef(({className:r,...s},o)=>f.createElement(Rb,{ref:o,iconNode:t,className:Wd(`lucide-${kb(Lc(e))}`,`lucide-${e}`,r),...s}));return n.displayName=Lc(e),n};/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Tb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Zd=Lt("check",Tb);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ob=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Mo=Lt("chevron-down",Ob);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ab=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ib=Lt("chevron-up",Ab);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Nb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Gd=Lt("circle-alert",Nb);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pb=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Mb=Lt("circle-check-big",Pb);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Db=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Fb=Lt("circle",Db);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Vb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Lb=Lt("info",Vb);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $b=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Bb=Lt("loader-circle",$b);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ub=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Qi=Lt("plus",Ub);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const zb=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Hb=Lt("save",zb);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Wb=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],qd=Lt("triangle-alert",Wb);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Zb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Do=Lt("x",Zb);function el({className:e,...t}){return c.jsx(Bb,{className:$("h-4 w-4 animate-spin",e),...t})}const $n=f.forwardRef(({children:e,isLoading:t,...n},r)=>t?c.jsxs(ci,{type:"button",ref:r,...n,children:[t&&c.jsx(el,{className:$({"me-2":!!e})}),e]}):c.jsx(ci,{type:"button",ref:r,...n,children:e}));$n.displayName="Button";const Gb=e=>c.jsx($n,{size:"lg",type:"reset",...e}),qb=e=>c.jsxs($n,{size:"lg",type:"submit",...e,children:[c.jsx(Hb,{size:18,className:"me-2"}),w("Save Changes")]}),Yb=e=>c.jsx("div",{role:"group",...e,className:$("flex flex-col sm:inline-flex sm:flex-row gap-4 px-4 mt-4",e.className)}),Kb=({onSubmit:e,onReset:t,showResetButton:n,form:r,showSeparator:s=!0,...o})=>{const{isSubmitting:a,isDirty:i}=Io(),l=f.useCallback(()=>e==null?void 0:e(),[e]),u=f.useCallback(()=>t==null?void 0:t(),[t]);return c.jsxs(c.Fragment,{children:[s&&c.jsx(_t,{}),c.jsxs(Yb,{...o,children:[c.jsx(qb,{isLoading:a,disabled:a,onClick:l,form:r}),n&&c.jsx(Gb,{disabled:!i,form:r,onClick:u})]})]})},tl=e=>t=>{const{[t]:n}=e;return n==null?void 0:n()},Xb=e=>{const t=tl(e);return(r,s="invalid")=>{let o;switch(s){case"invalid":o=w("Invalid %s");break;case"required":o=w("%s required.");break;default:return{[Sd]:w("Changes could not be saved.")}}return me.sprintf(o,t(r))}};var Ae;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const o={};for(const a of s)o[a]=a;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(i=>typeof s[s[i]]!="number"),a={};for(const i of o)a[i]=s[i];return e.objectValues(a)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&o.push(a);return o},e.find=(s,o)=>{for(const a of s)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(Ae||(Ae={}));var ui;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(ui||(ui={}));const X=Ae.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),hn=e=>{switch(typeof e){case"undefined":return X.undefined;case"string":return X.string;case"number":return isNaN(e)?X.nan:X.number;case"boolean":return X.boolean;case"function":return X.function;case"bigint":return X.bigint;case"symbol":return X.symbol;case"object":return Array.isArray(e)?X.array:e===null?X.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?X.promise:typeof Map<"u"&&e instanceof Map?X.map:typeof Set<"u"&&e instanceof Set?X.set:typeof Date<"u"&&e instanceof Date?X.date:X.object;default:return X.unknown}},D=Ae.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Jb=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class At extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},s=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let i=r,l=0;for(;l<a.path.length;){const u=a.path[l];l===a.path.length-1?(i[u]=i[u]||{_errors:[]},i[u]._errors.push(n(a))):i[u]=i[u]||{_errors:[]},i=i[u],l++}}};return s(this),r}static assert(t){if(!(t instanceof At))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ae.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}At.create=e=>new At(e);const jr=(e,t)=>{let n;switch(e.code){case D.invalid_type:e.received===X.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case D.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ae.jsonStringifyReplacer)}`;break;case D.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ae.joinValues(e.keys,", ")}`;break;case D.invalid_union:n="Invalid input";break;case D.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ae.joinValues(e.options)}`;break;case D.invalid_enum_value:n=`Invalid enum value. Expected ${Ae.joinValues(e.options)}, received '${e.received}'`;break;case D.invalid_arguments:n="Invalid function arguments";break;case D.invalid_return_type:n="Invalid function return type";break;case D.invalid_date:n="Invalid date";break;case D.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Ae.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case D.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case D.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case D.custom:n="Invalid input";break;case D.invalid_intersection_types:n="Intersection results could not be merged";break;case D.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case D.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ae.assertNever(e)}return{message:n}};let Yd=jr;function Qb(e){Yd=e}function po(){return Yd}const mo=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,o=[...n,...s.path||[]],a={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let i="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)i=u(a,{data:t,defaultError:i}).message;return{...s,path:o,message:i}},ex=[];function G(e,t){const n=po(),r=mo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===jr?void 0:jr].filter(s=>!!s)});e.common.issues.push(r)}class vt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return pe;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const o=await s.key,a=await s.value;r.push({key:o,value:a})}return vt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:o,value:a}=s;if(o.status==="aborted"||a.status==="aborted")return pe;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const pe=Object.freeze({status:"aborted"}),pr=e=>({status:"dirty",value:e}),St=e=>({status:"valid",value:e}),di=e=>e.status==="aborted",fi=e=>e.status==="dirty",Kn=e=>e.status==="valid",rs=e=>typeof Promise<"u"&&e instanceof Promise;function ho(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function Kd(e,t,n,r,s){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var re;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(re||(re={}));var Qr,es;class sn{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const $c=(e,t)=>{if(Kn(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new At(e.common.issues);return this._error=n,this._error}}};function be(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(a,i)=>{var l,u;const{message:p}=e;return a.code==="invalid_enum_value"?{message:p??i.defaultError}:typeof i.data>"u"?{message:(l=p??r)!==null&&l!==void 0?l:i.defaultError}:a.code!=="invalid_type"?{message:i.defaultError}:{message:(u=p??n)!==null&&u!==void 0?u:i.defaultError}},description:s}}class Ce{get description(){return this._def.description}_getType(t){return hn(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:hn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new vt,ctx:{common:t.parent.common,data:t.data,parsedType:hn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(rs(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:hn(t)},o=this._parseSync({data:t,path:s.path,parent:s});return $c(s,o)}"~validate"(t){var n,r;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:hn(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:s});return Kn(o)?{value:o.value}:{issues:s.common.issues}}catch(o){!((r=(n=o==null?void 0:o.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:s}).then(o=>Kn(o)?{value:o.value}:{issues:s.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:hn(t)},s=this._parse({data:t,path:r.path,parent:r}),o=await(rs(s)?s:Promise.resolve(s));return $c(r,o)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,o)=>{const a=t(s),i=()=>o.addIssue({code:D.custom,...r(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(i(),!1)):a?!0:(i(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new qt({schema:this,typeName:fe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return nn.create(this,this._def)}nullable(){return Dn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Zt.create(this)}promise(){return Rr.create(this,this._def)}or(t){return is.create([this,t],this._def)}and(t){return ls.create(this,t,this._def)}transform(t){return new qt({...be(this._def),schema:this,typeName:fe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ps({...be(this._def),innerType:this,defaultValue:n,typeName:fe.ZodDefault})}brand(){return new nl({typeName:fe.ZodBranded,type:this,...be(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new ms({...be(this._def),innerType:this,catchValue:n,typeName:fe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return ks.create(this,t)}readonly(){return hs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const tx=/^c[^\s-]{8,}$/i,nx=/^[0-9a-z]+$/,rx=/^[0-9A-HJKMNP-TV-Z]{26}$/i,sx=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ox=/^[a-z0-9_-]{21}$/i,ax=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ix=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,lx=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,cx="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ka;const ux=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,dx=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,fx=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,px=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,mx=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,hx=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Xd="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",gx=new RegExp(`^${Xd}$`);function Jd(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function vx(e){return new RegExp(`^${Jd(e)}$`)}function Qd(e){let t=`${Xd}T${Jd(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function yx(e,t){return!!((t==="v4"||!t)&&ux.test(e)||(t==="v6"||!t)&&fx.test(e))}function bx(e,t){if(!ax.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||!s.typ||!s.alg||t&&s.alg!==t)}catch{return!1}}function xx(e,t){return!!((t==="v4"||!t)&&dx.test(e)||(t==="v6"||!t)&&px.test(e))}class Wt extends Ce{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==X.string){const o=this._getOrReturnCtx(t);return G(o,{code:D.invalid_type,expected:X.string,received:o.parsedType}),pe}const r=new vt;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),G(s,{code:D.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),G(s,{code:D.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,i=t.data.length<o.value;(a||i)&&(s=this._getOrReturnCtx(t,s),a?G(s,{code:D.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):i&&G(s,{code:D.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")lx.test(t.data)||(s=this._getOrReturnCtx(t,s),G(s,{validation:"email",code:D.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")ka||(ka=new RegExp(cx,"u")),ka.test(t.data)||(s=this._getOrReturnCtx(t,s),G(s,{validation:"emoji",code:D.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")sx.test(t.data)||(s=this._getOrReturnCtx(t,s),G(s,{validation:"uuid",code:D.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")ox.test(t.data)||(s=this._getOrReturnCtx(t,s),G(s,{validation:"nanoid",code:D.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")tx.test(t.data)||(s=this._getOrReturnCtx(t,s),G(s,{validation:"cuid",code:D.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")nx.test(t.data)||(s=this._getOrReturnCtx(t,s),G(s,{validation:"cuid2",code:D.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")rx.test(t.data)||(s=this._getOrReturnCtx(t,s),G(s,{validation:"ulid",code:D.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),G(s,{validation:"url",code:D.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),G(s,{validation:"regex",code:D.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),G(s,{code:D.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),G(s,{code:D.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),G(s,{code:D.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?Qd(o).test(t.data)||(s=this._getOrReturnCtx(t,s),G(s,{code:D.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?gx.test(t.data)||(s=this._getOrReturnCtx(t,s),G(s,{code:D.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?vx(o).test(t.data)||(s=this._getOrReturnCtx(t,s),G(s,{code:D.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?ix.test(t.data)||(s=this._getOrReturnCtx(t,s),G(s,{validation:"duration",code:D.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?yx(t.data,o.version)||(s=this._getOrReturnCtx(t,s),G(s,{validation:"ip",code:D.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?bx(t.data,o.alg)||(s=this._getOrReturnCtx(t,s),G(s,{validation:"jwt",code:D.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?xx(t.data,o.version)||(s=this._getOrReturnCtx(t,s),G(s,{validation:"cidr",code:D.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?mx.test(t.data)||(s=this._getOrReturnCtx(t,s),G(s,{validation:"base64",code:D.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?hx.test(t.data)||(s=this._getOrReturnCtx(t,s),G(s,{validation:"base64url",code:D.invalid_string,message:o.message}),r.dirty()):Ae.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:D.invalid_string,...re.errToObj(r)})}_addCheck(t){return new Wt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...re.errToObj(t)})}url(t){return this._addCheck({kind:"url",...re.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...re.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...re.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...re.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...re.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...re.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...re.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...re.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...re.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...re.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...re.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...re.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...re.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...re.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...re.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...re.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...re.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...re.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...re.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...re.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...re.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...re.errToObj(n)})}nonempty(t){return this.min(1,re.errToObj(t))}trim(){return new Wt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Wt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Wt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Wt.create=e=>{var t;return new Wt({checks:[],typeName:fe.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...be(e)})};function wx(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,o=parseInt(e.toFixed(s).replace(".","")),a=parseInt(t.toFixed(s).replace(".",""));return o%a/Math.pow(10,s)}class Nn extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==X.number){const o=this._getOrReturnCtx(t);return G(o,{code:D.invalid_type,expected:X.number,received:o.parsedType}),pe}let r;const s=new vt;for(const o of this._def.checks)o.kind==="int"?Ae.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),G(r,{code:D.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),G(r,{code:D.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),G(r,{code:D.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?wx(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),G(r,{code:D.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),G(r,{code:D.not_finite,message:o.message}),s.dirty()):Ae.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,re.toString(n))}gt(t,n){return this.setLimit("min",t,!1,re.toString(n))}lte(t,n){return this.setLimit("max",t,!0,re.toString(n))}lt(t,n){return this.setLimit("max",t,!1,re.toString(n))}setLimit(t,n,r,s){return new Nn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:re.toString(s)}]})}_addCheck(t){return new Nn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:re.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:re.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:re.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:re.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:re.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:re.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:re.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:re.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:re.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ae.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Nn.create=e=>new Nn({checks:[],typeName:fe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...be(e)});class Pn extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==X.bigint)return this._getInvalidInput(t);let r;const s=new vt;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),G(r,{code:D.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),G(r,{code:D.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),G(r,{code:D.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Ae.assertNever(o);return{status:s.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return G(n,{code:D.invalid_type,expected:X.bigint,received:n.parsedType}),pe}gte(t,n){return this.setLimit("min",t,!0,re.toString(n))}gt(t,n){return this.setLimit("min",t,!1,re.toString(n))}lte(t,n){return this.setLimit("max",t,!0,re.toString(n))}lt(t,n){return this.setLimit("max",t,!1,re.toString(n))}setLimit(t,n,r,s){return new Pn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:re.toString(s)}]})}_addCheck(t){return new Pn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:re.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:re.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:re.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:re.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:re.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Pn.create=e=>{var t;return new Pn({checks:[],typeName:fe.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...be(e)})};class ss extends Ce{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==X.boolean){const r=this._getOrReturnCtx(t);return G(r,{code:D.invalid_type,expected:X.boolean,received:r.parsedType}),pe}return St(t.data)}}ss.create=e=>new ss({typeName:fe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...be(e)});class Xn extends Ce{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==X.date){const o=this._getOrReturnCtx(t);return G(o,{code:D.invalid_type,expected:X.date,received:o.parsedType}),pe}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return G(o,{code:D.invalid_date}),pe}const r=new vt;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),G(s,{code:D.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),G(s,{code:D.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Ae.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Xn({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:re.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:re.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Xn.create=e=>new Xn({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:fe.ZodDate,...be(e)});class go extends Ce{_parse(t){if(this._getType(t)!==X.symbol){const r=this._getOrReturnCtx(t);return G(r,{code:D.invalid_type,expected:X.symbol,received:r.parsedType}),pe}return St(t.data)}}go.create=e=>new go({typeName:fe.ZodSymbol,...be(e)});class os extends Ce{_parse(t){if(this._getType(t)!==X.undefined){const r=this._getOrReturnCtx(t);return G(r,{code:D.invalid_type,expected:X.undefined,received:r.parsedType}),pe}return St(t.data)}}os.create=e=>new os({typeName:fe.ZodUndefined,...be(e)});class as extends Ce{_parse(t){if(this._getType(t)!==X.null){const r=this._getOrReturnCtx(t);return G(r,{code:D.invalid_type,expected:X.null,received:r.parsedType}),pe}return St(t.data)}}as.create=e=>new as({typeName:fe.ZodNull,...be(e)});class Er extends Ce{constructor(){super(...arguments),this._any=!0}_parse(t){return St(t.data)}}Er.create=e=>new Er({typeName:fe.ZodAny,...be(e)});class qn extends Ce{constructor(){super(...arguments),this._unknown=!0}_parse(t){return St(t.data)}}qn.create=e=>new qn({typeName:fe.ZodUnknown,...be(e)});class vn extends Ce{_parse(t){const n=this._getOrReturnCtx(t);return G(n,{code:D.invalid_type,expected:X.never,received:n.parsedType}),pe}}vn.create=e=>new vn({typeName:fe.ZodNever,...be(e)});class vo extends Ce{_parse(t){if(this._getType(t)!==X.undefined){const r=this._getOrReturnCtx(t);return G(r,{code:D.invalid_type,expected:X.void,received:r.parsedType}),pe}return St(t.data)}}vo.create=e=>new vo({typeName:fe.ZodVoid,...be(e)});class Zt extends Ce{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==X.array)return G(n,{code:D.invalid_type,expected:X.array,received:n.parsedType}),pe;if(s.exactLength!==null){const a=n.data.length>s.exactLength.value,i=n.data.length<s.exactLength.value;(a||i)&&(G(n,{code:a?D.too_big:D.too_small,minimum:i?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(G(n,{code:D.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(G(n,{code:D.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,i)=>s.type._parseAsync(new sn(n,a,n.path,i)))).then(a=>vt.mergeArray(r,a));const o=[...n.data].map((a,i)=>s.type._parseSync(new sn(n,a,n.path,i)));return vt.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Zt({...this._def,minLength:{value:t,message:re.toString(n)}})}max(t,n){return new Zt({...this._def,maxLength:{value:t,message:re.toString(n)}})}length(t,n){return new Zt({...this._def,exactLength:{value:t,message:re.toString(n)}})}nonempty(t){return this.min(1,t)}}Zt.create=(e,t)=>new Zt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:fe.ZodArray,...be(t)});function dr(e){if(e instanceof Ge){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=nn.create(dr(r))}return new Ge({...e._def,shape:()=>t})}else return e instanceof Zt?new Zt({...e._def,type:dr(e.element)}):e instanceof nn?nn.create(dr(e.unwrap())):e instanceof Dn?Dn.create(dr(e.unwrap())):e instanceof on?on.create(e.items.map(t=>dr(t))):e}class Ge extends Ce{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Ae.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==X.object){const u=this._getOrReturnCtx(t);return G(u,{code:D.invalid_type,expected:X.object,received:u.parsedType}),pe}const{status:r,ctx:s}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),i=[];if(!(this._def.catchall instanceof vn&&this._def.unknownKeys==="strip"))for(const u in s.data)a.includes(u)||i.push(u);const l=[];for(const u of a){const p=o[u],d=s.data[u];l.push({key:{status:"valid",value:u},value:p._parse(new sn(s,d,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof vn){const u=this._def.unknownKeys;if(u==="passthrough")for(const p of i)l.push({key:{status:"valid",value:p},value:{status:"valid",value:s.data[p]}});else if(u==="strict")i.length>0&&(G(s,{code:D.unrecognized_keys,keys:i}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const p of i){const d=s.data[p];l.push({key:{status:"valid",value:p},value:u._parse(new sn(s,d,s.path,p)),alwaysSet:p in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const p of l){const d=await p.key,m=await p.value;u.push({key:d,value:m,alwaysSet:p.alwaysSet})}return u}).then(u=>vt.mergeObjectSync(r,u)):vt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return re.errToObj,new Ge({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,o,a,i;const l=(a=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(i=re.errToObj(t).message)!==null&&i!==void 0?i:l}:{message:l}}}:{}})}strip(){return new Ge({...this._def,unknownKeys:"strip"})}passthrough(){return new Ge({...this._def,unknownKeys:"passthrough"})}extend(t){return new Ge({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Ge({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:fe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Ge({...this._def,catchall:t})}pick(t){const n={};return Ae.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Ge({...this._def,shape:()=>n})}omit(t){const n={};return Ae.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Ge({...this._def,shape:()=>n})}deepPartial(){return dr(this)}partial(t){const n={};return Ae.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}),new Ge({...this._def,shape:()=>n})}required(t){const n={};return Ae.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof nn;)o=o._def.innerType;n[r]=o}}),new Ge({...this._def,shape:()=>n})}keyof(){return ef(Ae.objectKeys(this.shape))}}Ge.create=(e,t)=>new Ge({shape:()=>e,unknownKeys:"strip",catchall:vn.create(),typeName:fe.ZodObject,...be(t)});Ge.strictCreate=(e,t)=>new Ge({shape:()=>e,unknownKeys:"strict",catchall:vn.create(),typeName:fe.ZodObject,...be(t)});Ge.lazycreate=(e,t)=>new Ge({shape:e,unknownKeys:"strip",catchall:vn.create(),typeName:fe.ZodObject,...be(t)});class is extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(o){for(const i of o)if(i.result.status==="valid")return i.result;for(const i of o)if(i.result.status==="dirty")return n.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(i=>new At(i.ctx.common.issues));return G(n,{code:D.invalid_union,unionErrors:a}),pe}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(s);{let o;const a=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},p=l._parseSync({data:n.data,path:n.path,parent:u});if(p.status==="valid")return p;p.status==="dirty"&&!o&&(o={result:p,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(l=>new At(l));return G(n,{code:D.invalid_union,unionErrors:i}),pe}}get options(){return this._def.options}}is.create=(e,t)=>new is({options:e,typeName:fe.ZodUnion,...be(t)});const mn=e=>e instanceof us?mn(e.schema):e instanceof qt?mn(e.innerType()):e instanceof ds?[e.value]:e instanceof Mn?e.options:e instanceof fs?Ae.objectValues(e.enum):e instanceof ps?mn(e._def.innerType):e instanceof os?[void 0]:e instanceof as?[null]:e instanceof nn?[void 0,...mn(e.unwrap())]:e instanceof Dn?[null,...mn(e.unwrap())]:e instanceof nl||e instanceof hs?mn(e.unwrap()):e instanceof ms?mn(e._def.innerType):[];class Fo extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==X.object)return G(n,{code:D.invalid_type,expected:X.object,received:n.parsedType}),pe;const r=this.discriminator,s=n.data[r],o=this.optionsMap.get(s);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(G(n,{code:D.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),pe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const o of n){const a=mn(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const i of a){if(s.has(i))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(i)}`);s.set(i,o)}}return new Fo({typeName:fe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...be(r)})}}function pi(e,t){const n=hn(e),r=hn(t);if(e===t)return{valid:!0,data:e};if(n===X.object&&r===X.object){const s=Ae.objectKeys(t),o=Ae.objectKeys(e).filter(i=>s.indexOf(i)!==-1),a={...e,...t};for(const i of o){const l=pi(e[i],t[i]);if(!l.valid)return{valid:!1};a[i]=l.data}return{valid:!0,data:a}}else if(n===X.array&&r===X.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o<e.length;o++){const a=e[o],i=t[o],l=pi(a,i);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return n===X.date&&r===X.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ls extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(o,a)=>{if(di(o)||di(a))return pe;const i=pi(o.value,a.value);return i.valid?((fi(o)||fi(a))&&n.dirty(),{status:n.value,value:i.data}):(G(r,{code:D.invalid_intersection_types}),pe)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>s(o,a)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ls.create=(e,t,n)=>new ls({left:e,right:t,typeName:fe.ZodIntersection,...be(n)});class on extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==X.array)return G(r,{code:D.invalid_type,expected:X.array,received:r.parsedType}),pe;if(r.data.length<this._def.items.length)return G(r,{code:D.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),pe;!this._def.rest&&r.data.length>this._def.items.length&&(G(r,{code:D.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,i)=>{const l=this._def.items[i]||this._def.rest;return l?l._parse(new sn(r,a,r.path,i)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>vt.mergeArray(n,a)):vt.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new on({...this._def,rest:t})}}on.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new on({items:e,typeName:fe.ZodTuple,rest:null,...be(t)})};class cs extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==X.object)return G(r,{code:D.invalid_type,expected:X.object,received:r.parsedType}),pe;const s=[],o=this._def.keyType,a=this._def.valueType;for(const i in r.data)s.push({key:o._parse(new sn(r,i,r.path,i)),value:a._parse(new sn(r,r.data[i],r.path,i)),alwaysSet:i in r.data});return r.common.async?vt.mergeObjectAsync(n,s):vt.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ce?new cs({keyType:t,valueType:n,typeName:fe.ZodRecord,...be(r)}):new cs({keyType:Wt.create(),valueType:t,typeName:fe.ZodRecord,...be(n)})}}class yo extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==X.map)return G(r,{code:D.invalid_type,expected:X.map,received:r.parsedType}),pe;const s=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([i,l],u)=>({key:s._parse(new sn(r,i,r.path,[u,"key"])),value:o._parse(new sn(r,l,r.path,[u,"value"]))}));if(r.common.async){const i=new Map;return Promise.resolve().then(async()=>{for(const l of a){const u=await l.key,p=await l.value;if(u.status==="aborted"||p.status==="aborted")return pe;(u.status==="dirty"||p.status==="dirty")&&n.dirty(),i.set(u.value,p.value)}return{status:n.value,value:i}})}else{const i=new Map;for(const l of a){const u=l.key,p=l.value;if(u.status==="aborted"||p.status==="aborted")return pe;(u.status==="dirty"||p.status==="dirty")&&n.dirty(),i.set(u.value,p.value)}return{status:n.value,value:i}}}}yo.create=(e,t,n)=>new yo({valueType:t,keyType:e,typeName:fe.ZodMap,...be(n)});class Jn extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==X.set)return G(r,{code:D.invalid_type,expected:X.set,received:r.parsedType}),pe;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(G(r,{code:D.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(G(r,{code:D.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const o=this._def.valueType;function a(l){const u=new Set;for(const p of l){if(p.status==="aborted")return pe;p.status==="dirty"&&n.dirty(),u.add(p.value)}return{status:n.value,value:u}}const i=[...r.data.values()].map((l,u)=>o._parse(new sn(r,l,r.path,u)));return r.common.async?Promise.all(i).then(l=>a(l)):a(i)}min(t,n){return new Jn({...this._def,minSize:{value:t,message:re.toString(n)}})}max(t,n){return new Jn({...this._def,maxSize:{value:t,message:re.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Jn.create=(e,t)=>new Jn({valueType:e,minSize:null,maxSize:null,typeName:fe.ZodSet,...be(t)});class vr extends Ce{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==X.function)return G(n,{code:D.invalid_type,expected:X.function,received:n.parsedType}),pe;function r(i,l){return mo({data:i,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,po(),jr].filter(u=>!!u),issueData:{code:D.invalid_arguments,argumentsError:l}})}function s(i,l){return mo({data:i,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,po(),jr].filter(u=>!!u),issueData:{code:D.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Rr){const i=this;return St(async function(...l){const u=new At([]),p=await i._def.args.parseAsync(l,o).catch(v=>{throw u.addIssue(r(l,v)),u}),d=await Reflect.apply(a,this,p);return await i._def.returns._def.type.parseAsync(d,o).catch(v=>{throw u.addIssue(s(d,v)),u})})}else{const i=this;return St(function(...l){const u=i._def.args.safeParse(l,o);if(!u.success)throw new At([r(l,u.error)]);const p=Reflect.apply(a,this,u.data),d=i._def.returns.safeParse(p,o);if(!d.success)throw new At([s(p,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new vr({...this._def,args:on.create(t).rest(qn.create())})}returns(t){return new vr({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new vr({args:t||on.create([]).rest(qn.create()),returns:n||qn.create(),typeName:fe.ZodFunction,...be(r)})}}class us extends Ce{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}us.create=(e,t)=>new us({getter:e,typeName:fe.ZodLazy,...be(t)});class ds extends Ce{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return G(n,{received:n.data,code:D.invalid_literal,expected:this._def.value}),pe}return{status:"valid",value:t.data}}get value(){return this._def.value}}ds.create=(e,t)=>new ds({value:e,typeName:fe.ZodLiteral,...be(t)});function ef(e,t){return new Mn({values:e,typeName:fe.ZodEnum,...be(t)})}class Mn extends Ce{constructor(){super(...arguments),Qr.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return G(n,{expected:Ae.joinValues(r),received:n.parsedType,code:D.invalid_type}),pe}if(ho(this,Qr)||Kd(this,Qr,new Set(this._def.values)),!ho(this,Qr).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return G(n,{received:n.data,code:D.invalid_enum_value,options:r}),pe}return St(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Mn.create(t,{...this._def,...n})}exclude(t,n=this._def){return Mn.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Qr=new WeakMap;Mn.create=ef;class fs extends Ce{constructor(){super(...arguments),es.set(this,void 0)}_parse(t){const n=Ae.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==X.string&&r.parsedType!==X.number){const s=Ae.objectValues(n);return G(r,{expected:Ae.joinValues(s),received:r.parsedType,code:D.invalid_type}),pe}if(ho(this,es)||Kd(this,es,new Set(Ae.getValidEnumValues(this._def.values))),!ho(this,es).has(t.data)){const s=Ae.objectValues(n);return G(r,{received:r.data,code:D.invalid_enum_value,options:s}),pe}return St(t.data)}get enum(){return this._def.values}}es=new WeakMap;fs.create=(e,t)=>new fs({values:e,typeName:fe.ZodNativeEnum,...be(t)});class Rr extends Ce{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==X.promise&&n.common.async===!1)return G(n,{code:D.invalid_type,expected:X.promise,received:n.parsedType}),pe;const r=n.parsedType===X.promise?n.data:Promise.resolve(n.data);return St(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Rr.create=(e,t)=>new Rr({type:e,typeName:fe.ZodPromise,...be(t)});class qt extends Ce{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===fe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:a=>{G(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const a=s.transform(r.data,o);if(r.common.async)return Promise.resolve(a).then(async i=>{if(n.value==="aborted")return pe;const l=await this._def.schema._parseAsync({data:i,path:r.path,parent:r});return l.status==="aborted"?pe:l.status==="dirty"||n.value==="dirty"?pr(l.value):l});{if(n.value==="aborted")return pe;const i=this._def.schema._parseSync({data:a,path:r.path,parent:r});return i.status==="aborted"?pe:i.status==="dirty"||n.value==="dirty"?pr(i.value):i}}if(s.type==="refinement"){const a=i=>{const l=s.refinement(i,o);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i};if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?pe:(i.status==="dirty"&&n.dirty(),a(i.value),{status:n.value,value:i.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>i.status==="aborted"?pe:(i.status==="dirty"&&n.dirty(),a(i.value).then(()=>({status:n.value,value:i.value}))))}if(s.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Kn(a))return a;const i=s.transform(a.value,o);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:i}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Kn(a)?Promise.resolve(s.transform(a.value,o)).then(i=>({status:n.value,value:i})):a);Ae.assertNever(s)}}qt.create=(e,t,n)=>new qt({schema:e,typeName:fe.ZodEffects,effect:t,...be(n)});qt.createWithPreprocess=(e,t,n)=>new qt({schema:t,effect:{type:"preprocess",transform:e},typeName:fe.ZodEffects,...be(n)});class nn extends Ce{_parse(t){return this._getType(t)===X.undefined?St(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}nn.create=(e,t)=>new nn({innerType:e,typeName:fe.ZodOptional,...be(t)});class Dn extends Ce{_parse(t){return this._getType(t)===X.null?St(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Dn.create=(e,t)=>new Dn({innerType:e,typeName:fe.ZodNullable,...be(t)});class ps extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===X.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ps.create=(e,t)=>new ps({innerType:e,typeName:fe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...be(t)});class ms extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return rs(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new At(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new At(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ms.create=(e,t)=>new ms({innerType:e,typeName:fe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...be(t)});class bo extends Ce{_parse(t){if(this._getType(t)!==X.nan){const r=this._getOrReturnCtx(t);return G(r,{code:D.invalid_type,expected:X.nan,received:r.parsedType}),pe}return{status:"valid",value:t.data}}}bo.create=e=>new bo({typeName:fe.ZodNaN,...be(e)});const _x=Symbol("zod_brand");class nl extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class ks extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?pe:o.status==="dirty"?(n.dirty(),pr(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?pe:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new ks({in:t,out:n,typeName:fe.ZodPipeline})}}class hs extends Ce{_parse(t){const n=this._def.innerType._parse(t),r=s=>(Kn(s)&&(s.value=Object.freeze(s.value)),s);return rs(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}hs.create=(e,t)=>new hs({innerType:e,typeName:fe.ZodReadonly,...be(t)});function Bc(e,t){const n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function tf(e,t={},n){return e?Er.create().superRefine((r,s)=>{var o,a;const i=e(r);if(i instanceof Promise)return i.then(l=>{var u,p;if(!l){const d=Bc(t,r),m=(p=(u=d.fatal)!==null&&u!==void 0?u:n)!==null&&p!==void 0?p:!0;s.addIssue({code:"custom",...d,fatal:m})}});if(!i){const l=Bc(t,r),u=(a=(o=l.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0;s.addIssue({code:"custom",...l,fatal:u})}}):Er.create()}const Sx={object:Ge.lazycreate};var fe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(fe||(fe={}));const Cx=(e,t={message:`Input not instance of ${e.name}`})=>tf(n=>n instanceof e,t),nf=Wt.create,rf=Nn.create,kx=bo.create,jx=Pn.create,sf=ss.create,Ex=Xn.create,Rx=go.create,Tx=os.create,Ox=as.create,Ax=Er.create,Ix=qn.create,Nx=vn.create,Px=vo.create,Mx=Zt.create,Dx=Ge.create,Fx=Ge.strictCreate,Vx=is.create,Lx=Fo.create,$x=ls.create,Bx=on.create,Ux=cs.create,zx=yo.create,Hx=Jn.create,Wx=vr.create,Zx=us.create,Gx=ds.create,qx=Mn.create,Yx=fs.create,Kx=Rr.create,Uc=qt.create,Xx=nn.create,Jx=Dn.create,Qx=qt.createWithPreprocess,ew=ks.create,tw=()=>nf().optional(),nw=()=>rf().optional(),rw=()=>sf().optional(),sw={string:e=>Wt.create({...e,coerce:!0}),number:e=>Nn.create({...e,coerce:!0}),boolean:e=>ss.create({...e,coerce:!0}),bigint:e=>Pn.create({...e,coerce:!0}),date:e=>Xn.create({...e,coerce:!0})},ow=pe;var Y=Object.freeze({__proto__:null,defaultErrorMap:jr,setErrorMap:Qb,getErrorMap:po,makeIssue:mo,EMPTY_PATH:ex,addIssueToContext:G,ParseStatus:vt,INVALID:pe,DIRTY:pr,OK:St,isAborted:di,isDirty:fi,isValid:Kn,isAsync:rs,get util(){return Ae},get objectUtil(){return ui},ZodParsedType:X,getParsedType:hn,ZodType:Ce,datetimeRegex:Qd,ZodString:Wt,ZodNumber:Nn,ZodBigInt:Pn,ZodBoolean:ss,ZodDate:Xn,ZodSymbol:go,ZodUndefined:os,ZodNull:as,ZodAny:Er,ZodUnknown:qn,ZodNever:vn,ZodVoid:vo,ZodArray:Zt,ZodObject:Ge,ZodUnion:is,ZodDiscriminatedUnion:Fo,ZodIntersection:ls,ZodTuple:on,ZodRecord:cs,ZodMap:yo,ZodSet:Jn,ZodFunction:vr,ZodLazy:us,ZodLiteral:ds,ZodEnum:Mn,ZodNativeEnum:fs,ZodPromise:Rr,ZodEffects:qt,ZodTransformer:qt,ZodOptional:nn,ZodNullable:Dn,ZodDefault:ps,ZodCatch:ms,ZodNaN:bo,BRAND:_x,ZodBranded:nl,ZodPipeline:ks,ZodReadonly:hs,custom:tf,Schema:Ce,ZodSchema:Ce,late:Sx,get ZodFirstPartyTypeKind(){return fe},coerce:sw,any:Ax,array:Mx,bigint:jx,boolean:sf,date:Ex,discriminatedUnion:Lx,effect:Uc,enum:qx,function:Wx,instanceof:Cx,intersection:$x,lazy:Zx,literal:Gx,map:zx,nan:kx,nativeEnum:Yx,never:Nx,null:Ox,nullable:Jx,number:rf,object:Dx,oboolean:rw,onumber:nw,optional:Xx,ostring:tw,pipeline:ew,preprocess:Qx,promise:Kx,record:Ux,set:Hx,strictObject:Fx,string:nf,symbol:Rx,transformer:Uc,tuple:Bx,undefined:Tx,union:Vx,unknown:Ix,void:Px,NEVER:ow,ZodIssueCode:D,quotelessJson:Jb,ZodError:At});const of={active:()=>w("Active"),bot:()=>w("Bot"),bot_token:()=>w("Bot Token"),bot_username:()=>w("Bot Username"),cats_as_tags:()=>w("Categories as hashtags"),cf_worker_url:()=>w("Cloudflare worker URL"),channels:()=>w("Channel(s)"),chat_id:()=>w("Chat ID"),chat_ids:()=>w("Send it to"),clean_uninstall:()=>w("Remove settings on uninstall"),debug_info:()=>w("Debug Info"),delay:()=>w("Delay in Posting"),disable_notification:()=>w("Disable Notifications"),link_preview_disabled:()=>w("Disable link preview"),link_preview_url:()=>w("Link preview URL"),link_preview_above_text:()=>w("Show preview above text"),enable_logs:()=>w("Enable logs for"),excerpt_length:()=>w("Excerpt Length"),excerpt_preserve_eol:()=>w("Excerpt Newlines"),excerpt_source:()=>w("Excerpt Source"),google_script_url:()=>w("Google Script URL"),image_position:()=>w("Image Position"),message_template:()=>w("Message Template"),parse_mode:()=>w("Formatting"),plugin_posts:()=>w("Plugin generated posts"),post_edit_switch:()=>w("Post edit switch"),post_types:()=>w("Post type"),protect_content:()=>w("Protect content"),proxy_host:()=>w("Proxy Host"),proxy_method:()=>w("Proxy Method"),proxy_password:()=>w("Password"),proxy_port:()=>w("Proxy Port"),proxy_type:()=>w("Proxy Type"),proxy_username:()=>w("Username"),send_featured_image:()=>w("Featured Image"),send_files_by_url:()=>w("Send files by URL"),single_message:()=>w("Single message"),user_notifications:()=>w("Notifications to Users")},Ie=tl(of),aw=Y.object({active:Y.boolean().optional(),proxy_method:Y.enum(["cf_worker","google_script","php_proxy"]).optional(),cf_worker_url:Y.union([Y.literal(""),Y.string().url()]).nullish(),google_script_url:Y.union([Y.literal(""),Y.string().url()]).nullish(),proxy_host:Y.string().nullish(),proxy_port:Y.string().nullish(),proxy_type:Y.enum(["CURLPROXY_HTTP","CURLPROXY_SOCKS4","CURLPROXY_SOCKS4A","CURLPROXY_SOCKS5","CURLPROXY_SOCKS5_HOSTNAME"]).optional(),proxy_username:Y.string().nullish(),proxy_password:Y.string().nullish()}),zc=Y.enum(["none","HTML"]),af={...of,inline_button_text:()=>w("Inline button text"),inline_button_url:()=>w("Inline button URL"),inline_url_button:()=>w("Add Inline URL Button"),misc:()=>w("Other settings"),post_types:()=>w("Post type"),proxy_method:()=>w("Proxy Method"),send_when:()=>w("Send when"),watch_emails:()=>w("If Email goes to")},ht=tl(af),iw=Y.object({bot_token:Y.string().min(1,me.sprintf(w("%s required."),ht("bot_token"))).regex(wd,me.sprintf(w("Invalid %s"),ht("bot_token"))),bot_username:Y.string().min(1,me.sprintf(w("%s required."),ht("bot_username"))).regex(Ki,me.sprintf(w("Invalid %s"),ht("bot_username"))),p2tg:Y.object({active:Y.boolean().optional(),channels:Y.array(Y.object({value:Y.union([Y.literal(""),Y.string().trim().regex(_d,me.sprintf(w("Invalid %s"),ht("channels")))])})).optional().transform(e=>e==null?void 0:e.filter(Boolean)),send_when:Y.array(Y.enum(["new","existing"])).optional(),post_types:Y.array(Y.string()).optional(),rules:Y.array(Y.object({value:Y.array(Y.object({param:Y.string(),operator:Y.enum(["in","not_in"]),values:Y.array(Y.any()).optional()}))})).optional(),message_template:Y.string().optional(),excerpt_source:Y.enum(["post_content","before_more","post_excerpt"]).optional(),excerpt_length:Y.coerce.number().int().min(1).max(300).optional(),excerpt_preserve_eol:Y.boolean().optional(),send_featured_image:Y.boolean().optional(),image_position:Y.enum(["before","after"]).optional(),single_message:Y.boolean().optional(),cats_as_tags:Y.boolean().optional(),parse_mode:zc,protect_content:Y.boolean().optional(),link_preview_disabled:Y.boolean().optional(),link_preview_url:Y.string().optional(),link_preview_above_text:Y.boolean().optional(),inline_url_button:Y.boolean().optional(),inline_button_text:Y.string().optional(),inline_button_url:Y.string().optional(),post_edit_switch:Y.boolean().optional(),plugin_posts:Y.boolean().optional(),delay:Y.coerce.number().min(0).optional(),disable_notification:Y.boolean().optional()}).refine(e=>{var t,n;return!e.active||((n=(t=e.channels)==null?void 0:t.filter(r=>r.value.trim()))==null?void 0:n.length)},{message:me.sprintf(w("At least one %s is required."),w("channel")),path:["channels"]}),notify:Y.object({active:Y.boolean().optional(),watch_emails:Y.string().optional(),chat_ids:Y.array(Y.object({value:Y.union([Y.literal(""),Y.string().trim().regex(ky,me.sprintf(w("Invalid %s"),ht("chat_id")))])})).optional().transform(e=>e==null?void 0:e.filter(Boolean)),user_notifications:Y.boolean().optional(),message_template:Y.string().optional(),parse_mode:zc}).refine(e=>{var t,n;return!e.active||((n=(t=e.chat_ids)==null?void 0:t.filter(r=>r.value.trim()))==null?void 0:n.length)||e.user_notifications},{message:me.sprintf(w("At least one %s is required."),w("chat ID")),path:["chat_ids"]}),proxy:aw,advanced:Y.object({send_files_by_url:Y.boolean().optional(),enable_logs:Y.array(Y.enum(["bot_api","p2tg"])),clean_uninstall:Y.boolean().optional()})}),lw=Xb(af),cw=(e,t)=>{const n=window[e];return t?n==null?void 0:n[t]:n},cn=e=>cw("wptelegram",e);var ja,Hc;function uw(){return Hc||(Hc=1,ja=wp.apiFetch),ja}var dw=uw();const Ea=_s(dw),rl={GET:async e=>await Ea({method:"GET",...e}),POST:async e=>await Ea({method:"POST",...e}),PUT:async e=>await Ea({method:"PUT",...e})},sl=e=>{let t;if(e){const{error_code:n,description:r,code:s,message:o}=e||{},a=n||s,i=r||o;t=a?Number.isNaN(a)?i:`${a} (${i})`:w("Something went wrong")}else t=w("Could not connect");return me.sprintf("%s %s",w("Error:"),t)};class fw{constructor(t){We(this,"apiData",{});We(this,"botToken");We(this,"baseUrl","");We(this,"path","/wptelegram-bot/v1");We(this,"event");We(this,"deleteWebhook");We(this,"getChatMembersCount");We(this,"getMe");We(this,"getWebhookInfo");We(this,"sendMessage");We(this,"setWebhook");We(this,"sendPhoto");We(this,"sendVideo");We(this,"sendAudio");We(this,"sendDocument");We(this,"setBotToken",t=>{this.botToken=t});We(this,"setApiData",t=>{this.apiData=t});We(this,"setBaseUrl",t=>{this.baseUrl=t});We(this,"setEvent",t=>{this.event=(t==null?void 0:t.nativeEvent)||t});We(this,"getOptions",(t,n)=>{var s;location.hostname==="playground.wordpress.net"&&(this.apiData.use="BROWSER"),(s=this.event)!=null&&s.shiftKey&&(!this.apiData.use||this.apiData.use==="SERVER"?this.apiData.use="BROWSER":this.apiData.use==="BROWSER"&&(this.apiData.use="SERVER"));let r={};return this.apiData.use==="BROWSER"?r={data:n,url:this.buildUrl(t),credentials:"omit"}:r={data:{bot_token:this.botToken,api_params:n},path:`${this.path}/${t}/`},r});We(this,"buildUrl",t=>this.apiData.use==="BROWSER"?(this.setBaseUrl("https://api.telegram.org"),`${this.baseUrl}/bot${this.botToken}/${t}`):this.baseUrl);We(this,"sendRequest",async(t,n,r)=>{if(!this.botToken)throw new Error("Bot token is empty");const s={...this.getOptions(t,n),...r};return await rl.POST(s)});this.botToken=t||""}}const Tr=new window.Proxy(new fw,{get:(e,t)=>{const n=t;return typeof e[n]>"u"?async(r,s)=>await e.sendRequest(n,r,s):(typeof e[n]!="function",e[n])},set:(e,t,n)=>{const r=t;return typeof e[r]=="function"||r==="baseUrl"?!1:(e[r]=n,!0)}}),pw=()=>{f.useEffect(()=>{const{api:e}=cn();Tr.setApiData(e)},[])},lf=()=>{const e=f.useCallback(({title:o,...a})=>{tc.error(o,a)},[]),t=f.useCallback(({title:o,...a})=>{tc.success(o,a)},[]),n=f.useCallback(o=>{const a=Ey(o);for(const i of a)e({title:i})},[e]),r=f.useCallback(({[Sd]:o,...a},i)=>{console.log({errors:a,submitError:i,formError:o}),(i||o)&&e({title:i??o}),n(a)},[e,n]),s=f.useCallback((o,a)=>{const i=typeof a=="string"?a:w("Lets fix these errors first.");n(o),e({title:i})},[e,n]);return f.useMemo(()=>({displayError:e,displaySuccess:t,displaySubmitErrors:r,displayValidationErrors:s}),[e,t,r,s])},mw=()=>{const{displayValidationErrors:e}=lf();return f.useCallback(t=>e(t),[e])},Ra=e=>e,hw=({displayFeedback:e=!0,form:t,formatErrors:n=Ra,getErrorMessage:r,normalizeData:s=Ra,path:o,prepDefaultValues:a=Ra,resetForm:i,onSubmitSuccess:l})=>{var h,g;const u=f.useRef(),p=(h=t==null?void 0:t.formState)==null?void 0:h.isSubmitted,d=(g=t==null?void 0:t.formState)==null?void 0:g.isSubmitSuccessful;f.useEffect(()=>{if(p&&d){const x=a(u.current);t.reset(x)}},[p,d,a,i,t]);const{displaySuccess:m,displaySubmitErrors:v}=lf();return f.useCallback(async x=>{try{const b=s(x);u.current=await rl.POST({data:b,path:o}),l==null||l(u.current),e&&m({title:w("Changes saved successfully.")})}catch(b){console.log("ERROR",b);let S={};if(b&&typeof b=="object"&&"code"in b&&b.code&&"data"in b&&b.data&&typeof b.data=="object"&&"params"in b.data&&typeof b.data.params=="object"){if(b.code==="rest_invalid_param"){const{params:E={}}=b.data;for(const _ in E){const j=fo(_),k={message:r(Cc(j),"invalid"),type:"submit"};S[j.join(".")]=k}}else if(b.code==="rest_missing_callback_param"&&Array.isArray(b.data.params))for(const E of b.data.params){const _=fo(E),j={message:r(Cc(_),"required"),type:"submit"};S[_.join(".")]=j}}if(t!=null&&t.setError)for(const[E,_]of Object.entries(S))t.setError(E,_);return S=Object.assign({},n(S),r(null,null)),e&&v(S),[!1,S]}return[!0,u.current]},[e,v,m,t==null?void 0:t.setError,n,r,s,l,o])},cf=e=>t=>{const n=["p2tg","channels"],r=Js([],n,t).map(e);let s=Xs(n,r,t);const o=["p2tg","rules"],a=Js([],o,s).map(e);s=Xs(o,a,s);const i=["notify","chat_ids"],l=Js([],i,s).map(e);return s=Xs(i,l,s),s},gw=cy(wy(Ki),ay("@"),yd),vw=vy(["p2tg","channels"]),yw=yy(vw,Zi(vd(Cy,gw))),uf=cf(my("value")),bw=vd(cf(qi("value")),yw),xw=e=>{const{rest_namespace:t}=cn("api"),n=`${t}/settings/`,r=hw({form:e,path:n,getErrorMessage:lw,normalizeData:bw,prepDefaultValues:uf,resetForm:!0});return f.useCallback(async s=>await r(s),[r])},df=({children:e,...t})=>c.jsx("p",{...t,className:$("mt-[2px] mb-[5px] italic text-[#646970]",t.className),children:e}),un=({body:e,children:t,title:n,className:r,headerClassName:s,bodyClassName:o,headingLevel:a="h3",...i})=>c.jsxs("section",{className:$("border rounded-t-md border-gray-200 mb-8 overflow-hidden",r),...i,children:[c.jsx(a,{className:$("bg-[#eaeaea] px-4 py-2",s),children:n}),c.jsx("div",{className:$("px-6 py-4",o),children:e||t})]}),ww=({assets:e,title:t,version:n,description:r,socialIcons:s,...o})=>c.jsxs(un,{title:c.jsxs("div",{className:"flex items-center",children:[e.logoUrl&&c.jsx("img",{alt:t,src:e.logoUrl,className:"inline-block h-8 me-2 align-middle w-8"}),c.jsxs("div",{className:"w-full flex items-baseline",children:[c.jsx("h4",{className:"text-xl font-semibold inline-block m-0 max-w-[80%] whitespace-nowrap overflow-hidden overflow-ellipsis line-h-[1.3]",children:t}),c.jsxs("span",{className:"text-sm text-gray-500 italic",children:[" v",n]})]})]}),...o,children:[c.jsx(df,{children:r}),s]}),{pluginInfo:_w,assets:Sw}=cn(),Cw=()=>c.jsx(ww,{..._w,assets:Sw});function kw(e){const t=f.useCallback(s=>{const o=window.matchMedia(e);return o.addEventListener("change",s),()=>{o.removeEventListener("change",s)}},[e]),n=()=>window.matchMedia(e).matches,r=()=>{throw Error("useMediaQuery is a client-only hook")};return f.useSyncExternalStore(t,n,r)}function $t(e,t=[]){let n=[];function r(o,a){const i=f.createContext(a),l=n.length;n=[...n,a];const u=d=>{var x;const{scope:m,children:v,...y}=d,h=((x=m==null?void 0:m[e])==null?void 0:x[l])||i,g=f.useMemo(()=>y,Object.values(y));return c.jsx(h.Provider,{value:g,children:v})};u.displayName=o+"Provider";function p(d,m){var h;const v=((h=m==null?void 0:m[e])==null?void 0:h[l])||i,y=f.useContext(v);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[u,p]}const s=()=>{const o=n.map(a=>f.createContext(a));return function(i){const l=(i==null?void 0:i[e])||o;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return s.scopeName=e,[r,jw(s,...t)]}function jw(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const a=r.reduce((i,{useScope:l,scopeName:u})=>{const d=l(o)[`__scope${u}`];return{...i,...d}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function ol(e){const t=e+"CollectionProvider",[n,r]=$t(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=h=>{const{scope:g,children:x}=h,b=O.useRef(null),S=O.useRef(new Map).current;return c.jsx(s,{scope:g,itemMap:S,collectionRef:b,children:x})};a.displayName=t;const i=e+"CollectionSlot",l=ns(i),u=O.forwardRef((h,g)=>{const{scope:x,children:b}=h,S=o(i,x),E=Le(g,S.collectionRef);return c.jsx(l,{ref:E,children:b})});u.displayName=i;const p=e+"CollectionItemSlot",d="data-radix-collection-item",m=ns(p),v=O.forwardRef((h,g)=>{const{scope:x,children:b,...S}=h,E=O.useRef(null),_=Le(g,E),j=o(p,x);return O.useEffect(()=>(j.itemMap.set(E,{ref:E,...S}),()=>void j.itemMap.delete(E))),c.jsx(m,{[d]:"",ref:_,children:b})});v.displayName=p;function y(h){const g=o(e+"CollectionConsumer",h);return O.useCallback(()=>{const b=g.collectionRef.current;if(!b)return[];const S=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((j,k)=>S.indexOf(j.ref.current)-S.indexOf(k.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:u,ItemSlot:v},y,r]}function ye(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function an(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Yt({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=Ew({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,i=an(n),l=f.useCallback(u=>{if(o){const d=typeof u=="function"?u(e):u;d!==e&&i(d)}else s(u)},[o,e,s,i]);return[a,l]}function Ew({defaultProp:e,onChange:t}){const n=f.useState(e),[r]=n,s=f.useRef(r),o=an(t);return f.useEffect(()=>{s.current!==r&&(o(r),s.current=r)},[r,s,o]),n}var yt=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{};function Rw(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var Dr=e=>{const{present:t,children:n}=e,r=Tw(t),s=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),o=Le(r.ref,Ow(s));return typeof n=="function"||r.isPresent?f.cloneElement(s,{ref:o}):null};Dr.displayName="Presence";function Tw(e){const[t,n]=f.useState(),r=f.useRef({}),s=f.useRef(e),o=f.useRef("none"),a=e?"mounted":"unmounted",[i,l]=Rw(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=Ls(r.current);o.current=i==="mounted"?u:"none"},[i]),yt(()=>{const u=r.current,p=s.current;if(p!==e){const m=o.current,v=Ls(u);e?l("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(p&&m!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),yt(()=>{if(t){let u;const p=t.ownerDocument.defaultView??window,d=v=>{const h=Ls(r.current).includes(v.animationName);if(v.target===t&&h&&(l("ANIMATION_END"),!s.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(o.current=Ls(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{p.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Ls(e){return(e==null?void 0:e.animationName)||"none"}function Ow(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Aw=Qa[" useId ".trim().toString()]||(()=>{}),Iw=0;function Bn(e){const[t,n]=f.useState(Aw());return yt(()=>{n(r=>r??String(Iw++))},[e]),e||(t?`radix-${t}`:"")}var al="Collapsible",[Nw,ff]=$t(al),[Pw,il]=Nw(al),pf=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:o,onOpenChange:a,...i}=e,[l=!1,u]=Yt({prop:r,defaultProp:s,onChange:a});return c.jsx(Pw,{scope:n,disabled:o,contentId:Bn(),open:l,onOpenToggle:f.useCallback(()=>u(p=>!p),[u]),children:c.jsx(we.div,{"data-state":dl(l),"data-disabled":o?"":void 0,...i,ref:t})})});pf.displayName=al;var mf="CollapsibleTrigger",ll=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,s=il(mf,n);return c.jsx(we.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":dl(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:t,onClick:ye(e.onClick,s.onOpenToggle)})});ll.displayName=mf;var cl="CollapsibleContent",ul=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=il(cl,e.__scopeCollapsible);return c.jsx(Dr,{present:n||s.open,children:({present:o})=>c.jsx(Mw,{...r,ref:t,present:o})})});ul.displayName=cl;var Mw=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:s,...o}=e,a=il(cl,n),[i,l]=f.useState(r),u=f.useRef(null),p=Le(t,u),d=f.useRef(0),m=d.current,v=f.useRef(0),y=v.current,h=a.open||i,g=f.useRef(h),x=f.useRef(void 0);return f.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),yt(()=>{const b=u.current;if(b){x.current=x.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const S=b.getBoundingClientRect();d.current=S.height,v.current=S.width,g.current||(b.style.transitionDuration=x.current.transitionDuration,b.style.animationName=x.current.animationName),l(r)}},[a.open,r]),c.jsx(we.div,{"data-state":dl(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!h,...o,ref:p,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:h&&s})});function dl(e){return e?"open":"closed"}var hf=pf,Dw=ll,Fw=ul,Vw=f.createContext(void 0);function js(e){const t=f.useContext(Vw);return e||t||"ltr"}var wn="Accordion",Lw=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[fl,$w,Bw]=ol(wn),[Vo,BT]=$t(wn,[Bw,ff]),pl=ff(),gf=O.forwardRef((e,t)=>{const{type:n,...r}=e,s=r,o=r;return c.jsx(fl.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?c.jsx(Ww,{...o,ref:t}):c.jsx(Hw,{...s,ref:t})})});gf.displayName=wn;var[vf,Uw]=Vo(wn),[yf,zw]=Vo(wn,{collapsible:!1}),Hw=O.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:o=!1,...a}=e,[i,l]=Yt({prop:n,defaultProp:r,onChange:s});return c.jsx(vf,{scope:e.__scopeAccordion,value:i?[i]:[],onItemOpen:l,onItemClose:O.useCallback(()=>o&&l(""),[o,l]),children:c.jsx(yf,{scope:e.__scopeAccordion,collapsible:o,children:c.jsx(bf,{...a,ref:t})})})}),Ww=O.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...o}=e,[a=[],i]=Yt({prop:n,defaultProp:r,onChange:s}),l=O.useCallback(p=>i((d=[])=>[...d,p]),[i]),u=O.useCallback(p=>i((d=[])=>d.filter(m=>m!==p)),[i]);return c.jsx(vf,{scope:e.__scopeAccordion,value:a,onItemOpen:l,onItemClose:u,children:c.jsx(yf,{scope:e.__scopeAccordion,collapsible:!0,children:c.jsx(bf,{...o,ref:t})})})}),[Zw,Lo]=Vo(wn),bf=O.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:o="vertical",...a}=e,i=O.useRef(null),l=Le(i,t),u=$w(n),d=js(s)==="ltr",m=ye(e.onKeyDown,v=>{var R;if(!Lw.includes(v.key))return;const y=v.target,h=u().filter(N=>{var F;return!((F=N.ref.current)!=null&&F.disabled)}),g=h.findIndex(N=>N.ref.current===y),x=h.length;if(g===-1)return;v.preventDefault();let b=g;const S=0,E=x-1,_=()=>{b=g+1,b>E&&(b=S)},j=()=>{b=g-1,b<S&&(b=E)};switch(v.key){case"Home":b=S;break;case"End":b=E;break;case"ArrowRight":o==="horizontal"&&(d?_():j());break;case"ArrowDown":o==="vertical"&&_();break;case"ArrowLeft":o==="horizontal"&&(d?j():_());break;case"ArrowUp":o==="vertical"&&j();break}const k=b%x;(R=h[k].ref.current)==null||R.focus()});return c.jsx(Zw,{scope:n,disabled:r,direction:s,orientation:o,children:c.jsx(fl.Slot,{scope:n,children:c.jsx(we.div,{...a,"data-orientation":o,ref:l,onKeyDown:r?void 0:m})})})}),xo="AccordionItem",[Gw,ml]=Vo(xo),xf=O.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...s}=e,o=Lo(xo,n),a=Uw(xo,n),i=pl(n),l=Bn(),u=r&&a.value.includes(r)||!1,p=o.disabled||e.disabled;return c.jsx(Gw,{scope:n,open:u,disabled:p,triggerId:l,children:c.jsx(hf,{"data-orientation":o.orientation,"data-state":jf(u),...i,...s,ref:t,disabled:p,open:u,onOpenChange:d=>{d?a.onItemOpen(r):a.onItemClose(r)}})})});xf.displayName=xo;var wf="AccordionHeader",_f=O.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=Lo(wn,n),o=ml(wf,n);return c.jsx(we.h3,{"data-orientation":s.orientation,"data-state":jf(o.open),"data-disabled":o.disabled?"":void 0,...r,ref:t})});_f.displayName=wf;var mi="AccordionTrigger",Sf=O.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=Lo(wn,n),o=ml(mi,n),a=zw(mi,n),i=pl(n);return c.jsx(fl.ItemSlot,{scope:n,children:c.jsx(Dw,{"aria-disabled":o.open&&!a.collapsible||void 0,"data-orientation":s.orientation,id:o.triggerId,...i,...r,ref:t})})});Sf.displayName=mi;var Cf="AccordionContent",kf=O.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=Lo(wn,n),o=ml(Cf,n),a=pl(n);return c.jsx(Fw,{role:"region","aria-labelledby":o.triggerId,"data-orientation":s.orientation,...a,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});kf.displayName=Cf;function jf(e){return e?"open":"closed"}var qw=gf,Yw=xf,Kw=_f,Ef=Sf,Rf=kf;const Xw=qw,Tf=f.forwardRef(({className:e,...t},n)=>c.jsx(Yw,{ref:n,className:$("border-b",e),...t}));Tf.displayName="AccordionItem";const Of=f.forwardRef(({className:e,children:t,...n},r)=>c.jsx(Kw,{className:"flex",children:c.jsxs(Ef,{ref:r,className:$("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,c.jsx(Mo,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Of.displayName=Ef.displayName;const Af=f.forwardRef(({className:e,children:t,...n},r)=>c.jsx(Rf,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:c.jsx("div",{className:$("pb-4 pt-0",e),children:t})}));Af.displayName=Rf.displayName;function Jw({items:e,type:t="single",className:n,forceMountContent:r,collapsible:s=!0,defaultOpen:o,...a}){const i=t==="single"?{type:t,collapsible:s,defaultValue:o}:{type:"multiple"};return c.jsx(Xw,{...a,className:$("w-full",n),...i,children:e.map(({value:l,trigger:u,children:p,content:d,wrapperClassName:m,...v})=>{const y=d||p,h=typeof y=="function"?y(l):y;return c.jsxs(Tf,{value:l,className:m,children:[c.jsx(Of,{...v,children:u}),c.jsx(Af,{forceMount:r,children:h})]},l)})})}const rt=f.forwardRef(({children:e,isExternal:t,className:n,...r},s)=>c.jsx("a",{className:$("text-sky-700",n),ref:s,rel:t?"noopener noreferrer":void 0,target:t?"_blank":void 0,...r,children:e}));rt.displayName="Link";const Qw=()=>c.jsx("span",{role:"img","aria-label":"Smile",children:"🙂"}),Zn=e=>c.jsx("div",{...e,className:$("p-4 border-b border-gray-200 w-full",e.className)}),e0=({description:e,helpText:t,reviewLink:n,socialIcons:r,supportLink:s,supportLinkText:o,title:a,upsell:i,className:l})=>{const u=kw("(min-width: 768px)");return c.jsx(Jw,{className:$("border rounded-sm border-gray-200",l),defaultOpen:u?"plugin-info":void 0,items:[{value:"plugin-info",trigger:a,className:"px-4",wrapperClassName:"border-b-0",content:()=>c.jsxs("div",{className:"flex flex-col gap-4 items-center text-base",children:[c.jsx(Zn,{children:c.jsx(df,{children:e})}),r&&c.jsx(Zn,{children:r}),n&&c.jsxs(Zn,{className:"text-center",children:[c.jsx("p",{className:"mb-2",children:me.sprintf(w("Do you like %s?"),a)}),c.jsx("div",{children:c.jsx(rt,{href:n,rel:"noopener noreferrer",target:"_blank",className:"p-2",children:c.jsx("span",{"aria-label":w("Write a review"),className:"text-orange-300 text-2xl",children:"★★★★★"})})})]}),i&&c.jsx(Zn,{className:"text-center",children:i}),c.jsxs(Zn,{className:"border-b-0 text-center",children:[c.jsx("div",{children:c.jsx("span",{children:w("Need help?")})}),t&&c.jsx("div",{children:c.jsx("span",{className:"font-semibold",children:t})})]}),s&&c.jsx(Zn,{className:"p-0 border-b-0 w-full text-center",children:c.jsx(rt,{className:"block py-3 px-5 bg-blue-100 text-blue-800 font-bold italic",href:s,target:"_blank",rel:"noopener noreferrer",children:o||t})}),c.jsx(Zn,{className:"border-b-0 py-0 text-center",children:c.jsx("div",{children:c.jsx(Qw,{})})})]})}]})},t0=({tgIconUrl:e})=>(f.useEffect(()=>{Ec("facebook-jssdk","//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.9"),Ec("twitter-widget","https://platform.twitter.com/widgets.js")},[]),c.jsxs("div",{className:"flex flex-col gap-4 items-center",children:[c.jsx("div",{children:c.jsx("div",{className:"fb-like","data-href":"https://www.facebook.com/WPTelegram","data-layout":"button_count","data-action":"like","data-size":"small","data-show-faces":"false","data-share":"false"})}),c.jsx("div",{children:c.jsx("a",{href:"https://twitter.com/WPTelegram",className:"twitter-follow-button","data-show-count":"false",children:me.sprintf(w("Follow %s"),"@WPTelegram")})}),c.jsx("div",{children:c.jsxs(rt,{href:"https://t.me/WPTelegram",className:"flex items-center bg-[#17a2b8] rounded-md py-px px-1 whitespace-nowrap",isExternal:!0,children:[c.jsx("img",{src:e,alt:"",className:"me-1 size-3 align-middle"}),c.jsx("small",{className:"text-white text-sm",children:me.sprintf(w("Join %s"),"@WPTelegram")})]})})]})),n0=({data:e,asJson:t=!0})=>null,r0=({debug:e=!0,data:t})=>e&&c.jsx(n0,{data:t}),s0=["rules","template","delay","proxy-method"],o0=({children:e,...t})=>c.jsx(rt,{href:"https://wptelegram.pro",isExternal:!0,className:"button-primary text-neutral-50",...t,children:e||w("Upgrade to Pro")}),_n=({breakLine:e,location:t,className:n})=>{let r=w("Want an absolute integration with Telegram?");switch(t){case"bot":r=w("Want to add more bots?");break;case"sidebar":r=w("Need more features?");break;case"channels":r=w("Want to use different channels for different categories?");break;case"rules":r=me.sprintf(w("%s supports multiple instances of Post to Telgram with different rules."),w("WP Telegram Pro"));break;case"template":r=me.sprintf(w("%s supports ALL WooCommerce and ACF text fields."),w("WP Telegram Pro"));break;case"inline-button":r=w("Want to add more buttons?");break;case"delay":r=me.sprintf(w("%s supports delay per channel."),w("WP Telegram Pro"));break;case"watch-emails":r=w("Want to add more emails?");break;case"proxy-method":r=me.sprintf(w("%s supports Cloudflare proxy for featured image upload!"),w("WP Telegram Pro"));break}const s=s0.includes(t)&&w("Upgrade NOW");return c.jsxs("p",{className:$("font-medium my-6",n),children:[c.jsxs("span",{className:"text-gray-500",children:[r,e?c.jsxs(c.Fragment,{children:[c.jsx("br",{}),c.jsx("br",{})]}):c.jsx(c.Fragment,{children:" "})]}),c.jsx(o0,{children:s})]})},{pluginInfo:{title:a0},assets:{tgIconUrl:i0}}=cn(),l0=()=>{const{watch:e}=Pt();return c.jsxs("div",{children:[c.jsx(e0,{description:`${a0}: ${w("Integrate your WordPress website perfectly with Telegram. Send posts automatically to Telegram when published or updated, whether to a Telegram Channel, Group or private chat, with full control. Get your email notifications on Telegram.")}`,helpText:w("Join our public chat on Telegram"),reviewLink:"https://wordpress.org/support/plugin/wptelegram/reviews/#new-post",supportLink:"https://t.me/WPTelegramChat",supportLinkText:"@WPTelegramChat",socialIcons:c.jsx(t0,{tgIconUrl:i0}),title:w("Support"),className:"mb-4",upsell:c.jsx(_n,{location:"sidebar",className:"font-normal"})}),c.jsx(r0,{data:e()})]})},If=(e,t,n=localStorage)=>{const r=f.useCallback(()=>{let i;try{i=(n==null?void 0:n.getItem(e))??""}catch{return{}}return i?JSON.parse(i):t},[t,n,e]),s=f.useCallback(i=>{try{n.setItem(e,JSON.stringify(i))}catch{}},[n,e]),o=f.useCallback((i,l)=>{var p;return((p=r())==null?void 0:p[i])??l},[r]),a=f.useCallback((i,l)=>s({...r(),[i]:l}),[r,s]);return f.useMemo(()=>({getData:r,setData:s,getItem:o,setItem:a}),[r,o,s,a])},c0="mainActiveTab",u0=(e,t=c0)=>{const{getItem:n,setItem:r}=If(e,{}),s=f.useCallback(a=>n(t,a),[n,t]),o=f.useCallback(a=>r(t,a),[r,t]);return f.useMemo(()=>({getActiveTab:s,setActiveTab:o}),[s,o])},Nf=f.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:$("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Nf.displayName="Card";const Pf=f.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:$("flex flex-col space-y-1.5 p-6",e),...t}));Pf.displayName="CardHeader";const Mf=f.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:$("text-2xl font-semibold leading-none tracking-tight",e),...t}));Mf.displayName="CardTitle";const Df=f.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:$("text-sm text-muted-foreground",e),...t}));Df.displayName="CardDescription";const Ff=f.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:$("p-6 pt-0",e),...t}));Ff.displayName="CardContent";const Vf=f.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:$("flex items-center p-6 pt-0",e),...t}));Vf.displayName="CardFooter";function d0({title:e,description:t,className:n,content:r,footer:s,children:o,titleClassName:a,headerClassName:i,contentClassName:l}){return c.jsxs(Nf,{className:$("w-[350px] flex flex-col justify-between",n),children:[e||t?c.jsxs(Pf,{className:i,children:[e?c.jsx(Mf,{className:a,children:e}):null,t?c.jsx(Df,{children:t}):null]}):null,c.jsx(Ff,{className:l,children:r||o}),s?c.jsx(Vf,{children:s}):null]})}var Ta="rovingFocusGroup.onEntryFocus",f0={bubbles:!1,cancelable:!0},$o="RovingFocusGroup",[hi,Lf,p0]=ol($o),[m0,Bo]=$t($o,[p0]),[h0,g0]=m0($o),$f=f.forwardRef((e,t)=>c.jsx(hi.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(hi.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(v0,{...e,ref:t})})}));$f.displayName=$o;var v0=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:p=!1,...d}=e,m=f.useRef(null),v=Le(t,m),y=js(o),[h=null,g]=Yt({prop:a,defaultProp:i,onChange:l}),[x,b]=f.useState(!1),S=an(u),E=Lf(n),_=f.useRef(!1),[j,k]=f.useState(0);return f.useEffect(()=>{const R=m.current;if(R)return R.addEventListener(Ta,S),()=>R.removeEventListener(Ta,S)},[S]),c.jsx(h0,{scope:n,orientation:r,dir:y,loop:s,currentTabStopId:h,onItemFocus:f.useCallback(R=>g(R),[g]),onItemShiftTab:f.useCallback(()=>b(!0),[]),onFocusableItemAdd:f.useCallback(()=>k(R=>R+1),[]),onFocusableItemRemove:f.useCallback(()=>k(R=>R-1),[]),children:c.jsx(we.div,{tabIndex:x||j===0?-1:0,"data-orientation":r,...d,ref:v,style:{outline:"none",...e.style},onMouseDown:ye(e.onMouseDown,()=>{_.current=!0}),onFocus:ye(e.onFocus,R=>{const N=!_.current;if(R.target===R.currentTarget&&N&&!x){const F=new CustomEvent(Ta,f0);if(R.currentTarget.dispatchEvent(F),!F.defaultPrevented){const z=E().filter(I=>I.focusable),M=z.find(I=>I.active),B=z.find(I=>I.id===h),L=[M,B,...z].filter(Boolean).map(I=>I.ref.current);zf(L,p)}}_.current=!1}),onBlur:ye(e.onBlur,()=>b(!1))})})}),Bf="RovingFocusGroupItem",Uf=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,...a}=e,i=Bn(),l=o||i,u=g0(Bf,n),p=u.currentTabStopId===l,d=Lf(n),{onFocusableItemAdd:m,onFocusableItemRemove:v}=u;return f.useEffect(()=>{if(r)return m(),()=>v()},[r,m,v]),c.jsx(hi.ItemSlot,{scope:n,id:l,focusable:r,active:s,children:c.jsx(we.span,{tabIndex:p?0:-1,"data-orientation":u.orientation,...a,ref:t,onMouseDown:ye(e.onMouseDown,y=>{r?u.onItemFocus(l):y.preventDefault()}),onFocus:ye(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:ye(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){u.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const h=x0(y,u.orientation,u.dir);if(h!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let x=d().filter(b=>b.focusable).map(b=>b.ref.current);if(h==="last")x.reverse();else if(h==="prev"||h==="next"){h==="prev"&&x.reverse();const b=x.indexOf(y.currentTarget);x=u.loop?w0(x,b+1):x.slice(b+1)}setTimeout(()=>zf(x))}})})})});Uf.displayName=Bf;var y0={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function b0(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function x0(e,t,n){const r=b0(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return y0[r]}function zf(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function w0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Hf=$f,Wf=Uf,hl="Tabs",[_0,UT]=$t(hl,[Bo]),Zf=Bo(),[S0,gl]=_0(hl),Gf=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:o,orientation:a="horizontal",dir:i,activationMode:l="automatic",...u}=e,p=js(i),[d,m]=Yt({prop:r,onChange:s,defaultProp:o});return c.jsx(S0,{scope:n,baseId:Bn(),value:d,onValueChange:m,orientation:a,dir:p,activationMode:l,children:c.jsx(we.div,{dir:p,"data-orientation":a,...u,ref:t})})});Gf.displayName=hl;var qf="TabsList",Yf=f.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,o=gl(qf,n),a=Zf(n);return c.jsx(Hf,{asChild:!0,...a,orientation:o.orientation,dir:o.dir,loop:r,children:c.jsx(we.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:t})})});Yf.displayName=qf;var Kf="TabsTrigger",Xf=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...o}=e,a=gl(Kf,n),i=Zf(n),l=ep(a.baseId,r),u=tp(a.baseId,r),p=r===a.value;return c.jsx(Wf,{asChild:!0,...i,focusable:!s,active:p,children:c.jsx(we.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":u,"data-state":p?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:l,...o,ref:t,onMouseDown:ye(e.onMouseDown,d=>{!s&&d.button===0&&d.ctrlKey===!1?a.onValueChange(r):d.preventDefault()}),onKeyDown:ye(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&a.onValueChange(r)}),onFocus:ye(e.onFocus,()=>{const d=a.activationMode!=="manual";!p&&!s&&d&&a.onValueChange(r)})})})});Xf.displayName=Kf;var Jf="TabsContent",Qf=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:o,...a}=e,i=gl(Jf,n),l=ep(i.baseId,r),u=tp(i.baseId,r),p=r===i.value,d=f.useRef(p);return f.useEffect(()=>{const m=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(m)},[]),c.jsx(Dr,{present:s||p,children:({present:m})=>c.jsx(we.div,{"data-state":p?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!m,id:u,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:m&&o})})});Qf.displayName=Jf;function ep(e,t){return`${e}-trigger-${t}`}function tp(e,t){return`${e}-content-${t}`}var C0=Gf,np=Yf,rp=Xf,sp=Qf;const k0=C0,op=f.forwardRef(({className:e,...t},n)=>c.jsx(np,{ref:n,className:$("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));op.displayName=np.displayName;const ap=f.forwardRef(({className:e,...t},n)=>c.jsx(rp,{ref:n,className:$("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));ap.displayName=rp.displayName;const ip=f.forwardRef(({className:e,...t},n)=>c.jsx(sp,{ref:n,className:$("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));ip.displayName=sp.displayName;function j0({items:e,renderTabContent:t,renderTabTrigger:n,...r}){return c.jsxs(k0,{...r,children:[c.jsx(op,{className:"h-auto flex-wrap justify-start gap-2",children:e.map(s=>c.jsx(c.Fragment,{children:c.jsx(ap,{value:s.id,children:(n==null?void 0:n(s))||s.title})},s.id))}),e.map(s=>c.jsx(c.Fragment,{children:c.jsx(ip,{value:s.id,children:(t==null?void 0:t(s))||c.jsx(s.Component,{})})},s.id))]})}var E0="Label",lp=f.forwardRef((e,t)=>c.jsx(we.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));lp.displayName=E0;var cp=lp;const R0=Ji("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),vl=f.forwardRef(({className:e,...t},n)=>c.jsx(cp,{ref:n,className:$(R0(),e),...t}));vl.displayName=cp.displayName;const up=f.createContext({}),T0=({...e})=>c.jsx(up.Provider,{value:{name:e.name},children:c.jsx(lv,{...e})}),Es=()=>{const e=f.useContext(up),t=f.useContext(dp),{getFieldState:n,formState:r}=Pt(),s=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...s}},dp=f.createContext({}),gs=f.forwardRef(({className:e,...t},n)=>{const r=f.useId();return c.jsx(dp.Provider,{value:{id:r},children:c.jsx("div",{ref:n,className:$("space-y-2",e),...t})})});gs.displayName="FormItem";const O0=f.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s}=Es();return c.jsx(vl,{ref:n,className:$(r&&"text-destructive",e),htmlFor:s,...t})});O0.displayName="FormLabel";const Se=f.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:o}=Es();return c.jsx(Bd,{ref:t,id:r,"aria-describedby":n?`${s} ${o}`:`${s}`,"aria-invalid":!!n,...e})});Se.displayName="FormControl";const yl=f.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=Es();return c.jsx("p",{ref:n,id:r,className:$("text-sm text-muted-foreground",e),...t})});yl.displayName="FormDescription";const bl=f.forwardRef(({className:e,children:t,...n},r)=>{const{error:s,formMessageId:o}=Es(),a=s?String(s==null?void 0:s.message):t;return a?c.jsx("p",{ref:r,id:o,className:$("text-sm font-medium text-destructive",e),...n,children:a}):null});bl.displayName="FormMessage";function Uo(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function zo(e){const[t,n]=f.useState(void 0);return yt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let a,i;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,i=u.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var xl="Switch",[A0,zT]=$t(xl),[I0,N0]=A0(xl),fp=f.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:o,required:a,disabled:i,value:l="on",onCheckedChange:u,form:p,...d}=e,[m,v]=f.useState(null),y=Le(t,S=>v(S)),h=f.useRef(!1),g=m?p||!!m.closest("form"):!0,[x=!1,b]=Yt({prop:s,defaultProp:o,onChange:u});return c.jsxs(I0,{scope:n,checked:x,disabled:i,children:[c.jsx(we.button,{type:"button",role:"switch","aria-checked":x,"aria-required":a,"data-state":hp(x),"data-disabled":i?"":void 0,disabled:i,value:l,...d,ref:y,onClick:ye(e.onClick,S=>{b(E=>!E),g&&(h.current=S.isPropagationStopped(),h.current||S.stopPropagation())})}),g&&c.jsx(P0,{control:m,bubbles:!h.current,name:r,value:l,checked:x,required:a,disabled:i,form:p,style:{transform:"translateX(-100%)"}})]})});fp.displayName=xl;var pp="SwitchThumb",mp=f.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=N0(pp,n);return c.jsx(we.span,{"data-state":hp(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});mp.displayName=pp;var P0=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,o=f.useRef(null),a=Uo(n),i=zo(t);return f.useEffect(()=>{const l=o.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&d){const m=new Event("click",{bubbles:r});d.call(l,n),l.dispatchEvent(m)}},[a,n,r]),c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function hp(e){return e?"checked":"unchecked"}var gp=fp,M0=mp;const bt=f.forwardRef(({className:e,...t},n)=>c.jsx(gp,{className:$("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:c.jsx(M0,{className:$("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));bt.displayName=gp.displayName;const D0={overflowWrap:"anywhere"},Rs=({children:e,...t})=>c.jsx("code",{...t,style:D0,className:$("whitespace-pre-wrap p-2 text-[#c10808] bg-transparent text-left text-sm",t.className),children:e}),Ho=f.forwardRef(({children:e,isRequired:t,...n},r)=>c.jsxs(vl,{ref:r,...n,className:$("text-base",n.className),children:[e,t&&c.jsx("span",{role:"presentation","aria-hidden":"true",className:"text-destructive ms-1",children:"*"})]}));Ho.displayName="Label";const wl=f.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s}=Es();return c.jsx(Ho,{ref:n,className:$(r&&"text-destructive",e),htmlFor:s,...t})});wl.displayName="FormLabel";const xe=e=>{const{control:t}=Pt();return c.jsx(T0,{control:t,...e})};function Te({afterMessage:e,label:t,isRequired:n,isDisabled:r,control:s,description:o,children:a,controlWrapperClassName:i,...l}){return c.jsxs(gs,{...l,className:$("flex flex-col md:flex-row gap-2 md:py-4",l.className),children:[t?c.jsx(wl,{className:$("md:basis-[30%] mb-0 mt-0",{"opacity-50 cursor-not-allowed":r}),isRequired:n,children:t}):null,c.jsxs("div",{className:"flex flex-col gap-3 md:flex-1",children:[c.jsx("div",{className:$("flex w-full gap-4 max-w-lg items-center flex-wrap sm:flex-nowrap",i),children:s||a}),o?c.jsx(yl,{className:$({"opacity-50":r}),children:o}):null,c.jsx(bl,{}),e]})]})}var _l="Checkbox",[F0,HT]=$t(_l),[V0,L0]=F0(_l),vp=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:s,defaultChecked:o,required:a,disabled:i,value:l="on",onCheckedChange:u,form:p,...d}=e,[m,v]=f.useState(null),y=Le(t,E=>v(E)),h=f.useRef(!1),g=m?p||!!m.closest("form"):!0,[x=!1,b]=Yt({prop:s,defaultProp:o,onChange:u}),S=f.useRef(x);return f.useEffect(()=>{const E=m==null?void 0:m.form;if(E){const _=()=>b(S.current);return E.addEventListener("reset",_),()=>E.removeEventListener("reset",_)}},[m,b]),c.jsxs(V0,{scope:n,state:x,disabled:i,children:[c.jsx(we.button,{type:"button",role:"checkbox","aria-checked":An(x)?"mixed":x,"aria-required":a,"data-state":xp(x),"data-disabled":i?"":void 0,disabled:i,value:l,...d,ref:y,onKeyDown:ye(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:ye(e.onClick,E=>{b(_=>An(_)?!0:!_),g&&(h.current=E.isPropagationStopped(),h.current||E.stopPropagation())})}),g&&c.jsx($0,{control:m,bubbles:!h.current,name:r,value:l,checked:x,required:a,disabled:i,form:p,style:{transform:"translateX(-100%)"},defaultChecked:An(o)?!1:o})]})});vp.displayName=_l;var yp="CheckboxIndicator",bp=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...s}=e,o=L0(yp,n);return c.jsx(Dr,{present:r||An(o.state)||o.state===!0,children:c.jsx(we.span,{"data-state":xp(o.state),"data-disabled":o.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});bp.displayName=yp;var $0=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:s,...o}=e,a=f.useRef(null),i=Uo(n),l=zo(t);f.useEffect(()=>{const p=a.current,d=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(d,"checked").set;if(i!==n&&v){const y=new Event("click",{bubbles:r});p.indeterminate=An(n),v.call(p,An(n)?!1:n),p.dispatchEvent(y)}},[i,n,r]);const u=f.useRef(An(n)?!1:n);return c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:s??u.current,...o,tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function An(e){return e==="indeterminate"}function xp(e){return An(e)?"indeterminate":e?"checked":"unchecked"}var _p=vp,B0=bp;const Sp=f.forwardRef(({className:e,...t},n)=>c.jsx(_p,{ref:n,className:$("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:c.jsx(B0,{className:$("flex items-center justify-center text-current"),children:c.jsx(Zd,{className:"h-4 w-4"})})}));Sp.displayName=_p.displayName;const Cp=f.forwardRef(({children:e,description:t,id:n,wrapperClassName:r,labelWrapperClassName:s,...o},a)=>{const i=f.useId(),l=n||i;return c.jsxs("div",{className:$("items-top flex space-x-2",r),children:[c.jsx(Sp,{ref:a,id:l,...o}),c.jsxs("div",{className:$("grid gap-1.5 leading-none",s),children:[c.jsx(Ho,{htmlFor:l,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:e}),t]})]})});Cp.displayName="Checkbox";function gi({name:e,label:t,description:n,options:r,wrapperClassName:s,inlineDescription:o=!1}){return c.jsx(xe,{name:e,render:()=>c.jsx(Te,{label:t,description:n,className:s,children:c.jsx("div",{className:"grid gap-2",children:r.map((a,i)=>c.jsx(xe,{name:e,render:({field:l})=>{var u;return c.jsx(Te,{className:"space-y-0 md:py-0",children:c.jsx(Se,{children:c.jsx(Cp,{...l,disabled:a.disabled,name:`${e}[${i}]`,checked:(u=l.value)==null?void 0:u.includes(a.value),labelWrapperClassName:$({"grid-cols-2":o}),onCheckedChange:p=>{var d;return p?l.onChange([...l.value||[],a.value]):l.onChange((d=l.value)==null?void 0:d.filter(m=>m!==a.value))},description:a.description,children:a.label})})})}},a.value))})})})}const U0=({debug_info:e,log_options:t,prefix:n})=>{const r=f.useMemo(()=>t.map(({viewLink:s,...o})=>({...o,description:c.jsxs("span",{children:["[",c.jsx(rt,{href:s,isExternal:!0,children:w("View log")}),"]"]})})),[t]);return c.jsxs(c.Fragment,{children:[c.jsx(xe,{name:Ee("send_files_by_url",n),render:({field:s})=>c.jsx(Te,{label:Ie("send_files_by_url"),description:w("Turn off to upload the files/images instead of passing the url."),children:c.jsx(Se,{children:c.jsx(bt,{...s,value:void 0,checked:s.value,onCheckedChange:s.onChange})})})}),c.jsx(_t,{className:"my-6"}),c.jsx(gi,{name:Ee("enable_logs",n),label:Ie("enable_logs"),options:r,inlineDescription:!0}),c.jsx(_t,{className:"my-6"}),c.jsxs("div",{className:"space-y-2 flex flex-col md:flex-row gap-2 md:py-4",children:[c.jsx("span",{className:"font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-base mb-0 mt-0 md:basis-[30%]",children:Ie("debug_info")}),c.jsx("div",{children:c.jsx(Rs,{className:"p-0",children:e})})]}),c.jsx(_t,{className:"my-6"}),c.jsx(xe,{name:Ee("clean_uninstall",n),render:({field:s})=>c.jsx(Te,{label:Ie("clean_uninstall"),children:c.jsx(Se,{children:c.jsx(bt,{...s,value:void 0,checked:s.value,onCheckedChange:s.onChange})})})})]})},Oa="advanced",{assets:Wc,uiData:Aa}=cn(),z0=()=>{const e=ct({name:`${Oa}.enable_logs`}),{setValue:t}=Pt();f.useEffect(()=>{e!=null&&e.includes("p2tg")&&!(e!=null&&e.includes("bot_api"))&&t(`${Oa}.enable_logs`,[...e,"bot_api"])},[e,t]);const n=f.useMemo(()=>[{value:"bot_api",label:w("Bot API"),viewLink:Wc.botApiLogUrl||"",disabled:e==null?void 0:e.includes("p2tg")},{value:"p2tg",label:w("Post to Telegram"),viewLink:Wc.p2tgLogUrl||""}],[e]);return c.jsx(U0,{prefix:Oa,log_options:n,debug_info:(Aa==null?void 0:Aa.debug_info)||""})},vi=f.forwardRef(({className:e,type:t,...n},r)=>c.jsx("input",{type:t,className:$("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));vi.displayName="Input";const gt=f.forwardRef(({addonStart:e,addonStartClassName:t,addonEnd:n,addonEndClassName:r,className:s,wrapperClassName:o,isInvalid:a,...i},l)=>{const u=$({"border-destructive":a,"bg-slate-100":i.readOnly},s);return n||e?c.jsxs("div",{className:$("flex h-10 w-full items-stretch",o),children:[e?c.jsx("div",{className:$("flex h-10 rounded-s-md border border-e-0 border-input bg-secondary px-3 py-2 text-sm",t),children:e}):null,c.jsx(vi,{ref:l,className:$({"rounded-none":!0,"rounded-s-md":!e,"rounded-e-md":!n},u),"aria-invalid":a,...i}),n?c.jsx("div",{className:$("flex h-10 rounded-e-md border border-s-0 border-input bg-secondary px-3 py-2 text-sm",r),children:n}):null]}):c.jsx(vi,{ref:l,className:u,"aria-invalid":a,...i})});gt.displayName="Input";async function H0(e){Sl(e);const{chat_id:t}=kd(e.chat_id||"");try{const{result:n}=await Tr.getChatMembersCount({chat_id:t});return["SUCCESS",Number(n).toString()]}catch(n){return console.log("ERROR",n),["ERROR",sl(n)]}}const W0=async(e,t)=>{const n=e.text||window.prompt(w("A message will be sent to the Channel/Group/Chat. You can modify the text below"),w("This is a test message"));return n?await Z0({...e,text:n},t):["ERROR",w("Message is empty")]};async function Z0(e,t){Sl(e,t);const{chat_id:n,thread_id:r}=kd(e.chat_id||"");try{return await Tr.sendMessage({chat_id:n,text:e.text,message_thread_id:r}),["SUCCESS",w("Success")]}catch(s){return console.log("ERROR",s),["ERROR",sl(s)]}}async function G0(e,t){Sl(e,t);try{const{result:n}=await Tr.getMe({});return["SUCCESS",n]}catch(n){return console.log("ERROR",n),["ERROR",sl(n)]}}async function Sl(e,t){t&&Tr.setEvent(t);const{bot_token:n,setInProgress:r}=e;r==null||r(!0),Tr.setBotToken(n)}const q0=Ji("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),kp=f.forwardRef(({className:e,variant:t,...n},r)=>c.jsx("div",{ref:r,role:"alert",className:$(q0({variant:t}),e),...n}));kp.displayName="Alert";const jp=f.forwardRef(({className:e,...t},n)=>c.jsx("h5",{ref:n,className:$("mb-1 font-medium leading-none tracking-tight",e),...t}));jp.displayName="AlertTitle";const Ep=f.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:$("text-sm [&_p]:leading-relaxed",e),...t}));Ep.displayName="AlertDescription";function Wo({title:e,description:t,children:n,type:r="info",icon:s,titleClassName:o,...a}){let i=s;if(i===void 0)switch(r){case"success":i=c.jsx(Mb,{size:"16"});break;case"error":i=c.jsx(Gd,{size:"16"});break;case"warning":i=c.jsx(qd,{size:"16"});break;case"info":i=c.jsx(Lb,{size:"16"});break}const l=t||n;return c.jsxs(kp,{...a,variant:r==="error"?"destructive":"default",children:[i,e?c.jsx(jp,{className:o,children:e}):null,l?c.jsx(Ep,{children:l}):null]})}const Cl=({result:e,resultType:t,children:n,title:r,className:s})=>{if(!e)return null;const o=(n==null?void 0:n({result:e,resultType:t}))||c.jsx("div",{className:$("font-semibold",{"text-green-600":t==="SUCCESS"}),children:e});return o?c.jsx(Wo,{title:r||w("Test Result:"),type:t==="ERROR"?"error":"success",className:$("max-w-max mt-4",s),titleClassName:"font-normal mb-2",children:o}):null},Y0=e=>{const[t,n]=f.useState(""),[r,s]=f.useState(""),[o,a]=f.useState(""),[i,l]=f.useState("SUCCESS"),u=f.useCallback(async p=>{n(e);const[d,m]=await G0({bot_token:e},p);n(""),l(d),s(""),m&&typeof m=="object"&&"first_name"in m&&"username"in m&&typeof m.username=="string"?(a(`${m.first_name} (@${m.username})`),s(m.username)):typeof m=="string"&&a(m)},[e]);return f.useMemo(()=>{const p=c.jsx($n,{onClick:u,className:"flex-grow flex-shrink-0",variant:"secondary",disabled:!e||!wd.test(e)||!!t,children:t&&t===e?w("Please wait…"):w("Test Token")});return{bot_token:e,buttonNode:p,onTestToken:u,resultNode:c.jsx(Cl,{result:o,resultType:i}),bot_username:r,testResult:o,testResultType:i}},[o,i,e,r,u,t])},K0=({botUsernameField:e,isRequired:t=!0,label:n,name:r,...s})=>{const{setValue:o,trigger:a}=Pt(),i=ct({name:r}),{bot_username:l,buttonNode:u,resultNode:p}=Y0(i);return f.useEffect(()=>{e&&l&&(o(e,l),a(e))},[e,l,o,a]),c.jsx(xe,{name:r,render:({field:d})=>c.jsxs(Te,{isRequired:t,label:n,afterMessage:p,description:w("Please read the instructions above."),...s,children:[c.jsx(Se,{children:c.jsx(gt,{required:t,autoComplete:"off",...d})}),u]})})},kl=({children:e,highContrast:t,className:n,...r})=>c.jsx(un,{title:w("INSTRUCTIONS!"),headerClassName:$(t&&"bg-[#343a40] text-white"),className:$(t&&"border border-[#343a40]",n),...r,children:e});function X0(e,t=globalThis==null?void 0:globalThis.document){const n=an(e);f.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var J0="DismissableLayer",yi="dismissableLayer.update",Q0="dismissableLayer.pointerDownOutside",e_="dismissableLayer.focusOutside",Zc,Rp=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jl=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:i,...l}=e,u=f.useContext(Rp),[p,d]=f.useState(null),m=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=f.useState({}),y=Le(t,k=>d(k)),h=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=h.indexOf(g),b=p?h.indexOf(p):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,E=b>=x,_=r_(k=>{const R=k.target,N=[...u.branches].some(F=>F.contains(R));!E||N||(s==null||s(k),a==null||a(k),k.defaultPrevented||i==null||i())},m),j=s_(k=>{const R=k.target;[...u.branches].some(F=>F.contains(R))||(o==null||o(k),a==null||a(k),k.defaultPrevented||i==null||i())},m);return X0(k=>{b===u.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},m),f.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Zc=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),Gc(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Zc)}},[p,m,n,u]),f.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),Gc())},[p,u]),f.useEffect(()=>{const k=()=>v({});return document.addEventListener(yi,k),()=>document.removeEventListener(yi,k)},[]),c.jsx(we.div,{...l,ref:y,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:ye(e.onFocusCapture,j.onFocusCapture),onBlurCapture:ye(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:ye(e.onPointerDownCapture,_.onPointerDownCapture)})});jl.displayName=J0;var t_="DismissableLayerBranch",n_=f.forwardRef((e,t)=>{const n=f.useContext(Rp),r=f.useRef(null),s=Le(t,r);return f.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),c.jsx(we.div,{...e,ref:s})});n_.displayName=t_;function r_(e,t=globalThis==null?void 0:globalThis.document){const n=an(e),r=f.useRef(!1),s=f.useRef(()=>{});return f.useEffect(()=>{const o=i=>{if(i.target&&!r.current){let l=function(){Tp(Q0,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function s_(e,t=globalThis==null?void 0:globalThis.document){const n=an(e),r=f.useRef(!1);return f.useEffect(()=>{const s=o=>{o.target&&!r.current&&Tp(e_,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Gc(){const e=new CustomEvent(yi);document.dispatchEvent(e)}function Tp(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?xb(s,o):s.dispatchEvent(o)}const o_=["top","right","bottom","left"],Fn=Math.min,Ot=Math.max,wo=Math.round,$s=Math.floor,Vn=e=>({x:e,y:e}),a_={left:"right",right:"left",bottom:"top",top:"bottom"},i_={start:"end",end:"start"};function bi(e,t,n){return Ot(e,Fn(t,n))}function yn(e,t){return typeof e=="function"?e(t):e}function bn(e){return e.split("-")[0]}function Fr(e){return e.split("-")[1]}function El(e){return e==="x"?"y":"x"}function Rl(e){return e==="y"?"height":"width"}function Vr(e){return["top","bottom"].includes(bn(e))?"y":"x"}function Tl(e){return El(Vr(e))}function l_(e,t,n){n===void 0&&(n=!1);const r=Fr(e),s=Tl(e),o=Rl(s);let a=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=_o(a)),[a,_o(a)]}function c_(e){const t=_o(e);return[xi(e),t,xi(t)]}function xi(e){return e.replace(/start|end/g,t=>i_[t])}function u_(e,t,n){const r=["left","right"],s=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?o:a;default:return[]}}function d_(e,t,n,r){const s=Fr(e);let o=u_(bn(e),n==="start",r);return s&&(o=o.map(a=>a+"-"+s),t&&(o=o.concat(o.map(xi)))),o}function _o(e){return e.replace(/left|right|bottom|top/g,t=>a_[t])}function f_(e){return{top:0,right:0,bottom:0,left:0,...e}}function Op(e){return typeof e!="number"?f_(e):{top:e,right:e,bottom:e,left:e}}function So(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function qc(e,t,n){let{reference:r,floating:s}=e;const o=Vr(t),a=Tl(t),i=Rl(a),l=bn(t),u=o==="y",p=r.x+r.width/2-s.width/2,d=r.y+r.height/2-s.height/2,m=r[i]/2-s[i]/2;let v;switch(l){case"top":v={x:p,y:r.y-s.height};break;case"bottom":v={x:p,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:d};break;case"left":v={x:r.x-s.width,y:d};break;default:v={x:r.x,y:r.y}}switch(Fr(t)){case"start":v[a]-=m*(n&&u?-1:1);break;case"end":v[a]+=m*(n&&u?-1:1);break}return v}const p_=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:a}=n,i=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:d}=qc(u,r,l),m=r,v={},y=0;for(let h=0;h<i.length;h++){const{name:g,fn:x}=i[h],{x:b,y:S,data:E,reset:_}=await x({x:p,y:d,initialPlacement:r,placement:m,strategy:s,middlewareData:v,rects:u,platform:a,elements:{reference:e,floating:t}});p=b??p,d=S??d,v={...v,[g]:{...v[g],...E}},_&&y<=50&&(y++,typeof _=="object"&&(_.placement&&(m=_.placement),_.rects&&(u=_.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:s}):_.rects),{x:p,y:d}=qc(u,m,l)),h=-1)}return{x:p,y:d,placement:m,strategy:s,middlewareData:v}};async function vs(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:a,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:m=!1,padding:v=0}=yn(t,e),y=Op(v),g=i[m?d==="floating"?"reference":"floating":d],x=So(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(i.floating)),boundary:u,rootBoundary:p,strategy:l})),b=d==="floating"?{...a.floating,x:r,y:s}:a.reference,S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(i.floating)),E=await(o.isElement==null?void 0:o.isElement(S))?await(o.getScale==null?void 0:o.getScale(S))||{x:1,y:1}:{x:1,y:1},_=So(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:b,offsetParent:S,strategy:l}):b);return{top:(x.top-_.top+y.top)/E.y,bottom:(_.bottom-x.bottom+y.bottom)/E.y,left:(x.left-_.left+y.left)/E.x,right:(_.right-x.right+y.right)/E.x}}const m_=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:a,elements:i,middlewareData:l}=t,{element:u,padding:p=0}=yn(e,t)||{};if(u==null)return{};const d=Op(p),m={x:n,y:r},v=Tl(s),y=Rl(v),h=await a.getDimensions(u),g=v==="y",x=g?"top":"left",b=g?"bottom":"right",S=g?"clientHeight":"clientWidth",E=o.reference[y]+o.reference[v]-m[v]-o.floating[y],_=m[v]-o.reference[v],j=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let k=j?j[S]:0;(!k||!await(a.isElement==null?void 0:a.isElement(j)))&&(k=i.floating[S]||o.floating[y]);const R=E/2-_/2,N=k/2-h[y]/2-1,F=Fn(d[x],N),z=Fn(d[b],N),M=F,B=k-h[y]-z,q=k/2-h[y]/2+R,L=bi(M,q,B),I=!l.arrow&&Fr(s)!=null&&q!==L&&o.reference[y]/2-(q<M?F:z)-h[y]/2<0,U=I?q<M?q-M:q-B:0;return{[v]:m[v]+U,data:{[v]:L,centerOffset:q-L-U,...I&&{alignmentOffset:U}},reset:I}}}),h_=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:a,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:h=!0,...g}=yn(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const x=bn(s),b=bn(i)===i,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=m||(b||!h?[_o(i)]:c_(i));!m&&y!=="none"&&E.push(...d_(i,h,y,S));const _=[i,...E],j=await vs(t,g),k=[];let R=((r=o.flip)==null?void 0:r.overflows)||[];if(p&&k.push(j[x]),d){const M=l_(s,a,S);k.push(j[M[0]],j[M[1]])}if(R=[...R,{placement:s,overflows:k}],!k.every(M=>M<=0)){var N,F;const M=(((N=o.flip)==null?void 0:N.index)||0)+1,B=_[M];if(B)return{data:{index:M,overflows:R},reset:{placement:B}};let q=(F=R.filter(L=>L.overflows[0]<=0).sort((L,I)=>L.overflows[1]-I.overflows[1])[0])==null?void 0:F.placement;if(!q)switch(v){case"bestFit":{var z;const L=(z=R.map(I=>[I.placement,I.overflows.filter(U=>U>0).reduce((U,P)=>U+P,0)]).sort((I,U)=>I[1]-U[1])[0])==null?void 0:z[0];L&&(q=L);break}case"initialPlacement":q=i;break}if(s!==q)return{reset:{placement:q}}}return{}}}};function Yc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Kc(e){return o_.some(t=>e[t]>=0)}const g_=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=yn(e,t);switch(r){case"referenceHidden":{const o=await vs(t,{...s,elementContext:"reference"}),a=Yc(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Kc(a)}}}case"escaped":{const o=await vs(t,{...s,altBoundary:!0}),a=Yc(o,n.floating);return{data:{escapedOffsets:a,escaped:Kc(a)}}}default:return{}}}}};async function v_(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),a=bn(n),i=Fr(n),l=Vr(n)==="y",u=["left","top"].includes(a)?-1:1,p=o&&l?-1:1,d=yn(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return i&&typeof y=="number"&&(v=i==="end"?y*-1:y),l?{x:v*p,y:m*u}:{x:m*u,y:v*p}}const y_=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:a,middlewareData:i}=t,l=await v_(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:a}}}}},b_=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:i={fn:g=>{let{x,y:b}=g;return{x,y:b}}},...l}=yn(e,t),u={x:n,y:r},p=await vs(t,l),d=Vr(bn(s)),m=El(d);let v=u[m],y=u[d];if(o){const g=m==="y"?"top":"left",x=m==="y"?"bottom":"right",b=v+p[g],S=v-p[x];v=bi(b,v,S)}if(a){const g=d==="y"?"top":"left",x=d==="y"?"bottom":"right",b=y+p[g],S=y-p[x];y=bi(b,y,S)}const h=i.fn({...t,[m]:v,[d]:y});return{...h,data:{x:h.x-n,y:h.y-r}}}}},x_=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:a}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=yn(e,t),p={x:n,y:r},d=Vr(s),m=El(d);let v=p[m],y=p[d];const h=yn(i,t),g=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const S=m==="y"?"height":"width",E=o.reference[m]-o.floating[S]+g.mainAxis,_=o.reference[m]+o.reference[S]-g.mainAxis;v<E?v=E:v>_&&(v=_)}if(u){var x,b;const S=m==="y"?"width":"height",E=["top","left"].includes(bn(s)),_=o.reference[d]-o.floating[S]+(E&&((x=a.offset)==null?void 0:x[d])||0)+(E?0:g.crossAxis),j=o.reference[d]+o.reference[S]+(E?0:((b=a.offset)==null?void 0:b[d])||0)-(E?g.crossAxis:0);y<_?y=_:y>j&&(y=j)}return{[m]:v,[d]:y}}}},w_=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:s,elements:o}=t,{apply:a=()=>{},...i}=yn(e,t),l=await vs(t,i),u=bn(n),p=Fr(n),d=Vr(n)==="y",{width:m,height:v}=r.floating;let y,h;u==="top"||u==="bottom"?(y=u,h=p===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(h=u,y=p==="end"?"top":"bottom");const g=v-l[y],x=m-l[h],b=!t.middlewareData.shift;let S=g,E=x;if(d){const j=m-l.left-l.right;E=p||b?Fn(x,j):j}else{const j=v-l.top-l.bottom;S=p||b?Fn(g,j):j}if(b&&!p){const j=Ot(l.left,0),k=Ot(l.right,0),R=Ot(l.top,0),N=Ot(l.bottom,0);d?E=m-2*(j!==0||k!==0?j+k:Ot(l.left,l.right)):S=v-2*(R!==0||N!==0?R+N:Ot(l.top,l.bottom))}await a({...t,availableWidth:E,availableHeight:S});const _=await s.getDimensions(o.floating);return m!==_.width||v!==_.height?{reset:{rects:!0}}:{}}}};function Ln(e){return Ap(e)?(e.nodeName||"").toLowerCase():"#document"}function It(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Sn(e){var t;return(t=(Ap(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ap(e){return e instanceof Node||e instanceof It(e).Node}function xn(e){return e instanceof Element||e instanceof It(e).Element}function ln(e){return e instanceof HTMLElement||e instanceof It(e).HTMLElement}function Xc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof It(e).ShadowRoot}function Ts(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Vt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function __(e){return["table","td","th"].includes(Ln(e))}function Ol(e){const t=Al(),n=Vt(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function S_(e){let t=Or(e);for(;ln(t)&&!Zo(t);){if(Ol(t))return t;t=Or(t)}return null}function Al(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Zo(e){return["html","body","#document"].includes(Ln(e))}function Vt(e){return It(e).getComputedStyle(e)}function Go(e){return xn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Or(e){if(Ln(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xc(e)&&e.host||Sn(e);return Xc(t)?t.host:t}function Ip(e){const t=Or(e);return Zo(t)?e.ownerDocument?e.ownerDocument.body:e.body:ln(t)&&Ts(t)?t:Ip(t)}function ys(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Ip(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),a=It(s);return o?t.concat(a,a.visualViewport||[],Ts(s)?s:[],a.frameElement&&n?ys(a.frameElement):[]):t.concat(s,ys(s,[],n))}function Np(e){const t=Vt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=ln(e),o=s?e.offsetWidth:n,a=s?e.offsetHeight:r,i=wo(n)!==o||wo(r)!==a;return i&&(n=o,r=a),{width:n,height:r,$:i}}function Il(e){return xn(e)?e:e.contextElement}function yr(e){const t=Il(e);if(!ln(t))return Vn(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=Np(t);let a=(o?wo(n.width):n.width)/r,i=(o?wo(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const C_=Vn(0);function Pp(e){const t=It(e);return!Al()||!t.visualViewport?C_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function k_(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==It(e)?!1:t}function Qn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=Il(e);let a=Vn(1);t&&(r?xn(r)&&(a=yr(r)):a=yr(e));const i=k_(o,n,r)?Pp(o):Vn(0);let l=(s.left+i.x)/a.x,u=(s.top+i.y)/a.y,p=s.width/a.x,d=s.height/a.y;if(o){const m=It(o),v=r&&xn(r)?It(r):r;let y=m,h=y.frameElement;for(;h&&r&&v!==y;){const g=yr(h),x=h.getBoundingClientRect(),b=Vt(h),S=x.left+(h.clientLeft+parseFloat(b.paddingLeft))*g.x,E=x.top+(h.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,u*=g.y,p*=g.x,d*=g.y,l+=S,u+=E,y=It(h),h=y.frameElement}}return So({width:p,height:d,x:l,y:u})}const j_=[":popover-open",":modal"];function Mp(e){return j_.some(t=>{try{return e.matches(t)}catch{return!1}})}function E_(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",a=Sn(r),i=t?Mp(t.floating):!1;if(r===a||i&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Vn(1);const p=Vn(0),d=ln(r);if((d||!d&&!o)&&((Ln(r)!=="body"||Ts(a))&&(l=Go(r)),ln(r))){const m=Qn(r);u=yr(r),p.x=m.x+r.clientLeft,p.y=m.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+p.x,y:n.y*u.y-l.scrollTop*u.y+p.y}}function R_(e){return Array.from(e.getClientRects())}function Dp(e){return Qn(Sn(e)).left+Go(e).scrollLeft}function T_(e){const t=Sn(e),n=Go(e),r=e.ownerDocument.body,s=Ot(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Ot(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Dp(e);const i=-n.scrollTop;return Vt(r).direction==="rtl"&&(a+=Ot(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:a,y:i}}function O_(e,t){const n=It(e),r=Sn(e),s=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,i=0,l=0;if(s){o=s.width,a=s.height;const u=Al();(!u||u&&t==="fixed")&&(i=s.offsetLeft,l=s.offsetTop)}return{width:o,height:a,x:i,y:l}}function A_(e,t){const n=Qn(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=ln(e)?yr(e):Vn(1),a=e.clientWidth*o.x,i=e.clientHeight*o.y,l=s*o.x,u=r*o.y;return{width:a,height:i,x:l,y:u}}function Jc(e,t,n){let r;if(t==="viewport")r=O_(e,n);else if(t==="document")r=T_(Sn(e));else if(xn(t))r=A_(t,n);else{const s=Pp(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return So(r)}function Fp(e,t){const n=Or(e);return n===t||!xn(n)||Zo(n)?!1:Vt(n).position==="fixed"||Fp(n,t)}function I_(e,t){const n=t.get(e);if(n)return n;let r=ys(e,[],!1).filter(i=>xn(i)&&Ln(i)!=="body"),s=null;const o=Vt(e).position==="fixed";let a=o?Or(e):e;for(;xn(a)&&!Zo(a);){const i=Vt(a),l=Ol(a);!l&&i.position==="fixed"&&(s=null),(o?!l&&!s:!l&&i.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Ts(a)&&!l&&Fp(e,a))?r=r.filter(p=>p!==a):s=i,a=Or(a)}return t.set(e,r),r}function N_(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const a=[...n==="clippingAncestors"?I_(t,this._c):[].concat(n),r],i=a[0],l=a.reduce((u,p)=>{const d=Jc(t,p,s);return u.top=Ot(d.top,u.top),u.right=Fn(d.right,u.right),u.bottom=Fn(d.bottom,u.bottom),u.left=Ot(d.left,u.left),u},Jc(t,i,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function P_(e){const{width:t,height:n}=Np(e);return{width:t,height:n}}function M_(e,t,n){const r=ln(t),s=Sn(t),o=n==="fixed",a=Qn(e,!0,o,t);let i={scrollLeft:0,scrollTop:0};const l=Vn(0);if(r||!r&&!o)if((Ln(t)!=="body"||Ts(s))&&(i=Go(t)),r){const d=Qn(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else s&&(l.x=Dp(s));const u=a.left+i.scrollLeft-l.x,p=a.top+i.scrollTop-l.y;return{x:u,y:p,width:a.width,height:a.height}}function Qc(e,t){return!ln(e)||Vt(e).position==="fixed"?null:t?t(e):e.offsetParent}function Vp(e,t){const n=It(e);if(!ln(e)||Mp(e))return n;let r=Qc(e,t);for(;r&&__(r)&&Vt(r).position==="static";)r=Qc(r,t);return r&&(Ln(r)==="html"||Ln(r)==="body"&&Vt(r).position==="static"&&!Ol(r))?n:r||S_(e)||n}const D_=async function(e){const t=this.getOffsetParent||Vp,n=this.getDimensions;return{reference:M_(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function F_(e){return Vt(e).direction==="rtl"}const V_={convertOffsetParentRelativeRectToViewportRelativeRect:E_,getDocumentElement:Sn,getClippingRect:N_,getOffsetParent:Vp,getElementRects:D_,getClientRects:R_,getDimensions:P_,getScale:yr,isElement:xn,isRTL:F_};function L_(e,t){let n=null,r;const s=Sn(e);function o(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),o();const{left:u,top:p,width:d,height:m}=e.getBoundingClientRect();if(i||t(),!d||!m)return;const v=$s(p),y=$s(s.clientWidth-(u+d)),h=$s(s.clientHeight-(p+m)),g=$s(u),b={rootMargin:-v+"px "+-y+"px "+-h+"px "+-g+"px",threshold:Ot(0,Fn(1,l))||1};let S=!0;function E(_){const j=_[0].intersectionRatio;if(j!==l){if(!S)return a();j?a(!1,j):r=setTimeout(()=>{a(!1,1e-7)},100)}S=!1}try{n=new IntersectionObserver(E,{...b,root:s.ownerDocument})}catch{n=new IntersectionObserver(E,b)}n.observe(e)}return a(!0),o}function Lp(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Il(e),p=s||o?[...u?ys(u):[],...ys(t)]:[];p.forEach(x=>{s&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const d=u&&i?L_(u,n):null;let m=-1,v=null;a&&(v=new ResizeObserver(x=>{let[b]=x;b&&b.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var S;(S=v)==null||S.observe(t)})),n()}),u&&!l&&v.observe(u),v.observe(t));let y,h=l?Qn(e):null;l&&g();function g(){const x=Qn(e);h&&(x.x!==h.x||x.y!==h.y||x.width!==h.width||x.height!==h.height)&&n(),h=x,y=requestAnimationFrame(g)}return n(),()=>{var x;p.forEach(b=>{s&&b.removeEventListener("scroll",n),o&&b.removeEventListener("resize",n)}),d==null||d(),(x=v)==null||x.disconnect(),v=null,l&&cancelAnimationFrame(y)}}const $_=b_,B_=h_,U_=w_,z_=g_,eu=m_,H_=x_,W_=(e,t,n)=>{const r=new Map,s={platform:V_,...n},o={...s.platform,_c:r};return p_(e,t,{...s,platform:o})},Z_=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?eu({element:r.current,padding:s}).fn(n):{}:r?eu({element:r,padding:s}).fn(n):{}}}};var Qs=typeof document<"u"?f.useLayoutEffect:f.useEffect;function Co(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Co(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!Co(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function $p(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tu(e,t){const n=$p(e);return Math.round(t*n)/n}function nu(e){const t=f.useRef(e);return Qs(()=>{t.current=e}),t}function G_(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:a}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[p,d]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=f.useState(r);Co(m,r)||v(r);const[y,h]=f.useState(null),[g,x]=f.useState(null),b=f.useCallback(U=>{U!==j.current&&(j.current=U,h(U))},[]),S=f.useCallback(U=>{U!==k.current&&(k.current=U,x(U))},[]),E=o||y,_=a||g,j=f.useRef(null),k=f.useRef(null),R=f.useRef(p),N=l!=null,F=nu(l),z=nu(s),M=f.useCallback(()=>{if(!j.current||!k.current)return;const U={placement:t,strategy:n,middleware:m};z.current&&(U.platform=z.current),W_(j.current,k.current,U).then(P=>{const ae={...P,isPositioned:!0};B.current&&!Co(R.current,ae)&&(R.current=ae,Nr.flushSync(()=>{d(ae)}))})},[m,t,n,z]);Qs(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(U=>({...U,isPositioned:!1})))},[u]);const B=f.useRef(!1);Qs(()=>(B.current=!0,()=>{B.current=!1}),[]),Qs(()=>{if(E&&(j.current=E),_&&(k.current=_),E&&_){if(F.current)return F.current(E,_,M);M()}},[E,_,M,F,N]);const q=f.useMemo(()=>({reference:j,floating:k,setReference:b,setFloating:S}),[b,S]),L=f.useMemo(()=>({reference:E,floating:_}),[E,_]),I=f.useMemo(()=>{const U={position:n,left:0,top:0};if(!L.floating)return U;const P=tu(L.floating,p.x),ae=tu(L.floating,p.y);return i?{...U,transform:"translate("+P+"px, "+ae+"px)",...$p(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:ae}},[n,i,L.floating,p.x,p.y]);return f.useMemo(()=>({...p,update:M,refs:q,elements:L,floatingStyles:I}),[p,M,q,L,I])}var q_="Arrow",Bp=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return c.jsx(we.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});Bp.displayName=q_;var Y_=Bp,Nl="Popper",[Up,qo]=$t(Nl),[K_,zp]=Up(Nl),Hp=e=>{const{__scopePopper:t,children:n}=e,[r,s]=f.useState(null);return c.jsx(K_,{scope:t,anchor:r,onAnchorChange:s,children:n})};Hp.displayName=Nl;var Wp="PopperAnchor",Zp=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=zp(Wp,n),a=f.useRef(null),i=Le(t,a);return f.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:c.jsx(we.div,{...s,ref:i})});Zp.displayName=Wp;var Pl="PopperContent",[X_,J_]=Up(Pl),Gp=f.forwardRef((e,t)=>{var H,ue,je,ge,ve,he;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:y,...h}=e,g=zp(Pl,n),[x,b]=f.useState(null),S=Le(t,Ke=>b(Ke)),[E,_]=f.useState(null),j=zo(E),k=(j==null?void 0:j.width)??0,R=(j==null?void 0:j.height)??0,N=r+(o!=="center"?"-"+o:""),F=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},z=Array.isArray(u)?u:[u],M=z.length>0,B={padding:F,boundary:z.filter(eS),altBoundary:M},{refs:q,floatingStyles:L,placement:I,isPositioned:U,middlewareData:P}=G_({strategy:"fixed",placement:N,whileElementsMounted:(...Ke)=>Lp(...Ke,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[y_({mainAxis:s+R,alignmentAxis:a}),l&&$_({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?H_():void 0,...B}),l&&B_({...B}),U_({...B,apply:({elements:Ke,rects:qe,availableWidth:xt,availableHeight:Et})=>{const{width:ut,height:Mt}=qe.reference,He=Ke.floating.style;He.setProperty("--radix-popper-available-width",`${xt}px`),He.setProperty("--radix-popper-available-height",`${Et}px`),He.setProperty("--radix-popper-anchor-width",`${ut}px`),He.setProperty("--radix-popper-anchor-height",`${Mt}px`)}}),E&&Z_({element:E,padding:i}),tS({arrowWidth:k,arrowHeight:R}),m&&z_({strategy:"referenceHidden",...B})]}),[ae,Pe]=Kp(I),ie=an(y);yt(()=>{U&&(ie==null||ie())},[U,ie]);const ne=(H=P.arrow)==null?void 0:H.x,J=(ue=P.arrow)==null?void 0:ue.y,le=((je=P.arrow)==null?void 0:je.centerOffset)!==0,[Re,ce]=f.useState();return yt(()=>{x&&ce(window.getComputedStyle(x).zIndex)},[x]),c.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:U?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Re,"--radix-popper-transform-origin":[(ge=P.transformOrigin)==null?void 0:ge.x,(ve=P.transformOrigin)==null?void 0:ve.y].join(" "),...((he=P.hide)==null?void 0:he.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(X_,{scope:n,placedSide:ae,onArrowChange:_,arrowX:ne,arrowY:J,shouldHideArrow:le,children:c.jsx(we.div,{"data-side":ae,"data-align":Pe,...h,ref:S,style:{...h.style,animation:U?void 0:"none"}})})})});Gp.displayName=Pl;var qp="PopperArrow",Q_={top:"bottom",right:"left",bottom:"top",left:"right"},Yp=f.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=J_(qp,r),a=Q_[o.placedSide];return c.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:c.jsx(Y_,{...s,ref:n,style:{...s.style,display:"block"}})})});Yp.displayName=qp;function eS(e){return e!==null}var tS=e=>({name:"transformOrigin",options:e,fn(t){var g,x,b;const{placement:n,rects:r,middlewareData:s}=t,a=((g=s.arrow)==null?void 0:g.centerOffset)!==0,i=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,p]=Kp(n),d={start:"0%",center:"50%",end:"100%"}[p],m=(((x=s.arrow)==null?void 0:x.x)??0)+i/2,v=(((b=s.arrow)==null?void 0:b.y)??0)+l/2;let y="",h="";return u==="bottom"?(y=a?d:`${m}px`,h=`${-l}px`):u==="top"?(y=a?d:`${m}px`,h=`${r.floating.height+l}px`):u==="right"?(y=`${-l}px`,h=a?d:`${v}px`):u==="left"&&(y=`${r.floating.width+l}px`,h=a?d:`${v}px`),{data:{x:y,y:h}}}});function Kp(e){const[t,n="center"]=e.split("-");return[t,n]}var Xp=Hp,Jp=Zp,Qp=Gp,em=Yp,nS="Portal",tm=f.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[s,o]=f.useState(!1);yt(()=>o(!0),[]);const a=n||s&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?Ku.createPortal(c.jsx(we.div,{...r,ref:t}),a):null});tm.displayName=nS;var rS="VisuallyHidden",Ml=f.forwardRef((e,t)=>c.jsx(we.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Ml.displayName=rS;var sS=Ml,[Yo,WT]=$t("Tooltip",[qo]),Ko=qo(),nm="TooltipProvider",oS=700,wi="tooltip.open",[aS,Dl]=Yo(nm),rm=e=>{const{__scopeTooltip:t,delayDuration:n=oS,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,a=f.useRef(!0),i=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),c.jsx(aS,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:f.useCallback(u=>{i.current=u},[]),disableHoverableContent:s,children:o})};rm.displayName=nm;var Xo="Tooltip",[iS,Jo]=Yo(Xo),sm=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:i}=e,l=Dl(Xo,e.__scopeTooltip),u=Ko(t),[p,d]=f.useState(null),m=Bn(),v=f.useRef(0),y=a??l.disableHoverableContent,h=i??l.delayDuration,g=f.useRef(!1),[x=!1,b]=Yt({prop:r,defaultProp:s,onChange:k=>{k?(l.onOpen(),document.dispatchEvent(new CustomEvent(wi))):l.onClose(),o==null||o(k)}}),S=f.useMemo(()=>x?g.current?"delayed-open":"instant-open":"closed",[x]),E=f.useCallback(()=>{window.clearTimeout(v.current),v.current=0,g.current=!1,b(!0)},[b]),_=f.useCallback(()=>{window.clearTimeout(v.current),v.current=0,b(!1)},[b]),j=f.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{g.current=!0,b(!0),v.current=0},h)},[h,b]);return f.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),c.jsx(Xp,{...u,children:c.jsx(iS,{scope:t,contentId:m,open:x,stateAttribute:S,trigger:p,onTriggerChange:d,onTriggerEnter:f.useCallback(()=>{l.isOpenDelayedRef.current?j():E()},[l.isOpenDelayedRef,j,E]),onTriggerLeave:f.useCallback(()=>{y?_():(window.clearTimeout(v.current),v.current=0)},[_,y]),onOpen:E,onClose:_,disableHoverableContent:y,children:n})})};sm.displayName=Xo;var _i="TooltipTrigger",om=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Jo(_i,n),o=Dl(_i,n),a=Ko(n),i=f.useRef(null),l=Le(t,i,s.onTriggerChange),u=f.useRef(!1),p=f.useRef(!1),d=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),c.jsx(Jp,{asChild:!0,...a,children:c.jsx(we.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:ye(e.onPointerMove,m=>{m.pointerType!=="touch"&&!p.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),p.current=!0)}),onPointerLeave:ye(e.onPointerLeave,()=>{s.onTriggerLeave(),p.current=!1}),onPointerDown:ye(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:ye(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ye(e.onBlur,s.onClose),onClick:ye(e.onClick,s.onClose)})})});om.displayName=_i;var lS="TooltipPortal",[ZT,cS]=Yo(lS,{forceMount:void 0}),Ar="TooltipContent",am=f.forwardRef((e,t)=>{const n=cS(Ar,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,a=Jo(Ar,e.__scopeTooltip);return c.jsx(Dr,{present:r||a.open,children:a.disableHoverableContent?c.jsx(im,{side:s,...o,ref:t}):c.jsx(uS,{side:s,...o,ref:t})})}),uS=f.forwardRef((e,t)=>{const n=Jo(Ar,e.__scopeTooltip),r=Dl(Ar,e.__scopeTooltip),s=f.useRef(null),o=Le(t,s),[a,i]=f.useState(null),{trigger:l,onClose:u}=n,p=s.current,{onPointerInTransitChange:d}=r,m=f.useCallback(()=>{i(null),d(!1)},[d]),v=f.useCallback((y,h)=>{const g=y.currentTarget,x={x:y.clientX,y:y.clientY},b=hS(x,g.getBoundingClientRect()),S=gS(x,b),E=vS(h.getBoundingClientRect()),_=bS([...S,...E]);i(_),d(!0)},[d]);return f.useEffect(()=>()=>m(),[m]),f.useEffect(()=>{if(l&&p){const y=g=>v(g,p),h=g=>v(g,l);return l.addEventListener("pointerleave",y),p.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",y),p.removeEventListener("pointerleave",h)}}},[l,p,v,m]),f.useEffect(()=>{if(a){const y=h=>{const g=h.target,x={x:h.clientX,y:h.clientY},b=(l==null?void 0:l.contains(g))||(p==null?void 0:p.contains(g)),S=!yS(x,a);b?m():S&&(m(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,p,a,u,m]),c.jsx(im,{...e,ref:o})}),[dS,fS]=Yo(Xo,{isInside:!1}),pS=hb("TooltipContent"),im=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:a,...i}=e,l=Jo(Ar,n),u=Ko(n),{onClose:p}=l;return f.useEffect(()=>(document.addEventListener(wi,p),()=>document.removeEventListener(wi,p)),[p]),f.useEffect(()=>{if(l.trigger){const d=m=>{const v=m.target;v!=null&&v.contains(l.trigger)&&p()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,p]),c.jsx(jl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:p,children:c.jsxs(Qp,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(pS,{children:r}),c.jsx(dS,{scope:n,isInside:!0,children:c.jsx(sS,{id:l.contentId,role:"tooltip",children:s||r})})]})})});am.displayName=Ar;var lm="TooltipArrow",mS=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Ko(n);return fS(lm,n).isInside?null:c.jsx(em,{...s,...r,ref:t})});mS.displayName=lm;function hS(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function gS(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function vS(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function yS(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const i=t[o].x,l=t[o].y,u=t[a].x,p=t[a].y;l>r!=p>r&&n<(u-i)*(r-l)/(p-l)+i&&(s=!s)}return s}function bS(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),xS(t)}function xS(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(s.y-a.y)>=(o.y-a.y)*(s.x-a.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],a=n[n.length-2];if((o.x-a.x)*(s.y-a.y)>=(o.y-a.y)*(s.x-a.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var wS=rm,_S=sm,SS=om,cm=am;const CS=wS,kS=_S,jS=SS,um=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>c.jsx(cm,{ref:r,sideOffset:t,className:$("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));um.displayName=cm.displayName;function ES({trigger:e,content:t,...n}){return c.jsx(CS,{children:c.jsxs(kS,{...n,children:[c.jsx(jS,{asChild:!0,children:e}),c.jsx(um,{children:t})]})})}var Ia,ru;function RS(){return ru||(ru=1,Ia=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(s){e.addRange(s)}),t&&t.focus()}}),Ia}var Na,su;function TS(){if(su)return Na;su=1;var e=RS(),t={"text/plain":"Text","text/html":"Url",default:"Text"},n="Copy to clipboard: #{key}, Enter";function r(o){var a=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return o.replace(/#{\s*key\s*}/g,a)}function s(o,a){var i,l,u,p,d,m,v=!1;a||(a={}),i=a.debug||!1;try{u=e(),p=document.createRange(),d=document.getSelection(),m=document.createElement("span"),m.textContent=o,m.ariaHidden="true",m.style.all="unset",m.style.position="fixed",m.style.top=0,m.style.clip="rect(0, 0, 0, 0)",m.style.whiteSpace="pre",m.style.webkitUserSelect="text",m.style.MozUserSelect="text",m.style.msUserSelect="text",m.style.userSelect="text",m.addEventListener("copy",function(h){if(h.stopPropagation(),a.format)if(h.preventDefault(),typeof h.clipboardData>"u"){i&&console.warn("unable to use e.clipboardData"),i&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var g=t[a.format]||t.default;window.clipboardData.setData(g,o)}else h.clipboardData.clearData(),h.clipboardData.setData(a.format,o);a.onCopy&&(h.preventDefault(),a.onCopy(h.clipboardData))}),document.body.appendChild(m),p.selectNodeContents(m),d.addRange(p);var y=document.execCommand("copy");if(!y)throw new Error("copy command was unsuccessful");v=!0}catch(h){i&&console.error("unable to copy using execCommand: ",h),i&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(a.format||"text",o),a.onCopy&&a.onCopy(window.clipboardData),v=!0}catch(g){i&&console.error("unable to copy using clipboardData: ",g),i&&console.error("falling back to prompt"),l=r("message"in a?a.message:n),window.prompt(l,o)}}finally{d&&(typeof d.removeRange=="function"?d.removeRange(p):d.removeAllRanges()),m&&document.body.removeChild(m),u()}return v}return Na=s,Na}var OS=TS();const AS=_s(OS);function IS(e,t={}){const[n,r]=f.useState(!1),[s,o]=f.useState(e);f.useEffect(()=>o(e),[e]);const{timeout:a=1500,...i}=typeof t=="number"?{timeout:t}:t,l=f.useCallback(()=>{const u=AS(s,i);r(u)},[s,i]);return f.useEffect(()=>{let u=null;return n&&(u=window.setTimeout(()=>{r(!1)},a)),()=>{u&&window.clearTimeout(u)}},[a,n]),{value:s,setValue:o,onCopy:l,hasCopied:n}}function gn({content:e,children:t,buttonClassName:n,codeClassName:r}){const s=e||t||"",{onCopy:o,hasCopied:a}=IS(s);return c.jsx(ES,{content:w("Copied!"),trigger:c.jsx("button",{type:"button",onClick:o,className:n,children:c.jsx(Rs,{className:r,children:s})}),open:a})}const NS={position:"relative",paddingBottom:"56.25%",paddingTop:25,height:0},PS={position:"absolute",top:0,left:0,width:"100%",height:"100%"},Qo=({videoId:e,title:t,asGridCol:n})=>{const r=c.jsx("div",{style:NS,children:c.jsx("iframe",{title:t,style:PS,src:`https://www.youtube.com/embed/${e}`})});return n?c.jsx("div",{className:"max-w-[380px]",children:r}):r};let Gt,Xt,In,On;const dm=/<(\/)?(\w+)\s*(\/)?>/g;function Pa(e,t,n,r,s){return{element:e,tokenStart:t,tokenLength:n,prevOffset:r,leadingTextStart:s,children:[]}}const ze=(e,t)=>{if(Gt=e,Xt=0,In=[],On=[],dm.lastIndex=0,!MS(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are React Elements");do;while(DS(t));return f.createElement(f.Fragment,null,...In)},MS=e=>{const t=typeof e=="object",n=t&&Object.values(e);return t&&n.length&&n.every(r=>f.isValidElement(r))};function DS(e){const t=FS(),[n,r,s,o]=t,a=On.length,i=s>Xt?Xt:null;if(!e[r])return Ma(),!1;switch(n){case"no-more-tokens":if(a!==0){const{leadingTextStart:d,tokenStart:m}=On.pop();In.push(Gt.substr(d,m))}return Ma(),!1;case"self-closed":return a===0?(i!==null&&In.push(Gt.substr(i,s-i)),In.push(e[r]),Xt=s+o,!0):(ou(Pa(e[r],s,o)),Xt=s+o,!0);case"opener":return On.push(Pa(e[r],s,o,s+o,i)),Xt=s+o,!0;case"closer":if(a===1)return VS(s),Xt=s+o,!0;const l=On.pop(),u=Gt.substr(l.prevOffset,s-l.prevOffset);l.children.push(u),l.prevOffset=s+o;const p=Pa(l.element,l.tokenStart,l.tokenLength,s+o);return p.children=l.children,ou(p),Xt=s+o,!0;default:return Ma(),!1}}function FS(){const e=dm.exec(Gt);if(e===null)return["no-more-tokens"];const t=e.index,[n,r,s,o]=e,a=n.length;return o?["self-closed",s,t,a]:r?["closer",s,t,a]:["opener",s,t,a]}function Ma(){const e=Gt.length-Xt;e!==0&&In.push(Gt.substr(Xt,e))}function ou(e){const{element:t,tokenStart:n,tokenLength:r,prevOffset:s,children:o}=e,a=On[On.length-1],i=Gt.substr(a.prevOffset,n-a.prevOffset);i&&a.children.push(i),a.children.push(f.cloneElement(t,null,...o)),a.prevOffset=s||n+r}function VS(e){const{element:t,leadingTextStart:n,prevOffset:r,tokenStart:s,children:o}=On.pop(),a=e?Gt.substr(r,e-r):Gt.substr(r);a&&o.push(a),n!==null&&In.push(Gt.substr(n,s-n)),In.push(f.cloneElement(t,null,...o))}const LS=()=>c.jsx(kl,{children:c.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 auto-cols-max",children:[c.jsx("div",{children:c.jsxs("ol",{className:"ms-8 list-decimal",children:[c.jsx("li",{children:ze(me.sprintf(w("Create a Bot by sending %1$s command to %2$s."),"<Command />","<Link />"),{Command:c.jsx(gn,{children:"/newbot"}),Link:c.jsx(rt,{href:"https://t.me/BotFather",isExternal:!0,children:"@BotFather"})})}),c.jsx("li",{children:me.sprintf(w("After completing the steps %s will provide you the Bot Token."),"@BotFather")}),c.jsx("li",{children:ze(`${w("Copy the token and paste into the Bot Token field below.")} ${me.sprintf(w("For ease, use %s"),"<Link />")}`,{Link:c.jsx(rt,{href:"https://desktop.telegram.org",isExternal:!0,children:w("Telegram Desktop")})})}),c.jsx("li",{children:w("Test your bot token below.")}),c.jsx("li",{children:w("Activate the modules you want to use.")}),c.jsx("li",{children:w("Configure the activated modules.")}),c.jsx("li",{children:ze(me.sprintf(w("Hit %s below."),"<Button />"),{Button:c.jsx("b",{children:w("Save Changes")})})})]})}),c.jsx("div",{children:c.jsx(Qo,{title:w("Introduction"),videoId:"m48V-gWz9-o",asGridCol:!0})})]})}),$S=()=>{const[e,t]=f.useState(!0),n=f.useCallback(()=>t(!1),[]);return c.jsxs(c.Fragment,{children:[c.jsx(LS,{}),c.jsxs("div",{className:"flex flex-col gap-10 md:gap-4 mb-8",children:[c.jsx(K0,{botUsernameField:"bot_username",isRequired:!0,label:ht("bot_token"),name:"bot_token"}),c.jsx(xe,{name:"bot_username",render:({field:r})=>c.jsx(Te,{label:ht("bot_username"),description:me.sprintf(w("Use %s above to set automatically."),w("Test Token")),isRequired:!0,children:c.jsx(Se,{className:"max-w-[200px]",children:c.jsx(gt,{addonStart:"@",required:!0,autoComplete:"off",readOnly:e,onDoubleClick:n,...r})})})})]}),c.jsx(_n,{location:"bot"})]})},Fl=({prefix:e})=>c.jsx(xe,{name:Ee("active",e),render:({field:t})=>c.jsx(Te,{label:Ie("active"),children:c.jsx(Se,{children:c.jsx(bt,{...t,value:void 0,checked:t.value,onCheckedChange:t.onChange})})})}),fm=hf,BS=ll,pm=ul,Vl=({children:e,name:t})=>{const n=ct({name:t});return c.jsx(fm,{open:n,children:c.jsx(pm,{children:typeof e=="function"?e(n):e})})},US=({botUsername:e,videoId:t})=>c.jsx(kl,{className:"mt-6",children:c.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 auto-cols-max",children:[c.jsx("div",{children:c.jsxs("ol",{className:"ms-8 list-decimal",children:[c.jsxs("li",{children:[w("To receive notifications privately:"),c.jsxs("ol",{className:"ms-4 list-decimal",children:[c.jsx("li",{children:ze(me.sprintf(w("Get your Chat ID from %s and enter it below."),"<BotLink />"),{BotLink:c.jsx(rt,{href:"https://t.me/MyChatInfoBot",isExternal:!0,children:"@MyChatInfoBot"})})}),c.jsx("li",{className:"text-destructive",children:ze(me.sprintf(w("Send your own bot %s a message to start the conversation."),"(<BotLink />)"),{BotLink:c.jsxs(rt,{href:`https://t.me/${e}`,isExternal:!0,children:["@",e]})})})]})]}),c.jsxs("li",{children:[w("To receive notifications into a group:"),c.jsxs("ol",{className:"ms-4 list-decimal",children:[c.jsx("li",{children:ze(me.sprintf(w("Add %s to the group to get its Chat ID."),"<BotLink />"),{BotLink:c.jsx(rt,{href:"https://t.me/MyChatInfoBot?startgroup=true",isExternal:!0,children:"@MyChatInfoBot"})})}),c.jsx("li",{children:ze(me.sprintf(w("Enter the Chat ID in %s field below."),"<Field />"),{Field:c.jsx("b",{children:w("Send it to")})})}),c.jsx("li",{children:ze(me.sprintf(w("Add your own bot %s to the group."),"<BotLink />"),{BotLink:c.jsx(rt,{href:`https://t.me/${e}?startgroup=true`,isExternal:!0,children:`@${e}`})})})]})]})]})}),c.jsx("div",{children:c.jsx(Qo,{title:w("Private Notifications"),videoId:t,asGridCol:!0})})]})}),zS=({prefix:e,editProfileUrl:t})=>c.jsxs(c.Fragment,{children:[c.jsx(xe,{name:Ee("user_notifications",e),render:({field:n})=>c.jsx(Te,{description:w("Allow users receive their email notifications on Telegram."),label:Ie("user_notifications"),children:c.jsx(Se,{children:c.jsx(bt,{...n,value:void 0,checked:n.value,onCheckedChange:n.onChange})})})}),c.jsxs("p",{className:"mb-8",children:[c.jsx("span",{children:ze(me.sprintf(w("Use %s to let them connect their Telegram account."),"<Link />"),{Link:c.jsx(rt,{href:"https://wordpress.org/plugins/wptelegram-login",isExternal:!0,children:"WP Telegram Login & Register"})})}),c.jsx("br",{}),c.jsx("span",{children:ze(me.sprintf(w("They can also enter their Telegram Chat ID manually on %s page."),"<Link />"),{Link:c.jsx(rt,{href:t,isExternal:!0,children:w("profile")})})})]})]}),mm=({children:e})=>{const t=ct({name:"bot_token"});return c.jsx(c.Fragment,{children:t?e:c.jsx("p",{className:"text-destructive",children:w("You must add a bot token.")})})},Yn="notify",hm=f.forwardRef(({className:e,...t},n)=>c.jsx("textarea",{className:$("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));hm.displayName="Textarea";const gm=({prefix:e})=>c.jsx(xe,{name:Ee("message_template",e),render:({field:t})=>c.jsx(Te,{label:Ie("message_template"),description:w("Structure of the message to be sent."),controlWrapperClassName:"max-w-full",children:c.jsx(Se,{children:c.jsx(hm,{rows:10,spellCheck:!1,className:"h-auto",...t})})})}),HS=({prefix:e})=>c.jsxs(c.Fragment,{children:[c.jsx(gm,{prefix:e}),c.jsxs("div",{className:"mt-4",children:[c.jsx("span",{children:w("You can use any text, emojis or these variables in any order.")})," ",["{email_subject}","{email_message}"].map(t=>c.jsx(gn,{content:t},t))]})]});var Ll="Radio",[WS,vm]=$t(Ll),[ZS,GS]=WS(Ll),ym=f.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:s=!1,required:o,disabled:a,value:i="on",onCheck:l,form:u,...p}=e,[d,m]=f.useState(null),v=Le(t,g=>m(g)),y=f.useRef(!1),h=d?u||!!d.closest("form"):!0;return c.jsxs(ZS,{scope:n,checked:s,disabled:a,children:[c.jsx(we.button,{type:"button",role:"radio","aria-checked":s,"data-state":wm(s),"data-disabled":a?"":void 0,disabled:a,value:i,...p,ref:v,onClick:ye(e.onClick,g=>{s||l==null||l(),h&&(y.current=g.isPropagationStopped(),y.current||g.stopPropagation())})}),h&&c.jsx(qS,{control:d,bubbles:!y.current,name:r,value:i,checked:s,required:o,disabled:a,form:u,style:{transform:"translateX(-100%)"}})]})});ym.displayName=Ll;var bm="RadioIndicator",xm=f.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...s}=e,o=GS(bm,n);return c.jsx(Dr,{present:r||o.checked,children:c.jsx(we.span,{"data-state":wm(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})})});xm.displayName=bm;var qS=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,o=f.useRef(null),a=Uo(n),i=zo(t);return f.useEffect(()=>{const l=o.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&d){const m=new Event("click",{bubbles:r});d.call(l,n),l.dispatchEvent(m)}},[a,n,r]),c.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function wm(e){return e?"checked":"unchecked"}var YS=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],$l="RadioGroup",[KS,GT]=$t($l,[Bo,vm]),_m=Bo(),Sm=vm(),[XS,JS]=KS($l),Cm=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:s,value:o,required:a=!1,disabled:i=!1,orientation:l,dir:u,loop:p=!0,onValueChange:d,...m}=e,v=_m(n),y=js(u),[h,g]=Yt({prop:o,defaultProp:s,onChange:d});return c.jsx(XS,{scope:n,name:r,required:a,disabled:i,value:h,onValueChange:g,children:c.jsx(Hf,{asChild:!0,...v,orientation:l,dir:y,loop:p,children:c.jsx(we.div,{role:"radiogroup","aria-required":a,"aria-orientation":l,"data-disabled":i?"":void 0,dir:y,...m,ref:t})})})});Cm.displayName=$l;var km="RadioGroupItem",jm=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...s}=e,o=JS(km,n),a=o.disabled||r,i=_m(n),l=Sm(n),u=f.useRef(null),p=Le(t,u),d=o.value===s.value,m=f.useRef(!1);return f.useEffect(()=>{const v=h=>{YS.includes(h.key)&&(m.current=!0)},y=()=>m.current=!1;return document.addEventListener("keydown",v),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",y)}},[]),c.jsx(Wf,{asChild:!0,...i,focusable:!a,active:d,children:c.jsx(ym,{disabled:a,required:o.required,checked:d,...l,...s,name:o.name,ref:p,onCheck:()=>o.onValueChange(s.value),onKeyDown:ye(v=>{v.key==="Enter"&&v.preventDefault()}),onFocus:ye(s.onFocus,()=>{var v;m.current&&((v=u.current)==null||v.click())})})})});jm.displayName=km;var QS="RadioGroupIndicator",Em=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,s=Sm(n);return c.jsx(xm,{...s,...r,ref:t})});Em.displayName=QS;var Rm=Cm,Tm=jm,eC=Em;const Om=f.forwardRef(({className:e,...t},n)=>c.jsx(Rm,{className:$("grid gap-2",e),...t,ref:n}));Om.displayName=Rm.displayName;const Am=f.forwardRef(({className:e,...t},n)=>c.jsx(Tm,{ref:n,className:$("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:c.jsx(eC,{className:"flex items-center justify-center",children:c.jsx(Fb,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Am.displayName=Tm.displayName;const Os=f.forwardRef(({options:e,displayInline:t,...n},r)=>{const s=f.useId();return c.jsx(Om,{...n,ref:r,className:$({"xl:grid-flow-col xl:gap-4":t}),children:e.map(o=>{const a=`${s}-${o.value}`;return c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx(Am,{value:o.value,id:a}),c.jsx(Ho,{htmlFor:a,className:$("font-normal cursor-pointer",{"opacity-50 cursor-not-allowed":n.disabled}),children:o.label})]},a)})})});Os.displayName="RadioGroup";const tC=()=>[{value:"none",label:w("None")},{value:"HTML",label:w("HTML style")}],Im=({prefix:e,asColumn:t=!0})=>c.jsx(xe,{name:Ee("parse_mode",e),render:({field:n})=>c.jsx(Te,{className:t?"md:flex-col":"",label:Ie("parse_mode"),description:c.jsx(rt,{href:"https://core.telegram.org/bots/api#html-style",isExternal:!0,children:w("Learn more")}),children:c.jsx(Se,{children:c.jsx(Os,{...n,onValueChange:n.onChange,defaultValue:n.value,options:tC()})})})}),nC=()=>c.jsxs(c.Fragment,{children:[c.jsx(HS,{prefix:Yn}),c.jsx(_t,{className:"my-6"}),c.jsx(Im,{prefix:Yn,asColumn:!1})]}),ko=f.forwardRef(({children:e,icon:t,className:n,...r},s)=>c.jsx($n,{ref:s,className:$("px-2",n),size:"icon",...r,children:t||e}));ko.displayName="IconButton";const rC=({chatId:e,...t})=>c.jsx(Cl,{...t,title:w("Members Count:"),children:({result:n,resultType:r})=>c.jsxs("div",{className:"flex flex-wrap gap-3",children:[c.jsx("div",{className:"min-w-[150px]",children:c.jsx("span",{className:"font-semibold",children:e})}),c.jsx("span",{className:$("font-semibold",{"text-green-600":r==="SUCCESS"}),children:n})]})}),sC=({chatId:e,...t})=>c.jsx(Cl,{...t,children:({result:n,resultType:r})=>c.jsxs("div",{className:"flex flex-wrap gap-3",children:[c.jsx("div",{className:"min-w-max",children:c.jsx("span",{className:"font-semibold",children:e})}),c.jsx("span",{className:$("font-semibold",{"text-green-600":r==="SUCCESS"}),children:n})]})}),oC=(e,t=!0)=>{const[n,r]=f.useState(""),[s,o]=f.useState();f.useState({});const[a,i]=f.useState(""),[l,u]=f.useState(),p=f.useCallback(v=>async y=>{if(!e)return;const h=t?Rc(v):v;i(h);const[g,x]=await W0({bot_token:e,chat_id:h,text:""},y);i(""),u({chatId:v,result:x,resultType:g})},[e,t]),d=f.useCallback(async({nativeEvent:v})=>{var b;const y=(b=v.target)==null?void 0:b.value;if(!e||!y||n===y)return;const h=t?Rc(y):y;r(h);const[g,x]=await H0({bot_token:e,chat_id:h});r(""),o({chatId:y,result:x,resultType:g})},[e,n,t]),m=f.memo(({chat_id:v,disabled:y})=>c.jsx($n,{disabled:!e||y||!!a||!v,onClick:p((v==null?void 0:v.toString())||""),variant:"secondary",children:a&&a===v?w("Please wait…"):w("Send Test")}));return f.useMemo(()=>{const v=c.jsx(sC,{...l}),y=c.jsx(rC,{...s});return{ButtonComponent:m,result:v,memberCount:y,onBlur:d,testResult:l}},[m,s,d,l])};function aC({bot_token:e,onRemove:t,name:n,placeholder:r="@username","aria-label":s,showMemberCount:o=!0}){const{ButtonComponent:a,memberCount:i,result:l,onBlur:u}=oC(e),p=ct({name:n}),d=jd(n);return c.jsx(xe,{name:n,render:({field:m})=>c.jsxs("div",{children:[c.jsxs("div",{className:"flex gap-3 items-center flex-row border p-2 rounded max-w-[35rem]",children:[c.jsxs("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-3 w-full",children:[c.jsx(gt,{type:"text","aria-label":s||w("Channel username or Chat ID"),placeholder:r,className:"sm:col-span-2",isInvalid:!!d,...m,onBlur:v=>{var y;o&&(u==null||u(v)),(y=m.onBlur)==null||y.call(m)}}),c.jsx(a,{chat_id:p})]}),c.jsx(ko,{variant:"ghost","aria-label":w("Remove"),icon:c.jsx(Do,{}),onClick:t,className:"rounded-full"})]}),c.jsxs("div",{children:[i,l]})]})})}function Nm({name:e,label:t,bot_token:n,description:r,placeholder:s,"aria-label":o,showMemberCount:a,addButtonLabel:i}){var y;const{control:l}=Pt(),{fields:u,append:p,remove:d}=Ui({name:e,control:l}),m=jd(e),v=(m==null?void 0:m.message)||((y=m==null?void 0:m.root)==null?void 0:y.message);return c.jsxs("div",{children:[c.jsxs("div",{children:[c.jsx(wl,{className:"md:mt-2 md:basis-[30%]",isRequired:!0,children:t}),r?c.jsx(yl,{className:"mb-12",children:r}):null,v?c.jsx(bl,{className:"mb-4",children:v}):null,c.jsx("div",{className:"flex flex-col gap-10",children:u.map((h,g)=>c.jsx("div",{children:c.jsx(aC,{bot_token:n,onRemove:()=>d(g),name:`${e}.${g}.value`,placeholder:s,"aria-label":o,showMemberCount:a})},h.id))})]}),c.jsxs($n,{onClick:()=>p({value:""}),className:"self-start mt-4",variant:"secondary",children:[c.jsx(Qi,{className:"me-2",size:"16"}),i||w("Add channel")]})]})}const iC=()=>{const{watch:e}=Pt(),t=e("bot_token");return c.jsxs(c.Fragment,{children:[c.jsx(xe,{name:`${Yn}.watch_emails`,render:({field:n})=>c.jsx(Te,{label:ht("watch_emails"),description:ze(me.sprintf(w("If you want to receive notification for every email, then write %s."),"<Code />"),{Code:c.jsx(Rs,{children:"any"})}),children:c.jsx(Se,{className:"max-w-[350px]",children:c.jsx(gt,{autoComplete:"email",...n})})})}),c.jsx(_n,{location:"watch-emails"}),c.jsx(Nm,{name:`${Yn}.chat_ids`,label:ht("chat_ids"),bot_token:t,description:w("Telegram User or Group Chat ID."),"aria-label":w("Telegram User or Group Chat ID"),placeholder:"987654321 | My Personal ID",showMemberCount:!1})]})},{editProfileUrl:lC}=cn("assets"),cC=()=>{const e=ct({name:"bot_username"});return c.jsxs(c.Fragment,{children:[c.jsx(Fl,{prefix:Yn}),c.jsx(Vl,{name:`${Yn}.active`,children:c.jsxs(mm,{children:[c.jsx(US,{botUsername:e||"",videoId:"gVJCtwkorMA"}),c.jsxs(un,{title:w("Notification Settings"),children:[c.jsx(iC,{}),c.jsx(_t,{className:"my-6"}),c.jsx(zS,{editProfileUrl:lC,prefix:Yn}),c.jsx(nC,{})]})]})})]})},uC=({botUsername:e,videoId:t})=>c.jsxs(kl,{className:"mt-6",children:[c.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 auto-cols-max",children:[c.jsx("div",{children:c.jsxs("ol",{className:"ms-8 list-decimal",children:[c.jsx("li",{children:w("Create a Telegram channel or group.")}),c.jsx("li",{children:ze(me.sprintf(w("Add your bot %s as Administrator to your Channel/Group."),"<Username />"),{Username:c.jsxs(c.Fragment,{children:["(",c.jsx(gn,{content:`@${e}`}),")"]})})}),c.jsx("li",{children:w("Enter the Channel Username in the field below.")}),c.jsxs("ul",{className:"ms-8 list-disc",children:[c.jsx("li",{children:c.jsx("span",{children:ze(me.sprintf(w("Username must start with %s"),"<Prefix />"),{Prefix:c.jsx(gn,{content:"@"})})})}),c.jsx("li",{children:c.jsxs("span",{children:[w("You can also use the Chat ID of a group or private chat.")," ",c.jsx("span",{children:ze(me.sprintf(w("Get it from %s."),"<BotLink />"),{BotLink:c.jsx(rt,{href:"https://t.me/MyChatInfoBot",isExternal:!0,children:"@MyChatInfoBot"})})})]})}),c.jsx("li",{children:c.jsxs("span",{children:[c.jsx("span",{children:ze(me.sprintf(w("If you want to send posts to a specific topic in a group with topics enabled, you can add a colon (%s) to the chat ID followed by topic ID."),"<Colon />"),{Colon:c.jsx(gn,{content:":"})})})," ",c.jsx("span",{children:ze(me.sprintf(w("For example %s"),"<Ex />"),{Ex:c.jsx(Rs,{children:"-100012345678:102"})})})]})})]}),c.jsx("li",{children:ze(me.sprintf(w("Hit %s below."),"<Button />"),{Button:c.jsx("b",{children:w("Save Changes")})})})]})}),c.jsx("div",{children:c.jsx(Qo,{title:w("Introduction"),videoId:t,asGridCol:!0})})]}),c.jsxs("div",{className:"mt-8",children:[c.jsxs("div",{className:"text-green-800",children:[c.jsxs("b",{children:[w("Tip!"),"💡"]})," ",c.jsx("span",{children:w("You can add an internal note to the chat ID to make it easier for you to identify it.")})," ",c.jsx("span",{children:ze(me.sprintf(w("Note can be added after %s."),"<code />"),{code:c.jsx(gn,{content:"|",codeClassName:"p-0"})})}),c.jsx("br",{}),c.jsx("span",{children:me.sprintf(w("For example %s"),"👇")})]}),c.jsxs("ul",{className:"ms-8 mt-4 list-disc",children:[c.jsx("li",{children:c.jsx("code",{children:"-1000123456789|Internal Testing"})}),c.jsx("li",{children:c.jsx("code",{children:"-1000987654321:123|Forum topic"})}),c.jsx("li",{children:c.jsx("code",{children:"987654321|My Chat ID"})}),c.jsx("li",{children:c.jsx("code",{children:"@WPTelegramChat | ملاحظة هنا"})})]})]})]}),at="p2tg",dC=()=>{const e=ct({name:"bot_token"});return c.jsxs(un,{title:w("Destination"),children:[c.jsx(Nm,{name:`${at}.channels`,label:ht("channels"),bot_token:e,description:w("Channel or group username.")}),c.jsx(_n,{location:"channels"})]})},fC=()=>{const e=!ct({name:`${at}.inline_url_button`});return c.jsxs(un,{title:w("Inline Keyboard"),children:[c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 gap-6 my-6",children:[c.jsx("div",{children:c.jsx(xe,{name:`${at}.inline_url_button`,render:({field:t})=>c.jsx(Te,{label:ht("inline_url_button"),description:w("Add an inline clickable button for the post URL just below the message."),className:"md:flex-col",children:c.jsx(Se,{children:c.jsx(bt,{...t,value:void 0,checked:t.value,onCheckedChange:t.onChange})})})})}),c.jsx("div",{children:c.jsx(xe,{name:`${at}.inline_button_text`,render:({field:t})=>c.jsx(Te,{label:ht("inline_button_text"),className:"md:flex-col",isDisabled:e,children:c.jsx(Se,{className:"max-w-[200px]",children:c.jsx(gt,{autoComplete:"off",disabled:e,placeholder:w("View Post"),...t})})})})}),c.jsx("div",{children:c.jsx(xe,{name:`${at}.inline_button_url`,render:({field:t})=>c.jsx(Te,{label:ht("inline_button_url"),description:w("Source of the button URL."),className:"md:flex-col",afterMessage:c.jsx("p",{children:ze(me.sprintf(w("You can specify any custom field like %s."),"<Macro />"),{Macro:c.jsx(gn,{content:"{cf:_product_url}"})})}),isDisabled:e,children:c.jsx(Se,{className:"max-w-[200px]",children:c.jsx(gt,{autoComplete:"off",disabled:e,placeholder:"{full_url}",...t})})})})})]}),c.jsx(_n,{location:"inline-button"})]})};function au(e,[t,n]){return Math.min(n,Math.max(t,e))}var Da=0;function pC(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??iu()),document.body.insertAdjacentElement("beforeend",e[1]??iu()),Da++,()=>{Da===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Da--}},[])}function iu(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Fa="focusScope.autoFocusOnMount",Va="focusScope.autoFocusOnUnmount",lu={bubbles:!1,cancelable:!0},mC="FocusScope",Pm=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...a}=e,[i,l]=f.useState(null),u=an(s),p=an(o),d=f.useRef(null),m=Le(t,h=>l(h)),v=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let h=function(S){if(v.paused||!i)return;const E=S.target;i.contains(E)?d.current=E:Rn(d.current,{select:!0})},g=function(S){if(v.paused||!i)return;const E=S.relatedTarget;E!==null&&(i.contains(E)||Rn(d.current,{select:!0}))},x=function(S){if(document.activeElement===document.body)for(const _ of S)_.removedNodes.length>0&&Rn(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const b=new MutationObserver(x);return i&&b.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),b.disconnect()}}},[r,i,v.paused]),f.useEffect(()=>{if(i){uu.add(v);const h=document.activeElement;if(!i.contains(h)){const x=new CustomEvent(Fa,lu);i.addEventListener(Fa,u),i.dispatchEvent(x),x.defaultPrevented||(hC(xC(Mm(i)),{select:!0}),document.activeElement===h&&Rn(i))}return()=>{i.removeEventListener(Fa,u),setTimeout(()=>{const x=new CustomEvent(Va,lu);i.addEventListener(Va,p),i.dispatchEvent(x),x.defaultPrevented||Rn(h??document.body,{select:!0}),i.removeEventListener(Va,p),uu.remove(v)},0)}}},[i,u,p,v]);const y=f.useCallback(h=>{if(!n&&!r||v.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,x=document.activeElement;if(g&&x){const b=h.currentTarget,[S,E]=gC(b);S&&E?!h.shiftKey&&x===E?(h.preventDefault(),n&&Rn(S,{select:!0})):h.shiftKey&&x===S&&(h.preventDefault(),n&&Rn(E,{select:!0})):x===b&&h.preventDefault()}},[n,r,v.paused]);return c.jsx(we.div,{tabIndex:-1,...a,ref:m,onKeyDown:y})});Pm.displayName=mC;function hC(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Rn(r,{select:t}),document.activeElement!==n)return}function gC(e){const t=Mm(e),n=cu(t,e),r=cu(t.reverse(),e);return[n,r]}function Mm(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function cu(e,t){for(const n of e)if(!vC(n,{upTo:t}))return n}function vC(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function yC(e){return e instanceof HTMLInputElement&&"select"in e}function Rn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&yC(e)&&t&&e.select()}}var uu=bC();function bC(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=du(e,t),e.unshift(t)},remove(t){var n;e=du(e,t),(n=e[0])==null||n.resume()}}}function du(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function xC(e){return e.filter(t=>t.tagName!=="A")}var wC=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ir=new WeakMap,Bs=new WeakMap,Us={},La=0,Dm=function(e){return e&&(e.host||Dm(e.parentNode))},_C=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Dm(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},SC=function(e,t,n,r){var s=_C(t,Array.isArray(e)?e:[e]);Us[n]||(Us[n]=new WeakMap);var o=Us[n],a=[],i=new Set,l=new Set(s),u=function(d){!d||i.has(d)||(i.add(d),u(d.parentNode))};s.forEach(u);var p=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(m){if(i.has(m))p(m);else try{var v=m.getAttribute(r),y=v!==null&&v!=="false",h=(ir.get(m)||0)+1,g=(o.get(m)||0)+1;ir.set(m,h),o.set(m,g),a.push(m),h===1&&y&&Bs.set(m,!0),g===1&&m.setAttribute(n,"true"),y||m.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",m,x)}})};return p(t),i.clear(),La++,function(){a.forEach(function(d){var m=ir.get(d)-1,v=o.get(d)-1;ir.set(d,m),o.set(d,v),m||(Bs.has(d)||d.removeAttribute(r),Bs.delete(d)),v||d.removeAttribute(n)}),La--,La||(ir=new WeakMap,ir=new WeakMap,Bs=new WeakMap,Us={})}},CC=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=wC(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),SC(r,s,n,"aria-hidden")):function(){return null}},en=function(){return en=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},en.apply(this,arguments)};function Fm(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function kC(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,o;r<s;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var eo="right-scroll-bar-position",to="width-before-scroll-bar",jC="with-scroll-bars-hidden",EC="--removed-body-scroll-bar-size";function $a(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function RC(e,t){var n=f.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var TC=typeof window<"u"?f.useLayoutEffect:f.useEffect,fu=new WeakMap;function OC(e,t){var n=RC(null,function(r){return e.forEach(function(s){return $a(s,r)})});return TC(function(){var r=fu.get(n);if(r){var s=new Set(r),o=new Set(e),a=n.current;s.forEach(function(i){o.has(i)||$a(i,null)}),o.forEach(function(i){s.has(i)||$a(i,a)})}fu.set(n,e)},[e]),n}function AC(e){return e}function IC(e,t){t===void 0&&(t=AC);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(i){return o(i)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(o),a=n}var l=function(){var p=a;a=[],p.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(p){a.push(p),u()},filter:function(p){return a=a.filter(p),n}}}};return s}function NC(e){e===void 0&&(e={});var t=IC(null);return t.options=en({async:!0,ssr:!1},e),t}var Vm=function(e){var t=e.sideCar,n=Fm(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return f.createElement(r,en({},n))};Vm.isSideCarExport=!0;function PC(e,t){return e.useMedium(t),Vm}var Lm=NC(),Ba=function(){},ea=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:Ba,onWheelCapture:Ba,onTouchMoveCapture:Ba}),s=r[0],o=r[1],a=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,p=e.enabled,d=e.shards,m=e.sideCar,v=e.noIsolation,y=e.inert,h=e.allowPinchZoom,g=e.as,x=g===void 0?"div":g,b=e.gapMode,S=Fm(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=m,_=OC([n,t]),j=en(en({},S),s);return f.createElement(f.Fragment,null,p&&f.createElement(E,{sideCar:Lm,removeScrollBar:u,shards:d,noIsolation:v,inert:y,setCallbacks:o,allowPinchZoom:!!h,lockRef:n,gapMode:b}),a?f.cloneElement(f.Children.only(i),en(en({},j),{ref:_})):f.createElement(x,en({},j,{className:l,ref:_}),i))});ea.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ea.classNames={fullWidth:to,zeroRight:eo};var MC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function DC(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=MC();return t&&e.setAttribute("nonce",t),e}function FC(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function VC(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var LC=function(){var e=0,t=null;return{add:function(n){e==0&&(t=DC())&&(FC(t,n),VC(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},$C=function(){var e=LC();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},$m=function(){var e=$C(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},BC={left:0,top:0,right:0,gap:0},Ua=function(e){return parseInt(e||"",10)||0},UC=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Ua(n),Ua(r),Ua(s)]},zC=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return BC;var t=UC(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},HC=$m(),br="data-scroll-locked",WC=function(e,t,n,r){var s=e.left,o=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
.`.concat(jC,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(i,"px ").concat(r,`;
}
body[`).concat(br,`] {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(s,`px;
padding-top: `).concat(o,`px;
padding-right: `).concat(a,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(i,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(eo,` {
right: `).concat(i,"px ").concat(r,`;
}
.`).concat(to,` {
margin-right: `).concat(i,"px ").concat(r,`;
}
.`).concat(eo," .").concat(eo,` {
right: 0 `).concat(r,`;
}
.`).concat(to," .").concat(to,` {
margin-right: 0 `).concat(r,`;
}
body[`).concat(br,`] {
`).concat(EC,": ").concat(i,`px;
}
`)},pu=function(){var e=parseInt(document.body.getAttribute(br)||"0",10);return isFinite(e)?e:0},ZC=function(){f.useEffect(function(){return document.body.setAttribute(br,(pu()+1).toString()),function(){var e=pu()-1;e<=0?document.body.removeAttribute(br):document.body.setAttribute(br,e.toString())}},[])},GC=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;ZC();var o=f.useMemo(function(){return zC(s)},[s]);return f.createElement(HC,{styles:WC(o,!t,s,n?"":"!important")})},Si=!1;if(typeof window<"u")try{var zs=Object.defineProperty({},"passive",{get:function(){return Si=!0,!0}});window.addEventListener("test",zs,zs),window.removeEventListener("test",zs,zs)}catch{Si=!1}var lr=Si?{passive:!1}:!1,qC=function(e){return e.tagName==="TEXTAREA"},Bm=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!qC(e)&&n[t]==="visible")},YC=function(e){return Bm(e,"overflowY")},KC=function(e){return Bm(e,"overflowX")},mu=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=Um(e,r);if(s){var o=zm(e,r),a=o[1],i=o[2];if(a>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},XC=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},JC=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Um=function(e,t){return e==="v"?YC(t):KC(t)},zm=function(e,t){return e==="v"?XC(t):JC(t)},QC=function(e,t){return e==="h"&&t==="rtl"?-1:1},e1=function(e,t,n,r,s){var o=QC(e,window.getComputedStyle(t).direction),a=o*r,i=n.target,l=t.contains(i),u=!1,p=a>0,d=0,m=0;do{var v=zm(e,i),y=v[0],h=v[1],g=v[2],x=h-g-o*y;(y||x)&&Um(e,i)&&(d+=x,m+=y),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(p&&Math.abs(d)<1||!p&&Math.abs(m)<1)&&(u=!0),u},Hs=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},hu=function(e){return[e.deltaX,e.deltaY]},gu=function(e){return e&&"current"in e?e.current:e},t1=function(e,t){return e[0]===t[0]&&e[1]===t[1]},n1=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},r1=0,cr=[];function s1(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),s=f.useState(r1++)[0],o=f.useState($m)[0],a=f.useRef(e);f.useEffect(function(){a.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var h=kC([e.lockRef.current],(e.shards||[]).map(gu),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var i=f.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var x=Hs(h),b=n.current,S="deltaX"in h?h.deltaX:b[0]-x[0],E="deltaY"in h?h.deltaY:b[1]-x[1],_,j=h.target,k=Math.abs(S)>Math.abs(E)?"h":"v";if("touches"in h&&k==="h"&&j.type==="range")return!1;var R=mu(k,j);if(!R)return!0;if(R?_=k:(_=k==="v"?"h":"v",R=mu(k,j)),!R)return!1;if(!r.current&&"changedTouches"in h&&(S||E)&&(r.current=_),!_)return!0;var N=r.current||_;return e1(N,g,h,N==="h"?S:E)},[]),l=f.useCallback(function(h){var g=h;if(!(!cr.length||cr[cr.length-1]!==o)){var x="deltaY"in g?hu(g):Hs(g),b=t.current.filter(function(_){return _.name===g.type&&(_.target===g.target||g.target===_.shadowParent)&&t1(_.delta,x)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var S=(a.current.shards||[]).map(gu).filter(Boolean).filter(function(_){return _.contains(g.target)}),E=S.length>0?i(g,S[0]):!a.current.noIsolation;E&&g.cancelable&&g.preventDefault()}}},[]),u=f.useCallback(function(h,g,x,b){var S={name:h,delta:g,target:x,should:b,shadowParent:o1(x)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(E){return E!==S})},1)},[]),p=f.useCallback(function(h){n.current=Hs(h),r.current=void 0},[]),d=f.useCallback(function(h){u(h.type,hu(h),h.target,i(h,e.lockRef.current))},[]),m=f.useCallback(function(h){u(h.type,Hs(h),h.target,i(h,e.lockRef.current))},[]);f.useEffect(function(){return cr.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",l,lr),document.addEventListener("touchmove",l,lr),document.addEventListener("touchstart",p,lr),function(){cr=cr.filter(function(h){return h!==o}),document.removeEventListener("wheel",l,lr),document.removeEventListener("touchmove",l,lr),document.removeEventListener("touchstart",p,lr)}},[]);var v=e.removeScrollBar,y=e.inert;return f.createElement(f.Fragment,null,y?f.createElement(o,{styles:n1(s)}):null,v?f.createElement(GC,{gapMode:e.gapMode}):null)}function o1(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const a1=PC(Lm,s1);var Hm=f.forwardRef(function(e,t){return f.createElement(ea,en({},e,{ref:t,sideCar:a1}))});Hm.classNames=ea.classNames;var i1=[" ","Enter","ArrowUp","ArrowDown"],l1=[" ","Enter"],As="Select",[ta,na,c1]=ol(As),[Lr,qT]=$t(As,[c1,qo]),ra=qo(),[u1,Un]=Lr(As),[d1,f1]=Lr(As),Wm=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:o,value:a,defaultValue:i,onValueChange:l,dir:u,name:p,autoComplete:d,disabled:m,required:v,form:y}=e,h=ra(t),[g,x]=f.useState(null),[b,S]=f.useState(null),[E,_]=f.useState(!1),j=js(u),[k=!1,R]=Yt({prop:r,defaultProp:s,onChange:o}),[N,F]=Yt({prop:a,defaultProp:i,onChange:l}),z=f.useRef(null),M=g?y||!!g.closest("form"):!0,[B,q]=f.useState(new Set),L=Array.from(B).map(I=>I.props.value).join(";");return c.jsx(Xp,{...h,children:c.jsxs(u1,{required:v,scope:t,trigger:g,onTriggerChange:x,valueNode:b,onValueNodeChange:S,valueNodeHasChildren:E,onValueNodeHasChildrenChange:_,contentId:Bn(),value:N,onValueChange:F,open:k,onOpenChange:R,dir:j,triggerPointerDownPosRef:z,disabled:m,children:[c.jsx(ta.Provider,{scope:t,children:c.jsx(d1,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(I=>{q(U=>new Set(U).add(I))},[]),onNativeOptionRemove:f.useCallback(I=>{q(U=>{const P=new Set(U);return P.delete(I),P})},[]),children:n})}),M?c.jsxs(vh,{"aria-hidden":!0,required:v,tabIndex:-1,name:p,autoComplete:d,value:N,onChange:I=>F(I.target.value),disabled:m,form:y,children:[N===void 0?c.jsx("option",{value:""}):null,Array.from(B)]},L):null]})})};Wm.displayName=As;var Zm="SelectTrigger",Gm=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,o=ra(n),a=Un(Zm,n),i=a.disabled||r,l=Le(t,a.onTriggerChange),u=na(n),p=f.useRef("touch"),[d,m,v]=yh(h=>{const g=u().filter(S=>!S.disabled),x=g.find(S=>S.value===a.value),b=bh(g,h,x);b!==void 0&&a.onValueChange(b.value)}),y=h=>{i||(a.onOpenChange(!0),v()),h&&(a.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return c.jsx(Jp,{asChild:!0,...o,children:c.jsx(we.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":gh(a.value)?"":void 0,...s,ref:l,onClick:ye(s.onClick,h=>{h.currentTarget.focus(),p.current!=="mouse"&&y(h)}),onPointerDown:ye(s.onPointerDown,h=>{p.current=h.pointerType;const g=h.target;g.hasPointerCapture(h.pointerId)&&g.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(y(h),h.preventDefault())}),onKeyDown:ye(s.onKeyDown,h=>{const g=d.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&m(h.key),!(g&&h.key===" ")&&i1.includes(h.key)&&(y(),h.preventDefault())})})})});Gm.displayName=Zm;var qm="SelectValue",Ym=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:a="",...i}=e,l=Un(qm,n),{onValueNodeHasChildrenChange:u}=l,p=o!==void 0,d=Le(t,l.onValueNodeChange);return yt(()=>{u(p)},[u,p]),c.jsx(we.span,{...i,ref:d,style:{pointerEvents:"none"},children:gh(l.value)?c.jsx(c.Fragment,{children:a}):o})});Ym.displayName=qm;var p1="SelectIcon",Km=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return c.jsx(we.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});Km.displayName=p1;var m1="SelectPortal",Xm=e=>c.jsx(tm,{asChild:!0,...e});Xm.displayName=m1;var er="SelectContent",Jm=f.forwardRef((e,t)=>{const n=Un(er,e.__scopeSelect),[r,s]=f.useState();if(yt(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?Nr.createPortal(c.jsx(Qm,{scope:e.__scopeSelect,children:c.jsx(ta.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),o):null}return c.jsx(eh,{...e,ref:t})});Jm.displayName=er;var zt=10,[Qm,zn]=Lr(er),h1="SelectContentImpl",g1=ns("SelectContent.RemoveScroll"),eh=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:a,side:i,sideOffset:l,align:u,alignOffset:p,arrowPadding:d,collisionBoundary:m,collisionPadding:v,sticky:y,hideWhenDetached:h,avoidCollisions:g,...x}=e,b=Un(er,n),[S,E]=f.useState(null),[_,j]=f.useState(null),k=Le(t,H=>E(H)),[R,N]=f.useState(null),[F,z]=f.useState(null),M=na(n),[B,q]=f.useState(!1),L=f.useRef(!1);f.useEffect(()=>{if(S)return CC(S)},[S]),pC();const I=f.useCallback(H=>{const[ue,...je]=M().map(he=>he.ref.current),[ge]=je.slice(-1),ve=document.activeElement;for(const he of H)if(he===ve||(he==null||he.scrollIntoView({block:"nearest"}),he===ue&&_&&(_.scrollTop=0),he===ge&&_&&(_.scrollTop=_.scrollHeight),he==null||he.focus(),document.activeElement!==ve))return},[M,_]),U=f.useCallback(()=>I([R,S]),[I,R,S]);f.useEffect(()=>{B&&U()},[B,U]);const{onOpenChange:P,triggerPointerDownPosRef:ae}=b;f.useEffect(()=>{if(S){let H={x:0,y:0};const ue=ge=>{var ve,he;H={x:Math.abs(Math.round(ge.pageX)-(((ve=ae.current)==null?void 0:ve.x)??0)),y:Math.abs(Math.round(ge.pageY)-(((he=ae.current)==null?void 0:he.y)??0))}},je=ge=>{H.x<=10&&H.y<=10?ge.preventDefault():S.contains(ge.target)||P(!1),document.removeEventListener("pointermove",ue),ae.current=null};return ae.current!==null&&(document.addEventListener("pointermove",ue),document.addEventListener("pointerup",je,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ue),document.removeEventListener("pointerup",je,{capture:!0})}}},[S,P,ae]),f.useEffect(()=>{const H=()=>P(!1);return window.addEventListener("blur",H),window.addEventListener("resize",H),()=>{window.removeEventListener("blur",H),window.removeEventListener("resize",H)}},[P]);const[Pe,ie]=yh(H=>{const ue=M().filter(ve=>!ve.disabled),je=ue.find(ve=>ve.ref.current===document.activeElement),ge=bh(ue,H,je);ge&&setTimeout(()=>ge.ref.current.focus())}),ne=f.useCallback((H,ue,je)=>{const ge=!L.current&&!je;(b.value!==void 0&&b.value===ue||ge)&&(N(H),ge&&(L.current=!0))},[b.value]),J=f.useCallback(()=>S==null?void 0:S.focus(),[S]),le=f.useCallback((H,ue,je)=>{const ge=!L.current&&!je;(b.value!==void 0&&b.value===ue||ge)&&z(H)},[b.value]),Re=r==="popper"?Ci:th,ce=Re===Ci?{side:i,sideOffset:l,align:u,alignOffset:p,arrowPadding:d,collisionBoundary:m,collisionPadding:v,sticky:y,hideWhenDetached:h,avoidCollisions:g}:{};return c.jsx(Qm,{scope:n,content:S,viewport:_,onViewportChange:j,itemRefCallback:ne,selectedItem:R,onItemLeave:J,itemTextRefCallback:le,focusSelectedItem:U,selectedItemText:F,position:r,isPositioned:B,searchRef:Pe,children:c.jsx(Hm,{as:g1,allowPinchZoom:!0,children:c.jsx(Pm,{asChild:!0,trapped:b.open,onMountAutoFocus:H=>{H.preventDefault()},onUnmountAutoFocus:ye(s,H=>{var ue;(ue=b.trigger)==null||ue.focus({preventScroll:!0}),H.preventDefault()}),children:c.jsx(jl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:H=>H.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:c.jsx(Re,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:H=>H.preventDefault(),...x,...ce,onPlaced:()=>q(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:ye(x.onKeyDown,H=>{const ue=H.ctrlKey||H.altKey||H.metaKey;if(H.key==="Tab"&&H.preventDefault(),!ue&&H.key.length===1&&ie(H.key),["ArrowUp","ArrowDown","Home","End"].includes(H.key)){let ge=M().filter(ve=>!ve.disabled).map(ve=>ve.ref.current);if(["ArrowUp","End"].includes(H.key)&&(ge=ge.slice().reverse()),["ArrowUp","ArrowDown"].includes(H.key)){const ve=H.target,he=ge.indexOf(ve);ge=ge.slice(he+1)}setTimeout(()=>I(ge)),H.preventDefault()}})})})})})})});eh.displayName=h1;var v1="SelectItemAlignedPosition",th=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,o=Un(er,n),a=zn(er,n),[i,l]=f.useState(null),[u,p]=f.useState(null),d=Le(t,k=>p(k)),m=na(n),v=f.useRef(!1),y=f.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:x,focusSelectedItem:b}=a,S=f.useCallback(()=>{if(o.trigger&&o.valueNode&&i&&u&&h&&g&&x){const k=o.trigger.getBoundingClientRect(),R=u.getBoundingClientRect(),N=o.valueNode.getBoundingClientRect(),F=x.getBoundingClientRect();if(o.dir!=="rtl"){const ve=F.left-R.left,he=N.left-ve,Ke=k.left-he,qe=k.width+Ke,xt=Math.max(qe,R.width),Et=window.innerWidth-zt,ut=au(he,[zt,Math.max(zt,Et-xt)]);i.style.minWidth=qe+"px",i.style.left=ut+"px"}else{const ve=R.right-F.right,he=window.innerWidth-N.right-ve,Ke=window.innerWidth-k.right-he,qe=k.width+Ke,xt=Math.max(qe,R.width),Et=window.innerWidth-zt,ut=au(he,[zt,Math.max(zt,Et-xt)]);i.style.minWidth=qe+"px",i.style.right=ut+"px"}const z=m(),M=window.innerHeight-zt*2,B=h.scrollHeight,q=window.getComputedStyle(u),L=parseInt(q.borderTopWidth,10),I=parseInt(q.paddingTop,10),U=parseInt(q.borderBottomWidth,10),P=parseInt(q.paddingBottom,10),ae=L+I+B+P+U,Pe=Math.min(g.offsetHeight*5,ae),ie=window.getComputedStyle(h),ne=parseInt(ie.paddingTop,10),J=parseInt(ie.paddingBottom,10),le=k.top+k.height/2-zt,Re=M-le,ce=g.offsetHeight/2,H=g.offsetTop+ce,ue=L+I+H,je=ae-ue;if(ue<=le){const ve=z.length>0&&g===z[z.length-1].ref.current;i.style.bottom="0px";const he=u.clientHeight-h.offsetTop-h.offsetHeight,Ke=Math.max(Re,ce+(ve?J:0)+he+U),qe=ue+Ke;i.style.height=qe+"px"}else{const ve=z.length>0&&g===z[0].ref.current;i.style.top="0px";const Ke=Math.max(le,L+h.offsetTop+(ve?ne:0)+ce)+je;i.style.height=Ke+"px",h.scrollTop=ue-le+h.offsetTop}i.style.margin=`${zt}px 0`,i.style.minHeight=Pe+"px",i.style.maxHeight=M+"px",r==null||r(),requestAnimationFrame(()=>v.current=!0)}},[m,o.trigger,o.valueNode,i,u,h,g,x,o.dir,r]);yt(()=>S(),[S]);const[E,_]=f.useState();yt(()=>{u&&_(window.getComputedStyle(u).zIndex)},[u]);const j=f.useCallback(k=>{k&&y.current===!0&&(S(),b==null||b(),y.current=!1)},[S,b]);return c.jsx(b1,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:v,onScrollButtonChange:j,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:c.jsx(we.div,{...s,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});th.displayName=v1;var y1="SelectPopperPosition",Ci=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=zt,...o}=e,a=ra(n);return c.jsx(Qp,{...a,...o,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ci.displayName=y1;var[b1,Bl]=Lr(er,{}),ki="SelectViewport",nh=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,o=zn(ki,n),a=Bl(ki,n),i=Le(t,o.onViewportChange),l=f.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),c.jsx(ta.Slot,{scope:n,children:c.jsx(we.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:ye(s.onScroll,u=>{const p=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:m}=a;if(m!=null&&m.current&&d){const v=Math.abs(l.current-p.scrollTop);if(v>0){const y=window.innerHeight-zt*2,h=parseFloat(d.style.minHeight),g=parseFloat(d.style.height),x=Math.max(h,g);if(x<y){const b=x+v,S=Math.min(y,b),E=b-S;d.style.height=S+"px",d.style.bottom==="0px"&&(p.scrollTop=E>0?E:0,d.style.justifyContent="flex-end")}}}l.current=p.scrollTop})})})]})});nh.displayName=ki;var rh="SelectGroup",[x1,w1]=Lr(rh),sh=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Bn();return c.jsx(x1,{scope:n,id:s,children:c.jsx(we.div,{role:"group","aria-labelledby":s,...r,ref:t})})});sh.displayName=rh;var oh="SelectLabel",ah=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=w1(oh,n);return c.jsx(we.div,{id:s.id,...r,ref:t})});ah.displayName=oh;var jo="SelectItem",[_1,ih]=Lr(jo),lh=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...a}=e,i=Un(jo,n),l=zn(jo,n),u=i.value===r,[p,d]=f.useState(o??""),[m,v]=f.useState(!1),y=Le(t,b=>{var S;return(S=l.itemRefCallback)==null?void 0:S.call(l,b,r,s)}),h=Bn(),g=f.useRef("touch"),x=()=>{s||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(_1,{scope:n,value:r,disabled:s,textId:h,isSelected:u,onItemTextChange:f.useCallback(b=>{d(S=>S||((b==null?void 0:b.textContent)??"").trim())},[]),children:c.jsx(ta.ItemSlot,{scope:n,value:r,disabled:s,textValue:p,children:c.jsx(we.div,{role:"option","aria-labelledby":h,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...a,ref:y,onFocus:ye(a.onFocus,()=>v(!0)),onBlur:ye(a.onBlur,()=>v(!1)),onClick:ye(a.onClick,()=>{g.current!=="mouse"&&x()}),onPointerUp:ye(a.onPointerUp,()=>{g.current==="mouse"&&x()}),onPointerDown:ye(a.onPointerDown,b=>{g.current=b.pointerType}),onPointerMove:ye(a.onPointerMove,b=>{var S;g.current=b.pointerType,s?(S=l.onItemLeave)==null||S.call(l):g.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ye(a.onPointerLeave,b=>{var S;b.currentTarget===document.activeElement&&((S=l.onItemLeave)==null||S.call(l))}),onKeyDown:ye(a.onKeyDown,b=>{var E;((E=l.searchRef)==null?void 0:E.current)!==""&&b.key===" "||(l1.includes(b.key)&&x(),b.key===" "&&b.preventDefault())})})})})});lh.displayName=jo;var ts="SelectItemText",ch=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...o}=e,a=Un(ts,n),i=zn(ts,n),l=ih(ts,n),u=f1(ts,n),[p,d]=f.useState(null),m=Le(t,x=>d(x),l.onItemTextChange,x=>{var b;return(b=i.itemTextRefCallback)==null?void 0:b.call(i,x,l.value,l.disabled)}),v=p==null?void 0:p.textContent,y=f.useMemo(()=>c.jsx("option",{value:l.value,disabled:l.disabled,children:v},l.value),[l.disabled,l.value,v]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=u;return yt(()=>(h(y),()=>g(y)),[h,g,y]),c.jsxs(c.Fragment,{children:[c.jsx(we.span,{id:l.textId,...o,ref:m}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Nr.createPortal(o.children,a.valueNode):null]})});ch.displayName=ts;var uh="SelectItemIndicator",dh=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return ih(uh,n).isSelected?c.jsx(we.span,{"aria-hidden":!0,...r,ref:t}):null});dh.displayName=uh;var ji="SelectScrollUpButton",fh=f.forwardRef((e,t)=>{const n=zn(ji,e.__scopeSelect),r=Bl(ji,e.__scopeSelect),[s,o]=f.useState(!1),a=Le(t,r.onScrollButtonChange);return yt(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollTop>0;o(u)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),s?c.jsx(mh,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});fh.displayName=ji;var Ei="SelectScrollDownButton",ph=f.forwardRef((e,t)=>{const n=zn(Ei,e.__scopeSelect),r=Bl(Ei,e.__scopeSelect),[s,o]=f.useState(!1),a=Le(t,r.onScrollButtonChange);return yt(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollHeight-l.clientHeight,p=Math.ceil(l.scrollTop)<u;o(p)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),s?c.jsx(mh,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});ph.displayName=Ei;var mh=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,o=zn("SelectScrollButton",n),a=f.useRef(null),i=na(n),l=f.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return f.useEffect(()=>()=>l(),[l]),yt(()=>{var p;const u=i().find(d=>d.ref.current===document.activeElement);(p=u==null?void 0:u.ref.current)==null||p.scrollIntoView({block:"nearest"})},[i]),c.jsx(we.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ye(s.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:ye(s.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:ye(s.onPointerLeave,()=>{l()})})}),S1="SelectSeparator",hh=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return c.jsx(we.div,{"aria-hidden":!0,...r,ref:t})});hh.displayName=S1;var Ri="SelectArrow",C1=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=ra(n),o=Un(Ri,n),a=zn(Ri,n);return o.open&&a.position==="popper"?c.jsx(em,{...s,...r,ref:t}):null});C1.displayName=Ri;function gh(e){return e===""||e===void 0}var vh=f.forwardRef((e,t)=>{const{value:n,...r}=e,s=f.useRef(null),o=Le(t,s),a=Uo(n);return f.useEffect(()=>{const i=s.current,l=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==n&&p){const d=new Event("change",{bubbles:!0});p.call(i,n),i.dispatchEvent(d)}},[a,n]),c.jsx(Ml,{asChild:!0,children:c.jsx("select",{...r,ref:o,defaultValue:n})})});vh.displayName="BubbleSelect";function yh(e){const t=an(e),n=f.useRef(""),r=f.useRef(0),s=f.useCallback(a=>{const i=n.current+a;t(i),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(i)},[t]),o=f.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function bh(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=k1(e,Math.max(o,0));s.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==n?l:void 0}function k1(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var j1=Wm,xh=Gm,E1=Ym,R1=Km,T1=Xm,wh=Jm,O1=nh,A1=sh,_h=ah,Sh=lh,I1=ch,N1=dh,Ch=fh,kh=ph,jh=hh;const P1=j1,M1=A1,vu=E1,Eh=f.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(xh,{ref:r,className:$("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,c.jsx(R1,{asChild:!0,children:c.jsx(Mo,{className:"h-4 w-4 opacity-50"})})]}));Eh.displayName=xh.displayName;const Rh=f.forwardRef(({className:e,...t},n)=>c.jsx(Ch,{ref:n,className:$("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(Ib,{className:"h-4 w-4"})}));Rh.displayName=Ch.displayName;const Th=f.forwardRef(({className:e,...t},n)=>c.jsx(kh,{ref:n,className:$("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(Mo,{className:"h-4 w-4"})}));Th.displayName=kh.displayName;const Oh=f.forwardRef(({className:e,children:t,position:n="popper",portalContainer:r,...s},o)=>c.jsx(T1,{container:r,children:c.jsxs(wh,{ref:o,className:$("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...s,children:[c.jsx(Rh,{}),c.jsx(O1,{className:$("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsx(Th,{})]})}));Oh.displayName=wh.displayName;const Ah=f.forwardRef(({className:e,...t},n)=>c.jsx(_h,{ref:n,className:$("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Ah.displayName=_h.displayName;const Ti=f.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(Sh,{ref:r,className:$("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(N1,{children:c.jsx(Zd,{className:"h-4 w-4"})})}),c.jsx(I1,{children:t})]}));Ti.displayName=Sh.displayName;const D1=f.forwardRef(({className:e,...t},n)=>c.jsx(jh,{ref:n,className:$("-mx-1 my-1 h-px bg-muted",e),...t}));D1.displayName=jh.displayName;function F1(){const e=window.__WPSOCIO_UI_ROOT_SELECTOR;if(typeof e=="string"&&e)return document.querySelector(e)||void 0}const Oi=f.forwardRef(({options:e,placeholder:t="...",id:n,"aria-label":r,triggerClassName:s,isLoading:o,portalContainer:a,...i},l)=>f.createElement(P1,{...i,key:i.value},c.jsx(Eh,{className:$("w-[180px]",s),id:n,"aria-label":r,ref:l,children:o?c.jsxs("div",{className:"flex items-center justify-between w-full",children:[c.jsx(vu,{placeholder:t}),c.jsx(el,{className:"opacity-50 me-2"})]}):c.jsx(vu,{placeholder:t})}),c.jsx(Oh,{portalContainer:a||F1(),children:e.map(u=>c.jsx(f.Fragment,{children:"options"in u&&Array.isArray(u.options)?c.jsxs(M1,{children:[c.jsx(Ah,{children:u.label}),u.options.map((p,d)=>c.jsx(Ti,{...p,value:p.value,className:"ms-2",children:p.label},`${p.value}:${p.label}:${d}`))]}):"value"in u?c.jsx(Ti,{...u,value:u.value,children:u.label}):null},u.label))}))),V1=()=>[{value:"post_content",label:w("Post Content")},{value:"before_more",label:w('Before "Read More"')},{value:"post_excerpt",label:w("Post Excerpt")}],L1=({prefix:e})=>{const n=(ct({name:Ee("message_template",e)})||"").includes("{post_excerpt}");return c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 gap-6 my-6",children:[c.jsx("div",{children:c.jsx(xe,{name:Ee("excerpt_source",e),render:({field:r})=>c.jsx(Te,{label:Ie("excerpt_source"),className:"md:flex-col",isDisabled:!n,children:c.jsx(Se,{children:c.jsx(Oi,{...r,onValueChange:r.onChange,disabled:!n,defaultValue:r.value,options:V1()})})})})}),c.jsx("div",{children:c.jsx(xe,{name:Ee("excerpt_length",e),render:({field:r})=>c.jsx(Te,{label:Ie("excerpt_length"),description:w("Number of words for the excerpt."),className:"md:flex-col",isDisabled:!n,children:c.jsx(Se,{className:"max-w-[100px]",children:c.jsx(gt,{type:"number",max:300,min:1,disabled:!n,...r})})})})}),c.jsx("div",{children:c.jsx(xe,{name:Ee("excerpt_preserve_eol",e),render:({field:r})=>c.jsx(Te,{label:Ie("excerpt_preserve_eol"),description:w("Preserve newlines in Post Excerpt."),className:"md:flex-col",isDisabled:!n,children:c.jsx(Se,{children:c.jsx(bt,{...r,value:void 0,checked:r.value,onCheckedChange:r.onChange,disabled:!n,"aria-readonly":!n})})})})})]})},$1=({disabled:e,prefix:t})=>{const[n,r,s,o]=ct({name:[Ee("link_preview_disabled",t),Ee("image_position",t),Ee("parse_mode",t),Ee("single_message",t)]}),i=o&&r==="after"&&(s==="none"||n)&&c.jsx(Wo,{type:"warning",title:c.jsxs("span",{children:[Yu()?"👈":"👉"," ",c.jsx("span",{children:ze(me.sprintf(w("When %1$s is set to %2$s:"),"<ImagePosition />","<Value />"),{ImagePosition:c.jsx("b",{children:Ie("image_position")}),Value:c.jsx("b",{children:w("After the Text")})})})]}),children:c.jsxs("ul",{className:"list-disc ms-6",children:[s==="none"&&c.jsx("li",{className:"text-destructive",children:ze(me.sprintf(w("%1$s should not be %2$s."),"<ParseMode />","<Value />"),{ParseMode:c.jsx("b",{children:Ie("parse_mode")}),Value:c.jsx("b",{children:w("None")})})}),n&&c.jsx("li",{className:"text-destructive",children:ze(me.sprintf(w("%s should not be enabled."),"<DisablePreview />"),{DisablePreview:c.jsx("b",{children:Ie("link_preview_disabled")})})})]})});return c.jsx(xe,{name:Ee("single_message",t),render:({field:l})=>c.jsx(Te,{className:"md:flex-col",description:w("Send both text and image in single message."),label:Ie("single_message"),afterMessage:i,isDisabled:e,children:c.jsx(Se,{children:c.jsx(bt,{...l,value:void 0,checked:l.value,onCheckedChange:l.onChange,disabled:e,"aria-readonly":e})})})})},B1=({prefix:e})=>{const t=!ct({name:Ee("send_featured_image",e)}),n=f.useMemo(()=>[{value:"before",label:w("Before the Text"),isDisabled:t},{value:"after",label:w("After the Text"),isDisabled:t}],[t]);return c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 gap-6 md:gap-2 my-6",children:[c.jsx("div",{children:c.jsx(xe,{name:Ee("send_featured_image",e),render:({field:r})=>c.jsx(Te,{className:"md:flex-col",label:Ie("send_featured_image"),description:w("Send Featured Image (if exists)."),children:c.jsx(Se,{children:c.jsx(bt,{...r,value:void 0,checked:r.value,onCheckedChange:r.onChange})})})})}),c.jsx("div",{children:c.jsx(xe,{name:Ee("image_position",e),render:({field:r})=>c.jsx(Te,{label:Ie("image_position"),className:"md:flex-col",isDisabled:t,children:c.jsx(Se,{children:c.jsx(Os,{...r,onValueChange:r.onChange,defaultValue:r.value,options:n,disabled:t})})})})}),c.jsx("div",{children:c.jsx($1,{prefix:e,disabled:t})})]})},U1=({prefix:e})=>{const t=ct({name:Ee("link_preview_disabled",e)});return c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 gap-6 md:gap-2 my-6",children:[c.jsx("div",{children:c.jsx(xe,{name:Ee("link_preview_disabled",e),render:({field:n})=>c.jsx(Te,{className:"md:flex-col",label:Ie("link_preview_disabled"),description:w("Disables previews for links in the messages."),children:c.jsx(Se,{children:c.jsx(bt,{...n,value:void 0,checked:n.value,onCheckedChange:n.onChange})})})})}),c.jsx("div",{children:c.jsx(xe,{name:Ee("link_preview_url",e),render:({field:n})=>c.jsx(Te,{className:"md:flex-col",label:Ie("link_preview_url"),description:c.jsxs(c.Fragment,{children:[w("URL to use for the link preview.")," ",c.jsx("span",{children:ze(me.sprintf(w("For example %s"),"<Ex />"),{Ex:c.jsx(Rs,{children:"{full_url}"})})})]}),isDisabled:t,children:c.jsx(Se,{className:"max-w-[200px]",children:c.jsx(gt,{autoComplete:"off",disabled:t,placeholder:"{full_url}",...n})})})})}),c.jsx("div",{children:c.jsx(xe,{name:Ee("link_preview_above_text",e),render:({field:n})=>c.jsx(Te,{className:"md:flex-col",label:Ie("link_preview_above_text"),description:w("Whether the link preview must be shown above the message text."),isDisabled:t,children:c.jsx(Se,{children:c.jsx(bt,{...n,value:void 0,checked:n.value,onCheckedChange:n.onChange,disabled:t,"aria-readonly":t})})})})})]})},z1=({prefix:e})=>c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 gap-6 md:gap-2 my-6",children:[c.jsx("div",{children:c.jsx(xe,{name:Ee("cats_as_tags",e),render:({field:t})=>c.jsx(Te,{className:"md:flex-col",label:Ie("cats_as_tags"),description:w("Send categories as hashtags."),children:c.jsx(Se,{children:c.jsx(bt,{...t,value:void 0,checked:t.value,onCheckedChange:t.onChange})})})})}),c.jsx("div",{children:c.jsx(Im,{prefix:e})}),c.jsx("div",{children:c.jsx(xe,{name:Ee("protect_content",e),render:({field:t})=>c.jsx(Te,{className:"md:flex-col",description:c.jsxs(c.Fragment,{children:[w("Protects the contents of sent messages from forwarding and saving."),c.jsx("br",{}),c.jsx(rt,{href:"https://telegram.org/blog/protected-content-delete-by-date-and-more#protected-content-in-groups-and-channels",isExternal:!0,children:w("Learn more")})]}),label:Ie("protect_content"),children:c.jsx(Se,{children:c.jsx(bt,{...t,value:void 0,checked:t.value,onCheckedChange:t.onChange})})})})})]}),H1=({children:e,docsLink:t,macros:n})=>c.jsxs(fm,{children:[c.jsxs(BS,{className:"text-start leading-6",children:[me.sprintf("%s %s",Yu()?"👈":"👉",w("You can use any text, emojis or these variables in any order."))," (",w("Click to copy"),")"]}),c.jsxs(pm,{className:"my-6",children:[c.jsxs("div",{children:[c.jsxs("p",{children:[c.jsx("b",{children:w("You can also use conditional logic in the template.")})," ",c.jsx(rt,{href:t,isExternal:!0,children:w("Learn more")})]}),c.jsx("div",{className:"flex flex-col gap-8 my-4",children:Object.values(n).map((r,s)=>{const{label:o,macros:a=[],info:i}=r;return c.jsxs("section",{className:"flex flex-col gap-3",children:[c.jsxs("div",{className:"grid gap-2 grid-cols-1 xl:grid-cols-5",children:[c.jsx("h4",{className:"text-md font-semibold col-span-1",children:o}),c.jsx("div",{className:"col-span-4",children:a.map((l,u)=>c.jsx(gn,{content:l},u.toString()))})]}),i?c.jsx("p",{className:"text-foreground/70",children:ze(i.replaceAll(`
`,"<br />"),{code:c.jsx(gn,{}),br:c.jsx("br",{})})}):null]},s.toString())})})]}),e]})]}),{macros:W1}=cn("uiData"),Z1=()=>c.jsxs(un,{title:w("Message Settings"),children:[c.jsx(gm,{prefix:at}),c.jsx(H1,{docsLink:"https://wptelegram.pro/docs/template-conditional-logic/",macros:W1,children:c.jsx(_n,{location:"template"})}),c.jsx(L1,{prefix:at}),c.jsx(_t,{}),c.jsx(B1,{prefix:at}),c.jsx(_t,{}),c.jsx(z1,{prefix:at}),c.jsx(_t,{}),c.jsx(U1,{prefix:at})]}),G1=({is_wp_cron_disabled:e,prefix:t})=>{const n=Number(ct({name:Ee("delay",t)}));return c.jsx(xe,{name:Ee("delay",t),render:({field:r})=>c.jsxs(Te,{label:Ie("delay"),description:w("The delay starts after the post gets published."),afterMessage:e&&n?c.jsx(Wo,{type:"error",title:w("Warning"),className:"max-w-max",icon:c.jsx(qd,{size:"16"}),children:w("WordPress cron should not be disabled!")}):null,children:[c.jsx(Se,{className:"max-w-[100px]",children:c.jsx(gt,{type:"number",max:300,min:0,step:"any",...r})})," ",w("Minute(s)")]})})},q1=({prefix:e})=>c.jsx(xe,{name:Ee("disable_notification",e),render:({field:t})=>c.jsx(Te,{description:me.sprintf("%s %s",w("Send the messages silently."),w("Users will receive a notification with no sound.")),label:Ie("disable_notification"),children:c.jsx(Se,{children:c.jsx(bt,{...t,value:void 0,checked:t.value,onCheckedChange:t.onChange})})})}),Y1=({prefix:e})=>c.jsxs(c.Fragment,{children:[c.jsx(xe,{name:Ee("post_edit_switch",e),render:({field:t})=>c.jsx(Te,{label:Ie("post_edit_switch"),description:w("Show an ON/OFF switch on the post edit screen."),afterMessage:w("You can use this switch to override the settings for a particular post."),children:c.jsx(Se,{children:c.jsx(bt,{...t,value:void 0,checked:t.value,onCheckedChange:t.onChange})})})}),c.jsx(_t,{className:"my-8 md:my-4"}),c.jsx(xe,{name:Ee("plugin_posts",e),render:({field:t})=>c.jsx(Te,{description:w("Enable this option if you use a plugin to generate posts."),label:Ie("plugin_posts"),children:c.jsx(Se,{children:c.jsx(bt,{...t,value:void 0,checked:t.value,onCheckedChange:t.onChange})})})})]}),{is_wp_cron_disabled:K1}=cn("uiData"),X1=()=>c.jsxs(un,{title:w("Miscellaneous"),children:[c.jsx(Y1,{prefix:at}),c.jsx(_t,{className:"my-8 md:my-4"}),c.jsx(G1,{prefix:at,is_wp_cron_disabled:K1}),c.jsx(_n,{location:"delay"}),c.jsx(_t,{className:"my-8 md:my-4"}),c.jsx(q1,{prefix:at})]}),Ul=({children:e,className:t,wrapperClassName:n,...r})=>{const s=c.jsx(_t,{orientation:"vertical",className:$("w-0 h-4 border",t),...r});return c.jsxs("div",{className:$("flex flex-col justify-center items-center",n),children:[s,e,s]})},J1=({onAdd:e})=>c.jsxs($n,{onClick:e,variant:"outline",children:[c.jsx(Qi,{className:"me-2"}),w("Add rule")]}),Ih={param:"category",values:[],operator:"in"},Q1=({onAdd:e,onRemove:t})=>c.jsxs("div",{className:"flex flex-row md:flex-col max-w-max justify-center gap-2",children:[c.jsx(ko,{"aria-label":w("Remove this rule"),icon:c.jsx(Do,{}),onClick:t,title:w("Remove this rule"),variant:"outline",className:"text-destructive"}),c.jsx(ko,{"aria-label":w("Add another rule"),icon:c.jsx(Qi,{}),onClick:e,title:w("Add another rule"),variant:"outline"})]});let Kr={};class ek{clear(){Kr={}}get length(){return Object.keys(Kr).length}getItem(t){return Kr[t]}key(){return null}removeItem(t){delete Kr[t]}setItem(t,n){Kr[t]=n}}const tk=new ek;function tr(e){"@babel/helpers - typeof";return tr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tr(e)}function nk(e,t){if(tr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(tr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nh(e){var t=nk(e,"string");return tr(t)=="symbol"?t:t+""}function mr(e,t,n){return(t=Nh(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function se(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yu(Object(n),!0).forEach(function(r){mr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yu(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rk(e){if(Array.isArray(e))return e}function sk(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,o,a,i=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(p){u=!0,s=p}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw s}}return i}}function Ai(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ph(e,t){if(e){if(typeof e=="string")return Ai(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ai(e,t):void 0}}function ok(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ot(e,t){return rk(e)||sk(e,t)||Ph(e,t)||ok()}function ak(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function dn(e,t){if(e==null)return{};var n,r,s=ak(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var ik=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function lk(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,s=r===void 0?!1:r,o=e.defaultValue,a=o===void 0?null:o,i=e.inputValue,l=e.menuIsOpen,u=e.onChange,p=e.onInputChange,d=e.onMenuClose,m=e.onMenuOpen,v=e.value,y=dn(e,ik),h=f.useState(i!==void 0?i:n),g=ot(h,2),x=g[0],b=g[1],S=f.useState(l!==void 0?l:s),E=ot(S,2),_=E[0],j=E[1],k=f.useState(v!==void 0?v:a),R=ot(k,2),N=R[0],F=R[1],z=f.useCallback(function(P,ae){typeof u=="function"&&u(P,ae),F(P)},[u]),M=f.useCallback(function(P,ae){var Pe;typeof p=="function"&&(Pe=p(P,ae)),b(Pe!==void 0?Pe:P)},[p]),B=f.useCallback(function(){typeof m=="function"&&m(),j(!0)},[m]),q=f.useCallback(function(){typeof d=="function"&&d(),j(!1)},[d]),L=i!==void 0?i:x,I=l!==void 0?l:_,U=v!==void 0?v:N;return se(se({},y),{},{inputValue:L,menuIsOpen:I,onChange:z,onInputChange:M,onMenuClose:q,onMenuOpen:B,value:U})}function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},de.apply(null,arguments)}function ck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Nh(r.key),r)}}function uk(e,t,n){return t&&bu(e.prototype,t),n&&bu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ii(e,t){return Ii=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Ii(e,t)}function dk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ii(e,t)}function Eo(e){return Eo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Eo(e)}function Mh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Mh=function(){return!!e})()}function fk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pk(e,t){if(t&&(tr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fk(e)}function mk(e){var t=Mh();return function(){var n,r=Eo(e);if(t){var s=Eo(this).constructor;n=Reflect.construct(r,arguments,s)}else n=r.apply(this,arguments);return pk(this,n)}}function hk(e){if(Array.isArray(e))return Ai(e)}function gk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zl(e){return hk(e)||gk(e)||Ph(e)||vk()}function yk(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function bk(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var xk=function(){function e(n){var r=this;this._insertTag=function(s){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(s,o),r.tags.push(s)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(bk(this));var s=this.tags[this.tags.length-1];if(this.isSpeedy){var o=yk(s);try{o.insertRule(r,o.cssRules.length)}catch{}}else s.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var s;return(s=r.parentNode)==null?void 0:s.removeChild(r)}),this.tags=[],this.ctr=0},e}(),pt="-ms-",Ro="-moz-",Me="-webkit-",Dh="comm",Hl="rule",Wl="decl",wk="@import",Fh="@keyframes",_k="@layer",Sk=Math.abs,sa=String.fromCharCode,Ck=Object.assign;function kk(e,t){return lt(e,0)^45?(((t<<2^lt(e,0))<<2^lt(e,1))<<2^lt(e,2))<<2^lt(e,3):0}function Vh(e){return e.trim()}function jk(e,t){return(e=t.exec(e))?e[0]:e}function De(e,t,n){return e.replace(t,n)}function Ni(e,t){return e.indexOf(t)}function lt(e,t){return e.charCodeAt(t)|0}function bs(e,t,n){return e.slice(t,n)}function Jt(e){return e.length}function Zl(e){return e.length}function Ws(e,t){return t.push(e),e}function Ek(e,t){return e.map(t).join("")}var oa=1,Ir=1,Lh=0,jt=0,et=0,$r="";function aa(e,t,n,r,s,o,a){return{value:e,root:t,parent:n,type:r,props:s,children:o,line:oa,column:Ir,length:a,return:""}}function Xr(e,t){return Ck(aa("",null,null,"",null,null,0),e,{length:-e.length},t)}function Rk(){return et}function Tk(){return et=jt>0?lt($r,--jt):0,Ir--,et===10&&(Ir=1,oa--),et}function Nt(){return et=jt<Lh?lt($r,jt++):0,Ir++,et===10&&(Ir=1,oa++),et}function rn(){return lt($r,jt)}function no(){return jt}function Is(e,t){return bs($r,e,t)}function xs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function $h(e){return oa=Ir=1,Lh=Jt($r=e),jt=0,[]}function Bh(e){return $r="",e}function ro(e){return Vh(Is(jt-1,Pi(e===91?e+2:e===40?e+1:e)))}function Ok(e){for(;(et=rn())&&et<33;)Nt();return xs(e)>2||xs(et)>3?"":" "}function Ak(e,t){for(;--t&&Nt()&&!(et<48||et>102||et>57&&et<65||et>70&&et<97););return Is(e,no()+(t<6&&rn()==32&&Nt()==32))}function Pi(e){for(;Nt();)switch(et){case e:return jt;case 34:case 39:e!==34&&e!==39&&Pi(et);break;case 40:e===41&&Pi(e);break;case 92:Nt();break}return jt}function Ik(e,t){for(;Nt()&&e+et!==57;)if(e+et===84&&rn()===47)break;return"/*"+Is(t,jt-1)+"*"+sa(e===47?e:Nt())}function Nk(e){for(;!xs(rn());)Nt();return Is(e,jt)}function Pk(e){return Bh(so("",null,null,null,[""],e=$h(e),0,[0],e))}function so(e,t,n,r,s,o,a,i,l){for(var u=0,p=0,d=a,m=0,v=0,y=0,h=1,g=1,x=1,b=0,S="",E=s,_=o,j=r,k=S;g;)switch(y=b,b=Nt()){case 40:if(y!=108&<(k,d-1)==58){Ni(k+=De(ro(b),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:k+=ro(b);break;case 9:case 10:case 13:case 32:k+=Ok(y);break;case 92:k+=Ak(no()-1,7);continue;case 47:switch(rn()){case 42:case 47:Ws(Mk(Ik(Nt(),no()),t,n),l);break;default:k+="/"}break;case 123*h:i[u++]=Jt(k)*x;case 125*h:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+p:x==-1&&(k=De(k,/\f/g,"")),v>0&&Jt(k)-d&&Ws(v>32?wu(k+";",r,n,d-1):wu(De(k," ","")+";",r,n,d-2),l);break;case 59:k+=";";default:if(Ws(j=xu(k,t,n,u,p,s,i,S,E=[],_=[],d),o),b===123)if(p===0)so(k,t,j,j,E,o,d,i,_);else switch(m===99&<(k,3)===110?100:m){case 100:case 108:case 109:case 115:so(e,j,j,r&&Ws(xu(e,j,j,0,0,s,i,S,s,E=[],d),_),s,_,d,i,r?E:_);break;default:so(k,j,j,j,[""],_,0,i,_)}}u=p=v=0,h=x=1,S=k="",d=a;break;case 58:d=1+Jt(k),v=y;default:if(h<1){if(b==123)--h;else if(b==125&&h++==0&&Tk()==125)continue}switch(k+=sa(b),b*h){case 38:x=p>0?1:(k+="\f",-1);break;case 44:i[u++]=(Jt(k)-1)*x,x=1;break;case 64:rn()===45&&(k+=ro(Nt())),m=rn(),p=d=Jt(S=k+=Nk(no())),b++;break;case 45:y===45&&Jt(k)==2&&(h=0)}}return o}function xu(e,t,n,r,s,o,a,i,l,u,p){for(var d=s-1,m=s===0?o:[""],v=Zl(m),y=0,h=0,g=0;y<r;++y)for(var x=0,b=bs(e,d+1,d=Sk(h=a[y])),S=e;x<v;++x)(S=Vh(h>0?m[x]+" "+b:De(b,/&\f/g,m[x])))&&(l[g++]=S);return aa(e,t,n,s===0?Hl:i,l,u,p)}function Mk(e,t,n){return aa(e,t,n,Dh,sa(Rk()),bs(e,2,-2),0)}function wu(e,t,n,r){return aa(e,t,n,Wl,bs(e,0,r),bs(e,r+1,-1),r)}function xr(e,t){for(var n="",r=Zl(e),s=0;s<r;s++)n+=t(e[s],s,e,t)||"";return n}function Dk(e,t,n,r){switch(e.type){case _k:if(e.children.length)break;case wk:case Wl:return e.return=e.return||e.value;case Dh:return"";case Fh:return e.return=e.value+"{"+xr(e.children,r)+"}";case Hl:e.value=e.props.join(",")}return Jt(n=xr(e.children,r))?e.return=e.value+"{"+n+"}":""}function Fk(e){var t=Zl(e);return function(n,r,s,o){for(var a="",i=0;i<t;i++)a+=e[i](n,r,s,o)||"";return a}}function Vk(e){return function(t){t.root||(t=t.return)&&e(t)}}function Lk(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var $k=function(t,n,r){for(var s=0,o=0;s=o,o=rn(),s===38&&o===12&&(n[r]=1),!xs(o);)Nt();return Is(t,jt)},Bk=function(t,n){var r=-1,s=44;do switch(xs(s)){case 0:s===38&&rn()===12&&(n[r]=1),t[r]+=$k(jt-1,n,r);break;case 2:t[r]+=ro(s);break;case 4:if(s===44){t[++r]=rn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=sa(s)}while(s=Nt());return t},Uk=function(t,n){return Bh(Bk($h(t),n))},_u=new WeakMap,zk=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,s=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!_u.get(r))&&!s){_u.set(t,!0);for(var o=[],a=Uk(n,o),i=r.props,l=0,u=0;l<a.length;l++)for(var p=0;p<i.length;p++,u++)t.props[u]=o[l]?a[l].replace(/&\f/g,i[p]):i[p]+" "+a[l]}}},Hk=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Uh(e,t){switch(kk(e,t)){case 5103:return Me+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Me+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Me+e+Ro+e+pt+e+e;case 6828:case 4268:return Me+e+pt+e+e;case 6165:return Me+e+pt+"flex-"+e+e;case 5187:return Me+e+De(e,/(\w+).+(:[^]+)/,Me+"box-$1$2"+pt+"flex-$1$2")+e;case 5443:return Me+e+pt+"flex-item-"+De(e,/flex-|-self/,"")+e;case 4675:return Me+e+pt+"flex-line-pack"+De(e,/align-content|flex-|-self/,"")+e;case 5548:return Me+e+pt+De(e,"shrink","negative")+e;case 5292:return Me+e+pt+De(e,"basis","preferred-size")+e;case 6060:return Me+"box-"+De(e,"-grow","")+Me+e+pt+De(e,"grow","positive")+e;case 4554:return Me+De(e,/([^-])(transform)/g,"$1"+Me+"$2")+e;case 6187:return De(De(De(e,/(zoom-|grab)/,Me+"$1"),/(image-set)/,Me+"$1"),e,"")+e;case 5495:case 3959:return De(e,/(image-set\([^]*)/,Me+"$1$`$1");case 4968:return De(De(e,/(.+:)(flex-)?(.*)/,Me+"box-pack:$3"+pt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Me+e+e;case 4095:case 3583:case 4068:case 2532:return De(e,/(.+)-inline(.+)/,Me+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Jt(e)-1-t>6)switch(lt(e,t+1)){case 109:if(lt(e,t+4)!==45)break;case 102:return De(e,/(.+:)(.+)-([^]+)/,"$1"+Me+"$2-$3$1"+Ro+(lt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ni(e,"stretch")?Uh(De(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(lt(e,t+1)!==115)break;case 6444:switch(lt(e,Jt(e)-3-(~Ni(e,"!important")&&10))){case 107:return De(e,":",":"+Me)+e;case 101:return De(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Me+(lt(e,14)===45?"inline-":"")+"box$3$1"+Me+"$2$3$1"+pt+"$2box$3")+e}break;case 5936:switch(lt(e,t+11)){case 114:return Me+e+pt+De(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Me+e+pt+De(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Me+e+pt+De(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Me+e+pt+e+e}return e}var Wk=function(t,n,r,s){if(t.length>-1&&!t.return)switch(t.type){case Wl:t.return=Uh(t.value,t.length);break;case Fh:return xr([Xr(t,{value:De(t.value,"@","@"+Me)})],s);case Hl:if(t.length)return Ek(t.props,function(o){switch(jk(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return xr([Xr(t,{props:[De(o,/:(read-\w+)/,":"+Ro+"$1")]})],s);case"::placeholder":return xr([Xr(t,{props:[De(o,/:(plac\w+)/,":"+Me+"input-$1")]}),Xr(t,{props:[De(o,/:(plac\w+)/,":"+Ro+"$1")]}),Xr(t,{props:[De(o,/:(plac\w+)/,pt+"input-$1")]})],s)}return""})}},Zk=[Wk],Gk=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var g=h.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var s=t.stylisPlugins||Zk,o={},a,i=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var g=h.getAttribute("data-emotion").split(" "),x=1;x<g.length;x++)o[g[x]]=!0;i.push(h)});var l,u=[zk,Hk];{var p,d=[Dk,Vk(function(h){p.insert(h)})],m=Fk(u.concat(s,d)),v=function(g){return xr(Pk(g),m)};l=function(g,x,b,S){p=b,v(g?g+"{"+x.styles+"}":x.styles),S&&(y.inserted[x.name]=!0)}}var y={key:n,sheet:new xk({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return y.sheet.hydrate(i),y},za={exports:{}},Fe={};/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Su;function qk(){if(Su)return Fe;Su=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function S(_){if(typeof _=="object"&&_!==null){var j=_.$$typeof;switch(j){case t:switch(_=_.type,_){case l:case u:case r:case o:case s:case d:return _;default:switch(_=_&&_.$$typeof,_){case i:case p:case y:case v:case a:return _;default:return j}}case n:return j}}}function E(_){return S(_)===u}return Fe.AsyncMode=l,Fe.ConcurrentMode=u,Fe.ContextConsumer=i,Fe.ContextProvider=a,Fe.Element=t,Fe.ForwardRef=p,Fe.Fragment=r,Fe.Lazy=y,Fe.Memo=v,Fe.Portal=n,Fe.Profiler=o,Fe.StrictMode=s,Fe.Suspense=d,Fe.isAsyncMode=function(_){return E(_)||S(_)===l},Fe.isConcurrentMode=E,Fe.isContextConsumer=function(_){return S(_)===i},Fe.isContextProvider=function(_){return S(_)===a},Fe.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},Fe.isForwardRef=function(_){return S(_)===p},Fe.isFragment=function(_){return S(_)===r},Fe.isLazy=function(_){return S(_)===y},Fe.isMemo=function(_){return S(_)===v},Fe.isPortal=function(_){return S(_)===n},Fe.isProfiler=function(_){return S(_)===o},Fe.isStrictMode=function(_){return S(_)===s},Fe.isSuspense=function(_){return S(_)===d},Fe.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===r||_===u||_===o||_===s||_===d||_===m||typeof _=="object"&&_!==null&&(_.$$typeof===y||_.$$typeof===v||_.$$typeof===a||_.$$typeof===i||_.$$typeof===p||_.$$typeof===g||_.$$typeof===x||_.$$typeof===b||_.$$typeof===h)},Fe.typeOf=S,Fe}var Cu;function Yk(){return Cu||(Cu=1,za.exports=qk()),za.exports}var Ha,ku;function Kk(){if(ku)return Ha;ku=1;var e=Yk(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[e.ForwardRef]=r,o[e.Memo]=s;function a(y){return e.isMemo(y)?s:o[y.$$typeof]||t}var i=Object.defineProperty,l=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;function v(y,h,g){if(typeof h!="string"){if(m){var x=d(h);x&&x!==m&&v(y,x,g)}var b=l(h);u&&(b=b.concat(u(h)));for(var S=a(y),E=a(h),_=0;_<b.length;++_){var j=b[_];if(!n[j]&&!(g&&g[j])&&!(E&&E[j])&&!(S&&S[j])){var k=p(h,j);try{i(y,j,k)}catch{}}}}return y}return Ha=v,Ha}Kk();var Xk=!0;function Jk(e,t,n){var r="";return n.split(" ").forEach(function(s){e[s]!==void 0?t.push(e[s]+";"):r+=s+" "}),r}var zh=function(t,n,r){var s=t.key+"-"+n.name;(r===!1||Xk===!1)&&t.registered[s]===void 0&&(t.registered[s]=n.styles)},Qk=function(t,n,r){zh(t,n,r);var s=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+s:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function ej(e){for(var t=0,n,r=0,s=e.length;s>=4;++r,s-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(s){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var tj={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},nj=/[A-Z]|^ms/g,rj=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Hh=function(t){return t.charCodeAt(1)===45},ju=function(t){return t!=null&&typeof t!="boolean"},Wa=Lk(function(e){return Hh(e)?e:e.replace(nj,"-$&").toLowerCase()}),Eu=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(rj,function(r,s,o){return Qt={name:s,styles:o,next:Qt},s})}return tj[t]!==1&&!Hh(t)&&typeof n=="number"&&n!==0?n+"px":n};function ws(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var s=n;if(s.anim===1)return Qt={name:s.name,styles:s.styles,next:Qt},s.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)Qt={name:a.name,styles:a.styles,next:Qt},a=a.next;var i=o.styles+";";return i}return sj(e,t,n)}case"function":{if(e!==void 0){var l=Qt,u=n(e);return Qt=l,ws(e,t,u)}break}}var p=n;return p}function sj(e,t,n){var r="";if(Array.isArray(n))for(var s=0;s<n.length;s++)r+=ws(e,t,n[s])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var i=a;ju(i)&&(r+=Wa(o)+":"+Eu(o,i)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var l=0;l<a.length;l++)ju(a[l])&&(r+=Wa(o)+":"+Eu(o,a[l])+";");else{var u=ws(e,t,a);switch(o){case"animation":case"animationName":{r+=Wa(o)+":"+u+";";break}default:r+=o+"{"+u+"}"}}}return r}var Ru=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Qt;function Wh(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,s="";Qt=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,s+=ws(n,t,o);else{var a=o;s+=a[0]}for(var i=1;i<e.length;i++)if(s+=ws(n,t,e[i]),r){var l=o;s+=l[i]}Ru.lastIndex=0;for(var u="",p;(p=Ru.exec(s))!==null;)u+="-"+p[1];var d=ej(s)+u;return{name:d,styles:s,next:Qt}}var oj=function(t){return t()},aj=Qa.useInsertionEffect?Qa.useInsertionEffect:!1,ij=aj||oj,Zh=f.createContext(typeof HTMLElement<"u"?Gk({key:"css"}):null);Zh.Provider;var lj=function(t){return f.forwardRef(function(n,r){var s=f.useContext(Zh);return t(n,s,r)})},cj=f.createContext({}),Gl={}.hasOwnProperty,Mi="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",uj=function(t,n){var r={};for(var s in n)Gl.call(n,s)&&(r[s]=n[s]);return r[Mi]=t,r},dj=function(t){var n=t.cache,r=t.serialized,s=t.isStringTag;return zh(n,r,s),ij(function(){return Qk(n,r,s)}),null},fj=lj(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var s=e[Mi],o=[r],a="";typeof e.className=="string"?a=Jk(t.registered,o,e.className):e.className!=null&&(a=e.className+" ");var i=Wh(o,void 0,f.useContext(cj));a+=t.key+"-"+i.name;var l={};for(var u in e)Gl.call(e,u)&&u!=="css"&&u!==Mi&&(l[u]=e[u]);return l.className=a,n&&(l.ref=n),f.createElement(f.Fragment,null,f.createElement(dj,{cache:t,serialized:i,isStringTag:typeof s=="string"}),f.createElement(s,l))}),pj=fj,oe=function(t,n){var r=arguments;if(n==null||!Gl.call(n,"css"))return f.createElement.apply(void 0,r);var s=r.length,o=new Array(s);o[0]=pj,o[1]=uj(t,n);for(var a=2;a<s;a++)o[a]=r[a];return f.createElement.apply(null,o)};function ql(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Wh(t)}var mj=function(){var t=ql.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function hj(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Di=f.useLayoutEffect,gj=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],To=function(){};function vj(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function yj(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),s=2;s<n;s++)r[s-2]=arguments[s];var o=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&o.push("".concat(vj(e,a)));return o.filter(function(i){return i}).map(function(i){return String(i).trim()}).join(" ")}var Tu=function(t){return Rj(t)?t.filter(Boolean):tr(t)==="object"&&t!==null?[t]:[]},Gh=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=dn(t,gj);return se({},n)},Ye=function(t,n,r){var s=t.cx,o=t.getStyles,a=t.getClassNames,i=t.className;return{css:o(n,t),className:s(r??{},a(n,t),i)}};function bj(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function ia(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function xj(e){return ia(e)?window.innerHeight:e.clientHeight}function qh(e){return ia(e)?window.pageYOffset:e.scrollTop}function Oo(e,t){if(ia(e)){window.scrollTo(0,t);return}e.scrollTop=t}function wj(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var s=e;s=s.parentElement;)if(t=getComputedStyle(s),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return s;return document.documentElement}function _j(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Zs(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:To,s=qh(e),o=t-s,a=10,i=0;function l(){i+=a;var u=_j(i,s,o,n);Oo(e,u),i<n?window.requestAnimationFrame(l):r(e)}l()}function Ou(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),s=t.offsetHeight/3;r.bottom+s>n.bottom?Oo(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+s,e.scrollHeight)):r.top-s<n.top&&Oo(e,Math.max(t.offsetTop-s,0))}function Sj(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function Au(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function Cj(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Yh=!1,kj={get passive(){return Yh=!0}},Gs=typeof window<"u"?window:{};Gs.addEventListener&&Gs.removeEventListener&&(Gs.addEventListener("p",To,kj),Gs.removeEventListener("p",To,!1));var jj=Yh;function Ej(e){return e!=null}function Rj(e){return Array.isArray(e)}function qs(e,t,n){return e?t:n}var Tj=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];var o=Object.entries(t).filter(function(a){var i=ot(a,1),l=i[0];return!r.includes(l)});return o.reduce(function(a,i){var l=ot(i,2),u=l[0],p=l[1];return a[u]=p,a},{})},Oj=["children","innerProps"],Aj=["children","innerProps"];function Ij(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,s=e.placement,o=e.shouldScroll,a=e.isFixedPosition,i=e.controlHeight,l=wj(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var p=l.getBoundingClientRect(),d=p.height,m=n.getBoundingClientRect(),v=m.bottom,y=m.height,h=m.top,g=n.offsetParent.getBoundingClientRect(),x=g.top,b=a?window.innerHeight:xj(l),S=qh(l),E=parseInt(getComputedStyle(n).marginBottom,10),_=parseInt(getComputedStyle(n).marginTop,10),j=x-_,k=b-h,R=j+S,N=d-S-h,F=v-b+S+E,z=S+h-_,M=160;switch(s){case"auto":case"bottom":if(k>=y)return{placement:"bottom",maxHeight:t};if(N>=y&&!a)return o&&Zs(l,F,M),{placement:"bottom",maxHeight:t};if(!a&&N>=r||a&&k>=r){o&&Zs(l,F,M);var B=a?k-E:N-E;return{placement:"bottom",maxHeight:B}}if(s==="auto"||a){var q=t,L=a?j:R;return L>=r&&(q=Math.min(L-E-i,t)),{placement:"top",maxHeight:q}}if(s==="bottom")return o&&Oo(l,F),{placement:"bottom",maxHeight:t};break;case"top":if(j>=y)return{placement:"top",maxHeight:t};if(R>=y&&!a)return o&&Zs(l,z,M),{placement:"top",maxHeight:t};if(!a&&R>=r||a&&j>=r){var I=t;return(!a&&R>=r||a&&j>=r)&&(I=a?j-_:R-_),o&&Zs(l,z,M),{placement:"top",maxHeight:I}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(s,'".'))}return u}function Nj(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Kh=function(t){return t==="auto"?"bottom":t},Pj=function(t,n){var r,s=t.placement,o=t.theme,a=o.borderRadius,i=o.spacing,l=o.colors;return se((r={label:"menu"},mr(r,Nj(s),"100%"),mr(r,"position","absolute"),mr(r,"width","100%"),mr(r,"zIndex",1),r),n?{}:{backgroundColor:l.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:i.menuGutter,marginTop:i.menuGutter})},Xh=f.createContext(null),Mj=function(t){var n=t.children,r=t.minMenuHeight,s=t.maxMenuHeight,o=t.menuPlacement,a=t.menuPosition,i=t.menuShouldScrollIntoView,l=t.theme,u=f.useContext(Xh)||{},p=u.setPortalPlacement,d=f.useRef(null),m=f.useState(s),v=ot(m,2),y=v[0],h=v[1],g=f.useState(null),x=ot(g,2),b=x[0],S=x[1],E=l.spacing.controlHeight;return Di(function(){var _=d.current;if(_){var j=a==="fixed",k=i&&!j,R=Ij({maxHeight:s,menuEl:_,minHeight:r,placement:o,shouldScroll:k,isFixedPosition:j,controlHeight:E});h(R.maxHeight),S(R.placement),p==null||p(R.placement)}},[s,o,a,i,r,p,E]),n({ref:d,placerProps:se(se({},t),{},{placement:b||Kh(o),maxHeight:y})})},Dj=function(t){var n=t.children,r=t.innerRef,s=t.innerProps;return oe("div",de({},Ye(t,"menu",{menu:!0}),{ref:r},s),n)},Fj=Dj,Vj=function(t,n){var r=t.maxHeight,s=t.theme.spacing.baseUnit;return se({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:s,paddingTop:s})},Lj=function(t){var n=t.children,r=t.innerProps,s=t.innerRef,o=t.isMulti;return oe("div",de({},Ye(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:s},r),n)},Jh=function(t,n){var r=t.theme,s=r.spacing.baseUnit,o=r.colors;return se({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(s*2,"px ").concat(s*3,"px")})},$j=Jh,Bj=Jh,Uj=function(t){var n=t.children,r=n===void 0?"No options":n,s=t.innerProps,o=dn(t,Oj);return oe("div",de({},Ye(se(se({},o),{},{children:r,innerProps:s}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),s),r)},zj=function(t){var n=t.children,r=n===void 0?"Loading...":n,s=t.innerProps,o=dn(t,Aj);return oe("div",de({},Ye(se(se({},o),{},{children:r,innerProps:s}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),s),r)},Hj=function(t){var n=t.rect,r=t.offset,s=t.position;return{left:n.left,position:s,top:r,width:n.width,zIndex:1}},Wj=function(t){var n=t.appendTo,r=t.children,s=t.controlElement,o=t.innerProps,a=t.menuPlacement,i=t.menuPosition,l=f.useRef(null),u=f.useRef(null),p=f.useState(Kh(a)),d=ot(p,2),m=d[0],v=d[1],y=f.useMemo(function(){return{setPortalPlacement:v}},[]),h=f.useState(null),g=ot(h,2),x=g[0],b=g[1],S=f.useCallback(function(){if(s){var k=Sj(s),R=i==="fixed"?0:window.pageYOffset,N=k[m]+R;(N!==(x==null?void 0:x.offset)||k.left!==(x==null?void 0:x.rect.left)||k.width!==(x==null?void 0:x.rect.width))&&b({offset:N,rect:k})}},[s,i,m,x==null?void 0:x.offset,x==null?void 0:x.rect.left,x==null?void 0:x.rect.width]);Di(function(){S()},[S]);var E=f.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),s&&l.current&&(u.current=Lp(s,l.current,S,{elementResize:"ResizeObserver"in window}))},[s,S]);Di(function(){E()},[E]);var _=f.useCallback(function(k){l.current=k,E()},[E]);if(!n&&i!=="fixed"||!x)return null;var j=oe("div",de({ref:_},Ye(se(se({},t),{},{offset:x.offset,position:i,rect:x.rect}),"menuPortal",{"menu-portal":!0}),o),r);return oe(Xh.Provider,{value:y},n?Nr.createPortal(j,n):j)},Zj=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},Gj=function(t){var n=t.children,r=t.innerProps,s=t.isDisabled,o=t.isRtl;return oe("div",de({},Ye(t,"container",{"--is-disabled":s,"--is-rtl":o}),r),n)},qj=function(t,n){var r=t.theme.spacing,s=t.isMulti,o=t.hasValue,a=t.selectProps.controlShouldRenderValue;return se({alignItems:"center",display:s&&o&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},Yj=function(t){var n=t.children,r=t.innerProps,s=t.isMulti,o=t.hasValue;return oe("div",de({},Ye(t,"valueContainer",{"value-container":!0,"value-container--is-multi":s,"value-container--has-value":o}),r),n)},Kj=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Xj=function(t){var n=t.children,r=t.innerProps;return oe("div",de({},Ye(t,"indicatorsContainer",{indicators:!0}),r),n)},Iu,Jj=["size"],Qj=["innerProps","isRtl","size"],eE={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Qh=function(t){var n=t.size,r=dn(t,Jj);return oe("svg",de({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:eE},r))},Yl=function(t){return oe(Qh,de({size:20},t),oe("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},eg=function(t){return oe(Qh,de({size:20},t),oe("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},tg=function(t,n){var r=t.isFocused,s=t.theme,o=s.spacing.baseUnit,a=s.colors;return se({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:o*2,":hover":{color:r?a.neutral80:a.neutral40}})},tE=tg,nE=function(t){var n=t.children,r=t.innerProps;return oe("div",de({},Ye(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||oe(eg,null))},rE=tg,sE=function(t){var n=t.children,r=t.innerProps;return oe("div",de({},Ye(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||oe(Yl,null))},oE=function(t,n){var r=t.isDisabled,s=t.theme,o=s.spacing.baseUnit,a=s.colors;return se({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:o*2,marginTop:o*2})},aE=function(t){var n=t.innerProps;return oe("span",de({},n,Ye(t,"indicatorSeparator",{"indicator-separator":!0})))},iE=mj(Iu||(Iu=hj([`
0%, 80%, 100% { opacity: 0; }
40% { opacity: 1; }
`]))),lE=function(t,n){var r=t.isFocused,s=t.size,o=t.theme,a=o.colors,i=o.spacing.baseUnit;return se({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:s,lineHeight:1,marginRight:s,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?a.neutral60:a.neutral20,padding:i*2})},Za=function(t){var n=t.delay,r=t.offset;return oe("span",{css:ql({animation:"".concat(iE," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},cE=function(t){var n=t.innerProps,r=t.isRtl,s=t.size,o=s===void 0?4:s,a=dn(t,Qj);return oe("div",de({},Ye(se(se({},a),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),oe(Za,{delay:0,offset:r}),oe(Za,{delay:160,offset:!0}),oe(Za,{delay:320,offset:!r}))},uE=function(t,n){var r=t.isDisabled,s=t.isFocused,o=t.theme,a=o.colors,i=o.borderRadius,l=o.spacing;return se({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?a.neutral5:a.neutral0,borderColor:r?a.neutral10:s?a.primary:a.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:s?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:s?a.primary:a.neutral30}})},dE=function(t){var n=t.children,r=t.isDisabled,s=t.isFocused,o=t.innerRef,a=t.innerProps,i=t.menuIsOpen;return oe("div",de({ref:o},Ye(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":s,"control--menu-is-open":i}),a,{"aria-disabled":r||void 0}),n)},fE=dE,pE=["data"],mE=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},hE=function(t){var n=t.children,r=t.cx,s=t.getStyles,o=t.getClassNames,a=t.Heading,i=t.headingProps,l=t.innerProps,u=t.label,p=t.theme,d=t.selectProps;return oe("div",de({},Ye(t,"group",{group:!0}),l),oe(a,de({},i,{selectProps:d,theme:p,getStyles:s,getClassNames:o,cx:r}),u),oe("div",null,n))},gE=function(t,n){var r=t.theme,s=r.colors,o=r.spacing;return se({label:"group",cursor:"default",display:"block"},n?{}:{color:s.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},vE=function(t){var n=Gh(t);n.data;var r=dn(n,pE);return oe("div",de({},Ye(t,"groupHeading",{"group-heading":!0}),r))},yE=hE,bE=["innerRef","isDisabled","isHidden","inputClassName"],xE=function(t,n){var r=t.isDisabled,s=t.value,o=t.theme,a=o.spacing,i=o.colors;return se(se({visibility:r?"hidden":"visible",transform:s?"translateZ(0)":""},wE),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:i.neutral80})},ng={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},wE={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":se({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},ng)},_E=function(t){return se({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},ng)},SE=function(t){var n=t.cx,r=t.value,s=Gh(t),o=s.innerRef,a=s.isDisabled,i=s.isHidden,l=s.inputClassName,u=dn(s,bE);return oe("div",de({},Ye(t,"input",{"input-container":!0}),{"data-value":r||""}),oe("input",de({className:n({input:!0},l),ref:o,style:_E(i),disabled:a},u)))},CE=SE,kE=function(t,n){var r=t.theme,s=r.spacing,o=r.borderRadius,a=r.colors;return se({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:o/2,margin:s.baseUnit/2})},jE=function(t,n){var r=t.theme,s=r.borderRadius,o=r.colors,a=t.cropWithEllipsis;return se({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:s/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},EE=function(t,n){var r=t.theme,s=r.spacing,o=r.borderRadius,a=r.colors,i=t.isFocused;return se({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:i?a.dangerLight:void 0,paddingLeft:s.baseUnit,paddingRight:s.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},rg=function(t){var n=t.children,r=t.innerProps;return oe("div",r,n)},RE=rg,TE=rg;function OE(e){var t=e.children,n=e.innerProps;return oe("div",de({role:"button"},n),t||oe(Yl,{size:14}))}var AE=function(t){var n=t.children,r=t.components,s=t.data,o=t.innerProps,a=t.isDisabled,i=t.removeProps,l=t.selectProps,u=r.Container,p=r.Label,d=r.Remove;return oe(u,{data:s,innerProps:se(se({},Ye(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:l},oe(p,{data:s,innerProps:se({},Ye(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),oe(d,{data:s,innerProps:se(se({},Ye(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},i),selectProps:l}))},IE=AE,NE=function(t,n){var r=t.isDisabled,s=t.isFocused,o=t.isSelected,a=t.theme,i=a.spacing,l=a.colors;return se({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?l.primary:s?l.primary25:"transparent",color:r?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(i.baseUnit*2,"px ").concat(i.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?l.primary:l.primary50}})},PE=function(t){var n=t.children,r=t.isDisabled,s=t.isFocused,o=t.isSelected,a=t.innerRef,i=t.innerProps;return oe("div",de({},Ye(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":s,"option--is-selected":o}),{ref:a,"aria-disabled":r},i),n)},ME=PE,DE=function(t,n){var r=t.theme,s=r.spacing,o=r.colors;return se({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},FE=function(t){var n=t.children,r=t.innerProps;return oe("div",de({},Ye(t,"placeholder",{placeholder:!0}),r),n)},VE=FE,LE=function(t,n){var r=t.isDisabled,s=t.theme,o=s.spacing,a=s.colors;return se({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?a.neutral40:a.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},$E=function(t){var n=t.children,r=t.isDisabled,s=t.innerProps;return oe("div",de({},Ye(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),s),n)},BE=$E,la={ClearIndicator:sE,Control:fE,DropdownIndicator:nE,DownChevron:eg,CrossIcon:Yl,Group:yE,GroupHeading:vE,IndicatorsContainer:Xj,IndicatorSeparator:aE,Input:CE,LoadingIndicator:cE,Menu:Fj,MenuList:Lj,MenuPortal:Wj,LoadingMessage:zj,NoOptionsMessage:Uj,MultiValue:IE,MultiValueContainer:RE,MultiValueLabel:TE,MultiValueRemove:OE,Option:ME,Placeholder:VE,SelectContainer:Gj,SingleValue:BE,ValueContainer:Yj},UE=function(t){return se(se({},la),t.components)},Nu=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function zE(e,t){return!!(e===t||Nu(e)&&Nu(t))}function HE(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!zE(e[n],t[n]))return!1;return!0}function WE(e,t){t===void 0&&(t=HE);var n=null;function r(){for(var s=[],o=0;o<arguments.length;o++)s[o]=arguments[o];if(n&&n.lastThis===this&&t(s,n.lastArgs))return n.lastResult;var a=e.apply(this,s);return n={lastResult:a,lastArgs:s,lastThis:this},a}return r.clear=function(){n=null},r}var ZE={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},GE=function(t){return oe("span",de({css:ZE},t))},Pu=GE,qE={guidance:function(t){var n=t.isSearchable,r=t.isMulti,s=t.tabSelectsValue,o=t.context,a=t.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(s?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,s=r===void 0?"":r,o=t.labels,a=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(s,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return a?"option ".concat(s," is disabled. Select another option."):"option ".concat(s,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,s=t.options,o=t.label,a=o===void 0?"":o,i=t.selectValue,l=t.isDisabled,u=t.isSelected,p=t.isAppleDevice,d=function(h,g){return h&&h.length?"".concat(h.indexOf(g)+1," of ").concat(h.length):""};if(n==="value"&&i)return"value ".concat(a," focused, ").concat(d(i,r),".");if(n==="menu"&&p){var m=l?" disabled":"",v="".concat(u?" selected":"").concat(m);return"".concat(a).concat(v,", ").concat(d(s,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},YE=function(t){var n=t.ariaSelection,r=t.focusedOption,s=t.focusedValue,o=t.focusableOptions,a=t.isFocused,i=t.selectValue,l=t.selectProps,u=t.id,p=t.isAppleDevice,d=l.ariaLiveMessages,m=l.getOptionLabel,v=l.inputValue,y=l.isMulti,h=l.isOptionDisabled,g=l.isSearchable,x=l.menuIsOpen,b=l.options,S=l.screenReaderStatus,E=l.tabSelectsValue,_=l.isLoading,j=l["aria-label"],k=l["aria-live"],R=f.useMemo(function(){return se(se({},qE),d||{})},[d]),N=f.useMemo(function(){var L="";if(n&&R.onChange){var I=n.option,U=n.options,P=n.removedValue,ae=n.removedValues,Pe=n.value,ie=function(ue){return Array.isArray(ue)?null:ue},ne=P||I||ie(Pe),J=ne?m(ne):"",le=U||ae||void 0,Re=le?le.map(m):[],ce=se({isDisabled:ne&&h(ne,i),label:J,labels:Re},n);L=R.onChange(ce)}return L},[n,R,h,i,m]),F=f.useMemo(function(){var L="",I=r||s,U=!!(r&&i&&i.includes(r));if(I&&R.onFocus){var P={focused:I,label:m(I),isDisabled:h(I,i),isSelected:U,options:o,context:I===r?"menu":"value",selectValue:i,isAppleDevice:p};L=R.onFocus(P)}return L},[r,s,m,h,R,o,i,p]),z=f.useMemo(function(){var L="";if(x&&b.length&&!_&&R.onFilter){var I=S({count:o.length});L=R.onFilter({inputValue:v,resultsMessage:I})}return L},[o,v,x,R,b,S,_]),M=(n==null?void 0:n.action)==="initial-input-focus",B=f.useMemo(function(){var L="";if(R.guidance){var I=s?"value":x?"menu":"input";L=R.guidance({"aria-label":j,context:I,isDisabled:r&&h(r,i),isMulti:y,isSearchable:g,tabSelectsValue:E,isInitialFocus:M})}return L},[j,r,s,y,h,g,x,R,i,E,M]),q=oe(f.Fragment,null,oe("span",{id:"aria-selection"},N),oe("span",{id:"aria-focused"},F),oe("span",{id:"aria-results"},z),oe("span",{id:"aria-guidance"},B));return oe(f.Fragment,null,oe(Pu,{id:u},M&&q),oe(Pu,{"aria-live":k,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!M&&q))},KE=YE,Fi=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],XE=new RegExp("["+Fi.map(function(e){return e.letters}).join("")+"]","g"),sg={};for(var Ga=0;Ga<Fi.length;Ga++)for(var qa=Fi[Ga],Ya=0;Ya<qa.letters.length;Ya++)sg[qa.letters[Ya]]=qa.base;var og=function(t){return t.replace(XE,function(n){return sg[n]})},JE=WE(og),Mu=function(t){return t.replace(/^\s+|\s+$/g,"")},QE=function(t){return"".concat(t.label," ").concat(t.value)},eR=function(t){return function(n,r){if(n.data.__isNew__)return!0;var s=se({ignoreCase:!0,ignoreAccents:!0,stringify:QE,trim:!0,matchFrom:"any"},t),o=s.ignoreCase,a=s.ignoreAccents,i=s.stringify,l=s.trim,u=s.matchFrom,p=l?Mu(r):r,d=l?Mu(i(n)):i(n);return o&&(p=p.toLowerCase(),d=d.toLowerCase()),a&&(p=JE(p),d=og(d)),u==="start"?d.substr(0,p.length)===p:d.indexOf(p)>-1}},tR=["innerRef"];function nR(e){var t=e.innerRef,n=dn(e,tR),r=Tj(n,"onExited","in","enter","exit","appear");return oe("input",de({ref:t},r,{css:ql({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var rR=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function sR(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,s=e.onTopArrive,o=e.onTopLeave,a=f.useRef(!1),i=f.useRef(!1),l=f.useRef(0),u=f.useRef(null),p=f.useCallback(function(g,x){if(u.current!==null){var b=u.current,S=b.scrollTop,E=b.scrollHeight,_=b.clientHeight,j=u.current,k=x>0,R=E-_-S,N=!1;R>x&&a.current&&(r&&r(g),a.current=!1),k&&i.current&&(o&&o(g),i.current=!1),k&&x>R?(n&&!a.current&&n(g),j.scrollTop=E,N=!0,a.current=!0):!k&&-x>S&&(s&&!i.current&&s(g),j.scrollTop=0,N=!0,i.current=!0),N&&rR(g)}},[n,r,s,o]),d=f.useCallback(function(g){p(g,g.deltaY)},[p]),m=f.useCallback(function(g){l.current=g.changedTouches[0].clientY},[]),v=f.useCallback(function(g){var x=l.current-g.changedTouches[0].clientY;p(g,x)},[p]),y=f.useCallback(function(g){if(g){var x=jj?{passive:!1}:!1;g.addEventListener("wheel",d,x),g.addEventListener("touchstart",m,x),g.addEventListener("touchmove",v,x)}},[v,m,d]),h=f.useCallback(function(g){g&&(g.removeEventListener("wheel",d,!1),g.removeEventListener("touchstart",m,!1),g.removeEventListener("touchmove",v,!1))},[v,m,d]);return f.useEffect(function(){if(t){var g=u.current;return y(g),function(){h(g)}}},[t,y,h]),function(g){u.current=g}}var Du=["boxSizing","height","overflow","paddingRight","position"],Fu={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Vu(e){e.cancelable&&e.preventDefault()}function Lu(e){e.stopPropagation()}function $u(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Bu(){return"ontouchstart"in window||navigator.maxTouchPoints}var Uu=!!(typeof window<"u"&&window.document&&window.document.createElement),Jr=0,ur={capture:!1,passive:!1};function oR(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,s=f.useRef({}),o=f.useRef(null),a=f.useCallback(function(l){if(Uu){var u=document.body,p=u&&u.style;if(r&&Du.forEach(function(y){var h=p&&p[y];s.current[y]=h}),r&&Jr<1){var d=parseInt(s.current.paddingRight,10)||0,m=document.body?document.body.clientWidth:0,v=window.innerWidth-m+d||0;Object.keys(Fu).forEach(function(y){var h=Fu[y];p&&(p[y]=h)}),p&&(p.paddingRight="".concat(v,"px"))}u&&Bu()&&(u.addEventListener("touchmove",Vu,ur),l&&(l.addEventListener("touchstart",$u,ur),l.addEventListener("touchmove",Lu,ur))),Jr+=1}},[r]),i=f.useCallback(function(l){if(Uu){var u=document.body,p=u&&u.style;Jr=Math.max(Jr-1,0),r&&Jr<1&&Du.forEach(function(d){var m=s.current[d];p&&(p[d]=m)}),u&&Bu()&&(u.removeEventListener("touchmove",Vu,ur),l&&(l.removeEventListener("touchstart",$u,ur),l.removeEventListener("touchmove",Lu,ur)))}},[r]);return f.useEffect(function(){if(t){var l=o.current;return a(l),function(){i(l)}}},[t,a,i]),function(l){o.current=l}}var aR=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},iR={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function lR(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,s=r===void 0?!0:r,o=e.onBottomArrive,a=e.onBottomLeave,i=e.onTopArrive,l=e.onTopLeave,u=sR({isEnabled:s,onBottomArrive:o,onBottomLeave:a,onTopArrive:i,onTopLeave:l}),p=oR({isEnabled:n}),d=function(v){u(v),p(v)};return oe(f.Fragment,null,n&&oe("div",{onClick:aR,css:iR}),t(d))}var cR={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},uR=function(t){var n=t.name,r=t.onFocus;return oe("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:cR,value:"",onChange:function(){}})},dR=uR;function Kl(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function fR(){return Kl(/^iPhone/i)}function ag(){return Kl(/^Mac/i)}function pR(){return Kl(/^iPad/i)||ag()&&navigator.maxTouchPoints>1}function mR(){return fR()||pR()}function hR(){return ag()||mR()}var gR=function(t){return t.label},vR=function(t){return t.label},yR=function(t){return t.value},bR=function(t){return!!t.isDisabled},xR={clearIndicator:rE,container:Zj,control:uE,dropdownIndicator:tE,group:mE,groupHeading:gE,indicatorsContainer:Kj,indicatorSeparator:oE,input:xE,loadingIndicator:lE,loadingMessage:Bj,menu:Pj,menuList:Vj,menuPortal:Hj,multiValue:kE,multiValueLabel:jE,multiValueRemove:EE,noOptionsMessage:$j,option:NE,placeholder:DE,singleValue:LE,valueContainer:qj},wR={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},_R=4,ig=4,SR=38,CR=ig*2,kR={baseUnit:ig,controlHeight:SR,menuGutter:CR},Ka={borderRadius:_R,colors:wR,spacing:kR},jR={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Au(),captureMenuScroll:!Au(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:eR(),formatGroupLabel:gR,getOptionLabel:vR,getOptionValue:yR,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:bR,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!Cj(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function zu(e,t,n,r){var s=ug(e,t,n),o=dg(e,t,n),a=cg(e,t),i=Ao(e,t);return{type:"option",data:t,isDisabled:s,isSelected:o,label:a,value:i,index:r}}function oo(e,t){return e.options.map(function(n,r){if("options"in n){var s=n.options.map(function(a,i){return zu(e,a,t,i)}).filter(function(a){return Wu(e,a)});return s.length>0?{type:"group",data:n,options:s,index:r}:void 0}var o=zu(e,n,t,r);return Wu(e,o)?o:void 0}).filter(Ej)}function lg(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,zl(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function Hu(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,zl(r.options.map(function(s){return{data:s.data,id:"".concat(t,"-").concat(r.index,"-").concat(s.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function ER(e,t){return lg(oo(e,t))}function Wu(e,t){var n=e.inputValue,r=n===void 0?"":n,s=t.data,o=t.isSelected,a=t.label,i=t.value;return(!pg(e)||!o)&&fg(e,{label:a,value:i,data:s},r)}function RR(e,t){var n=e.focusedValue,r=e.selectValue,s=r.indexOf(n);if(s>-1){var o=t.indexOf(n);if(o>-1)return n;if(s<t.length)return t[s]}return null}function TR(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Xa=function(t,n){var r,s=(r=t.find(function(o){return o.data===n}))===null||r===void 0?void 0:r.id;return s||null},cg=function(t,n){return t.getOptionLabel(n)},Ao=function(t,n){return t.getOptionValue(n)};function ug(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function dg(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Ao(e,t);return n.some(function(s){return Ao(e,s)===r})}function fg(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var pg=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},OR=1,mg=function(e){dk(n,e);var t=mk(n);function n(r){var s;if(ck(this,n),s=t.call(this,r),s.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},s.blockOptionHover=!1,s.isComposing=!1,s.commonProps=void 0,s.initialTouchX=0,s.initialTouchY=0,s.openAfterFocus=!1,s.scrollToFocusedOptionOnUpdate=!1,s.userIsDragging=void 0,s.isAppleDevice=hR(),s.controlRef=null,s.getControlRef=function(l){s.controlRef=l},s.focusedOptionRef=null,s.getFocusedOptionRef=function(l){s.focusedOptionRef=l},s.menuListRef=null,s.getMenuListRef=function(l){s.menuListRef=l},s.inputRef=null,s.getInputRef=function(l){s.inputRef=l},s.focus=s.focusInput,s.blur=s.blurInput,s.onChange=function(l,u){var p=s.props,d=p.onChange,m=p.name;u.name=m,s.ariaOnChange(l,u),d(l,u)},s.setValue=function(l,u,p){var d=s.props,m=d.closeMenuOnSelect,v=d.isMulti,y=d.inputValue;s.onInputChange("",{action:"set-value",prevInputValue:y}),m&&(s.setState({inputIsHiddenAfterUpdate:!v}),s.onMenuClose()),s.setState({clearFocusValueOnUpdate:!0}),s.onChange(l,{action:u,option:p})},s.selectOption=function(l){var u=s.props,p=u.blurInputOnSelect,d=u.isMulti,m=u.name,v=s.state.selectValue,y=d&&s.isOptionSelected(l,v),h=s.isOptionDisabled(l,v);if(y){var g=s.getOptionValue(l);s.setValue(v.filter(function(x){return s.getOptionValue(x)!==g}),"deselect-option",l)}else if(!h)d?s.setValue([].concat(zl(v),[l]),"select-option",l):s.setValue(l,"select-option");else{s.ariaOnChange(l,{action:"select-option",option:l,name:m});return}p&&s.blurInput()},s.removeValue=function(l){var u=s.props.isMulti,p=s.state.selectValue,d=s.getOptionValue(l),m=p.filter(function(y){return s.getOptionValue(y)!==d}),v=qs(u,m,m[0]||null);s.onChange(v,{action:"remove-value",removedValue:l}),s.focusInput()},s.clearValue=function(){var l=s.state.selectValue;s.onChange(qs(s.props.isMulti,[],null),{action:"clear",removedValues:l})},s.popValue=function(){var l=s.props.isMulti,u=s.state.selectValue,p=u[u.length-1],d=u.slice(0,u.length-1),m=qs(l,d,d[0]||null);p&&s.onChange(m,{action:"pop-value",removedValue:p})},s.getFocusedOptionId=function(l){return Xa(s.state.focusableOptionsWithIds,l)},s.getFocusableOptionsWithIds=function(){return Hu(oo(s.props,s.state.selectValue),s.getElementId("option"))},s.getValue=function(){return s.state.selectValue},s.cx=function(){for(var l=arguments.length,u=new Array(l),p=0;p<l;p++)u[p]=arguments[p];return yj.apply(void 0,[s.props.classNamePrefix].concat(u))},s.getOptionLabel=function(l){return cg(s.props,l)},s.getOptionValue=function(l){return Ao(s.props,l)},s.getStyles=function(l,u){var p=s.props.unstyled,d=xR[l](u,p);d.boxSizing="border-box";var m=s.props.styles[l];return m?m(d,u):d},s.getClassNames=function(l,u){var p,d;return(p=(d=s.props.classNames)[l])===null||p===void 0?void 0:p.call(d,u)},s.getElementId=function(l){return"".concat(s.state.instancePrefix,"-").concat(l)},s.getComponents=function(){return UE(s.props)},s.buildCategorizedOptions=function(){return oo(s.props,s.state.selectValue)},s.getCategorizedOptions=function(){return s.props.menuIsOpen?s.buildCategorizedOptions():[]},s.buildFocusableOptions=function(){return lg(s.buildCategorizedOptions())},s.getFocusableOptions=function(){return s.props.menuIsOpen?s.buildFocusableOptions():[]},s.ariaOnChange=function(l,u){s.setState({ariaSelection:se({value:l},u)})},s.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),s.focusInput())},s.onMenuMouseMove=function(l){s.blockOptionHover=!1},s.onControlMouseDown=function(l){if(!l.defaultPrevented){var u=s.props.openMenuOnClick;s.state.isFocused?s.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&s.onMenuClose():u&&s.openMenu("first"):(u&&(s.openAfterFocus=!0),s.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},s.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!s.props.isDisabled){var u=s.props,p=u.isMulti,d=u.menuIsOpen;s.focusInput(),d?(s.setState({inputIsHiddenAfterUpdate:!p}),s.onMenuClose()):s.openMenu("first"),l.preventDefault()}},s.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(s.clearValue(),l.preventDefault(),s.openAfterFocus=!1,l.type==="touchend"?s.focusInput():setTimeout(function(){return s.focusInput()}))},s.onScroll=function(l){typeof s.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&ia(l.target)&&s.props.onMenuClose():typeof s.props.closeMenuOnScroll=="function"&&s.props.closeMenuOnScroll(l)&&s.props.onMenuClose()},s.onCompositionStart=function(){s.isComposing=!0},s.onCompositionEnd=function(){s.isComposing=!1},s.onTouchStart=function(l){var u=l.touches,p=u&&u.item(0);p&&(s.initialTouchX=p.clientX,s.initialTouchY=p.clientY,s.userIsDragging=!1)},s.onTouchMove=function(l){var u=l.touches,p=u&&u.item(0);if(p){var d=Math.abs(p.clientX-s.initialTouchX),m=Math.abs(p.clientY-s.initialTouchY),v=5;s.userIsDragging=d>v||m>v}},s.onTouchEnd=function(l){s.userIsDragging||(s.controlRef&&!s.controlRef.contains(l.target)&&s.menuListRef&&!s.menuListRef.contains(l.target)&&s.blurInput(),s.initialTouchX=0,s.initialTouchY=0)},s.onControlTouchEnd=function(l){s.userIsDragging||s.onControlMouseDown(l)},s.onClearIndicatorTouchEnd=function(l){s.userIsDragging||s.onClearIndicatorMouseDown(l)},s.onDropdownIndicatorTouchEnd=function(l){s.userIsDragging||s.onDropdownIndicatorMouseDown(l)},s.handleInputChange=function(l){var u=s.props.inputValue,p=l.currentTarget.value;s.setState({inputIsHiddenAfterUpdate:!1}),s.onInputChange(p,{action:"input-change",prevInputValue:u}),s.props.menuIsOpen||s.onMenuOpen()},s.onInputFocus=function(l){s.props.onFocus&&s.props.onFocus(l),s.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(s.openAfterFocus||s.props.openMenuOnFocus)&&s.openMenu("first"),s.openAfterFocus=!1},s.onInputBlur=function(l){var u=s.props.inputValue;if(s.menuListRef&&s.menuListRef.contains(document.activeElement)){s.inputRef.focus();return}s.props.onBlur&&s.props.onBlur(l),s.onInputChange("",{action:"input-blur",prevInputValue:u}),s.onMenuClose(),s.setState({focusedValue:null,isFocused:!1})},s.onOptionHover=function(l){if(!(s.blockOptionHover||s.state.focusedOption===l)){var u=s.getFocusableOptions(),p=u.indexOf(l);s.setState({focusedOption:l,focusedOptionId:p>-1?s.getFocusedOptionId(l):null})}},s.shouldHideSelectedOptions=function(){return pg(s.props)},s.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),s.focus()},s.onKeyDown=function(l){var u=s.props,p=u.isMulti,d=u.backspaceRemovesValue,m=u.escapeClearsValue,v=u.inputValue,y=u.isClearable,h=u.isDisabled,g=u.menuIsOpen,x=u.onKeyDown,b=u.tabSelectsValue,S=u.openMenuOnFocus,E=s.state,_=E.focusedOption,j=E.focusedValue,k=E.selectValue;if(!h&&!(typeof x=="function"&&(x(l),l.defaultPrevented))){switch(s.blockOptionHover=!0,l.key){case"ArrowLeft":if(!p||v)return;s.focusValue("previous");break;case"ArrowRight":if(!p||v)return;s.focusValue("next");break;case"Delete":case"Backspace":if(v)return;if(j)s.removeValue(j);else{if(!d)return;p?s.popValue():y&&s.clearValue()}break;case"Tab":if(s.isComposing||l.shiftKey||!g||!b||!_||S&&s.isOptionSelected(_,k))return;s.selectOption(_);break;case"Enter":if(l.keyCode===229)break;if(g){if(!_||s.isComposing)return;s.selectOption(_);break}return;case"Escape":g?(s.setState({inputIsHiddenAfterUpdate:!1}),s.onInputChange("",{action:"menu-close",prevInputValue:v}),s.onMenuClose()):y&&m&&s.clearValue();break;case" ":if(v)return;if(!g){s.openMenu("first");break}if(!_)return;s.selectOption(_);break;case"ArrowUp":g?s.focusOption("up"):s.openMenu("last");break;case"ArrowDown":g?s.focusOption("down"):s.openMenu("first");break;case"PageUp":if(!g)return;s.focusOption("pageup");break;case"PageDown":if(!g)return;s.focusOption("pagedown");break;case"Home":if(!g)return;s.focusOption("first");break;case"End":if(!g)return;s.focusOption("last");break;default:return}l.preventDefault()}},s.state.instancePrefix="react-select-"+(s.props.instanceId||++OR),s.state.selectValue=Tu(r.value),r.menuIsOpen&&s.state.selectValue.length){var o=s.getFocusableOptionsWithIds(),a=s.buildFocusableOptions(),i=a.indexOf(s.state.selectValue[0]);s.state.focusableOptionsWithIds=o,s.state.focusedOption=a[i],s.state.focusedOptionId=Xa(o,a[i])}return s}return uk(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Ou(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(s){var o=this.props,a=o.isDisabled,i=o.menuIsOpen,l=this.state.isFocused;(l&&!a&&s.isDisabled||l&&i&&!s.menuIsOpen)&&this.focusInput(),l&&a&&!s.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!a&&s.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Ou(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(s,o){this.props.onInputChange(s,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(s){var o=this,a=this.state,i=a.selectValue,l=a.isFocused,u=this.buildFocusableOptions(),p=s==="first"?0:u.length-1;if(!this.props.isMulti){var d=u.indexOf(i[0]);d>-1&&(p=d)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[p],focusedOptionId:this.getFocusedOptionId(u[p])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(s){var o=this.state,a=o.selectValue,i=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=a.indexOf(i);i||(l=-1);var u=a.length-1,p=-1;if(a.length){switch(s){case"previous":l===0?p=0:l===-1?p=u:p=l-1;break;case"next":l>-1&&l<u&&(p=l+1);break}this.setState({inputIsHidden:p!==-1,focusedValue:a[p]})}}}},{key:"focusOption",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,a=this.state.focusedOption,i=this.getFocusableOptions();if(i.length){var l=0,u=i.indexOf(a);a||(u=-1),s==="up"?l=u>0?u-1:i.length-1:s==="down"?l=(u+1)%i.length:s==="pageup"?(l=u-o,l<0&&(l=0)):s==="pagedown"?(l=u+o,l>i.length-1&&(l=i.length-1)):s==="last"&&(l=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(i[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Ka):se(se({},Ka),this.props.theme):Ka}},{key:"getCommonProps",value:function(){var s=this.clearValue,o=this.cx,a=this.getStyles,i=this.getClassNames,l=this.getValue,u=this.selectOption,p=this.setValue,d=this.props,m=d.isMulti,v=d.isRtl,y=d.options,h=this.hasValue();return{clearValue:s,cx:o,getStyles:a,getClassNames:i,getValue:l,hasValue:h,isMulti:m,isRtl:v,options:y,selectOption:u,selectProps:d,setValue:p,theme:this.getTheme()}}},{key:"hasValue",value:function(){var s=this.state.selectValue;return s.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var s=this.props,o=s.isClearable,a=s.isMulti;return o===void 0?a:o}},{key:"isOptionDisabled",value:function(s,o){return ug(this.props,s,o)}},{key:"isOptionSelected",value:function(s,o){return dg(this.props,s,o)}},{key:"filterOption",value:function(s,o){return fg(this.props,s,o)}},{key:"formatOptionLabel",value:function(s,o){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,i=this.state.selectValue;return this.props.formatOptionLabel(s,{context:o,inputValue:a,selectValue:i})}else return this.getOptionLabel(s)}},{key:"formatGroupLabel",value:function(s){return this.props.formatGroupLabel(s)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var s=this.props,o=s.isDisabled,a=s.isSearchable,i=s.inputId,l=s.inputValue,u=s.tabIndex,p=s.form,d=s.menuIsOpen,m=s.required,v=this.getComponents(),y=v.Input,h=this.state,g=h.inputIsHidden,x=h.ariaSelection,b=this.commonProps,S=i||this.getElementId("input"),E=se(se(se({"aria-autocomplete":"list","aria-expanded":d,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":m,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},d&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(x==null?void 0:x.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?f.createElement(y,de({},b,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:S,innerRef:this.getInputRef,isDisabled:o,isHidden:g,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:p,type:"text",value:l},E)):f.createElement(nR,de({id:S,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:To,onFocus:this.onInputFocus,disabled:o,tabIndex:u,inputMode:"none",form:p,value:""},E))}},{key:"renderPlaceholderOrValue",value:function(){var s=this,o=this.getComponents(),a=o.MultiValue,i=o.MultiValueContainer,l=o.MultiValueLabel,u=o.MultiValueRemove,p=o.SingleValue,d=o.Placeholder,m=this.commonProps,v=this.props,y=v.controlShouldRenderValue,h=v.isDisabled,g=v.isMulti,x=v.inputValue,b=v.placeholder,S=this.state,E=S.selectValue,_=S.focusedValue,j=S.isFocused;if(!this.hasValue()||!y)return x?null:f.createElement(d,de({},m,{key:"placeholder",isDisabled:h,isFocused:j,innerProps:{id:this.getElementId("placeholder")}}),b);if(g)return E.map(function(R,N){var F=R===_,z="".concat(s.getOptionLabel(R),"-").concat(s.getOptionValue(R));return f.createElement(a,de({},m,{components:{Container:i,Label:l,Remove:u},isFocused:F,isDisabled:h,key:z,index:N,removeProps:{onClick:function(){return s.removeValue(R)},onTouchEnd:function(){return s.removeValue(R)},onMouseDown:function(B){B.preventDefault()}},data:R}),s.formatOptionLabel(R,"value"))});if(x)return null;var k=E[0];return f.createElement(p,de({},m,{data:k,isDisabled:h}),this.formatOptionLabel(k,"value"))}},{key:"renderClearIndicator",value:function(){var s=this.getComponents(),o=s.ClearIndicator,a=this.commonProps,i=this.props,l=i.isDisabled,u=i.isLoading,p=this.state.isFocused;if(!this.isClearable()||!o||l||!this.hasValue()||u)return null;var d={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return f.createElement(o,de({},a,{innerProps:d,isFocused:p}))}},{key:"renderLoadingIndicator",value:function(){var s=this.getComponents(),o=s.LoadingIndicator,a=this.commonProps,i=this.props,l=i.isDisabled,u=i.isLoading,p=this.state.isFocused;if(!o||!u)return null;var d={"aria-hidden":"true"};return f.createElement(o,de({},a,{innerProps:d,isDisabled:l,isFocused:p}))}},{key:"renderIndicatorSeparator",value:function(){var s=this.getComponents(),o=s.DropdownIndicator,a=s.IndicatorSeparator;if(!o||!a)return null;var i=this.commonProps,l=this.props.isDisabled,u=this.state.isFocused;return f.createElement(a,de({},i,{isDisabled:l,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var s=this.getComponents(),o=s.DropdownIndicator;if(!o)return null;var a=this.commonProps,i=this.props.isDisabled,l=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return f.createElement(o,de({},a,{innerProps:u,isDisabled:i,isFocused:l}))}},{key:"renderMenu",value:function(){var s=this,o=this.getComponents(),a=o.Group,i=o.GroupHeading,l=o.Menu,u=o.MenuList,p=o.MenuPortal,d=o.LoadingMessage,m=o.NoOptionsMessage,v=o.Option,y=this.commonProps,h=this.state.focusedOption,g=this.props,x=g.captureMenuScroll,b=g.inputValue,S=g.isLoading,E=g.loadingMessage,_=g.minMenuHeight,j=g.maxMenuHeight,k=g.menuIsOpen,R=g.menuPlacement,N=g.menuPosition,F=g.menuPortalTarget,z=g.menuShouldBlockScroll,M=g.menuShouldScrollIntoView,B=g.noOptionsMessage,q=g.onMenuScrollToTop,L=g.onMenuScrollToBottom;if(!k)return null;var I=function(J,le){var Re=J.type,ce=J.data,H=J.isDisabled,ue=J.isSelected,je=J.label,ge=J.value,ve=h===ce,he=H?void 0:function(){return s.onOptionHover(ce)},Ke=H?void 0:function(){return s.selectOption(ce)},qe="".concat(s.getElementId("option"),"-").concat(le),xt={id:qe,onClick:Ke,onMouseMove:he,onMouseOver:he,tabIndex:-1,role:"option","aria-selected":s.isAppleDevice?void 0:ue};return f.createElement(v,de({},y,{innerProps:xt,data:ce,isDisabled:H,isSelected:ue,key:qe,label:je,type:Re,value:ge,isFocused:ve,innerRef:ve?s.getFocusedOptionRef:void 0}),s.formatOptionLabel(J.data,"menu"))},U;if(this.hasOptions())U=this.getCategorizedOptions().map(function(ne){if(ne.type==="group"){var J=ne.data,le=ne.options,Re=ne.index,ce="".concat(s.getElementId("group"),"-").concat(Re),H="".concat(ce,"-heading");return f.createElement(a,de({},y,{key:ce,data:J,options:le,Heading:i,headingProps:{id:H,data:ne.data},label:s.formatGroupLabel(ne.data)}),ne.options.map(function(ue){return I(ue,"".concat(Re,"-").concat(ue.index))}))}else if(ne.type==="option")return I(ne,"".concat(ne.index))});else if(S){var P=E({inputValue:b});if(P===null)return null;U=f.createElement(d,y,P)}else{var ae=B({inputValue:b});if(ae===null)return null;U=f.createElement(m,y,ae)}var Pe={minMenuHeight:_,maxMenuHeight:j,menuPlacement:R,menuPosition:N,menuShouldScrollIntoView:M},ie=f.createElement(Mj,de({},y,Pe),function(ne){var J=ne.ref,le=ne.placerProps,Re=le.placement,ce=le.maxHeight;return f.createElement(l,de({},y,Pe,{innerRef:J,innerProps:{onMouseDown:s.onMenuMouseDown,onMouseMove:s.onMenuMouseMove},isLoading:S,placement:Re}),f.createElement(lR,{captureEnabled:x,onTopArrive:q,onBottomArrive:L,lockEnabled:z},function(H){return f.createElement(u,de({},y,{innerRef:function(je){s.getMenuListRef(je),H(je)},innerProps:{role:"listbox","aria-multiselectable":y.isMulti,id:s.getElementId("listbox")},isLoading:S,maxHeight:ce,focusedOption:h}),U)}))});return F||N==="fixed"?f.createElement(p,de({},y,{appendTo:F,controlElement:this.controlRef,menuPlacement:R,menuPosition:N}),ie):ie}},{key:"renderFormField",value:function(){var s=this,o=this.props,a=o.delimiter,i=o.isDisabled,l=o.isMulti,u=o.name,p=o.required,d=this.state.selectValue;if(p&&!this.hasValue()&&!i)return f.createElement(dR,{name:u,onFocus:this.onValueInputFocus});if(!(!u||i))if(l)if(a){var m=d.map(function(h){return s.getOptionValue(h)}).join(a);return f.createElement("input",{name:u,type:"hidden",value:m})}else{var v=d.length>0?d.map(function(h,g){return f.createElement("input",{key:"i-".concat(g),name:u,type:"hidden",value:s.getOptionValue(h)})}):f.createElement("input",{name:u,type:"hidden",value:""});return f.createElement("div",null,v)}else{var y=d[0]?this.getOptionValue(d[0]):"";return f.createElement("input",{name:u,type:"hidden",value:y})}}},{key:"renderLiveRegion",value:function(){var s=this.commonProps,o=this.state,a=o.ariaSelection,i=o.focusedOption,l=o.focusedValue,u=o.isFocused,p=o.selectValue,d=this.getFocusableOptions();return f.createElement(KE,de({},s,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:i,focusedValue:l,isFocused:u,selectValue:p,focusableOptions:d,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var s=this.getComponents(),o=s.Control,a=s.IndicatorsContainer,i=s.SelectContainer,l=s.ValueContainer,u=this.props,p=u.className,d=u.id,m=u.isDisabled,v=u.menuIsOpen,y=this.state.isFocused,h=this.commonProps=this.getCommonProps();return f.createElement(i,de({},h,{className:p,innerProps:{id:d,onKeyDown:this.onKeyDown},isDisabled:m,isFocused:y}),this.renderLiveRegion(),f.createElement(o,de({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:m,isFocused:y,menuIsOpen:v}),f.createElement(l,de({},h,{isDisabled:m}),this.renderPlaceholderOrValue(),this.renderInput()),f.createElement(a,de({},h,{isDisabled:m}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(s,o){var a=o.prevProps,i=o.clearFocusValueOnUpdate,l=o.inputIsHiddenAfterUpdate,u=o.ariaSelection,p=o.isFocused,d=o.prevWasFocused,m=o.instancePrefix,v=s.options,y=s.value,h=s.menuIsOpen,g=s.inputValue,x=s.isMulti,b=Tu(y),S={};if(a&&(y!==a.value||v!==a.options||h!==a.menuIsOpen||g!==a.inputValue)){var E=h?ER(s,b):[],_=h?Hu(oo(s,b),"".concat(m,"-option")):[],j=i?RR(o,b):null,k=TR(o,E),R=Xa(_,k);S={selectValue:b,focusedOption:k,focusedOptionId:R,focusableOptionsWithIds:_,focusedValue:j,clearFocusValueOnUpdate:!1}}var N=l!=null&&s!==a?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},F=u,z=p&&d;return p&&!z&&(F={value:qs(x,b,b[0]||null),options:b,action:"initial-input-focus"},z=!d),(u==null?void 0:u.action)==="initial-input-focus"&&(F=null),se(se(se({},S),N),{},{prevProps:s,ariaSelection:F,prevWasFocused:z})}}]),n}(f.Component);mg.defaultProps=jR;var AR=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function IR(e){var t=e.defaultOptions,n=t===void 0?!1:t,r=e.cacheOptions,s=r===void 0?!1:r,o=e.loadOptions;e.options;var a=e.isLoading,i=a===void 0?!1:a,l=e.onInputChange,u=e.filterOption,p=u===void 0?null:u,d=dn(e,AR),m=d.inputValue,v=f.useRef(void 0),y=f.useRef(!1),h=f.useState(Array.isArray(n)?n:void 0),g=ot(h,2),x=g[0],b=g[1],S=f.useState(typeof m<"u"?m:""),E=ot(S,2),_=E[0],j=E[1],k=f.useState(n===!0),R=ot(k,2),N=R[0],F=R[1],z=f.useState(void 0),M=ot(z,2),B=M[0],q=M[1],L=f.useState([]),I=ot(L,2),U=I[0],P=I[1],ae=f.useState(!1),Pe=ot(ae,2),ie=Pe[0],ne=Pe[1],J=f.useState({}),le=ot(J,2),Re=le[0],ce=le[1],H=f.useState(void 0),ue=ot(H,2),je=ue[0],ge=ue[1],ve=f.useState(void 0),he=ot(ve,2),Ke=he[0],qe=he[1];s!==Ke&&(ce({}),qe(s)),n!==je&&(b(Array.isArray(n)?n:void 0),ge(n)),f.useEffect(function(){return y.current=!0,function(){y.current=!1}},[]);var xt=f.useCallback(function(Mt,He){if(!o)return He();var dt=o(Mt,He);dt&&typeof dt.then=="function"&&dt.then(He,function(){return He()})},[o]);f.useEffect(function(){n===!0&&xt(_,function(Mt){y.current&&(b(Mt||[]),F(!!v.current))})},[]);var Et=f.useCallback(function(Mt,He){var dt=bj(Mt,He,l);if(!dt){v.current=void 0,j(""),q(""),P([]),F(!1),ne(!1);return}if(s&&Re[dt])j(dt),q(dt),P(Re[dt]),F(!1),ne(!1);else{var rr=v.current={};j(dt),F(!0),ne(!B),xt(dt,function(C){y&&rr===v.current&&(v.current=void 0,F(!1),q(dt),P(C||[]),ne(!1),ce(C?se(se({},Re),{},mr({},dt,C)):Re))})}},[s,xt,B,Re,l]),ut=ie?[]:_&&B?U:x||[];return se(se({},d),{},{options:ut,isLoading:N||i,onInputChange:Et,filterOption:p})}var NR=f.forwardRef(function(e,t){var n=IR(e),r=lk(n);return f.createElement(mg,de({ref:t},r))}),PR=NR;const Ja={base:"border rounded-md bg-transparent hover:cursor-pointer",focus:"border-ring ring-1 ring-ring",nonFocus:"border-border"},MR="pl-1 py-0.5",DR="pl-1 py-0.5",FR="p-1 gap-1 data__values-container",VR="leading-7 ml-1",LR="bg-accent rounded items-center py-0.5 pl-2 pr-1 gap-1.5 data__multi-value",$R="leading-6 py-0.5",BR="bg-transparent text-primary opacity-50 hover:opacity-100",UR="p-1 gap-1",zR="p-1 bg-transparent text-primary opacity-50 hover:opacity-100",HR="bg-border hidden",WR="[&>svg]:w-4 [&>svg]:h-4 py-1 px-2 text-primary opacity-50",hg="opacity-50",ZR="p-1 mt-2 border bg-background rounded-lg",GR="ml-3 mt-2 mb-1 text-semibold text-sm",Zu={base:"hover:cursor-pointer px-3 py-2 rounded",focus:"bg-accent active:bg-secondary"},qR="p-2 bg-background border border-dashed rounded-sm",YR=e=>c.jsx(la.DropdownIndicator,{...e,children:c.jsx(Mo,{})}),KR=e=>c.jsx(la.ClearIndicator,{...e,children:c.jsx(Do,{})}),XR=e=>c.jsx(la.MultiValueRemove,{...e,children:c.jsx(Do,{})}),JR=()=>c.jsx(el,{className:hg}),QR={DropdownIndicator:YR,ClearIndicator:KR,MultiValueRemove:XR,LoadingIndicator:JR},eT={input:e=>({...e,"input:focus":{boxShadow:"none"}}),multiValueLabel:e=>({...e,whiteSpace:"normal",overflow:"visible"}),control:e=>({...e,transition:"none"})},tT={control:({isFocused:e})=>$(e?Ja.focus:Ja.nonFocus,Ja.base),placeholder:e=>$(MR,{"opacity-50":e.selectProps.isLoading}),input:()=>DR,valueContainer:()=>FR,singleValue:()=>VR,multiValue:()=>LR,multiValueLabel:()=>$R,multiValueRemove:()=>BR,indicatorsContainer:()=>UR,clearIndicator:()=>zR,indicatorSeparator:()=>HR,dropdownIndicator:()=>WR,menu:()=>ZR,groupHeading:()=>GR,option:({isFocused:e})=>$(e&&Zu.focus,Zu.base),noOptionsMessage:()=>qR,loadingIndicator:()=>hg};function nT(e){return c.jsx(PR,{closeMenuOnSelect:!1,unstyled:!0,styles:eT,components:QR,classNames:tT,...e})}const rT=e=>{const t=f.useRef(e);return f.useEffect(()=>{t.current=e},[e]),t.current};function sT(e,t,n){var r=this,s=f.useRef(null),o=f.useRef(0),a=f.useRef(null),i=f.useRef([]),l=f.useRef(),u=f.useRef(),p=f.useRef(e),d=f.useRef(!0);p.current=e;var m=typeof window<"u",v=!t&&t!==0&&m;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var y=!!(n=n||{}).leading,h=!("trailing"in n)||!!n.trailing,g="maxWait"in n,x="debounceOnServer"in n&&!!n.debounceOnServer,b=g?Math.max(+n.maxWait||0,t):null;f.useEffect(function(){return d.current=!0,function(){d.current=!1}},[]);var S=f.useMemo(function(){var E=function(F){var z=i.current,M=l.current;return i.current=l.current=null,o.current=F,u.current=p.current.apply(M,z)},_=function(F,z){v&&cancelAnimationFrame(a.current),a.current=v?requestAnimationFrame(F):setTimeout(F,z)},j=function(F){if(!d.current)return!1;var z=F-s.current;return!s.current||z>=t||z<0||g&&F-o.current>=b},k=function(F){return a.current=null,h&&i.current?E(F):(i.current=l.current=null,u.current)},R=function F(){var z=Date.now();if(j(z))return k(z);if(d.current){var M=t-(z-s.current),B=g?Math.min(M,b-(z-o.current)):M;_(F,B)}},N=function(){if(m||x){var F=Date.now(),z=j(F);if(i.current=[].slice.call(arguments),l.current=r,s.current=F,z){if(!a.current&&d.current)return o.current=s.current,_(R,t),y?E(s.current):u.current;if(g)return _(R,t),E(s.current)}return a.current||_(R,t),u.current}};return N.cancel=function(){a.current&&(v?cancelAnimationFrame(a.current):clearTimeout(a.current)),o.current=0,i.current=s.current=l.current=a.current=null},N.isPending=function(){return!!a.current},N.flush=function(){return a.current?k(Date.now()):u.current},N},[y,g,t,b,h,v,m,x]);return S}const oT=e=>{const t=`${e}/p2tg-rules/`;return f.useCallback(async n=>{const{setInProgress:r,setResult:s,param:o,search:a}=n;r==null||r(!0);try{const i=new URLSearchParams({param:o,search:a||""}),l=`${t}?${i.toString()}`,u=await rl.GET({path:l});return s==null||s(u),u}catch(i){return console.log("ERROR",i),s==null||s([]),[]}finally{r==null||r(!1)}},[t])},aT=e=>{const{getValues:t}=Pt(),n=`${e}.param`,r=Js("post",fo(n),t());return ct({name:`${e}.param`,defaultValue:r})},iT="p2tg_rule_values",Gu=()=>w("Loading..."),lT=()=>w("No options available");function cT({rest_namespace:e,rule:t,ruleset_name:n}){const[r,s]=f.useState(!1),[o,a]=f.useState([]),i=oT(e),{getItem:l,setItem:u}=If(iT,{},tk),{setValue:p}=Pt(),d=aT(n),m=rT(d);f.useEffect(()=>{m&&m!==d&&(p(`${n}.values`,[]),v(d))},[d,m]);const v=f.useCallback(h=>{if(!h)return;const g=l(h,[]);g.length?a(g):i({param:h,setInProgress:s,setResult:x=>{a(x),u(h,x)}})},[i,l,u]);f.useEffect(()=>{v(d)},[]);const y=sT((h,g)=>{i({param:d,search:h,setInProgress:s,setResult:x=>{g(x)}})},1e3);return c.jsx(xe,{name:`${n}.values`,defaultValue:t.values,render:({field:h})=>c.jsx(gs,{children:c.jsx(Se,{children:c.jsx(nT,{"aria-label":w("Rule values"),closeMenuOnSelect:!1,defaultOptions:o,defaultValue:h.value,isLoading:r,isMulti:!0,loadOptions:y,loadingMessage:Gu,noOptionsMessage:lT,onChange:h.onChange,placeholder:r?Gu():w("Select..."),value:h.value})})})},d)}const uT=()=>[{value:"in",label:w("is in")},{value:"not_in",label:w("is not in")}],dT=e=>{const{ruleset_name:t,rule:n,rule_types:r}=e;return c.jsxs("div",{className:"flex flex-wrap gap-2 flex-col md:flex-row w-full",children:[c.jsx("div",{className:"grow-[2]",children:c.jsx(xe,{name:`${t}.param`,defaultValue:n.param,render:({field:s})=>c.jsx(gs,{children:c.jsx(Se,{children:c.jsx(Oi,{...s,"aria-label":w("Rule type"),onValueChange:s.onChange,defaultValue:s.value,options:r,triggerClassName:"w-full"})})})})}),c.jsx("div",{className:"grow-[1]",children:c.jsx(xe,{name:`${t}.operator`,defaultValue:n.operator,render:({field:s})=>c.jsx(gs,{children:c.jsx(Se,{children:c.jsx(Oi,{...s,"aria-label":w("Rule operator"),onValueChange:s.onChange,defaultValue:s.value,options:uT(),triggerClassName:"w-full"})})})})}),c.jsx("div",{className:"basis-full",children:c.jsx(cT,{...e})})]})},fT=({hasMultipleRules:e,onAdd:t,onRemove:n,...r})=>c.jsxs("div",{className:$("flex gap-2 flex-col md:flex-row items-center p-2 rounded",{"border p-2":e}),children:[c.jsx(dT,{...r}),c.jsx(Q1,{onAdd:t,onRemove:n})]}),pT=({onRemove:e,name:t,rest_namespace:n,rule_types:r,RuleSetComponent:s=fT})=>{const o=`${t}.value`,a=Ui({name:o});return f.useEffect(()=>{a.fields.length||e==null||e()},[a.fields.length,e]),c.jsx("div",{className:"border p-2 rounded",children:a.fields.map((i,l,{length:u})=>c.jsxs(f.Fragment,{children:[c.jsx("div",{children:c.jsx(s,{rest_namespace:n,rule_types:r,ruleset_name:`${o}.${l}`,rule:i,onAdd:()=>{a.insert(l+1,Ih,{shouldFocus:!1})},onRemove:()=>{a.remove(l)},hasMultipleRules:a.fields.length>1})}),l<u-1?c.jsx(Ul,{wrapperClassName:"uppercase",children:w("And")}):null]},i.id))})},mT=({prefix:e,rest_namespace:t,rule_types:n,RuleSetComponent:r})=>{var a,i;const s=Ee("rules",e),o=Ui({name:s});return c.jsxs("div",{className:$({"p-2 border":((a=o.fields)==null?void 0:a.length)>1}),children:[o.fields.map((l,u)=>c.jsxs("div",{children:[c.jsx(pT,{name:`${s}.${u}`,onRemove:()=>{o.remove(u)},rest_namespace:t,rule_types:n,RuleSetComponent:r}),c.jsx(Ul,{wrapperClassName:"uppercase",children:w("Or")})]},l.id)),c.jsxs("div",{className:"text-center mt-4",children:[!((i=o.fields)!=null&&i.length)&&c.jsx("p",{className:"mb-4",children:w("You can also define custom rules to send the posts.")}),c.jsx(J1,{onAdd:()=>{o.append({value:[Ih]},{shouldFocus:!1})}})]})]})},hT=()=>[{value:"new",label:w("A new post is published")},{value:"existing",label:w("An existing post is updated")}],{api:{rest_namespace:gT=""},uiData:{post_types:vT,rule_types:yT}}=cn(),bT=()=>c.jsxs(un,{title:w("Rules"),children:[c.jsxs("div",{className:"flex flex-col gap-10 md:gap-4",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row gap-10",children:[c.jsx("div",{className:"basis-[48%]",children:c.jsx(gi,{name:`${at}.send_when`,description:w("When the post should be sent to Telegram."),label:ht("send_when"),options:hT(),wrapperClassName:"md:flex-col"})}),c.jsx("div",{className:"basis-[48%]",children:c.jsx(gi,{name:`${at}.post_types`,description:w("Which post types should be sent."),label:ht("post_types"),options:vT,wrapperClassName:"md:flex-col"})})]}),c.jsxs("div",{children:[c.jsx(_t,{className:"my-0"}),c.jsx(Ul,{wrapperClassName:"uppercase",children:w("And")}),c.jsx(mT,{prefix:at,rule_types:yT,rest_namespace:gT})]})]}),c.jsx(_n,{location:"rules"})]}),xT=()=>{const e=ct({name:"bot_username"});return c.jsxs(c.Fragment,{children:[c.jsx(Fl,{prefix:at}),c.jsx(Vl,{name:`${at}.active`,children:c.jsxs(mm,{children:[c.jsx(uC,{botUsername:e||"",videoId:"m48V-gWz9-o"}),c.jsx(dC,{}),c.jsx(bT,{}),c.jsx(Z1,{}),c.jsx(fC,{}),c.jsx(X1,{})]})})]})},wT=()=>c.jsx(Wo,{className:"my-2 h-max max-w-max",title:w("DISCLAIMER!"),children:c.jsx("em",{children:w("Use the proxy at your own risk!")})}),gg=({link:e,text:t,children:n})=>c.jsx(rt,{href:e,isExternal:!0,children:t||n||w("Click here for instructions.")}),_T=({prefix:e})=>c.jsx(xe,{name:Ee("cf_worker_url",e),render:({field:t})=>c.jsx(Te,{description:w("The requests to Telegram will be sent via this URL."),label:Ie("cf_worker_url"),afterMessage:c.jsx(gg,{link:"https://github.com/manzoorwanijk/telegram-bot-api-worker#how-to-deploy"}),children:c.jsx(Se,{className:"max-w-[700px]",children:c.jsx(gt,{autoComplete:"off",placeholder:"https://my-worker.mysubdomain.workers.dev",type:"url",...t})})})}),ST=({prefix:e})=>c.jsx(xe,{name:Ee("google_script_url",e),render:({field:t})=>c.jsx(Te,{description:w("The requests to Telegram will be sent via this URL."),label:Ie("google_script_url"),afterMessage:c.jsx(gg,{link:"https://gist.github.com/manzoorwanijk/ee9ed032caedf2bb0c83dea73bc9a28e#how-to-deploy"}),children:c.jsx(Se,{className:"max-w-[700px]",children:c.jsx(gt,{autoComplete:"off",placeholder:"https://script.google.com/macros/s/XxXxXxXxXxXxXxX/exec",type:"url",...t})})})}),CT=()=>[{value:"CURLPROXY_HTTP",label:w("HTTP")},{value:"CURLPROXY_SOCKS4",label:w("SOCKS4")},{value:"CURLPROXY_SOCKS4A",label:w("SOCKS4A")},{value:"CURLPROXY_SOCKS5",label:w("SOCKS5")},{value:"CURLPROXY_SOCKS5_HOSTNAME",label:w("SOCKS5_HOSTNAME")}],kT=({prefix:e})=>c.jsxs("div",{className:"flex flex-col gap-8 md:gap-0",children:[c.jsx(xe,{name:Ee("proxy_host",e),render:({field:t})=>c.jsx(Te,{label:Ie("proxy_host"),description:me.sprintf(w("Host IP or domain name like %s."),"192.168.84.101"),children:c.jsx(Se,{className:"max-w-[300px]",children:c.jsx(gt,{autoComplete:"off",placeholder:"192.168.84.101",...t})})})}),c.jsx(xe,{name:Ee("proxy_port",e),render:({field:t})=>c.jsx(Te,{label:Ie("proxy_port"),description:me.sprintf(w("Target Port like %s."),"8080"),children:c.jsx(Se,{className:"max-w-[150px]",children:c.jsx(gt,{autoComplete:"off",placeholder:"8080",type:"number",...t})})})}),c.jsx(xe,{name:Ee("proxy_type",e),render:({field:t})=>c.jsx(Te,{label:Ie("proxy_type"),children:c.jsx(Se,{children:c.jsx(Os,{...t,onValueChange:t.onChange,defaultValue:t.value,options:CT()})})})}),c.jsx(xe,{name:Ee("proxy_username",e),render:({field:t})=>c.jsx(Te,{description:w("Leave empty if not required."),label:Ie("proxy_username"),children:c.jsx(Se,{className:"max-w-[300px]",children:c.jsx(gt,{autoComplete:"off",...t})})})}),c.jsx(xe,{name:Ee("proxy_password",e),render:({field:t})=>c.jsx(Te,{description:w("Leave empty if not required."),label:Ie("proxy_password"),children:c.jsx(Se,{className:"max-w-[300px]",children:c.jsx(gt,{autoComplete:"off",type:"password",...t})})})})]}),jT=({prefix:e})=>{const t=ct({name:`${e}.proxy_method`});return t?c.jsxs(un,{title:w("Proxy settings"),children:[t==="cf_worker"&&c.jsx(_T,{prefix:e}),t==="google_script"&&c.jsx(ST,{prefix:e}),t==="php_proxy"&&c.jsx(kT,{prefix:e})]}):null},ET=()=>[{value:"cf_worker",label:w("Cloudflare worker")},{value:"google_script",label:w("Google Script")},{value:"php_proxy",label:w("PHP Proxy")}],RT=({prefix:e})=>c.jsxs(c.Fragment,{children:[c.jsx(Fl,{prefix:e}),c.jsxs(Vl,{name:`${e}.active`,children:[c.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 auto-cols-max my-6",children:[c.jsx(wT,{}),c.jsx(Qo,{title:w("Proxy"),videoId:"J5H0QuSmo-s",asGridCol:!0})]}),c.jsx(un,{title:w("Proxy Method"),className:"mt-6",children:c.jsx(xe,{name:`${e}.proxy_method`,render:({field:t})=>c.jsx(Te,{label:Ie("proxy_method"),description:w("Cloudflare worker is preferred."),children:c.jsx(Se,{children:c.jsx(Os,{...t,onValueChange:t.onChange,defaultValue:t.value,options:ET()})})})})}),c.jsx(jT,{prefix:e})]})]}),TT="proxy",OT=()=>c.jsx(RT,{prefix:TT}),AT=()=>[{id:"basics",title:w("Basics"),Component:$S,description:w("Set up your bot that you want to use.")},{id:"p2tg",title:w("Post to Telegram"),Component:xT,description:w("With this module, you can configure how the posts are sent to Telegram.")},{id:"notify",title:w("Private Notifications"),Component:cC,description:w("The module will watch the Email Notifications sent from this site and deliver them to you on Telegram.")},{id:"proxy",title:w("Proxy"),Component:OT,description:w("The module will help you bypass the ban on Telegram by making use of proxy.")},{id:"advanced",title:w("Advanced settings"),Component:z0,description:w("Settings in this section should not be changed unless recommended by WP Telegram Support.")}],IT=()=>{const{submitCount:e,errors:t}=Io(),{getActiveTab:n,setActiveTab:r}=u0("wptelegram_settings"),s=f.useCallback(({id:a,title:i})=>{const l=!!e&&a&&a in t;return c.jsxs("span",{className:$("flex flex-row items-center justify-between",{"text-destructive":l,"font-bold":l}),children:[l&&c.jsx(Gd,{})," ",i]})},[t,e]),o=f.useCallback(({title:a,Component:i,description:l})=>c.jsx(d0,{title:l?a:void 0,className:"w-full border-0",description:l,titleClassName:"text-xl",headerClassName:"px-2",contentClassName:"px-2",children:c.jsx(i,{})}),[]);return c.jsx(j0,{defaultValue:n("basics"),items:AT(),onValueChange:r,renderTabTrigger:s,renderTabContent:o})},NT=Iy(iw),PT=uf(cn().savedSettings),MT=()=>{pw();const e=_v({defaultValues:PT,resolver:NT,mode:"onBlur"}),t=xw(e),n=mw();return c.jsx(Sv,{id:`${wr}-form`,onSubmit:e.handleSubmit(t,n),form:e,children:c.jsxs(pb,{sidebar:c.jsx(l0,{}),children:[c.jsx(Cw,{}),c.jsx(_n,{location:"header"}),c.jsx(IT,{}),c.jsx(Kb,{form:`${wr}-form`})]})})},qu=document.getElementById(wr);Cg(wr,{disableCommonCSS:!0});window.__WPSOCIO_UI_ROOT_SELECTOR=`#${wr}`;kg("wptelegram","wptelegram");qu?rv.createRoot(qu).render(c.jsxs(O.StrictMode,{children:[c.jsx(MT,{}),c.jsx(ev,{})]})):console.error(`Root element not found: ${wr}`);
//# sourceMappingURL=settings-B6icb2PJ.js.map