@vezham/hooks 0.2.0-beta-v0xcli → 0.2.0-poc-env-1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +18 -18
- package/index.mjs +897 -935
- package/package.json +9 -9
package/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),fr=require("react-dom"),hr=process.env.NODE_ENV!=="production";process.env.NODE_ENV;process.env.NODE_ENV;const Re="v0xapp",pr=()=>new Date().toISOString(),Be=(e,t,n)=>`[vezham] [${pr()}] [${e}] [${t}] ${n}`,lt=()=>!hr,B={log:(e=Re,t,n)=>{console.log(Be("LOG",e,t),n||"")},debug:(e=Re,t,n)=>{},info:(e=Re,t,n)=>{lt()||console.info(Be("INFO",e,t),n||"")},warn:(e=Re,t,n)=>{lt()||console.warn(Be("WARN",e,t),n||"")},error:(e=Re,t,n)=>{lt()||console.error(Be("ERROR",e,t),n||"")}};var mr=e=>{switch(e){case"success":return br;case"info":return vr;case"warning":return yr;case"error":return Sr;default:return null}},gr=Array(12).fill(0),wr=({visible:e,className:t})=>c.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},c.createElement("div",{className:"sonner-spinner"},gr.map((n,r)=>c.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),br=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.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"})),yr=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},c.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"})),vr=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.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"})),Sr=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.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"})),Er=c.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"},c.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),xr=()=>{let[e,t]=c.useState(document.hidden);return c.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},wt=1,Rr=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:wt++,a=this.toasts.find(i=>i.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(i=>i.id===o?(this.publish({...i,...e,id:o,title:n}),{...i,...e,id:o,dismissible:s,title:n}):i):this.addToast({title:n,...r,dismissible:s,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,a,s=r.then(async d=>{if(a=["resolve",d],c.isValidElement(d))o=!1,this.create({id:n,type:"default",message:d});else if(kr(d)&&!d.ok){o=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,h=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description;this.create({id:n,type:"error",message:u,description:h})}else if(t.success!==void 0){o=!1;let u=typeof t.success=="function"?await t.success(d):t.success,h=typeof t.description=="function"?await t.description(d):t.description;this.create({id:n,type:"success",message:u,description:h})}}).catch(async d=>{if(a=["reject",d],t.error!==void 0){o=!1;let u=typeof t.error=="function"?await t.error(d):t.error,h=typeof t.description=="function"?await t.description(d):t.description;this.create({id:n,type:"error",message:u,description:h})}}).finally(()=>{var d;o&&(this.dismiss(n),n=void 0),(d=t.finally)==null||d.call(t)}),i=()=>new Promise((d,u)=>s.then(()=>a[0]==="reject"?u(a[1]):d(a[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:i}:Object.assign(n,{unwrap:i})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||wt++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},z=new Rr,Tr=(e,t)=>{let n=(t==null?void 0:t.id)||wt++;return z.addToast({title:e,...t,id:n}),n},kr=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Cr=Tr,Or=()=>z.toasts,Ar=()=>z.getActiveToasts(),Lr=Object.assign(Cr,{success:z.success,info:z.info,warning:z.warning,error:z.error,custom:z.custom,message:z.message,promise:z.promise,dismiss:z.dismiss,loading:z.loading},{getHistory:Or,getToasts:Ar});function Nr(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Nr(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));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{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{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{0%{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-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-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, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-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-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],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
2
|
-
`);function Fe(e){return e.label!==void 0}var _r=3,Mr="32px",Pr="16px",zt=4e3,Ir=356,Dr=14,Br=20,Fr=200;function Q(...e){return e.filter(Boolean).join(" ")}function Ur(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var jr=e=>{var t,n,r,o,a,s,i,d,u,h,m;let{invert:p,toast:l,unstyled:w,interacting:g,setHeights:b,visibleToasts:R,heights:E,index:T,toasts:D,expanded:L,removeToast:S,defaultRichColors:M,closeButton:U,style:ee,cancelButtonStyle:tt,actionButtonStyle:Ne,className:ne="",descriptionClassName:_e="",duration:he,position:Me,gap:ie,loadingIcon:re,expandByDefault:Pe,classNames:x,icons:$,closeButtonAriaLabel:nt="Close toast",pauseWhenPageIsHidden:O}=e,[A,_]=c.useState(null),[j,pe]=c.useState(null),[P,rt]=c.useState(!1),[Se,Ie]=c.useState(!1),[Ee,ot]=c.useState(!1),[Mt,Zn]=c.useState(!1),[er,Pt]=c.useState(!1),[tr,st]=c.useState(0),[nr,It]=c.useState(0),xe=c.useRef(l.duration||he||zt),Dt=c.useRef(null),le=c.useRef(null),rr=T===0,or=T+1<=R,J=l.type,me=l.dismissible!==!1,sr=l.className||"",ar=l.descriptionClassName||"",De=c.useMemo(()=>E.findIndex(y=>y.toastId===l.id)||0,[E,l.id]),ir=c.useMemo(()=>{var y;return(y=l.closeButton)!=null?y:U},[l.closeButton,U]),Bt=c.useMemo(()=>l.duration||he||zt,[l.duration,he]),at=c.useRef(0),ge=c.useRef(0),Ft=c.useRef(0),we=c.useRef(null),[lr,cr]=Me.split("-"),Ut=c.useMemo(()=>E.reduce((y,k,N)=>N>=De?y:y+k.height,0),[E,De]),jt=xr(),ur=l.invert||p,it=J==="loading";ge.current=c.useMemo(()=>De*ie+Ut,[De,Ut]),c.useEffect(()=>{xe.current=Bt},[Bt]),c.useEffect(()=>{rt(!0)},[]),c.useEffect(()=>{let y=le.current;if(y){let k=y.getBoundingClientRect().height;return It(k),b(N=>[{toastId:l.id,height:k,position:l.position},...N]),()=>b(N=>N.filter(Y=>Y.toastId!==l.id))}},[b,l.id]),c.useLayoutEffect(()=>{if(!P)return;let y=le.current,k=y.style.height;y.style.height="auto";let N=y.getBoundingClientRect().height;y.style.height=k,It(N),b(Y=>Y.find(X=>X.toastId===l.id)?Y.map(X=>X.toastId===l.id?{...X,height:N}:X):[{toastId:l.id,height:N,position:l.position},...Y])},[P,l.title,l.description,b,l.id]);let oe=c.useCallback(()=>{Ie(!0),st(ge.current),b(y=>y.filter(k=>k.toastId!==l.id)),setTimeout(()=>{S(l)},Fr)},[l,S,b,ge]);c.useEffect(()=>{if(l.promise&&J==="loading"||l.duration===1/0||l.type==="loading")return;let y;return L||g||O&&jt?(()=>{if(Ft.current<at.current){let k=new Date().getTime()-at.current;xe.current=xe.current-k}Ft.current=new Date().getTime()})():xe.current!==1/0&&(at.current=new Date().getTime(),y=setTimeout(()=>{var k;(k=l.onAutoClose)==null||k.call(l,l),oe()},xe.current)),()=>clearTimeout(y)},[L,g,l,J,O,jt,oe]),c.useEffect(()=>{l.delete&&oe()},[oe,l.delete]);function dr(){var y,k,N;return $!=null&&$.loading?c.createElement("div",{className:Q(x==null?void 0:x.loader,(y=l==null?void 0:l.classNames)==null?void 0:y.loader,"sonner-loader"),"data-visible":J==="loading"},$.loading):re?c.createElement("div",{className:Q(x==null?void 0:x.loader,(k=l==null?void 0:l.classNames)==null?void 0:k.loader,"sonner-loader"),"data-visible":J==="loading"},re):c.createElement(wr,{className:Q(x==null?void 0:x.loader,(N=l==null?void 0:l.classNames)==null?void 0:N.loader),visible:J==="loading"})}return c.createElement("li",{tabIndex:0,ref:le,className:Q(ne,sr,x==null?void 0:x.toast,(t=l==null?void 0:l.classNames)==null?void 0:t.toast,x==null?void 0:x.default,x==null?void 0:x[J],(n=l==null?void 0:l.classNames)==null?void 0:n[J]),"data-sonner-toast":"","data-rich-colors":(r=l.richColors)!=null?r:M,"data-styled":!(l.jsx||l.unstyled||w),"data-mounted":P,"data-promise":!!l.promise,"data-swiped":er,"data-removed":Se,"data-visible":or,"data-y-position":lr,"data-x-position":cr,"data-index":T,"data-front":rr,"data-swiping":Ee,"data-dismissible":me,"data-type":J,"data-invert":ur,"data-swipe-out":Mt,"data-swipe-direction":j,"data-expanded":!!(L||Pe&&P),style:{"--index":T,"--toasts-before":T,"--z-index":D.length-T,"--offset":`${Se?tr:ge.current}px`,"--initial-height":Pe?"auto":`${nr}px`,...ee,...l.style},onDragEnd:()=>{ot(!1),_(null),we.current=null},onPointerDown:y=>{it||!me||(Dt.current=new Date,st(ge.current),y.target.setPointerCapture(y.pointerId),y.target.tagName!=="BUTTON"&&(ot(!0),we.current={x:y.clientX,y:y.clientY}))},onPointerUp:()=>{var y,k,N,Y;if(Mt||!me)return;we.current=null;let X=Number(((y=le.current)==null?void 0:y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),se=Number(((k=le.current)==null?void 0:k.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ce=new Date().getTime()-((N=Dt.current)==null?void 0:N.getTime()),G=A==="x"?X:se,ae=Math.abs(G)/ce;if(Math.abs(G)>=Br||ae>.11){st(ge.current),(Y=l.onDismiss)==null||Y.call(l,l),pe(A==="x"?X>0?"right":"left":se>0?"down":"up"),oe(),Zn(!0),Pt(!1);return}ot(!1),_(null)},onPointerMove:y=>{var k,N,Y,X;if(!we.current||!me||((k=window.getSelection())==null?void 0:k.toString().length)>0)return;let se=y.clientY-we.current.y,ce=y.clientX-we.current.x,G=(N=e.swipeDirections)!=null?N:Ur(Me);!A&&(Math.abs(ce)>1||Math.abs(se)>1)&&_(Math.abs(ce)>Math.abs(se)?"x":"y");let ae={x:0,y:0};A==="y"?(G.includes("top")||G.includes("bottom"))&&(G.includes("top")&&se<0||G.includes("bottom")&&se>0)&&(ae.y=se):A==="x"&&(G.includes("left")||G.includes("right"))&&(G.includes("left")&&ce<0||G.includes("right")&&ce>0)&&(ae.x=ce),(Math.abs(ae.x)>0||Math.abs(ae.y)>0)&&Pt(!0),(Y=le.current)==null||Y.style.setProperty("--swipe-amount-x",`${ae.x}px`),(X=le.current)==null||X.style.setProperty("--swipe-amount-y",`${ae.y}px`)}},ir&&!l.jsx?c.createElement("button",{"aria-label":nt,"data-disabled":it,"data-close-button":!0,onClick:it||!me?()=>{}:()=>{var y;oe(),(y=l.onDismiss)==null||y.call(l,l)},className:Q(x==null?void 0:x.closeButton,(o=l==null?void 0:l.classNames)==null?void 0:o.closeButton)},(a=$==null?void 0:$.close)!=null?a:Er):null,l.jsx||c.isValidElement(l.title)?l.jsx?l.jsx:typeof l.title=="function"?l.title():l.title:c.createElement(c.Fragment,null,J||l.icon||l.promise?c.createElement("div",{"data-icon":"",className:Q(x==null?void 0:x.icon,(s=l==null?void 0:l.classNames)==null?void 0:s.icon)},l.promise||l.type==="loading"&&!l.icon?l.icon||dr():null,l.type!=="loading"?l.icon||($==null?void 0:$[J])||mr(J):null):null,c.createElement("div",{"data-content":"",className:Q(x==null?void 0:x.content,(i=l==null?void 0:l.classNames)==null?void 0:i.content)},c.createElement("div",{"data-title":"",className:Q(x==null?void 0:x.title,(d=l==null?void 0:l.classNames)==null?void 0:d.title)},typeof l.title=="function"?l.title():l.title),l.description?c.createElement("div",{"data-description":"",className:Q(_e,ar,x==null?void 0:x.description,(u=l==null?void 0:l.classNames)==null?void 0:u.description)},typeof l.description=="function"?l.description():l.description):null),c.isValidElement(l.cancel)?l.cancel:l.cancel&&Fe(l.cancel)?c.createElement("button",{"data-button":!0,"data-cancel":!0,style:l.cancelButtonStyle||tt,onClick:y=>{var k,N;Fe(l.cancel)&&me&&((N=(k=l.cancel).onClick)==null||N.call(k,y),oe())},className:Q(x==null?void 0:x.cancelButton,(h=l==null?void 0:l.classNames)==null?void 0:h.cancelButton)},l.cancel.label):null,c.isValidElement(l.action)?l.action:l.action&&Fe(l.action)?c.createElement("button",{"data-button":!0,"data-action":!0,style:l.actionButtonStyle||Ne,onClick:y=>{var k,N;Fe(l.action)&&((N=(k=l.action).onClick)==null||N.call(k,y),!y.defaultPrevented&&oe())},className:Q(x==null?void 0:x.actionButton,(m=l==null?void 0:l.classNames)==null?void 0:m.actionButton)},l.action.label):null))};function Ht(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function zr(e,t){let n={};return[e,t].forEach((r,o)=>{let a=o===1,s=a?"--mobile-offset":"--offset",i=a?Pr:Mr;function d(u){["top","right","bottom","left"].forEach(h=>{n[`${s}-${h}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=i:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):d(i)}),n}c.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:s,className:i,offset:d,mobileOffset:u,theme:h="light",richColors:m,duration:p,style:l,visibleToasts:w=_r,toastOptions:g,dir:b=Ht(),gap:R=Dr,loadingIcon:E,icons:T,containerAriaLabel:D="Notifications",pauseWhenPageIsHidden:L}=e,[S,M]=c.useState([]),U=c.useMemo(()=>Array.from(new Set([r].concat(S.filter(O=>O.position).map(O=>O.position)))),[S,r]),[ee,tt]=c.useState([]),[Ne,ne]=c.useState(!1),[_e,he]=c.useState(!1),[Me,ie]=c.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),re=c.useRef(null),Pe=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=c.useRef(null),$=c.useRef(!1),nt=c.useCallback(O=>{M(A=>{var _;return(_=A.find(j=>j.id===O.id))!=null&&_.delete||z.dismiss(O.id),A.filter(({id:j})=>j!==O.id)})},[]);return c.useEffect(()=>z.subscribe(O=>{if(O.dismiss){M(A=>A.map(_=>_.id===O.id?{..._,delete:!0}:_));return}setTimeout(()=>{fr.flushSync(()=>{M(A=>{let _=A.findIndex(j=>j.id===O.id);return _!==-1?[...A.slice(0,_),{...A[_],...O},...A.slice(_+1)]:[O,...A]})})})}),[]),c.useEffect(()=>{if(h!=="system"){ie(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ie("dark"):ie("light")),typeof window>"u")return;let O=window.matchMedia("(prefers-color-scheme: dark)");try{O.addEventListener("change",({matches:A})=>{ie(A?"dark":"light")})}catch{O.addListener(({matches:_})=>{try{ie(_?"dark":"light")}catch(j){console.error(j)}})}},[h]),c.useEffect(()=>{S.length<=1&&ne(!1)},[S]),c.useEffect(()=>{let O=A=>{var _,j;o.every(pe=>A[pe]||A.code===pe)&&(ne(!0),(_=re.current)==null||_.focus()),A.code==="Escape"&&(document.activeElement===re.current||(j=re.current)!=null&&j.contains(document.activeElement))&&ne(!1)};return document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)},[o]),c.useEffect(()=>{if(re.current)return()=>{x.current&&(x.current.focus({preventScroll:!0}),x.current=null,$.current=!1)}},[re.current]),c.createElement("section",{ref:t,"aria-label":`${D} ${Pe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},U.map((O,A)=>{var _;let[j,pe]=O.split("-");return S.length?c.createElement("ol",{key:O,dir:b==="auto"?Ht():b,tabIndex:-1,ref:re,className:i,"data-sonner-toaster":!0,"data-theme":Me,"data-y-position":j,"data-lifted":Ne&&S.length>1&&!a,"data-x-position":pe,style:{"--front-toast-height":`${((_=ee[0])==null?void 0:_.height)||0}px`,"--width":`${Ir}px`,"--gap":`${R}px`,...l,...zr(d,u)},onBlur:P=>{$.current&&!P.currentTarget.contains(P.relatedTarget)&&($.current=!1,x.current&&(x.current.focus({preventScroll:!0}),x.current=null))},onFocus:P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||$.current||($.current=!0,x.current=P.relatedTarget)},onMouseEnter:()=>ne(!0),onMouseMove:()=>ne(!0),onMouseLeave:()=>{_e||ne(!1)},onDragEnd:()=>ne(!1),onPointerDown:P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||he(!0)},onPointerUp:()=>he(!1)},S.filter(P=>!P.position&&A===0||P.position===O).map((P,rt)=>{var Se,Ie;return c.createElement(jr,{key:P.id,icons:T,index:rt,toast:P,defaultRichColors:m,duration:(Se=g==null?void 0:g.duration)!=null?Se:p,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:w,closeButton:(Ie=g==null?void 0:g.closeButton)!=null?Ie:s,interacting:_e,position:O,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,removeToast:nt,toasts:S.filter(Ee=>Ee.position==P.position),heights:ee.filter(Ee=>Ee.position==P.position),setHeights:tt,expandByDefault:a,gap:R,loadingIcon:E,expanded:Ne,pauseWhenPageIsHidden:L,swipeDirections:e.swipeDirections})})):null}))});function wn(){return{toast:async({id:t,title:n,description:r,action:o={label:"",onClick:()=>{}},...a})=>{const s={description:r};o.label&&(s.action={label:o.label,onClick:o.onClick}),Lr(n,s)}}}var Ue=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qr="Expected a function",qt=NaN,$r="[object Symbol]",Wr=/^\s+|\s+$/g,Vr=/^[-+]0x[0-9a-f]+$/i,Jr=/^0b[01]+$/i,Kr=/^0o[0-7]+$/i,Yr=parseInt,Xr=typeof Ue=="object"&&Ue&&Ue.Object===Object&&Ue,Gr=typeof self=="object"&&self&&self.Object===Object&&self,Qr=Xr||Gr||Function("return this")(),Zr=Object.prototype,eo=Zr.toString,to=Math.max,no=Math.min,ct=function(){return Qr.Date.now()};function ro(e,t,n){var r,o,a,s,i,d,u=0,h=!1,m=!1,p=!0;if(typeof e!="function")throw new TypeError(qr);t=$t(t)||0,bt(n)&&(h=!!n.leading,m="maxWait"in n,a=m?to($t(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p);function l(S){var M=r,U=o;return r=o=void 0,u=S,s=e.apply(U,M),s}function w(S){return u=S,i=setTimeout(R,t),h?l(S):s}function g(S){var M=S-d,U=S-u,ee=t-M;return m?no(ee,a-U):ee}function b(S){var M=S-d,U=S-u;return d===void 0||M>=t||M<0||m&&U>=a}function R(){var S=ct();if(b(S))return E(S);i=setTimeout(R,g(S))}function E(S){return i=void 0,p&&r?l(S):(r=o=void 0,s)}function T(){i!==void 0&&clearTimeout(i),u=0,r=d=o=i=void 0}function D(){return i===void 0?s:E(ct())}function L(){var S=ct(),M=b(S);if(r=arguments,o=this,d=S,M){if(i===void 0)return w(d);if(m)return i=setTimeout(R,t),l(d)}return i===void 0&&(i=setTimeout(R,t)),s}return L.cancel=T,L.flush=D,L}function bt(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function oo(e){return!!e&&typeof e=="object"}function so(e){return typeof e=="symbol"||oo(e)&&eo.call(e)==$r}function $t(e){if(typeof e=="number")return e;if(so(e))return qt;if(bt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=bt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Wr,"");var n=Jr.test(e);return n||Kr.test(e)?Yr(e.slice(2),n?2:8):Vr.test(e)?qt:+e}var ao=ro;const Wt=Hr(ao);function bn(e=!1){if(typeof e!="boolean")throw new Error("defaultValue must be `true` or `false`");const[t,n]=c.useState(e),r=c.useCallback(()=>{n(!0)},[]),o=c.useCallback(()=>{n(!1)},[]),a=c.useCallback(()=>{n(s=>!s)},[]);return{value:t,setValue:n,setTrue:r,setFalse:o,toggle:a}}var K=typeof window<"u"?c.useLayoutEffect:c.useEffect;function q(e,t,n,r){const o=c.useRef(t);K(()=>{o.current=t},[t]),c.useEffect(()=>{const a=(n==null?void 0:n.current)??window;if(!(a&&a.addEventListener))return;const s=i=>{o.current(i)};return a.addEventListener(e,s,r),()=>{a.removeEventListener(e,s,r)}},[e,n,r])}function io(e){q("click",t=>{e(t)})}var ut="useCopyToClipboard";function lo(){const[e,t]=c.useState(null),{toast:n}=wn(),r=c.useCallback(async a=>{if(!(navigator!=null&&navigator.clipboard))return B.log(ut,"not supported"),!1;try{return await navigator.clipboard.writeText(a),t(a),!0}catch(s){return B.error(ut,"Copy failed",s),t(null),!1}},[]);return{value:e,copy:r,copyWithToast:async(a="",s="copied to clipboard")=>{const i=await r(a);return i&&(B.debug(ut,s),n({title:s})),i}}}function yn(e){const[t,n]=c.useState(e??0),r=c.useCallback(()=>{n(s=>s+1)},[]),o=c.useCallback(()=>{n(s=>s-1)},[]),a=c.useCallback(()=>{n(e??0)},[e]);return{count:t,increment:r,decrement:o,reset:a,setCount:n}}function vn(e,t){const n=c.useRef(e);K(()=>{n.current=e},[e]),c.useEffect(()=>{if(t===null)return;const r=setInterval(()=>{n.current()},t);return()=>{clearInterval(r)}},[t])}function co({countStart:e,countStop:t=0,intervalMs:n=1e3,isIncrement:r=!1}){const{count:o,increment:a,decrement:s,reset:i}=yn(e),{value:d,setTrue:u,setFalse:h}=bn(!1),m=c.useCallback(()=>{h(),i()},[h,i]),p=c.useCallback(()=>{if(o===t){h();return}r?a():s()},[o,t,s,a,r,h]);return vn(p,d?n:null),[o,{startCountdown:u,stopCountdown:h,resetCountdown:m}]}function Ce(e){const t=c.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return K(()=>{t.current=e},[e]),c.useCallback((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[t])}var Te="useLocalStorage",dt=typeof window>"u";function Ct(e,t,n={}){const{initializeWithValue:r=!0}=n,o=c.useCallback(p=>n.serializer?n.serializer(p):JSON.stringify(p),[n]),a=c.useCallback(p=>{if(n.deserializer)return n.deserializer(p);if(p==="undefined")return;const l=t instanceof Function?t():t;let w;try{w=JSON.parse(p)}catch(g){return B.error(Te,"Error parsing JSON:",g),l}return w},[n,t]),s=c.useCallback(()=>{const p=t instanceof Function?t():t;if(dt)return p;try{const l=window.localStorage.getItem(e);return l?a(l):p}catch(l){return B.error(Te,`Error reading localStorage key “${e}”:`,l),p}},[t,e,a]),[i,d]=c.useState(()=>r?s():t instanceof Function?t():t),u=Ce(p=>{dt&&B.warn(Te,`Tried setting localStorage key “${e}” even though environment is not a client`);try{const l=p instanceof Function?p(s()):p;window.localStorage.setItem(e,o(l)),d(l),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}catch(l){B.warn(Te,`Error setting localStorage key “${e}”:`,l)}}),h=Ce(()=>{dt&&B.warn(Te,`Tried removing localStorage key “${e}” even though environment is not a client`);const p=t instanceof Function?t():t;window.localStorage.removeItem(e),d(p),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))});c.useEffect(()=>{d(s())},[e]);const m=c.useCallback(p=>{p.key&&p.key!==e||d(s())},[e,s]);return q("storage",m),q("local-storage",m),[i,u,h]}var uo=typeof window>"u";function Ot(e,{defaultValue:t=!1,initializeWithValue:n=!0}={}){const r=i=>uo?t:window.matchMedia(i).matches,[o,a]=c.useState(()=>n?r(e):t);function s(){a(r(e))}return K(()=>{const i=window.matchMedia(e);return s(),i.addListener?i.addListener(s):i.addEventListener("change",s),()=>{i.removeListener?i.removeListener(s):i.removeEventListener("change",s)}},[e]),o}var fo="(prefers-color-scheme: dark)",ho="usehooks-ts-dark-mode";function po(e={}){const{defaultValue:t,localStorageKey:n=ho,initializeWithValue:r=!0}=e,o=Ot(fo,{initializeWithValue:r,defaultValue:t}),[a,s]=Ct(n,t??o??!1,{initializeWithValue:r});return K(()=>{o!==a&&s(o)},[o]),{isDarkMode:a,toggle:()=>{s(i=>!i)},enable:()=>{s(!0)},disable:()=>{s(!1)},set:i=>{s(i)}}}function At(e){const t=c.useRef(e);t.current=e,c.useEffect(()=>()=>{t.current()},[])}function Ke(e,t=500,n){const r=c.useRef();At(()=>{r.current&&r.current.cancel()});const o=c.useMemo(()=>{const a=Wt(e,t,n),s=(...i)=>a(...i);return s.cancel=()=>{a.cancel()},s.isPending=()=>!!r.current,s.flush=()=>a.flush(),s},[e,t,n]);return c.useEffect(()=>{r.current=Wt(e,t,n)},[e,t,n]),o}function mo(e,t,n){const r=(n==null?void 0:n.equalityFn)??((u,h)=>u===h),o=e instanceof Function?e():e,[a,s]=c.useState(o),i=c.useRef(o),d=Ke(s,t,n);return r(i.current,o)||(d(o),i.current=o),[a,d]}function go(e,t={}){const{preserveTitleOnUnmount:n=!0}=t,r=c.useRef(null);K(()=>{r.current=window.document.title},[]),K(()=>{window.document.title=e},[e]),At(()=>{!n&&r.current&&(window.document.title=r.current)})}function Sn(){const e=c.useRef(!0);return e.current?(e.current=!1,!0):e.current}function wo(e,t){const n=Sn();c.useEffect(()=>{if(!n)return e()},t)}function bo(e){const[t,n]=c.useState(!1),r=()=>{n(!0)},o=()=>{n(!1)};return q("mouseenter",r,e),q("mouseleave",o,e),t}function yo({threshold:e=0,root:t=null,rootMargin:n="0%",freezeOnceVisible:r=!1,initialIsIntersecting:o=!1,onChange:a}={}){var s;const[i,d]=c.useState(null),[u,h]=c.useState(()=>({isIntersecting:o,entry:void 0})),m=c.useRef();m.current=a;const p=((s=u.entry)==null?void 0:s.isIntersecting)&&r;c.useEffect(()=>{if(!i||!("IntersectionObserver"in window)||p)return;const g=new IntersectionObserver(b=>{const R=Array.isArray(g.thresholds)?g.thresholds:[g.thresholds];b.forEach(E=>{const T=E.isIntersecting&&R.some(D=>E.intersectionRatio>=D);h({isIntersecting:T,entry:E}),m.current&&m.current(T,E)})},{threshold:e,root:t,rootMargin:n});return g.observe(i),()=>{g.disconnect()}},[i,JSON.stringify(e),t,n,p,r]);const l=c.useRef(null);c.useEffect(()=>{var g;!i&&((g=u.entry)!=null&&g.target)&&!r&&!p&&l.current!==u.entry.target&&(l.current=u.entry.target,h({isIntersecting:o,entry:void 0}))},[i,u.entry,r,p,o]);const w=[d,!!u.isIntersecting,u.entry];return w.ref=w[0],w.isIntersecting=w[1],w.entry=w[2],w}function vo(){const[e,t]=c.useState(!1);return c.useEffect(()=>{t(!0)},[]),e}function En(){const e=c.useRef(!1);return c.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),c.useCallback(()=>e.current,[])}function So(e=new Map){const[t,n]=c.useState(new Map(e)),r={set:c.useCallback((o,a)=>{n(s=>{const i=new Map(s);return i.set(o,a),i})},[]),setAll:c.useCallback(o=>{n(()=>new Map(o))},[]),remove:c.useCallback(o=>{n(a=>{const s=new Map(a);return s.delete(o),s})},[]),reset:c.useCallback(()=>{n(()=>new Map)},[])};return[t,r]}function Eo(e,t,n="mousedown",r={}){q(n,o=>{const a=o.target;if(!(a!=null&&a.isConnected))return;(Array.isArray(e)?e.filter(i=>!!i.current).every(i=>i.current&&!i.current.contains(a)):e.current&&!e.current.contains(a))&&t(o)},void 0,r)}var Vt=typeof window>"u";function xo(e,t={}){let{initializeWithValue:n=!0}=t;Vt&&(n=!1);const r=c.useCallback(d=>{if(t.deserializer)return t.deserializer(d);if(d==="undefined")return;let u;try{u=JSON.parse(d)}catch(h){return console.error("Error parsing JSON:",h),null}return u},[t]),o=c.useCallback(()=>{if(Vt)return null;try{const d=window.localStorage.getItem(e);return d?r(d):null}catch(d){return console.warn(`Error reading localStorage key “${e}”:`,d),null}},[e,r]),[a,s]=c.useState(()=>{if(n)return o()});c.useEffect(()=>{s(o())},[e]);const i=c.useCallback(d=>{d.key&&d.key!==e||s(o())},[e,o]);return q("storage",i),q("local-storage",i),a}var Jt={width:void 0,height:void 0};function Ro(e){const{ref:t,box:n="content-box"}=e,[{width:r,height:o},a]=c.useState(Jt),s=En(),i=c.useRef({...Jt}),d=c.useRef(void 0);return d.current=e.onResize,c.useEffect(()=>{if(!t.current||typeof window>"u"||!("ResizeObserver"in window))return;const u=new ResizeObserver(([h])=>{const m=n==="border-box"?"borderBoxSize":n==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",p=Kt(h,m,"inlineSize"),l=Kt(h,m,"blockSize");if(i.current.width!==p||i.current.height!==l){const g={width:p,height:l};i.current.width=p,i.current.height=l,d.current?d.current(g):s()&&a(g)}});return u.observe(t.current,{box:n}),()=>{u.disconnect()}},[n,t,s]),{width:r,height:o}}function Kt(e,t,n){return e[t]?Array.isArray(e[t])?e[t][0][n]:e[t][n]:t==="contentBoxSize"?e.contentRect[n==="inlineSize"?"width":"height"]:void 0}var Yt=typeof window>"u";function To(e={}){let{initializeWithValue:t=!0}=e;Yt&&(t=!1);const n=()=>{if(!Yt)return window.screen},[r,o]=c.useState(()=>{if(t)return n()}),a=Ke(o,e.debounceDelay);function s(){const i=n(),d=e.debounceDelay?a:o;if(i){const{width:u,height:h,availHeight:m,availWidth:p,colorDepth:l,orientation:w,pixelDepth:g}=i;d({width:u,height:h,availHeight:m,availWidth:p,colorDepth:l,orientation:w,pixelDepth:g})}}return q("resize",s),K(()=>{s()},[]),r}var je=new Map;function ko(e){const t=document.querySelector(`script[src="${e}"]`),n=t==null?void 0:t.getAttribute("data-status");return{node:t,status:n}}function Co(e,t){const[n,r]=c.useState(()=>!e||t!=null&&t.shouldPreventLoad?"idle":typeof window>"u"?"loading":je.get(e)??"loading");return c.useEffect(()=>{if(!e||t!=null&&t.shouldPreventLoad)return;const o=je.get(e);if(o==="ready"||o==="error"){r(o);return}const a=ko(e);let s=a.node;if(s)r(a.status??o??"loading");else{s=document.createElement("script"),s.src=e,s.async=!0,t!=null&&t.id&&(s.id=t.id),s.setAttribute("data-status","loading"),document.body.appendChild(s);const d=u=>{const h=u.type==="load"?"ready":"error";s==null||s.setAttribute("data-status",h)};s.addEventListener("load",d),s.addEventListener("error",d)}const i=d=>{const u=d.type==="load"?"ready":"error";r(u),je.set(e,u)};return s.addEventListener("load",i),s.addEventListener("error",i),()=>{s&&(s.removeEventListener("load",i),s.removeEventListener("error",i)),s&&(t!=null&&t.removeOnUnmount)&&(s.remove(),je.delete(e))}},[e,t==null?void 0:t.shouldPreventLoad,t==null?void 0:t.removeOnUnmount,t==null?void 0:t.id]),n}var Oo=typeof window>"u";function Ao(e={}){const{autoLock:t=!0,lockTarget:n,widthReflow:r=!0}=e,[o,a]=c.useState(!1),s=c.useRef(null),i=c.useRef(null),d=()=>{if(s.current){const{overflow:h,paddingRight:m}=s.current.style;if(i.current={overflow:h,paddingRight:m},r){const p=s.current===document.body?window.innerWidth:s.current.offsetWidth,l=parseInt(window.getComputedStyle(s.current).paddingRight,10)||0,w=p-s.current.scrollWidth;s.current.style.paddingRight=`${w+l}px`}s.current.style.overflow="hidden",a(!0)}},u=()=>{s.current&&i.current&&(s.current.style.overflow=i.current.overflow,r&&(s.current.style.paddingRight=i.current.paddingRight)),a(!1)};return K(()=>{if(!Oo)return n&&(s.current=typeof n=="string"?document.querySelector(n):n),s.current||(s.current=document.body),t&&d(),()=>{u()}},[t,n,r]),{isLocked:o,lock:d,unlock:u}}var ft=typeof window>"u";function Lo(e,t,n={}){const{initializeWithValue:r=!0}=n,o=c.useCallback(p=>n.serializer?n.serializer(p):JSON.stringify(p),[n]),a=c.useCallback(p=>{if(n.deserializer)return n.deserializer(p);if(p==="undefined")return;const l=t instanceof Function?t():t;let w;try{w=JSON.parse(p)}catch(g){return console.error("Error parsing JSON:",g),l}return w},[n,t]),s=c.useCallback(()=>{const p=t instanceof Function?t():t;if(ft)return p;try{const l=window.sessionStorage.getItem(e);return l?a(l):p}catch(l){return console.warn(`Error reading sessionStorage key “${e}”:`,l),p}},[t,e,a]),[i,d]=c.useState(()=>r?s():t instanceof Function?t():t),u=Ce(p=>{ft&&console.warn(`Tried setting sessionStorage key “${e}” even though environment is not a client`);try{const l=p instanceof Function?p(s()):p;window.sessionStorage.setItem(e,o(l)),d(l),window.dispatchEvent(new StorageEvent("session-storage",{key:e}))}catch(l){console.warn(`Error setting sessionStorage key “${e}”:`,l)}}),h=Ce(()=>{ft&&console.warn(`Tried removing sessionStorage key “${e}” even though environment is not a client`);const p=t instanceof Function?t():t;window.sessionStorage.removeItem(e),d(p),window.dispatchEvent(new StorageEvent("session-storage",{key:e}))});c.useEffect(()=>{d(s())},[e]);const m=c.useCallback(p=>{p.key&&p.key!==e||d(s())},[e,s]);return q("storage",m),q("session-storage",m),[i,u,h]}function No(e){const[t,n]=c.useState(1),r=t+1<=e,o=t-1>0,a=c.useCallback(u=>{const h=u instanceof Function?u(t):u;if(h>=1&&h<=e){n(h);return}throw new Error("Step not valid")},[e,t]),s=c.useCallback(()=>{r&&n(u=>u+1)},[r]),i=c.useCallback(()=>{o&&n(u=>u-1)},[o]),d=c.useCallback(()=>{n(1)},[]);return[t,{goToNextStep:s,goToPrevStep:i,canGoToNextStep:r,canGoToPrevStep:o,setStep:a,reset:d}]}var _o="(prefers-color-scheme: dark)",Mo="usehooks-ts-ternary-dark-mode";function Po({defaultValue:e="system",localStorageKey:t=Mo,initializeWithValue:n=!0}={}){const r=Ot(_o,{initializeWithValue:n}),[o,a]=Ct(t,e,{initializeWithValue:n});return{isDarkMode:o==="dark"||o==="system"&&r,ternaryDarkMode:o,setTernaryDarkMode:a,toggleTernaryDarkMode:()=>{const d=["light","system","dark"];a(u=>{const h=(d.indexOf(u)+1)%d.length;return d[h]})}}}function Io(e,t){const n=c.useRef(e);K(()=>{n.current=e},[e]),c.useEffect(()=>{if(!t&&t!==0)return;const r=setTimeout(()=>{n.current()},t);return()=>{clearTimeout(r)}},[t])}function Do(e){const[t,n]=c.useState(!!e),r=c.useCallback(()=>{n(o=>!o)},[]);return[t,r,n]}var Bo=typeof window>"u";function Fo(e={}){let{initializeWithValue:t=!0}=e;Bo&&(t=!1);const[n,r]=c.useState(()=>t?{width:window.innerWidth,height:window.innerHeight}:{width:void 0,height:void 0}),o=Ke(r,e.debounceDelay);function a(){(e.debounceDelay?o:r)({width:window.innerWidth,height:window.innerHeight})}return q("resize",a),K(()=>{a()},[]),n}function xn(e,t){return function(){return e.apply(t,arguments)}}const{toString:Uo}=Object.prototype,{getPrototypeOf:Lt}=Object,Ye=(e=>t=>{const n=Uo.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Z=e=>(e=e.toLowerCase(),t=>Ye(t)===e),Xe=e=>t=>typeof t===e,{isArray:ye}=Array,Oe=Xe("undefined");function jo(e){return e!==null&&!Oe(e)&&e.constructor!==null&&!Oe(e.constructor)&&V(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Rn=Z("ArrayBuffer");function zo(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Rn(e.buffer),t}const Ho=Xe("string"),V=Xe("function"),Tn=Xe("number"),Ge=e=>e!==null&&typeof e=="object",qo=e=>e===!0||e===!1,qe=e=>{if(Ye(e)!=="object")return!1;const t=Lt(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},$o=Z("Date"),Wo=Z("File"),Vo=Z("Blob"),Jo=Z("FileList"),Ko=e=>Ge(e)&&V(e.pipe),Yo=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||V(e.append)&&((t=Ye(e))==="formdata"||t==="object"&&V(e.toString)&&e.toString()==="[object FormData]"))},Xo=Z("URLSearchParams"),[Go,Qo,Zo,es]=["ReadableStream","Request","Response","Headers"].map(Z),ts=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ae(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),ye(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let i;for(r=0;r<s;r++)i=a[r],t.call(null,e[i],i,e)}}function kn(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const ue=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cn=e=>!Oe(e)&&e!==ue;function yt(){const{caseless:e}=Cn(this)&&this||{},t={},n=(r,o)=>{const a=e&&kn(t,o)||o;qe(t[a])&&qe(r)?t[a]=yt(t[a],r):qe(r)?t[a]=yt({},r):ye(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Ae(arguments[r],n);return t}const ns=(e,t,n,{allOwnKeys:r}={})=>(Ae(t,(o,a)=>{n&&V(o)?e[a]=xn(o,n):e[a]=o},{allOwnKeys:r}),e),rs=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),os=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ss=(e,t,n,r)=>{let o,a,s;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)s=o[a],(!r||r(s,e,t))&&!i[s]&&(t[s]=e[s],i[s]=!0);e=n!==!1&&Lt(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},as=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},is=e=>{if(!e)return null;if(ye(e))return e;let t=e.length;if(!Tn(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ls=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Lt(Uint8Array)),cs=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},us=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ds=Z("HTMLFormElement"),fs=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Xt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),hs=Z("RegExp"),On=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ae(n,(o,a)=>{let s;(s=t(o,a,e))!==!1&&(r[a]=s||o)}),Object.defineProperties(e,r)},ps=e=>{On(e,(t,n)=>{if(V(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(V(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ms=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return ye(e)?r(e):r(String(e).split(t)),n},gs=()=>{},ws=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function bs(e){return!!(e&&V(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const ys=e=>{const t=new Array(10),n=(r,o)=>{if(Ge(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=ye(r)?[]:{};return Ae(r,(s,i)=>{const d=n(s,o+1);!Oe(d)&&(a[i]=d)}),t[o]=void 0,a}}return r};return n(e,0)},vs=Z("AsyncFunction"),Ss=e=>e&&(Ge(e)||V(e))&&V(e.then)&&V(e.catch),An=((e,t)=>e?setImmediate:t?((n,r)=>(ue.addEventListener("message",({source:o,data:a})=>{o===ue&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),ue.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",V(ue.postMessage)),Es=typeof queueMicrotask<"u"?queueMicrotask.bind(ue):typeof process<"u"&&process.nextTick||An,f={isArray:ye,isArrayBuffer:Rn,isBuffer:jo,isFormData:Yo,isArrayBufferView:zo,isString:Ho,isNumber:Tn,isBoolean:qo,isObject:Ge,isPlainObject:qe,isReadableStream:Go,isRequest:Qo,isResponse:Zo,isHeaders:es,isUndefined:Oe,isDate:$o,isFile:Wo,isBlob:Vo,isRegExp:hs,isFunction:V,isStream:Ko,isURLSearchParams:Xo,isTypedArray:ls,isFileList:Jo,forEach:Ae,merge:yt,extend:ns,trim:ts,stripBOM:rs,inherits:os,toFlatObject:ss,kindOf:Ye,kindOfTest:Z,endsWith:as,toArray:is,forEachEntry:cs,matchAll:us,isHTMLForm:ds,hasOwnProperty:Xt,hasOwnProp:Xt,reduceDescriptors:On,freezeMethods:ps,toObjectSet:ms,toCamelCase:fs,noop:gs,toFiniteNumber:ws,findKey:kn,global:ue,isContextDefined:Cn,isSpecCompliantForm:bs,toJSONObject:ys,isAsyncFn:vs,isThenable:Ss,setImmediate:An,asap:Es};function v(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}f.inherits(v,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:f.toJSONObject(this.config),code:this.code,status:this.status}}});const Ln=v.prototype,Nn={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Nn[e]={value:e}});Object.defineProperties(v,Nn);Object.defineProperty(Ln,"isAxiosError",{value:!0});v.from=(e,t,n,r,o,a)=>{const s=Object.create(Ln);return f.toFlatObject(e,s,function(d){return d!==Error.prototype},i=>i!=="isAxiosError"),v.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,a&&Object.assign(s,a),s};const xs=null;function vt(e){return f.isPlainObject(e)||f.isArray(e)}function _n(e){return f.endsWith(e,"[]")?e.slice(0,-2):e}function Gt(e,t,n){return e?e.concat(t).map(function(o,a){return o=_n(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function Rs(e){return f.isArray(e)&&!e.some(vt)}const Ts=f.toFlatObject(f,{},null,function(t){return/^is[A-Z]/.test(t)});function Qe(e,t,n){if(!f.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=f.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,b){return!f.isUndefined(b[g])});const r=n.metaTokens,o=n.visitor||h,a=n.dots,s=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(t);if(!f.isFunction(o))throw new TypeError("visitor must be a function");function u(w){if(w===null)return"";if(f.isDate(w))return w.toISOString();if(!d&&f.isBlob(w))throw new v("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(w)||f.isTypedArray(w)?d&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function h(w,g,b){let R=w;if(w&&!b&&typeof w=="object"){if(f.endsWith(g,"{}"))g=r?g:g.slice(0,-2),w=JSON.stringify(w);else if(f.isArray(w)&&Rs(w)||(f.isFileList(w)||f.endsWith(g,"[]"))&&(R=f.toArray(w)))return g=_n(g),R.forEach(function(T,D){!(f.isUndefined(T)||T===null)&&t.append(s===!0?Gt([g],D,a):s===null?g:g+"[]",u(T))}),!1}return vt(w)?!0:(t.append(Gt(b,g,a),u(w)),!1)}const m=[],p=Object.assign(Ts,{defaultVisitor:h,convertValue:u,isVisitable:vt});function l(w,g){if(!f.isUndefined(w)){if(m.indexOf(w)!==-1)throw Error("Circular reference detected in "+g.join("."));m.push(w),f.forEach(w,function(R,E){(!(f.isUndefined(R)||R===null)&&o.call(t,R,f.isString(E)?E.trim():E,g,p))===!0&&l(R,g?g.concat(E):[E])}),m.pop()}}if(!f.isObject(e))throw new TypeError("data must be an object");return l(e),t}function Qt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Nt(e,t){this._pairs=[],e&&Qe(e,this,t)}const Mn=Nt.prototype;Mn.append=function(t,n){this._pairs.push([t,n])};Mn.toString=function(t){const n=t?function(r){return t.call(this,r,Qt)}:Qt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function ks(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Pn(e,t,n){if(!t)return e;const r=n&&n.encode||ks;f.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(o?a=o(t,n):a=f.isURLSearchParams(t)?t.toString():new Nt(t,n).toString(r),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Zt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){f.forEach(this.handlers,function(r){r!==null&&t(r)})}}const In={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Cs=typeof URLSearchParams<"u"?URLSearchParams:Nt,Os=typeof FormData<"u"?FormData:null,As=typeof Blob<"u"?Blob:null,Ls={isBrowser:!0,classes:{URLSearchParams:Cs,FormData:Os,Blob:As},protocols:["http","https","file","blob","url","data"]},_t=typeof window<"u"&&typeof document<"u",St=typeof navigator=="object"&&navigator||void 0,Ns=_t&&(!St||["ReactNative","NativeScript","NS"].indexOf(St.product)<0),_s=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ms=_t&&window.location.href||"http://localhost",Ps=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_t,hasStandardBrowserEnv:Ns,hasStandardBrowserWebWorkerEnv:_s,navigator:St,origin:Ms},Symbol.toStringTag,{value:"Module"})),F={...Ps,...Ls};function Is(e,t){return Qe(e,new F.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return F.isNode&&f.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Ds(e){return f.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Bs(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function Dn(e){function t(n,r,o,a){let s=n[a++];if(s==="__proto__")return!0;const i=Number.isFinite(+s),d=a>=n.length;return s=!s&&f.isArray(o)?o.length:s,d?(f.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!i):((!o[s]||!f.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],a)&&f.isArray(o[s])&&(o[s]=Bs(o[s])),!i)}if(f.isFormData(e)&&f.isFunction(e.entries)){const n={};return f.forEachEntry(e,(r,o)=>{t(Ds(r),o,n,0)}),n}return null}function Fs(e,t,n){if(f.isString(e))try{return(t||JSON.parse)(e),f.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Le={transitional:In,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=f.isObject(t);if(a&&f.isHTMLForm(t)&&(t=new FormData(t)),f.isFormData(t))return o?JSON.stringify(Dn(t)):t;if(f.isArrayBuffer(t)||f.isBuffer(t)||f.isStream(t)||f.isFile(t)||f.isBlob(t)||f.isReadableStream(t))return t;if(f.isArrayBufferView(t))return t.buffer;if(f.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Is(t,this.formSerializer).toString();if((i=f.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Qe(i?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),Fs(t)):t}],transformResponse:[function(t){const n=this.transitional||Le.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(f.isResponse(t)||f.isReadableStream(t))return t;if(t&&f.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(s)throw i.name==="SyntaxError"?v.from(i,v.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:F.classes.FormData,Blob:F.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],e=>{Le.headers[e]={}});const Us=f.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),js=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
3
|
-
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&
|
|
4
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[en]=this[en]={accessors:{}}).accessors,o=this.prototype;function a(s){const i=ke(s);r[i]||($s(o,s),r[i]=!0)}return f.isArray(t)?t.forEach(a):a(t),this}};H.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);f.reduceDescriptors(H.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});f.freezeMethods(H);function pt(e,t){const n=this||Le,r=t||n,o=H.from(r.headers);let a=r.data;return f.forEach(e,function(i){a=i.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Bn(e){return!!(e&&e.__CANCEL__)}function ve(e,t,n){v.call(this,e??"canceled",v.ERR_CANCELED,t,n),this.name="CanceledError"}f.inherits(ve,v,{__CANCEL__:!0});function Fn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new v("Request failed with status code "+n.status,[v.ERR_BAD_REQUEST,v.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Ws(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Vs(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,s;return t=t!==void 0?t:1e3,function(d){const u=Date.now(),h=r[a];s||(s=u),n[o]=d,r[o]=u;let m=a,p=0;for(;m!==o;)p+=n[m++],m=m%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),u-s<t)return;const l=h&&u-h;return l?Math.round(p*1e3/l):void 0}}function Js(e,t){let n=0,r=1e3/t,o,a;const s=(u,h=Date.now())=>{n=h,o=null,a&&(clearTimeout(a),a=null),e.apply(null,u)};return[(...u)=>{const h=Date.now(),m=h-n;m>=r?s(u,h):(o=u,a||(a=setTimeout(()=>{a=null,s(o)},r-m)))},()=>o&&s(o)]}const Ve=(e,t,n=3)=>{let r=0;const o=Vs(50,250);return Js(a=>{const s=a.loaded,i=a.lengthComputable?a.total:void 0,d=s-r,u=o(d),h=s<=i;r=s;const m={loaded:s,total:i,progress:i?s/i:void 0,bytes:d,rate:u||void 0,estimated:u&&i&&h?(i-s)/u:void 0,event:a,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(m)},n)},tn=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},nn=e=>(...t)=>f.asap(()=>e(...t)),Ks=F.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,F.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(F.origin),F.navigator&&/(msie|trident)/i.test(F.navigator.userAgent)):()=>!0,Ys=F.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const s=[e+"="+encodeURIComponent(t)];f.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),f.isString(r)&&s.push("path="+r),f.isString(o)&&s.push("domain="+o),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Xs(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Gs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Un(e,t,n){let r=!Xs(t);return e&&r||n==!1?Gs(e,t):t}const rn=e=>e instanceof H?{...e}:e;function fe(e,t){t=t||{};const n={};function r(u,h,m,p){return f.isPlainObject(u)&&f.isPlainObject(h)?f.merge.call({caseless:p},u,h):f.isPlainObject(h)?f.merge({},h):f.isArray(h)?h.slice():h}function o(u,h,m,p){if(f.isUndefined(h)){if(!f.isUndefined(u))return r(void 0,u,m,p)}else return r(u,h,m,p)}function a(u,h){if(!f.isUndefined(h))return r(void 0,h)}function s(u,h){if(f.isUndefined(h)){if(!f.isUndefined(u))return r(void 0,u)}else return r(void 0,h)}function i(u,h,m){if(m in t)return r(u,h);if(m in e)return r(void 0,u)}const d={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:i,headers:(u,h,m)=>o(rn(u),rn(h),m,!0)};return f.forEach(Object.keys(Object.assign({},e,t)),function(h){const m=d[h]||o,p=m(e[h],t[h],h);f.isUndefined(p)&&m!==i||(n[h]=p)}),n}const jn=e=>{const t=fe({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:i}=t;t.headers=s=H.from(s),t.url=Pn(Un(t.baseURL,t.url),e.params,e.paramsSerializer),i&&s.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let d;if(f.isFormData(n)){if(F.hasStandardBrowserEnv||F.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((d=s.getContentType())!==!1){const[u,...h]=d?d.split(";").map(m=>m.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...h].join("; "))}}if(F.hasStandardBrowserEnv&&(r&&f.isFunction(r)&&(r=r(t)),r||r!==!1&&Ks(t.url))){const u=o&&a&&Ys.read(a);u&&s.set(o,u)}return t},Qs=typeof XMLHttpRequest<"u",Zs=Qs&&function(e){return new Promise(function(n,r){const o=jn(e);let a=o.data;const s=H.from(o.headers).normalize();let{responseType:i,onUploadProgress:d,onDownloadProgress:u}=o,h,m,p,l,w;function g(){l&&l(),w&&w(),o.cancelToken&&o.cancelToken.unsubscribe(h),o.signal&&o.signal.removeEventListener("abort",h)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function R(){if(!b)return;const T=H.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),L={data:!i||i==="text"||i==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:T,config:e,request:b};Fn(function(M){n(M),g()},function(M){r(M),g()},L),b=null}"onloadend"in b?b.onloadend=R:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(R)},b.onabort=function(){b&&(r(new v("Request aborted",v.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new v("Network Error",v.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let D=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const L=o.transitional||In;o.timeoutErrorMessage&&(D=o.timeoutErrorMessage),r(new v(D,L.clarifyTimeoutError?v.ETIMEDOUT:v.ECONNABORTED,e,b)),b=null},a===void 0&&s.setContentType(null),"setRequestHeader"in b&&f.forEach(s.toJSON(),function(D,L){b.setRequestHeader(L,D)}),f.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),i&&i!=="json"&&(b.responseType=o.responseType),u&&([p,w]=Ve(u,!0),b.addEventListener("progress",p)),d&&b.upload&&([m,l]=Ve(d),b.upload.addEventListener("progress",m),b.upload.addEventListener("loadend",l)),(o.cancelToken||o.signal)&&(h=T=>{b&&(r(!T||T.type?new ve(null,e,b):T),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(h),o.signal&&(o.signal.aborted?h():o.signal.addEventListener("abort",h)));const E=Ws(o.url);if(E&&F.protocols.indexOf(E)===-1){r(new v("Unsupported protocol "+E+":",v.ERR_BAD_REQUEST,e));return}b.send(a||null)})},ea=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(u){if(!o){o=!0,i();const h=u instanceof Error?u:this.reason;r.abort(h instanceof v?h:new ve(h instanceof Error?h.message:h))}};let s=t&&setTimeout(()=>{s=null,a(new v(`timeout ${t} of ms exceeded`,v.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),e=null)};e.forEach(u=>u.addEventListener("abort",a));const{signal:d}=r;return d.unsubscribe=()=>f.asap(i),d}},ta=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},na=async function*(e,t){for await(const n of ra(e))yield*ta(n,t)},ra=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},on=(e,t,n,r)=>{const o=na(e,t);let a=0,s,i=d=>{s||(s=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:u,value:h}=await o.next();if(u){i(),d.close();return}let m=h.byteLength;if(n){let p=a+=m;n(p)}d.enqueue(new Uint8Array(h))}catch(u){throw i(u),u}},cancel(d){return i(d),o.return()}},{highWaterMark:2})},Ze=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",zn=Ze&&typeof ReadableStream=="function",oa=Ze&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Hn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},sa=zn&&Hn(()=>{let e=!1;const t=new Request(F.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),sn=64*1024,Et=zn&&Hn(()=>f.isReadableStream(new Response("").body)),Je={stream:Et&&(e=>e.body)};Ze&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Je[t]&&(Je[t]=f.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new v(`Response type '${t}' is not supported`,v.ERR_NOT_SUPPORT,r)})})})(new Response);const aa=async e=>{if(e==null)return 0;if(f.isBlob(e))return e.size;if(f.isSpecCompliantForm(e))return(await new Request(F.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(f.isArrayBufferView(e)||f.isArrayBuffer(e))return e.byteLength;if(f.isURLSearchParams(e)&&(e=e+""),f.isString(e))return(await oa(e)).byteLength},ia=async(e,t)=>{const n=f.toFiniteNumber(e.getContentLength());return n??aa(t)},la=Ze&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:s,onDownloadProgress:i,onUploadProgress:d,responseType:u,headers:h,withCredentials:m="same-origin",fetchOptions:p}=jn(e);u=u?(u+"").toLowerCase():"text";let l=ea([o,a&&a.toAbortSignal()],s),w;const g=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let b;try{if(d&&sa&&n!=="get"&&n!=="head"&&(b=await ia(h,r))!==0){let L=new Request(t,{method:"POST",body:r,duplex:"half"}),S;if(f.isFormData(r)&&(S=L.headers.get("content-type"))&&h.setContentType(S),L.body){const[M,U]=tn(b,Ve(nn(d)));r=on(L.body,sn,M,U)}}f.isString(m)||(m=m?"include":"omit");const R="credentials"in Request.prototype;w=new Request(t,{...p,signal:l,method:n.toUpperCase(),headers:h.normalize().toJSON(),body:r,duplex:"half",credentials:R?m:void 0});let E=await fetch(w);const T=Et&&(u==="stream"||u==="response");if(Et&&(i||T&&g)){const L={};["status","statusText","headers"].forEach(ee=>{L[ee]=E[ee]});const S=f.toFiniteNumber(E.headers.get("content-length")),[M,U]=i&&tn(S,Ve(nn(i),!0))||[];E=new Response(on(E.body,sn,M,()=>{U&&U(),g&&g()}),L)}u=u||"text";let D=await Je[f.findKey(Je,u)||"text"](E,e);return!T&&g&&g(),await new Promise((L,S)=>{Fn(L,S,{data:D,headers:H.from(E.headers),status:E.status,statusText:E.statusText,config:e,request:w})})}catch(R){throw g&&g(),R&&R.name==="TypeError"&&/fetch/i.test(R.message)?Object.assign(new v("Network Error",v.ERR_NETWORK,e,w),{cause:R.cause||R}):v.from(R,R&&R.code,e,w)}}),xt={http:xs,xhr:Zs,fetch:la};f.forEach(xt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const an=e=>`- ${e}`,ca=e=>f.isFunction(e)||e===null||e===!1,qn={getAdapter:e=>{e=f.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let s;if(r=n,!ca(n)&&(r=xt[(s=String(n)).toLowerCase()],r===void 0))throw new v(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+a]=r}if(!r){const a=Object.entries(o).map(([i,d])=>`adapter ${i} `+(d===!1?"is not supported by the environment":"is not available in the build"));let s=t?a.length>1?`since :
|
|
5
|
-
`+a.map(
|
|
6
|
-
`):" "+
|
|
7
|
-
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=
|
|
8
|
-
`},I={bold:/(^|\s|[{\[])\*{1,2}(.*?\S *)?\*{1,2}(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,italic:/(^|\s|[{\[])\_(.*?\S *)?\_(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,underline:/(^|\s|[{\[])\_{2}(.*?\S *)?\_{2}(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,strike:/(^|\s|[{\[])\~(.*?\S *)?\~(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,heading:/(?:^|\n)(\#{1,6}) (.*?\S *)(?:\n|$)/gm,blockquote:/(?:^|\n)(?:>|>\s|>\s) (.+?)(?:\n|$)/gm,monospace:/(^|\s)\`(.*?\S *)?\`(?=$|\s)/g,codeblock:/(^|\s)`{3}((?:(?:.*?$)\n)?(?:[\s\S]*?))`{3}(?=$|\s)/g,nextline:/(.*)(\n)(.*)/gm,line:/(^|[\n])(\*{3,}|\-{3,})(?=$|[\n])(.*)/g,link:/(^|\s)\[(.+?)\]\(((?:(?:https?:\/\/(?:www\.)?|www\.)|(?:mailto:)).*?)\)(?:{:(.*)})?/gi,image:/!\[(.*)\]\((.*?)\s*(?:(?:'|"|")(.*)(?:'|"|"))?\s*\)(?:{:(.*)})?/gi,video:/(?:\[\!\[(.*)\]\((.*?)\s*(?:(?:'|"|")(.*)(?:'|"|"))?\s*\)(?:{:(.*)})?]\((.*?)\s*(?:(?:'|"|")(.*)(?:'|"|"))?\s*\))(?:{:(.*)})?/gi,bullet:/(^\s|\n|^)([\*|\-|●|○] )(.*?\S *)*(?:(?:.*?$)\n)?((\s)*([\*|\-|●|○] )(.*?\S *)*(?:(?:.*?$)\n)?)*/gm,numlist:/(^\s|\n|^)(\d)+(\.) (.*?\S *)*(?:(?:.*?$)\n)?((\s)*(\d)+(\.)(.*?\S *)*(?:(?:.*?$)\n)?)*/gm,anchor_tag:/<a(>| .*?>)(.*?)<\/a>/g,href:/href=(?:'|")(.*?)(?:'|") ?/g,gdrive_url:/(?:https:\/\/drive\.google\.com\/file\/d\/(.*?)\/view)/,vtype:/(?:vtype=(?:'|"|")(image|audio|video)(?:'|"|"))/},
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),dr=require("react-dom");var Y=typeof document<"u"?document.currentScript:null;const fr={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};try{console.log("V_APP_NAME: ",process.env.V_APP_NAME)}catch{console.log("isVite:",typeof{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:Y&&Y.tagName.toUpperCase()==="SCRIPT"&&Y.src||new URL("index.js",document.baseURI).href}<"u"&&"env"in{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:Y&&Y.tagName.toUpperCase()==="SCRIPT"&&Y.src||new URL("index.js",document.baseURI).href}),console.log("V_APP_NAME:fb")}try{console.log("NODE_ENV: ",process.env.NODE_ENV)}catch{console.log("NODE_ENV:fb")}try{console.table({url:typeof document>"u"?require("url").pathToFileURL(__filename).href:Y&&Y.tagName.toUpperCase()==="SCRIPT"&&Y.src||new URL("index.js",document.baseURI).href}),console.table(fr)}catch{console.log("import:fb")}try{console.table(process.env)}catch{console.log("process:fb")}let W=process.env||{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:Y&&Y.tagName.toUpperCase()==="SCRIPT"&&Y.src||new URL("index.js",document.baseURI).href};const pr=W.NODE_ENV!=="production";W.NODE_ENV;W.NODE_ENV;W.V_IS_PREVIEW;const hr=W.V_IS_DEBUG==="true";W.V_IS_BETA;const Ce=W.V_APP_NAME||"v0xapp",Ht=W.V_BASE_API_URL||"api",mr=()=>Ht==="local"?W.V_MOCK_LOCAL_API_URL:Ht==="mock"?W.V_MOCK_API_URL:config.domain_type===IAM.DomainType.SANDBOX?W.V_APP_SANDBOX_API_URL:config.domain_type===IAM.DomainType.DC?W.V_APP_DC_API_URL:W.V_APP_API_URL,gr=()=>new Date().toISOString(),_e=(e,t,n)=>`[vezham] [${gr()}] [${e}] [${t}] ${n}`,ut=()=>!pr,B={log:(e=Ce,t,n)=>{console.log(_e("LOG",e,t),n||"")},debug:(e=Ce,t,n)=>{hr&&console.info(_e("DEBUG",e,t),n||"")},info:(e=Ce,t,n)=>{ut()||console.info(_e("INFO",e,t),n||"")},warn:(e=Ce,t,n)=>{ut()||console.warn(_e("WARN",e,t),n||"")},error:(e=Ce,t,n)=>{ut()||console.error(_e("ERROR",e,t),n||"")}};var wr=e=>{switch(e){case"success":return vr;case"info":return Er;case"warning":return Sr;case"error":return xr;default:return null}},br=Array(12).fill(0),yr=({visible:e,className:t})=>c.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},c.createElement("div",{className:"sonner-spinner"},br.map((n,r)=>c.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),vr=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.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"})),Sr=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},c.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"})),Er=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.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"})),xr=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.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"})),Rr=c.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"},c.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Tr=()=>{let[e,t]=c.useState(document.hidden);return c.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},yt=1,Cr=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:yt++,a=this.toasts.find(i=>i.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(i=>i.id===o?(this.publish({...i,...e,id:o,title:n}),{...i,...e,id:o,dismissible:s,title:n}):i):this.addToast({title:n,...r,dismissible:s,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,a,s=r.then(async d=>{if(a=["resolve",d],c.isValidElement(d))o=!1,this.create({id:n,type:"default",message:d});else if(kr(d)&&!d.ok){o=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,p=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description;this.create({id:n,type:"error",message:u,description:p})}else if(t.success!==void 0){o=!1;let u=typeof t.success=="function"?await t.success(d):t.success,p=typeof t.description=="function"?await t.description(d):t.description;this.create({id:n,type:"success",message:u,description:p})}}).catch(async d=>{if(a=["reject",d],t.error!==void 0){o=!1;let u=typeof t.error=="function"?await t.error(d):t.error,p=typeof t.description=="function"?await t.description(d):t.description;this.create({id:n,type:"error",message:u,description:p})}}).finally(()=>{var d;o&&(this.dismiss(n),n=void 0),(d=t.finally)==null||d.call(t)}),i=()=>new Promise((d,u)=>s.then(()=>a[0]==="reject"?u(a[1]):d(a[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:i}:Object.assign(n,{unwrap:i})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||yt++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},z=new Cr,_r=(e,t)=>{let n=(t==null?void 0:t.id)||yt++;return z.addToast({title:e,...t,id:n}),n},kr=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Or=_r,Ar=()=>z.toasts,Lr=()=>z.getActiveToasts(),Nr=Object.assign(Or,{success:z.success,info:z.info,warning:z.warning,error:z.error,custom:z.custom,message:z.message,promise:z.promise,dismiss:z.dismiss,loading:z.loading},{getHistory:Ar,getToasts:Lr});function Mr(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Mr(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));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{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{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{0%{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-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-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, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-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-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],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
2
|
+
`);function je(e){return e.label!==void 0}var Pr=3,Ir="32px",Dr="16px",qt=4e3,Br=356,Ur=14,Fr=20,jr=200;function ee(...e){return e.filter(Boolean).join(" ")}function zr(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var Hr=e=>{var t,n,r,o,a,s,i,d,u,p,m;let{invert:h,toast:l,unstyled:w,interacting:g,setHeights:b,visibleToasts:R,heights:E,index:T,toasts:D,expanded:A,removeToast:S,defaultRichColors:M,closeButton:F,style:ne,cancelButtonStyle:rt,actionButtonStyle:Pe,className:oe="",descriptionClassName:Ie="",duration:me,position:De,gap:ce,loadingIcon:se,expandByDefault:Be,classNames:x,icons:$,closeButtonAriaLabel:ot="Close toast",pauseWhenPageIsHidden:k}=e,[O,N]=c.useState(null),[j,ge]=c.useState(null),[P,st]=c.useState(!1),[xe,Ue]=c.useState(!1),[Re,at]=c.useState(!1),[Pt,Qn]=c.useState(!1),[Zn,It]=c.useState(!1),[er,it]=c.useState(0),[tr,Dt]=c.useState(0),Te=c.useRef(l.duration||me||qt),Bt=c.useRef(null),ue=c.useRef(null),nr=T===0,rr=T+1<=R,K=l.type,we=l.dismissible!==!1,or=l.className||"",sr=l.descriptionClassName||"",Fe=c.useMemo(()=>E.findIndex(y=>y.toastId===l.id)||0,[E,l.id]),ar=c.useMemo(()=>{var y;return(y=l.closeButton)!=null?y:F},[l.closeButton,F]),Ut=c.useMemo(()=>l.duration||me||qt,[l.duration,me]),lt=c.useRef(0),be=c.useRef(0),Ft=c.useRef(0),ye=c.useRef(null),[ir,lr]=De.split("-"),jt=c.useMemo(()=>E.reduce((y,C,L)=>L>=Fe?y:y+C.height,0),[E,Fe]),zt=Tr(),cr=l.invert||h,ct=K==="loading";be.current=c.useMemo(()=>Fe*ce+jt,[Fe,jt]),c.useEffect(()=>{Te.current=Ut},[Ut]),c.useEffect(()=>{st(!0)},[]),c.useEffect(()=>{let y=ue.current;if(y){let C=y.getBoundingClientRect().height;return Dt(C),b(L=>[{toastId:l.id,height:C,position:l.position},...L]),()=>b(L=>L.filter(X=>X.toastId!==l.id))}},[b,l.id]),c.useLayoutEffect(()=>{if(!P)return;let y=ue.current,C=y.style.height;y.style.height="auto";let L=y.getBoundingClientRect().height;y.style.height=C,Dt(L),b(X=>X.find(Q=>Q.toastId===l.id)?X.map(Q=>Q.toastId===l.id?{...Q,height:L}:Q):[{toastId:l.id,height:L,position:l.position},...X])},[P,l.title,l.description,b,l.id]);let ae=c.useCallback(()=>{Ue(!0),it(be.current),b(y=>y.filter(C=>C.toastId!==l.id)),setTimeout(()=>{S(l)},jr)},[l,S,b,be]);c.useEffect(()=>{if(l.promise&&K==="loading"||l.duration===1/0||l.type==="loading")return;let y;return A||g||k&&zt?(()=>{if(Ft.current<lt.current){let C=new Date().getTime()-lt.current;Te.current=Te.current-C}Ft.current=new Date().getTime()})():Te.current!==1/0&&(lt.current=new Date().getTime(),y=setTimeout(()=>{var C;(C=l.onAutoClose)==null||C.call(l,l),ae()},Te.current)),()=>clearTimeout(y)},[A,g,l,K,k,zt,ae]),c.useEffect(()=>{l.delete&&ae()},[ae,l.delete]);function ur(){var y,C,L;return $!=null&&$.loading?c.createElement("div",{className:ee(x==null?void 0:x.loader,(y=l==null?void 0:l.classNames)==null?void 0:y.loader,"sonner-loader"),"data-visible":K==="loading"},$.loading):se?c.createElement("div",{className:ee(x==null?void 0:x.loader,(C=l==null?void 0:l.classNames)==null?void 0:C.loader,"sonner-loader"),"data-visible":K==="loading"},se):c.createElement(yr,{className:ee(x==null?void 0:x.loader,(L=l==null?void 0:l.classNames)==null?void 0:L.loader),visible:K==="loading"})}return c.createElement("li",{tabIndex:0,ref:ue,className:ee(oe,or,x==null?void 0:x.toast,(t=l==null?void 0:l.classNames)==null?void 0:t.toast,x==null?void 0:x.default,x==null?void 0:x[K],(n=l==null?void 0:l.classNames)==null?void 0:n[K]),"data-sonner-toast":"","data-rich-colors":(r=l.richColors)!=null?r:M,"data-styled":!(l.jsx||l.unstyled||w),"data-mounted":P,"data-promise":!!l.promise,"data-swiped":Zn,"data-removed":xe,"data-visible":rr,"data-y-position":ir,"data-x-position":lr,"data-index":T,"data-front":nr,"data-swiping":Re,"data-dismissible":we,"data-type":K,"data-invert":cr,"data-swipe-out":Pt,"data-swipe-direction":j,"data-expanded":!!(A||Be&&P),style:{"--index":T,"--toasts-before":T,"--z-index":D.length-T,"--offset":`${xe?er:be.current}px`,"--initial-height":Be?"auto":`${tr}px`,...ne,...l.style},onDragEnd:()=>{at(!1),N(null),ye.current=null},onPointerDown:y=>{ct||!we||(Bt.current=new Date,it(be.current),y.target.setPointerCapture(y.pointerId),y.target.tagName!=="BUTTON"&&(at(!0),ye.current={x:y.clientX,y:y.clientY}))},onPointerUp:()=>{var y,C,L,X;if(Pt||!we)return;ye.current=null;let Q=Number(((y=ue.current)==null?void 0:y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ie=Number(((C=ue.current)==null?void 0:C.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),de=new Date().getTime()-((L=Bt.current)==null?void 0:L.getTime()),Z=O==="x"?Q:ie,le=Math.abs(Z)/de;if(Math.abs(Z)>=Fr||le>.11){it(be.current),(X=l.onDismiss)==null||X.call(l,l),ge(O==="x"?Q>0?"right":"left":ie>0?"down":"up"),ae(),Qn(!0),It(!1);return}at(!1),N(null)},onPointerMove:y=>{var C,L,X,Q;if(!ye.current||!we||((C=window.getSelection())==null?void 0:C.toString().length)>0)return;let ie=y.clientY-ye.current.y,de=y.clientX-ye.current.x,Z=(L=e.swipeDirections)!=null?L:zr(De);!O&&(Math.abs(de)>1||Math.abs(ie)>1)&&N(Math.abs(de)>Math.abs(ie)?"x":"y");let le={x:0,y:0};O==="y"?(Z.includes("top")||Z.includes("bottom"))&&(Z.includes("top")&&ie<0||Z.includes("bottom")&&ie>0)&&(le.y=ie):O==="x"&&(Z.includes("left")||Z.includes("right"))&&(Z.includes("left")&&de<0||Z.includes("right")&&de>0)&&(le.x=de),(Math.abs(le.x)>0||Math.abs(le.y)>0)&&It(!0),(X=ue.current)==null||X.style.setProperty("--swipe-amount-x",`${le.x}px`),(Q=ue.current)==null||Q.style.setProperty("--swipe-amount-y",`${le.y}px`)}},ar&&!l.jsx?c.createElement("button",{"aria-label":ot,"data-disabled":ct,"data-close-button":!0,onClick:ct||!we?()=>{}:()=>{var y;ae(),(y=l.onDismiss)==null||y.call(l,l)},className:ee(x==null?void 0:x.closeButton,(o=l==null?void 0:l.classNames)==null?void 0:o.closeButton)},(a=$==null?void 0:$.close)!=null?a:Rr):null,l.jsx||c.isValidElement(l.title)?l.jsx?l.jsx:typeof l.title=="function"?l.title():l.title:c.createElement(c.Fragment,null,K||l.icon||l.promise?c.createElement("div",{"data-icon":"",className:ee(x==null?void 0:x.icon,(s=l==null?void 0:l.classNames)==null?void 0:s.icon)},l.promise||l.type==="loading"&&!l.icon?l.icon||ur():null,l.type!=="loading"?l.icon||($==null?void 0:$[K])||wr(K):null):null,c.createElement("div",{"data-content":"",className:ee(x==null?void 0:x.content,(i=l==null?void 0:l.classNames)==null?void 0:i.content)},c.createElement("div",{"data-title":"",className:ee(x==null?void 0:x.title,(d=l==null?void 0:l.classNames)==null?void 0:d.title)},typeof l.title=="function"?l.title():l.title),l.description?c.createElement("div",{"data-description":"",className:ee(Ie,sr,x==null?void 0:x.description,(u=l==null?void 0:l.classNames)==null?void 0:u.description)},typeof l.description=="function"?l.description():l.description):null),c.isValidElement(l.cancel)?l.cancel:l.cancel&&je(l.cancel)?c.createElement("button",{"data-button":!0,"data-cancel":!0,style:l.cancelButtonStyle||rt,onClick:y=>{var C,L;je(l.cancel)&&we&&((L=(C=l.cancel).onClick)==null||L.call(C,y),ae())},className:ee(x==null?void 0:x.cancelButton,(p=l==null?void 0:l.classNames)==null?void 0:p.cancelButton)},l.cancel.label):null,c.isValidElement(l.action)?l.action:l.action&&je(l.action)?c.createElement("button",{"data-button":!0,"data-action":!0,style:l.actionButtonStyle||Pe,onClick:y=>{var C,L;je(l.action)&&((L=(C=l.action).onClick)==null||L.call(C,y),!y.defaultPrevented&&ae())},className:ee(x==null?void 0:x.actionButton,(m=l==null?void 0:l.classNames)==null?void 0:m.actionButton)},l.action.label):null))};function $t(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function qr(e,t){let n={};return[e,t].forEach((r,o)=>{let a=o===1,s=a?"--mobile-offset":"--offset",i=a?Dr:Ir;function d(u){["top","right","bottom","left"].forEach(p=>{n[`${s}-${p}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=i:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):d(i)}),n}c.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:s,className:i,offset:d,mobileOffset:u,theme:p="light",richColors:m,duration:h,style:l,visibleToasts:w=Pr,toastOptions:g,dir:b=$t(),gap:R=Ur,loadingIcon:E,icons:T,containerAriaLabel:D="Notifications",pauseWhenPageIsHidden:A}=e,[S,M]=c.useState([]),F=c.useMemo(()=>Array.from(new Set([r].concat(S.filter(k=>k.position).map(k=>k.position)))),[S,r]),[ne,rt]=c.useState([]),[Pe,oe]=c.useState(!1),[Ie,me]=c.useState(!1),[De,ce]=c.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),se=c.useRef(null),Be=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=c.useRef(null),$=c.useRef(!1),ot=c.useCallback(k=>{M(O=>{var N;return(N=O.find(j=>j.id===k.id))!=null&&N.delete||z.dismiss(k.id),O.filter(({id:j})=>j!==k.id)})},[]);return c.useEffect(()=>z.subscribe(k=>{if(k.dismiss){M(O=>O.map(N=>N.id===k.id?{...N,delete:!0}:N));return}setTimeout(()=>{dr.flushSync(()=>{M(O=>{let N=O.findIndex(j=>j.id===k.id);return N!==-1?[...O.slice(0,N),{...O[N],...k},...O.slice(N+1)]:[k,...O]})})})}),[]),c.useEffect(()=>{if(p!=="system"){ce(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ce("dark"):ce("light")),typeof window>"u")return;let k=window.matchMedia("(prefers-color-scheme: dark)");try{k.addEventListener("change",({matches:O})=>{ce(O?"dark":"light")})}catch{k.addListener(({matches:N})=>{try{ce(N?"dark":"light")}catch(j){console.error(j)}})}},[p]),c.useEffect(()=>{S.length<=1&&oe(!1)},[S]),c.useEffect(()=>{let k=O=>{var N,j;o.every(ge=>O[ge]||O.code===ge)&&(oe(!0),(N=se.current)==null||N.focus()),O.code==="Escape"&&(document.activeElement===se.current||(j=se.current)!=null&&j.contains(document.activeElement))&&oe(!1)};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[o]),c.useEffect(()=>{if(se.current)return()=>{x.current&&(x.current.focus({preventScroll:!0}),x.current=null,$.current=!1)}},[se.current]),c.createElement("section",{ref:t,"aria-label":`${D} ${Be}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},F.map((k,O)=>{var N;let[j,ge]=k.split("-");return S.length?c.createElement("ol",{key:k,dir:b==="auto"?$t():b,tabIndex:-1,ref:se,className:i,"data-sonner-toaster":!0,"data-theme":De,"data-y-position":j,"data-lifted":Pe&&S.length>1&&!a,"data-x-position":ge,style:{"--front-toast-height":`${((N=ne[0])==null?void 0:N.height)||0}px`,"--width":`${Br}px`,"--gap":`${R}px`,...l,...qr(d,u)},onBlur:P=>{$.current&&!P.currentTarget.contains(P.relatedTarget)&&($.current=!1,x.current&&(x.current.focus({preventScroll:!0}),x.current=null))},onFocus:P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||$.current||($.current=!0,x.current=P.relatedTarget)},onMouseEnter:()=>oe(!0),onMouseMove:()=>oe(!0),onMouseLeave:()=>{Ie||oe(!1)},onDragEnd:()=>oe(!1),onPointerDown:P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||me(!0)},onPointerUp:()=>me(!1)},S.filter(P=>!P.position&&O===0||P.position===k).map((P,st)=>{var xe,Ue;return c.createElement(Hr,{key:P.id,icons:T,index:st,toast:P,defaultRichColors:m,duration:(xe=g==null?void 0:g.duration)!=null?xe:h,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:w,closeButton:(Ue=g==null?void 0:g.closeButton)!=null?Ue:s,interacting:Ie,position:k,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,removeToast:ot,toasts:S.filter(Re=>Re.position==P.position),heights:ne.filter(Re=>Re.position==P.position),setHeights:rt,expandByDefault:a,gap:R,loadingIcon:E,expanded:Pe,pauseWhenPageIsHidden:A,swipeDirections:e.swipeDirections})})):null}))});function wn(){return{toast:async({id:t,title:n,description:r,action:o={label:"",onClick:()=>{}},...a})=>{const s={description:r};o.label&&(s.action={label:o.label,onClick:o.onClick}),Nr(n,s)}}}var ze=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vr="Expected a function",Vt=NaN,Wr="[object Symbol]",Jr=/^\s+|\s+$/g,Kr=/^[-+]0x[0-9a-f]+$/i,Yr=/^0b[01]+$/i,Gr=/^0o[0-7]+$/i,Xr=parseInt,Qr=typeof ze=="object"&&ze&&ze.Object===Object&&ze,Zr=typeof self=="object"&&self&&self.Object===Object&&self,eo=Qr||Zr||Function("return this")(),to=Object.prototype,no=to.toString,ro=Math.max,oo=Math.min,dt=function(){return eo.Date.now()};function so(e,t,n){var r,o,a,s,i,d,u=0,p=!1,m=!1,h=!0;if(typeof e!="function")throw new TypeError(Vr);t=Wt(t)||0,vt(n)&&(p=!!n.leading,m="maxWait"in n,a=m?ro(Wt(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h);function l(S){var M=r,F=o;return r=o=void 0,u=S,s=e.apply(F,M),s}function w(S){return u=S,i=setTimeout(R,t),p?l(S):s}function g(S){var M=S-d,F=S-u,ne=t-M;return m?oo(ne,a-F):ne}function b(S){var M=S-d,F=S-u;return d===void 0||M>=t||M<0||m&&F>=a}function R(){var S=dt();if(b(S))return E(S);i=setTimeout(R,g(S))}function E(S){return i=void 0,h&&r?l(S):(r=o=void 0,s)}function T(){i!==void 0&&clearTimeout(i),u=0,r=d=o=i=void 0}function D(){return i===void 0?s:E(dt())}function A(){var S=dt(),M=b(S);if(r=arguments,o=this,d=S,M){if(i===void 0)return w(d);if(m)return i=setTimeout(R,t),l(d)}return i===void 0&&(i=setTimeout(R,t)),s}return A.cancel=T,A.flush=D,A}function vt(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function ao(e){return!!e&&typeof e=="object"}function io(e){return typeof e=="symbol"||ao(e)&&no.call(e)==Wr}function Wt(e){if(typeof e=="number")return e;if(io(e))return Vt;if(vt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=vt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Jr,"");var n=Yr.test(e);return n||Gr.test(e)?Xr(e.slice(2),n?2:8):Kr.test(e)?Vt:+e}var lo=so;const Jt=$r(lo);function bn(e=!1){if(typeof e!="boolean")throw new Error("defaultValue must be `true` or `false`");const[t,n]=c.useState(e),r=c.useCallback(()=>{n(!0)},[]),o=c.useCallback(()=>{n(!1)},[]),a=c.useCallback(()=>{n(s=>!s)},[]);return{value:t,setValue:n,setTrue:r,setFalse:o,toggle:a}}var G=typeof window<"u"?c.useLayoutEffect:c.useEffect;function q(e,t,n,r){const o=c.useRef(t);G(()=>{o.current=t},[t]),c.useEffect(()=>{const a=(n==null?void 0:n.current)??window;if(!(a&&a.addEventListener))return;const s=i=>{o.current(i)};return a.addEventListener(e,s,r),()=>{a.removeEventListener(e,s,r)}},[e,n,r])}function co(e){q("click",t=>{e(t)})}var ft="useCopyToClipboard";function uo(){const[e,t]=c.useState(null),{toast:n}=wn(),r=c.useCallback(async a=>{if(!(navigator!=null&&navigator.clipboard))return B.log(ft,"not supported"),!1;try{return await navigator.clipboard.writeText(a),t(a),!0}catch(s){return B.error(ft,"Copy failed",s),t(null),!1}},[]);return{value:e,copy:r,copyWithToast:async(a="",s="copied to clipboard")=>{const i=await r(a);return i&&(B.debug(ft,s),n({title:s})),i}}}function yn(e){const[t,n]=c.useState(e??0),r=c.useCallback(()=>{n(s=>s+1)},[]),o=c.useCallback(()=>{n(s=>s-1)},[]),a=c.useCallback(()=>{n(e??0)},[e]);return{count:t,increment:r,decrement:o,reset:a,setCount:n}}function vn(e,t){const n=c.useRef(e);G(()=>{n.current=e},[e]),c.useEffect(()=>{if(t===null)return;const r=setInterval(()=>{n.current()},t);return()=>{clearInterval(r)}},[t])}function fo({countStart:e,countStop:t=0,intervalMs:n=1e3,isIncrement:r=!1}){const{count:o,increment:a,decrement:s,reset:i}=yn(e),{value:d,setTrue:u,setFalse:p}=bn(!1),m=c.useCallback(()=>{p(),i()},[p,i]),h=c.useCallback(()=>{if(o===t){p();return}r?a():s()},[o,t,s,a,r,p]);return vn(h,d?n:null),[o,{startCountdown:u,stopCountdown:p,resetCountdown:m}]}function Ae(e){const t=c.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return G(()=>{t.current=e},[e]),c.useCallback((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[t])}var ke="useLocalStorage",pt=typeof window>"u";function kt(e,t,n={}){const{initializeWithValue:r=!0}=n,o=c.useCallback(h=>n.serializer?n.serializer(h):JSON.stringify(h),[n]),a=c.useCallback(h=>{if(n.deserializer)return n.deserializer(h);if(h==="undefined")return;const l=t instanceof Function?t():t;let w;try{w=JSON.parse(h)}catch(g){return B.error(ke,"Error parsing JSON:",g),l}return w},[n,t]),s=c.useCallback(()=>{const h=t instanceof Function?t():t;if(pt)return h;try{const l=window.localStorage.getItem(e);return l?a(l):h}catch(l){return B.error(ke,`Error reading localStorage key “${e}”:`,l),h}},[t,e,a]),[i,d]=c.useState(()=>r?s():t instanceof Function?t():t),u=Ae(h=>{pt&&B.warn(ke,`Tried setting localStorage key “${e}” even though environment is not a client`);try{const l=h instanceof Function?h(s()):h;window.localStorage.setItem(e,o(l)),d(l),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}catch(l){B.warn(ke,`Error setting localStorage key “${e}”:`,l)}}),p=Ae(()=>{pt&&B.warn(ke,`Tried removing localStorage key “${e}” even though environment is not a client`);const h=t instanceof Function?t():t;window.localStorage.removeItem(e),d(h),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))});c.useEffect(()=>{d(s())},[e]);const m=c.useCallback(h=>{h.key&&h.key!==e||d(s())},[e,s]);return q("storage",m),q("local-storage",m),[i,u,p]}var po=typeof window>"u";function Ot(e,{defaultValue:t=!1,initializeWithValue:n=!0}={}){const r=i=>po?t:window.matchMedia(i).matches,[o,a]=c.useState(()=>n?r(e):t);function s(){a(r(e))}return G(()=>{const i=window.matchMedia(e);return s(),i.addListener?i.addListener(s):i.addEventListener("change",s),()=>{i.removeListener?i.removeListener(s):i.removeEventListener("change",s)}},[e]),o}var ho="(prefers-color-scheme: dark)",mo="usehooks-ts-dark-mode";function go(e={}){const{defaultValue:t,localStorageKey:n=mo,initializeWithValue:r=!0}=e,o=Ot(ho,{initializeWithValue:r,defaultValue:t}),[a,s]=kt(n,t??o??!1,{initializeWithValue:r});return G(()=>{o!==a&&s(o)},[o]),{isDarkMode:a,toggle:()=>{s(i=>!i)},enable:()=>{s(!0)},disable:()=>{s(!1)},set:i=>{s(i)}}}function At(e){const t=c.useRef(e);t.current=e,c.useEffect(()=>()=>{t.current()},[])}function Ge(e,t=500,n){const r=c.useRef();At(()=>{r.current&&r.current.cancel()});const o=c.useMemo(()=>{const a=Jt(e,t,n),s=(...i)=>a(...i);return s.cancel=()=>{a.cancel()},s.isPending=()=>!!r.current,s.flush=()=>a.flush(),s},[e,t,n]);return c.useEffect(()=>{r.current=Jt(e,t,n)},[e,t,n]),o}function wo(e,t,n){const r=(n==null?void 0:n.equalityFn)??((u,p)=>u===p),o=e instanceof Function?e():e,[a,s]=c.useState(o),i=c.useRef(o),d=Ge(s,t,n);return r(i.current,o)||(d(o),i.current=o),[a,d]}function bo(e,t={}){const{preserveTitleOnUnmount:n=!0}=t,r=c.useRef(null);G(()=>{r.current=window.document.title},[]),G(()=>{window.document.title=e},[e]),At(()=>{!n&&r.current&&(window.document.title=r.current)})}function Sn(){const e=c.useRef(!0);return e.current?(e.current=!1,!0):e.current}function yo(e,t){const n=Sn();c.useEffect(()=>{if(!n)return e()},t)}function vo(e){const[t,n]=c.useState(!1),r=()=>{n(!0)},o=()=>{n(!1)};return q("mouseenter",r,e),q("mouseleave",o,e),t}function So({threshold:e=0,root:t=null,rootMargin:n="0%",freezeOnceVisible:r=!1,initialIsIntersecting:o=!1,onChange:a}={}){var s;const[i,d]=c.useState(null),[u,p]=c.useState(()=>({isIntersecting:o,entry:void 0})),m=c.useRef();m.current=a;const h=((s=u.entry)==null?void 0:s.isIntersecting)&&r;c.useEffect(()=>{if(!i||!("IntersectionObserver"in window)||h)return;const g=new IntersectionObserver(b=>{const R=Array.isArray(g.thresholds)?g.thresholds:[g.thresholds];b.forEach(E=>{const T=E.isIntersecting&&R.some(D=>E.intersectionRatio>=D);p({isIntersecting:T,entry:E}),m.current&&m.current(T,E)})},{threshold:e,root:t,rootMargin:n});return g.observe(i),()=>{g.disconnect()}},[i,JSON.stringify(e),t,n,h,r]);const l=c.useRef(null);c.useEffect(()=>{var g;!i&&((g=u.entry)!=null&&g.target)&&!r&&!h&&l.current!==u.entry.target&&(l.current=u.entry.target,p({isIntersecting:o,entry:void 0}))},[i,u.entry,r,h,o]);const w=[d,!!u.isIntersecting,u.entry];return w.ref=w[0],w.isIntersecting=w[1],w.entry=w[2],w}function Eo(){const[e,t]=c.useState(!1);return c.useEffect(()=>{t(!0)},[]),e}function En(){const e=c.useRef(!1);return c.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),c.useCallback(()=>e.current,[])}function xo(e=new Map){const[t,n]=c.useState(new Map(e)),r={set:c.useCallback((o,a)=>{n(s=>{const i=new Map(s);return i.set(o,a),i})},[]),setAll:c.useCallback(o=>{n(()=>new Map(o))},[]),remove:c.useCallback(o=>{n(a=>{const s=new Map(a);return s.delete(o),s})},[]),reset:c.useCallback(()=>{n(()=>new Map)},[])};return[t,r]}function Ro(e,t,n="mousedown",r={}){q(n,o=>{const a=o.target;if(!(a!=null&&a.isConnected))return;(Array.isArray(e)?e.filter(i=>!!i.current).every(i=>i.current&&!i.current.contains(a)):e.current&&!e.current.contains(a))&&t(o)},void 0,r)}var Kt=typeof window>"u";function To(e,t={}){let{initializeWithValue:n=!0}=t;Kt&&(n=!1);const r=c.useCallback(d=>{if(t.deserializer)return t.deserializer(d);if(d==="undefined")return;let u;try{u=JSON.parse(d)}catch(p){return console.error("Error parsing JSON:",p),null}return u},[t]),o=c.useCallback(()=>{if(Kt)return null;try{const d=window.localStorage.getItem(e);return d?r(d):null}catch(d){return console.warn(`Error reading localStorage key “${e}”:`,d),null}},[e,r]),[a,s]=c.useState(()=>{if(n)return o()});c.useEffect(()=>{s(o())},[e]);const i=c.useCallback(d=>{d.key&&d.key!==e||s(o())},[e,o]);return q("storage",i),q("local-storage",i),a}var Yt={width:void 0,height:void 0};function Co(e){const{ref:t,box:n="content-box"}=e,[{width:r,height:o},a]=c.useState(Yt),s=En(),i=c.useRef({...Yt}),d=c.useRef(void 0);return d.current=e.onResize,c.useEffect(()=>{if(!t.current||typeof window>"u"||!("ResizeObserver"in window))return;const u=new ResizeObserver(([p])=>{const m=n==="border-box"?"borderBoxSize":n==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",h=Gt(p,m,"inlineSize"),l=Gt(p,m,"blockSize");if(i.current.width!==h||i.current.height!==l){const g={width:h,height:l};i.current.width=h,i.current.height=l,d.current?d.current(g):s()&&a(g)}});return u.observe(t.current,{box:n}),()=>{u.disconnect()}},[n,t,s]),{width:r,height:o}}function Gt(e,t,n){return e[t]?Array.isArray(e[t])?e[t][0][n]:e[t][n]:t==="contentBoxSize"?e.contentRect[n==="inlineSize"?"width":"height"]:void 0}var Xt=typeof window>"u";function _o(e={}){let{initializeWithValue:t=!0}=e;Xt&&(t=!1);const n=()=>{if(!Xt)return window.screen},[r,o]=c.useState(()=>{if(t)return n()}),a=Ge(o,e.debounceDelay);function s(){const i=n(),d=e.debounceDelay?a:o;if(i){const{width:u,height:p,availHeight:m,availWidth:h,colorDepth:l,orientation:w,pixelDepth:g}=i;d({width:u,height:p,availHeight:m,availWidth:h,colorDepth:l,orientation:w,pixelDepth:g})}}return q("resize",s),G(()=>{s()},[]),r}var He=new Map;function ko(e){const t=document.querySelector(`script[src="${e}"]`),n=t==null?void 0:t.getAttribute("data-status");return{node:t,status:n}}function Oo(e,t){const[n,r]=c.useState(()=>!e||t!=null&&t.shouldPreventLoad?"idle":typeof window>"u"?"loading":He.get(e)??"loading");return c.useEffect(()=>{if(!e||t!=null&&t.shouldPreventLoad)return;const o=He.get(e);if(o==="ready"||o==="error"){r(o);return}const a=ko(e);let s=a.node;if(s)r(a.status??o??"loading");else{s=document.createElement("script"),s.src=e,s.async=!0,t!=null&&t.id&&(s.id=t.id),s.setAttribute("data-status","loading"),document.body.appendChild(s);const d=u=>{const p=u.type==="load"?"ready":"error";s==null||s.setAttribute("data-status",p)};s.addEventListener("load",d),s.addEventListener("error",d)}const i=d=>{const u=d.type==="load"?"ready":"error";r(u),He.set(e,u)};return s.addEventListener("load",i),s.addEventListener("error",i),()=>{s&&(s.removeEventListener("load",i),s.removeEventListener("error",i)),s&&(t!=null&&t.removeOnUnmount)&&(s.remove(),He.delete(e))}},[e,t==null?void 0:t.shouldPreventLoad,t==null?void 0:t.removeOnUnmount,t==null?void 0:t.id]),n}var Ao=typeof window>"u";function Lo(e={}){const{autoLock:t=!0,lockTarget:n,widthReflow:r=!0}=e,[o,a]=c.useState(!1),s=c.useRef(null),i=c.useRef(null),d=()=>{if(s.current){const{overflow:p,paddingRight:m}=s.current.style;if(i.current={overflow:p,paddingRight:m},r){const h=s.current===document.body?window.innerWidth:s.current.offsetWidth,l=parseInt(window.getComputedStyle(s.current).paddingRight,10)||0,w=h-s.current.scrollWidth;s.current.style.paddingRight=`${w+l}px`}s.current.style.overflow="hidden",a(!0)}},u=()=>{s.current&&i.current&&(s.current.style.overflow=i.current.overflow,r&&(s.current.style.paddingRight=i.current.paddingRight)),a(!1)};return G(()=>{if(!Ao)return n&&(s.current=typeof n=="string"?document.querySelector(n):n),s.current||(s.current=document.body),t&&d(),()=>{u()}},[t,n,r]),{isLocked:o,lock:d,unlock:u}}var ht=typeof window>"u";function No(e,t,n={}){const{initializeWithValue:r=!0}=n,o=c.useCallback(h=>n.serializer?n.serializer(h):JSON.stringify(h),[n]),a=c.useCallback(h=>{if(n.deserializer)return n.deserializer(h);if(h==="undefined")return;const l=t instanceof Function?t():t;let w;try{w=JSON.parse(h)}catch(g){return console.error("Error parsing JSON:",g),l}return w},[n,t]),s=c.useCallback(()=>{const h=t instanceof Function?t():t;if(ht)return h;try{const l=window.sessionStorage.getItem(e);return l?a(l):h}catch(l){return console.warn(`Error reading sessionStorage key “${e}”:`,l),h}},[t,e,a]),[i,d]=c.useState(()=>r?s():t instanceof Function?t():t),u=Ae(h=>{ht&&console.warn(`Tried setting sessionStorage key “${e}” even though environment is not a client`);try{const l=h instanceof Function?h(s()):h;window.sessionStorage.setItem(e,o(l)),d(l),window.dispatchEvent(new StorageEvent("session-storage",{key:e}))}catch(l){console.warn(`Error setting sessionStorage key “${e}”:`,l)}}),p=Ae(()=>{ht&&console.warn(`Tried removing sessionStorage key “${e}” even though environment is not a client`);const h=t instanceof Function?t():t;window.sessionStorage.removeItem(e),d(h),window.dispatchEvent(new StorageEvent("session-storage",{key:e}))});c.useEffect(()=>{d(s())},[e]);const m=c.useCallback(h=>{h.key&&h.key!==e||d(s())},[e,s]);return q("storage",m),q("session-storage",m),[i,u,p]}function Mo(e){const[t,n]=c.useState(1),r=t+1<=e,o=t-1>0,a=c.useCallback(u=>{const p=u instanceof Function?u(t):u;if(p>=1&&p<=e){n(p);return}throw new Error("Step not valid")},[e,t]),s=c.useCallback(()=>{r&&n(u=>u+1)},[r]),i=c.useCallback(()=>{o&&n(u=>u-1)},[o]),d=c.useCallback(()=>{n(1)},[]);return[t,{goToNextStep:s,goToPrevStep:i,canGoToNextStep:r,canGoToPrevStep:o,setStep:a,reset:d}]}var Po="(prefers-color-scheme: dark)",Io="usehooks-ts-ternary-dark-mode";function Do({defaultValue:e="system",localStorageKey:t=Io,initializeWithValue:n=!0}={}){const r=Ot(Po,{initializeWithValue:n}),[o,a]=kt(t,e,{initializeWithValue:n});return{isDarkMode:o==="dark"||o==="system"&&r,ternaryDarkMode:o,setTernaryDarkMode:a,toggleTernaryDarkMode:()=>{const d=["light","system","dark"];a(u=>{const p=(d.indexOf(u)+1)%d.length;return d[p]})}}}function Bo(e,t){const n=c.useRef(e);G(()=>{n.current=e},[e]),c.useEffect(()=>{if(!t&&t!==0)return;const r=setTimeout(()=>{n.current()},t);return()=>{clearTimeout(r)}},[t])}function Uo(e){const[t,n]=c.useState(!!e),r=c.useCallback(()=>{n(o=>!o)},[]);return[t,r,n]}var Fo=typeof window>"u";function jo(e={}){let{initializeWithValue:t=!0}=e;Fo&&(t=!1);const[n,r]=c.useState(()=>t?{width:window.innerWidth,height:window.innerHeight}:{width:void 0,height:void 0}),o=Ge(r,e.debounceDelay);function a(){(e.debounceDelay?o:r)({width:window.innerWidth,height:window.innerHeight})}return q("resize",a),G(()=>{a()},[]),n}function xn(e,t){return function(){return e.apply(t,arguments)}}const{toString:zo}=Object.prototype,{getPrototypeOf:Lt}=Object,Xe=(e=>t=>{const n=zo.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),te=e=>(e=e.toLowerCase(),t=>Xe(t)===e),Qe=e=>t=>typeof t===e,{isArray:Se}=Array,Le=Qe("undefined");function Ho(e){return e!==null&&!Le(e)&&e.constructor!==null&&!Le(e.constructor)&&J(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Rn=te("ArrayBuffer");function qo(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Rn(e.buffer),t}const $o=Qe("string"),J=Qe("function"),Tn=Qe("number"),Ze=e=>e!==null&&typeof e=="object",Vo=e=>e===!0||e===!1,Ve=e=>{if(Xe(e)!=="object")return!1;const t=Lt(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Wo=te("Date"),Jo=te("File"),Ko=te("Blob"),Yo=te("FileList"),Go=e=>Ze(e)&&J(e.pipe),Xo=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||J(e.append)&&((t=Xe(e))==="formdata"||t==="object"&&J(e.toString)&&e.toString()==="[object FormData]"))},Qo=te("URLSearchParams"),[Zo,es,ts,ns]=["ReadableStream","Request","Response","Headers"].map(te),rs=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ne(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Se(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let i;for(r=0;r<s;r++)i=a[r],t.call(null,e[i],i,e)}}function Cn(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const fe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_n=e=>!Le(e)&&e!==fe;function St(){const{caseless:e}=_n(this)&&this||{},t={},n=(r,o)=>{const a=e&&Cn(t,o)||o;Ve(t[a])&&Ve(r)?t[a]=St(t[a],r):Ve(r)?t[a]=St({},r):Se(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Ne(arguments[r],n);return t}const os=(e,t,n,{allOwnKeys:r}={})=>(Ne(t,(o,a)=>{n&&J(o)?e[a]=xn(o,n):e[a]=o},{allOwnKeys:r}),e),ss=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),as=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},is=(e,t,n,r)=>{let o,a,s;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)s=o[a],(!r||r(s,e,t))&&!i[s]&&(t[s]=e[s],i[s]=!0);e=n!==!1&&Lt(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ls=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},cs=e=>{if(!e)return null;if(Se(e))return e;let t=e.length;if(!Tn(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},us=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Lt(Uint8Array)),ds=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},fs=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ps=te("HTMLFormElement"),hs=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Qt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ms=te("RegExp"),kn=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ne(n,(o,a)=>{let s;(s=t(o,a,e))!==!1&&(r[a]=s||o)}),Object.defineProperties(e,r)},gs=e=>{kn(e,(t,n)=>{if(J(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(J(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ws=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return Se(e)?r(e):r(String(e).split(t)),n},bs=()=>{},ys=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function vs(e){return!!(e&&J(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Ss=e=>{const t=new Array(10),n=(r,o)=>{if(Ze(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=Se(r)?[]:{};return Ne(r,(s,i)=>{const d=n(s,o+1);!Le(d)&&(a[i]=d)}),t[o]=void 0,a}}return r};return n(e,0)},Es=te("AsyncFunction"),xs=e=>e&&(Ze(e)||J(e))&&J(e.then)&&J(e.catch),On=((e,t)=>e?setImmediate:t?((n,r)=>(fe.addEventListener("message",({source:o,data:a})=>{o===fe&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),fe.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",J(fe.postMessage)),Rs=typeof queueMicrotask<"u"?queueMicrotask.bind(fe):typeof process<"u"&&process.nextTick||On,f={isArray:Se,isArrayBuffer:Rn,isBuffer:Ho,isFormData:Xo,isArrayBufferView:qo,isString:$o,isNumber:Tn,isBoolean:Vo,isObject:Ze,isPlainObject:Ve,isReadableStream:Zo,isRequest:es,isResponse:ts,isHeaders:ns,isUndefined:Le,isDate:Wo,isFile:Jo,isBlob:Ko,isRegExp:ms,isFunction:J,isStream:Go,isURLSearchParams:Qo,isTypedArray:us,isFileList:Yo,forEach:Ne,merge:St,extend:os,trim:rs,stripBOM:ss,inherits:as,toFlatObject:is,kindOf:Xe,kindOfTest:te,endsWith:ls,toArray:cs,forEachEntry:ds,matchAll:fs,isHTMLForm:ps,hasOwnProperty:Qt,hasOwnProp:Qt,reduceDescriptors:kn,freezeMethods:gs,toObjectSet:ws,toCamelCase:hs,noop:bs,toFiniteNumber:ys,findKey:Cn,global:fe,isContextDefined:_n,isSpecCompliantForm:vs,toJSONObject:Ss,isAsyncFn:Es,isThenable:xs,setImmediate:On,asap:Rs};function v(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}f.inherits(v,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:f.toJSONObject(this.config),code:this.code,status:this.status}}});const An=v.prototype,Ln={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ln[e]={value:e}});Object.defineProperties(v,Ln);Object.defineProperty(An,"isAxiosError",{value:!0});v.from=(e,t,n,r,o,a)=>{const s=Object.create(An);return f.toFlatObject(e,s,function(d){return d!==Error.prototype},i=>i!=="isAxiosError"),v.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,a&&Object.assign(s,a),s};const Ts=null;function Et(e){return f.isPlainObject(e)||f.isArray(e)}function Nn(e){return f.endsWith(e,"[]")?e.slice(0,-2):e}function Zt(e,t,n){return e?e.concat(t).map(function(o,a){return o=Nn(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function Cs(e){return f.isArray(e)&&!e.some(Et)}const _s=f.toFlatObject(f,{},null,function(t){return/^is[A-Z]/.test(t)});function et(e,t,n){if(!f.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=f.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,b){return!f.isUndefined(b[g])});const r=n.metaTokens,o=n.visitor||p,a=n.dots,s=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(t);if(!f.isFunction(o))throw new TypeError("visitor must be a function");function u(w){if(w===null)return"";if(f.isDate(w))return w.toISOString();if(!d&&f.isBlob(w))throw new v("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(w)||f.isTypedArray(w)?d&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function p(w,g,b){let R=w;if(w&&!b&&typeof w=="object"){if(f.endsWith(g,"{}"))g=r?g:g.slice(0,-2),w=JSON.stringify(w);else if(f.isArray(w)&&Cs(w)||(f.isFileList(w)||f.endsWith(g,"[]"))&&(R=f.toArray(w)))return g=Nn(g),R.forEach(function(T,D){!(f.isUndefined(T)||T===null)&&t.append(s===!0?Zt([g],D,a):s===null?g:g+"[]",u(T))}),!1}return Et(w)?!0:(t.append(Zt(b,g,a),u(w)),!1)}const m=[],h=Object.assign(_s,{defaultVisitor:p,convertValue:u,isVisitable:Et});function l(w,g){if(!f.isUndefined(w)){if(m.indexOf(w)!==-1)throw Error("Circular reference detected in "+g.join("."));m.push(w),f.forEach(w,function(R,E){(!(f.isUndefined(R)||R===null)&&o.call(t,R,f.isString(E)?E.trim():E,g,h))===!0&&l(R,g?g.concat(E):[E])}),m.pop()}}if(!f.isObject(e))throw new TypeError("data must be an object");return l(e),t}function en(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Nt(e,t){this._pairs=[],e&&et(e,this,t)}const Mn=Nt.prototype;Mn.append=function(t,n){this._pairs.push([t,n])};Mn.toString=function(t){const n=t?function(r){return t.call(this,r,en)}:en;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function ks(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Pn(e,t,n){if(!t)return e;const r=n&&n.encode||ks;f.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(o?a=o(t,n):a=f.isURLSearchParams(t)?t.toString():new Nt(t,n).toString(r),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class tn{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){f.forEach(this.handlers,function(r){r!==null&&t(r)})}}const In={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Os=typeof URLSearchParams<"u"?URLSearchParams:Nt,As=typeof FormData<"u"?FormData:null,Ls=typeof Blob<"u"?Blob:null,Ns={isBrowser:!0,classes:{URLSearchParams:Os,FormData:As,Blob:Ls},protocols:["http","https","file","blob","url","data"]},Mt=typeof window<"u"&&typeof document<"u",xt=typeof navigator=="object"&&navigator||void 0,Ms=Mt&&(!xt||["ReactNative","NativeScript","NS"].indexOf(xt.product)<0),Ps=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Is=Mt&&window.location.href||"http://localhost",Ds=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Mt,hasStandardBrowserEnv:Ms,hasStandardBrowserWebWorkerEnv:Ps,navigator:xt,origin:Is},Symbol.toStringTag,{value:"Module"})),U={...Ds,...Ns};function Bs(e,t){return et(e,new U.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return U.isNode&&f.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Us(e){return f.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Fs(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function Dn(e){function t(n,r,o,a){let s=n[a++];if(s==="__proto__")return!0;const i=Number.isFinite(+s),d=a>=n.length;return s=!s&&f.isArray(o)?o.length:s,d?(f.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!i):((!o[s]||!f.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],a)&&f.isArray(o[s])&&(o[s]=Fs(o[s])),!i)}if(f.isFormData(e)&&f.isFunction(e.entries)){const n={};return f.forEachEntry(e,(r,o)=>{t(Us(r),o,n,0)}),n}return null}function js(e,t,n){if(f.isString(e))try{return(t||JSON.parse)(e),f.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Me={transitional:In,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=f.isObject(t);if(a&&f.isHTMLForm(t)&&(t=new FormData(t)),f.isFormData(t))return o?JSON.stringify(Dn(t)):t;if(f.isArrayBuffer(t)||f.isBuffer(t)||f.isStream(t)||f.isFile(t)||f.isBlob(t)||f.isReadableStream(t))return t;if(f.isArrayBufferView(t))return t.buffer;if(f.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Bs(t,this.formSerializer).toString();if((i=f.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return et(i?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),js(t)):t}],transformResponse:[function(t){const n=this.transitional||Me.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(f.isResponse(t)||f.isReadableStream(t))return t;if(t&&f.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(s)throw i.name==="SyntaxError"?v.from(i,v.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:U.classes.FormData,Blob:U.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],e=>{Me.headers[e]={}});const zs=f.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Hs=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
3
|
+
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&zs[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},nn=Symbol("internals");function Oe(e){return e&&String(e).trim().toLowerCase()}function We(e){return e===!1||e==null?e:f.isArray(e)?e.map(We):String(e)}function qs(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const $s=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function mt(e,t,n,r,o){if(f.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!f.isString(t)){if(f.isString(r))return t.indexOf(r)!==-1;if(f.isRegExp(r))return r.test(t)}}function Vs(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Ws(e,t){const n=f.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,s){return this[r].call(this,t,o,a,s)},configurable:!0})})}let H=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(i,d,u){const p=Oe(d);if(!p)throw new Error("header name must be a non-empty string");const m=f.findKey(o,p);(!m||o[m]===void 0||u===!0||u===void 0&&o[m]!==!1)&&(o[m||d]=We(i))}const s=(i,d)=>f.forEach(i,(u,p)=>a(u,p,d));if(f.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(f.isString(t)&&(t=t.trim())&&!$s(t))s(Hs(t),n);else if(f.isHeaders(t))for(const[i,d]of t.entries())a(d,i,r);else t!=null&&a(n,t,r);return this}get(t,n){if(t=Oe(t),t){const r=f.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return qs(o);if(f.isFunction(n))return n.call(this,o,r);if(f.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Oe(t),t){const r=f.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||mt(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(s){if(s=Oe(s),s){const i=f.findKey(r,s);i&&(!n||mt(r,r[i],i,n))&&(delete r[i],o=!0)}}return f.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||mt(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return f.forEach(this,(o,a)=>{const s=f.findKey(r,a);if(s){n[s]=We(o),delete n[a];return}const i=t?Vs(a):String(a).trim();i!==a&&delete n[a],n[i]=We(o),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return f.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&f.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
4
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[nn]=this[nn]={accessors:{}}).accessors,o=this.prototype;function a(s){const i=Oe(s);r[i]||(Ws(o,s),r[i]=!0)}return f.isArray(t)?t.forEach(a):a(t),this}};H.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);f.reduceDescriptors(H.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});f.freezeMethods(H);function gt(e,t){const n=this||Me,r=t||n,o=H.from(r.headers);let a=r.data;return f.forEach(e,function(i){a=i.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Bn(e){return!!(e&&e.__CANCEL__)}function Ee(e,t,n){v.call(this,e??"canceled",v.ERR_CANCELED,t,n),this.name="CanceledError"}f.inherits(Ee,v,{__CANCEL__:!0});function Un(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new v("Request failed with status code "+n.status,[v.ERR_BAD_REQUEST,v.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Js(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Ks(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,s;return t=t!==void 0?t:1e3,function(d){const u=Date.now(),p=r[a];s||(s=u),n[o]=d,r[o]=u;let m=a,h=0;for(;m!==o;)h+=n[m++],m=m%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),u-s<t)return;const l=p&&u-p;return l?Math.round(h*1e3/l):void 0}}function Ys(e,t){let n=0,r=1e3/t,o,a;const s=(u,p=Date.now())=>{n=p,o=null,a&&(clearTimeout(a),a=null),e.apply(null,u)};return[(...u)=>{const p=Date.now(),m=p-n;m>=r?s(u,p):(o=u,a||(a=setTimeout(()=>{a=null,s(o)},r-m)))},()=>o&&s(o)]}const Ke=(e,t,n=3)=>{let r=0;const o=Ks(50,250);return Ys(a=>{const s=a.loaded,i=a.lengthComputable?a.total:void 0,d=s-r,u=o(d),p=s<=i;r=s;const m={loaded:s,total:i,progress:i?s/i:void 0,bytes:d,rate:u||void 0,estimated:u&&i&&p?(i-s)/u:void 0,event:a,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(m)},n)},rn=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},on=e=>(...t)=>f.asap(()=>e(...t)),Gs=U.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,U.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(U.origin),U.navigator&&/(msie|trident)/i.test(U.navigator.userAgent)):()=>!0,Xs=U.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const s=[e+"="+encodeURIComponent(t)];f.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),f.isString(r)&&s.push("path="+r),f.isString(o)&&s.push("domain="+o),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Qs(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Zs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Fn(e,t,n){let r=!Qs(t);return e&&r||n==!1?Zs(e,t):t}const sn=e=>e instanceof H?{...e}:e;function he(e,t){t=t||{};const n={};function r(u,p,m,h){return f.isPlainObject(u)&&f.isPlainObject(p)?f.merge.call({caseless:h},u,p):f.isPlainObject(p)?f.merge({},p):f.isArray(p)?p.slice():p}function o(u,p,m,h){if(f.isUndefined(p)){if(!f.isUndefined(u))return r(void 0,u,m,h)}else return r(u,p,m,h)}function a(u,p){if(!f.isUndefined(p))return r(void 0,p)}function s(u,p){if(f.isUndefined(p)){if(!f.isUndefined(u))return r(void 0,u)}else return r(void 0,p)}function i(u,p,m){if(m in t)return r(u,p);if(m in e)return r(void 0,u)}const d={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:i,headers:(u,p,m)=>o(sn(u),sn(p),m,!0)};return f.forEach(Object.keys(Object.assign({},e,t)),function(p){const m=d[p]||o,h=m(e[p],t[p],p);f.isUndefined(h)&&m!==i||(n[p]=h)}),n}const jn=e=>{const t=he({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:i}=t;t.headers=s=H.from(s),t.url=Pn(Fn(t.baseURL,t.url),e.params,e.paramsSerializer),i&&s.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let d;if(f.isFormData(n)){if(U.hasStandardBrowserEnv||U.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((d=s.getContentType())!==!1){const[u,...p]=d?d.split(";").map(m=>m.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...p].join("; "))}}if(U.hasStandardBrowserEnv&&(r&&f.isFunction(r)&&(r=r(t)),r||r!==!1&&Gs(t.url))){const u=o&&a&&Xs.read(a);u&&s.set(o,u)}return t},ea=typeof XMLHttpRequest<"u",ta=ea&&function(e){return new Promise(function(n,r){const o=jn(e);let a=o.data;const s=H.from(o.headers).normalize();let{responseType:i,onUploadProgress:d,onDownloadProgress:u}=o,p,m,h,l,w;function g(){l&&l(),w&&w(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function R(){if(!b)return;const T=H.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),A={data:!i||i==="text"||i==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:T,config:e,request:b};Un(function(M){n(M),g()},function(M){r(M),g()},A),b=null}"onloadend"in b?b.onloadend=R:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(R)},b.onabort=function(){b&&(r(new v("Request aborted",v.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new v("Network Error",v.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let D=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const A=o.transitional||In;o.timeoutErrorMessage&&(D=o.timeoutErrorMessage),r(new v(D,A.clarifyTimeoutError?v.ETIMEDOUT:v.ECONNABORTED,e,b)),b=null},a===void 0&&s.setContentType(null),"setRequestHeader"in b&&f.forEach(s.toJSON(),function(D,A){b.setRequestHeader(A,D)}),f.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),i&&i!=="json"&&(b.responseType=o.responseType),u&&([h,w]=Ke(u,!0),b.addEventListener("progress",h)),d&&b.upload&&([m,l]=Ke(d),b.upload.addEventListener("progress",m),b.upload.addEventListener("loadend",l)),(o.cancelToken||o.signal)&&(p=T=>{b&&(r(!T||T.type?new Ee(null,e,b):T),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const E=Js(o.url);if(E&&U.protocols.indexOf(E)===-1){r(new v("Unsupported protocol "+E+":",v.ERR_BAD_REQUEST,e));return}b.send(a||null)})},na=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(u){if(!o){o=!0,i();const p=u instanceof Error?u:this.reason;r.abort(p instanceof v?p:new Ee(p instanceof Error?p.message:p))}};let s=t&&setTimeout(()=>{s=null,a(new v(`timeout ${t} of ms exceeded`,v.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),e=null)};e.forEach(u=>u.addEventListener("abort",a));const{signal:d}=r;return d.unsubscribe=()=>f.asap(i),d}},ra=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},oa=async function*(e,t){for await(const n of sa(e))yield*ra(n,t)},sa=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},an=(e,t,n,r)=>{const o=oa(e,t);let a=0,s,i=d=>{s||(s=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:u,value:p}=await o.next();if(u){i(),d.close();return}let m=p.byteLength;if(n){let h=a+=m;n(h)}d.enqueue(new Uint8Array(p))}catch(u){throw i(u),u}},cancel(d){return i(d),o.return()}},{highWaterMark:2})},tt=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",zn=tt&&typeof ReadableStream=="function",aa=tt&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Hn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ia=zn&&Hn(()=>{let e=!1;const t=new Request(U.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ln=64*1024,Rt=zn&&Hn(()=>f.isReadableStream(new Response("").body)),Ye={stream:Rt&&(e=>e.body)};tt&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ye[t]&&(Ye[t]=f.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new v(`Response type '${t}' is not supported`,v.ERR_NOT_SUPPORT,r)})})})(new Response);const la=async e=>{if(e==null)return 0;if(f.isBlob(e))return e.size;if(f.isSpecCompliantForm(e))return(await new Request(U.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(f.isArrayBufferView(e)||f.isArrayBuffer(e))return e.byteLength;if(f.isURLSearchParams(e)&&(e=e+""),f.isString(e))return(await aa(e)).byteLength},ca=async(e,t)=>{const n=f.toFiniteNumber(e.getContentLength());return n??la(t)},ua=tt&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:s,onDownloadProgress:i,onUploadProgress:d,responseType:u,headers:p,withCredentials:m="same-origin",fetchOptions:h}=jn(e);u=u?(u+"").toLowerCase():"text";let l=na([o,a&&a.toAbortSignal()],s),w;const g=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let b;try{if(d&&ia&&n!=="get"&&n!=="head"&&(b=await ca(p,r))!==0){let A=new Request(t,{method:"POST",body:r,duplex:"half"}),S;if(f.isFormData(r)&&(S=A.headers.get("content-type"))&&p.setContentType(S),A.body){const[M,F]=rn(b,Ke(on(d)));r=an(A.body,ln,M,F)}}f.isString(m)||(m=m?"include":"omit");const R="credentials"in Request.prototype;w=new Request(t,{...h,signal:l,method:n.toUpperCase(),headers:p.normalize().toJSON(),body:r,duplex:"half",credentials:R?m:void 0});let E=await fetch(w);const T=Rt&&(u==="stream"||u==="response");if(Rt&&(i||T&&g)){const A={};["status","statusText","headers"].forEach(ne=>{A[ne]=E[ne]});const S=f.toFiniteNumber(E.headers.get("content-length")),[M,F]=i&&rn(S,Ke(on(i),!0))||[];E=new Response(an(E.body,ln,M,()=>{F&&F(),g&&g()}),A)}u=u||"text";let D=await Ye[f.findKey(Ye,u)||"text"](E,e);return!T&&g&&g(),await new Promise((A,S)=>{Un(A,S,{data:D,headers:H.from(E.headers),status:E.status,statusText:E.statusText,config:e,request:w})})}catch(R){throw g&&g(),R&&R.name==="TypeError"&&/fetch/i.test(R.message)?Object.assign(new v("Network Error",v.ERR_NETWORK,e,w),{cause:R.cause||R}):v.from(R,R&&R.code,e,w)}}),Tt={http:Ts,xhr:ta,fetch:ua};f.forEach(Tt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const cn=e=>`- ${e}`,da=e=>f.isFunction(e)||e===null||e===!1,qn={getAdapter:e=>{e=f.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let s;if(r=n,!da(n)&&(r=Tt[(s=String(n)).toLowerCase()],r===void 0))throw new v(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+a]=r}if(!r){const a=Object.entries(o).map(([i,d])=>`adapter ${i} `+(d===!1?"is not supported by the environment":"is not available in the build"));let s=t?a.length>1?`since :
|
|
5
|
+
`+a.map(cn).join(`
|
|
6
|
+
`):" "+cn(a[0]):"as no adapter specified";throw new v("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Tt};function wt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ee(null,e)}function un(e){return wt(e),e.headers=H.from(e.headers),e.data=gt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),qn.getAdapter(e.adapter||Me.adapter)(e).then(function(r){return wt(e),r.data=gt.call(e,e.transformResponse,r),r.headers=H.from(r.headers),r},function(r){return Bn(r)||(wt(e),r&&r.response&&(r.response.data=gt.call(e,e.transformResponse,r.response),r.response.headers=H.from(r.response.headers))),Promise.reject(r)})}const $n="1.8.2",nt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{nt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const dn={};nt.transitional=function(t,n,r){function o(a,s){return"[Axios v"+$n+"] Transitional option '"+a+"'"+s+(r?". "+r:"")}return(a,s,i)=>{if(t===!1)throw new v(o(s," has been removed"+(n?" in "+n:"")),v.ERR_DEPRECATED);return n&&!dn[s]&&(dn[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,s,i):!0}};nt.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function fa(e,t,n){if(typeof e!="object")throw new v("options must be an object",v.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],s=t[a];if(s){const i=e[a],d=i===void 0||s(i,a,e);if(d!==!0)throw new v("option "+a+" must be "+d,v.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new v("Unknown option "+a,v.ERR_BAD_OPTION)}}const Je={assertOptions:fa,validators:nt},re=Je.validators;let pe=class{constructor(t){this.defaults=t,this.interceptors={request:new tn,response:new tn}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
7
|
+
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=he(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Je.assertOptions(r,{silentJSONParsing:re.transitional(re.boolean),forcedJSONParsing:re.transitional(re.boolean),clarifyTimeoutError:re.transitional(re.boolean)},!1),o!=null&&(f.isFunction(o)?n.paramsSerializer={serialize:o}:Je.assertOptions(o,{encode:re.function,serialize:re.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Je.assertOptions(n,{baseUrl:re.spelling("baseURL"),withXsrfToken:re.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=a&&f.merge(a.common,a[n.method]);a&&f.forEach(["delete","get","head","post","put","patch","common"],w=>{delete a[w]}),n.headers=H.concat(s,a);const i=[];let d=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(d=d&&g.synchronous,i.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let p,m=0,h;if(!d){const w=[un.bind(this),void 0];for(w.unshift.apply(w,i),w.push.apply(w,u),h=w.length,p=Promise.resolve(n);m<h;)p=p.then(w[m++],w[m++]);return p}h=i.length;let l=n;for(m=0;m<h;){const w=i[m++],g=i[m++];try{l=w(l)}catch(b){g.call(this,b);break}}try{p=un.call(this,l)}catch(w){return Promise.reject(w)}for(m=0,h=u.length;m<h;)p=p.then(u[m++],u[m++]);return p}getUri(t){t=he(this.defaults,t);const n=Fn(t.baseURL,t.url,t.allowAbsoluteUrls);return Pn(n,t.params,t.paramsSerializer)}};f.forEach(["delete","get","head","options"],function(t){pe.prototype[t]=function(n,r){return this.request(he(r||{},{method:t,url:n,data:(r||{}).data}))}});f.forEach(["post","put","patch"],function(t){function n(r){return function(a,s,i){return this.request(he(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}pe.prototype[t]=n(),pe.prototype[t+"Form"]=n(!0)});let pa=class Vn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const s=new Promise(i=>{r.subscribe(i),a=i}).then(o);return s.cancel=function(){r.unsubscribe(a)},s},t(function(a,s,i){r.reason||(r.reason=new Ee(a,s,i),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Vn(function(o){t=o}),cancel:t}}};function ha(e){return function(n){return e.apply(null,n)}}function ma(e){return f.isObject(e)&&e.isAxiosError===!0}const Ct={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ct).forEach(([e,t])=>{Ct[t]=e});function Wn(e){const t=new pe(e),n=xn(pe.prototype.request,t);return f.extend(n,pe.prototype,t,{allOwnKeys:!0}),f.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Wn(he(e,o))},n}const _=Wn(Me);_.Axios=pe;_.CanceledError=Ee;_.CancelToken=pa;_.isCancel=Bn;_.VERSION=$n;_.toFormData=et;_.AxiosError=v;_.Cancel=_.CanceledError;_.all=function(t){return Promise.all(t)};_.spread=ha;_.isAxiosError=ma;_.mergeConfig=he;_.AxiosHeaders=H;_.formToJSON=e=>Dn(f.isHTMLForm(e)?new FormData(e):e);_.getAdapter=qn.getAdapter;_.HttpStatusCode=Ct;_.default=_;const{Axios:La,AxiosError:Na,CanceledError:Ma,isCancel:Pa,CancelToken:Ia,VERSION:Da,all:Ba,Cancel:Ua,isAxiosError:Fa,spread:ja,toFormData:za,AxiosHeaders:Ha,HttpStatusCode:qa,formToJSON:$a,getAdapter:Va,mergeConfig:Wa}=_,_t="useAxios",ga=async(e=n=>{},t)=>(t.baseURL=mr(),B.debug(_t,`baseURL::${t.baseURL}`),e(t),t),wa=async(e=n=>{},t)=>{var r;if(e(t),t.response.status!==500){if(t.response.status<=401)return B.info(_t,t.response.data.meta),Promise.reject(t.response.data.meta);if(t.response.status===404)return B.info(_t,t.response.data.meta),Promise.reject(t.response.data.meta)}let n;try{let o="";t.request.config&&t.request.config.token_type?o=t.request.config.token_type:t.response.config&&t.response.config.token_type&&(o=t.response.config.token_type),n=_(t.response.config)}catch(o){(r=o==null?void 0:o.data)!=null&&r.meta?n=Promise.reject(o.data.meta):o.data?n=Promise.reject(o.data):n=Promise.reject(o)}return n},qe="useAxios",ba=({onRequest:e,onError:t})=>{_.interceptors.request.use(n=>ga(e,n)),_.interceptors.response.use(n=>n.data.data,n=>wa(t,n)),_.defaults.headers.common["content-type"]="application/json"},ya={get:async(e,t)=>(B.debug(qe,`[get] url | ${e}`),_.get(e,t)),post:async(e,t,n)=>(B.debug(qe,`[post] url | ${e} | payload | ${t}`),_.post(e,t,n)),put:async(e,t,n)=>(B.debug(qe,`[put] url | ${e} | payload | ${t}`),_.put(e,t,n)),delete:async(e,t)=>(B.debug(qe,`[delete] url | ${e}`),_.delete(e,t))};var V=(e=>(e.MINI_MOBILE="mob-sm",e.MOBILE_PORTRAIT="mob",e.MOBILE_LANDSCAPE="mob-l",e.MOBILE_LANDSCAPE_XL="mob-xl",e.TAB_PORTRAIT="tab",e.TAB_LANDSCAPE="tab-l",e.LAPTOP="lap",e.DESKTOP="desk",e))(V||{});const fn={iphone_15:{width:{min:850,max:854},height:{min:390,max:395}},iphone_14_pro_max:{width:{min:925,max:935},height:{min:427,max:435}},iphone_12_pro:{width:{min:840,max:845},height:{min:388,max:392}},iphone_13_mini:{width:{min:810,max:815},height:{min:370,max:377}},iphone_se_22:{width:{min:664,max:668},height:{min:370,max:377}},iphone_xr:{width:{min:894,max:898},height:{min:410,max:417}},gpixel_6_pro:{width:{min:890,max:895},height:{min:408,max:415}},gpixel_4xl:{width:{min:865,max:972},height:{min:408,max:415}},gpixel_3xl:{width:{min:784,max:788},height:{min:390,max:395}},sam_galaxy_s22:{width:{min:778,max:783},height:{min:357,max:365}},sam_galaxy_s22_plus:{width:{min:830,max:835},height:{min:380,max:387}},sam_galaxy_s22_ultra:{width:{min:820,max:825},height:{min:380,max:387}},sam_galaxy_s21:{width:{min:798,max:805},height:{min:358,max:365}},sam_galaxy_s21_plus:{width:{min:850,max:857},height:{min:380,max:387}},sam_galaxy_s20_ultra:{width:{min:910,max:918},height:{min:408,max:415}},nokia_n9:{width:{min:853,max:855},height:{min:478,max:482}}},Jn=()=>({width:window.innerWidth,height:window.innerHeight}),va=({width:e,height:t})=>{const{width:n,height:r}=Jn();return e.min<=n&&e.max>=n&&t.min<=r&&t.max>=r},Kn=()=>{for(const r of Object.keys(fn)){const o=fn[r];if(va(o))return o.vdevice||V.MOBILE_LANDSCAPE_XL}const{width:e,height:t}=Jn(),n=t>=e;return e<=320?V.MINI_MOBILE:e<=480&&e>=320?V.MOBILE_PORTRAIT:e<=767&&e>=481?V.MOBILE_LANDSCAPE:e<=1024&&e>=768?n?V.TAB_PORTRAIT:V.TAB_LANDSCAPE:e<=1280&&e>=1025?V.LAPTOP:(e>=1281,V.DESKTOP)},Sa=["h1","h3","blockquote","br"],Ea={strong:"*",b:"*",i:"_",u:"__",s:"~",strike:"~",highlight:"`",blockquote:">",h1:"# ",h3:"### ",br:`
|
|
8
|
+
`},I={bold:/(^|\s|[{\[])\*{1,2}(.*?\S *)?\*{1,2}(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,italic:/(^|\s|[{\[])\_(.*?\S *)?\_(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,underline:/(^|\s|[{\[])\_{2}(.*?\S *)?\_{2}(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,strike:/(^|\s|[{\[])\~(.*?\S *)?\~(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,heading:/(?:^|\n)(\#{1,6}) (.*?\S *)(?:\n|$)/gm,blockquote:/(?:^|\n)(?:>|>\s|>\s) (.+?)(?:\n|$)/gm,monospace:/(^|\s)\`(.*?\S *)?\`(?=$|\s)/g,codeblock:/(^|\s)`{3}((?:(?:.*?$)\n)?(?:[\s\S]*?))`{3}(?=$|\s)/g,nextline:/(.*)(\n)(.*)/gm,line:/(^|[\n])(\*{3,}|\-{3,})(?=$|[\n])(.*)/g,link:/(^|\s)\[(.+?)\]\(((?:(?:https?:\/\/(?:www\.)?|www\.)|(?:mailto:)).*?)\)(?:{:(.*)})?/gi,image:/!\[(.*)\]\((.*?)\s*(?:(?:'|"|")(.*)(?:'|"|"))?\s*\)(?:{:(.*)})?/gi,video:/(?:\[\!\[(.*)\]\((.*?)\s*(?:(?:'|"|")(.*)(?:'|"|"))?\s*\)(?:{:(.*)})?]\((.*?)\s*(?:(?:'|"|")(.*)(?:'|"|"))?\s*\))(?:{:(.*)})?/gi,bullet:/(^\s|\n|^)([\*|\-|●|○] )(.*?\S *)*(?:(?:.*?$)\n)?((\s)*([\*|\-|●|○] )(.*?\S *)*(?:(?:.*?$)\n)?)*/gm,numlist:/(^\s|\n|^)(\d)+(\.) (.*?\S *)*(?:(?:.*?$)\n)?((\s)*(\d)+(\.)(.*?\S *)*(?:(?:.*?$)\n)?)*/gm,anchor_tag:/<a(>| .*?>)(.*?)<\/a>/g,href:/href=(?:'|")(.*?)(?:'|") ?/g,gdrive_url:/(?:https:\/\/drive\.google\.com\/file\/d\/(.*?)\/view)/,vtype:/(?:vtype=(?:'|"|")(image|audio|video)(?:'|"|"))/},bt=e=>e.replace(/\*/g,"*").replace(/\_/g,"_").replace(/\~/g,"~"),xa=e=>e.replace(/*/g,"*").replace(/_/g,"_").replace(/~/g,"~"),pn=e=>(e&&typeof e=="string"&&(e=e.replace(/'|'/g,"'").replace(/"/g,'"').replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&").replace(///g,"/").replace(/ /g," ").replace(/%2C/g,",")),e),ve=(e,t)=>{let n="",r="";return(e[0]===`
|
|
9
9
|
`||e[0]===" ")&&(n=e[0]),(e[e.length-1]===`
|
|
10
|
-
`||e[e.length-1]===" ")&&(r=e[e.length-1]),n+t+r},
|
|
10
|
+
`||e[e.length-1]===" ")&&(r=e[e.length-1]),n+t+r},hn=e=>new RegExp(`<${e}.*?/?>`,"gm"),mn=e=>{let t=e.match(I.gdrive_url);if(t&&t.length>1&&t[1])return`http://docs.google.com/uc?export=open&id=${t[1]}`;if(e.startsWith("@")){let n=e.split("@")[1].split(":");if(n[0]==="gdrive")return`http://docs.google.com/uc?export=open&id=${n[1]}`}return e},gn=(e="",t="",n="",r="")=>{let o="image";if(r.length){let a=r.match(I.vtype);a&&a.length>1&&a[1]&&(o=a[1])}return o=="audio"?`<audio vmd="audio" controls ${r}>
|
|
11
11
|
<source src="${n}" type="audio/mp3"/>
|
|
12
12
|
</audio>`:o=="video"?`<video vmd="video" controls ${r}>
|
|
13
13
|
<source src="${n}" type="video/mp4"/>
|
|
14
|
-
</video>`:`<img vmd="image" src="${n}" alt="${e}" title="${t}" ${r}>`},
|
|
15
|
-
`),e=
|
|
14
|
+
</video>`:`<img vmd="image" src="${n}" alt="${e}" title="${t}" ${r}>`},Ra={applyReverseMarkdown:e=>(e=e.replace(hn("br"),`
|
|
15
|
+
`),e=pn(e),e=Markdown.reverseAnchor(e),e=e.replace(hn("hr")," --- "),e=Markdown.reverseRecursive(e),e.trim()),reverseRecursive:e=>{let n=new DOMParser().parseFromString(e,"text/html").body.childNodes,r=e===`
|
|
16
16
|
`?`
|
|
17
17
|
`:"";return Array.from(n).forEach(o=>{let a=o.nodeType===Node.TEXT_NODE,s=!a&&o.tagName.toLowerCase();const i=o.innerText;if(i&&(i.trim()||i.includes(`
|
|
18
|
-
`))||a||s==="br"){if(a)return r+=o.data;let d=
|
|
18
|
+
`))||a||s==="br"){if(a)return r+=o.data;let d=Ea[s]||"",u=o.childNodes.length?Markdown.reverseRecursive(o.innerHTML):i;r+=!u.trim()&&u.includes(`
|
|
19
19
|
`)?`
|
|
20
|
-
`:"";let
|
|
21
|
-
`,m=
|
|
22
|
-
`:u+m)}}),r},reverseAnchor:e=>{let{anchor_tag:t,href:n}=I;return e.replace(t,(r,o,a)=>{const s=a;let i;return o.replace(n,(d,u)=>{i=u}),i.includes("mailto:")?i.replace("mailto:",""):`${e[e.indexOf(r)-1]!==" "?" ":""}[${s}](${encodeURI(i)})`})},applyMarkdown:(e,t=!1)=>typeof e!="string"?e:(e=
|
|
23
|
-
`).trim(),e=Markdown.applyRecursive(e,t),e=Markdown.applyOnce(e),e=Markdown.applyNextLine(e),e=
|
|
24
|
-
`),a=0;a<o.length;a++)o[a]=o[a].replace(/[\-|●|○]/,"-"),o[a].includes("-")&&(r+=o[a].replace(/\-/,' <li style="list-style: inherit"> ')+"</li> ");return r})(e)+"</ul> ")},getNumlistHTML:e=>isNaN(e)?
|
|
25
|
-
`),a=0;a<o.length;a++)o[a]=o[a].replace(/(\d)*(\.)/,"-"),o[a].includes("-")&&(r+=o[a].replace(/\-/,'<li style="list-style: decimal"> ')+"</li>");return r})(e)+"</ol> "):e};function
|
|
20
|
+
`:"";let p=u[u.length-1]===`
|
|
21
|
+
`,m=Sa.includes(s)?"":d;r+=d+(p?u.slice(0,u.length-1)+m+`
|
|
22
|
+
`:u+m)}}),r},reverseAnchor:e=>{let{anchor_tag:t,href:n}=I;return e.replace(t,(r,o,a)=>{const s=a;let i;return o.replace(n,(d,u)=>{i=u}),i.includes("mailto:")?i.replace("mailto:",""):`${e[e.indexOf(r)-1]!==" "?" ":""}[${s}](${encodeURI(i)})`})},applyMarkdown:(e,t=!1)=>typeof e!="string"?e:(e=pn(e),e=e.replace(/</g,"<").replace(/>/g,">").replace(/<br>/g,`
|
|
23
|
+
`).trim(),e=Markdown.applyRecursive(e,t),e=Markdown.applyOnce(e),e=Markdown.applyNextLine(e),e=xa(e),'<div class="vmd">'+e+"</div>"),applyRecursive:(e,t=!1)=>(e=e.replace(I.bold,Markdown.getBoldHTML),e=e.replace(I.italic,Markdown.getItalicHTML),e=e.replace(I.underline,Markdown.getUnderLineHTML),e=e.replace(I.strike,Markdown.getStrikeHTML),e=e.replace(I.line,Markdown.getLineHTML),e=e.replace(I.bullet,Markdown.getBulletHTML),e=e.replace(I.numlist,Markdown.getNumlistHTML),t||(e=e.replace(I.video,Markdown.getVideoHTML),e=e.replace(I.image,Markdown.getImageHTML)),e=e.replace(I.link,Markdown.getLinkHTML),e),applyOnce:e=>(e=e.replace(I.blockquote,Markdown.getBlockQuoteHTML),e=e.replace(I.heading,Markdown.getHeadingHTML),e=e.replace(I.codeblock,Markdown.getCodeblockHTML),e=e.replace(I.monospace,Markdown.getMonoSpaceHTML),e),applyNextLine:e=>e.replace(I.nextline,Markdown.getNextLineHTML),getBoldHTML:(e,t,n)=>!n||!n.match(/[^_*`~]/)||n[0]==="*"||n[n.length-1]==="*"||n[0]===" "&&n[n.length-1]===" "||!n?e:t+' <strong vmd="bold">'+Markdown.applyRecursive(n)+"</strong> ",getItalicHTML:(e,t,n)=>!n||!n.match(/[^_*`~]/)||n[0]==="_"||n[n.length-1]==="_"||n[0]===" "&&n[n.length-1]===" "||!n?e:t+' <i vmd="italic">'+Markdown.applyRecursive(n)+"</i> ",getUnderLineHTML:(e,t,n)=>!n||!n.match(/[^_*`~]/)||n[0]==="__"||n[n.length-1]==="__"||n[0]===" "&&n[n.length-1]===" "||!n?e:t+' <u vmd="underline">'+Markdown.applyRecursive(n)+"</u>",getStrikeHTML:(e,t,n)=>!n||!n.match(/[^_*`~]/)||n[0]==="~"||n[n.length-1]==="~"||n[0]===" "&&n[n.length-1]===" "||!n?e:t+' <strike vmd="strike">'+Markdown.applyRecursive(n)+"</strike> ",getHeadingHTML:(e,t,n)=>{let r=t.length;return ve(e," <h"+r+` vmd="h${r}">`+bt(n)+"</h"+r+"> ")},getBlockQuoteHTML:(e,t)=>(t=t.trim(),t.length?ve(e,' <blockquote vmd="blockquote"><p>'+Markdown.applyRecursive(t)+"</p></blockquote> "):e),getMonoSpaceHTML:(e,t,n)=>!n||!n.match(/[^_*`~]/)||n[0]==="`"||n[n.length-1]==="`"||n[0]===" "&&n[n.length-1]===" "?e:t+' <code vmd="monospace" class="code">“'+bt(n)+"”</code> ",getCodeblockHTML:(e,t,n)=>n.trim().length===0?e:t+' <pre vmd="codeblock"> '+Markdown.applyRecursive(n)+"</pre>",getNextLineHTML:(e,t,n,r)=>t+' <br vmd="br" > '+r,getLineHTML:(e,t,n,r)=>t+'<hr vmd="line" class="hr w100">'+Markdown.applyRecursive(r.trim()),getLinkHTML:(e,t,n,r,o)=>{var a=r.startsWith("www.")?"http://"+r:r;return t+` <a vmd="link" href="${encodeURI(a)}" rel="noopener noreferrer" ${o}>${bt(n)}</a>`},getImageHTML:(e,t,n,r,o)=>{let a=gn(t,r,mn(n),o);return ve(e,a)},getVideoHTML:(e,t,n,r,o,a,s,i)=>{let d=gn(t,r,mn(n),o);return ve(e,`<a vmd="hyperlink" href="${a}" title="${s}" rel="noreferrer" ${i}>${d}</a>`)},getBulletHTML:e=>{if(isNaN(e)){if(e.replace(/\s/g,"").replace(/\*/g,"").length==0)return e}else return e;return ve(e,' <ul vmd="list-bullet" style="list-style-type: disc; list-style: inherit;">'+(n=>{let r="";for(var o=n.split(`
|
|
24
|
+
`),a=0;a<o.length;a++)o[a]=o[a].replace(/[\-|●|○]/,"-"),o[a].includes("-")&&(r+=o[a].replace(/\-/,' <li style="list-style: inherit"> ')+"</li> ");return r})(e)+"</ul> ")},getNumlistHTML:e=>isNaN(e)?ve(e,' <ol vmd="list-number">'+(n=>{let r="";for(var o=n.split(`
|
|
25
|
+
`),a=0;a<o.length;a++)o[a]=o[a].replace(/(\d)*(\.)/,"-"),o[a].includes("-")&&(r+=o[a].replace(/\-/,'<li style="list-style: decimal"> ')+"</li>");return r})(e)+"</ol> "):e};function Ta(){return{toTop:()=>{window.scrollTo({top:0,behavior:"smooth"})},toNextPage:()=>{window.scrollTo({top:window.innerHeight,behavior:"smooth"})},byId:(o="",a=!0)=>{const s=document.getElementById(o);let i="start";if(a){const d=Kn();i=d===V.MINI_MOBILE||d===V.MOBILE_PORTRAIT?"start":"center"}s==null||s.scrollIntoView({behavior:"smooth",block:i})},byIdOffSet:(o="")=>{const a=document.getElementById(o),s=75,i=document.body.getBoundingClientRect().top,p=a.getBoundingClientRect().top-i-s;window.scroll({top:p,behavior:"smooth"})}}}function Ca({meta:e=!1,ctrl:t=!1,shift:n=!1,key:r,handler:o}){q("keydown",a=>{if(a.metaKey===e){if(a.ctrlKey!==t)return;if(a.shiftKey!==n)return;a.key===r&&(a.stopImmediatePropagation(),a.preventDefault(),a.stopPropagation(),o())}})}const _a="useStore";let Yn="v0xapp",Gn="1.0.5-alpha";function $e(e){return`vezham-ls-${Yn}-${Gn}-${e}`}const ka=e=>{e.pretext&&(Yn=e.pretext),e.version&&(Gn=e.version)},Xn={get:(e,t)=>{try{const n=window.localStorage.getItem($e(e));return n&&n!=="undefined"?n:t||""}catch(n){return B.error(_a,`key | ${$e(e)} | err: `,n),t||""}},has:e=>!!Xn.get(e),set:(e,t)=>window.localStorage.setItem($e(e),t),delete:e=>window.localStorage.removeItem($e(e)),purge:()=>window.localStorage.clear()};exports.GetDevice=Kn;exports.Vdevice=V;exports.defineAxios=ba;exports.defineStore=ka;exports.useAxios=ya;exports.useBoolean=bn;exports.useClickAnyWhere=co;exports.useCopyToClipboard=uo;exports.useCountdown=fo;exports.useCounter=yn;exports.useDarkMode=go;exports.useDebounceCallback=Ge;exports.useDebounceValue=wo;exports.useDocumentTitle=bo;exports.useEffect=yo;exports.useEventCallback=Ae;exports.useEventListener=q;exports.useHover=vo;exports.useIntersectionObserver=So;exports.useInterval=vn;exports.useIsClient=Eo;exports.useIsFirstRender=Sn;exports.useIsMounted=En;exports.useIsomorphicLayoutEffect=G;exports.useLocalStorage=kt;exports.useLogger=B;exports.useMap=xo;exports.useMarkdown=Ra;exports.useMediaQuery=Ot;exports.useOnClickOutside=Ro;exports.useReadLocalStorage=To;exports.useResizeObserver=Co;exports.useScreen=_o;exports.useScript=Oo;exports.useScrollLock=Lo;exports.useScrollTo=Ta;exports.useSessionStorage=No;exports.useShortcut=Ca;exports.useStep=Mo;exports.useStore=Xn;exports.useTernaryDarkMode=Do;exports.useTimeout=Bo;exports.useToast=wn;exports.useToggle=Uo;exports.useUnmount=At;exports.useWindowSize=jo;
|